/*! For license information please see main.be1c7bee.js.LICENSE.txt */
(()=>{var e={446:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",c="week",s="month",d="quarter",u="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,s),a=n-o<0,i=t.clone().add(r+(a?-1:1),s);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:s,y:u,w:c,d:l,D:f,h:i,m:a,s:o,ms:r,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",x={};x[y]=g;var w="$isDayjsObject",C=function(e){return e instanceof j||!(!e||!e[w])},S=function e(t,n,r){var o;if(!t)return y;if("string"==typeof t){var a=t.toLowerCase();x[a]&&(o=a),n&&(x[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var l=t.name;x[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},E=function(e,t){if(C(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new j(n)},k=b;k.l=S,k.i=C,k.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var j=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return k},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var n=E(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return E(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<E(e)},v.$g=function(e,t,n){return k.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!k.u(t)||t,d=k.p(e),p=function(e,t){var o=k.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(l)},h=function(e,t){return k.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case u:return r?p(1,0):p(31,11);case s:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,x=(m<y?m+7:m)-y;return p(r?v-x:v+(6-x),g);case l:case f:return h(b+"Hours",0);case i:return h(b+"Minutes",1);case a:return h(b+"Seconds",2);case o:return h(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,c=k.p(e),d="set"+(this.$u?"UTC":""),p=(n={},n[l]=d+"Date",n[f]=d+"Date",n[s]=d+"Month",n[u]=d+"FullYear",n[i]=d+"Hours",n[a]=d+"Minutes",n[o]=d+"Seconds",n[r]=d+"Milliseconds",n)[c],h=c===l?this.$D+(t-this.$W):t;if(c===s||c===u){var m=this.clone().set(f,1);m.$d[p](h),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[k.p(e)]()},v.add=function(r,d){var f,p=this;r=Number(r);var h=k.p(d),m=function(e){var t=E(p);return k.w(t.date(t.date()+Math.round(e*r)),p)};if(h===s)return this.set(s,this.$M+r);if(h===u)return this.set(u,this.$y+r);if(h===l)return m(1);if(h===c)return m(7);var g=(f={},f[a]=t,f[i]=n,f[o]=e,f)[h]||1,v=this.$d.getTime()+r*g;return k.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=k.z(this),a=this.$H,i=this.$m,l=this.$M,c=n.weekdays,s=n.months,d=n.meridiem,u=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},f=function(e){return k.s(a%12||12,e,"0")},h=d||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return k.s(t.$y,4,"0");case"M":return l+1;case"MM":return k.s(l+1,2,"0");case"MMM":return u(n.monthsShort,l,s,3);case"MMMM":return u(s,l);case"D":return t.$D;case"DD":return k.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return u(n.weekdaysMin,t.$W,c,2);case"ddd":return u(n.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(a);case"HH":return k.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return h(a,i,!0);case"A":return h(a,i,!1);case"m":return String(i);case"mm":return k.s(i,2,"0");case"s":return String(t.$s);case"ss":return k.s(t.$s,2,"0");case"SSS":return k.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,f,p){var h,m=this,g=k.p(f),v=E(r),b=(v.utcOffset()-this.utcOffset())*t,y=this-v,x=function(){return k.m(m,v)};switch(g){case u:h=x()/12;break;case s:h=x();break;case d:h=x()/3;break;case c:h=(y-b)/6048e5;break;case l:h=(y-b)/864e5;break;case i:h=y/n;break;case a:h=y/t;break;case o:h=y/e;break;default:h=y}return p?h:k.a(h)},v.daysInMonth=function(){return this.endOf(s).$D},v.$locale=function(){return x[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return k.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),I=j.prototype;return E.prototype=I,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",l],["$M",s],["$y",u],["$D",f]].forEach((function(e){I[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,j,E),e.$i=!0),E},E.locale=S,E.isDayjs=C,E.unix=function(e){return E(1e3*e)},E.en=x[y],E.Ls=x,E.p={},E}()},76:function(e){e.exports=function(){"use strict";return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var o=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return o.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return o.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return o.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return r.bind(this)(a)}}}()},988:function(e){e.exports=function(){"use strict";var e={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"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},l=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],d=function(e){var t=i[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},f={A:[a,function(e){this.afternoon=u(e,!1)}],a:[a,function(e){this.afternoon=u(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,c("seconds")],ss:[o,c("seconds")],m:[o,c("minutes")],mm:[o,c("minutes")],H:[o,c("hours")],h:[o,c("hours")],HH:[o,c("hours")],hh:[o,c("hours")],D:[o,c("day")],DD:[r,c("day")],Do:[a,function(e){var t=i.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[o,c("week")],ww:[r,c("week")],M:[o,c("month")],MM:[r,c("month")],MMM:[a,function(e){var t=d("months"),n=(d("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,c("year")],YY:[r,function(e){this.year=l(e)}],YYYY:[/\d{4}/,c("year")],Z:s,ZZ:s};function p(n){var r,o;r=n,o=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||o[r]||e[r]||o[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),l=a.length,c=0;c<l;c+=1){var s=a[c],d=f[s],u=d&&d[0],p=d&&d[1];a[c]=p?{regex:u,parser:p}:s.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<l;n+=1){var o=a[n];if("string"==typeof o)r+=o.length;else{var i=o.regex,c=o.parser,s=e.slice(r),d=i.exec(s)[0];c.call(t,d),e=e.replace(d,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(l=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var l=a[1];if("string"==typeof l){var c=!0===a[2],s=!0===a[3],d=c||s,u=a[2];s&&(u=a[2]),i=this.$locale(),!c&&u&&(i=n.Ls[u]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=p(t)(e),a=o.year,i=o.month,l=o.day,c=o.hours,s=o.minutes,d=o.seconds,u=o.milliseconds,f=o.zone,h=o.week,m=new Date,g=l||(a||i?1:m.getDate()),v=a||m.getFullYear(),b=0;a&&!i||(b=i>0?i-1:m.getMonth());var y,x=c||0,w=s||0,C=d||0,S=u||0;return f?new Date(Date.UTC(v,b,g,x,w,C,S+60*f.offset*1e3)):n?new Date(Date.UTC(v,b,g,x,w,C,S)):(y=new Date(v,b,g,x,w,C,S),h&&(y=r(y).week(h).toDate()),y)}catch(e){return new Date("")}}(t,l,r,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&t!=this.format(l)&&(this.$d=new Date("")),i={}}else if(l instanceof Array)for(var f=l.length,h=1;h<=f;h+=1){a[1]=l[h-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}h===f&&(this.$d=new Date(""))}else o.call(this,e)}}}()},199:function(e){e.exports=function(){"use strict";return function(e,t,n){var r=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var i=e.name?e:e.$locale(),l=o(i[t]),c=o(i[n]),s=l||c.map((function(e){return e.slice(0,r)}));if(!a)return s;var d=i.weekStart;return s.map((function(e,t){return s[(t+(d||0))%7]}))},i=function(){return n.Ls[n.locale()]},l=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):a(e,"months")},monthsShort:function(t){return t?t.format("MMM"):a(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):a(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):a(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):a(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return l(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=i();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return l(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(i(),"months")},n.monthsShort=function(){return a(i(),"monthsShort","months",3)},n.weekdays=function(e){return a(i(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return a(i(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return a(i(),"weekdaysMin","weekdays",2,e)}}}()},865:function(e){e.exports=function(){"use strict";var e="week",t="year";return function(n,r,o){var a=r.prototype;a.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var a=o(this).startOf(t).add(1,t).date(r),i=o(this).endOf(e);if(a.isBefore(i))return 1}var l=o(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),c=this.diff(l,e,!0);return c<0?o(this).startOf("week").week():Math.ceil(c)},a.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},556:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}()},223:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n<t?n+7:n)-t;return this.$utils().u(e)?r:this.subtract(r,"day").add(e,"day")}}}()},450:function(e,t,n){var r,o,a;o=[],void 0===(a="function"===typeof(r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){c(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,l=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(e,t,n){var l=i.URL||i.webkitURL,c=document.createElement("a");t=t||e.name||"download",c.download=t,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?a(c):o(c.href)?r(e,t,n):a(c,c.target="_blank")):(c.href=l.createObjectURL(e),setTimeout((function(){l.revokeObjectURL(c.href)}),4e4),setTimeout((function(){a(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,i){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,i),n);else if(o(e))r(e,n,i);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout((function(){a(l)}))}}:function(e,t,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var a="application/octet-stream"===e.type,c=/constructor/i.test(i.HTMLElement)||i.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&c||l)&&"undefined"!=typeof FileReader){var d=new FileReader;d.onloadend=function(){var e=d.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},d.readAsDataURL(e)}else{var u=i.URL||i.webkitURL,f=u.createObjectURL(e);o?o.location=f:location.href=f,o=null,setTimeout((function(){u.revokeObjectURL(f)}),4e4)}});i.saveAs=c.saveAs=c,e.exports=c})?r.apply(t,o):r)||(e.exports=a)},132:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),s=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case l:case i:case f:case p:return e;default:switch(e=e&&e.$$typeof){case d:case s:case u:case m:case h:case c:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.ForwardRef=u,t.isFragment=function(e){return v(e)===a},t.isMemo=function(e){return v(e)===h}},816:(e,t,n)=>{"use strict";e.exports=n(132)},730:(e,t,n)=>{"use strict";var r=n(43),o=n(853);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function c(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(l[e]=t,e=0;e<t.length;e++)i.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),u=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function m(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function y(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!u.call(h,e)||!u.call(p,e)&&(f.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),C=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),I=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function D(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var L,_=Object.assign;function z(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var B=!1;function F(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"===typeof s.stack){for(var o=s.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,l=a.length-1;1<=i&&0<=l&&o[i]!==a[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==a[l]){if(1!==i||1!==l)do{if(i--,0>--l||o[i]!==a[l]){var c="\n"+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=i&&0<=l);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function H(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function W(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case C:return"Portal";case k:return"Profiler";case E:return"StrictMode";case A:return"Suspense";case O:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case I:return(e.displayName||"Context")+".Consumer";case j:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(t=e.displayName||null)?t:W(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return W(e(t))}catch(n){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function U(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var n=t.checked;return _({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function $(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=U(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Q(e,t){J(e,t);var n=U(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,U(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+U(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return _({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:U(n)}}function ae(e,t){var n=U(t.value),r=U(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var se,de,ue=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((se=se||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=se.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return de(e,t)}))}:de);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=_({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xe=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Se=null,Ee=null;function ke(e){if(e=xo(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=Co(t),Ce(e.stateNode,e.type,t))}}function je(e){Se?Ee?Ee.push(e):Ee=[e]:Se=e}function Ie(){if(Se){var e=Se,t=Ee;if(Ee=Se=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Te(e,t){return e(t)}function Ae(){}var Oe=!1;function Ne(e,t,n){if(Oe)return e(t,n);Oe=!0;try{return Te(e,t,n)}finally{Oe=!1,(null!==Se||null!==Ee)&&(Ae(),Ie())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=Co(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Pe=!1;if(d)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(de){Pe=!1}function De(e,t,n,r,o,a,i,l,c){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(d){this.onError(d)}}var Le=!1,_e=null,ze=!1,Be=null,Fe={onError:function(e){Le=!0,_e=e}};function He(e,t,n,r,o,a,i,l,c){Le=!1,_e=null,De.apply(Fe,arguments)}function We(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ue(e){if(We(e)!==e)throw Error(a(188))}function Ke(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=We(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ue(o),e;if(i===r)return Ue(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,c=o.child;c;){if(c===n){l=!0,n=o,r=i;break}if(c===r){l=!0,r=o,n=i;break}c=c.sibling}if(!l){for(c=i.child;c;){if(c===n){l=!0,n=i,r=o;break}if(c===r){l=!0,r=i,n=o;break}c=c.sibling}if(!l)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Ge(e):null}function Ge(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ge(e);if(null!==t)return t;e=e.sibling}return null}var qe=o.unstable_scheduleCallback,Xe=o.unstable_cancelCallback,Ye=o.unstable_shouldYield,$e=o.unstable_requestPaint,Je=o.unstable_now,Qe=o.unstable_getCurrentPriorityLevel,Ze=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,at=null;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(lt(e)/ct|0)|0},lt=Math.log,ct=Math.LN2;var st=64,dt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var l=i&~o;0!==l?r=ut(l):0!==(a&=i)&&(r=ut(a))}else 0!==(i=n&~o)?r=ut(i):0!==a&&(r=ut(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-it(t)),r|=e[n],t&=~o;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=st;return 0===(4194240&(st<<=1))&&(st=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var yt=0;function xt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,Ct,St,Et,kt,jt=!1,It=[],Tt=null,At=null,Ot=null,Nt=new Map,Rt=new Map,Pt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":At=null;break;case"mouseover":case"mouseout":Ot=null;break;case"pointerover":case"pointerout":Nt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Lt(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=xo(t))&&Ct(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function _t(e){var t=yo(e.target);if(null!==t){var n=We(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void kt(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xo(n))&&Ct(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Bt(e,t,n){zt(e)&&n.delete(t)}function Ft(){jt=!1,null!==Tt&&zt(Tt)&&(Tt=null),null!==At&&zt(At)&&(At=null),null!==Ot&&zt(Ot)&&(Ot=null),Nt.forEach(Bt),Rt.forEach(Bt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,jt||(jt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ft)))}function Wt(e){function t(t){return Ht(t,e)}if(0<It.length){Ht(It[0],e);for(var n=1;n<It.length;n++){var r=It[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&Ht(Tt,e),null!==At&&Ht(At,e),null!==Ot&&Ht(Ot,e),Nt.forEach(t),Rt.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)_t(n),null===n.blockedOn&&Pt.shift()}var Vt=x.ReactCurrentBatchConfig,Ut=!0;function Kt(e,t,n,r){var o=yt,a=Vt.transition;Vt.transition=null;try{yt=1,qt(e,t,n,r)}finally{yt=o,Vt.transition=a}}function Gt(e,t,n,r){var o=yt,a=Vt.transition;Vt.transition=null;try{yt=4,qt(e,t,n,r)}finally{yt=o,Vt.transition=a}}function qt(e,t,n,r){if(Ut){var o=Yt(e,t,n,r);if(null===o)Ur(e,t,r,Xt,n),Dt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Tt=Lt(Tt,e,t,n,r,o),!0;case"dragenter":return At=Lt(At,e,t,n,r,o),!0;case"mouseover":return Ot=Lt(Ot,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return Nt.set(a,Lt(Nt.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,Rt.set(a,Lt(Rt.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Dt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==o;){var a=xo(o);if(null!==a&&wt(a),null===(a=Yt(e,t,n,r))&&Ur(e,t,r,Xt,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Ur(e,t,r,null,n)}}var Xt=null;function Yt(e,t,n,r){if(Xt=null,null!==(e=yo(e=we(r))))if(null===(t=We(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xt=e,null}function $t(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,Qt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Qt,r=n.length,o="value"in Jt?Jt.value:Jt.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return Zt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,ln,cn,sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(sn),un=_({},sn,{view:0,detail:0}),fn=on(un),pn=_({},un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(an=e.screenX-cn.screenX,ln=e.screenY-cn.screenY):ln=an=0,cn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),hn=on(pn),mn=on(_({},pn,{dataTransfer:0})),gn=on(_({},un,{relatedTarget:0})),vn=on(_({},sn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=_({},sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yn=on(bn),xn=on(_({},sn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function En(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function kn(){return En}var jn=_({},un,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),In=on(jn),Tn=on(_({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=on(_({},un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),On=on(_({},sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=_({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=on(Nn),Pn=[9,13,27,32],Mn=d&&"CompositionEvent"in window,Dn=null;d&&"documentMode"in document&&(Dn=document.documentMode);var Ln=d&&"TextEvent"in window&&!Dn,_n=d&&(!Mn||Dn&&8<Dn&&11>=Dn),zn=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Un(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Kn(e,t,n,r){je(r),0<(t=Gr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,qn=null;function Xn(e){zr(e,0)}function Yn(e){if(q(wo(e)))return e}function $n(e,t){if("change"===e)return t}var Jn=!1;if(d){var Qn;if(d){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Qn=Zn}else Qn=!1;Jn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Gn&&(Gn.detachEvent("onpropertychange",nr),qn=Gn=null)}function nr(e){if("value"===e.propertyName&&Yn(qn)){var t=[];Kn(t,qn,e,we(e)),Ne(Xn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,(Gn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(qn)}function ar(e,t){if("click"===e)return Yn(t)}function ir(e,t){if("input"===e||"change"===e)return Yn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function cr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!u.call(t,o)||!lr(e[o],t[o]))return!1}return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function ur(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ur(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ur(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=dr(n,a);var i=dr(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=d&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,br=null,yr=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==X(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&cr(br,r)||(br=r,0<(r=Gr(vr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Sr={},Er={};function kr(e){if(Sr[e])return Sr[e];if(!Cr[e])return e;var t,n=Cr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Er)return Sr[e]=n[t];return e}d&&(Er=document.createElement("div").style,"AnimationEvent"in window||(delete Cr.animationend.animation,delete Cr.animationiteration.animation,delete Cr.animationstart.animation),"TransitionEvent"in window||delete Cr.transitionend.transition);var jr=kr("animationend"),Ir=kr("animationiteration"),Tr=kr("animationstart"),Ar=kr("transitionend"),Or=new Map,Nr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Or.set(e,t),c(t,[e])}for(var Pr=0;Pr<Nr.length;Pr++){var Mr=Nr[Pr];Rr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Rr(jr,"onAnimationEnd"),Rr(Ir,"onAnimationIteration"),Rr(Tr,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Ar,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dr));function _r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,l,c,s){if(He.apply(this,arguments),Le){if(!Le)throw Error(a(198));var d=_e;Le=!1,_e=null,ze||(ze=!0,Be=d)}}(r,t,void 0,e),e.currentTarget=null}function zr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,s=l.currentTarget;if(l=l.listener,c!==a&&o.isPropagationStopped())break e;_r(o,l,s),a=c}else for(i=0;i<r.length;i++){if(c=(l=r[i]).instance,s=l.currentTarget,l=l.listener,c!==a&&o.isPropagationStopped())break e;_r(o,l,s),a=c}}}if(ze)throw e=Be,ze=!1,Be=null,e}function Br(e,t){var n=t[go];void 0===n&&(n=t[go]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Wr(e){if(!e[Hr]){e[Hr]=!0,i.forEach((function(t){"selectionchange"!==t&&(Lr.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,Fr("selectionchange",!1,t))}}function Vr(e,t,n,r){switch($t(t)){case 1:var o=Kt;break;case 4:o=Gt;break;default:o=qt}n=o.bind(null,t,n,e),o=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ur(e,t,n,r,o){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var c=i.tag;if((3===c||4===c)&&((c=i.stateNode.containerInfo)===o||8===c.nodeType&&c.parentNode===o))return;i=i.return}for(;null!==l;){if(null===(i=yo(l)))return;if(5===(c=i.tag)||6===c){r=a=i;continue e}l=l.parentNode}}r=r.return}Ne((function(){var r=a,o=we(n),i=[];e:{var l=Or.get(e);if(void 0!==l){var c=dn,s=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":c=In;break;case"focusin":s="focus",c=gn;break;case"focusout":s="blur",c=gn;break;case"beforeblur":case"afterblur":c=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=An;break;case jr:case Ir:case Tr:c=vn;break;case Ar:c=On;break;case"scroll":c=fn;break;case"wheel":c=Rn;break;case"copy":case"cut":case"paste":c=yn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=Tn}var d=0!==(4&t),u=!d&&"scroll"===e,f=d?null!==l?l+"Capture":null:l;d=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Re(h,f))&&d.push(Kr(h,m,p)))),u)break;h=h.return}0<d.length&&(l=new c(l,s,null,n,o),i.push({event:l,listeners:d}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===xe||!(s=n.relatedTarget||n.fromElement)||!yo(s)&&!s[mo])&&(c||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=r,null!==(s=(s=n.relatedTarget||n.toElement)?yo(s):null)&&(s!==(u=We(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(c=null,s=r),c!==s)){if(d=hn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(d=Tn,m="onPointerLeave",f="onPointerEnter",h="pointer"),u=null==c?l:wo(c),p=null==s?l:wo(s),(l=new d(m,h+"leave",c,n,o)).target=u,l.relatedTarget=p,m=null,yo(o)===r&&((d=new d(f,h+"enter",s,n,o)).target=p,d.relatedTarget=u,m=d),u=m,c&&s)e:{for(f=s,h=0,p=d=c;p;p=qr(p))h++;for(p=0,m=f;m;m=qr(m))p++;for(;0<h-p;)d=qr(d),h--;for(;0<p-h;)f=qr(f),p--;for(;h--;){if(d===f||null!==f&&d===f.alternate)break e;d=qr(d),f=qr(f)}d=null}else d=null;null!==c&&Xr(i,l,c,d,!1),null!==s&&null!==u&&Xr(i,u,s,d,!0)}if("select"===(c=(l=r?wo(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var g=$n;else if(Un(l))if(Jn)g=ir;else{g=or;var v=rr}else(c=l.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(g=ar);switch(g&&(g=g(e,r))?Kn(i,g,n,o):(v&&v(e,l,r),"focusout"===e&&(v=l._wrapperState)&&v.controlled&&"number"===l.type&&ee(l,"number",l.value)),v=r?wo(r):window,e){case"focusin":(Un(v)||"true"===v.contentEditable)&&(gr=v,vr=r,br=null);break;case"focusout":br=vr=gr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,xr(i,n,o);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":xr(i,n,o)}var b;if(Mn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Wn?Fn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(_n&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Wn&&(b=en()):(Qt="value"in(Jt=o)?Jt.value:Jt.textContent,Wn=!0)),0<(v=Gr(r,y)).length&&(y=new xn(y,e,null,n,o),i.push({event:y,listeners:v}),b?y.data=b:null!==(b=Hn(n))&&(y.data=b))),(b=Ln?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Bn=!0,zn);case"textInput":return(e=t.data)===zn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Mn&&Fn(e,t)?(e=en(),Zt=Qt=Jt=null,Wn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return _n&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Gr(r,"onBeforeInput")).length&&(o=new xn("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=b))}zr(i,t)}))}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Re(e,n))&&r.unshift(Kr(e,a,o)),null!=(a=Re(e,t))&&r.push(Kr(e,a,o))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Xr(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var l=n,c=l.alternate,s=l.stateNode;if(null!==c&&c===r)break;5===l.tag&&null!==s&&(l=s,o?null!=(c=Re(n,a))&&i.unshift(Kr(n,c,l)):o||null!=(c=Re(n,a))&&i.push(Kr(n,c,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Yr=/\r\n?/g,$r=/\u0000|\uFFFD/g;function Jr(e){return("string"===typeof e?e:""+e).replace(Yr,"\n").replace($r,"")}function Qr(e,t,n){if(t=Jr(t),Jr(e)!==t&&n)throw Error(a(425))}function Zr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,ao="function"===typeof Promise?Promise:void 0,io="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof ao?function(e){return ao.resolve(null).then(e).catch(lo)}:ro;function lo(e){setTimeout((function(){throw e}))}function co(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Wt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Wt(t)}function so(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fo=Math.random().toString(36).slice(2),po="__reactFiber$"+fo,ho="__reactProps$"+fo,mo="__reactContainer$"+fo,go="__reactEvents$"+fo,vo="__reactListeners$"+fo,bo="__reactHandles$"+fo;function yo(e){var t=e[po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mo]||n[po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[po])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function xo(e){return!(e=e[po]||e[mo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function Co(e){return e[ho]||null}var So=[],Eo=-1;function ko(e){return{current:e}}function jo(e){0>Eo||(e.current=So[Eo],So[Eo]=null,Eo--)}function Io(e,t){Eo++,So[Eo]=e.current,e.current=t}var To={},Ao=ko(To),Oo=ko(!1),No=To;function Ro(e,t){var n=e.type.contextTypes;if(!n)return To;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Po(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Mo(){jo(Oo),jo(Ao)}function Do(e,t,n){if(Ao.current!==To)throw Error(a(168));Io(Ao,t),Io(Oo,n)}function Lo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,V(e)||"Unknown",o));return _({},n,r)}function _o(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||To,No=Ao.current,Io(Ao,e),Io(Oo,Oo.current),!0}function zo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Lo(e,t,No),r.__reactInternalMemoizedMergedChildContext=e,jo(Oo),jo(Ao),Io(Ao,e)):jo(Oo),Io(Oo,n)}var Bo=null,Fo=!1,Ho=!1;function Wo(e){null===Bo?Bo=[e]:Bo.push(e)}function Vo(){if(!Ho&&null!==Bo){Ho=!0;var e=0,t=yt;try{var n=Bo;for(yt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bo=null,Fo=!1}catch(o){throw null!==Bo&&(Bo=Bo.slice(e+1)),qe(Ze,Vo),o}finally{yt=t,Ho=!1}}return null}var Uo=[],Ko=0,Go=null,qo=0,Xo=[],Yo=0,$o=null,Jo=1,Qo="";function Zo(e,t){Uo[Ko++]=qo,Uo[Ko++]=Go,Go=e,qo=t}function ea(e,t,n){Xo[Yo++]=Jo,Xo[Yo++]=Qo,Xo[Yo++]=$o,$o=e;var r=Jo;e=Qo;var o=32-it(r)-1;r&=~(1<<o),n+=1;var a=32-it(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Jo=1<<32-it(t)+o|n<<o|r,Qo=a+e}else Jo=1<<a|n<<o|r,Qo=e}function ta(e){null!==e.return&&(Zo(e,1),ea(e,1,0))}function na(e){for(;e===Go;)Go=Uo[--Ko],Uo[Ko]=null,qo=Uo[--Ko],Uo[Ko]=null;for(;e===$o;)$o=Xo[--Yo],Xo[Yo]=null,Qo=Xo[--Yo],Xo[Yo]=null,Jo=Xo[--Yo],Xo[Yo]=null}var ra=null,oa=null,aa=!1,ia=null;function la(e,t){var n=Rs(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ca(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ra=e,oa=so(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ra=e,oa=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==$o?{id:Jo,overflow:Qo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Rs(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ra=e,oa=null,!0);default:return!1}}function sa(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function da(e){if(aa){var t=oa;if(t){var n=t;if(!ca(e,t)){if(sa(e))throw Error(a(418));t=so(n.nextSibling);var r=ra;t&&ca(e,t)?la(r,n):(e.flags=-4097&e.flags|2,aa=!1,ra=e)}}else{if(sa(e))throw Error(a(418));e.flags=-4097&e.flags|2,aa=!1,ra=e}}}function ua(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ra=e}function fa(e){if(e!==ra)return!1;if(!aa)return ua(e),aa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oa)){if(sa(e))throw pa(),Error(a(418));for(;t;)la(e,t),t=so(t.nextSibling)}if(ua(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oa=so(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oa=null}}else oa=ra?so(e.stateNode.nextSibling):null;return!0}function pa(){for(var e=oa;e;)e=so(e.nextSibling)}function ha(){oa=ra=null,aa=!1}function ma(e){null===ia?ia=[e]:ia.push(e)}var ga=x.ReactCurrentBatchConfig;function va(e,t){if(e&&e.defaultProps){for(var n in t=_({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var ba=ko(null),ya=null,xa=null,wa=null;function Ca(){wa=xa=ya=null}function Sa(e){var t=ba.current;jo(ba),e._currentValue=t}function Ea(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ka(e,t){ya=e,wa=xa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(xl=!0),e.firstContext=null)}function ja(e){var t=e._currentValue;if(wa!==e)if(e={context:e,memoizedValue:t,next:null},null===xa){if(null===ya)throw Error(a(308));xa=e,ya.dependencies={lanes:0,firstContext:e}}else xa=xa.next=e;return t}var Ia=null;function Ta(e){null===Ia?Ia=[e]:Ia.push(e)}function Aa(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ta(t)):(n.next=o.next,o.next=n),t.interleaved=n,Oa(e,r)}function Oa(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Na=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ma(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Da(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Ac)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Oa(e,n)}return null===(o=r.interleaved)?(t.next=t,Ta(r)):(t.next=o.next,o.next=t),r.interleaved=t,Oa(e,n)}function La(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function _a(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function za(e,t,n,r){var o=e.updateQueue;Na=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,s=c.next;c.next=null,null===i?a=s:i.next=s,i=c;var d=e.alternate;null!==d&&((l=(d=d.updateQueue).lastBaseUpdate)!==i&&(null===l?d.firstBaseUpdate=s:l.next=s,d.lastBaseUpdate=c))}if(null!==a){var u=o.baseState;for(i=0,d=s=c=null,l=a;;){var f=l.lane,p=l.eventTime;if((r&f)===f){null!==d&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,m=l;switch(f=t,p=n,m.tag){case 1:if("function"===typeof(h=m.payload)){u=h.call(p,u,f);break e}u=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null===(f="function"===typeof(h=m.payload)?h.call(p,u,f):h)||void 0===f)break e;u=_({},u,f);break e;case 2:Na=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===d?(s=d=p,c=u):d=d.next=p,i|=f;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(f=l).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===d&&(c=u),o.baseState=c,o.firstBaseUpdate=s,o.lastBaseUpdate=d,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);_c|=i,e.lanes=i,e.memoizedState=u}}function Ba(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var Fa=(new r.Component).refs;function Ha(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:_({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Wa={isMounted:function(e){return!!(e=e._reactInternals)&&We(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ts(),o=ns(e),a=Ma(r,o);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,o))&&(rs(t,e,o,r),La(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ts(),o=ns(e),a=Ma(r,o);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=Da(e,a,o))&&(rs(t,e,o,r),La(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ts(),r=ns(e),o=Ma(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Da(e,o,r))&&(rs(t,e,r,n),La(t,e,r))}};function Va(e,t,n,r,o,a,i){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(o,a))}function Ua(e,t,n){var r=!1,o=To,a=t.contextType;return"object"===typeof a&&null!==a?a=ja(a):(o=Po(t)?No:Ao.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ro(e,o):To),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Wa,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ka(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Wa.enqueueReplaceState(t,t.state,null)}function Ga(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Fa,Ra(e);var a=t.contextType;"object"===typeof a&&null!==a?o.context=ja(a):(a=Po(t)?No:Ao.current,o.context=Ro(e,a)),o.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(Ha(e,t,a,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Wa.enqueueReplaceState(o,o.state,null),za(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function qa(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=r,i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs;t===Fa&&(t=o.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Xa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ya(e){return(0,e._init)(e._payload)}function $a(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ms(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=zs(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){var a=n.type;return a===S?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===R&&Ya(a)===t.type)?((r=o(t,n.props)).ref=qa(e,t,n),r.return=e,r):((r=Ds(n.type,n.key,n.props,null,e.mode,r)).ref=qa(e,t,n),r.return=e,r)}function d(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bs(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function u(e,t,n,r,a){return null===t||7!==t.tag?((t=Ls(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=zs(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Ds(t.type,t.key,t.props,null,e.mode,n)).ref=qa(e,null,t),n.return=e,n;case C:return(t=Bs(t,e.mode,n)).return=e,t;case R:return f(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=Ls(t,e.mode,n,null)).return=e,t;Xa(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:c(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?s(e,t,n,r):null;case C:return n.key===o?d(e,t,n,r):null;case R:return p(e,t,(o=n._init)(n._payload),r)}if(te(n)||D(n))return null!==o?null:u(e,t,n,r,null);Xa(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return s(t,e=e.get(null===r.key?n:r.key)||null,r,o);case C:return d(t,e=e.get(null===r.key?n:r.key)||null,r,o);case R:return h(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||D(r))return u(t,e=e.get(n)||null,r,o,null);Xa(t,r)}return null}function m(o,a,l,c){for(var s=null,d=null,u=a,m=a=0,g=null;null!==u&&m<l.length;m++){u.index>m?(g=u,u=null):g=u.sibling;var v=p(o,u,l[m],c);if(null===v){null===u&&(u=g);break}e&&u&&null===v.alternate&&t(o,u),a=i(v,a,m),null===d?s=v:d.sibling=v,d=v,u=g}if(m===l.length)return n(o,u),aa&&Zo(o,m),s;if(null===u){for(;m<l.length;m++)null!==(u=f(o,l[m],c))&&(a=i(u,a,m),null===d?s=u:d.sibling=u,d=u);return aa&&Zo(o,m),s}for(u=r(o,u);m<l.length;m++)null!==(g=h(u,o,m,l[m],c))&&(e&&null!==g.alternate&&u.delete(null===g.key?m:g.key),a=i(g,a,m),null===d?s=g:d.sibling=g,d=g);return e&&u.forEach((function(e){return t(o,e)})),aa&&Zo(o,m),s}function g(o,l,c,s){var d=D(c);if("function"!==typeof d)throw Error(a(150));if(null==(c=d.call(c)))throw Error(a(151));for(var u=d=null,m=l,g=l=0,v=null,b=c.next();null!==m&&!b.done;g++,b=c.next()){m.index>g?(v=m,m=null):v=m.sibling;var y=p(o,m,b.value,s);if(null===y){null===m&&(m=v);break}e&&m&&null===y.alternate&&t(o,m),l=i(y,l,g),null===u?d=y:u.sibling=y,u=y,m=v}if(b.done)return n(o,m),aa&&Zo(o,g),d;if(null===m){for(;!b.done;g++,b=c.next())null!==(b=f(o,b.value,s))&&(l=i(b,l,g),null===u?d=b:u.sibling=b,u=b);return aa&&Zo(o,g),d}for(m=r(o,m);!b.done;g++,b=c.next())null!==(b=h(m,o,g,b.value,s))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),l=i(b,l,g),null===u?d=b:u.sibling=b,u=b);return e&&m.forEach((function(e){return t(o,e)})),aa&&Zo(o,g),d}return function e(r,a,i,c){if("object"===typeof i&&null!==i&&i.type===S&&null===i.key&&(i=i.props.children),"object"===typeof i&&null!==i){switch(i.$$typeof){case w:e:{for(var s=i.key,d=a;null!==d;){if(d.key===s){if((s=i.type)===S){if(7===d.tag){n(r,d.sibling),(a=o(d,i.props.children)).return=r,r=a;break e}}else if(d.elementType===s||"object"===typeof s&&null!==s&&s.$$typeof===R&&Ya(s)===d.type){n(r,d.sibling),(a=o(d,i.props)).ref=qa(r,d,i),a.return=r,r=a;break e}n(r,d);break}t(r,d),d=d.sibling}i.type===S?((a=Ls(i.props.children,r.mode,c,i.key)).return=r,r=a):((c=Ds(i.type,i.key,i.props,null,r.mode,c)).ref=qa(r,a,i),c.return=r,r=c)}return l(r);case C:e:{for(d=i.key;null!==a;){if(a.key===d){if(4===a.tag&&a.stateNode.containerInfo===i.containerInfo&&a.stateNode.implementation===i.implementation){n(r,a.sibling),(a=o(a,i.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Bs(i,r.mode,c)).return=r,r=a}return l(r);case R:return e(r,a,(d=i._init)(i._payload),c)}if(te(i))return m(r,a,i,c);if(D(i))return g(r,a,i,c);Xa(r,i)}return"string"===typeof i&&""!==i||"number"===typeof i?(i=""+i,null!==a&&6===a.tag?(n(r,a.sibling),(a=o(a,i)).return=r,r=a):(n(r,a),(a=zs(i,r.mode,c)).return=r,r=a),l(r)):n(r,a)}}var Ja=$a(!0),Qa=$a(!1),Za={},ei=ko(Za),ti=ko(Za),ni=ko(Za);function ri(e){if(e===Za)throw Error(a(174));return e}function oi(e,t){switch(Io(ni,t),Io(ti,e),Io(ei,Za),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}jo(ei),Io(ei,t)}function ai(){jo(ei),jo(ti),jo(ni)}function ii(e){ri(ni.current);var t=ri(ei.current),n=ce(t,e.type);t!==n&&(Io(ti,e),Io(ei,n))}function li(e){ti.current===e&&(jo(ei),jo(ti))}var ci=ko(0);function si(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var di=[];function ui(){for(var e=0;e<di.length;e++)di[e]._workInProgressVersionPrimary=null;di.length=0}var fi=x.ReactCurrentDispatcher,pi=x.ReactCurrentBatchConfig,hi=0,mi=null,gi=null,vi=null,bi=!1,yi=!1,xi=0,wi=0;function Ci(){throw Error(a(321))}function Si(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function Ei(e,t,n,r,o,i){if(hi=i,mi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fi.current=null===e||null===e.memoizedState?ll:cl,e=n(r,o),yi){i=0;do{if(yi=!1,xi=0,25<=i)throw Error(a(301));i+=1,vi=gi=null,t.updateQueue=null,fi.current=sl,e=n(r,o)}while(yi)}if(fi.current=il,t=null!==gi&&null!==gi.next,hi=0,vi=gi=mi=null,bi=!1,t)throw Error(a(300));return e}function ki(){var e=0!==xi;return xi=0,e}function ji(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vi?mi.memoizedState=vi=e:vi=vi.next=e,vi}function Ii(){if(null===gi){var e=mi.alternate;e=null!==e?e.memoizedState:null}else e=gi.next;var t=null===vi?mi.memoizedState:vi.next;if(null!==t)vi=t,gi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(gi=e).memoizedState,baseState:gi.baseState,baseQueue:gi.baseQueue,queue:gi.queue,next:null},null===vi?mi.memoizedState=vi=e:vi=vi.next=e}return vi}function Ti(e,t){return"function"===typeof t?t(e):t}function Ai(e){var t=Ii(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=gi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){i=o.next,r=r.baseState;var c=l=null,s=null,d=i;do{var u=d.lane;if((hi&u)===u)null!==s&&(s=s.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var f={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};null===s?(c=s=f,l=r):s=s.next=f,mi.lanes|=u,_c|=u}d=d.next}while(null!==d&&d!==i);null===s?l=r:s.next=c,lr(r,t.memoizedState)||(xl=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=s,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{i=o.lane,mi.lanes|=i,_c|=i,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Oi(e){var t=Ii(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);lr(i,t.memoizedState)||(xl=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ni(){}function Ri(e,t){var n=mi,r=Ii(),o=t(),i=!lr(r.memoizedState,o);if(i&&(r.memoizedState=o,xl=!0),r=r.queue,Ui(Di.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==vi&&1&vi.memoizedState.tag){if(n.flags|=2048,Bi(9,Mi.bind(null,n,r,o,t),void 0,null),null===Oc)throw Error(a(349));0!==(30&hi)||Pi(n,t,o)}return o}function Pi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=mi.updateQueue)?(t={lastEffect:null,stores:null},mi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Mi(e,t,n,r){t.value=n,t.getSnapshot=r,Li(t)&&_i(e)}function Di(e,t,n){return n((function(){Li(t)&&_i(e)}))}function Li(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(r){return!0}}function _i(e){var t=Oa(e,1);null!==t&&rs(t,e,1,-1)}function zi(e){var t=ji();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:e},t.queue=e,e=e.dispatch=nl.bind(null,mi,e),[t.memoizedState,e]}function Bi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=mi.updateQueue)?(t={lastEffect:null,stores:null},mi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fi(){return Ii().memoizedState}function Hi(e,t,n,r){var o=ji();mi.flags|=e,o.memoizedState=Bi(1|t,n,void 0,void 0===r?null:r)}function Wi(e,t,n,r){var o=Ii();r=void 0===r?null:r;var a=void 0;if(null!==gi){var i=gi.memoizedState;if(a=i.destroy,null!==r&&Si(r,i.deps))return void(o.memoizedState=Bi(t,n,a,r))}mi.flags|=e,o.memoizedState=Bi(1|t,n,a,r)}function Vi(e,t){return Hi(8390656,8,e,t)}function Ui(e,t){return Wi(2048,8,e,t)}function Ki(e,t){return Wi(4,2,e,t)}function Gi(e,t){return Wi(4,4,e,t)}function qi(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Xi(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Wi(4,4,qi.bind(null,t,e),n)}function Yi(){}function $i(e,t){var n=Ii();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Si(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ji(e,t){var n=Ii();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Si(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qi(e,t,n){return 0===(21&hi)?(e.baseState&&(e.baseState=!1,xl=!0),e.memoizedState=n):(lr(n,t)||(n=mt(),mi.lanes|=n,_c|=n,e.baseState=!0),t)}function Zi(e,t){var n=yt;yt=0!==n&&4>n?n:4,e(!0);var r=pi.transition;pi.transition={};try{e(!1),t()}finally{yt=n,pi.transition=r}}function el(){return Ii().memoizedState}function tl(e,t,n){var r=ns(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rl(e))ol(t,n);else if(null!==(n=Aa(e,t,n,r))){rs(n,e,r,ts()),al(n,t,r)}}function nl(e,t,n){var r=ns(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rl(e))ol(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,l=a(i,n);if(o.hasEagerState=!0,o.eagerState=l,lr(l,i)){var c=t.interleaved;return null===c?(o.next=o,Ta(t)):(o.next=c.next,c.next=o),void(t.interleaved=o)}}catch(s){}null!==(n=Aa(e,t,o,r))&&(rs(n,e,r,o=ts()),al(n,t,r))}}function rl(e){var t=e.alternate;return e===mi||null!==t&&t===mi}function ol(e,t){yi=bi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function al(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var il={readContext:ja,useCallback:Ci,useContext:Ci,useEffect:Ci,useImperativeHandle:Ci,useInsertionEffect:Ci,useLayoutEffect:Ci,useMemo:Ci,useReducer:Ci,useRef:Ci,useState:Ci,useDebugValue:Ci,useDeferredValue:Ci,useTransition:Ci,useMutableSource:Ci,useSyncExternalStore:Ci,useId:Ci,unstable_isNewReconciler:!1},ll={readContext:ja,useCallback:function(e,t){return ji().memoizedState=[e,void 0===t?null:t],e},useContext:ja,useEffect:Vi,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Hi(4194308,4,qi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hi(4,2,e,t)},useMemo:function(e,t){var n=ji();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ji();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tl.bind(null,mi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ji().memoizedState=e},useState:zi,useDebugValue:Yi,useDeferredValue:function(e){return ji().memoizedState=e},useTransition:function(){var e=zi(!1),t=e[0];return e=Zi.bind(null,e[1]),ji().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mi,o=ji();if(aa){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Oc)throw Error(a(349));0!==(30&hi)||Pi(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Vi(Di.bind(null,r,i,e),[e]),r.flags|=2048,Bi(9,Mi.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ji(),t=Oc.identifierPrefix;if(aa){var n=Qo;t=":"+t+"R"+(n=(Jo&~(1<<32-it(Jo)-1)).toString(32)+n),0<(n=xi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=wi++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},cl={readContext:ja,useCallback:$i,useContext:ja,useEffect:Ui,useImperativeHandle:Xi,useInsertionEffect:Ki,useLayoutEffect:Gi,useMemo:Ji,useReducer:Ai,useRef:Fi,useState:function(){return Ai(Ti)},useDebugValue:Yi,useDeferredValue:function(e){return Qi(Ii(),gi.memoizedState,e)},useTransition:function(){return[Ai(Ti)[0],Ii().memoizedState]},useMutableSource:Ni,useSyncExternalStore:Ri,useId:el,unstable_isNewReconciler:!1},sl={readContext:ja,useCallback:$i,useContext:ja,useEffect:Ui,useImperativeHandle:Xi,useInsertionEffect:Ki,useLayoutEffect:Gi,useMemo:Ji,useReducer:Oi,useRef:Fi,useState:function(){return Oi(Ti)},useDebugValue:Yi,useDeferredValue:function(e){var t=Ii();return null===gi?t.memoizedState=e:Qi(t,gi.memoizedState,e)},useTransition:function(){return[Oi(Ti)[0],Ii().memoizedState]},useMutableSource:Ni,useSyncExternalStore:Ri,useId:el,unstable_isNewReconciler:!1};function dl(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var o=n}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:o,digest:null}}function ul(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function fl(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var pl="function"===typeof WeakMap?WeakMap:Map;function hl(e,t,n){(n=Ma(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Kc||(Kc=!0,Gc=r),fl(0,t)},n}function ml(e,t,n){(n=Ma(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fl(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){fl(0,t),"function"!==typeof r&&(null===qc?qc=new Set([this]):qc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=js.bind(null,e,t,n),t.then(e,e))}function vl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function bl(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ma(-1,1)).tag=2,Da(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var yl=x.ReactCurrentOwner,xl=!1;function wl(e,t,n,r){t.child=null===e?Qa(t,null,n,r):Ja(t,e.child,n,r)}function Cl(e,t,n,r,o){n=n.render;var a=t.ref;return ka(t,o),r=Ei(e,t,n,r,a,o),n=ki(),null===e||xl?(aa&&n&&ta(t),t.flags|=1,wl(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Kl(e,t,o))}function Sl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!==typeof a||Ps(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ds(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,El(e,t,a,r,o))}if(a=e.child,0===(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:cr)(i,r)&&e.ref===t.ref)return Kl(e,t,o)}return t.flags|=1,(e=Ms(a,r)).ref=t.ref,e.return=t,t.child=e}function El(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(cr(a,r)&&e.ref===t.ref){if(xl=!1,t.pendingProps=r=a,0===(e.lanes&o))return t.lanes=e.lanes,Kl(e,t,o);0!==(131072&e.flags)&&(xl=!0)}}return Il(e,t,n,r,o)}function kl(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Io(Mc,Pc),Pc|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Io(Mc,Pc),Pc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Io(Mc,Pc),Pc|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Io(Mc,Pc),Pc|=r;return wl(e,t,o,n),t.child}function jl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Il(e,t,n,r,o){var a=Po(n)?No:Ao.current;return a=Ro(t,a),ka(t,o),n=Ei(e,t,n,r,a,o),r=ki(),null===e||xl?(aa&&r&&ta(t),t.flags|=1,wl(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Kl(e,t,o))}function Tl(e,t,n,r,o){if(Po(n)){var a=!0;_o(t)}else a=!1;if(ka(t,o),null===t.stateNode)Ul(e,t),Ua(t,n,r),Ga(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,s=n.contextType;"object"===typeof s&&null!==s?s=ja(s):s=Ro(t,s=Po(n)?No:Ao.current);var d=n.getDerivedStateFromProps,u="function"===typeof d||"function"===typeof i.getSnapshotBeforeUpdate;u||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(l!==r||c!==s)&&Ka(t,i,r,s),Na=!1;var f=t.memoizedState;i.state=f,za(t,r,i,o),c=t.memoizedState,l!==r||f!==c||Oo.current||Na?("function"===typeof d&&(Ha(t,n,d,r),c=t.memoizedState),(l=Na||Va(t,n,l,r,f,c,s))?(u||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||("function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"===typeof i.componentDidMount&&(t.flags|=4194308)):("function"===typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=s,r=l):("function"===typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Pa(e,t),l=t.memoizedProps,s=t.type===t.elementType?l:va(t.type,l),i.props=s,u=t.pendingProps,f=i.context,"object"===typeof(c=n.contextType)&&null!==c?c=ja(c):c=Ro(t,c=Po(n)?No:Ao.current);var p=n.getDerivedStateFromProps;(d="function"===typeof p||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(l!==u||f!==c)&&Ka(t,i,r,c),Na=!1,f=t.memoizedState,i.state=f,za(t,r,i,o);var h=t.memoizedState;l!==u||f!==h||Oo.current||Na?("function"===typeof p&&(Ha(t,n,p,r),h=t.memoizedState),(s=Na||Va(t,n,s,r,f,h,c)||!1)?(d||"function"!==typeof i.UNSAFE_componentWillUpdate&&"function"!==typeof i.componentWillUpdate||("function"===typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,c),"function"===typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,c)),"function"===typeof i.componentDidUpdate&&(t.flags|=4),"function"===typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=c,r=s):("function"!==typeof i.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof i.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Al(e,t,n,r,a,o)}function Al(e,t,n,r,o,a){jl(e,t);var i=0!==(128&t.flags);if(!r&&!i)return o&&zo(t,n,!1),Kl(e,t,a);r=t.stateNode,yl.current=t;var l=i&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=Ja(t,e.child,null,a),t.child=Ja(t,null,l,a)):wl(e,t,l,a),t.memoizedState=r.state,o&&zo(t,n,!0),t.child}function Ol(e){var t=e.stateNode;t.pendingContext?Do(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Do(0,t.context,!1),oi(e,t.containerInfo)}function Nl(e,t,n,r,o){return ha(),ma(o),t.flags|=256,wl(e,t,n,r),t.child}var Rl,Pl,Ml,Dl,Ll={dehydrated:null,treeContext:null,retryLane:0};function _l(e){return{baseLanes:e,cachePool:null,transitions:null}}function zl(e,t,n){var r,o=t.pendingProps,i=ci.current,l=!1,c=0!==(128&t.flags);if((r=c)||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(l=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Io(ci,1&i),null===e)return da(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=o.children,e=o.fallback,l?(o=t.mode,l=t.child,c={mode:"hidden",children:c},0===(1&o)&&null!==l?(l.childLanes=0,l.pendingProps=c):l=_s(c,o,0,null),e=Ls(e,o,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=_l(n),t.memoizedState=Ll,e):Bl(t,c));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,o,i,l){if(n)return 256&t.flags?(t.flags&=-257,Fl(e,t,l,r=ul(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=_s({mode:"visible",children:r.children},o,0,null),(i=Ls(i,o,l,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!==(1&t.mode)&&Ja(t,e.child,null,l),t.child.memoizedState=_l(l),t.memoizedState=Ll,i);if(0===(1&t.mode))return Fl(e,t,l,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var c=r.dgst;return r=c,Fl(e,t,l,r=ul(i=Error(a(419)),r,void 0))}if(c=0!==(l&e.childLanes),xl||c){if(null!==(r=Oc)){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|l))?0:o)&&o!==i.retryLane&&(i.retryLane=o,Oa(e,o),rs(r,e,o,-1))}return gs(),Fl(e,t,l,r=ul(Error(a(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ts.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,oa=so(o.nextSibling),ra=t,aa=!0,ia=null,null!==e&&(Xo[Yo++]=Jo,Xo[Yo++]=Qo,Xo[Yo++]=$o,Jo=e.id,Qo=e.overflow,$o=t),t=Bl(t,r.children),t.flags|=4096,t)}(e,t,c,o,r,i,n);if(l){l=o.fallback,c=t.mode,r=(i=e.child).sibling;var s={mode:"hidden",children:o.children};return 0===(1&c)&&t.child!==i?((o=t.child).childLanes=0,o.pendingProps=s,t.deletions=null):(o=Ms(i,s)).subtreeFlags=14680064&i.subtreeFlags,null!==r?l=Ms(r,l):(l=Ls(l,c,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,o=l,l=t.child,c=null===(c=e.child.memoizedState)?_l(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},l.memoizedState=c,l.childLanes=e.childLanes&~n,t.memoizedState=Ll,o}return e=(l=e.child).sibling,o=Ms(l,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Bl(e,t){return(t=_s({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fl(e,t,n,r){return null!==r&&ma(r),Ja(t,e.child,null,n),(e=Bl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Hl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ea(e.return,t,n)}function Wl(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function Vl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(wl(e,t,r.children,n),0!==(2&(r=ci.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Hl(e,n,t);else if(19===e.tag)Hl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Io(ci,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===si(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Wl(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===si(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Wl(t,!0,n,null,a);break;case"together":Wl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ul(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),_c|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ms(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ms(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Gl(e,t){if(!aa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ql(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Xl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ql(t),null;case 1:case 17:return Po(t.type)&&Mo(),ql(t),null;case 3:return r=t.stateNode,ai(),jo(Oo),jo(Ao),ui(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ia&&(ls(ia),ia=null))),Pl(e,t),ql(t),null;case 5:li(t);var o=ri(ni.current);if(n=t.type,null!==e&&null!=t.stateNode)Ml(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return ql(t),null}if(e=ri(ei.current),fa(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[po]=t,r[ho]=i,e=0!==(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<Dr.length;o++)Br(Dr[o],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":$(r,i),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Br("invalid",r);break;case"textarea":oe(r,i),Br("invalid",r)}for(var c in be(n,i),o=null,i)if(i.hasOwnProperty(c)){var s=i[c];"children"===c?"string"===typeof s?r.textContent!==s&&(!0!==i.suppressHydrationWarning&&Qr(r.textContent,s,e),o=["children",s]):"number"===typeof s&&r.textContent!==""+s&&(!0!==i.suppressHydrationWarning&&Qr(r.textContent,s,e),o=["children",""+s]):l.hasOwnProperty(c)&&null!=s&&"onScroll"===c&&Br("scroll",r)}switch(n){case"input":G(r),Z(r,i,!0);break;case"textarea":G(r),ie(r);break;case"select":case"option":break;default:"function"===typeof i.onClick&&(r.onclick=Zr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{c=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[po]=t,e[ho]=r,Rl(e,t,!1,!1),t.stateNode=e;e:{switch(c=ye(n,r),n){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;o<Dr.length;o++)Br(Dr[o],e);o=r;break;case"source":Br("error",e),o=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),o=r;break;case"details":Br("toggle",e),o=r;break;case"input":$(e,r),o=Y(e,r),Br("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=_({},r,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Br("invalid",e)}for(i in be(n,o),s=o)if(s.hasOwnProperty(i)){var d=s[i];"style"===i?ge(e,d):"dangerouslySetInnerHTML"===i?null!=(d=d?d.__html:void 0)&&ue(e,d):"children"===i?"string"===typeof d?("textarea"!==n||""!==d)&&fe(e,d):"number"===typeof d&&fe(e,""+d):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(l.hasOwnProperty(i)?null!=d&&"onScroll"===i&&Br("scroll",e):null!=d&&y(e,i,d,c))}switch(n){case"input":G(e),Z(e,r,!1);break;case"textarea":G(e),ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+U(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?ne(e,!!r.multiple,i,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return ql(t),null;case 6:if(e&&null!=t.stateNode)Dl(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(n=ri(ni.current),ri(ei.current),fa(t)){if(r=t.stateNode,n=t.memoizedProps,r[po]=t,(i=r.nodeValue!==n)&&null!==(e=ra))switch(e.tag){case 3:Qr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!==(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[po]=t,t.stateNode=r}return ql(t),null;case 13:if(jo(ci),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(aa&&null!==oa&&0!==(1&t.mode)&&0===(128&t.flags))pa(),ha(),t.flags|=98560,i=!1;else if(i=fa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[po]=t}else ha(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ql(t),i=!1}else null!==ia&&(ls(ia),ia=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ci.current)?0===Dc&&(Dc=3):gs())),null!==t.updateQueue&&(t.flags|=4),ql(t),null);case 4:return ai(),Pl(e,t),null===e&&Wr(t.stateNode.containerInfo),ql(t),null;case 10:return Sa(t.type._context),ql(t),null;case 19:if(jo(ci),null===(i=t.memoizedState))return ql(t),null;if(r=0!==(128&t.flags),null===(c=i.rendering))if(r)Gl(i,!1);else{if(0!==Dc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(c=si(e))){for(t.flags|=128,Gl(i,!1),null!==(r=c.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(c=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,e=c.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Io(ci,1&ci.current|2),t.child}e=e.sibling}null!==i.tail&&Je()>Vc&&(t.flags|=128,r=!0,Gl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=si(c))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Gl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!c.alternate&&!aa)return ql(t),null}else 2*Je()-i.renderingStartTime>Vc&&1073741824!==n&&(t.flags|=128,r=!0,Gl(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=i.last)?n.sibling=c:t.child=c,i.last=c)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,n=ci.current,Io(ci,r?1&n|2:1&n),t):(ql(t),null);case 22:case 23:return fs(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Pc)&&(ql(t),6&t.subtreeFlags&&(t.flags|=8192)):ql(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Yl(e,t){switch(na(t),t.tag){case 1:return Po(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ai(),jo(Oo),jo(Ao),ui(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return li(t),null;case 13:if(jo(ci),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ha()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return jo(ci),null;case 4:return ai(),null;case 10:return Sa(t.type._context),null;case 22:case 23:return fs(),null;default:return null}}Rl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Pl=function(){},Ml=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ri(ei.current);var a,i=null;switch(n){case"input":o=Y(e,o),r=Y(e,r),i=[];break;case"select":o=_({},o,{value:void 0}),r=_({},r,{value:void 0}),i=[];break;case"textarea":o=re(e,o),r=re(e,r),i=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(d in be(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var c=o[d];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in r){var s=r[d];if(c=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&s!==c&&(null!=s||null!=c))if("style"===d)if(c){for(a in c)!c.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&c[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(d,n)),n=s;else"dangerouslySetInnerHTML"===d?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(i=i||[]).push(d,s)):"children"===d?"string"!==typeof s&&"number"!==typeof s||(i=i||[]).push(d,""+s):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=s&&"onScroll"===d&&Br("scroll",e),i||c===s||(i=[])):(i=i||[]).push(d,s))}n&&(i=i||[]).push("style",n);var d=i;(t.updateQueue=d)&&(t.flags|=4)}},Dl=function(e,t,n,r){n!==r&&(t.flags|=4)};var $l=!1,Jl=!1,Ql="function"===typeof WeakSet?WeakSet:Set,Zl=null;function ec(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){ks(e,t,r)}else n.current=null}function tc(e,t,n){try{n()}catch(r){ks(e,t,r)}}var nc=!1;function rc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&tc(t,n,a)}o=o.next}while(o!==r)}}function oc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ac(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ic(e){var t=e.alternate;null!==t&&(e.alternate=null,ic(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[po],delete t[ho],delete t[go],delete t[vo],delete t[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lc(e){return 5===e.tag||3===e.tag||4===e.tag}function cc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||lc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function sc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(sc(e,t,n),e=e.sibling;null!==e;)sc(e,t,n),e=e.sibling}function dc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(dc(e,t,n),e=e.sibling;null!==e;)dc(e,t,n),e=e.sibling}var uc=null,fc=!1;function pc(e,t,n){for(n=n.child;null!==n;)hc(e,t,n),n=n.sibling}function hc(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(ot,n)}catch(l){}switch(n.tag){case 5:Jl||ec(n,t);case 6:var r=uc,o=fc;uc=null,pc(e,t,n),fc=o,null!==(uc=r)&&(fc?(e=uc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):uc.removeChild(n.stateNode));break;case 18:null!==uc&&(fc?(e=uc,n=n.stateNode,8===e.nodeType?co(e.parentNode,n):1===e.nodeType&&co(e,n),Wt(e)):co(uc,n.stateNode));break;case 4:r=uc,o=fc,uc=n.stateNode.containerInfo,fc=!0,pc(e,t,n),uc=r,fc=o;break;case 0:case 11:case 14:case 15:if(!Jl&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(0!==(2&a)||0!==(4&a))&&tc(n,t,i),o=o.next}while(o!==r)}pc(e,t,n);break;case 1:if(!Jl&&(ec(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ks(n,t,l)}pc(e,t,n);break;case 21:pc(e,t,n);break;case 22:1&n.mode?(Jl=(r=Jl)||null!==n.memoizedState,pc(e,t,n),Jl=r):pc(e,t,n);break;default:pc(e,t,n)}}function mc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ql),t.forEach((function(t){var r=As.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,c=l;e:for(;null!==c;){switch(c.tag){case 5:uc=c.stateNode,fc=!1;break e;case 3:case 4:uc=c.stateNode.containerInfo,fc=!0;break e}c=c.return}if(null===uc)throw Error(a(160));hc(i,l,o),uc=null,fc=!1;var s=o.alternate;null!==s&&(s.return=null),o.return=null}catch(d){ks(o,t,d)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vc(t,e),t=t.sibling}function vc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gc(t,e),bc(e),4&r){try{rc(3,e,e.return),oc(3,e)}catch(g){ks(e,e.return,g)}try{rc(5,e,e.return)}catch(g){ks(e,e.return,g)}}break;case 1:gc(t,e),bc(e),512&r&&null!==n&&ec(n,n.return);break;case 5:if(gc(t,e),bc(e),512&r&&null!==n&&ec(n,n.return),32&e.flags){var o=e.stateNode;try{fe(o,"")}catch(g){ks(e,e.return,g)}}if(4&r&&null!=(o=e.stateNode)){var i=e.memoizedProps,l=null!==n?n.memoizedProps:i,c=e.type,s=e.updateQueue;if(e.updateQueue=null,null!==s)try{"input"===c&&"radio"===i.type&&null!=i.name&&J(o,i),ye(c,l);var d=ye(c,i);for(l=0;l<s.length;l+=2){var u=s[l],f=s[l+1];"style"===u?ge(o,f):"dangerouslySetInnerHTML"===u?ue(o,f):"children"===u?fe(o,f):y(o,u,f,d)}switch(c){case"input":Q(o,i);break;case"textarea":ae(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;null!=h?ne(o,!!i.multiple,h,!1):p!==!!i.multiple&&(null!=i.defaultValue?ne(o,!!i.multiple,i.defaultValue,!0):ne(o,!!i.multiple,i.multiple?[]:"",!1))}o[ho]=i}catch(g){ks(e,e.return,g)}}break;case 6:if(gc(t,e),bc(e),4&r){if(null===e.stateNode)throw Error(a(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){ks(e,e.return,g)}}break;case 3:if(gc(t,e),bc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Wt(t.containerInfo)}catch(g){ks(e,e.return,g)}break;case 4:default:gc(t,e),bc(e);break;case 13:gc(t,e),bc(e),8192&(o=e.child).flags&&(i=null!==o.memoizedState,o.stateNode.isHidden=i,!i||null!==o.alternate&&null!==o.alternate.memoizedState||(Wc=Je())),4&r&&mc(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Jl=(d=Jl)||u,gc(t,e),Jl=d):gc(t,e),bc(e),8192&r){if(d=null!==e.memoizedState,(e.stateNode.isHidden=d)&&!u&&0!==(1&e.mode))for(Zl=e,u=e.child;null!==u;){for(f=Zl=u;null!==Zl;){switch(h=(p=Zl).child,p.tag){case 0:case 11:case 14:case 15:rc(4,p,p.return);break;case 1:ec(p,p.return);var m=p.stateNode;if("function"===typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){ks(r,n,g)}}break;case 5:ec(p,p.return);break;case 22:if(null!==p.memoizedState){Cc(f);continue}}null!==h?(h.return=p,Zl=h):Cc(f)}u=u.sibling}e:for(u=null,f=e;;){if(5===f.tag){if(null===u){u=f;try{o=f.stateNode,d?"function"===typeof(i=o.style).setProperty?i.setProperty("display","none","important"):i.display="none":(c=f.stateNode,l=void 0!==(s=f.memoizedProps.style)&&null!==s&&s.hasOwnProperty("display")?s.display:null,c.style.display=me("display",l))}catch(g){ks(e,e.return,g)}}}else if(6===f.tag){if(null===u)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(g){ks(e,e.return,g)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:gc(t,e),bc(e),4&r&&mc(e);case 21:}}function bc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(lc(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(fe(o,""),r.flags&=-33),dc(e,cc(e),o);break;case 3:case 4:var i=r.stateNode.containerInfo;sc(e,cc(e),i);break;default:throw Error(a(161))}}catch(l){ks(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yc(e,t,n){Zl=e,xc(e,t,n)}function xc(e,t,n){for(var r=0!==(1&e.mode);null!==Zl;){var o=Zl,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||$l;if(!i){var l=o.alternate,c=null!==l&&null!==l.memoizedState||Jl;l=$l;var s=Jl;if($l=i,(Jl=c)&&!s)for(Zl=o;null!==Zl;)c=(i=Zl).child,22===i.tag&&null!==i.memoizedState?Sc(o):null!==c?(c.return=i,Zl=c):Sc(o);for(;null!==a;)Zl=a,xc(a,t,n),a=a.sibling;Zl=o,$l=l,Jl=s}wc(e)}else 0!==(8772&o.subtreeFlags)&&null!==a?(a.return=o,Zl=a):wc(e)}}function wc(e){for(;null!==Zl;){var t=Zl;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Jl||oc(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Jl)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:va(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&Ba(t,i,r);break;case 3:var l=t.updateQueue;if(null!==l){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ba(t,l,n)}break;case 5:var c=t.stateNode;if(null===n&&4&t.flags){n=c;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var d=t.alternate;if(null!==d){var u=d.memoizedState;if(null!==u){var f=u.dehydrated;null!==f&&Wt(f)}}}break;default:throw Error(a(163))}Jl||512&t.flags&&ac(t)}catch(p){ks(t,t.return,p)}}if(t===e){Zl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Zl=n;break}Zl=t.return}}function Cc(e){for(;null!==Zl;){var t=Zl;if(t===e){Zl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zl=n;break}Zl=t.return}}function Sc(e){for(;null!==Zl;){var t=Zl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{oc(4,t)}catch(c){ks(t,n,c)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(c){ks(t,o,c)}}var a=t.return;try{ac(t)}catch(c){ks(t,a,c)}break;case 5:var i=t.return;try{ac(t)}catch(c){ks(t,i,c)}}}catch(c){ks(t,t.return,c)}if(t===e){Zl=null;break}var l=t.sibling;if(null!==l){l.return=t.return,Zl=l;break}Zl=t.return}}var Ec,kc=Math.ceil,jc=x.ReactCurrentDispatcher,Ic=x.ReactCurrentOwner,Tc=x.ReactCurrentBatchConfig,Ac=0,Oc=null,Nc=null,Rc=0,Pc=0,Mc=ko(0),Dc=0,Lc=null,_c=0,zc=0,Bc=0,Fc=null,Hc=null,Wc=0,Vc=1/0,Uc=null,Kc=!1,Gc=null,qc=null,Xc=!1,Yc=null,$c=0,Jc=0,Qc=null,Zc=-1,es=0;function ts(){return 0!==(6&Ac)?Je():-1!==Zc?Zc:Zc=Je()}function ns(e){return 0===(1&e.mode)?1:0!==(2&Ac)&&0!==Rc?Rc&-Rc:null!==ga.transition?(0===es&&(es=mt()),es):0!==(e=yt)?e:e=void 0===(e=window.event)?16:$t(e.type)}function rs(e,t,n,r){if(50<Jc)throw Jc=0,Qc=null,Error(a(185));vt(e,n,r),0!==(2&Ac)&&e===Oc||(e===Oc&&(0===(2&Ac)&&(zc|=n),4===Dc&&cs(e,Rc)),os(e,r),1===n&&0===Ac&&0===(1&t.mode)&&(Vc=Je()+500,Fo&&Vo()))}function os(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-it(a),l=1<<i,c=o[i];-1===c?0!==(l&n)&&0===(l&r)||(o[i]=pt(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}(e,t);var r=ft(e,e===Oc?Rc:0);if(0===r)null!==n&&Xe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Xe(n),1===t)0===e.tag?function(e){Fo=!0,Wo(e)}(ss.bind(null,e)):Wo(ss.bind(null,e)),io((function(){0===(6&Ac)&&Vo()})),n=null;else{switch(xt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Os(n,as.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function as(e,t){if(Zc=-1,es=0,0!==(6&Ac))throw Error(a(327));var n=e.callbackNode;if(Ss()&&e.callbackNode!==n)return null;var r=ft(e,e===Oc?Rc:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=vs(e,r);else{t=r;var o=Ac;Ac|=2;var i=ms();for(Oc===e&&Rc===t||(Uc=null,Vc=Je()+500,ps(e,t));;)try{ys();break}catch(c){hs(e,c)}Ca(),jc.current=i,Ac=o,null!==Nc?t=0:(Oc=null,Rc=0,t=Dc)}if(0!==t){if(2===t&&(0!==(o=ht(e))&&(r=o,t=is(e,o))),1===t)throw n=Lc,ps(e,0),cs(e,r),os(e,Je()),n;if(6===t)cs(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!lr(a(),o))return!1}catch(l){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=vs(e,r))&&(0!==(i=ht(e))&&(r=i,t=is(e,i))),1===t))throw n=Lc,ps(e,0),cs(e,r),os(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Cs(e,Hc,Uc);break;case 3:if(cs(e,r),(130023424&r)===r&&10<(t=Wc+500-Je())){if(0!==ft(e,0))break;if(((o=e.suspendedLanes)&r)!==r){ts(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(Cs.bind(null,e,Hc,Uc),t);break}Cs(e,Hc,Uc);break;case 4:if(cs(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-it(r);i=1<<l,(l=t[l])>o&&(o=l),r&=~i}if(r=o,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kc(r/1960))-r)){e.timeoutHandle=ro(Cs.bind(null,e,Hc,Uc),r);break}Cs(e,Hc,Uc);break;default:throw Error(a(329))}}}return os(e,Je()),e.callbackNode===n?as.bind(null,e):null}function is(e,t){var n=Fc;return e.current.memoizedState.isDehydrated&&(ps(e,t).flags|=256),2!==(e=vs(e,t))&&(t=Hc,Hc=n,null!==t&&ls(t)),e}function ls(e){null===Hc?Hc=e:Hc.push.apply(Hc,e)}function cs(e,t){for(t&=~Bc,t&=~zc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function ss(e){if(0!==(6&Ac))throw Error(a(327));Ss();var t=ft(e,0);if(0===(1&t))return os(e,Je()),null;var n=vs(e,t);if(0!==e.tag&&2===n){var r=ht(e);0!==r&&(t=r,n=is(e,r))}if(1===n)throw n=Lc,ps(e,0),cs(e,t),os(e,Je()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cs(e,Hc,Uc),os(e,Je()),null}function ds(e,t){var n=Ac;Ac|=1;try{return e(t)}finally{0===(Ac=n)&&(Vc=Je()+500,Fo&&Vo())}}function us(e){null!==Yc&&0===Yc.tag&&0===(6&Ac)&&Ss();var t=Ac;Ac|=1;var n=Tc.transition,r=yt;try{if(Tc.transition=null,yt=1,e)return e()}finally{yt=r,Tc.transition=n,0===(6&(Ac=t))&&Vo()}}function fs(){Pc=Mc.current,jo(Mc)}function ps(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Nc)for(n=Nc.return;null!==n;){var r=n;switch(na(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Mo();break;case 3:ai(),jo(Oo),jo(Ao),ui();break;case 5:li(r);break;case 4:ai();break;case 13:case 19:jo(ci);break;case 10:Sa(r.type._context);break;case 22:case 23:fs()}n=n.return}if(Oc=e,Nc=e=Ms(e.current,null),Rc=Pc=t,Dc=0,Lc=null,Bc=zc=_c=0,Hc=Fc=null,null!==Ia){for(t=0;t<Ia.length;t++)if(null!==(r=(n=Ia[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Ia=null}return e}function hs(e,t){for(;;){var n=Nc;try{if(Ca(),fi.current=il,bi){for(var r=mi.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}bi=!1}if(hi=0,vi=gi=mi=null,yi=!1,xi=0,Ic.current=null,null===n||null===n.return){Dc=1,Lc=t,Nc=null;break}e:{var i=e,l=n.return,c=n,s=t;if(t=Rc,c.flags|=32768,null!==s&&"object"===typeof s&&"function"===typeof s.then){var d=s,u=c,f=u.tag;if(0===(1&u.mode)&&(0===f||11===f||15===f)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=vl(l);if(null!==h){h.flags&=-257,bl(h,l,c,0,t),1&h.mode&&gl(i,d,t),s=d;var m=(t=h).updateQueue;if(null===m){var g=new Set;g.add(s),t.updateQueue=g}else m.add(s);break e}if(0===(1&t)){gl(i,d,t),gs();break e}s=Error(a(426))}else if(aa&&1&c.mode){var v=vl(l);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),bl(v,l,c,0,t),ma(dl(s,c));break e}}i=s=dl(s,c),4!==Dc&&(Dc=2),null===Fc?Fc=[i]:Fc.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,_a(i,hl(0,s,t));break e;case 1:c=s;var b=i.type,y=i.stateNode;if(0===(128&i.flags)&&("function"===typeof b.getDerivedStateFromError||null!==y&&"function"===typeof y.componentDidCatch&&(null===qc||!qc.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t,_a(i,ml(i,c,t));break e}}i=i.return}while(null!==i)}ws(n)}catch(x){t=x,Nc===n&&null!==n&&(Nc=n=n.return);continue}break}}function ms(){var e=jc.current;return jc.current=il,null===e?il:e}function gs(){0!==Dc&&3!==Dc&&2!==Dc||(Dc=4),null===Oc||0===(268435455&_c)&&0===(268435455&zc)||cs(Oc,Rc)}function vs(e,t){var n=Ac;Ac|=2;var r=ms();for(Oc===e&&Rc===t||(Uc=null,ps(e,t));;)try{bs();break}catch(o){hs(e,o)}if(Ca(),Ac=n,jc.current=r,null!==Nc)throw Error(a(261));return Oc=null,Rc=0,Dc}function bs(){for(;null!==Nc;)xs(Nc)}function ys(){for(;null!==Nc&&!Ye();)xs(Nc)}function xs(e){var t=Ec(e.alternate,e,Pc);e.memoizedProps=e.pendingProps,null===t?ws(e):Nc=t,Ic.current=null}function ws(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Xl(n,t,Pc)))return void(Nc=n)}else{if(null!==(n=Yl(n,t)))return n.flags&=32767,void(Nc=n);if(null===e)return Dc=6,void(Nc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Nc=t);Nc=t=e}while(null!==t);0===Dc&&(Dc=5)}function Cs(e,t,n){var r=yt,o=Tc.transition;try{Tc.transition=null,yt=1,function(e,t,n,r){do{Ss()}while(null!==Yc);if(0!==(6&Ac))throw Error(a(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-it(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,i),e===Oc&&(Nc=Oc=null,Rc=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Xc||(Xc=!0,Os(tt,(function(){return Ss(),null}))),i=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||i){i=Tc.transition,Tc.transition=null;var l=yt;yt=1;var c=Ac;Ac|=4,Ic.current=null,function(e,t){if(eo=Ut,pr(e=fr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var l=0,c=-1,s=-1,d=0,u=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==o&&3!==f.nodeType||(c=l+o),f!==i||0!==r&&3!==f.nodeType||(s=l+r),3===f.nodeType&&(l+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++d===o&&(c=l),p===i&&++u===r&&(s=l),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===c||-1===s?null:{start:c,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Ut=!1,Zl=t;null!==Zl;)if(e=(t=Zl).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Zl=e;else for(;null!==Zl;){t=Zl;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:va(t.type,g),v);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(a(163))}}catch(w){ks(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Zl=e;break}Zl=t.return}m=nc,nc=!1}(e,n),vc(n,e),hr(to),Ut=!!eo,to=eo=null,e.current=n,yc(n,e,o),$e(),Ac=c,yt=l,Tc.transition=i}else e.current=n;if(Xc&&(Xc=!1,Yc=e,$c=o),i=e.pendingLanes,0===i&&(qc=null),function(e){if(at&&"function"===typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),os(e,Je()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Kc)throw Kc=!1,e=Gc,Gc=null,e;0!==(1&$c)&&0!==e.tag&&Ss(),i=e.pendingLanes,0!==(1&i)?e===Qc?Jc++:(Jc=0,Qc=e):Jc=0,Vo()}(e,t,n,r)}finally{Tc.transition=o,yt=r}return null}function Ss(){if(null!==Yc){var e=xt($c),t=Tc.transition,n=yt;try{if(Tc.transition=null,yt=16>e?16:e,null===Yc)var r=!1;else{if(e=Yc,Yc=null,$c=0,0!==(6&Ac))throw Error(a(331));var o=Ac;for(Ac|=4,Zl=e.current;null!==Zl;){var i=Zl,l=i.child;if(0!==(16&Zl.flags)){var c=i.deletions;if(null!==c){for(var s=0;s<c.length;s++){var d=c[s];for(Zl=d;null!==Zl;){var u=Zl;switch(u.tag){case 0:case 11:case 15:rc(8,u,i)}var f=u.child;if(null!==f)f.return=u,Zl=f;else for(;null!==Zl;){var p=(u=Zl).sibling,h=u.return;if(ic(u),u===d){Zl=null;break}if(null!==p){p.return=h,Zl=p;break}Zl=h}}}var m=i.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Zl=i}}if(0!==(2064&i.subtreeFlags)&&null!==l)l.return=i,Zl=l;else e:for(;null!==Zl;){if(0!==(2048&(i=Zl).flags))switch(i.tag){case 0:case 11:case 15:rc(9,i,i.return)}var b=i.sibling;if(null!==b){b.return=i.return,Zl=b;break e}Zl=i.return}}var y=e.current;for(Zl=y;null!==Zl;){var x=(l=Zl).child;if(0!==(2064&l.subtreeFlags)&&null!==x)x.return=l,Zl=x;else e:for(l=y;null!==Zl;){if(0!==(2048&(c=Zl).flags))try{switch(c.tag){case 0:case 11:case 15:oc(9,c)}}catch(C){ks(c,c.return,C)}if(c===l){Zl=null;break e}var w=c.sibling;if(null!==w){w.return=c.return,Zl=w;break e}Zl=c.return}}if(Ac=o,Vo(),at&&"function"===typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(ot,e)}catch(C){}r=!0}return r}finally{yt=n,Tc.transition=t}}return!1}function Es(e,t,n){e=Da(e,t=hl(0,t=dl(n,t),1),1),t=ts(),null!==e&&(vt(e,1,t),os(e,t))}function ks(e,t,n){if(3===e.tag)Es(e,e,n);else for(;null!==t;){if(3===t.tag){Es(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===qc||!qc.has(r))){t=Da(t,e=ml(t,e=dl(n,e),1),1),e=ts(),null!==t&&(vt(t,1,e),os(t,e));break}}t=t.return}}function js(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ts(),e.pingedLanes|=e.suspendedLanes&n,Oc===e&&(Rc&n)===n&&(4===Dc||3===Dc&&(130023424&Rc)===Rc&&500>Je()-Wc?ps(e,0):Bc|=n),os(e,t)}function Is(e,t){0===t&&(0===(1&e.mode)?t=1:(t=dt,0===(130023424&(dt<<=1))&&(dt=4194304)));var n=ts();null!==(e=Oa(e,t))&&(vt(e,t,n),os(e,n))}function Ts(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Is(e,n)}function As(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Is(e,n)}function Os(e,t){return qe(e,t)}function Ns(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rs(e,t,n,r){return new Ns(e,t,n,r)}function Ps(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ms(e,t){var n=e.alternate;return null===n?((n=Rs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ds(e,t,n,r,o,i){var l=2;if(r=e,"function"===typeof e)Ps(e)&&(l=1);else if("string"===typeof e)l=5;else e:switch(e){case S:return Ls(n.children,o,i,t);case E:l=8,o|=8;break;case k:return(e=Rs(12,n,t,2|o)).elementType=k,e.lanes=i,e;case A:return(e=Rs(13,n,t,o)).elementType=A,e.lanes=i,e;case O:return(e=Rs(19,n,t,o)).elementType=O,e.lanes=i,e;case P:return _s(n,o,i,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case j:l=10;break e;case I:l=9;break e;case T:l=11;break e;case N:l=14;break e;case R:l=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Rs(l,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Ls(e,t,n,r){return(e=Rs(7,e,r,t)).lanes=n,e}function _s(e,t,n,r){return(e=Rs(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function zs(e,t,n){return(e=Rs(6,e,null,t)).lanes=n,e}function Bs(e,t,n){return(t=Rs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fs(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hs(e,t,n,r,o,a,i,l,c){return e=new Fs(e,t,n,l,c),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Rs(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ra(a),e}function Ws(e){if(!e)return To;e:{if(We(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Po(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Po(n))return Lo(e,n,t)}return t}function Vs(e,t,n,r,o,a,i,l,c){return(e=Hs(n,r,!0,e,0,a,0,l,c)).context=Ws(null),n=e.current,(a=Ma(r=ts(),o=ns(n))).callback=void 0!==t&&null!==t?t:null,Da(n,a,o),e.current.lanes=o,vt(e,o,r),os(e,r),e}function Us(e,t,n,r){var o=t.current,a=ts(),i=ns(o);return n=Ws(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ma(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Da(o,t,i))&&(rs(e,o,i,a),La(e,o,i)),i}function Ks(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Gs(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qs(e,t){Gs(e,t),(e=e.alternate)&&Gs(e,t)}Ec=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Oo.current)xl=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return xl=!1,function(e,t,n){switch(t.tag){case 3:Ol(t),ha();break;case 5:ii(t);break;case 1:Po(t.type)&&_o(t);break;case 4:oi(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Io(ba,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Io(ci,1&ci.current),t.flags|=128,null):0!==(n&t.child.childLanes)?zl(e,t,n):(Io(ci,1&ci.current),null!==(e=Kl(e,t,n))?e.sibling:null);Io(ci,1&ci.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Vl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Io(ci,ci.current),r)break;return null;case 22:case 23:return t.lanes=0,kl(e,t,n)}return Kl(e,t,n)}(e,t,n);xl=0!==(131072&e.flags)}else xl=!1,aa&&0!==(1048576&t.flags)&&ea(t,qo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ul(e,t),e=t.pendingProps;var o=Ro(t,Ao.current);ka(t,n),o=Ei(null,t,r,e,o,n);var i=ki();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Po(r)?(i=!0,_o(t)):i=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ra(t),o.updater=Wa,t.stateNode=o,o._reactInternals=t,Ga(t,r,e,n),t=Al(null,t,r,!0,i,n)):(t.tag=0,aa&&i&&ta(t),wl(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ul(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Ps(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===T)return 11;if(e===N)return 14}return 2}(r),e=va(r,e),o){case 0:t=Il(null,t,r,e,n);break e;case 1:t=Tl(null,t,r,e,n);break e;case 11:t=Cl(null,t,r,e,n);break e;case 14:t=Sl(null,t,r,va(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Il(e,t,r,o=t.elementType===r?o:va(r,o),n);case 1:return r=t.type,o=t.pendingProps,Tl(e,t,r,o=t.elementType===r?o:va(r,o),n);case 3:e:{if(Ol(t),null===e)throw Error(a(387));r=t.pendingProps,o=(i=t.memoizedState).element,Pa(e,t),za(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Nl(e,t,r,n,o=dl(Error(a(423)),t));break e}if(r!==o){t=Nl(e,t,r,n,o=dl(Error(a(424)),t));break e}for(oa=so(t.stateNode.containerInfo.firstChild),ra=t,aa=!0,ia=null,n=Qa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ha(),r===o){t=Kl(e,t,n);break e}wl(e,t,r,n)}t=t.child}return t;case 5:return ii(t),null===e&&da(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,l=o.children,no(r,o)?l=null:null!==i&&no(r,i)&&(t.flags|=32),jl(e,t),wl(e,t,l,n),t.child;case 6:return null===e&&da(t),null;case 13:return zl(e,t,n);case 4:return oi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ja(t,null,r,n):wl(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Cl(e,t,r,o=t.elementType===r?o:va(r,o),n);case 7:return wl(e,t,t.pendingProps,n),t.child;case 8:case 12:return wl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Io(ba,r._currentValue),r._currentValue=l,null!==i)if(lr(i.value,l)){if(i.children===o.children&&!Oo.current){t=Kl(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var c=i.dependencies;if(null!==c){l=i.child;for(var s=c.firstContext;null!==s;){if(s.context===r){if(1===i.tag){(s=Ma(-1,n&-n)).tag=2;var d=i.updateQueue;if(null!==d){var u=(d=d.shared).pending;null===u?s.next=s:(s.next=u.next,u.next=s),d.pending=s}}i.lanes|=n,null!==(s=i.alternate)&&(s.lanes|=n),Ea(i.return,n,t),c.lanes|=n;break}s=s.next}}else if(10===i.tag)l=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(l=i.return))throw Error(a(341));l.lanes|=n,null!==(c=l.alternate)&&(c.lanes|=n),Ea(l,n,t),l=i.sibling}else l=i.child;if(null!==l)l.return=i;else for(l=i;null!==l;){if(l===t){l=null;break}if(null!==(i=l.sibling)){i.return=l.return,l=i;break}l=l.return}i=l}wl(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ka(t,n),r=r(o=ja(o)),t.flags|=1,wl(e,t,r,n),t.child;case 14:return o=va(r=t.type,t.pendingProps),Sl(e,t,r,o=va(r.type,o),n);case 15:return El(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:va(r,o),Ul(e,t),t.tag=1,Po(r)?(e=!0,_o(t)):e=!1,ka(t,n),Ua(t,r,o),Ga(t,r,o,n),Al(null,t,r,!0,e,n);case 19:return Vl(e,t,n);case 22:return kl(e,t,n)}throw Error(a(156,t.tag))};var Xs="function"===typeof reportError?reportError:function(e){console.error(e)};function Ys(e){this._internalRoot=e}function $s(e){this._internalRoot=e}function Js(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qs(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zs(){}function ed(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"===typeof o){var l=o;o=function(){var e=Ks(i);l.call(e)}}Us(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"===typeof r){var a=r;r=function(){var e=Ks(i);a.call(e)}}var i=Vs(t,r,e,0,null,!1,0,"",Zs);return e._reactRootContainer=i,e[mo]=i.current,Wr(8===e.nodeType?e.parentNode:e),us(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var l=r;r=function(){var e=Ks(c);l.call(e)}}var c=Hs(e,0,!1,null,0,!1,0,"",Zs);return e._reactRootContainer=c,e[mo]=c.current,Wr(8===e.nodeType?e.parentNode:e),us((function(){Us(t,c,n,r)})),c}(n,t,e,o,r);return Ks(i)}$s.prototype.render=Ys.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Us(e,t,null,null)},$s.prototype.unmount=Ys.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;us((function(){Us(null,e,null,null)})),t[mo]=null}},$s.prototype.unstable_scheduleHydration=function(e){if(e){var t=Et();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&_t(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ut(t.pendingLanes);0!==n&&(bt(t,1|n),os(t,Je()),0===(6&Ac)&&(Vc=Je()+500,Vo()))}break;case 13:us((function(){var t=Oa(e,1);if(null!==t){var n=ts();rs(t,e,1,n)}})),qs(e,1)}},Ct=function(e){if(13===e.tag){var t=Oa(e,134217728);if(null!==t)rs(t,e,134217728,ts());qs(e,134217728)}},St=function(e){if(13===e.tag){var t=ns(e),n=Oa(e,t);if(null!==n)rs(n,e,t,ts());qs(e,t)}},Et=function(){return yt},kt=function(e,t){var n=yt;try{return yt=e,t()}finally{yt=n}},Ce=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Co(r);if(!o)throw Error(a(90));q(r),Q(r,o)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=ds,Ae=us;var td={usingClientEntryPoint:!1,Events:[xo,wo,Co,je,Ie,ds]},nd={findFiberByHostInstance:yo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rd={bundleType:nd.bundleType,version:nd.version,rendererPackageName:nd.rendererPackageName,rendererConfig:nd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ke(e))?null:e.stateNode},findFiberByHostInstance:nd.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!od.isDisabled&&od.supportsFiber)try{ot=od.inject(rd),at=od}catch(de){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=td,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Js(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:C,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Js(e))throw Error(a(299));var n=!1,r="",o=Xs;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Hs(e,1,!1,null,0,n,0,r,o),e[mo]=t.current,Wr(8===e.nodeType?e.parentNode:e),new Ys(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=Ke(t))?null:e.stateNode},t.flushSync=function(e){return us(e)},t.hydrate=function(e,t,n){if(!Qs(t))throw Error(a(200));return ed(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Js(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,o=!1,i="",l=Xs;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError)),t=Vs(t,null,e,1,null!=n?n:null,o,0,i,l),e[mo]=t.current,Wr(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new $s(t)},t.render=function(e,t,n){if(!Qs(t))throw Error(a(200));return ed(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qs(e))throw Error(a(40));return!!e._reactRootContainer&&(us((function(){ed(null,null,e,!1,(function(){e._reactRootContainer=null,e[mo]=null}))})),!0)},t.unstable_batchedUpdates=ds,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qs(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ed(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},391:(e,t,n)=>{"use strict";var r=n(950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)},153:(e,t,n)=>{"use strict";var r=n(43),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,a={},s=null,d=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(d=t.ref),t)i.call(t,r)&&!c.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:d,props:a,_owner:l.current}}t.Fragment=a,t.jsx=s,t.jsxs=s},202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function b(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var x=y.prototype=new b;x.constructor=y,m(x,v.prototype),x.isPureReactComponent=!0;var w=Array.isArray,C=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var o,a={},i=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)C.call(t,o)&&!E.hasOwnProperty(o)&&(a[o]=t[o]);var c=arguments.length-2;if(1===c)a.children=r;else if(1<c){for(var s=Array(c),d=0;d<c;d++)s[d]=arguments[d+2];a.children=s}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:n,type:e,key:i,ref:l,props:a,_owner:S.current}}function j(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var I=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,o,a,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var c=!1;if(null===e)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0}}if(c)return i=i(c=e),e=""===a?"."+T(c,0):a,w(i)?(o="",null!=e&&(o=e.replace(I,"$&/")+"/"),A(i,t,o,"",(function(e){return e}))):null!=i&&(j(i)&&(i=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(I,"$&/")+"/")+e)),t.push(i)),1;if(c=0,a=""===a?".":a+":",w(e))for(var s=0;s<e.length;s++){var d=a+T(l=e[s],s);c+=A(l,t,o,d,i)}else if(d=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof d)for(e=d.call(e),s=0;!(l=e.next()).done;)c+=A(l=l.value,t,o,d=a+T(l,s++),i);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function O(e,t,n){if(null==e)return e;var r=[],o=0;return A(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function N(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},P={transition:null},M={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:P,ReactCurrentOwner:S};t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!j(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=i,t.PureComponent=y,t.StrictMode=a,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),a=e.key,i=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,l=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)C.call(t,s)&&!E.hasOwnProperty(s)&&(o[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)o.children=r;else if(1<s){c=Array(s);for(var d=0;d<s;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:n,type:e.type,key:a,ref:i,props:o,_owner:l}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=j,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.2.0"},43:(e,t,n)=>{"use strict";e.exports=n(202)},579:(e,t,n)=>{"use strict";e.exports=n(153)},234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var l=2*(r+1)-1,c=e[l],s=l+1,d=e[s];if(0>a(c,n))s<o&&0>a(d,c)?(e[r]=d,e[s]=n,r=s):(e[r]=c,e[l]=n,r=l);else{if(!(s<o&&0>a(d,n)))break e;e[r]=d,e[s]=n,r=s}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var s=[],d=[],u=1,f=null,p=3,h=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,y="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=r(d);null!==t;){if(null===t.callback)o(d);else{if(!(t.startTime<=e))break;o(d),t.sortIndex=t.expirationTime,n(s,t)}t=r(d)}}function w(e){if(g=!1,x(e),!m)if(null!==r(s))m=!0,P(C);else{var t=r(d);null!==t&&M(w,t.startTime-e)}}function C(e,n){m=!1,g&&(g=!1,b(j),j=-1),h=!0;var a=p;try{for(x(n),f=r(s);null!==f&&(!(f.expirationTime>n)||e&&!A());){var i=f.callback;if("function"===typeof i){f.callback=null,p=f.priorityLevel;var l=i(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof l?f.callback=l:f===r(s)&&o(s),x(n)}else o(s);f=r(s)}if(null!==f)var c=!0;else{var u=r(d);null!==u&&M(w,u.startTime-n),c=!1}return c}finally{f=null,p=a,h=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,k=null,j=-1,I=5,T=-1;function A(){return!(t.unstable_now()-T<I)}function O(){if(null!==k){var e=t.unstable_now();T=e;var n=!0;try{n=k(!0,e)}finally{n?S():(E=!1,k=null)}}else E=!1}if("function"===typeof y)S=function(){y(O)};else if("undefined"!==typeof MessageChannel){var N=new MessageChannel,R=N.port2;N.port1.onmessage=O,S=function(){R.postMessage(null)}}else S=function(){v(O,0)};function P(e){k=e,E||(E=!0,S())}function M(e,n){j=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||h||(m=!0,P(C))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(s)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,a){var i=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?i+a:i:a=i,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:u++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>i?(e.sortIndex=a,n(d,e),null===r(s)&&e===r(d)&&(g?(b(j),j=-1):g=!0,M(w,a-i))):(e.sortIndex=l,n(s,e),m||h||(m=!0,P(C))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},853:(e,t,n)=>{"use strict";e.exports=n(234)},244:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={}},139:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,a(n)))}return e}function a(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},330:e=>{"use strict";e.exports=JSON.parse('{"name":"ehc602_config","version":"3.3.1","private":true,"dependencies":{"@ant-design/icons":"^5.0.2","@testing-library/jest-dom":"^5.17.0","@testing-library/react":"^13.4.0","@testing-library/user-event":"^13.5.0","@types/jest":"^27.5.2","@types/node":"^20.9.2","@types/react":"^17.0.8","antd":"^5.14.2","axios":"^1.6.8","crypto-js":"^4.2.0","env-cmd":"^10.1.0","file-saver":"^2.0.5","history":"^5.3.0","json-to-csv-export":"^2.1.1","react":"^18.2.0","react-dom":"^18.2.0","react-router-dom":"6.3","react-scripts":"5.0.1","react-use":"^17.5.0","three":"^0.162.0","typescript":"^4.9.5","uuidv4":"^6.2.13","web-vitals":"^2.1.4","xlsx":"^0.18.5","yarn":"^1.22.22"},"scripts":{"start:coster":"env-cmd -f .env.coster  react-scripts start","start:coster_ehc_ufficio":"env-cmd -f .env.coster_ehc_ufficio react-scripts start","start:j2_base":"env-cmd -f .env.j2_base react-scripts start","start:redge":"env-cmd -f .env.redge react-scripts start","start:airtraxx":"env-cmd -f .env.airtraxx react-scripts start","start:white_label":"env-cmd -f .env.white_label react-scripts start","start:panasonic":"env-cmd -f .env.panasonic react-scripts start","start:panasonic-cse":"env-cmd -f .env.panasonic-cse react-scripts start","start:clivet":"env-cmd -f .env.clivet react-scripts start","start:wisebuilding":"env-cmd -f .env.wisebuilding react-scripts start","start:finstack":"env-cmd -f .env.finstack react-scripts start","start:flaktgroup":"env-cmd -f .env.flaktgroup react-scripts start","start:panasonic_ufficio":"env-cmd -f .env.panasonic_ufficio react-scripts start","start:beijing_comfort":"env-cmd -f .env.beijing_comfort react-scripts start","start:ambercom":"env-cmd -f .env.ambercom react-scripts start","start:aermec":"env-cmd -f .env.aermec react-scripts start","start:desigo_optic":"env-cmd -f .env.desigo_optic react-scripts start","start:ysmart":"env-cmd -f .env.ysmart react-scripts start","start:avlatene":"env-cmd -f .env.avlatene react-scripts start","start:hetan":"env-cmd -f .env.hetan react-scripts start","build:coster":"env-cmd -f .env.coster react-scripts build","build:j2_base":"env-cmd -f .env.j2_base react-scripts build","build:redge":"env-cmd -f .env.redge react-scripts build","build:airtraxx":"env-cmd -f .env.airtraxx react-scripts build","build:white_label":"env-cmd -f .env.white_label react-scripts build","build:panasonic":"env-cmd -f .env.panasonic react-scripts build","build:panasonic-cse":"env-cmd -f .env.panasonic-cse react-scripts build","build:clivet":"env-cmd -f .env.clivet react-scripts build","build:wisebuilding":"env-cmd -f .env.wisebuilding react-scripts build","build:finstack":"env-cmd -f .env.finstack react-scripts build","build:flaktgroup":"env-cmd -f .env.flaktgroup react-scripts build","build:beijing_comfort":"env-cmd -f .env.beijing_comfort react-scripts build","build:ambercom":"env-cmd -f .env.ambercom react-scripts build","build:aermec":"env-cmd -f .env.aermec react-scripts build","build:desigo_optic":"env-cmd -f .env.desigo_optic react-scripts build","build:ysmart":"env-cmd -f .env.ysmart react-scripts build","build:avlatene":"env-cmd -f .env.avlatene react-scripts build","build:hetan":"env-cmd -f .env.hetan react-scripts build","build:all":"npm run build:airtraxx && npm run build:coster && npm run build:panasonic && npm run build:white_label && npm run build:clivet && npm run build:wisebuilding && npm run build:finstack && npm run build:flaktgroup","test":"npx cypress open","eject":"react-scripts eject","startJsonServer":"json-server --watch db.json --port 8080"},"eslintConfig":{"extends":["react-app","react-app/jest"]},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"devDependencies":{"@eslint/js":"^9.19.0","@svgr/webpack":"^5.5.0","@types/file-saver":"^2.0.7","@types/react-router-dom":"^5.3.3","cypress":"^13.8.1","eslint":"^8.57.1","eslint-plugin-prettier":"^5.2.3","eslint-plugin-react":"^7.37.4","globals":"^15.14.0","prettier":"^3.4.2","typescript-eslint":"^8.23.0"}}')}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var a=Object.create(null);n.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&o&&r;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>i[e]=()=>r[e]));return i.default=()=>r,n.d(a,i),a}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>Qb,hasStandardBrowserEnv:()=>Zb,hasStandardBrowserWebWorkerEnv:()=>ty});var t=n(43),r=n.t(t,2),o=n(391);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}const i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};function l(e){if(Array.isArray(e))return e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){return l(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||s(e,t)||d()}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}function h(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=n(139),v=n.n(g);function b(e,t){(function(e){return"string"===typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function y(e){return Math.min(1,Math.max(0,e))}function x(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function w(e){return e<=1?"".concat(100*Number(e),"%"):e}function C(e){return 1===e.length?"0"+e:String(e)}function S(e,t,n){e=b(e,255),t=b(t,255),n=b(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,l=(r+o)/2;if(r===o)i=0,a=0;else{var c=r-o;switch(i=l>.5?c/(2-r-o):c/(r+o),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4}a/=6}return{h:a,s:i,l:l}}function E(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function k(e,t,n){e=b(e,255),t=b(t,255),n=b(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,l=r-o,c=0===r?0:l/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4}a/=6}return{h:a,s:c,v:i}}function j(e,t,n,r){var o=[C(Math.round(e).toString(16)),C(Math.round(t).toString(16)),C(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function I(e){return Math.round(255*parseFloat(e)).toString(16)}function T(e){return A(e)/255}function A(e){return parseInt(e,16)}var O={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function N(e){var t,n,r,o={r:0,g:0,b:0},a=1,i=null,l=null,c=null,s=!1,d=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(O[e])e=O[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=D.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=D.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=D.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=D.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=D.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=D.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=D.hex8.exec(e),n)return{r:A(n[1]),g:A(n[2]),b:A(n[3]),a:T(n[4]),format:t?"name":"hex8"};if(n=D.hex6.exec(e),n)return{r:A(n[1]),g:A(n[2]),b:A(n[3]),format:t?"name":"hex"};if(n=D.hex4.exec(e),n)return{r:A(n[1]+n[1]),g:A(n[2]+n[2]),b:A(n[3]+n[3]),a:T(n[4]+n[4]),format:t?"name":"hex8"};if(n=D.hex3.exec(e),n)return{r:A(n[1]+n[1]),g:A(n[2]+n[2]),b:A(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(L(e.r)&&L(e.g)&&L(e.b)?(t=e.r,n=e.g,r=e.b,o={r:255*b(t,255),g:255*b(n,255),b:255*b(r,255)},s=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):L(e.h)&&L(e.s)&&L(e.v)?(i=w(e.s),l=w(e.v),o=function(e,t,n){e=6*b(e,360),t=b(t,100),n=b(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),l=n*(1-(1-o)*t),c=r%6;return{r:255*[n,i,a,a,l,n][c],g:255*[l,n,n,i,a,a][c],b:255*[a,a,l,n,n,i][c]}}(e.h,i,l),s=!0,d="hsv"):L(e.h)&&L(e.s)&&L(e.l)&&(i=w(e.s),c=w(e.l),o=function(e,t,n){var r,o,a;if(e=b(e,360),t=b(t,100),n=b(n,100),0===t)o=n,a=n,r=n;else{var i=n<.5?n*(1+t):n+t-n*t,l=2*n-i;r=E(l,i,e+1/3),o=E(l,i,e),a=E(l,i,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,i,c),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(a=e.a)),a=x(a),{ok:s,format:e.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:a}}var R="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),P="[\\s|\\(]+(".concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")\\s*\\)?"),M="[\\s|\\(]+(".concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")[,|\\s]+(").concat(R,")\\s*\\)?"),D={CSS_UNIT:new RegExp(R),rgb:new RegExp("rgb"+P),rgba:new RegExp("rgba"+M),hsl:new RegExp("hsl"+P),hsla:new RegExp("hsla"+M),hsv:new RegExp("hsv"+P),hsva:new RegExp("hsva"+M),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function L(e){return Boolean(D.CSS_UNIT.exec(String(e)))}var _=2,z=.16,B=.05,F=.05,H=.15,W=5,V=4,U=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function K(e){var t=k(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function G(e){var t=e.r,n=e.g,r=e.b;return"#".concat(j(t,n,r,!1))}function q(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-_*t:Math.round(e.h)+_*t:n?Math.round(e.h)+_*t:Math.round(e.h)-_*t)<0?r+=360:r>=360&&(r-=360),r}function X(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-z*t:t===V?e.s+z:e.s+B*t)>1&&(r=1),n&&t===W&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Y(e,t,n){var r;return(r=n?e.v+F*t:e.v-H*t)>1&&(r=1),Number(r.toFixed(2))}function J(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=N(e),o=W;o>0;o-=1){var a=K(r),i=G(N({h:q(a,o,!0),s:X(a,o,!0),v:Y(a,o,!0)}));n.push(i)}n.push(G(r));for(var l=1;l<=V;l+=1){var c=K(r),s=G(N({h:q(c,l),s:X(c,l),v:Y(c,l)}));n.push(s)}return"dark"===t.theme?U.map((function(e){var r=e.index,o=e.opacity;return G(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}(N(t.backgroundColor||"#141414"),N(n[r]),100*o))})):n}var Q={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Z={},ee={};Object.keys(Q).forEach((function(e){Z[e]=J(Q[e]),Z[e].primary=Z[e][5],ee[e]=J(Q[e],{theme:"dark",backgroundColor:"#141414"}),ee[e].primary=ee[e][5]}));Z.red,Z.volcano,Z.gold,Z.orange,Z.yellow,Z.lime,Z.green,Z.cyan;var te=Z.blue;Z.geekblue,Z.purple,Z.magenta,Z.grey,Z.grey;const ne=(0,t.createContext)({});function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ae(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}function ie(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var le="data-rc-order",ce="data-rc-priority",se="rc-util-key",de=new Map;function ue(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):se}function fe(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function pe(e){return Array.from((de.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function he(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!ae())return null;var n=t.csp,r=t.prepend,o=t.priority,a=void 0===o?0:o,i=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),l="prependQueue"===i,c=document.createElement("style");c.setAttribute(le,i),l&&a&&c.setAttribute(ce,"".concat(a)),null!==n&&void 0!==n&&n.nonce&&(c.nonce=null===n||void 0===n?void 0:n.nonce),c.innerHTML=e;var s=fe(t),d=s.firstChild;if(r){if(l){var u=(t.styles||pe(s)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(le)))return!1;var t=Number(e.getAttribute(ce)||0);return a>=t}));if(u.length)return s.insertBefore(c,u[u.length-1].nextSibling),c}s.insertBefore(c,d)}else s.appendChild(c);return c}function me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=fe(t);return(t.styles||pe(n)).find((function(n){return n.getAttribute(ue(t))===e}))}function ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=me(e,t);n&&fe(t).removeChild(n)}function ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=fe(n),o=pe(r),a=oe(oe({},n),{},{styles:o});!function(e,t){var n=de.get(e);if(!n||!ie(document,n)){var r=he("",t),o=r.parentNode;de.set(e,o),e.removeChild(r)}}(r,a);var i=me(t,a);if(i){var l,c,s;if(null!==(l=a.csp)&&void 0!==l&&l.nonce&&i.nonce!==(null===(c=a.csp)||void 0===c?void 0:c.nonce))i.nonce=null===(s=a.csp)||void 0===s?void 0:s.nonce;return i.innerHTML!==e&&(i.innerHTML=e),i}var d=he(e,a);return d.setAttribute(ue(a),t),d}function be(e){var t;return null===e||void 0===e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function ye(e){return function(e){return be(e)instanceof ShadowRoot}(e)?be(e):null}var xe={},we=[];function Ce(e,t){}function Se(e,t){}function Ee(e,t,n){t||xe[n]||(e(!1,n),xe[n]=!0)}function ke(e,t){Ee(Ce,e,t)}function je(e,t){Ee(Se,e,t)}ke.preMessage=function(e){we.push(e)},ke.resetWarned=function(){xe={}},ke.noteOnce=je;const Ie=ke;function Te(e,t){Ie(e,"[@ant-design/icons] ".concat(t))}function Ae(e){return"object"===f(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===f(e.icon)||"function"===typeof e.icon)}function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[function(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}(n)]=r;return t}),{})}function Ne(e,n,r){return r?t.createElement(e.tag,oe(oe({key:n},Oe(e.attrs)),r),(e.children||[]).map((function(t,r){return Ne(t,"".concat(n,"-").concat(e.tag,"-").concat(r))}))):t.createElement(e.tag,oe({key:n},Oe(e.attrs)),(e.children||[]).map((function(t,r){return Ne(t,"".concat(n,"-").concat(e.tag,"-").concat(r))})))}function Re(e){return J(e)[0]}function Pe(e){return e?Array.isArray(e)?e:[e]:[]}var Me={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},De=function(e){var n=(0,t.useContext)(ne),r=n.csp,o=n.prefixCls,a="\n.anticon {\n  display: inline-flex;\n  align-items: center;\n  color: inherit;\n  font-style: normal;\n  line-height: 0;\n  text-align: center;\n  text-transform: none;\n  vertical-align: -0.125em;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n  line-height: 1;\n}\n\n.anticon svg {\n  display: inline-block;\n}\n\n.anticon::before {\n  display: none;\n}\n\n.anticon .anticon-icon {\n  display: block;\n}\n\n.anticon[tabindex] {\n  cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n  display: inline-block;\n  -webkit-animation: loadingCircle 1s infinite linear;\n  animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n  100% {\n    -webkit-transform: rotate(360deg);\n    transform: rotate(360deg);\n  }\n}\n\n@keyframes loadingCircle {\n  100% {\n    -webkit-transform: rotate(360deg);\n    transform: rotate(360deg);\n  }\n}\n";o&&(a=a.replace(/anticon/g,o)),(0,t.useEffect)((function(){var t=ye(e.current);ve(a,"@ant-design-icons",{prepend:!0,csp:r,attachTo:t})}),[])},Le=["icon","className","onClick","style","primaryColor","secondaryColor"],_e={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var ze=function(e){var n=e.icon,r=e.className,o=e.onClick,a=e.style,i=e.primaryColor,l=e.secondaryColor,c=m(e,Le),s=t.useRef(),d=_e;if(i&&(d={primaryColor:i,secondaryColor:l||Re(i)}),De(s),Te(Ae(n),"icon should be icon definiton, but got ".concat(n)),!Ae(n))return null;var u=n;return u&&"function"===typeof u.icon&&(u=oe(oe({},u),{},{icon:u.icon(d.primaryColor,d.secondaryColor)})),Ne(u.icon,"svg-".concat(u.name),oe(oe({className:r,onClick:o,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c),{},{ref:s}))};ze.displayName="IconReact",ze.getTwoToneColors=function(){return oe({},_e)},ze.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;_e.primaryColor=t,_e.secondaryColor=n||Re(t),_e.calculated=!!n};const Be=ze;function Fe(e){var t=u(Pe(e),2),n=t[0],r=t[1];return Be.setTwoToneColors({primaryColor:n,secondaryColor:r})}var He=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Fe(te.primary);var We=t.forwardRef((function(e,n){var r=e.className,o=e.icon,i=e.spin,l=e.rotate,c=e.tabIndex,s=e.onClick,d=e.twoToneColor,f=m(e,He),p=t.useContext(ne),g=p.prefixCls,b=void 0===g?"anticon":g,y=p.rootClassName,x=v()(y,b,h(h({},"".concat(b,"-").concat(o.name),!!o.name),"".concat(b,"-spin"),!!i||"loading"===o.name),r),w=c;void 0===w&&s&&(w=-1);var C=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,S=u(Pe(d),2),E=S[0],k=S[1];return t.createElement("span",a({role:"img","aria-label":o.name},f,{ref:n,tabIndex:w,onClick:s,className:x}),t.createElement(Be,{icon:o,primaryColor:E,secondaryColor:k,style:C}))}));We.displayName="AntdIcon",We.getTwoToneColor=function(){var e=Be.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},We.setTwoToneColor=Fe;const Ve=We;var Ue=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:i}))};const Ke=t.forwardRef(Ue);const Ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};var qe=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Ge}))};const Xe=t.forwardRef(qe);const Ye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"};var $e=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Ye}))};const Je=t.forwardRef($e);const Qe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var Ze=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Qe}))};const et=t.forwardRef(Ze);function tt(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function nt(e){return function(e){if(Array.isArray(e))return c(e)}(e)||tt(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(e,t){var n=oe({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}const ot="anticon",at=t.createContext({getPrefixCls:(e,t)=>t||(e?"ant-".concat(e):"ant"),iconPrefixCls:ot}),{Consumer:it}=at,lt=t.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});var ct=n(816);function st(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return t.Children.forEach(e,(function(e){(void 0!==e&&null!==e||n.keepEmpty)&&(Array.isArray(e)?r=r.concat(st(e)):(0,ct.isFragment)(e)&&e.props?r=r.concat(st(e.props.children,n)):r.push(e))})),r}const dt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};var ut=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:dt}))};const ft=t.forwardRef(ut);const pt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var ht=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:pt}))};const mt=t.forwardRef(ht);const gt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var vt=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:gt}))};const bt=t.forwardRef(vt),yt=e=>!isNaN(parseFloat(e))&&isFinite(e);var xt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const wt={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Ct=t.createContext({}),St=(()=>{let e=0;return function(){return e+=1,"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").concat(e)}})(),Et=t.forwardRef(((e,n)=>{const{prefixCls:r,className:o,trigger:a,children:i,defaultCollapsed:l=!1,theme:c="dark",style:s={},collapsible:d=!1,reverseArrow:u=!1,width:f=200,collapsedWidth:p=80,zeroWidthTriggerStyle:h,breakpoint:m,onCollapse:g,onBreakpoint:b}=e,y=xt(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:x}=(0,t.useContext)(lt),[w,C]=(0,t.useState)("collapsed"in e?e.collapsed:l),[S,E]=(0,t.useState)(!1);(0,t.useEffect)((()=>{"collapsed"in e&&C(e.collapsed)}),[e.collapsed]);const k=(t,n)=>{"collapsed"in e||C(t),null===g||void 0===g||g(t,n)},j=(0,t.useRef)();j.current=e=>{E(e.matches),null===b||void 0===b||b(e.matches),w!==e.matches&&k(e.matches,"responsive")},(0,t.useEffect)((()=>{function e(e){return j.current(e)}let t;if("undefined"!==typeof window){const{matchMedia:r}=window;if(r&&m&&m in wt){t=r("screen and (max-width: ".concat(wt[m],")"));try{t.addEventListener("change",e)}catch(n){t.addListener(e)}e(t)}}return()=>{try{null===t||void 0===t||t.removeEventListener("change",e)}catch(n){null===t||void 0===t||t.removeListener(e)}}}),[m]),(0,t.useEffect)((()=>{const e=St("ant-sider-");return x.addSider(e),()=>x.removeSider(e)}),[]);const I=()=>{k(!w,"clickTrigger")},{getPrefixCls:T}=(0,t.useContext)(at),A=t.useMemo((()=>({siderCollapsed:w})),[w]);return t.createElement(Ct.Provider,{value:A},(()=>{const e=T("layout-sider",r),l=rt(y,["collapsed"]),m=w?p:f,g=yt(m)?"".concat(m,"px"):String(m),b=0===parseFloat(String(p||0))?t.createElement("span",{onClick:I,className:v()("".concat(e,"-zero-width-trigger"),"".concat(e,"-zero-width-trigger-").concat(u?"right":"left")),style:h},a||t.createElement(ft,null)):null,x={expanded:u?t.createElement(bt,null):t.createElement(mt,null),collapsed:u?t.createElement(mt,null):t.createElement(bt,null)}[w?"collapsed":"expanded"],C=null!==a?b||t.createElement("div",{className:"".concat(e,"-trigger"),onClick:I,style:{width:g}},a||x):null,E=Object.assign(Object.assign({},s),{flex:"0 0 ".concat(g),maxWidth:g,minWidth:g,width:g}),k=v()(e,"".concat(e,"-").concat(c),{["".concat(e,"-collapsed")]:!!w,["".concat(e,"-has-trigger")]:d&&null!==a&&!b,["".concat(e,"-below")]:!!S,["".concat(e,"-zero-width")]:0===parseFloat(g)},o);return t.createElement("aside",Object.assign({className:k},l,{style:E,ref:n}),t.createElement("div",{className:"".concat(e,"-children")},i),d||S&&b?C:null)})())}));const kt=Et;const jt=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};function It(e,n,r){var o=t.useRef({});return"value"in o.current&&!r(o.current.condition,n)||(o.current.value=e(),o.current.condition=n),o.current.value}const Tt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=r.has(t);if(Ie(!i,"Warning: There may be circular references"),i)return!1;if(t===o)return!0;if(n&&a>1)return!1;r.add(t);var l=a+1;if(Array.isArray(t)){if(!Array.isArray(o)||t.length!==o.length)return!1;for(var c=0;c<t.length;c++)if(!e(t[c],o[c],l))return!1;return!0}if(t&&o&&"object"===f(t)&&"object"===f(o)){var s=Object.keys(t);return s.length===Object.keys(o).length&&s.every((function(n){return e(t[n],o[n],l)}))}return!1}(e,t)};function At(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r)}}function Nt(e,t,n){return t&&Ot(e.prototype,t),n&&Ot(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Rt="%";function Pt(e){return e.join(Rt)}var Mt=function(){function e(t){At(this,e),h(this,"instanceId",void 0),h(this,"cache",new Map),this.instanceId=t}return Nt(e,[{key:"get",value:function(e){return this.opGet(Pt(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(Pt(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();const Dt=Mt;var Lt="data-token-hash",_t="data-css-hash",zt="__cssinjs_instance__";function Bt(){var e=Math.random().toString(12).slice(2);if("undefined"!==typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(_t,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[zt]=t[zt]||e,t[zt]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(_t,"]"))).forEach((function(t){var n,o=t.getAttribute(_t);r[o]?t[zt]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[o]=!0}))}return new Dt(e)}var Ft=t.createContext({hashPriority:"low",cache:Bt(),defaultCache:!0});const Ht=Ft;var Wt=function(){function e(){At(this,e),h(this,"cache",void 0),h(this,"keys",void 0),h(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Nt(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={map:this.cache};return e.forEach((function(e){var t;o?o=null===(t=o)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):o=void 0})),null!==(t=o)&&void 0!==t&&t.value&&r&&(o.value[1]=this.cacheCallTimes++),null===(n=o)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce((function(e,t){var n=u(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),a=u(o,1)[0];this.delete(a)}this.keys.push(t)}var i=this.cache;t.forEach((function(e,o){if(o===t.length-1)i.set(e,{value:[n,r.cacheCallTimes++]});else{var a=i.get(e);a?a.map||(a.map=new Map):i.set(e,{map:new Map}),i=i.get(e).map}}))}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var o=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),o}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter((function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)})),this.deleteByPath(this.cache,e)}}]),e}();h(Wt,"MAX_CACHE_SIZE",20),h(Wt,"MAX_CACHE_OFFSET",5);var Vt=0,Ut=function(){function e(t){At(this,e),h(this,"derivatives",void 0),h(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Vt,0===t.length&&t.length,Vt+=1}return Nt(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),Kt=new Wt;function Gt(e){var t=Array.isArray(e)?e:[e];return Kt.has(t)||Kt.set(t,new Ut(t)),Kt.get(t)}var qt=new WeakMap,Xt={};var Yt=new WeakMap;function $t(e){var t=Yt.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof Ut?t+=r.id:r&&"object"===f(r)?t+=$t(r):t+=r})),Yt.set(e,t)),t}function Jt(e,t){return jt("".concat(t,"_").concat($t(e)))}var Qt="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),Zt="_bAmBoO_";function en(e,t,n){if(ae()){var r,o;ve(e,Qt);var a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",null===t||void 0===t||t(a),document.body.appendChild(a);var i=n?n(a):null===(r=getComputedStyle(a).content)||void 0===r?void 0:r.includes(Zt);return null===(o=a.parentNode)||void 0===o||o.removeChild(a),ge(Qt),i}return!1}var tn=void 0;var nn=ae();function rn(e){return"number"===typeof e?"".concat(e,"px"):e}function on(e,t,n){var r;if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var o=oe(oe({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},(h(r={},Lt,t),h(r,_t,n),r)),a=Object.keys(o).map((function(e){var t=o[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"<style ".concat(a,">").concat(e,"</style>")}var an=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},ln=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!==n&&void 0!==n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=u(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},cn=function(e,t,n){var r={},o={};return Object.entries(e).forEach((function(e){var t,a,i=u(e,2),l=i[0],c=i[1];if(null!==n&&void 0!==n&&null!==(t=n.preserve)&&void 0!==t&&t[l])o[l]=c;else if(("string"===typeof c||"number"===typeof c)&&(null===n||void 0===n||null===(a=n.ignore)||void 0===a||!a[l])){var s,d=an(l,null===n||void 0===n?void 0:n.prefix);r[d]="number"!==typeof c||null!==n&&void 0!==n&&null!==(s=n.unitless)&&void 0!==s&&s[l]?String(c):"".concat(c,"px"),o[l]="var(".concat(d,")")}})),[o,ln(r,t,{scope:null===n||void 0===n?void 0:n.scope})]},sn=ae()?t.useLayoutEffect:t.useEffect,dn=function(e,n){var r=t.useRef(!0);sn((function(){return e(r.current)}),n),sn((function(){return r.current=!1,function(){r.current=!0}}),[])},un=function(e,t){dn((function(t){if(!t)return e()}),t)};const fn=dn;var pn=oe({},r).useInsertionEffect;const hn=pn?function(e,t,n){return pn((function(){return e(),t()}),n)}:function(e,n,r){t.useMemo(e,r),fn((function(){return n(!0)}),r)};const mn="undefined"!==typeof oe({},r).useInsertionEffect?function(e){var n=[],r=!1;return t.useEffect((function(){return r=!1,function(){r=!0,n.length&&n.forEach((function(e){return e()}))}}),e),function(e){r||n.push(e)}}:function(){return function(e){e()}};const gn=function(){return!1};function vn(e,n,r,o,a){var i=t.useContext(Ht).cache,l=Pt([e].concat(nt(n))),c=mn([l]),s=(gn(),function(e){i.opUpdate(l,(function(t){var n=u(t||[void 0,void 0],2),o=n[0];var a=[void 0===o?0:o,n[1]||r()];return e?e(a):a}))});t.useMemo((function(){s()}),[l]);var d=i.opGet(l)[1];return hn((function(){null===a||void 0===a||a(d)}),(function(e){return s((function(t){var n=u(t,2),r=n[0],o=n[1];return e&&0===r&&(null===a||void 0===a||a(d)),[r+1,o]})),function(){i.opUpdate(l,(function(t){var n=u(t||[],2),r=n[0],a=void 0===r?0:r,s=n[1];return 0===a-1?(c((function(){!e&&i.opGet(l)||null===o||void 0===o||o(s,!1)})),null):[a-1,s]}))}}),[l]),d}var bn={},yn="css",xn=new Map;var wn=0;function Cn(e,t){xn.set(e,(xn.get(e)||0)-1);var n=Array.from(xn.keys()),r=n.filter((function(e){return(xn.get(e)||0)<=0}));n.length-r.length>wn&&r.forEach((function(e){!function(e,t){"undefined"!==typeof document&&document.querySelectorAll("style[".concat(Lt,'="').concat(e,'"]')).forEach((function(e){var n;e[zt]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),xn.delete(e)}))}var Sn=function(e,t,n,r){var o=oe(oe({},n.getDerivativeToken(e)),t);return r&&(o=r(o)),o},En="token";function kn(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(0,t.useContext)(Ht),a=o.cache.instanceId,i=o.container,l=r.salt,c=void 0===l?"":l,s=r.override,d=void 0===s?bn:s,f=r.formatToken,p=r.getComputedToken,h=r.cssVar,m=function(e,t){for(var n=qt,r=0;r<t.length;r+=1){var o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(Xt)||n.set(Xt,e()),n.get(Xt)}((function(){return Object.assign.apply(Object,[{}].concat(nt(n)))}),n),g=$t(m),v=$t(d),b=h?$t(h):"",y=vn(En,[c,e.id,g,v,b],(function(){var t,n=p?p(m,d,e):Sn(m,d,e,f),r=oe({},n),o="";if(h){var a=u(cn(n,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve}),2);n=a[0],o=a[1]}var i=Jt(n,c);n._tokenKey=i,r._tokenKey=Jt(r,c);var l=null!==(t=null===h||void 0===h?void 0:h.key)&&void 0!==t?t:i;n._themeKey=l,function(e){xn.set(e,(xn.get(e)||0)+1)}(l);var s="".concat(yn,"-").concat(jt(i));return n._hashId=s,[n,s,r,o,(null===h||void 0===h?void 0:h.key)||""]}),(function(e){Cn(e[0]._themeKey,a)}),(function(e){var t=u(e,4),n=t[0],r=t[3];if(h&&r){var o=ve(r,jt("css-variables-".concat(n._themeKey)),{mark:_t,prepend:"queue",attachTo:i,priority:-999});o[zt]=a,o.setAttribute(Lt,n._themeKey)}}));return y}const jn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var In="comm",Tn="rule",An="decl",On="@import",Nn="@keyframes",Rn="@layer",Pn=Math.abs,Mn=String.fromCharCode;Object.assign;function Dn(e){return e.trim()}function Ln(e,t,n){return e.replace(t,n)}function _n(e,t,n){return e.indexOf(t,n)}function zn(e,t){return 0|e.charCodeAt(t)}function Bn(e,t,n){return e.slice(t,n)}function Fn(e){return e.length}function Hn(e,t){return t.push(e),e}function Wn(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Vn(e,t,n,r){switch(e.type){case Rn:if(e.children.length)break;case On:case An:return e.return=e.return||e.value;case In:return"";case Nn:return e.return=e.value+"{"+Wn(e.children,r)+"}";case Tn:if(!Fn(e.value=e.props.join(",")))return""}return Fn(n=Wn(e.children,r))?e.return=e.value+"{"+n+"}":""}var Un=1,Kn=1,Gn=0,qn=0,Xn=0,Yn="";function $n(e,t,n,r,o,a,i,l){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Un,column:Kn,length:i,return:"",siblings:l}}function Jn(){return Xn=qn>0?zn(Yn,--qn):0,Kn--,10===Xn&&(Kn=1,Un--),Xn}function Qn(){return Xn=qn<Gn?zn(Yn,qn++):0,Kn++,10===Xn&&(Kn=1,Un++),Xn}function Zn(){return zn(Yn,qn)}function er(){return qn}function tr(e,t){return Bn(Yn,e,t)}function nr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function rr(e){return Un=Kn=1,Gn=Fn(Yn=e),qn=0,[]}function or(e){return Yn="",e}function ar(e){return Dn(tr(qn-1,cr(91===e?e+2:40===e?e+1:e)))}function ir(e){for(;(Xn=Zn())&&Xn<33;)Qn();return nr(e)>2||nr(Xn)>3?"":" "}function lr(e,t){for(;--t&&Qn()&&!(Xn<48||Xn>102||Xn>57&&Xn<65||Xn>70&&Xn<97););return tr(e,er()+(t<6&&32==Zn()&&32==Qn()))}function cr(e){for(;Qn();)switch(Xn){case e:return qn;case 34:case 39:34!==e&&39!==e&&cr(Xn);break;case 40:41===e&&cr(e);break;case 92:Qn()}return qn}function sr(e,t){for(;Qn()&&e+Xn!==57&&(e+Xn!==84||47!==Zn()););return"/*"+tr(t,qn-1)+"*"+Mn(47===e?e:Qn())}function dr(e){for(;!nr(Zn());)Qn();return tr(e,qn)}function ur(e){return or(fr("",null,null,null,[""],e=rr(e),0,[0],e))}function fr(e,t,n,r,o,a,i,l,c){for(var s=0,d=0,u=i,f=0,p=0,h=0,m=1,g=1,v=1,b=0,y="",x=o,w=a,C=r,S=y;g;)switch(h=b,b=Qn()){case 40:if(108!=h&&58==zn(S,u-1)){-1!=_n(S+=Ln(ar(b),"&","&\f"),"&\f",Pn(s?l[s-1]:0))&&(v=-1);break}case 34:case 39:case 91:S+=ar(b);break;case 9:case 10:case 13:case 32:S+=ir(h);break;case 92:S+=lr(er()-1,7);continue;case 47:switch(Zn()){case 42:case 47:Hn(hr(sr(Qn(),er()),t,n,c),c);break;default:S+="/"}break;case 123*m:l[s++]=Fn(S)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+d:-1==v&&(S=Ln(S,/\f/g,"")),p>0&&Fn(S)-u&&Hn(p>32?mr(S+";",r,n,u-1,c):mr(Ln(S," ","")+";",r,n,u-2,c),c);break;case 59:S+=";";default:if(Hn(C=pr(S,t,n,s,d,o,l,y,x=[],w=[],u,a),a),123===b)if(0===d)fr(S,t,C,C,x,a,u,l,w);else switch(99===f&&110===zn(S,3)?100:f){case 100:case 108:case 109:case 115:fr(e,C,C,r&&Hn(pr(e,C,C,0,0,o,l,y,o,x=[],u,w),w),o,w,u,l,r?x:w);break;default:fr(S,C,C,C,[""],w,0,l,w)}}s=d=p=0,m=v=1,y=S="",u=i;break;case 58:u=1+Fn(S),p=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Jn())continue;switch(S+=Mn(b),b*m){case 38:v=d>0?1:(S+="\f",-1);break;case 44:l[s++]=(Fn(S)-1)*v,v=1;break;case 64:45===Zn()&&(S+=ar(Qn())),f=Zn(),d=u=Fn(y=S+=dr(er())),b++;break;case 45:45===h&&2==Fn(S)&&(m=0)}}return a}function pr(e,t,n,r,o,a,i,l,c,s,d,u){for(var f=o-1,p=0===o?a:[""],h=function(e){return e.length}(p),m=0,g=0,v=0;m<r;++m)for(var b=0,y=Bn(e,f+1,f=Pn(g=i[m])),x=e;b<h;++b)(x=Dn(g>0?p[b]+" "+y:Ln(y,/&\f/g,p[b])))&&(c[v++]=x);return $n(e,t,n,0===o?Tn:l,c,s,d,u)}function hr(e,t,n,r){return $n(e,t,n,In,Mn(Xn),Bn(e,2,-2),0,r)}function mr(e,t,n,r,o){return $n(e,t,n,An,Bn(e,0,r),Bn(e,r+1,-1),r,o)}var gr,vr="data-ant-cssinjs-cache-path",br="_FILE_STYLE__";var yr=!0;function xr(e){return function(){if(!gr&&(gr={},ae())){var e=document.createElement("div");e.className=vr,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=u(e.split(":"),2),n=t[0],r=t[1];gr[n]=r}));var n,r=document.querySelector("style[".concat(vr,"]"));r&&(yr=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!gr[e]}var wr="_multi_value_";function Cr(e){return Wn(ur(e),Vn).replace(/\{%%%\:[^;];}/g,";")}var Sr=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,i=r.parentSelectors,l=n.hashId,c=n.layer,s=(n.path,n.hashPriority),d=n.transformers,p=void 0===d?[]:d,h=(n.linters,""),m={};function g(t){var r=t.getName(l);if(!m[r]){var o=u(e(t.style,n,{root:!1,parentSelectors:i}),1)[0];m[r]="@keyframes ".concat(t.getName(l)).concat(o)}}var v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);if(v.forEach((function(t){var r="string"!==typeof t||o?t:{};if("string"===typeof r)h+="".concat(r,"\n");else if(r._keyframe)g(r);else{var c=p.reduce((function(e,t){var n;return(null===t||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(c).forEach((function(t){var r=c[t];if("object"!==f(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===f(e)&&e&&("_skip_check_"in e||wr in e)}(r)){var d;function S(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;jn[e]||"number"!==typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!==t&&void 0!==t&&t._keyframe&&(g(t),r=t.getName(l)),h+="".concat(n,":").concat(r,";")}var p=null!==(d=null===r||void 0===r?void 0:r.value)&&void 0!==d?d:r;"object"===f(r)&&null!==r&&void 0!==r&&r[wr]&&Array.isArray(p)?p.forEach((function(e){S(t,e)})):S(t,p)}else{var v=!1,b=t.trim(),y=!1;(o||a)&&l?b.startsWith("@")?v=!0:b=function(e,t,n){if(!t)return e;var r=".".concat(t),o="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",a=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(a).concat(o).concat(r.slice(a.length))].concat(nt(n.slice(1))).join(" ")})).join(",")}(t,l,s):!o||l||"&"!==b&&""!==b||(b="",y=!0);var x=u(e(r,n,{root:y,injectHash:v,parentSelectors:[].concat(nt(i),[b])}),2),w=x[0],C=x[1];m=oe(oe({},m),C),h+="".concat(b).concat(w)}}))}})),o){if(c&&(void 0===tn&&(tn=en("@layer ".concat(Qt," { .").concat(Qt,' { content: "').concat(Zt,'"!important; } }'),(function(e){e.className=Qt}))),tn)){var b=c.split(","),y=b[b.length-1].trim();h="@layer ".concat(y," {").concat(h,"}"),b.length>1&&(h="@layer ".concat(c,"{%%%:%}").concat(h))}}else h="{".concat(h,"}");return[h,m]};function Er(e,t){return jt("".concat(e.join("%")).concat(t))}function kr(){return null}var jr="style";function Ir(e,n){var r=e.token,o=e.path,i=e.hashId,l=e.layer,c=e.nonce,s=e.clientOnly,d=e.order,f=void 0===d?0:d,p=t.useContext(Ht),m=p.autoClear,g=(p.mock,p.defaultCache),v=p.hashPriority,b=p.container,y=p.ssrInline,x=p.transformers,w=p.linters,C=p.cache,S=r._tokenKey,E=[S].concat(nt(o)),k=nn;var j=vn(jr,E,(function(){var e=E.join("|");if(xr(e)){var t=function(e){var t=gr[e],n=null;if(t&&ae())if(yr)n=br;else{var r=document.querySelector("style[".concat(_t,'="').concat(gr[e],'"]'));r?n=r.innerHTML:delete gr[e]}return[n,t]}(e),r=u(t,2),a=r[0],c=r[1];if(a)return[a,S,c,{},s,f]}var d=n(),p=u(Sr(d,{hashId:i,hashPriority:v,layer:l,path:o.join("-"),transformers:x,linters:w}),2),h=p[0],m=p[1],g=Cr(h),b=Er(E,g);return[g,S,b,m,s,f]}),(function(e,t){var n=u(e,3)[2];(t||m)&&nn&&ge(n,{mark:_t})}),(function(e){var t=u(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(k&&n!==br){var a={mark:_t,prepend:"queue",attachTo:b,priority:f},i="function"===typeof c?c():c;i&&(a.csp={nonce:i});var l=ve(n,r,a);l[zt]=C.instanceId,l.setAttribute(Lt,S),Object.keys(o).forEach((function(e){ve(Cr(o[e]),"_effect-".concat(e),a)}))}})),I=u(j,3),T=I[0],A=I[1],O=I[2];return function(e){var n,r;y&&!k&&g?n=t.createElement("style",a({},(h(r={},Lt,A),h(r,_t,O),r),{dangerouslySetInnerHTML:{__html:T}})):n=t.createElement(kr,null);return t.createElement(t.Fragment,null,n,e)}}var Tr="cssVar";const Ar=function(e,n){var r=e.key,o=e.prefix,a=e.unitless,i=e.ignore,l=e.token,c=e.scope,s=void 0===c?"":c,d=(0,t.useContext)(Ht),f=d.cache.instanceId,p=d.container,h=l._tokenKey,m=[].concat(nt(e.path),[r,s,h]),g=vn(Tr,m,(function(){var e=n(),t=u(cn(e,r,{prefix:o,unitless:a,ignore:i,scope:s}),2),l=t[0],c=t[1];return[l,c,Er(m,c),r]}),(function(e){var t=u(e,3)[2];nn&&ge(t,{mark:_t})}),(function(e){var t=u(e,3),n=t[1],o=t[2];if(n){var a=ve(n,o,{mark:_t,prepend:"queue",attachTo:p,priority:-999});a[zt]=f,a.setAttribute(Lt,r)}}));return g};var Or;h(Or={},jr,(function(e,t,n){var r=u(e,6),o=r[0],a=r[1],i=r[2],l=r[3],c=r[4],s=r[5],d=(n||{}).plain;if(c)return null;var f=o,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(s)};return f=on(o,a,i,p,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=Cr(l[e]);f+=on(n,a,"_effect-".concat(e),p,d)}})),[s,i,f]})),h(Or,En,(function(e,t,n){var r=u(e,5),o=r[2],a=r[3],i=r[4],l=(n||{}).plain;if(!a)return null;var c=o._tokenKey;return[-999,c,on(a,i,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),h(Or,Tr,(function(e,t,n){var r=u(e,4),o=r[1],a=r[2],i=r[3],l=(n||{}).plain;if(!o)return null;return[-999,a,on(o,i,a,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]}));var Nr=function(){function e(t,n){At(this,e),h(this,"name",void 0),h(this,"style",void 0),h(this,"_keyframe",!0),this.name=t,this.style=n}return Nt(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();const Rr=Nr;function Pr(e){return e.notSplit=!0,e}Pr(["borderTop","borderBottom"]),Pr(["borderTop"]),Pr(["borderBottom"]),Pr(["borderLeft","borderRight"]),Pr(["borderLeft"]),Pr(["borderRight"]);function Mr(e){var n=t.useRef();n.current=e;var r=t.useCallback((function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return null===(e=n.current)||void 0===e?void 0:e.call.apply(e,[n].concat(r))}),[]);return r}function Dr(e){var n=t.useRef(!1),r=u(t.useState(e),2),o=r[0],a=r[1];return t.useEffect((function(){return n.current=!1,function(){n.current=!0}}),[]),[o,function(e,t){t&&n.current||a(e)}]}function Lr(e){return void 0!==e}function _r(e,t){var n=t||{},r=n.defaultValue,o=n.value,a=n.onChange,i=n.postState,l=u(Dr((function(){return Lr(o)?o:Lr(r)?"function"===typeof r?r():r:"function"===typeof e?e():e})),2),c=l[0],s=l[1],d=void 0!==o?o:c,f=i?i(d):d,p=Mr(a),h=u(Dr([d]),2),m=h[0],g=h[1];return un((function(){var e=m[0];c!==e&&p(c,e)}),[m]),un((function(){Lr(o)||s(o)}),[o]),[f,Mr((function(e,t){s(e,t),g([d],t)}))]}function zr(e,t){"function"===typeof e?e(t):"object"===f(e)&&e&&"current"in e&&(e.current=t)}function Br(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter((function(e){return e}));return r.length<=1?r[0]:function(e){t.forEach((function(t){zr(t,e)}))}}function Fr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return It((function(){return Br.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))}function Hr(e){var t,n,r=(0,ct.isMemo)(e)?e.type.type:e.type;return!!("function"!==typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render||r.$$typeof===ct.ForwardRef)&&!!("function"!==typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===ct.ForwardRef)}function Wr(e){return l(e)||tt(e)||s(e)||d()}function Vr(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null===n||void 0===n)return;n=n[t[r]]}return n}function Ur(e,t,n,r){if(!t.length)return n;var o,a=Wr(t),i=a[0],l=a.slice(1);return o=e||"number"!==typeof i?Array.isArray(e)?nt(e):oe({},e):[],r&&void 0===n&&1===l.length?delete o[i][l[0]]:o[i]=Ur(o[i],l,n,r),o}function Kr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!Vr(e,t.slice(0,-1))?e:Ur(e,t,n,r)}function Gr(e){return Array.isArray(e)?[]:{}}var qr="undefined"===typeof Reflect?Object.keys:Reflect.ownKeys;function Xr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Gr(t[0]);return t.forEach((function(e){!function t(n,o){var a,i=new Set(o),l=Vr(e,n),c=Array.isArray(l);if(c||"object"===f(a=l)&&null!==a&&Object.getPrototypeOf(a)===Object.prototype){if(!i.has(l)){i.add(l);var s=Vr(r,n);c?r=Kr(r,n,[]):s&&"object"===f(s)||(r=Kr(r,n,Gr(l))),qr(l).forEach((function(e){t([].concat(nt(n),[e]),i)}))}}else r=Kr(r,n,l)}([])})),r}const Yr={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},$r=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},Jr=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n  &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Qr=(e,t,n)=>{const{fontFamily:r,fontSize:o}=e,a='[class^="'.concat(t,'"], [class*=" ').concat(t,'"]');return{[n?".".concat(n):a]:{fontFamily:r,fontSize:o,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[a]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},Zr=e=>({outline:"".concat(rn(e.lineWidthFocus)," solid ").concat(e.colorPrimaryBorder),outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),eo=e=>({"&:focus-visible":Object.assign({},Zr(e))}),to="5.14.2",no=e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}};const ro={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},oo=Object.assign(Object.assign({},ro),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});var ao=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var o=N(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=x(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=k(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=k(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=S(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=S(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),j(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,o){var a=[C(Math.round(e).toString(16)),C(Math.round(t).toString(16)),C(Math.round(n).toString(16)),C(I(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*b(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*b(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+j(this.r,this.g,this.b,!1),t=0,n=Object.entries(O);t<n.length;t++){var r=n[t],o=r[0];if(e===r[1])return o}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!==e&&void 0!==e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=y(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=y(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=y(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=y(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100;return new e({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],l=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+l)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(r+i*a)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const io=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};const lo=(e,t)=>new ao(e).setAlpha(t).toRgbString(),co=(e,t)=>new ao(e).darken(t).toHexString(),so=e=>{const t=J(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},uo=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:lo(r,.88),colorTextSecondary:lo(r,.65),colorTextTertiary:lo(r,.45),colorTextQuaternary:lo(r,.25),colorFill:lo(r,.15),colorFillSecondary:lo(r,.06),colorFillTertiary:lo(r,.04),colorFillQuaternary:lo(r,.02),colorBgLayout:co(n,4),colorBgContainer:co(n,0),colorBgElevated:co(n,0),colorBgSpotlight:lo(r,.85),colorBgBlur:"transparent",colorBorder:co(n,15),colorBorderSecondary:co(n,6)}};function fo(e){return(e+8)/e}const po=e=>{const t=function(e){const t=new Array(10).fill(null).map(((t,n)=>{const r=n-1,o=e*Math.pow(2.71828,r/5),a=n>1?Math.floor(o):Math.ceil(o);return 2*Math.floor(a/2)}));return t[1]=e,t.map((e=>({size:e,lineHeight:fo(e)})))}(e),n=t.map((e=>e.size)),r=t.map((e=>e.lineHeight)),o=n[1],a=n[0],i=n[2],l=r[1],c=r[0],s=r[2];return{fontSizeSM:a,fontSize:o,fontSizeLG:i,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:l,lineHeightLG:s,lineHeightSM:c,fontHeight:Math.round(l*o),fontHeightLG:Math.round(s*i),fontHeightSM:Math.round(c*a),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};const ho=Gt((function(e){const t=Object.keys(ro).map((t=>{const n=J(e[t]);return new Array(10).fill(1).reduce(((e,r,o)=>(e["".concat(t,"-").concat(o+1)]=n[o],e["".concat(t).concat(o+1)]=n[o],e)),{})})).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:a,colorError:i,colorInfo:l,colorPrimary:c,colorBgBase:s,colorTextBase:d}=e,u=n(c),f=n(o),p=n(a),h=n(i),m=n(l),g=r(s,d),v=n(e.colorLink||e.colorInfo);return Object.assign(Object.assign({},g),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new ao("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:so,generateNeutralColorPalettes:uo})),po(e.fontSize)),function(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),no(e)),function(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:"".concat((n+t).toFixed(1),"s"),motionDurationMid:"".concat((n+2*t).toFixed(1),"s"),motionDurationSlow:"".concat((n+3*t).toFixed(1),"s"),lineWidthBold:o+1},io(r))}(e))})),mo={token:oo,override:{override:oo},hashed:!0},go=t.createContext(mo);function vo(e){return e>=0&&e<=255}const bo=function(e,t){const{r:n,g:r,b:o,a:a}=new ao(e).toRgb();if(a<1)return e;const{r:i,g:l,b:c}=new ao(t).toRgb();for(let s=.01;s<=1;s+=.01){const e=Math.round((n-i*(1-s))/s),t=Math.round((r-l*(1-s))/s),a=Math.round((o-c*(1-s))/s);if(vo(e)&&vo(t)&&vo(a))return new ao({r:e,g:t,b:a,a:Math.round(100*s)/100}).toRgbString()}return new ao({r:n,g:r,b:o,a:1}).toRgbString()};var yo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function xo(e){const{override:t}=e,n=yo(e,["override"]),r=Object.assign({},t);Object.keys(oo).forEach((e=>{delete r[e]}));const o=Object.assign(Object.assign({},n),r),a=1200,i=1600;if(!1===o.motion){const e="0s";o.motionDurationFast=e,o.motionDurationMid=e,o.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:bo(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:bo(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:bo(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:4*o.lineWidth,lineWidth:o.lineWidth,controlOutlineWidth:2*o.lineWidth,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:bo(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:"\n      0 6px 16px 0 rgba(0, 0, 0, 0.08),\n      0 3px 6px -4px rgba(0, 0, 0, 0.12),\n      0 9px 28px 8px rgba(0, 0, 0, 0.05)\n    ",boxShadowSecondary:"\n      0 6px 16px 0 rgba(0, 0, 0, 0.08),\n      0 3px 6px -4px rgba(0, 0, 0, 0.12),\n      0 9px 28px 8px rgba(0, 0, 0, 0.05)\n    ",boxShadowTertiary:"\n      0 1px 2px 0 rgba(0, 0, 0, 0.03),\n      0 1px 6px -1px rgba(0, 0, 0, 0.02),\n      0 2px 4px 0 rgba(0, 0, 0, 0.02)\n    ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:a,screenXLMin:a,screenXLMax:1599,screenXXL:i,screenXXLMin:i,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"\n      0 1px 2px -2px ".concat(new ao("rgba(0, 0, 0, 0.16)").toRgbString(),",\n      0 3px 6px 0 ").concat(new ao("rgba(0, 0, 0, 0.12)").toRgbString(),",\n      0 5px 12px 4px ").concat(new ao("rgba(0, 0, 0, 0.09)").toRgbString(),"\n    "),boxShadowDrawerRight:"\n      -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n      -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n      -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n    ",boxShadowDrawerLeft:"\n      6px 0 16px 0 rgba(0, 0, 0, 0.08),\n      3px 0 6px -4px rgba(0, 0, 0, 0.12),\n      9px 0 28px 8px rgba(0, 0, 0, 0.05)\n    ",boxShadowDrawerUp:"\n      0 6px 16px 0 rgba(0, 0, 0, 0.08),\n      0 3px 6px -4px rgba(0, 0, 0, 0.12),\n      0 9px 28px 8px rgba(0, 0, 0, 0.05)\n    ",boxShadowDrawerDown:"\n      0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n      0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n      0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n    ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var wo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Co={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0},So={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},Eo={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},ko=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o}=t,a=wo(t,["override"]);let i=Object.assign(Object.assign({},r),{override:o});return i=xo(i),a&&Object.entries(a).forEach((e=>{let[t,n]=e;const{theme:r}=n,o=wo(n,["theme"]);let a=o;r&&(a=ko(Object.assign(Object.assign({},i),o),{override:o},r)),i[t]=a})),i};function jo(){const{token:e,hashed:n,theme:r,override:o,cssVar:a}=t.useContext(go),i="".concat(to,"-").concat(n||""),l=r||ho,[c,s,d]=kn(l,[oo,e],{salt:i,override:o,getComputedToken:ko,formatToken:xo,cssVar:a&&{prefix:a.prefix,key:a.key,unitless:Co,ignore:So,preserve:Eo}});return[l,d,n?s:"",c,a]}function Io(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function To(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Io(e)}function Ao(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ao=function(){return!!e})()}function Oo(e){return Oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oo(e)}function No(e,t){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},No(e,t)}function Ro(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&No(e,t)}const Po=Nt((function e(){At(this,e)}));let Mo=function(e){function t(e){var n;return At(this,t),n=function(e,t,n){return t=Oo(t),To(e,Ao()?Reflect.construct(t,n||[],Oo(e).constructor):t.apply(e,n))}(this,t),n.result=0,e instanceof t?n.result=e.result:"number"===typeof e&&(n.result=e),n}return Ro(t,e),Nt(t,[{key:"add",value:function(e){return e instanceof t?this.result+=e.result:"number"===typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof t?this.result-=e.result:"number"===typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof t?this.result*=e.result:"number"===typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof t?this.result/=e.result:"number"===typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),t}(Po);const Do="CALC_UNIT";function Lo(e){return"number"===typeof e?"".concat(e).concat(Do):e}let _o=function(e){function t(e){var n;return At(this,t),n=function(e,t,n){return t=Oo(t),To(e,Ao()?Reflect.construct(t,n||[],Oo(e).constructor):t.apply(e,n))}(this,t),n.result="",e instanceof t?n.result="(".concat(e.result,")"):"number"===typeof e?n.result=Lo(e):"string"===typeof e&&(n.result=e),n}return Ro(t,e),Nt(t,[{key:"add",value:function(e){return e instanceof t?this.result="".concat(this.result," + ").concat(e.getResult()):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," + ").concat(Lo(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof t?this.result="".concat(this.result," - ").concat(e.getResult()):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," - ").concat(Lo(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," * ").concat(e.getResult(!0)):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof t?this.result="".concat(this.result," / ").concat(e.getResult(!0)):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){const{unit:t=!0}=e||{},n=new RegExp("".concat(Do),"g");return this.result=this.result.replace(n,t?"px":""),"undefined"!==typeof this.lowPriority?"calc(".concat(this.result,")"):this.result}}]),t}(Po);const zo=e=>{const t="css"===e?_o:Mo;return e=>new t(e)};const Bo="undefined"!==typeof CSSINJS_STATISTIC;let Fo=!0;function Ho(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Bo)return Object.assign.apply(Object,[{}].concat(t));Fo=!1;const r={};return t.forEach((e=>{Object.keys(e).forEach((t=>{Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:()=>e[t]})}))})),Fo=!0,r}const Wo={};function Vo(){}const Uo=e=>{let t,n=e,r=Vo;return Bo&&"undefined"!==typeof Proxy&&(t=new Set,n=new Proxy(e,{get:(e,n)=>(Fo&&t.add(n),e[n])}),r=(e,n)=>{var r;Wo[e]={global:Array.from(t),component:Object.assign(Object.assign({},null===(r=Wo[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:r}},Ko=(e,t)=>{const[n,r]=jo();return Ir({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>null===t||void 0===t?void 0:t.nonce},(()=>[{[".".concat(e)]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{[".".concat(e," .").concat(e,"-icon")]:{display:"block"}})}]))},Go=(e,t,n)=>{var r;return"function"===typeof n?n(Ho(t,null!==(r=t[e])&&void 0!==r?r:{})):null!==n&&void 0!==n?n:{}},qo=(e,t,n,r)=>{const o=Object.assign({},t[e]);if(null===r||void 0===r?void 0:r.deprecatedTokens){const{deprecatedTokens:e}=r;e.forEach((e=>{let[t,n]=e;var r;((null===o||void 0===o?void 0:o[t])||(null===o||void 0===o?void 0:o[n]))&&(null!==(r=o[n])&&void 0!==r||(o[n]=null===o||void 0===o?void 0:o[t]))}))}const a=Object.assign(Object.assign({},n),o);return Object.keys(a).forEach((e=>{a[e]===t[e]&&delete a[e]})),a};function Xo(e,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const a=Array.isArray(e)?e:[e,e],[i]=a,l=a.join("-");return function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const[c,s,d,u,f]=jo(),{getPrefixCls:p,iconPrefixCls:h,csp:m}=(0,t.useContext)(at),g=p(),v=f?"css":"js",b=zo(v),{max:y,min:x}=function(e){return"js"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map((e=>rn(e))).join(","),")")},min:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map((e=>rn(e))).join(","),")")}}}(v),w={theme:c,token:u,hashId:d,nonce:()=>null===m||void 0===m?void 0:m.nonce,clientOnly:o.clientOnly,order:o.order||-999};Ir(Object.assign(Object.assign({},w),{clientOnly:!1,path:["Shared",g]}),(()=>[{"&":Jr(u)}])),Ko(h,m);const C=Ir(Object.assign(Object.assign({},w),{path:[l,e,h]}),(()=>{if(!1===o.injectStyle)return[];const{token:t,flush:l}=Uo(u),c=Go(i,s,r),p=".".concat(e),m=qo(i,s,c,{deprecatedTokens:o.deprecatedTokens});f&&Object.keys(c).forEach((e=>{c[e]="var(".concat(an(e,((e,t)=>"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-")))(i,f.prefix)),")")}));const v=Ho(t,{componentCls:p,prefixCls:e,iconCls:".".concat(h),antCls:".".concat(g),calc:b,max:y,min:x},f?c:m),w=n(v,{hashId:d,prefixCls:e,rootPrefixCls:g,iconPrefixCls:h});return l(i,m),[!1===o.resetStyle?null:Qr(v,e,a),w]}));return[C,d]}}const Yo=(e,t,n,r)=>{const o=Xo(e,t,n,Object.assign({resetStyle:!1,order:-998},r));return e=>{let{prefixCls:t,rootCls:n=t}=e;return o(t,n),null}},$o=(e,n,r,o)=>{const a=Xo(e,n,r,o),i=((e,n,r)=>{function o(t){return"".concat(e).concat(t.slice(0,1).toUpperCase()).concat(t.slice(1))}const{unitless:a={},injectStyle:i=!0}=null!==r&&void 0!==r?r:{},l={[o("zIndexPopup")]:!0};Object.keys(a).forEach((e=>{l[o(e)]=a[e]}));const c=t=>{let{rootCls:a,cssVar:i}=t;const[,c]=jo();return Ar({path:[e],prefix:i.prefix,key:null===i||void 0===i?void 0:i.key,unitless:Object.assign(Object.assign({},Co),l),ignore:So,token:c,scope:a},(()=>{const t=Go(e,c,n),a=qo(e,c,t,{deprecatedTokens:null===r||void 0===r?void 0:r.deprecatedTokens});return Object.keys(t).forEach((e=>{a[o(e)]=a[e],delete a[e]})),a})),null};return n=>{const[,,,,r]=jo();return[o=>i&&r?t.createElement(t.Fragment,null,t.createElement(c,{rootCls:n,cssVar:r,component:e}),o):o,null===r||void 0===r?void 0:r.key]}})(Array.isArray(e)?e[0]:e,r,o);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const[,n]=a(e,t),[r,o]=i(t);return[r,n,o]}},Jo=e=>{const{componentCls:t,bodyBg:n,lightSiderBg:r,lightTriggerBg:o,lightTriggerColor:a}=e;return{["".concat(t,"-sider-light")]:{background:r,["".concat(t,"-sider-trigger")]:{color:a,background:o},["".concat(t,"-sider-zero-width-trigger")]:{color:a,background:o,border:"1px solid ".concat(n),borderInlineStart:0}}}},Qo=e=>{const{antCls:t,componentCls:n,colorText:r,triggerColor:o,footerBg:a,triggerBg:i,headerHeight:l,headerPadding:c,headerColor:s,footerPadding:d,triggerHeight:u,zeroTriggerHeight:f,zeroTriggerWidth:p,motionDurationMid:h,motionDurationSlow:m,fontSize:g,borderRadius:v,bodyBg:b,headerBg:y,siderBg:x}=e;return{[n]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:b,"&, *":{boxSizing:"border-box"},["&".concat(n,"-has-sider")]:{flexDirection:"row",["> ".concat(n,", > ").concat(n,"-content")]:{width:0}},["".concat(n,"-header, &").concat(n,"-footer")]:{flex:"0 0 auto"},["".concat(n,"-sider")]:{position:"relative",minWidth:0,background:x,transition:"all ".concat(h,", background 0s"),"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,["".concat(t,"-menu").concat(t,"-menu-inline-collapsed")]:{width:"auto"}},"&-has-trigger":{paddingBottom:u},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:u,color:o,lineHeight:rn(u),textAlign:"center",background:i,cursor:"pointer",transition:"all ".concat(h)},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:l,insetInlineEnd:e.calc(p).mul(-1).equal(),zIndex:1,width:p,height:f,color:o,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:x,borderStartStartRadius:0,borderStartEndRadius:v,borderEndEndRadius:v,borderEndStartRadius:0,cursor:"pointer",transition:"background ".concat(m," ease"),"&::after":{position:"absolute",inset:0,background:"transparent",transition:"all ".concat(m),content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(p).mul(-1).equal(),borderStartStartRadius:v,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:v}}}}},Jo(e)),{"&-rtl":{direction:"rtl"}}),["".concat(n,"-header")]:{height:l,padding:c,color:s,lineHeight:rn(l),background:y,["".concat(t,"-menu")]:{lineHeight:"inherit"}},["".concat(n,"-footer")]:{padding:d,color:r,fontSize:g,background:a},["".concat(n,"-content")]:{flex:"auto",color:r,minHeight:0}}},Zo=$o("Layout",(e=>[Qo(e)]),(e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:a,marginXXS:i,colorTextLightSolid:l,colorBgContainer:c}=e,s=1.25*r;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:2*n,headerPadding:"0 ".concat(s,"px"),headerColor:o,footerPadding:"".concat(a,"px ").concat(s,"px"),footerBg:t,siderBg:"#001529",triggerHeight:r+2*i,triggerBg:"#002140",triggerColor:l,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:c,lightTriggerBg:c,lightTriggerColor:o}}),{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]});var ea=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function ta(e){let{suffixCls:n,tagName:r,displayName:o}=e;return e=>t.forwardRef(((o,a)=>t.createElement(e,Object.assign({ref:a,suffixCls:n,tagName:r},o))))}const na=t.forwardRef(((e,n)=>{const{prefixCls:r,suffixCls:o,className:a,tagName:i}=e,l=ea(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:c}=t.useContext(at),s=c("layout",r),[d,u,f]=Zo(s),p=o?"".concat(s,"-").concat(o):s;return d(t.createElement(i,Object.assign({className:v()(r||p,a,u,f),ref:n},l)))})),ra=t.forwardRef(((e,n)=>{const{direction:r}=t.useContext(at),[o,a]=t.useState([]),{prefixCls:i,className:l,rootClassName:c,children:s,hasSider:d,tagName:u,style:f}=e,p=rt(ea(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),["suffixCls"]),{getPrefixCls:h,layout:m}=t.useContext(at),g=h("layout",i),b=function(e,t,n){return"boolean"===typeof n?n:!!e.length||st(t).some((e=>e.type===kt))}(o,s,d),[y,x,w]=Zo(g),C=v()(g,{["".concat(g,"-has-sider")]:b,["".concat(g,"-rtl")]:"rtl"===r},null===m||void 0===m?void 0:m.className,l,c,x,w),S=t.useMemo((()=>({siderHook:{addSider:e=>{a((t=>[].concat(nt(t),[e])))},removeSider:e=>{a((t=>t.filter((t=>t!==e))))}}})),[]);return y(t.createElement(lt.Provider,{value:S},t.createElement(u,Object.assign({ref:n,className:C,style:Object.assign(Object.assign({},null===m||void 0===m?void 0:m.style),f)},p),s)))})),oa=ta({tagName:"div",displayName:"Layout"})(ra),aa=ta({suffixCls:"header",tagName:"header",displayName:"Header"})(na),ia=ta({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(na),la=ta({suffixCls:"content",tagName:"main",displayName:"Content"})(na),ca=oa;ca.Header=aa,ca.Footer=ia,ca.Content=la,ca.Sider=kt,ca._InternalSiderContext=Ct;const sa=ca,da=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),a=o.width,i=o.height;if(a||i)return!0}}return!1},{isValidElement:ua}=r;function fa(e){return e&&ua(e)&&e.type===t.Fragment}function pa(e,n,r){return ua(e)?t.cloneElement(e,"function"===typeof r?r(e.props||{}):r):n}function ha(e,t){return pa(e,e,t)}const ma=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:"var(--wave-color, ".concat(n,")"),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s ".concat(e.motionEaseOutCirc),"opacity 2s ".concat(e.motionEaseOutCirc)].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow 0.3s ".concat(e.motionEaseInOut),"opacity 0.35s ".concat(e.motionEaseInOut)].join(",")}}}}},ga=Xo("Wave",(e=>[ma(e)]));var va=function(e){return+setTimeout(e,16)},ba=function(e){return clearTimeout(e)};"undefined"!==typeof window&&"requestAnimationFrame"in window&&(va=function(e){return window.requestAnimationFrame(e)},ba=function(e){return window.cancelAnimationFrame(e)});var ya=0,xa=new Map;function wa(e){xa.delete(e)}var Ca=function(e){var t=ya+=1;return function n(r){if(0===r)wa(t),e();else{var o=va((function(){n(r-1)}));xa.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};Ca.cancel=function(e){var t=xa.get(e);return wa(e),ba(t)};const Sa=Ca;var Ea=n(950),ka=n.t(Ea,2);function ja(e){return e instanceof HTMLElement||e instanceof SVGElement}function Ia(e){return ja(e)?e:e instanceof t.Component?Ea.findDOMNode(e):null}var Ta=["children"],Aa=t.createContext({});function Oa(e){var n=e.children,r=m(e,Ta);return t.createElement(Aa.Provider,{value:r},n)}function Na(e){var t=Ao();return function(){var n,r=Oo(e);if(t){var o=Oo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return To(this,n)}}const Ra=function(e){Ro(n,e);var t=Na(n);function n(){return At(this,n),t.apply(this,arguments)}return Nt(n,[{key:"render",value:function(){return this.props.children}}]),n}(t.Component);var Pa="none",Ma="appear",Da="enter",La="leave",_a="none",za="prepare",Ba="start",Fa="active",Ha="end",Wa="prepared";function Va(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var Ua=function(e,t){var n={animationend:Va("Animation","AnimationEnd"),transitionend:Va("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(ae(),"undefined"!==typeof window?window:{}),Ka={};if(ae()){var Ga=document.createElement("div");Ka=Ga.style}var qa={};function Xa(e){if(qa[e])return qa[e];var t=Ua[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in Ka)return qa[e]=t[a],qa[e]}return""}var Ya=Xa("animationend"),$a=Xa("transitionend"),Ja=!(!Ya||!$a),Qa=Ya||"animationend",Za=$a||"transitionend";function ei(e,t){if(!e)return null;if("object"===f(e)){var n=t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}));return e[n]}return"".concat(e,"-").concat(t)}const ti=function(e){var n=(0,t.useRef)(),r=(0,t.useRef)(e);r.current=e;var o=t.useCallback((function(e){r.current(e)}),[]);function a(e){e&&(e.removeEventListener(Za,o),e.removeEventListener(Qa,o))}return t.useEffect((function(){return function(){a(n.current)}}),[]),[function(e){n.current&&n.current!==e&&a(n.current),e&&e!==n.current&&(e.addEventListener(Za,o),e.addEventListener(Qa,o),n.current=e)},a]};const ni=ae()?t.useLayoutEffect:t.useEffect;var ri=[za,Ba,Fa,Ha],oi=[za,Wa],ai=!1,ii=!0;function li(e){return e===Fa||e===Ha}const ci=function(e,n,r){var o=u(Dr(_a),2),a=o[0],i=o[1],l=function(){var e=t.useRef(null);function n(){Sa.cancel(e.current)}return t.useEffect((function(){return function(){n()}}),[]),[function t(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;n();var a=Sa((function(){o<=1?r({isCanceled:function(){return a!==e.current}}):t(r,o-1)}));e.current=a},n]}(),c=u(l,2),s=c[0],d=c[1];var f=n?oi:ri;return ni((function(){if(a!==_a&&a!==Ha){var e=f.indexOf(a),t=f[e+1],n=r(a);n===ai?i(t,!0):t&&s((function(e){function r(){e.isCanceled()||i(t,!0)}!0===n?r():Promise.resolve(n).then(r)}))}}),[e,a]),t.useEffect((function(){return function(){d()}}),[]),[function(){i(za,!0)},a]};const si=function(e){var n=e;"object"===f(e)&&(n=e.transitionSupport);var r=t.forwardRef((function(e,r){var o=e.visible,a=void 0===o||o,i=e.removeOnLeave,l=void 0===i||i,c=e.forceRender,s=e.children,d=e.motionName,f=e.leavedClassName,p=e.eventProps,m=function(e,t){return!(!e.motionName||!n||!1===t)}(e,t.useContext(Aa).motion),g=(0,t.useRef)(),b=(0,t.useRef)();var y=function(e,n,r,o){var a=o.motionEnter,i=void 0===a||a,l=o.motionAppear,c=void 0===l||l,s=o.motionLeave,d=void 0===s||s,f=o.motionDeadline,p=o.motionLeaveImmediately,m=o.onAppearPrepare,g=o.onEnterPrepare,v=o.onLeavePrepare,b=o.onAppearStart,y=o.onEnterStart,x=o.onLeaveStart,w=o.onAppearActive,C=o.onEnterActive,S=o.onLeaveActive,E=o.onAppearEnd,k=o.onEnterEnd,j=o.onLeaveEnd,I=o.onVisibleChanged,T=u(Dr(),2),A=T[0],O=T[1],N=u(Dr(Pa),2),R=N[0],P=N[1],M=u(Dr(null),2),D=M[0],L=M[1],_=(0,t.useRef)(!1),z=(0,t.useRef)(null);function B(){return r()}var F=(0,t.useRef)(!1);function H(){P(Pa,!0),L(null,!0)}function W(e){var t=B();if(!e||e.deadline||e.target===t){var n,r=F.current;R===Ma&&r?n=null===E||void 0===E?void 0:E(t,e):R===Da&&r?n=null===k||void 0===k?void 0:k(t,e):R===La&&r&&(n=null===j||void 0===j?void 0:j(t,e)),R!==Pa&&r&&!1!==n&&H()}}var V=u(ti(W),1)[0],U=function(e){var t,n,r;switch(e){case Ma:return h(t={},za,m),h(t,Ba,b),h(t,Fa,w),t;case Da:return h(n={},za,g),h(n,Ba,y),h(n,Fa,C),n;case La:return h(r={},za,v),h(r,Ba,x),h(r,Fa,S),r;default:return{}}},K=t.useMemo((function(){return U(R)}),[R]),G=u(ci(R,!e,(function(e){if(e===za){var t=K[za];return t?t(B()):ai}var n;return X in K&&L((null===(n=K[X])||void 0===n?void 0:n.call(K,B(),null))||null),X===Fa&&(V(B()),f>0&&(clearTimeout(z.current),z.current=setTimeout((function(){W({deadline:!0})}),f))),X===Wa&&H(),ii})),2),q=G[0],X=G[1],Y=li(X);F.current=Y,ni((function(){O(n);var t,r=_.current;_.current=!0,!r&&n&&c&&(t=Ma),r&&n&&i&&(t=Da),(r&&!n&&d||!r&&p&&!n&&d)&&(t=La);var o=U(t);t&&(e||o[za])?(P(t),q()):P(Pa)}),[n]),(0,t.useEffect)((function(){(R===Ma&&!c||R===Da&&!i||R===La&&!d)&&P(Pa)}),[c,i,d]),(0,t.useEffect)((function(){return function(){_.current=!1,clearTimeout(z.current)}}),[]);var $=t.useRef(!1);(0,t.useEffect)((function(){A&&($.current=!0),void 0!==A&&R===Pa&&(($.current||A)&&(null===I||void 0===I||I(A)),$.current=!0)}),[A,R]);var J=D;return K[za]&&X===Ba&&(J=oe({transition:"none"},J)),[R,X,J,null!==A&&void 0!==A?A:n]}(m,a,(function(){try{return g.current instanceof HTMLElement?g.current:Ia(b.current)}catch(r5){return null}}),e),x=u(y,4),w=x[0],C=x[1],S=x[2],E=x[3],k=t.useRef(E);E&&(k.current=!0);var j,I=t.useCallback((function(e){g.current=e,zr(r,e)}),[r]),T=oe(oe({},p),{},{visible:a});if(s)if(w===Pa)j=E?s(oe({},T),I):!l&&k.current&&f?s(oe(oe({},T),{},{className:f}),I):c||!l&&!f?s(oe(oe({},T),{},{style:{display:"none"}}),I):null;else{var A,O;C===za?O="prepare":li(C)?O="active":C===Ba&&(O="start");var N=ei(d,"".concat(w,"-").concat(O));j=s(oe(oe({},T),{},{className:v()(ei(d,w),(A={},h(A,N,N&&O),h(A,d,"string"===typeof d),A)),style:S}),I)}else j=null;t.isValidElement(j)&&Hr(j)&&(j.ref||(j=t.cloneElement(j,{ref:I})));return t.createElement(Ra,{ref:b},j)}));return r.displayName="CSSMotion",r}(Ja);var di="add",ui="keep",fi="remove",pi="removed";function hi(e){var t;return oe(oe({},t=e&&"object"===f(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function mi(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(hi)}var gi=["component","children","onVisibleChanged","onAllRemoved"],vi=["status"],bi=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const yi=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:si,r=function(e){Ro(o,e);var r=Na(o);function o(){var e;At(this,o);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return h(Io(e=r.call.apply(r,[this].concat(n))),"state",{keyEntities:[]}),h(Io(e),"removeKey",(function(t){var n=e.state.keyEntities.map((function(e){return e.key!==t?e:oe(oe({},e),{},{status:pi})}));return e.setState({keyEntities:n}),n.filter((function(e){return e.status!==pi})).length})),e}return Nt(o,[{key:"render",value:function(){var e=this,r=this.state.keyEntities,o=this.props,i=o.component,l=o.children,c=o.onVisibleChanged,s=o.onAllRemoved,d=m(o,gi),u=i||t.Fragment,f={};return bi.forEach((function(e){f[e]=d[e],delete d[e]})),delete d.keys,t.createElement(u,d,r.map((function(r,o){var i=r.status,d=m(r,vi),u=i===di||i===ui;return t.createElement(n,a({},f,{key:d.key,visible:u,eventProps:d,onVisibleChanged:function(t){(null===c||void 0===c||c(t,{key:d.key}),t)||0===e.removeKey(d.key)&&s&&s()}}),(function(e,t){return l(oe(oe({},e),{},{index:o}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,o=mi(n),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,a=mi(e),i=mi(t);a.forEach((function(e){for(var t=!1,a=r;a<o;a+=1){var l=i[a];if(l.key===e.key){r<a&&(n=n.concat(i.slice(r,a).map((function(e){return oe(oe({},e),{},{status:di})}))),r=a),n.push(oe(oe({},l),{},{status:ui})),r+=1,t=!0;break}}t||n.push(oe(oe({},e),{},{status:fi}))})),r<o&&(n=n.concat(i.slice(r).map((function(e){return oe(oe({},e),{},{status:di})}))));var l={};return n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1})),Object.keys(l).filter((function(e){return l[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==fi}))).forEach((function(t){t.key===e&&(t.status=ui)}))})),n}(r,o);return{keyEntities:a.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==pi||e.status!==fi}))}}}]),o}(t.Component);return h(r,"defaultProps",{component:"div"}),r}(Ja),xi=si;function wi(){wi=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),l=new N(r||[]);return o(i,"_invoke",{value:I(e,n,l)}),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",h="suspendedYield",m="executing",g="completed",v={};function b(){}function y(){}function x(){}var w={};s(w,i,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(R([])));S&&S!==n&&r.call(S,i)&&(w=S);var E=x.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(o,a,i,l){var c=u(e[o],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==f(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function I(t,n,r){var o=p;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var c=T(l,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var s=u(t,n,r);if("normal"===s.type){if(o=r.done?g:h,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=u(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(f(t)+" is not iterable")}return y.prototype=x,o(E,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=s(x,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,s(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},k(j.prototype),s(j.prototype,l,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new j(d(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(E),s(E,c,"Generator"),s(E,i,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return l.type="throw",l.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Ci(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function Si(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Ci(a,r,o,i,l,"next",e)}function l(e){Ci(a,r,o,i,l,"throw",e)}i(void 0)}))}}var Ei,ki=oe({},ka),ji=ki.version,Ii=ki.render,Ti=ki.unmountComponentAtNode;try{Number((ji||"").split(".")[0])>=18&&(Ei=ki.createRoot)}catch(r5){}function Ai(e){var t=ki.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===f(t)&&(t.usingClientEntryPoint=e)}var Oi="__rc_react_root__";function Ni(e,t){Ei?function(e,t){Ai(!0);var n=t[Oi]||Ei(t);Ai(!1),n.render(e),t[Oi]=n}(e,t):function(e,t){Ii(e,t)}(e,t)}function Ri(e){return Pi.apply(this,arguments)}function Pi(){return(Pi=Si(wi().mark((function e(t){return wi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[Oi])||void 0===e||e.unmount(),delete t[Oi]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mi(e){Ti(e)}function Di(e){return Li.apply(this,arguments)}function Li(){return(Li=Si(wi().mark((function e(t){return wi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===Ei){e.next=2;break}return e.abrupt("return",Ri(t));case 2:Mi(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _i(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&function(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}const zi="ant-wave-target";function Bi(e){return Number.isNaN(e)?0:e}const Fi=e=>{const{className:n,target:r,component:o}=e,a=t.useRef(null),[i,l]=t.useState(null),[c,s]=t.useState([]),[d,u]=t.useState(0),[f,p]=t.useState(0),[h,m]=t.useState(0),[g,b]=t.useState(0),[y,x]=t.useState(!1),w={left:d,top:f,width:h,height:g,borderRadius:c.map((e=>"".concat(e,"px"))).join(" ")};function C(){const e=getComputedStyle(r);l(function(e){const{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return _i(t)?t:_i(n)?n:_i(r)?r:null}(r));const t="static"===e.position,{borderLeftWidth:n,borderTopWidth:o}=e;u(t?r.offsetLeft:Bi(-parseFloat(n))),p(t?r.offsetTop:Bi(-parseFloat(o))),m(r.offsetWidth),b(r.offsetHeight);const{borderTopLeftRadius:a,borderTopRightRadius:i,borderBottomLeftRadius:c,borderBottomRightRadius:d}=e;s([a,i,d,c].map((e=>Bi(parseFloat(e)))))}if(i&&(w["--wave-color"]=i),t.useEffect((()=>{if(r){const e=Sa((()=>{C(),x(!0)}));let t;return"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(C),t.observe(r)),()=>{Sa.cancel(e),null===t||void 0===t||t.disconnect()}}}),[]),!y)return null;const S=("Checkbox"===o||"Radio"===o)&&(null===r||void 0===r?void 0:r.classList.contains(zi));return t.createElement(xi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(e,t)=>{var n;if(t.deadline||"opacity"===t.propertyName){const e=null===(n=a.current)||void 0===n?void 0:n.parentElement;Di(e).then((()=>{null===e||void 0===e||e.remove()}))}return!1}},(e=>{let{className:r}=e;return t.createElement("div",{ref:a,className:v()(n,{"wave-quick":S},r),style:w})}))},Hi=(e,n)=>{var r;const{component:o}=n;if("Checkbox"===o&&!(null===(r=e.querySelector("input"))||void 0===r?void 0:r.checked))return;const a=document.createElement("div");a.style.position="absolute",a.style.left="0px",a.style.top="0px",null===e||void 0===e||e.insertBefore(a,null===e||void 0===e?void 0:e.firstChild),Ni(t.createElement(Fi,Object.assign({},n,{target:e})),a)};const Wi=e=>{const{children:n,disabled:r,component:o}=e,{getPrefixCls:a}=(0,t.useContext)(at),i=(0,t.useRef)(null),l=a("wave"),[,c]=ga(l),s=function(e,n,r){const{wave:o}=t.useContext(at),[,a,i]=jo(),l=Mr((t=>{const l=e.current;if((null===o||void 0===o?void 0:o.disabled)||!l)return;const c=l.querySelector(".".concat(zi))||l,{showEffect:s}=o||{};(s||Hi)(c,{className:n,token:a,component:r,event:t,hashId:i})})),c=t.useRef();return e=>{Sa.cancel(c.current),c.current=Sa((()=>{l(e)}))}}(i,v()(l,c),o);if(t.useEffect((()=>{const e=i.current;if(!e||1!==e.nodeType||r)return;const t=t=>{!da(t.target)||!e.getAttribute||e.getAttribute("disabled")||e.disabled||e.className.includes("disabled")||e.className.includes("-leave")||s(t)};return e.addEventListener("click",t,!0),()=>{e.removeEventListener("click",t,!0)}}),[r]),!t.isValidElement(n))return null!==n&&void 0!==n?n:null;return ha(n,{ref:Hr(n)?Br(n.ref,i):i})},Vi=t.createContext(!1),Ui=e=>{let{children:n,disabled:r}=e;const o=t.useContext(Vi);return t.createElement(Vi.Provider,{value:null!==r&&void 0!==r?r:o},n)},Ki=Vi,Gi=t.createContext(void 0),qi=e=>{let{children:n,size:r}=e;const o=t.useContext(Gi);return t.createElement(Gi.Provider,{value:r||o},n)},Xi=Gi,Yi=e=>{const n=t.useContext(Xi);return t.useMemo((()=>e?"string"===typeof e?null!==e&&void 0!==e?e:n:e instanceof Function?e(n):n:n),[e,n])},$i=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},Ji=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},["".concat(t,"-item:empty")]:{display:"none"}}}},Qi=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},Zi=$o("Space",(e=>{const t=Ho(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[Ji(t),Qi(t),$i(t)]}),(()=>({})),{resetStyle:!1});var el=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const tl=t.createContext(null),nl=(e,n)=>{const r=t.useContext(tl),o=t.useMemo((()=>{if(!r)return"";const{compactDirection:t,isFirstItem:o,isLastItem:a}=r,i="vertical"===t?"-vertical-":"-";return v()("".concat(e,"-compact").concat(i,"item"),{["".concat(e,"-compact").concat(i,"first-item")]:o,["".concat(e,"-compact").concat(i,"last-item")]:a,["".concat(e,"-compact").concat(i,"item-rtl")]:"rtl"===n})}),[e,n,r]);return{compactSize:null===r||void 0===r?void 0:r.compactSize,compactDirection:null===r||void 0===r?void 0:r.compactDirection,compactItemClassnames:o}},rl=e=>{let{children:n}=e;return t.createElement(tl.Provider,{value:null},n)},ol=e=>{var{children:n}=e,r=el(e,["children"]);return t.createElement(tl.Provider,{value:r},n)},al=e=>{const{getPrefixCls:n,direction:r}=t.useContext(at),{size:o,direction:a,block:i,prefixCls:l,className:c,rootClassName:s,children:d}=e,u=el(e,["size","direction","block","prefixCls","className","rootClassName","children"]),f=Yi((e=>null!==o&&void 0!==o?o:e)),p=n("space-compact",l),[h,m]=Zi(p),g=v()(p,m,{["".concat(p,"-rtl")]:"rtl"===r,["".concat(p,"-block")]:i,["".concat(p,"-vertical")]:"vertical"===a},c,s),b=t.useContext(tl),y=st(d),x=t.useMemo((()=>y.map(((e,n)=>{const r=e&&e.key||"".concat(p,"-item-").concat(n);return t.createElement(ol,{key:r,compactSize:f,compactDirection:a,isFirstItem:0===n&&(!b||(null===b||void 0===b?void 0:b.isFirstItem)),isLastItem:n===y.length-1&&(!b||(null===b||void 0===b?void 0:b.isLastItem))},e)}))),[o,y,b]);return 0===y.length?null:h(t.createElement("div",Object.assign({className:g},u),x))};var il=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const ll=t.createContext(void 0),cl=e=>{const{getPrefixCls:n,direction:r}=t.useContext(at),{prefixCls:o,size:a,className:i}=e,l=il(e,["prefixCls","size","className"]),c=n("btn-group",o),[,,s]=jo();let d="";switch(a){case"large":d="lg";break;case"small":d="sm"}const u=v()(c,{["".concat(c,"-").concat(d)]:d,["".concat(c,"-rtl")]:"rtl"===r},i,s);return t.createElement(ll.Provider,{value:a},t.createElement("div",Object.assign({},l,{className:u})))},sl=/^[\u4e00-\u9fa5]{2}$/,dl=sl.test.bind(sl);function ul(e){return"danger"===e?{danger:!0}:{type:e}}function fl(e){return"string"===typeof e}function pl(e){return"text"===e||"link"===e}function hl(e,n){let r=!1;const o=[];return t.Children.forEach(e,(e=>{const t=typeof e,n="string"===t||"number"===t;if(r&&n){const t=o.length-1,n=o[t];o[t]="".concat(n).concat(e)}else o.push(e);r=n})),t.Children.map(o,(e=>function(e,n){if(null===e||void 0===e)return;const r=n?" ":"";return"string"!==typeof e&&"number"!==typeof e&&fl(e.type)&&dl(e.props.children)?ha(e,{children:e.props.children.split("").join(r)}):fl(e)?dl(e)?t.createElement("span",null,e.split("").join(r)):t.createElement("span",null,e):fa(e)?t.createElement("span",null,e):e}(e,n)))}const ml=(0,t.forwardRef)(((e,n)=>{const{className:r,style:o,children:a,prefixCls:i}=e,l=v()("".concat(i,"-icon"),r);return t.createElement("span",{ref:n,className:l,style:o},a)})),gl=ml;const vl={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var bl=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:vl}))};const yl=t.forwardRef(bl),xl=(0,t.forwardRef)(((e,n)=>{let{prefixCls:r,className:o,style:a,iconClassName:i}=e;const l=v()("".concat(r,"-loading-icon"),o);return t.createElement(gl,{prefixCls:r,className:l,style:a,ref:n},t.createElement(yl,{className:i}))})),wl=()=>({width:0,opacity:0,transform:"scale(0)"}),Cl=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),Sl=e=>{const{prefixCls:n,loading:r,existIcon:o,className:a,style:i}=e,l=!!r;return o?t.createElement(xl,{prefixCls:n,className:a,style:i}):t.createElement(xi,{visible:l,motionName:"".concat(n,"-loading-icon-motion"),motionLeave:l,removeOnLeave:!0,onAppearStart:wl,onAppearActive:Cl,onEnterStart:wl,onEnterActive:Cl,onLeaveStart:Cl,onLeaveActive:wl},((e,r)=>{let{className:o,style:l}=e;return t.createElement(xl,{prefixCls:n,className:a,style:Object.assign(Object.assign({},i),l),ref:r,iconClassName:o})}))},El=(e,t)=>({["> span, > ".concat(e)]:{"&:not(:last-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{["&, & > ".concat(e)]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),kl=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:a}=e;return{["".concat(t,"-group")]:[{position:"relative",display:"inline-flex",["> span, > ".concat(t)]:{"&:not(:last-child)":{["&, & > ".concat(t)]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),["&, & > ".concat(t)]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n          &:focus,\n          &:active":{zIndex:2},"&[disabled]":{zIndex:0}},["".concat(t,"-icon-only")]:{fontSize:n}},El("".concat(t,"-primary"),o),El("".concat(t,"-danger"),a)]}},jl=e=>{const{paddingInline:t,onlyIconSize:n,paddingBlock:r}=e;return Ho(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:r,buttonIconOnlyFontSize:n})},Il=e=>{var t,n,r,o,a,i;const l=null!==(t=e.contentFontSize)&&void 0!==t?t:e.fontSize,c=null!==(n=e.contentFontSizeSM)&&void 0!==n?n:e.fontSize,s=null!==(r=e.contentFontSizeLG)&&void 0!==r?r:e.fontSizeLG,d=null!==(o=e.contentLineHeight)&&void 0!==o?o:fo(l),u=null!==(a=e.contentLineHeightSM)&&void 0!==a?a:fo(c),f=null!==(i=e.contentLineHeightLG)&&void 0!==i?i:fo(s);return{fontWeight:400,defaultShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlTmpOutline),primaryShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.controlOutline),dangerShadow:"0 ".concat(e.controlOutlineWidth,"px 0 ").concat(e.colorErrorOutline),primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:e.fontSizeLG,onlyIconSizeSM:e.fontSizeLG-2,onlyIconSizeLG:e.fontSizeLG+2,groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textHoverBg:e.colorBgTextHover,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,contentFontSize:l,contentFontSizeSM:c,contentFontSizeLG:s,contentLineHeight:d,contentLineHeightSM:u,contentLineHeightLG:f,paddingBlock:Math.max((e.controlHeight-l*d)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-c*u)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-s*f)/2-e.lineWidth,0)}},Tl=e=>{const{componentCls:t,iconCls:n,fontWeight:r}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," transparent"),cursor:"pointer",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},["".concat(t,"-icon")]:{lineHeight:0},["> ".concat(n," + span, > span + ").concat(n)]:{marginInlineStart:e.marginXS},["&:not(".concat(t,"-icon-only) > ").concat(t,"-icon")]:{["&".concat(t,"-loading-icon, &:not(:last-child)")]:{marginInlineEnd:e.marginXS}},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},eo(e)),["&".concat(t,"-two-chinese-chars::first-letter")]:{letterSpacing:"0.34em"},["&".concat(t,"-two-chinese-chars > *:not(").concat(n,")")]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},["&-icon-only".concat(t,"-compact-item")]:{flex:"none"}}}},Al=(e,t,n)=>({["&:not(:disabled):not(".concat(e,"-disabled)")]:{"&:hover":t,"&:active":n}}),Ol=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Nl=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),Rl=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Pl=(e,t,n,r,o,a,i,l)=>({["&".concat(e,"-background-ghost")]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},Al(e,Object.assign({background:t},i),Object.assign({background:t},l))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:a||void 0}})}),Ml=e=>({["&:disabled, &".concat(e.componentCls,"-disabled")]:Object.assign({},Rl(e))}),Dl=e=>Object.assign({},Ml(e)),Ll=e=>({["&:disabled, &".concat(e.componentCls,"-disabled")]:{cursor:"not-allowed",color:e.colorTextDisabled}}),_l=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Dl(e)),{background:e.defaultBg,borderColor:e.defaultBorderColor,color:e.defaultColor,boxShadow:e.defaultShadow}),Al(e.componentCls,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Pl(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign(Object.assign({color:e.colorError,borderColor:e.colorError},Al(e.componentCls,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Pl(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),Ml(e))}),zl=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Dl(e)),{color:e.primaryColor,background:e.colorPrimary,boxShadow:e.primaryShadow}),Al(e.componentCls,{color:e.colorTextLightSolid,background:e.colorPrimaryHover},{color:e.colorTextLightSolid,background:e.colorPrimaryActive})),Pl(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign(Object.assign({background:e.colorError,boxShadow:e.dangerShadow,color:e.dangerColor},Al(e.componentCls,{background:e.colorErrorHover},{background:e.colorErrorActive})),Pl(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Ml(e))}),Bl=e=>Object.assign(Object.assign({},_l(e)),{borderStyle:"dashed"}),Fl=e=>Object.assign(Object.assign(Object.assign({color:e.colorLink},Al(e.componentCls,{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Ll(e)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign({color:e.colorError},Al(e.componentCls,{color:e.colorErrorHover},{color:e.colorErrorActive})),Ll(e))}),Hl=e=>Object.assign(Object.assign(Object.assign({},Al(e.componentCls,{color:e.colorText,background:e.textHoverBg},{color:e.colorText,background:e.colorBgTextActive})),Ll(e)),{["&".concat(e.componentCls,"-dangerous")]:Object.assign(Object.assign({color:e.colorError},Ll(e)),Al(e.componentCls,{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBg}))}),Wl=e=>{const{componentCls:t}=e;return{["".concat(t,"-default")]:_l(e),["".concat(t,"-primary")]:zl(e),["".concat(t,"-dashed")]:Bl(e),["".concat(t,"-link")]:Fl(e),["".concat(t,"-text")]:Hl(e),["".concat(t,"-ghost")]:Pl(e.componentCls,e.ghostBg,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)}},Vl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const{componentCls:n,controlHeight:r,fontSize:o,lineHeight:a,borderRadius:i,buttonPaddingHorizontal:l,iconCls:c,buttonPaddingVertical:s}=e,d="".concat(n,"-icon-only");return[{["".concat(t)]:{fontSize:o,lineHeight:a,height:r,padding:"".concat(rn(s)," ").concat(rn(l)),borderRadius:i,["&".concat(d)]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,["&".concat(n,"-round")]:{width:"auto"},[c]:{fontSize:e.buttonIconOnlyFontSize}},["&".concat(n,"-loading")]:{opacity:e.opacityLoading,cursor:"default"},["".concat(n,"-loading-icon")]:{transition:"width ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,", opacity ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut)}}},{["".concat(n).concat(n,"-circle").concat(t)]:Ol(e)},{["".concat(n).concat(n,"-round").concat(t)]:Nl(e)}]},Ul=e=>{const t=Ho(e,{fontSize:e.contentFontSize,lineHeight:e.contentLineHeight});return Vl(t,e.componentCls)},Kl=e=>{const t=Ho(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,lineHeight:e.contentLineHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:e.paddingBlockSM,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Vl(t,"".concat(e.componentCls,"-sm"))},Gl=e=>{const t=Ho(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,lineHeight:e.contentLineHeightLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:e.paddingBlockLG,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Vl(t,"".concat(e.componentCls,"-lg"))},ql=e=>{const{componentCls:t}=e;return{[t]:{["&".concat(t,"-block")]:{width:"100%"}}}},Xl=$o("Button",(e=>{const t=jl(e);return[Tl(t),Ul(t),Kl(t),Gl(t),ql(t),Wl(t),kl(t)]}),Il,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Yl(e,t,n){const{focusElCls:r,focus:o,borderElCls:a}=n,i=a?"> *":"",l=["hover",o?"focus":null,"active"].filter(Boolean).map((e=>"&:".concat(e," ").concat(i))).join(",");return{["&-item:not(".concat(t,"-last-item)")]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[l]:{zIndex:2}},r?{["&".concat(r)]:{zIndex:2}}:{}),{["&[disabled] ".concat(i)]:{zIndex:0}})}}function $l(e,t,n){const{borderElCls:r}=n,o=r?"> ".concat(r):"";return{["&-item:not(".concat(t,"-first-item):not(").concat(t,"-last-item) ").concat(o)]:{borderRadius:0},["&-item:not(".concat(t,"-last-item)").concat(t,"-first-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&-item:not(".concat(t,"-first-item)").concat(t,"-last-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Jl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0};const{componentCls:n}=e,r="".concat(n,"-compact");return{[r]:Object.assign(Object.assign({},Yl(e,r,t)),$l(n,r,t))}}function Ql(e,t){return{["&-item:not(".concat(t,"-last-item)")]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Zl(e){const t="".concat(e.componentCls,"-compact-vertical");return{[t]:Object.assign(Object.assign({},Ql(e,t)),(n=e.componentCls,r=t,{["&-item:not(".concat(r,"-first-item):not(").concat(r,"-last-item)")]:{borderRadius:0},["&-item".concat(r,"-first-item:not(").concat(r,"-last-item)")]:{["&, &".concat(n,"-sm, &").concat(n,"-lg")]:{borderEndEndRadius:0,borderEndStartRadius:0}},["&-item".concat(r,"-last-item:not(").concat(r,"-first-item)")]:{["&, &".concat(n,"-sm, &").concat(n,"-lg")]:{borderStartStartRadius:0,borderStartEndRadius:0}}}))};var n,r}const ec=e=>{const{componentCls:t,calc:n}=e;return{[t]:{["&-compact-item".concat(t,"-primary")]:{["&:not([disabled]) + ".concat(t,"-compact-item").concat(t,"-primary:not([disabled])")]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:e.lineWidth,height:"calc(100% + ".concat(rn(e.lineWidth)," * 2)"),backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{["&".concat(t,"-primary")]:{["&:not([disabled]) + ".concat(t,"-compact-vertical-item").concat(t,"-primary:not([disabled])")]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:"calc(100% + ".concat(rn(e.lineWidth)," * 2)"),height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},tc=Yo(["Button","compact"],(e=>{const t=jl(e);return[Jl(t),Zl(t),ec(t)]}),Il);var nc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const rc=(e,n)=>{var r,o;const{loading:a=!1,prefixCls:i,type:l="default",danger:c,shape:s="default",size:d,styles:u,disabled:f,className:p,rootClassName:h,children:m,icon:g,ghost:b=!1,block:y=!1,htmlType:x="button",classNames:w,style:C={}}=e,S=nc(e,["loading","prefixCls","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","ghost","block","htmlType","classNames","style"]),{getPrefixCls:E,autoInsertSpaceInButton:k,direction:j,button:I}=(0,t.useContext)(at),T=E("btn",i),[A,O,N]=Xl(T),R=(0,t.useContext)(Ki),P=null!==f&&void 0!==f?f:R,M=(0,t.useContext)(ll),D=(0,t.useMemo)((()=>function(e){if("object"===typeof e&&e){let t=null===e||void 0===e?void 0:e.delay;return t=Number.isNaN(t)||"number"!==typeof t?0:t,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}(a)),[a]),[L,_]=(0,t.useState)(D.loading),[z,B]=(0,t.useState)(!1),F=Br(n,(0,t.createRef)()),H=1===t.Children.count(m)&&!g&&!pl(l);(0,t.useEffect)((()=>{let e=null;return D.delay>0?e=setTimeout((()=>{e=null,_(!0)}),D.delay):_(D.loading),function(){e&&(clearTimeout(e),e=null)}}),[D]),(0,t.useEffect)((()=>{if(!F||!F.current||!1===k)return;const e=F.current.textContent;H&&dl(e)?z||B(!0):z&&B(!1)}),[F]);const W=t=>{const{onClick:n}=e;L||P?t.preventDefault():null===n||void 0===n||n(t)};const V=!1!==k,{compactSize:U,compactItemClassnames:K}=nl(T,j),G={large:"lg",small:"sm",middle:void 0},q=Yi((e=>{var t,n;return null!==(n=null!==(t=null!==d&&void 0!==d?d:U)&&void 0!==t?t:M)&&void 0!==n?n:e})),X=q&&G[q]||"",Y=L?"loading":g,$=rt(S,["navigate"]),J=v()(T,O,N,{["".concat(T,"-").concat(s)]:"default"!==s&&s,["".concat(T,"-").concat(l)]:l,["".concat(T,"-").concat(X)]:X,["".concat(T,"-icon-only")]:!m&&0!==m&&!!Y,["".concat(T,"-background-ghost")]:b&&!pl(l),["".concat(T,"-loading")]:L,["".concat(T,"-two-chinese-chars")]:z&&V&&!L,["".concat(T,"-block")]:y,["".concat(T,"-dangerous")]:!!c,["".concat(T,"-rtl")]:"rtl"===j},K,p,h,null===I||void 0===I?void 0:I.className),Q=Object.assign(Object.assign({},null===I||void 0===I?void 0:I.style),C),Z=v()(null===w||void 0===w?void 0:w.icon,null===(r=null===I||void 0===I?void 0:I.classNames)||void 0===r?void 0:r.icon),ee=Object.assign(Object.assign({},(null===u||void 0===u?void 0:u.icon)||{}),(null===(o=null===I||void 0===I?void 0:I.styles)||void 0===o?void 0:o.icon)||{}),te=g&&!L?t.createElement(gl,{prefixCls:T,className:Z,style:ee},g):t.createElement(Sl,{existIcon:!!g,prefixCls:T,loading:!!L}),ne=m||0===m?hl(m,H&&V):null;if(void 0!==$.href)return A(t.createElement("a",Object.assign({},$,{className:v()(J,{["".concat(T,"-disabled")]:P}),href:P?void 0:$.href,style:Q,onClick:W,ref:F,tabIndex:P?-1:0}),te,ne));let re=t.createElement("button",Object.assign({},S,{type:x,className:J,style:Q,onClick:W,disabled:P,ref:F}),te,ne,!!K&&t.createElement(tc,{key:"compact",prefixCls:T}));return pl(l)||(re=t.createElement(Wi,{component:"Button",disabled:!!L},re)),A(re)},oc=(0,t.forwardRef)(rc);oc.Group=cl,oc.__ANT_BUTTON=!0;const ac=oc;function ic(e){return["small","middle","large"].includes(e)}function lc(e){return!!e&&("number"===typeof e&&!Number.isNaN(e))}const cc=t.createContext({latestIndex:0}),sc=cc.Provider,dc=e=>{let{className:n,index:r,children:o,split:a,style:i}=e;const{latestIndex:l}=t.useContext(cc);return null===o||void 0===o?null:t.createElement(t.Fragment,null,t.createElement("div",{className:n,style:i},o),r<l&&a&&t.createElement("span",{className:"".concat(n,"-split")},a))};var uc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const fc=t.forwardRef(((e,n)=>{var r,o;const{getPrefixCls:a,space:i,direction:l}=t.useContext(at),{size:c=(null===i||void 0===i?void 0:i.size)||"small",align:s,className:d,rootClassName:u,children:f,direction:p="horizontal",prefixCls:h,split:m,style:g,wrap:b=!1,classNames:y,styles:x}=e,w=uc(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[C,S]=Array.isArray(c)?c:[c,c],E=ic(S),k=ic(C),j=lc(S),I=lc(C),T=st(f,{keepEmpty:!0}),A=void 0===s&&"horizontal"===p?"center":s,O=a("space",h),[N,R,P]=Zi(O),M=v()(O,null===i||void 0===i?void 0:i.className,R,"".concat(O,"-").concat(p),{["".concat(O,"-rtl")]:"rtl"===l,["".concat(O,"-align-").concat(A)]:A,["".concat(O,"-gap-row-").concat(S)]:E,["".concat(O,"-gap-col-").concat(C)]:k},d,u,P),D=v()("".concat(O,"-item"),null!==(r=null===y||void 0===y?void 0:y.item)&&void 0!==r?r:null===(o=null===i||void 0===i?void 0:i.classNames)||void 0===o?void 0:o.item);let L=0;const _=T.map(((e,n)=>{var r,o;null!==e&&void 0!==e&&(L=n);const a=e&&e.key||"".concat(D,"-").concat(n);return t.createElement(dc,{className:D,key:a,index:n,split:m,style:null!==(r=null===x||void 0===x?void 0:x.item)&&void 0!==r?r:null===(o=null===i||void 0===i?void 0:i.styles)||void 0===o?void 0:o.item},e)})),z=t.useMemo((()=>({latestIndex:L})),[L]);if(0===T.length)return null;const B={};return b&&(B.flexWrap="wrap"),!k&&I&&(B.columnGap=C),!E&&j&&(B.rowGap=S),N(t.createElement("div",Object.assign({ref:n,className:M,style:Object.assign(Object.assign(Object.assign({},B),null===i||void 0===i?void 0:i.style),g)},w),t.createElement(sc,{value:z},_)))}));const pc=fc;pc.Compact=al;const hc=pc;function mc(e){var n=e.children,r=e.prefixCls,o=e.id,a=e.overlayInnerStyle,i=e.className,l=e.style;return t.createElement("div",{className:v()("".concat(r,"-content"),i),style:l},t.createElement("div",{className:"".concat(r,"-inner"),id:o,role:"tooltip",style:a},"function"===typeof n?n():n))}const gc=t.createContext(null);var vc,bc=[];function yc(e){if("undefined"===typeof document)return 0;if(e||void 0===vc){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var o=t.offsetWidth;n.style.overflow="scroll";var a=t.offsetWidth;o===a&&(a=n.clientWidth),document.body.removeChild(n),vc=o-a}return vc}function xc(e){var t=e.match(/^(.*)px$/),n=Number(null===t||void 0===t?void 0:t[1]);return Number.isNaN(n)?yc():n}function wc(e){if("undefined"===typeof document||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:xc(n),height:xc(r)}}var Cc="rc-util-locker-".concat(Date.now()),Sc=0;function Ec(e){var n=!!e,r=u(t.useState((function(){return Sc+=1,"".concat(Cc,"_").concat(Sc)})),1)[0];fn((function(){if(n){var e=wc(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;ve("\nhtml body {\n  overflow-y: hidden;\n  ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),r)}else ge(r);return function(){ge(r)}}),[n,r])}var kc=!1;var jc=function(e){return!1!==e&&(ae()&&e?"string"===typeof e?document.querySelector(e):"function"===typeof e?e():e:null)},Ic=t.forwardRef((function(e,n){var r=e.open,o=e.autoLock,a=e.getContainer,i=(e.debug,e.autoDestroy),l=void 0===i||i,c=e.children,s=u(t.useState(r),2),d=s[0],f=s[1],p=d||r;t.useEffect((function(){(l||r)&&f(r)}),[r,l]);var h=u(t.useState((function(){return jc(a)})),2),m=h[0],g=h[1];t.useEffect((function(){var e=jc(a);g(null!==e&&void 0!==e?e:null)}));var v=function(e,n){var r=u(t.useState((function(){return ae()?document.createElement("div"):null})),1)[0],o=t.useRef(!1),a=t.useContext(gc),i=u(t.useState(bc),2),l=i[0],c=i[1],s=a||(o.current?void 0:function(e){c((function(t){return[e].concat(nt(t))}))});function d(){r.parentElement||document.body.appendChild(r),o.current=!0}function f(){var e;null===(e=r.parentElement)||void 0===e||e.removeChild(r),o.current=!1}return fn((function(){return e?a?a(d):d():f(),f}),[e]),fn((function(){l.length&&(l.forEach((function(e){return e()})),c(bc))}),[l]),[r,s]}(p&&!m),b=u(v,2),y=b[0],x=b[1],w=null!==m&&void 0!==m?m:y;Ec(o&&r&&ae()&&(w===y||w===document.body));var C=null;c&&Hr(c)&&n&&(C=c.ref);var S=Fr(C,n);if(!p||!ae()||void 0===m)return null;var E,k=!1===w||("boolean"===typeof E&&(kc=E),kc),j=c;return n&&(j=t.cloneElement(c,{ref:S})),t.createElement(gc.Provider,{value:x},k?j:(0,Ea.createPortal)(j,w))}));const Tc=Ic;var Ac=t.createContext(null);var Oc=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),Nc="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,Rc="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),Pc="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(Rc):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var Mc=["top","right","bottom","left","width","height","size","weight"],Dc="undefined"!==typeof MutationObserver,Lc=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function a(){n&&(n=!1,e()),r&&l()}function i(){Pc(a)}function l(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(i,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Nc&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Dc?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Nc&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Mc.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),_c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},zc=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Rc},Bc=Kc(0,0,0,0);function Fc(e){return parseFloat(e)||0}function Hc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Fc(e["border-"+n+"-width"])}),0)}function Wc(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Bc;var r=zc(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],a=e["padding-"+o];t[o]=Fc(a)}return t}(r),a=o.left+o.right,i=o.top+o.bottom,l=Fc(r.width),c=Fc(r.height);if("border-box"===r.boxSizing&&(Math.round(l+a)!==t&&(l-=Hc(r,"left","right")+a),Math.round(c+i)!==n&&(c-=Hc(r,"top","bottom")+i)),!function(e){return e===zc(e).document.documentElement}(e)){var s=Math.round(l+a)-t,d=Math.round(c+i)-n;1!==Math.abs(s)&&(l-=s),1!==Math.abs(d)&&(c-=d)}return Kc(o.left,o.top,l,c)}var Vc="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof zc(e).SVGGraphicsElement}:function(e){return e instanceof zc(e).SVGElement&&"function"===typeof e.getBBox};function Uc(e){return Nc?Vc(e)?function(e){var t=e.getBBox();return Kc(0,0,t.width,t.height)}(e):Wc(e):Bc}function Kc(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Gc=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Kc(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Uc(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),qc=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,a="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,i=Object.create(a.prototype);return _c(i,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),i}(t);_c(this,{target:e,contentRect:n})},Xc=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Oc,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof zc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Gc(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof zc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new qc(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Yc="undefined"!==typeof WeakMap?new WeakMap:new Oc,$c=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Lc.getInstance(),r=new Xc(t,n,this);Yc.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){$c.prototype[e]=function(){var t;return(t=Yc.get(this))[e].apply(t,arguments)}}));const Jc="undefined"!==typeof Rc.ResizeObserver?Rc.ResizeObserver:$c;var Qc=new Map;var Zc=new Jc((function(e){e.forEach((function(e){var t,n=e.target;null===(t=Qc.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var es=function(e){Ro(n,e);var t=Na(n);function n(){return At(this,n),t.apply(this,arguments)}return Nt(n,[{key:"render",value:function(){return this.props.children}}]),n}(t.Component);function ts(e,n){var r=e.children,o=e.disabled,a=t.useRef(null),i=t.useRef(null),l=t.useContext(Ac),c="function"===typeof r,s=c?r(a):r,d=t.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!c&&t.isValidElement(s)&&Hr(s),p=Fr(u?s.ref:null,a),h=function(){var e;return Ia(a.current)||(a.current&&"object"===f(a.current)?Ia(null===(e=a.current)||void 0===e?void 0:e.nativeElement):null)||Ia(i.current)};t.useImperativeHandle(n,(function(){return h()}));var m=t.useRef(e);m.current=e;var g=t.useCallback((function(e){var t=m.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),a=o.width,i=o.height,c=e.offsetWidth,s=e.offsetHeight,u=Math.floor(a),f=Math.floor(i);if(d.current.width!==u||d.current.height!==f||d.current.offsetWidth!==c||d.current.offsetHeight!==s){var p={width:u,height:f,offsetWidth:c,offsetHeight:s};d.current=p;var h=c===Math.round(a)?a:c,g=s===Math.round(i)?i:s,v=oe(oe({},p),{},{offsetWidth:h,offsetHeight:g});null===l||void 0===l||l(v,e,r),n&&Promise.resolve().then((function(){n(v,e)}))}}),[]);return t.useEffect((function(){var e,t,n=h();return n&&!o&&(e=n,t=g,Qc.has(e)||(Qc.set(e,new Set),Zc.observe(e)),Qc.get(e).add(t)),function(){return function(e,t){Qc.has(e)&&(Qc.get(e).delete(t),Qc.get(e).size||(Zc.unobserve(e),Qc.delete(e)))}(n,g)}}),[a.current,o]),t.createElement(es,{ref:i},u?t.cloneElement(s,{ref:p}):s)}const ns=t.forwardRef(ts);function rs(e,n){var r=e.children;return("function"===typeof r?[r]:st(r)).map((function(r,o){var i=(null===r||void 0===r?void 0:r.key)||"".concat("rc-observer-key","-").concat(o);return t.createElement(ns,a({},e,{key:i,ref:0===o?n:void 0}),r)}))}var os=t.forwardRef(rs);os.Collection=function(e){var n=e.children,r=e.onBatchResize,o=t.useRef(0),a=t.useRef([]),i=t.useContext(Ac),l=t.useCallback((function(e,t,n){o.current+=1;var l=o.current;a.current.push({size:e,element:t,data:n}),Promise.resolve().then((function(){l===o.current&&(null===r||void 0===r||r(a.current),a.current=[])})),null===i||void 0===i||i(e,t,n)}),[r,i]);return t.createElement(Ac.Provider,{value:l},n)};const as=os;var is=0;var ls=oe({},r).useId;const cs=ls?function(e){var t=ls();return e||t}:function(e){var n=u(t.useState("ssr-id"),2),r=n[0],o=n[1];return t.useEffect((function(){var e=is;is+=1,o("rc_unique_".concat(e))}),[]),e||r},ss=function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))};function ds(e){var n=e.prefixCls,r=e.align,o=e.arrow,a=e.arrowPos,i=o||{},l=i.className,c=i.content,s=a.x,d=void 0===s?0:s,u=a.y,f=void 0===u?0:u,p=t.useRef();if(!r||!r.points)return null;var h={position:"absolute"};if(!1!==r.autoArrow){var m=r.points[0],g=r.points[1],b=m[0],y=m[1],x=g[0],w=g[1];b!==x&&["t","b"].includes(b)?"t"===b?h.top=0:h.bottom=0:h.top=f,y!==w&&["l","r"].includes(y)?"l"===y?h.left=0:h.right=0:h.left=d}return t.createElement("div",{ref:p,className:v()("".concat(n,"-arrow"),l),style:h},c)}function us(e){var n=e.prefixCls,r=e.open,o=e.zIndex,i=e.mask,l=e.motion;return i?t.createElement(xi,a({},l,{motionAppear:!0,visible:r,removeOnLeave:!0}),(function(e){var r=e.className;return t.createElement("div",{style:{zIndex:o},className:v()("".concat(n,"-mask"),r)})})):null}var fs=t.memo((function(e){return e.children}),(function(e,t){return t.cache}));const ps=fs;var hs=t.forwardRef((function(e,n){var r=e.popup,o=e.className,i=e.prefixCls,l=e.style,c=e.target,s=e.onVisibleChanged,d=e.open,f=e.keepDom,p=e.fresh,h=e.onClick,m=e.mask,g=e.arrow,b=e.arrowPos,y=e.align,x=e.motion,w=e.maskMotion,C=e.forceRender,S=e.getPopupContainer,E=e.autoDestroy,k=e.portal,j=e.zIndex,I=e.onMouseEnter,T=e.onMouseLeave,A=e.onPointerEnter,O=e.ready,N=e.offsetX,R=e.offsetY,P=e.offsetR,M=e.offsetB,D=e.onAlign,L=e.onPrepare,_=e.stretch,z=e.targetWidth,B=e.targetHeight,F="function"===typeof r?r():r,H=d||f,W=(null===S||void 0===S?void 0:S.length)>0,V=u(t.useState(!S||!W),2),U=V[0],K=V[1];if(fn((function(){!U&&W&&c&&K(!0)}),[U,W,c]),!U)return null;var G="auto",q={left:"-1000vw",top:"-1000vh",right:G,bottom:G};if(O||!d){var X,Y=y.points,$=y.dynamicInset||(null===(X=y._experimental)||void 0===X?void 0:X.dynamicInset),J=$&&"r"===Y[0][1],Q=$&&"b"===Y[0][0];J?(q.right=P,q.left=G):(q.left=N,q.right=G),Q?(q.bottom=M,q.top=G):(q.top=R,q.bottom=G)}var Z={};return _&&(_.includes("height")&&B?Z.height=B:_.includes("minHeight")&&B&&(Z.minHeight=B),_.includes("width")&&z?Z.width=z:_.includes("minWidth")&&z&&(Z.minWidth=z)),d||(Z.pointerEvents="none"),t.createElement(k,{open:C||H,getContainer:S&&function(){return S(c)},autoDestroy:E},t.createElement(us,{prefixCls:i,open:d,zIndex:j,mask:m,motion:w}),t.createElement(as,{onResize:D,disabled:!d},(function(e){return t.createElement(xi,a({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:C,leavedClassName:"".concat(i,"-hidden")},x,{onAppearPrepare:L,onEnterPrepare:L,visible:d,onVisibleChanged:function(e){var t;null===x||void 0===x||null===(t=x.onVisibleChanged)||void 0===t||t.call(x,e),s(e)}}),(function(r,a){var c=r.className,s=r.style,u=v()(i,c,o);return t.createElement("div",{ref:Br(e,n,a),className:u,style:oe(oe(oe(oe({"--arrow-x":"".concat(b.x||0,"px"),"--arrow-y":"".concat(b.y||0,"px")},q),Z),s),{},{boxSizing:"border-box",zIndex:j},l),onMouseEnter:I,onMouseLeave:T,onPointerEnter:A,onClick:h},g&&t.createElement(ds,{prefixCls:i,arrow:g,arrowPos:b,align:y}),t.createElement(ps,{cache:!d&&!p},F))}))})))}));const ms=hs;var gs=t.forwardRef((function(e,n){var r=e.children,o=e.getTriggerDOMNode,a=Hr(r),i=t.useCallback((function(e){zr(n,o?o(e):e)}),[o]),l=Fr(i,r.ref);return a?t.cloneElement(r,{ref:l}):r}));const vs=gs;const bs=t.createContext(null);function ys(e){return e?Array.isArray(e)?e:[e]:[]}function xs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function ws(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Cs(e){return e.ownerDocument.defaultView}function Ss(e){for(var t=[],n=null===e||void 0===e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=Cs(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function Es(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function ks(e){return Es(parseFloat(e),0)}function js(e,t){var n=oe({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=Cs(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,a=t.borderTopWidth,i=t.borderBottomWidth,l=t.borderLeftWidth,c=t.borderRightWidth,s=e.getBoundingClientRect(),d=e.offsetHeight,u=e.clientHeight,f=e.offsetWidth,p=e.clientWidth,h=ks(a),m=ks(i),g=ks(l),v=ks(c),b=Es(Math.round(s.width/f*1e3)/1e3),y=Es(Math.round(s.height/d*1e3)/1e3),x=(f-p-g-v)*b,w=(d-u-h-m)*y,C=h*y,S=m*y,E=g*b,k=v*b,j=0,I=0;if("clip"===r){var T=ks(o);j=T*b,I=T*y}var A=s.x+E-j,O=s.y+C-I,N=A+s.width+2*j-E-k-x,R=O+s.height+2*I-C-S-w;n.left=Math.max(n.left,A),n.top=Math.max(n.top,O),n.right=Math.min(n.right,N),n.bottom=Math.min(n.bottom,R)}})),n}function Is(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function Ts(e,t){var n=u(t||[],2),r=n[0],o=n[1];return[Is(e.width,r),Is(e.height,o)]}function As(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function Os(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function Ns(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var Rs=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const Ps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Tc,n=t.forwardRef((function(n,r){var o=n.prefixCls,a=void 0===o?"rc-trigger-popup":o,i=n.children,l=n.action,c=void 0===l?"hover":l,s=n.showAction,d=n.hideAction,f=n.popupVisible,p=n.defaultPopupVisible,h=n.onPopupVisibleChange,g=n.afterPopupVisibleChange,b=n.mouseEnterDelay,y=n.mouseLeaveDelay,x=void 0===y?.1:y,w=n.focusDelay,C=n.blurDelay,S=n.mask,E=n.maskClosable,k=void 0===E||E,j=n.getPopupContainer,I=n.forceRender,T=n.autoDestroy,A=n.destroyPopupOnHide,O=n.popup,N=n.popupClassName,R=n.popupStyle,P=n.popupPlacement,M=n.builtinPlacements,D=void 0===M?{}:M,L=n.popupAlign,_=n.zIndex,z=n.stretch,B=n.getPopupClassNameFromAlign,F=n.fresh,H=n.alignPoint,W=n.onPopupClick,V=n.onPopupAlign,U=n.arrow,K=n.popupMotion,G=n.maskMotion,q=n.popupTransitionName,X=n.popupAnimation,Y=n.maskTransitionName,$=n.maskAnimation,J=n.className,Q=n.getTriggerDOMNode,Z=m(n,Rs),ee=T||A||!1,te=u(t.useState(!1),2),ne=te[0],re=te[1];fn((function(){re(ss())}),[]);var ae=t.useRef({}),ie=t.useContext(bs),le=t.useMemo((function(){return{registerSubPopup:function(e,t){ae.current[e]=t,null===ie||void 0===ie||ie.registerSubPopup(e,t)}}}),[ie]),ce=cs(),se=u(t.useState(null),2),de=se[0],ue=se[1],fe=Mr((function(e){ja(e)&&de!==e&&ue(e),null===ie||void 0===ie||ie.registerSubPopup(ce,e)})),pe=u(t.useState(null),2),he=pe[0],me=pe[1],ge=t.useRef(null),ve=Mr((function(e){ja(e)&&he!==e&&(me(e),ge.current=e)})),be=t.Children.only(i),xe=(null===be||void 0===be?void 0:be.props)||{},we={},Ce=Mr((function(e){var t,n,r=he;return(null===r||void 0===r?void 0:r.contains(e))||(null===(t=ye(r))||void 0===t?void 0:t.host)===e||e===r||(null===de||void 0===de?void 0:de.contains(e))||(null===(n=ye(de))||void 0===n?void 0:n.host)===e||e===de||Object.values(ae.current).some((function(t){return(null===t||void 0===t?void 0:t.contains(e))||e===t}))})),Se=ws(a,K,X,q),Ee=ws(a,G,$,Y),ke=u(t.useState(p||!1),2),je=ke[0],Ie=ke[1],Te=null!==f&&void 0!==f?f:je,Ae=Mr((function(e){void 0===f&&Ie(e)}));fn((function(){Ie(f||!1)}),[f]);var Oe=t.useRef(Te);Oe.current=Te;var Ne=t.useRef([]);Ne.current=[];var Re=Mr((function(e){var t;Ae(e),(null!==(t=Ne.current[Ne.current.length-1])&&void 0!==t?t:Te)!==e&&(Ne.current.push(e),null===h||void 0===h||h(e))})),Pe=t.useRef(),Me=function(){clearTimeout(Pe.current)},De=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Me(),0===t?Re(e):Pe.current=setTimeout((function(){Re(e)}),1e3*t)};t.useEffect((function(){return Me}),[]);var Le=u(t.useState(!1),2),_e=Le[0],ze=Le[1];fn((function(e){e&&!Te||ze(!0)}),[Te]);var Be=u(t.useState(null),2),Fe=Be[0],He=Be[1],We=u(t.useState([0,0]),2),Ve=We[0],Ue=We[1],Ke=function(e){Ue([e.clientX,e.clientY])},Ge=function(e,n,r,o,a,i,l){var c=u(t.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[o]||{}}),2),s=c[0],d=c[1],f=t.useRef(0),p=t.useMemo((function(){return n?Ss(n):[]}),[n]),h=t.useRef({});e||(h.current={});var m=Mr((function(){if(n&&r&&e){var t,c,s,f=n,m=f.ownerDocument,g=Cs(f).getComputedStyle(f),v=g.width,b=g.height,y=g.position,x=f.style.left,w=f.style.top,C=f.style.right,S=f.style.bottom,E=f.style.overflow,k=oe(oe({},a[o]),i),j=m.createElement("div");if(null===(t=f.parentElement)||void 0===t||t.appendChild(j),j.style.left="".concat(f.offsetLeft,"px"),j.style.top="".concat(f.offsetTop,"px"),j.style.position=y,j.style.height="".concat(f.offsetHeight,"px"),j.style.width="".concat(f.offsetWidth,"px"),f.style.left="0",f.style.top="0",f.style.right="auto",f.style.bottom="auto",f.style.overflow="hidden",Array.isArray(r))s={x:r[0],y:r[1],width:0,height:0};else{var I=r.getBoundingClientRect();s={x:I.x,y:I.y,width:I.width,height:I.height}}var T=f.getBoundingClientRect(),A=m.documentElement,O=A.clientWidth,N=A.clientHeight,R=A.scrollWidth,P=A.scrollHeight,M=A.scrollTop,D=A.scrollLeft,L=T.height,_=T.width,z=s.height,B=s.width,F={left:0,top:0,right:O,bottom:N},H={left:-D,top:-M,right:R-D,bottom:P-M},W=k.htmlRegion,V="visible",U="visibleFirst";"scroll"!==W&&W!==U&&(W=V);var K=W===U,G=js(H,p),q=js(F,p),X=W===V?q:G,Y=K?q:X;f.style.left="auto",f.style.top="auto",f.style.right="0",f.style.bottom="0";var $=f.getBoundingClientRect();f.style.left=x,f.style.top=w,f.style.right=C,f.style.bottom=S,f.style.overflow=E,null===(c=f.parentElement)||void 0===c||c.removeChild(j);var J=Es(Math.round(_/parseFloat(v)*1e3)/1e3),Q=Es(Math.round(L/parseFloat(b)*1e3)/1e3);if(0===J||0===Q||ja(r)&&!da(r))return;var Z=k.offset,ee=k.targetOffset,te=u(Ts(T,Z),2),ne=te[0],re=te[1],ae=u(Ts(s,ee),2),ie=ae[0],le=ae[1];s.x-=ie,s.y-=le;var ce=u(k.points||[],2),se=ce[0],de=As(ce[1]),ue=As(se),fe=Os(s,de),pe=Os(T,ue),he=oe({},k),me=fe.x-pe.x+ne,ge=fe.y-pe.y+re;function st(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:X,r=T.x+e,o=T.y+t,a=r+_,i=o+L,l=Math.max(r,n.left),c=Math.max(o,n.top),s=Math.min(a,n.right),d=Math.min(i,n.bottom);return Math.max(0,(s-l)*(d-c))}var ve,be,ye,xe,we=st(me,ge),Ce=st(me,ge,q),Se=Os(s,["t","l"]),Ee=Os(T,["t","l"]),ke=Os(s,["b","r"]),je=Os(T,["b","r"]),Ie=k.overflow||{},Te=Ie.adjustX,Ae=Ie.adjustY,Oe=Ie.shiftX,Ne=Ie.shiftY,Re=function(e){return"boolean"===typeof e?e:e>=0};function dt(){ve=T.y+ge,be=ve+L,ye=T.x+me,xe=ye+_}dt();var Pe=Re(Ae),Me=ue[0]===de[0];if(Pe&&"t"===ue[0]&&(be>Y.bottom||h.current.bt)){var De=ge;Me?De-=L-z:De=Se.y-je.y-re;var Le=st(me,De),_e=st(me,De,q);Le>we||Le===we&&(!K||_e>=Ce)?(h.current.bt=!0,ge=De,re=-re,he.points=[Ns(ue,0),Ns(de,0)]):h.current.bt=!1}if(Pe&&"b"===ue[0]&&(ve<Y.top||h.current.tb)){var ze=ge;Me?ze+=L-z:ze=ke.y-Ee.y-re;var Be=st(me,ze),Fe=st(me,ze,q);Be>we||Be===we&&(!K||Fe>=Ce)?(h.current.tb=!0,ge=ze,re=-re,he.points=[Ns(ue,0),Ns(de,0)]):h.current.tb=!1}var He=Re(Te),We=ue[1]===de[1];if(He&&"l"===ue[1]&&(xe>Y.right||h.current.rl)){var Ve=me;We?Ve-=_-B:Ve=Se.x-je.x-ne;var Ue=st(Ve,ge),Ke=st(Ve,ge,q);Ue>we||Ue===we&&(!K||Ke>=Ce)?(h.current.rl=!0,me=Ve,ne=-ne,he.points=[Ns(ue,1),Ns(de,1)]):h.current.rl=!1}if(He&&"r"===ue[1]&&(ye<Y.left||h.current.lr)){var Ge=me;We?Ge+=_-B:Ge=ke.x-Ee.x-ne;var qe=st(Ge,ge),Xe=st(Ge,ge,q);qe>we||qe===we&&(!K||Xe>=Ce)?(h.current.lr=!0,me=Ge,ne=-ne,he.points=[Ns(ue,1),Ns(de,1)]):h.current.lr=!1}dt();var Ye=!0===Oe?0:Oe;"number"===typeof Ye&&(ye<q.left&&(me-=ye-q.left-ne,s.x+B<q.left+Ye&&(me+=s.x-q.left+B-Ye)),xe>q.right&&(me-=xe-q.right-ne,s.x>q.right-Ye&&(me+=s.x-q.right+Ye)));var $e=!0===Ne?0:Ne;"number"===typeof $e&&(ve<q.top&&(ge-=ve-q.top-re,s.y+z<q.top+$e&&(ge+=s.y-q.top+z-$e)),be>q.bottom&&(ge-=be-q.bottom-re,s.y>q.bottom-$e&&(ge+=s.y-q.bottom+$e)));var Je=T.x+me,Qe=Je+_,Ze=T.y+ge,et=Ze+L,tt=s.x,nt=tt+B,rt=s.y,ot=rt+z,at=(Math.max(Je,tt)+Math.min(Qe,nt))/2-Je,it=(Math.max(Ze,rt)+Math.min(et,ot))/2-Ze;null===l||void 0===l||l(n,he);var lt=$.right-T.x-(me+T.width),ct=$.bottom-T.y-(ge+T.height);d({ready:!0,offsetX:me/J,offsetY:ge/Q,offsetR:lt/J,offsetB:ct/Q,arrowX:at/J,arrowY:it/Q,scaleX:J,scaleY:Q,align:he})}})),g=function(){d((function(e){return oe(oe({},e),{},{ready:!1})}))};return fn(g,[o]),fn((function(){e||g()}),[e]),[s.ready,s.offsetX,s.offsetY,s.offsetR,s.offsetB,s.arrowX,s.arrowY,s.scaleX,s.scaleY,s.align,function(){f.current+=1;var e=f.current;Promise.resolve().then((function(){f.current===e&&m()}))}]}(Te,de,H?Ve:he,P,D,L,V),qe=u(Ge,11),Xe=qe[0],Ye=qe[1],$e=qe[2],Je=qe[3],Qe=qe[4],Ze=qe[5],et=qe[6],tt=qe[7],rt=qe[8],ot=qe[9],at=qe[10],it=function(e,n,r,o){return t.useMemo((function(){var t=ys(null!==r&&void 0!==r?r:n),a=ys(null!==o&&void 0!==o?o:n),i=new Set(t),l=new Set(a);return e&&(i.has("hover")&&(i.delete("hover"),i.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[i,l]}),[e,n,r,o])}(ne,c,s,d),lt=u(it,2),ct=lt[0],st=lt[1],dt=ct.has("click"),ut=st.has("click")||st.has("contextMenu"),ft=Mr((function(){_e||at()}));!function(e,t,n,r,o){fn((function(){if(e&&t&&n){var a=n,i=Ss(t),l=Ss(a),c=Cs(a),s=new Set([c].concat(nt(i),nt(l)));function d(){r(),o()}return s.forEach((function(e){e.addEventListener("scroll",d,{passive:!0})})),c.addEventListener("resize",d,{passive:!0}),r(),function(){s.forEach((function(e){e.removeEventListener("scroll",d),c.removeEventListener("resize",d)}))}}}),[e,t,n])}(Te,he,de,ft,(function(){Oe.current&&H&&ut&&De(!1)})),fn((function(){ft()}),[Ve,P]),fn((function(){!Te||null!==D&&void 0!==D&&D[P]||ft()}),[JSON.stringify(L)]);var pt=t.useMemo((function(){var e=function(e,t,n,r){for(var o=n.points,a=Object.keys(e),i=0;i<a.length;i+=1){var l,c=a[i];if(xs(null===(l=e[c])||void 0===l?void 0:l.points,o,r))return"".concat(t,"-placement-").concat(c)}return""}(D,a,ot,H);return v()(e,null===B||void 0===B?void 0:B(ot))}),[ot,B,D,a,H]);t.useImperativeHandle(r,(function(){return{nativeElement:ge.current,forceAlign:ft}}));var ht=u(t.useState(0),2),mt=ht[0],gt=ht[1],vt=u(t.useState(0),2),bt=vt[0],yt=vt[1],xt=function(){if(z&&he){var e=he.getBoundingClientRect();gt(e.width),yt(e.height)}};function wt(e,t,n,r){we[e]=function(o){var a;null===r||void 0===r||r(o),De(t,n);for(var i=arguments.length,l=new Array(i>1?i-1:0),c=1;c<i;c++)l[c-1]=arguments[c];null===(a=xe[e])||void 0===a||a.call.apply(a,[xe,o].concat(l))}}fn((function(){Fe&&(at(),Fe(),He(null))}),[Fe]),(dt||ut)&&(we.onClick=function(e){var t;Oe.current&&ut?De(!1):!Oe.current&&dt&&(Ke(e),De(!0));for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=xe.onClick)||void 0===t||t.call.apply(t,[xe,e].concat(r))}),function(e,n,r,o,a,i,l,c){var s=t.useRef(e),d=t.useRef(!1);s.current!==e&&(d.current=!0,s.current=e),t.useEffect((function(){var e=Sa((function(){d.current=!1}));return function(){Sa.cancel(e)}}),[e]),t.useEffect((function(){if(n&&o&&(!a||i)){var e=function(){var e=!1;return[function(t){var n=t.target;e=l(n)},function(t){var n=t.target;d.current||!s.current||e||l(n)||c(!1)}]},t=u(e(),2),f=t[0],p=t[1],h=u(e(),2),m=h[0],g=h[1],v=Cs(o);v.addEventListener("mousedown",f,!0),v.addEventListener("click",p,!0),v.addEventListener("contextmenu",p,!0);var b=ye(r);return b&&(b.addEventListener("mousedown",m,!0),b.addEventListener("click",g,!0),b.addEventListener("contextmenu",g,!0)),function(){v.removeEventListener("mousedown",f,!0),v.removeEventListener("click",p,!0),v.removeEventListener("contextmenu",p,!0),b&&(b.removeEventListener("mousedown",m,!0),b.removeEventListener("click",g,!0),b.removeEventListener("contextmenu",g,!0))}}}),[n,r,o,a,i])}(Te,ut,he,de,S,k,Ce,De);var Ct,St,Et=ct.has("hover"),kt=st.has("hover");Et&&(wt("onMouseEnter",!0,b,(function(e){Ke(e)})),wt("onPointerEnter",!0,b,(function(e){Ke(e)})),Ct=function(e){(Te||_e)&&null!==de&&void 0!==de&&de.contains(e.target)&&De(!0,b)},H&&(we.onMouseMove=function(e){var t;null===(t=xe.onMouseMove)||void 0===t||t.call(xe,e)})),kt&&(wt("onMouseLeave",!1,x),wt("onPointerLeave",!1,x),St=function(){De(!1,x)}),ct.has("focus")&&wt("onFocus",!0,w),st.has("focus")&&wt("onBlur",!1,C),ct.has("contextMenu")&&(we.onContextMenu=function(e){var t;Oe.current&&st.has("contextMenu")?De(!1):(Ke(e),De(!0)),e.preventDefault();for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===(t=xe.onContextMenu)||void 0===t||t.call.apply(t,[xe,e].concat(r))}),J&&(we.className=v()(xe.className,J));var jt=oe(oe({},xe),we),It={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){Z[e]&&(It[e]=function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null===(t=jt[e])||void 0===t||t.call.apply(t,[jt].concat(r)),Z[e].apply(Z,r)})}));var Tt=t.cloneElement(be,oe(oe({},jt),It)),At={x:Ze,y:et},Ot=U?oe({},!0!==U?U:{}):null;return t.createElement(t.Fragment,null,t.createElement(as,{disabled:!Te,ref:ve,onResize:function(){xt(),ft()}},t.createElement(vs,{getTriggerDOMNode:Q},Tt)),t.createElement(bs.Provider,{value:le},t.createElement(ms,{portal:e,ref:fe,prefixCls:a,popup:O,className:v()(N,pt),style:R,target:he,onMouseEnter:Ct,onMouseLeave:St,onPointerEnter:Ct,zIndex:_,open:Te,keepDom:_e,fresh:F,onClick:W,mask:S,motion:Se,maskMotion:Ee,onVisibleChanged:function(e){ze(!1),at(),null===g||void 0===g||g(e)},onPrepare:function(){return new Promise((function(e){xt(),He((function(){return e}))}))},forceRender:I,autoDestroy:ee,getPopupContainer:j,align:ot,arrow:Ot,arrowPos:At,ready:Xe,offsetX:Ye,offsetY:$e,offsetR:Je,offsetB:Qe,onAlign:ft,stretch:z,targetWidth:mt/tt,targetHeight:bt/rt})))}));return n}(Tc);var Ms={shiftX:64,adjustY:1},Ds={adjustX:1,shiftY:!0},Ls=[0,0],_s={left:{points:["cr","cl"],overflow:Ds,offset:[-4,0],targetOffset:Ls},right:{points:["cl","cr"],overflow:Ds,offset:[4,0],targetOffset:Ls},top:{points:["bc","tc"],overflow:Ms,offset:[0,-4],targetOffset:Ls},bottom:{points:["tc","bc"],overflow:Ms,offset:[0,4],targetOffset:Ls},topLeft:{points:["bl","tl"],overflow:Ms,offset:[0,-4],targetOffset:Ls},leftTop:{points:["tr","tl"],overflow:Ds,offset:[-4,0],targetOffset:Ls},topRight:{points:["br","tr"],overflow:Ms,offset:[0,-4],targetOffset:Ls},rightTop:{points:["tl","tr"],overflow:Ds,offset:[4,0],targetOffset:Ls},bottomRight:{points:["tr","br"],overflow:Ms,offset:[0,4],targetOffset:Ls},rightBottom:{points:["bl","br"],overflow:Ds,offset:[4,0],targetOffset:Ls},bottomLeft:{points:["tl","bl"],overflow:Ms,offset:[0,4],targetOffset:Ls},leftBottom:{points:["br","bl"],overflow:Ds,offset:[-4,0],targetOffset:Ls}};var zs=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],Bs=function(e,n){var r=e.overlayClassName,o=e.trigger,i=void 0===o?["hover"]:o,l=e.mouseEnterDelay,c=void 0===l?0:l,s=e.mouseLeaveDelay,d=void 0===s?.1:s,u=e.overlayStyle,f=e.prefixCls,p=void 0===f?"rc-tooltip":f,h=e.children,g=e.onVisibleChange,v=e.afterVisibleChange,b=e.transitionName,y=e.animation,x=e.motion,w=e.placement,C=void 0===w?"right":w,S=e.align,E=void 0===S?{}:S,k=e.destroyTooltipOnHide,j=void 0!==k&&k,I=e.defaultVisible,T=e.getTooltipContainer,A=e.overlayInnerStyle,O=(e.arrowContent,e.overlay),N=e.id,R=e.showArrow,P=void 0===R||R,M=m(e,zs),D=(0,t.useRef)(null);(0,t.useImperativeHandle)(n,(function(){return D.current}));var L=oe({},M);"visible"in e&&(L.popupVisible=e.visible);return t.createElement(Ps,a({popupClassName:r,prefixCls:p,popup:function(){return t.createElement(mc,{key:"content",prefixCls:p,id:N,overlayInnerStyle:A},O)},action:i,builtinPlacements:_s,popupPlacement:C,ref:D,popupAlign:E,getPopupContainer:T,onPopupVisibleChange:g,afterPopupVisibleChange:v,popupTransitionName:b,popupAnimation:y,popupMotion:x,defaultPopupVisible:I,autoDestroy:j,mouseLeaveDelay:d,popupStyle:u,mouseEnterDelay:c,arrow:P},L),h)};const Fs=(0,t.forwardRef)(Bs);const Hs=t.createContext(void 0),Ws=100,Vs=1e3,Us={Modal:Ws,Drawer:Ws,Popover:Ws,Popconfirm:Ws,Tooltip:Ws,Tour:Ws},Ks={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function Gs(e,n){const[,r]=jo(),o=t.useContext(Hs),a=function(e){return e in Us}(e);if(void 0!==n)return[n,n];let i=null!==o&&void 0!==o?o:0;return a?(i+=(o?0:r.zIndexPopupBase)+Us[e],i=Math.min(i,r.zIndexPopupBase+Vs)):i+=Ks[e],[void 0===o?n:i,i]}const qs=()=>({height:0,opacity:0}),Xs=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},Ys=e=>({height:e?e.offsetHeight:0}),$s=(e,t)=>!0===(null===t||void 0===t?void 0:t.deadline)||"height"===t.propertyName,Js=(e,t,n)=>void 0!==n?n:"".concat(e,"-").concat(t),Qs=function(){return{motionName:"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ant","-motion-collapse"),onAppearStart:qs,onEnterStart:qs,onAppearActive:Xs,onEnterActive:Xs,onLeaveStart:Ys,onLeaveActive:qs,onAppearEnd:$s,onEnterEnd:$s,onLeaveEnd:$s,motionDeadline:500}};function Zs(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,a=o,i=1*r/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),s=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,u=s,f=2*o-i,p=l,h=2*o-0,m=a,g=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),v=r*(Math.sqrt(2)-1),b="polygon(".concat(v,"px 100%, 50% ").concat(v,"px, ").concat(2*o-v,"px 100%, ").concat(v,"px 100%)");return{arrowShadowWidth:g,arrowPath:"path('M ".concat(0," ").concat(a," A ").concat(r," ").concat(r," 0 0 0 ").concat(i," ").concat(l," L ").concat(c," ").concat(s," A ").concat(n," ").concat(n," 0 0 1 ").concat(d," ").concat(u," L ").concat(f," ").concat(p," A ").concat(r," ").concat(r," 0 0 0 ").concat(h," ").concat(m," Z')"),arrowPolygon:b}}const ed=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:a,arrowShadowWidth:i,borderRadiusXS:l,calc:c}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,a]},content:'""'},"&::after":{content:'""',position:"absolute",width:i,height:i,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:"0 0 ".concat(rn(l)," 0")},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},td=8;function nd(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?td:r}}function rd(e,t){return e?t:{}}function od(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:a,arrowOffsetHorizontal:i}=e,{arrowDistance:l=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({["".concat(r,"-arrow")]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},ed(e,t,o)),{"&:before":{background:t}})]},rd(!!c.top,{[["&-placement-top > ".concat(r,"-arrow"),"&-placement-topLeft > ".concat(r,"-arrow"),"&-placement-topRight > ".concat(r,"-arrow")].join(",")]:{bottom:l,transform:"translateY(100%) rotate(180deg)"},["&-placement-top > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},["&-placement-topLeft > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:i}},["&-placement-topRight > ".concat(r,"-arrow")]:{right:{_skip_check_:!0,value:i}}})),rd(!!c.bottom,{[["&-placement-bottom > ".concat(r,"-arrow"),"&-placement-bottomLeft > ".concat(r,"-arrow"),"&-placement-bottomRight > ".concat(r,"-arrow")].join(",")]:{top:l,transform:"translateY(-100%)"},["&-placement-bottom > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},["&-placement-bottomLeft > ".concat(r,"-arrow")]:{left:{_skip_check_:!0,value:i}},["&-placement-bottomRight > ".concat(r,"-arrow")]:{right:{_skip_check_:!0,value:i}}})),rd(!!c.left,{[["&-placement-left > ".concat(r,"-arrow"),"&-placement-leftTop > ".concat(r,"-arrow"),"&-placement-leftBottom > ".concat(r,"-arrow")].join(",")]:{right:{_skip_check_:!0,value:l},transform:"translateX(100%) rotate(90deg)"},["&-placement-left > ".concat(r,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},["&-placement-leftTop > ".concat(r,"-arrow")]:{top:a},["&-placement-leftBottom > ".concat(r,"-arrow")]:{bottom:a}})),rd(!!c.right,{[["&-placement-right > ".concat(r,"-arrow"),"&-placement-rightTop > ".concat(r,"-arrow"),"&-placement-rightBottom > ".concat(r,"-arrow")].join(",")]:{left:{_skip_check_:!0,value:l},transform:"translateX(-100%) rotate(-90deg)"},["&-placement-right > ".concat(r,"-arrow")]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},["&-placement-rightTop > ".concat(r,"-arrow")]:{top:a},["&-placement-rightBottom > ".concat(r,"-arrow")]:{bottom:a}}))}}const ad={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},id={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},ld=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function cd(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:a,visibleFirst:i}=e,l=t/2,c={};return Object.keys(ad).forEach((e=>{const s=r&&id[e]||ad[e],d=Object.assign(Object.assign({},s),{offset:[0,0],dynamicInset:!0});switch(c[e]=d,ld.has(e)&&(d.autoArrow=!1),e){case"top":case"topLeft":case"topRight":d.offset[1]=-l-o;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=l+o;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-l-o;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=l+o}const u=nd({contentRadius:a,limitVerticalRadius:!0});if(r)switch(e){case"topLeft":case"bottomLeft":d.offset[0]=-u.arrowOffsetHorizontal-l;break;case"topRight":case"bottomRight":d.offset[0]=u.arrowOffsetHorizontal+l;break;case"leftTop":case"rightTop":d.offset[1]=-u.arrowOffsetHorizontal-l;break;case"leftBottom":case"rightBottom":d.offset[1]=u.arrowOffsetHorizontal+l}d.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};const o=r&&"object"===typeof r?r:{},a={};switch(e){case"top":case"bottom":a.shiftX=2*t.arrowOffsetHorizontal+n,a.shiftY=!0,a.adjustY=!0;break;case"left":case"right":a.shiftY=2*t.arrowOffsetVertical+n,a.shiftX=!0,a.adjustX=!0}const i=Object.assign(Object.assign({},a),o);return i.shiftX||(i.adjustX=!0),i.shiftY||(i.adjustY=!0),i}(e,u,t,n),i&&(d.htmlRegion="visibleFirst")})),c}function sd(){}const dd=t.createContext({}),ud=()=>{const e=()=>{};return e.deprecated=sd,e},fd=e=>({animationDuration:e,animationFillMode:"both"}),pd=e=>({animationDuration:e,animationFillMode:"both"}),hd=function(e,t,n,r){const o=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&":"";return{["\n      ".concat(o).concat(e,"-enter,\n      ").concat(o).concat(e,"-appear\n    ")]:Object.assign(Object.assign({},fd(r)),{animationPlayState:"paused"}),["".concat(o).concat(e,"-leave")]:Object.assign(Object.assign({},pd(r)),{animationPlayState:"paused"}),["\n      ".concat(o).concat(e,"-enter").concat(e,"-enter-active,\n      ").concat(o).concat(e,"-appear").concat(e,"-appear-active\n    ")]:{animationName:t,animationPlayState:"running"},["".concat(o).concat(e,"-leave").concat(e,"-leave-active")]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},md=new Rr("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),gd=new Rr("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),vd=new Rr("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),bd=new Rr("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),yd=new Rr("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),xd=new Rr("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),wd=new Rr("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Cd=new Rr("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Sd=new Rr("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Ed=new Rr("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),kd=new Rr("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),jd=new Rr("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Id={zoom:{inKeyframes:md,outKeyframes:gd},"zoom-big":{inKeyframes:vd,outKeyframes:bd},"zoom-big-fast":{inKeyframes:vd,outKeyframes:bd},"zoom-left":{inKeyframes:wd,outKeyframes:Cd},"zoom-right":{inKeyframes:Sd,outKeyframes:Ed},"zoom-up":{inKeyframes:yd,outKeyframes:xd},"zoom-down":{inKeyframes:kd,outKeyframes:jd}},Td=(e,t)=>{const{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:o,outKeyframes:a}=Id[t];return[hd(r,o,a,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{["\n        ".concat(r,"-enter,\n        ").concat(r,"-appear\n      ")]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Ad=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Od(e,t){return Ad.reduce(((n,r)=>{const o=e["".concat(r,"1")],a=e["".concat(r,"3")],i=e["".concat(r,"6")],l=e["".concat(r,"7")];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:l}))}),{})}const Nd=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:r,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:i,controlHeight:l,boxShadowSecondary:c,paddingSM:s,paddingXS:d}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{position:"absolute",zIndex:i,display:"block",width:"max-content",maxWidth:n,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":o,["".concat(t,"-inner")]:{minWidth:l,minHeight:l,padding:"".concat(rn(e.calc(s).div(2).equal())," ").concat(rn(d)),color:r,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{["".concat(t,"-inner")]:{borderRadius:e.min(a,td)}},["".concat(t,"-content")]:{position:"relative"}}),Od(e,((e,n)=>{let{darkColor:r}=n;return{["&".concat(t,"-").concat(e)]:{["".concat(t,"-inner")]:{backgroundColor:r},["".concat(t,"-arrow")]:{"--antd-arrow-background-color":r}}}}))),{"&-rtl":{direction:"rtl"}})},od(e,"var(--antd-arrow-background-color)"),{["".concat(t,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},Rd=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},nd({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Zs(Ho(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Pd=function(e){const t=$o("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e,o=Ho(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r});return[Nd(o),Td(e,"zoom-big-fast")]}),Rd,{resetStyle:!1,injectStyle:!(arguments.length>1&&void 0!==arguments[1])||arguments[1]});return t(e)},Md=Ad.map((e=>"".concat(e,"-inverse"))),Dd=["success","processing","error","default","warning"];function Ld(e){return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?[].concat(nt(Md),nt(Ad)).includes(e):Ad.includes(e)}function _d(e,t){const n=Ld(t),r=v()({["".concat(e,"-").concat(t)]:t&&n}),o={},a={};return t&&!n&&(o.background=t,a["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:a}}const zd=e=>{const{prefixCls:n,className:r,placement:o="top",title:a,color:i,overlayInnerStyle:l}=e,{getPrefixCls:c}=t.useContext(at),s=c("tooltip",n),[d,u,f]=Pd(s),p=_d(s,i),h=p.arrowStyle,m=Object.assign(Object.assign({},l),p.overlayStyle),g=v()(u,f,s,"".concat(s,"-pure"),"".concat(s,"-placement-").concat(o),r,p.className);return d(t.createElement("div",{className:g,style:h},t.createElement("div",{className:"".concat(s,"-arrow")}),t.createElement(mc,Object.assign({},e,{className:u,prefixCls:s,overlayInnerStyle:m}),a)))};var Bd=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Fd=t.forwardRef(((e,n)=>{var r,o;const{prefixCls:a,openClassName:i,getTooltipContainer:l,overlayClassName:c,color:s,overlayInnerStyle:d,children:u,afterOpenChange:f,afterVisibleChange:p,destroyTooltipOnHide:h,arrow:m=!0,title:g,overlay:b,builtinPlacements:y,arrowPointAtCenter:x=!1,autoAdjustOverflow:w=!0}=e,C=!!m,[,S]=jo(),{getPopupContainer:E,getPrefixCls:k,direction:j}=t.useContext(at),I=ud("Tooltip"),T=t.useRef(null),A=()=>{var e;null===(e=T.current)||void 0===e||e.forceAlign()};t.useImperativeHandle(n,(()=>({forceAlign:A,forcePopupAlign:()=>{I.deprecated(!1,"forcePopupAlign","forceAlign"),A()}})));const[O,N]=_r(!1,{value:null!==(r=e.open)&&void 0!==r?r:e.visible,defaultValue:null!==(o=e.defaultOpen)&&void 0!==o?o:e.defaultVisible}),R=!g&&!b&&0!==g,P=t.useMemo((()=>{var e,t;let n=x;return"object"===typeof m&&(n=null!==(t=null!==(e=m.pointAtCenter)&&void 0!==e?e:m.arrowPointAtCenter)&&void 0!==t?t:x),y||cd({arrowPointAtCenter:n,autoAdjustOverflow:w,arrowWidth:C?S.sizePopupArrow:0,borderRadius:S.borderRadius,offset:S.marginXXS,visibleFirst:!0})}),[x,m,y,S]),M=t.useMemo((()=>0===g?g:b||g||""),[b,g]),D=t.createElement(rl,null,"function"===typeof M?M():M),{getPopupContainer:L,placement:_="top",mouseEnterDelay:z=.1,mouseLeaveDelay:B=.1,overlayStyle:F,rootClassName:H}=e,W=Bd(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),V=k("tooltip",a),U=k(),K=e["data-popover-inject"];let G=O;"open"in e||"visible"in e||!R||(G=!1);const q=ua(u)&&!fa(u)?u:t.createElement("span",null,u),X=q.props,Y=X.className&&"string"!==typeof X.className?X.className:v()(X.className,i||"".concat(V,"-open")),[$,J,Q]=Pd(V,!K),Z=_d(V,s),ee=Z.arrowStyle,te=Object.assign(Object.assign({},d),Z.overlayStyle),ne=v()(c,{["".concat(V,"-rtl")]:"rtl"===j},Z.className,H,J,Q),[re,oe]=Gs("Tooltip",W.zIndex),ae=t.createElement(Fs,Object.assign({},W,{zIndex:re,showArrow:C,placement:_,mouseEnterDelay:z,mouseLeaveDelay:B,prefixCls:V,overlayClassName:ne,overlayStyle:Object.assign(Object.assign({},ee),F),getTooltipContainer:L||l||E,ref:T,builtinPlacements:P,overlay:D,visible:G,onVisibleChange:t=>{var n,r;N(!R&&t),R||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},afterVisibleChange:null!==f&&void 0!==f?f:p,overlayInnerStyle:te,arrowContent:t.createElement("span",{className:"".concat(V,"-arrow-content")}),motion:{motionName:Js(U,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!h}),G?ha(q,{className:Y}):q);return $(t.createElement(Hs.Provider,{value:oe},ae))}));Fd._InternalPanelDoNotUseOrYouWillBeFired=zd;const Hd=Fd;var Wd={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Wd.F1&&t<=Wd.F12)return!1;switch(t){case Wd.ALT:case Wd.CAPS_LOCK:case Wd.CONTEXT_MENU:case Wd.CTRL:case Wd.DOWN:case Wd.END:case Wd.ESC:case Wd.HOME:case Wd.INSERT:case Wd.LEFT:case Wd.MAC_FF_META:case Wd.META:case Wd.NUMLOCK:case Wd.NUM_CENTER:case Wd.PAGE_DOWN:case Wd.PAGE_UP:case Wd.PAUSE:case Wd.PRINT_SCREEN:case Wd.RIGHT:case Wd.SHIFT:case Wd.UP:case Wd.WIN_KEY:case Wd.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Wd.ZERO&&e<=Wd.NINE)return!0;if(e>=Wd.NUM_ZERO&&e<=Wd.NUM_MULTIPLY)return!0;if(e>=Wd.A&&e<=Wd.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Wd.SPACE:case Wd.QUESTION_MARK:case Wd.NUM_PLUS:case Wd.NUM_MINUS:case Wd.NUM_PERIOD:case Wd.NUM_DIVISION:case Wd.SEMICOLON:case Wd.DASH:case Wd.EQUALS:case Wd.COMMA:case Wd.PERIOD:case Wd.SLASH:case Wd.APOSTROPHE:case Wd.SINGLE_QUOTE:case Wd.OPEN_SQUARE_BRACKET:case Wd.BACKSLASH:case Wd.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const Vd=Wd;var Ud=Vd.ESC,Kd=Vd.TAB;const Gd=(0,t.forwardRef)((function(e,n){var r=e.overlay,o=e.arrow,a=e.prefixCls,i=(0,t.useMemo)((function(){return"function"===typeof r?r():r}),[r]),l=Br(n,null===i||void 0===i?void 0:i.ref);return t.createElement(t.Fragment,null,o&&t.createElement("div",{className:"".concat(a,"-arrow")}),t.cloneElement(i,{ref:Hr(i)?l:void 0}))}));var qd={adjustX:1,adjustY:1},Xd=[0,0];const Yd={topLeft:{points:["bl","tl"],overflow:qd,offset:[0,-4],targetOffset:Xd},top:{points:["bc","tc"],overflow:qd,offset:[0,-4],targetOffset:Xd},topRight:{points:["br","tr"],overflow:qd,offset:[0,-4],targetOffset:Xd},bottomLeft:{points:["tl","bl"],overflow:qd,offset:[0,4],targetOffset:Xd},bottom:{points:["tc","bc"],overflow:qd,offset:[0,4],targetOffset:Xd},bottomRight:{points:["tr","br"],overflow:qd,offset:[0,4],targetOffset:Xd}};var $d=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Jd(e,n){var r,o=e.arrow,i=void 0!==o&&o,l=e.prefixCls,c=void 0===l?"rc-dropdown":l,s=e.transitionName,d=e.animation,f=e.align,p=e.placement,g=void 0===p?"bottomLeft":p,b=e.placements,y=void 0===b?Yd:b,x=e.getPopupContainer,w=e.showAction,C=e.hideAction,S=e.overlayClassName,E=e.overlayStyle,k=e.visible,j=e.trigger,I=void 0===j?["hover"]:j,T=e.autoFocus,A=e.overlay,O=e.children,N=e.onVisibleChange,R=m(e,$d),P=u(t.useState(),2),M=P[0],D=P[1],L="visible"in e?k:M,_=t.useRef(null),z=t.useRef(null),B=t.useRef(null);t.useImperativeHandle(n,(function(){return _.current}));var F=function(e){D(e),null===N||void 0===N||N(e)};!function(e){var n=e.visible,r=e.triggerRef,o=e.onVisibleChange,a=e.autoFocus,i=e.overlayRef,l=t.useRef(!1),c=function(){var e,t;n&&(null===(e=r.current)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e),null===o||void 0===o||o(!1))},s=function(){var e;return!(null===(e=i.current)||void 0===e||!e.focus)&&(i.current.focus(),l.current=!0,!0)},d=function(e){switch(e.keyCode){case Ud:c();break;case Kd:var t=!1;l.current||(t=s()),t?e.preventDefault():c()}};t.useEffect((function(){return n?(window.addEventListener("keydown",d),a&&Sa(s,3),function(){window.removeEventListener("keydown",d),l.current=!1}):function(){l.current=!1}}),[n])}({visible:L,triggerRef:B,onVisibleChange:F,autoFocus:T,overlayRef:z});var H=function(){return t.createElement(Gd,{ref:z,overlay:A,prefixCls:c,arrow:i})},W=t.cloneElement(O,{className:v()(null===(r=O.props)||void 0===r?void 0:r.className,L&&function(){var t=e.openClassName;return void 0!==t?t:"".concat(c,"-open")}()),ref:Hr(O)?Br(B,O.ref):void 0}),V=C;return V||-1===I.indexOf("contextMenu")||(V=["click"]),t.createElement(Ps,a({builtinPlacements:y},R,{prefixCls:c,ref:_,popupClassName:v()(S,h({},"".concat(c,"-show-arrow"),i)),popupStyle:E,action:I,showAction:w,hideAction:V,popupPlacement:g,popupAlign:f,popupTransitionName:s,popupAnimation:d,popupVisible:L,stretch:function(){var t=e.minOverlayWidthMatchTrigger,n=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?t:!n}()?"minWidth":"",popup:"function"===typeof A?H:H(),onPopupVisibleChange:F,onPopupClick:function(t){var n=e.onOverlayClick;D(!1),n&&n(t)},getPopupContainer:x}),W)}const Qd=t.forwardRef(Jd),Zd=(0,t.createContext)(void 0);const eu={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};const tu={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},nu={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ru={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},tu),timePickerLocale:Object.assign({},nu)},ou="${label} is not a valid ${type}",au={locale:"en",Pagination:eu,DatePicker:ru,TimePicker:nu,Calendar:ru,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ou,method:ou,array:ou,object:ou,number:ou,date:ou,boolean:ou,integer:ou,float:ou,regexp:ou,email:ou,url:ou,hex:ou},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty"}};let iu=Object.assign({},au.Modal),lu=[];const cu=()=>lu.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),au.Modal);function su(){return iu}const du=(0,t.createContext)(void 0);const uu=e=>{const{locale:n={},children:r,_ANT_MARK__:o}=e;t.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return lu.push(t),iu=cu(),()=>{lu=lu.filter((e=>e!==t)),iu=cu()}}iu=Object.assign({},au.Modal)}(n&&n.Modal);return e}),[n]);const a=t.useMemo((()=>Object.assign(Object.assign({},n),{exist:!0})),[n]);return t.createElement(du.Provider,{value:a},r)},fu="-ant-".concat(Date.now(),"-").concat(Math.random());function pu(e,t){const n=function(e,t){const n={},r=(e,t)=>{let n=e.clone();return n=(null===t||void 0===t?void 0:t(n))||n,n.toRgbString()},o=(e,t)=>{const o=new ao(e),a=J(o.toRgbString());n["".concat(t,"-color")]=r(o),n["".concat(t,"-color-disabled")]=a[1],n["".concat(t,"-color-hover")]=a[4],n["".concat(t,"-color-active")]=a[6],n["".concat(t,"-color-outline")]=o.clone().setAlpha(.2).toRgbString(),n["".concat(t,"-color-deprecated-bg")]=a[0],n["".concat(t,"-color-deprecated-border")]=a[2]};if(t.primaryColor){o(t.primaryColor,"primary");const e=new ao(t.primaryColor),a=J(e.toRgbString());a.forEach(((e,t)=>{n["primary-".concat(t+1)]=e})),n["primary-color-deprecated-l-35"]=r(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=r(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=r(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=r(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=r(e,(e=>e.setAlpha(.12*e.getAlpha())));const i=new ao(a[0]);n["primary-color-active-deprecated-f-30"]=r(i,(e=>e.setAlpha(.3*e.getAlpha()))),n["primary-color-active-deprecated-d-02"]=r(i,(e=>e.darken(2)))}t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info");const a=Object.keys(n).map((t=>"--".concat(e,"-").concat(t,": ").concat(n[t],";")));return"\n  :root {\n    ".concat(a.join("\n"),"\n  }\n  ").trim()}(e,t);ae()&&ve(n,"".concat(fu,"-dynamic-theme"))}const hu=function(){return{componentDisabled:(0,t.useContext)(Ki),componentSize:(0,t.useContext)(Xi)}},mu=Object.assign({},r),{useId:gu}=mu,vu="undefined"===typeof gu?()=>"":gu;function bu(e){const{children:n}=e,[,r]=jo(),{motion:o}=r,a=t.useRef(!1);return a.current=a.current||!1===o,a.current?t.createElement(Oa,{motion:o},n):n}const yu=()=>null;var xu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const wu=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Cu,Su,Eu,ku;function ju(){return Cu||"ant"}function Iu(){return Su||ot}const Tu=()=>({getPrefixCls:(e,t)=>t||(e?"".concat(ju(),"-").concat(e):ju()),getIconPrefixCls:Iu,getRootPrefixCls:()=>Cu||ju(),getTheme:()=>Eu,holderRender:ku}),Au=e=>{const{children:n,csp:r,autoInsertSpaceInButton:o,alert:a,anchor:i,form:l,locale:c,componentSize:s,direction:d,space:u,virtual:f,dropdownMatchSelectWidth:p,popupMatchSelectWidth:h,popupOverflow:m,legacyLocale:g,parentContext:v,iconPrefixCls:b,theme:y,componentDisabled:x,segmented:w,statistic:C,spin:S,calendar:E,carousel:k,cascader:j,collapse:I,typography:T,checkbox:A,descriptions:O,divider:N,drawer:R,skeleton:P,steps:M,image:D,layout:L,list:_,mentions:z,modal:B,progress:F,result:H,slider:W,breadcrumb:V,menu:U,pagination:K,input:G,empty:q,badge:X,radio:Y,rate:$,switch:J,transfer:Q,avatar:Z,message:ee,tag:te,table:re,card:oe,tabs:ae,timeline:ie,timePicker:le,upload:ce,notification:se,tree:de,colorPicker:ue,datePicker:fe,rangePicker:pe,flex:he,wave:me,dropdown:ge,warning:ve,tour:be}=e,ye=t.useCallback(((t,n)=>{const{prefixCls:r}=e;if(n)return n;const o=r||v.getPrefixCls("");return t?"".concat(o,"-").concat(t):o}),[v.getPrefixCls,e.prefixCls]),xe=b||v.iconPrefixCls||ot,we=r||v.csp;Ko(xe,we);const Ce=function(e,t){var n;ud("ConfigProvider");const r=e||{},o=!1!==r.inherit&&t?t:Object.assign(Object.assign({},mo),{hashed:null!==(n=null===t||void 0===t?void 0:t.hashed)&&void 0!==n?n:mo.hashed,cssVar:null===t||void 0===t?void 0:t.cssVar}),a=vu();return It((()=>{var n,i;if(!e)return t;const l=Object.assign({},o.components);Object.keys(e.components||{}).forEach((t=>{l[t]=Object.assign(Object.assign({},l[t]),e.components[t])}));const c="css-var-".concat(a.replace(/:/g,"")),s=(null!==(n=r.cssVar)&&void 0!==n?n:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:"ant"},"object"===typeof o.cssVar?o.cssVar:{}),"object"===typeof r.cssVar?r.cssVar:{}),{key:"object"===typeof r.cssVar&&(null===(i=r.cssVar)||void 0===i?void 0:i.key)||c});return Object.assign(Object.assign(Object.assign({},o),r),{token:Object.assign(Object.assign({},o.token),r.token),components:l,cssVar:s})}),[r,o],((e,t)=>e.some(((e,n)=>{const r=t[n];return!Tt(e,r,!0)}))))}(y,v.theme);const Se={csp:we,autoInsertSpaceInButton:o,alert:a,anchor:i,locale:c||g,direction:d,space:u,virtual:f,popupMatchSelectWidth:null!==h&&void 0!==h?h:p,popupOverflow:m,getPrefixCls:ye,iconPrefixCls:xe,theme:Ce,segmented:w,statistic:C,spin:S,calendar:E,carousel:k,cascader:j,collapse:I,typography:T,checkbox:A,descriptions:O,divider:N,drawer:R,skeleton:P,steps:M,image:D,input:G,layout:L,list:_,mentions:z,modal:B,progress:F,result:H,slider:W,breadcrumb:V,menu:U,pagination:K,empty:q,badge:X,radio:Y,rate:$,switch:J,transfer:Q,avatar:Z,message:ee,tag:te,table:re,card:oe,tabs:ae,timeline:ie,timePicker:le,upload:ce,notification:se,tree:de,colorPicker:ue,datePicker:fe,rangePicker:pe,flex:he,wave:me,dropdown:ge,warning:ve,tour:be},Ee=Object.assign({},v);Object.keys(Se).forEach((e=>{void 0!==Se[e]&&(Ee[e]=Se[e])})),wu.forEach((t=>{const n=e[t];n&&(Ee[t]=n)}));const ke=It((()=>Ee),Ee,((e,t)=>{const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((n=>e[n]!==t[n]))})),je=t.useMemo((()=>({prefixCls:xe,csp:we})),[xe,we]);let Ie=t.createElement(t.Fragment,null,t.createElement(yu,{dropdownMatchSelectWidth:p}),n);const Te=t.useMemo((()=>{var e,t,n,r;return Xr((null===(e=au.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=ke.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=ke.form)||void 0===r?void 0:r.validateMessages)||{},(null===l||void 0===l?void 0:l.validateMessages)||{})}),[ke,null===l||void 0===l?void 0:l.validateMessages]);Object.keys(Te).length>0&&(Ie=t.createElement(Zd.Provider,{value:Te},Ie)),c&&(Ie=t.createElement(uu,{locale:c,_ANT_MARK__:"internalMark"},Ie)),(xe||we)&&(Ie=t.createElement(ne.Provider,{value:je},Ie)),s&&(Ie=t.createElement(qi,{size:s},Ie)),Ie=t.createElement(bu,null,Ie);const Ae=t.useMemo((()=>{const e=Ce||{},{algorithm:t,token:n,components:r,cssVar:o}=e,a=xu(e,["algorithm","token","components","cssVar"]),i=t&&(!Array.isArray(t)||t.length>0)?Gt(t):ho,l={};Object.entries(r||{}).forEach((e=>{let[t,n]=e;const r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=i:(Array.isArray(r.algorithm)||"function"===typeof r.algorithm)&&(r.theme=Gt(r.algorithm)),delete r.algorithm),l[t]=r}));const c=Object.assign(Object.assign({},oo),n);return Object.assign(Object.assign({},a),{theme:i,token:c,components:l,override:Object.assign({override:c},l),cssVar:o})}),[Ce]);return y&&(Ie=t.createElement(go.Provider,{value:Ae},Ie)),ke.warning&&(Ie=t.createElement(dd.Provider,{value:ke.warning},Ie)),void 0!==x&&(Ie=t.createElement(Ui,{disabled:x},Ie)),t.createElement(at.Provider,{value:ke},Ie)},Ou=e=>{const n=t.useContext(at),r=t.useContext(du);return t.createElement(Au,Object.assign({parentContext:n,legacyLocale:r},e))};Ou.ConfigContext=at,Ou.SizeContext=Xi,Ou.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;void 0!==t&&(Cu=t),void 0!==n&&(Su=n),"holderRender"in e&&(ku=o),r&&(!function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(r)?Eu=r:pu(ju(),r))},Ou.useConfig=hu,Object.defineProperty(Ou,"SizeContext",{get:()=>Xi});const Nu=Ou;function Ru(e){return n=>t.createElement(Nu,{theme:{token:{motion:!1,zIndexPopupBase:0}}},t.createElement(e,Object.assign({},n)))}const Pu=(e,n,r,o)=>Ru((a=>{const{prefixCls:i,style:l}=a,c=t.useRef(null),[s,d]=t.useState(0),[u,f]=t.useState(0),[p,h]=_r(!1,{value:a.open}),{getPrefixCls:m}=t.useContext(at),g=m(n||"select",i);t.useEffect((()=>{if(h(!0),"undefined"!==typeof ResizeObserver){const e=new ResizeObserver((e=>{const t=e[0].target;d(t.offsetHeight+8),f(t.offsetWidth)})),t=setInterval((()=>{var n;const o=r?".".concat(r(g)):".".concat(g,"-dropdown"),a=null===(n=c.current)||void 0===n?void 0:n.querySelector(o);a&&(clearInterval(t),e.observe(a))}),10);return()=>{clearInterval(t),e.disconnect()}}}),[]);let v=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:p,visible:p,getPopupContainer:()=>c.current});o&&(v=o(v));const b={paddingBottom:s,position:"relative",minWidth:u};return t.createElement("div",{ref:c,style:b},t.createElement(e,Object.assign({},v)))}));var Mu=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Du=void 0;function Lu(e,n){var r=e.prefixCls,o=e.invalidate,i=e.item,l=e.renderItem,c=e.responsive,s=e.responsiveDisabled,d=e.registerSize,u=e.itemKey,f=e.className,p=e.style,h=e.children,g=e.display,b=e.order,y=e.component,x=void 0===y?"div":y,w=m(e,Mu),C=c&&!g;function S(e){d(u,e)}t.useEffect((function(){return function(){S(null)}}),[]);var E,k=l&&i!==Du?l(i):h;o||(E={opacity:C?0:1,height:C?0:Du,overflowY:C?"hidden":Du,order:c?b:Du,pointerEvents:C?"none":Du,position:C?"absolute":Du});var j={};C&&(j["aria-hidden"]=!0);var I=t.createElement(x,a({className:v()(!o&&r,f),style:oe(oe({},E),p)},j,w,{ref:n}),k);return c&&(I=t.createElement(as,{onResize:function(e){S(e.offsetWidth)},disabled:s},I)),I}var _u=t.forwardRef(Lu);_u.displayName="Item";const zu=_u;function Bu(){var e=t.useRef(null);return function(t){e.current||(e.current=[],function(e){if("undefined"===typeof MessageChannel)Sa(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,Ea.unstable_batchedUpdates)((function(){e.current.forEach((function(e){e()})),e.current=null}))}))),e.current.push(t)}}function Fu(e,n){var r=u(t.useState(n),2),o=r[0],a=r[1];return[o,Mr((function(t){e((function(){a(t)}))}))]}var Hu=t.createContext(null),Wu=["component"],Vu=["className"],Uu=["className"],Ku=function(e,n){var r=t.useContext(Hu);if(!r){var o=e.component,i=void 0===o?"div":o,l=m(e,Wu);return t.createElement(i,a({},l,{ref:n}))}var c=r.className,s=m(r,Vu),d=e.className,u=m(e,Uu);return t.createElement(Hu.Provider,{value:null},t.createElement(zu,a({ref:n,className:v()(c,d)},s,u)))},Gu=t.forwardRef(Ku);Gu.displayName="RawItem";const qu=Gu;var Xu=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Yu="responsive",$u="invalidate";function Ju(e){return"+ ".concat(e.length," ...")}function Qu(e,n){var r=e.prefixCls,o=void 0===r?"rc-overflow":r,i=e.data,l=void 0===i?[]:i,c=e.renderItem,s=e.renderRawItem,d=e.itemKey,f=e.itemWidth,p=void 0===f?10:f,h=e.ssr,g=e.style,b=e.className,y=e.maxCount,x=e.renderRest,w=e.renderRawRest,C=e.suffix,S=e.component,E=void 0===S?"div":S,k=e.itemComponent,j=e.onVisibleChange,I=m(e,Xu),T="full"===h,A=Bu(),O=u(Fu(A,null),2),N=O[0],R=O[1],P=N||0,M=u(Fu(A,new Map),2),D=M[0],L=M[1],_=u(Fu(A,0),2),z=_[0],B=_[1],F=u(Fu(A,0),2),H=F[0],W=F[1],V=u(Fu(A,0),2),U=V[0],K=V[1],G=u((0,t.useState)(null),2),q=G[0],X=G[1],Y=u((0,t.useState)(null),2),$=Y[0],J=Y[1],Q=t.useMemo((function(){return null===$&&T?Number.MAX_SAFE_INTEGER:$||0}),[$,N]),Z=u((0,t.useState)(!1),2),ee=Z[0],te=Z[1],ne="".concat(o,"-item"),re=Math.max(z,H),ae=y===Yu,ie=l.length&&ae,le=y===$u,ce=ie||"number"===typeof y&&l.length>y,se=(0,t.useMemo)((function(){var e=l;return ie?e=null===N&&T?l:l.slice(0,Math.min(l.length,P/p)):"number"===typeof y&&(e=l.slice(0,y)),e}),[l,p,N,y,ie]),de=(0,t.useMemo)((function(){return ie?l.slice(Q+1):l.slice(se.length)}),[l,se,ie,Q]),ue=(0,t.useCallback)((function(e,t){var n;return"function"===typeof d?d(e):null!==(n=d&&(null===e||void 0===e?void 0:e[d]))&&void 0!==n?n:t}),[d]),fe=(0,t.useCallback)(c||function(e){return e},[c]);function pe(e,t,n){($!==e||void 0!==t&&t!==q)&&(J(e),n||(te(e<l.length-1),null===j||void 0===j||j(e)),void 0!==t&&X(t))}function he(e,t){L((function(n){var r=new Map(n);return null===t?r.delete(e):r.set(e,t),r}))}function me(e){return D.get(ue(se[e],e))}fn((function(){if(P&&"number"===typeof re&&se){var e=U,t=se.length,n=t-1;if(!t)return void pe(0,null);for(var r=0;r<t;r+=1){var o=me(r);if(T&&(o=o||0),void 0===o){pe(r-1,void 0,!0);break}if(e+=o,0===n&&e<=P||r===n-1&&e+me(n)<=P){pe(n,null);break}if(e+re>P){pe(r-1,e-o-U+H);break}}C&&me(0)+U>P&&X(null)}}),[P,D,H,U,ue,se]);var ge=ee&&!!de.length,ve={};null!==q&&ie&&(ve={position:"absolute",left:q,top:0});var be,ye={prefixCls:ne,responsive:ie,component:k,invalidate:le},xe=s?function(e,n){var r=ue(e,n);return t.createElement(Hu.Provider,{key:r,value:oe(oe({},ye),{},{order:n,item:e,itemKey:r,registerSize:he,display:n<=Q})},s(e,n))}:function(e,n){var r=ue(e,n);return t.createElement(zu,a({},ye,{order:n,key:r,item:e,renderItem:fe,itemKey:r,registerSize:he,display:n<=Q}))},we={order:ge?Q:Number.MAX_SAFE_INTEGER,className:"".concat(ne,"-rest"),registerSize:function(e,t){W(t),B(H)},display:ge};if(w)w&&(be=t.createElement(Hu.Provider,{value:oe(oe({},ye),we)},w(de)));else{var Ce=x||Ju;be=t.createElement(zu,a({},ye,we),"function"===typeof Ce?Ce(de):Ce)}var Se=t.createElement(E,a({className:v()(!le&&o,b),style:g,ref:n},I),se.map(xe),ce?be:null,C&&t.createElement(zu,a({},ye,{responsive:ae,responsiveDisabled:!ie,order:Q,className:"".concat(ne,"-suffix"),registerSize:function(e,t){K(t)},display:!0,style:ve}),C));return ae&&(Se=t.createElement(as,{onResize:function(e,t){R(t.clientWidth)},disabled:!ie},Se)),Se}var Zu=t.forwardRef(Qu);Zu.displayName="Overflow",Zu.Item=qu,Zu.RESPONSIVE=Yu,Zu.INVALIDATE=$u;const ef=Zu;var tf=t.createContext(null);function nf(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function rf(e){return nf(t.useContext(tf),e)}var of=["children","locked"],af=t.createContext(null);function lf(e){var n=e.children,r=e.locked,o=m(e,of),a=t.useContext(af),i=It((function(){return function(e,t){var n=oe({},e);return Object.keys(t).forEach((function(e){var r=t[e];void 0!==r&&(n[e]=r)})),n}(a,o)}),[a,o],(function(e,t){return!r&&(e[0]!==t[0]||!Tt(e[1],t[1],!0))}));return t.createElement(af.Provider,{value:i},n)}var cf=[],sf=t.createContext(null);function df(){return t.useContext(sf)}var uf=t.createContext(cf);function ff(e){var n=t.useContext(uf);return t.useMemo((function(){return void 0!==e?[].concat(nt(n),[e]):n}),[n,e])}var pf=t.createContext(null);const hf=t.createContext({});function mf(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(da(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),i=null;return o&&!Number.isNaN(a)?i=a:r&&null===i&&(i=0),r&&e.disabled&&(i=null),null!==i&&(i>=0||t&&i<0)}return!1}function gf(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=nt(e.querySelectorAll("*")).filter((function(e){return mf(e,t)}));return mf(e,t)&&n.unshift(e),n}var vf=Vd.LEFT,bf=Vd.RIGHT,yf=Vd.UP,xf=Vd.DOWN,wf=Vd.ENTER,Cf=Vd.ESC,Sf=Vd.HOME,Ef=Vd.END,kf=[yf,xf,vf,bf];function jf(e,t){return gf(e,!0).filter((function(e){return t.has(e)}))}function If(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var o=jf(e,t),a=o.length,i=o.findIndex((function(e){return n===e}));return r<0?-1===i?i=a-1:i-=1:r>0&&(i+=1),o[i=(i+a)%a]}var Tf=function(e,t){var n=new Set,r=new Map,o=new Map;return e.forEach((function(e){var a=document.querySelector("[data-menu-id='".concat(nf(t,e),"']"));a&&(n.add(a),o.set(a,e),r.set(e,a))})),{elements:n,key2element:r,element2key:o}};function Af(e,n,r,o,a,i,l,c,s,d){var u=t.useRef(),f=t.useRef();f.current=n;var p=function(){Sa.cancel(u.current)};return t.useEffect((function(){return function(){p()}}),[]),function(t){var m=t.which;if([].concat(kf,[wf,Cf,Sf,Ef]).includes(m)){var g=i(),v=Tf(g,o),b=v,y=b.elements,x=b.key2element,w=b.element2key,C=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(x.get(n),y),S=w.get(C),E=function(e,t,n,r){var o,a,i,l,c="prev",s="next",d="children",u="parent";if("inline"===e&&r===wf)return{inlineTrigger:!0};var f=(h(o={},yf,c),h(o,xf,s),o),p=(h(a={},vf,n?s:c),h(a,bf,n?c:s),h(a,xf,d),h(a,wf,d),a),m=(h(i={},yf,c),h(i,xf,s),h(i,wf,d),h(i,Cf,u),h(i,vf,n?d:u),h(i,bf,n?u:d),i);switch(null===(l={inline:f,horizontal:p,vertical:m,inlineSub:f,horizontalSub:m,verticalSub:m}["".concat(e).concat(t?"":"Sub")])||void 0===l?void 0:l[r]){case c:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case d:return{offset:1,sibling:!1};default:return null}}(e,1===l(S,!0).length,r,m);if(!E&&m!==Sf&&m!==Ef)return;(kf.includes(m)||[Sf,Ef].includes(m))&&t.preventDefault();var k=function(e){if(e){var t=e,n=e.querySelector("a");null!==n&&void 0!==n&&n.getAttribute("href")&&(t=n);var r=w.get(e);c(r),p(),u.current=Sa((function(){f.current===r&&t.focus()}))}};if([Sf,Ef].includes(m)||E.sibling||!C){var j,I,T=jf(j=C&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(C):a.current,y);I=m===Sf?T[0]:m===Ef?T[T.length-1]:If(j,y,C,E.offset),k(I)}else if(E.inlineTrigger)s(S);else if(E.offset>0)s(S,!0),p(),u.current=Sa((function(){v=Tf(g,o);var e=C.getAttribute("aria-controls"),t=If(document.getElementById(e),v.elements);k(t)}),5);else if(E.offset<0){var A=l(S,!0),O=A[A.length-2],N=x.get(O);s(O,!1),k(N)}}null===d||void 0===d||d(t)}}var Of="__RC_UTIL_PATH_SPLIT__",Nf=function(e){return e.join(Of)},Rf="rc-menu-more";function Pf(){var e=u(t.useState({}),2)[1],n=(0,t.useRef)(new Map),r=(0,t.useRef)(new Map),o=u(t.useState([]),2),a=o[0],i=o[1],l=(0,t.useRef)(0),c=(0,t.useRef)(!1),s=(0,t.useCallback)((function(t,o){var a=Nf(o);r.current.set(a,t),n.current.set(t,a),l.current+=1;var i,s=l.current;i=function(){s===l.current&&(c.current||e({}))},Promise.resolve().then(i)}),[]),d=(0,t.useCallback)((function(e,t){var o=Nf(t);r.current.delete(o),n.current.delete(e)}),[]),f=(0,t.useCallback)((function(e){i(e)}),[]),p=(0,t.useCallback)((function(e,t){var r=n.current.get(e)||"",o=r.split(Of);return t&&a.includes(o[0])&&o.unshift(Rf),o}),[a]),h=(0,t.useCallback)((function(e,t){return e.some((function(e){return p(e,!0).includes(t)}))}),[p]),m=(0,t.useCallback)((function(e){var t="".concat(n.current.get(e)).concat(Of),o=new Set;return nt(r.current.keys()).forEach((function(e){e.startsWith(t)&&o.add(r.current.get(e))})),o}),[]);return t.useEffect((function(){return function(){c.current=!0}}),[]),{registerPath:s,unregisterPath:d,refreshOverflowKeys:f,isSubPathKey:h,getKeyPath:p,getKeys:function(){var e=nt(n.current.keys());return a.length&&e.push(Rf),e},getSubPathKeys:m}}function Mf(e){var n=t.useRef(e);n.current=e;var r=t.useCallback((function(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return null===(e=n.current)||void 0===e?void 0:e.call.apply(e,[n].concat(r))}),[]);return e?r:void 0}var Df=Math.random().toFixed(5).toString().slice(2),Lf=0;function _f(e,n,r,o){var a=t.useContext(af),i=a.activeKey,l=a.onActive,c=a.onInactive,s={active:i===e};return n||(s.onMouseEnter=function(t){null===r||void 0===r||r({key:e,domEvent:t}),l(e)},s.onMouseLeave=function(t){null===o||void 0===o||o({key:e,domEvent:t}),c(e)}),s}function zf(e){var n=t.useContext(af),r=n.mode,o=n.rtl,a=n.inlineIndent;if("inline"!==r)return null;return o?{paddingRight:e*a}:{paddingLeft:e*a}}function Bf(e){var n,r=e.icon,o=e.props,a=e.children;return null===r||!1===r?null:("function"===typeof r?n=t.createElement(r,oe({},o)):"boolean"!==typeof r&&(n=r),n||a||null)}var Ff=["item"];function Hf(e){var t=e.item,n=m(e,Ff);return Object.defineProperty(n,"item",{get:function(){return Ie(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var Wf=["title","attribute","elementRef"],Vf=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Uf=["active"],Kf=function(e){Ro(r,e);var n=Na(r);function r(){return At(this,r),n.apply(this,arguments)}return Nt(r,[{key:"render",value:function(){var e=this.props,n=e.title,r=e.attribute,o=e.elementRef,i=rt(m(e,Wf),["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ie(!r,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),t.createElement(ef.Item,a({},r,{title:"string"===typeof n?n:void 0},i,{ref:o}))}}]),r}(t.Component),Gf=t.forwardRef((function(e,n){var r,o=e.style,i=e.className,l=e.eventKey,c=(e.warnKey,e.disabled),s=e.itemIcon,d=e.children,u=e.role,f=e.onMouseEnter,p=e.onMouseLeave,g=e.onClick,b=e.onKeyDown,y=e.onFocus,x=m(e,Vf),w=rf(l),C=t.useContext(af),S=C.prefixCls,E=C.onItemClick,k=C.disabled,j=C.overflowDisabled,I=C.itemIcon,T=C.selectedKeys,A=C.onActive,O=t.useContext(hf)._internalRenderMenuItem,N="".concat(S,"-item"),R=t.useRef(),P=t.useRef(),M=k||c,D=Fr(n,P),L=ff(l);var _=function(e){return{key:l,keyPath:nt(L).reverse(),item:R.current,domEvent:e}},z=s||I,B=_f(l,M,f,p),F=B.active,H=m(B,Uf),W=T.includes(l),V=zf(L.length),U={};"option"===e.role&&(U["aria-selected"]=W);var K=t.createElement(Kf,a({ref:R,elementRef:D,role:null===u?"none":u||"menuitem",tabIndex:c?null:-1,"data-menu-id":j&&w?null:w},x,H,U,{component:"li","aria-disabled":c,style:oe(oe({},V),o),className:v()(N,(r={},h(r,"".concat(N,"-active"),F),h(r,"".concat(N,"-selected"),W),h(r,"".concat(N,"-disabled"),M),r),i),onClick:function(e){if(!M){var t=_(e);null===g||void 0===g||g(Hf(t)),E(t)}},onKeyDown:function(e){if(null===b||void 0===b||b(e),e.which===Vd.ENTER){var t=_(e);null===g||void 0===g||g(Hf(t)),E(t)}},onFocus:function(e){A(l),null===y||void 0===y||y(e)}}),d,t.createElement(Bf,{props:oe(oe({},e),{},{isSelected:W}),icon:z}));return O&&(K=O(K,e,{selected:W})),K}));function qf(e,n){var r=e.eventKey,o=df(),i=ff(r);return t.useEffect((function(){if(o)return o.registerPath(r,i),function(){o.unregisterPath(r,i)}}),[i]),o?null:t.createElement(Gf,a({},e,{ref:n}))}const Xf=t.forwardRef(qf);var Yf=["className","children"],$f=function(e,n){var r=e.className,o=e.children,i=m(e,Yf),l=t.useContext(af),c=l.prefixCls,s=l.mode,d=l.rtl;return t.createElement("ul",a({className:v()(c,d&&"".concat(c,"-rtl"),"".concat(c,"-sub"),"".concat(c,"-").concat("inline"===s?"inline":"vertical"),r),role:"menu"},i,{"data-menu-list":!0,ref:n}),o)},Jf=t.forwardRef($f);Jf.displayName="SubMenuList";const Qf=Jf;function Zf(e,n){return st(e).map((function(e,r){if(t.isValidElement(e)){var o,a,i=e.key,l=null!==(o=null===(a=e.props)||void 0===a?void 0:a.eventKey)&&void 0!==o?o:i;(null===l||void 0===l)&&(l="tmp_key-".concat([].concat(nt(n),[r]).join("-")));var c={key:l,eventKey:l};return t.cloneElement(e,c)}return e}))}var ep={adjustX:1,adjustY:1},tp={topLeft:{points:["bl","tl"],overflow:ep},topRight:{points:["br","tr"],overflow:ep},bottomLeft:{points:["tl","bl"],overflow:ep},bottomRight:{points:["tr","br"],overflow:ep},leftTop:{points:["tr","tl"],overflow:ep},leftBottom:{points:["br","bl"],overflow:ep},rightTop:{points:["tl","tr"],overflow:ep},rightBottom:{points:["bl","br"],overflow:ep}},np={topLeft:{points:["bl","tl"],overflow:ep},topRight:{points:["br","tr"],overflow:ep},bottomLeft:{points:["tl","bl"],overflow:ep},bottomRight:{points:["tr","br"],overflow:ep},rightTop:{points:["tr","tl"],overflow:ep},rightBottom:{points:["br","bl"],overflow:ep},leftTop:{points:["tl","tr"],overflow:ep},leftBottom:{points:["bl","br"],overflow:ep}};function rp(e,t,n){return t||(n?n[e]||n.other:void 0)}var op={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ap(e){var n=e.prefixCls,r=e.visible,o=e.children,a=e.popup,i=e.popupStyle,l=e.popupClassName,c=e.popupOffset,s=e.disabled,d=e.mode,f=e.onVisibleChange,p=t.useContext(af),m=p.getPopupContainer,g=p.rtl,b=p.subMenuOpenDelay,y=p.subMenuCloseDelay,x=p.builtinPlacements,w=p.triggerSubMenuAction,C=p.forceSubMenuRender,S=p.rootClassName,E=p.motion,k=p.defaultMotions,j=u(t.useState(!1),2),I=j[0],T=j[1],A=oe(oe({},g?np:tp),x),O=op[d],N=rp(d,E,k),R=t.useRef(N);"inline"!==d&&(R.current=N);var P=oe(oe({},R.current),{},{leavedClassName:"".concat(n,"-hidden"),removeOnLeave:!1,motionAppear:!0}),M=t.useRef();return t.useEffect((function(){return M.current=Sa((function(){T(r)})),function(){Sa.cancel(M.current)}}),[r]),t.createElement(Ps,{prefixCls:n,popupClassName:v()("".concat(n,"-popup"),h({},"".concat(n,"-rtl"),g),l,S),stretch:"horizontal"===d?"minWidth":null,getPopupContainer:m,builtinPlacements:A,popupPlacement:O,popupVisible:I,popup:a,popupStyle:i,popupAlign:c&&{offset:c},action:s?[]:[w],mouseEnterDelay:b,mouseLeaveDelay:y,onPopupVisibleChange:f,forceRender:C,popupMotion:P,fresh:!0},o)}function ip(e){var n=e.id,r=e.open,o=e.keyPath,i=e.children,l="inline",c=t.useContext(af),s=c.prefixCls,d=c.forceSubMenuRender,f=c.motion,p=c.defaultMotions,h=c.mode,m=t.useRef(!1);m.current=h===l;var g=u(t.useState(!m.current),2),v=g[0],b=g[1],y=!!m.current&&r;t.useEffect((function(){m.current&&b(!1)}),[h]);var x=oe({},rp(l,f,p));o.length>1&&(x.motionAppear=!1);var w=x.onVisibleChanged;return x.onVisibleChanged=function(e){return m.current||e||b(!0),null===w||void 0===w?void 0:w(e)},v?null:t.createElement(lf,{mode:l,locked:!m.current},t.createElement(xi,a({visible:y},x,{forceRender:d,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),(function(e){var r=e.className,o=e.style;return t.createElement(Qf,{id:n,className:r,style:o},i)})))}var lp=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],cp=["active"],sp=function(e){var n,r=e.style,o=e.className,i=e.title,l=e.eventKey,c=(e.warnKey,e.disabled),s=e.internalPopupClose,d=e.children,f=e.itemIcon,p=e.expandIcon,g=e.popupClassName,b=e.popupOffset,y=e.popupStyle,x=e.onClick,w=e.onMouseEnter,C=e.onMouseLeave,S=e.onTitleClick,E=e.onTitleMouseEnter,k=e.onTitleMouseLeave,j=m(e,lp),I=rf(l),T=t.useContext(af),A=T.prefixCls,O=T.mode,N=T.openKeys,R=T.disabled,P=T.overflowDisabled,M=T.activeKey,D=T.selectedKeys,L=T.itemIcon,_=T.expandIcon,z=T.onItemClick,B=T.onOpenChange,F=T.onActive,H=t.useContext(hf)._internalRenderSubMenuItem,W=t.useContext(pf).isSubPathKey,V=ff(),U="".concat(A,"-submenu"),K=R||c,G=t.useRef(),q=t.useRef();var X=null!==f&&void 0!==f?f:L,Y=null!==p&&void 0!==p?p:_,$=N.includes(l),J=!P&&$,Q=W(D,l),Z=_f(l,K,E,k),ee=Z.active,te=m(Z,cp),ne=u(t.useState(!1),2),re=ne[0],ae=ne[1],ie=function(e){K||ae(e)},le=t.useMemo((function(){return ee||"inline"!==O&&(re||W([M],l))}),[O,ee,M,re,l,W]),ce=zf(V.length),se=Mf((function(e){null===x||void 0===x||x(Hf(e)),z(e)})),de=I&&"".concat(I,"-popup"),ue=t.createElement("div",a({role:"menuitem",style:ce,className:"".concat(U,"-title"),tabIndex:K?null:-1,ref:G,title:"string"===typeof i?i:null,"data-menu-id":P&&I?null:I,"aria-expanded":J,"aria-haspopup":!0,"aria-controls":de,"aria-disabled":K,onClick:function(e){K||(null===S||void 0===S||S({key:l,domEvent:e}),"inline"===O&&B(l,!$))},onFocus:function(){F(l)}},te),i,t.createElement(Bf,{icon:"horizontal"!==O?Y:void 0,props:oe(oe({},e),{},{isOpen:J,isSubMenu:!0})},t.createElement("i",{className:"".concat(U,"-arrow")}))),fe=t.useRef(O);if("inline"!==O&&V.length>1?fe.current="vertical":fe.current=O,!P){var pe=fe.current;ue=t.createElement(ap,{mode:pe,prefixCls:U,visible:!s&&J&&"inline"!==O,popupClassName:g,popupOffset:b,popupStyle:y,popup:t.createElement(lf,{mode:"horizontal"===pe?"vertical":pe},t.createElement(Qf,{id:de,ref:q},d)),disabled:K,onVisibleChange:function(e){"inline"!==O&&B(l,e)}},ue)}var he=t.createElement(ef.Item,a({role:"none"},j,{component:"li",style:r,className:v()(U,"".concat(U,"-").concat(O),o,(n={},h(n,"".concat(U,"-open"),J),h(n,"".concat(U,"-active"),le),h(n,"".concat(U,"-selected"),Q),h(n,"".concat(U,"-disabled"),K),n)),onMouseEnter:function(e){ie(!0),null===w||void 0===w||w({key:l,domEvent:e})},onMouseLeave:function(e){ie(!1),null===C||void 0===C||C({key:l,domEvent:e})}}),ue,!P&&t.createElement(ip,{id:de,open:J,keyPath:V},d));return H&&(he=H(he,e,{selected:Q,active:le,open:J,disabled:K})),t.createElement(lf,{onItemClick:se,mode:"horizontal"===O?"vertical":O,itemIcon:X,expandIcon:Y},he)};function dp(e){var n,r=e.eventKey,o=e.children,a=ff(r),i=Zf(o,a),l=df();return t.useEffect((function(){if(l)return l.registerPath(r,a),function(){l.unregisterPath(r,a)}}),[a]),n=l?i:t.createElement(sp,e,i),t.createElement(uf.Provider,{value:a},n)}var up=["className","title","eventKey","children"],fp=["children"],pp=function(e){var n=e.className,r=e.title,o=(e.eventKey,e.children),i=m(e,up),l=t.useContext(af).prefixCls,c="".concat(l,"-item-group");return t.createElement("li",a({role:"presentation"},i,{onClick:function(e){return e.stopPropagation()},className:v()(c,n)}),t.createElement("div",{role:"presentation",className:"".concat(c,"-title"),title:"string"===typeof r?r:void 0},r),t.createElement("ul",{role:"group",className:"".concat(c,"-list")},o))};function hp(e){var n=e.children,r=m(e,fp),o=Zf(n,ff(r.eventKey));return df()?o:t.createElement(pp,rt(r,["warnKey"]),o)}function mp(e){var n=e.className,r=e.style,o=t.useContext(af).prefixCls;return df()?null:t.createElement("li",{role:"separator",className:v()("".concat(o,"-item-divider"),n),style:r})}var gp=["label","children","key","type"];function vp(e){return(e||[]).map((function(e,n){if(e&&"object"===f(e)){var r=e,o=r.label,i=r.children,l=r.key,c=r.type,s=m(r,gp),d=null!==l&&void 0!==l?l:"tmp-".concat(n);return i||"group"===c?"group"===c?t.createElement(hp,a({key:d},s,{title:o}),vp(i)):t.createElement(dp,a({key:d},s,{title:o}),vp(i)):"divider"===c?t.createElement(mp,a({key:d},s)):t.createElement(Xf,a({key:d},s),o)}return null})).filter((function(e){return e}))}function bp(e,t,n){var r=e;return t&&(r=vp(t)),Zf(r,n)}var yp=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],xp=[],wp=t.forwardRef((function(e,n){var r,o,i=e,l=i.prefixCls,c=void 0===l?"rc-menu":l,s=i.rootClassName,d=i.style,f=i.className,p=i.tabIndex,g=void 0===p?0:p,b=i.items,y=i.children,x=i.direction,w=i.id,C=i.mode,S=void 0===C?"vertical":C,E=i.inlineCollapsed,k=i.disabled,j=i.disabledOverflow,I=i.subMenuOpenDelay,T=void 0===I?.1:I,A=i.subMenuCloseDelay,O=void 0===A?.1:A,N=i.forceSubMenuRender,R=i.defaultOpenKeys,P=i.openKeys,M=i.activeKey,D=i.defaultActiveFirst,L=i.selectable,_=void 0===L||L,z=i.multiple,B=void 0!==z&&z,F=i.defaultSelectedKeys,H=i.selectedKeys,W=i.onSelect,V=i.onDeselect,U=i.inlineIndent,K=void 0===U?24:U,G=i.motion,q=i.defaultMotions,X=i.triggerSubMenuAction,Y=void 0===X?"hover":X,$=i.builtinPlacements,J=i.itemIcon,Q=i.expandIcon,Z=i.overflowedIndicator,ee=void 0===Z?"...":Z,te=i.overflowedIndicatorPopupClassName,ne=i.getPopupContainer,re=i.onClick,ae=i.onOpenChange,ie=i.onKeyDown,le=(i.openAnimation,i.openTransitionName,i._internalRenderMenuItem),ce=i._internalRenderSubMenuItem,se=m(i,yp),de=t.useMemo((function(){return bp(y,b,xp)}),[y,b]),ue=u(t.useState(!1),2),fe=ue[0],pe=ue[1],he=t.useRef(),me=function(e){var n=u(_r(e,{value:e}),2),r=n[0],o=n[1];return t.useEffect((function(){Lf+=1;var e="".concat(Df,"-").concat(Lf);o("rc-menu-uuid-".concat(e))}),[]),r}(w),ge="rtl"===x;var ve=_r(R,{value:P,postState:function(e){return e||xp}}),be=u(ve,2),ye=be[0],xe=be[1],we=function(e){function t(){xe(e),null===ae||void 0===ae||ae(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,Ea.flushSync)(t):t()},Ce=u(t.useState(ye),2),Se=Ce[0],Ee=Ce[1],ke=t.useRef(!1),je=u(t.useMemo((function(){return"inline"!==S&&"vertical"!==S||!E?[S,!1]:["vertical",E]}),[S,E]),2),Ie=je[0],Te=je[1],Ae="inline"===Ie,Oe=u(t.useState(Ie),2),Ne=Oe[0],Re=Oe[1],Pe=u(t.useState(Te),2),Me=Pe[0],De=Pe[1];t.useEffect((function(){Re(Ie),De(Te),ke.current&&(Ae?xe(Se):we(xp))}),[Ie,Te]);var Le=u(t.useState(0),2),_e=Le[0],ze=Le[1],Be=_e>=de.length-1||"horizontal"!==Ne||j;t.useEffect((function(){Ae&&Ee(ye)}),[ye]),t.useEffect((function(){return ke.current=!0,function(){ke.current=!1}}),[]);var Fe=Pf(),He=Fe.registerPath,We=Fe.unregisterPath,Ve=Fe.refreshOverflowKeys,Ue=Fe.isSubPathKey,Ke=Fe.getKeyPath,Ge=Fe.getKeys,qe=Fe.getSubPathKeys,Xe=t.useMemo((function(){return{registerPath:He,unregisterPath:We}}),[He,We]),Ye=t.useMemo((function(){return{isSubPathKey:Ue}}),[Ue]);t.useEffect((function(){Ve(Be?xp:de.slice(_e+1).map((function(e){return e.key})))}),[_e,Be]);var $e=u(_r(M||D&&(null===(r=de[0])||void 0===r?void 0:r.key),{value:M}),2),Je=$e[0],Qe=$e[1],Ze=Mf((function(e){Qe(e)})),et=Mf((function(){Qe(void 0)}));(0,t.useImperativeHandle)(n,(function(){return{list:he.current,focus:function(e){var t,n,r=Ge(),o=Tf(r,me),a=o.elements,i=o.key2element,l=o.element2key,c=jf(he.current,a),s=null!==Je&&void 0!==Je?Je:c[0]?l.get(c[0]):null===(t=de.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key,d=i.get(s);s&&d&&(null===d||void 0===d||null===(n=d.focus)||void 0===n||n.call(d,e))}}}));var tt=_r(F||[],{value:H,postState:function(e){return Array.isArray(e)?e:null===e||void 0===e?xp:[e]}}),rt=u(tt,2),ot=rt[0],at=rt[1],it=Mf((function(e){null===re||void 0===re||re(Hf(e)),function(e){if(_){var t,n=e.key,r=ot.includes(n);t=B?r?ot.filter((function(e){return e!==n})):[].concat(nt(ot),[n]):[n],at(t);var o=oe(oe({},e),{},{selectedKeys:t});r?null===V||void 0===V||V(o):null===W||void 0===W||W(o)}!B&&ye.length&&"inline"!==Ne&&we(xp)}(e)})),lt=Mf((function(e,t){var n=ye.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==Ne){var r=qe(e);n=n.filter((function(e){return!r.has(e)}))}Tt(ye,n,!0)||we(n,!0)})),ct=Af(Ne,Je,ge,me,he,Ge,Ke,Qe,(function(e,t){var n=null!==t&&void 0!==t?t:!ye.includes(e);lt(e,n)}),ie);t.useEffect((function(){pe(!0)}),[]);var st=t.useMemo((function(){return{_internalRenderMenuItem:le,_internalRenderSubMenuItem:ce}}),[le,ce]),dt="horizontal"!==Ne||j?de:de.map((function(e,n){return t.createElement(lf,{key:e.key,overflowDisabled:n>_e},e)})),ut=t.createElement(ef,a({id:w,ref:he,prefixCls:"".concat(c,"-overflow"),component:"ul",itemComponent:Xf,className:v()(c,"".concat(c,"-root"),"".concat(c,"-").concat(Ne),f,(o={},h(o,"".concat(c,"-inline-collapsed"),Me),h(o,"".concat(c,"-rtl"),ge),o),s),dir:x,style:d,role:"menu",tabIndex:g,data:dt,renderRawItem:function(e){return e},renderRawRest:function(e){var n=e.length,r=n?de.slice(-n):null;return t.createElement(dp,{eventKey:Rf,title:ee,disabled:Be,internalPopupClose:0===n,popupClassName:te},r)},maxCount:"horizontal"!==Ne||j?ef.INVALIDATE:ef.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){ze(e)},onKeyDown:ct},se));return t.createElement(hf.Provider,{value:st},t.createElement(tf.Provider,{value:me},t.createElement(lf,{prefixCls:c,rootClassName:s,mode:Ne,openKeys:ye,rtl:ge,disabled:k,motion:fe?G:null,defaultMotions:fe?q:null,activeKey:Je,onActive:Ze,onInactive:et,selectedKeys:ot,inlineIndent:K,subMenuOpenDelay:T,subMenuCloseDelay:O,forceSubMenuRender:N,builtinPlacements:$,triggerSubMenuAction:Y,getPopupContainer:ne,itemIcon:J,expandIcon:Q,onItemClick:it,onOpenChange:lt},t.createElement(pf.Provider,{value:Ye},ut),t.createElement("div",{style:{display:"none"},"aria-hidden":!0},t.createElement(sf.Provider,{value:Xe},de)))))}));var Cp=wp;Cp.Item=Xf,Cp.SubMenu=dp,Cp.ItemGroup=hp,Cp.Divider=mp;const Sp=Cp;const Ep={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var kp=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Ep}))};const jp=t.forwardRef(kp);var Ip=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Tp=e=>{const{prefixCls:n,className:r,dashed:o}=e,a=Ip(e,["prefixCls","className","dashed"]),{getPrefixCls:i}=t.useContext(at),l=i("menu",n),c=v()({["".concat(l,"-item-divider-dashed")]:!!o},r);return t.createElement(mp,Object.assign({className:c},a))},Ap=(0,t.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),Op=e=>{var n;const{className:r,children:o,icon:a,title:i,danger:l}=e,{prefixCls:c,firstLevel:s,direction:d,disableMenuItemTitleTooltip:u,inlineCollapsed:f}=t.useContext(Ap),{siderCollapsed:p}=t.useContext(Ct);let h=i;"undefined"===typeof i?h=s?o:"":!1===i&&(h="");const m={title:h};p||f||(m.title=null,m.open=!1);const g=st(o).length;let b=t.createElement(Xf,Object.assign({},rt(e,["title","icon","danger"]),{className:v()({["".concat(c,"-item-danger")]:l,["".concat(c,"-item-only-child")]:1===(a?g+1:g)},r),title:"string"===typeof i?i:void 0}),ha(a,{className:v()(ua(a)?null===(n=a.props)||void 0===n?void 0:n.className:"","".concat(c,"-item-icon"))}),(e=>{const n=t.createElement("span",{className:"".concat(c,"-title-content")},o);return(!a||ua(o)&&"span"===o.type)&&o&&e&&s&&"string"===typeof o?t.createElement("div",{className:"".concat(c,"-inline-collapsed-noicon")},o.charAt(0)):n})(f));return u||(b=t.createElement(Hd,Object.assign({},m,{placement:"rtl"===d?"left":"right",overlayClassName:"".concat(c,"-inline-collapsed-tooltip")}),b)),b},Np=e=>{var n;const{popupClassName:r,icon:o,title:a,theme:i}=e,l=t.useContext(Ap),{prefixCls:c,inlineCollapsed:s,theme:d}=l,u=ff();let f;if(o){const e=ua(a)&&"span"===a.type;f=t.createElement(t.Fragment,null,ha(o,{className:v()(ua(o)?null===(n=o.props)||void 0===n?void 0:n.className:"","".concat(c,"-item-icon"))}),e?a:t.createElement("span",{className:"".concat(c,"-title-content")},a))}else f=s&&!u.length&&a&&"string"===typeof a?t.createElement("div",{className:"".concat(c,"-inline-collapsed-noicon")},a.charAt(0)):t.createElement("span",{className:"".concat(c,"-title-content")},a);const p=t.useMemo((()=>Object.assign(Object.assign({},l),{firstLevel:!1})),[l]),[h]=Gs("Menu");return t.createElement(Ap.Provider,{value:p},t.createElement(dp,Object.assign({},rt(e,["icon"]),{title:f,popupClassName:v()(c,r,"".concat(c,"-").concat(i||d)),popupStyle:{zIndex:h}})))};var Rp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Pp(e){return(e||[]).map(((e,n)=>{if(e&&"object"===typeof e){const r=e,{label:o,children:a,key:i,type:l}=r,c=Rp(r,["label","children","key","type"]),s=null!==i&&void 0!==i?i:"tmp-".concat(n);return a||"group"===l?"group"===l?t.createElement(hp,Object.assign({key:s},c,{title:o}),Pp(a)):t.createElement(Np,Object.assign({key:s},c,{title:o}),Pp(a)):"divider"===l?t.createElement(Tp,Object.assign({key:s},c)):t.createElement(Op,Object.assign({key:s},c),o)}return null})).filter((e=>e))}function Mp(e){return t.useMemo((()=>e?Pp(e):e),[e])}var Dp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Lp=t.createContext(null),_p=t.forwardRef(((e,n)=>{const{children:r}=e,o=Dp(e,["children"]),a=t.useContext(Lp),i=t.useMemo((()=>Object.assign(Object.assign({},a),o)),[a,o.prefixCls,o.mode,o.selectable,o.rootClassName]),l=function(e){return!!(0,t.isValidElement)(e)&&!(0,ct.isFragment)(e)&&Hr(e)}(r),c=Fr(n,l?r.ref:null);return t.createElement(Lp.Provider,{value:i},t.createElement(rl,null,l?t.cloneElement(r,{ref:c}):r))})),zp=Lp,Bp=e=>({[e.componentCls]:{["".concat(e.antCls,"-motion-collapse-legacy")]:{overflow:"hidden","&-active":{transition:"height ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut,",\n        opacity ").concat(e.motionDurationMid," ").concat(e.motionEaseInOut," !important")}},["".concat(e.antCls,"-motion-collapse")]:{overflow:"hidden",transition:"height ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut,",\n        opacity ").concat(e.motionDurationMid," ").concat(e.motionEaseInOut," !important")}}}),Fp=new Rr("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Hp=new Rr("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Wp=new Rr("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Vp=new Rr("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Up=new Rr("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Kp=new Rr("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Gp=new Rr("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),qp=new Rr("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Xp={"slide-up":{inKeyframes:Fp,outKeyframes:Hp},"slide-down":{inKeyframes:Wp,outKeyframes:Vp},"slide-left":{inKeyframes:Up,outKeyframes:Kp},"slide-right":{inKeyframes:Gp,outKeyframes:qp}},Yp=(e,t)=>{const{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:o,outKeyframes:a}=Xp[t];return[hd(r,o,a,e.motionDurationMid),{["\n      ".concat(r,"-enter,\n      ").concat(r,"-appear\n    ")]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInQuint}}]},$p=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:a,lineType:i,itemPaddingInline:l}=e;return{["".concat(t,"-horizontal")]:{lineHeight:r,border:0,borderBottom:"".concat(rn(a)," ").concat(i," ").concat(o),boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},["".concat(t,"-item, ").concat(t,"-submenu")]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},["> ".concat(t,"-item:hover,\n        > ").concat(t,"-item-active,\n        > ").concat(t,"-submenu ").concat(t,"-submenu-title:hover")]:{backgroundColor:"transparent"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{transition:["border-color ".concat(n),"background ".concat(n)].join(",")},["".concat(t,"-submenu-arrow")]:{display:"none"}}}},Jp=e=>{let{componentCls:t,menuArrowOffset:n,calc:r}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-submenu-rtl")]:{transformOrigin:"100% 0"},["".concat(t,"-rtl").concat(t,"-vertical,\n    ").concat(t,"-submenu-rtl ").concat(t,"-vertical")]:{["".concat(t,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateY(".concat(rn(r(n).mul(-1).equal()),")")},"&::after":{transform:"rotate(45deg) translateY(".concat(rn(n),")")}}}}},Qp=e=>Object.assign({},Zr(e)),Zp=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,groupTitleColor:a,itemBg:i,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:s,activeBarWidth:d,activeBarBorderWidth:u,motionDurationSlow:f,motionEaseInOut:p,motionEaseOut:h,itemPaddingInline:m,motionDurationMid:g,itemHoverColor:v,lineType:b,colorSplit:y,itemDisabledColor:x,dangerItemColor:w,dangerItemHoverColor:C,dangerItemSelectedColor:S,dangerItemActiveBg:E,dangerItemSelectedBg:k,popupBg:j,itemHoverBg:I,itemActiveBg:T,menuSubMenuBg:A,horizontalItemSelectedColor:O,horizontalItemSelectedBg:N,horizontalItemBorderRadius:R,horizontalItemHoverBg:P}=e;return{["".concat(n,"-").concat(t,", ").concat(n,"-").concat(t," > ").concat(n)]:{color:r,background:i,["&".concat(n,"-root:focus-visible")]:Object.assign({},Qp(e)),["".concat(n,"-item-group-title")]:{color:a},["".concat(n,"-submenu-selected")]:{["> ".concat(n,"-submenu-title")]:{color:o}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:{color:r,["&:not(".concat(n,"-item-disabled):focus-visible")]:Object.assign({},Qp(e))},["".concat(n,"-item-disabled, ").concat(n,"-submenu-disabled")]:{color:"".concat(x," !important")},["".concat(n,"-item:not(").concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{["&:hover, > ".concat(n,"-submenu-title:hover")]:{color:v}},["&:not(".concat(n,"-horizontal)")]:{["".concat(n,"-item:not(").concat(n,"-item-selected)")]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}},["".concat(n,"-submenu-title")]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}}},["".concat(n,"-item-danger")]:{color:w,["&".concat(n,"-item:hover")]:{["&:not(".concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{color:C}},["&".concat(n,"-item:active")]:{background:E}},["".concat(n,"-item a")]:{"&, &:hover":{color:"inherit"}},["".concat(n,"-item-selected")]:{color:o,["&".concat(n,"-item-danger")]:{color:S},"a, a:hover":{color:"inherit"}},["& ".concat(n,"-item-selected")]:{backgroundColor:c,["&".concat(n,"-item-danger")]:{backgroundColor:k}},["&".concat(n,"-submenu > ").concat(n)]:{backgroundColor:A},["&".concat(n,"-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-submenu-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-horizontal")]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{["> ".concat(n,"-item, > ").concat(n,"-submenu")]:{top:u,marginTop:e.calc(u).mul(-1).equal(),marginBottom:0,borderRadius:R,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:"".concat(rn(s)," solid transparent"),transition:"border-color ".concat(f," ").concat(p),content:'""'},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:s,borderBottomColor:O}},"&-selected":{color:O,backgroundColor:N,"&:hover":{backgroundColor:N},"&::after":{borderBottomWidth:s,borderBottomColor:O}}}}),["&".concat(n,"-root")]:{["&".concat(n,"-inline, &").concat(n,"-vertical")]:{borderInlineEnd:"".concat(rn(u)," ").concat(b," ").concat(y)}},["&".concat(n,"-inline")]:{["".concat(n,"-sub").concat(n,"-inline")]:{background:l},["".concat(n,"-item")]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:"".concat(rn(d)," solid ").concat(o),transform:"scaleY(0.0001)",opacity:0,transition:["transform ".concat(g," ").concat(h),"opacity ".concat(g," ").concat(h)].join(","),content:'""'},["&".concat(n,"-item-danger")]:{"&::after":{borderInlineEndColor:S}}},["".concat(n,"-selected, ").concat(n,"-item-selected")]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform ".concat(g," ").concat(p),"opacity ".concat(g," ").concat(p)].join(",")}}}}}},eh=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:a,marginXS:i,itemMarginBlock:l,itemWidth:c}=e,s=e.calc(a).add(o).add(i).equal();return{["".concat(t,"-item")]:{position:"relative",overflow:"hidden"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{height:n,lineHeight:rn(n),paddingInline:o,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:l,width:c},["> ".concat(t,"-item,\n            > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{height:n,lineHeight:rn(n)},["".concat(t,"-item-group-list ").concat(t,"-submenu-title,\n            ").concat(t,"-submenu-title")]:{paddingInlineEnd:s}}},th=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:i,motionDurationMid:l,motionEaseOut:c,paddingXL:s,itemMarginInline:d,fontSizeLG:u,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:h,collapsedWidth:m,collapsedIconSize:g}=e,v={height:r,lineHeight:rn(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({["&".concat(t,"-root")]:{boxShadow:"none"}},eh(e))},["".concat(t,"-submenu-popup")]:{["".concat(t,"-vertical")]:Object.assign(Object.assign({},eh(e)),{boxShadow:h})}},{["".concat(t,"-submenu-popup ").concat(t,"-vertical").concat(t,"-sub")]:{minWidth:a,maxHeight:"calc(100vh - ".concat(rn(e.calc(i).mul(2.5).equal()),")"),padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{["".concat(t,"-inline")]:{width:"100%",["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{display:"flex",alignItems:"center",transition:["border-color ".concat(f),"background ".concat(f),"padding ".concat(l," ").concat(c)].join(","),["> ".concat(t,"-title-content")]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},["".concat(t,"-sub").concat(t,"-inline")]:{padding:0,border:0,borderRadius:0,boxShadow:"none",["& > ".concat(t,"-submenu > ").concat(t,"-submenu-title")]:v,["& ".concat(t,"-item-group-title")]:{paddingInlineStart:s}},["".concat(t,"-item")]:v}},{["".concat(t,"-inline-collapsed")]:{width:m,["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu ").concat(t,"-submenu-title")]:{["> ".concat(t,"-inline-collapsed-noicon")]:{fontSize:u,textAlign:"center"}}},["> ".concat(t,"-item,\n          > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-item,\n          > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-submenu > ").concat(t,"-submenu-title,\n          > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{insetInlineStart:0,paddingInline:"calc(50% - ".concat(rn(e.calc(u).div(2).equal())," - ").concat(rn(d),")"),textOverflow:"clip",["\n            ".concat(t,"-submenu-arrow,\n            ").concat(t,"-submenu-expand-icon\n          ")]:{opacity:0},["".concat(t,"-item-icon, ").concat(n)]:{margin:0,fontSize:g,lineHeight:rn(r),"+ span":{display:"inline-block",opacity:0}}},["".concat(t,"-item-icon, ").concat(n)]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",["".concat(t,"-item-icon, ").concat(n)]:{display:"none"},"a, a:hover":{color:o}},["".concat(t,"-item-group-title")]:Object.assign(Object.assign({},Yr),{paddingInline:p})}}]},nh=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:a,iconCls:i,iconSize:l,iconMarginInlineEnd:c}=e;return{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:["border-color ".concat(n),"background ".concat(n),"padding ".concat(n," ").concat(o)].join(","),["".concat(t,"-item-icon, ").concat(i)]:{minWidth:l,fontSize:l,transition:["font-size ".concat(r," ").concat(a),"margin ".concat(n," ").concat(o),"color ".concat(n)].join(","),"+ span":{marginInlineStart:c,opacity:1,transition:["opacity ".concat(n," ").concat(o),"margin ".concat(n),"color ".concat(n)].join(",")}},["".concat(t,"-item-icon")]:Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),["&".concat(t,"-item-only-child")]:{["> ".concat(i,", > ").concat(t,"-item-icon")]:{marginInlineEnd:0}}},["".concat(t,"-item-disabled, ").concat(t,"-submenu-disabled")]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},["> ".concat(t,"-submenu-title")]:{color:"inherit !important",cursor:"not-allowed"}}}},rh=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:a,menuArrowOffset:i}=e;return{["".concat(t,"-submenu")]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:"transform ".concat(n," ").concat(r,", opacity ").concat(n)},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background ".concat(n," ").concat(r),"transform ".concat(n," ").concat(r),"top ".concat(n," ").concat(r),"color ".concat(n," ").concat(r)].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(".concat(rn(e.calc(i).mul(-1).equal()),")")},"&::after":{transform:"rotate(-45deg) translateY(".concat(rn(i),")")}}}}},oh=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:i,paddingXS:l,padding:c,colorSplit:s,lineWidth:d,zIndexPopup:u,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:h,menuArrowOffset:m,lineType:g,groupTitleLineHeight:v,groupTitleFontSize:b}=e;return[{"":{["".concat(n)]:Object.assign(Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"&-hidden":{display:"none"}})},["".concat(n,"-submenu-hidden")]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:"width ".concat(o," cubic-bezier(0.2, 0, 0, 1) 0s"),"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",["".concat(n,"-item")]:{flex:"none"}},["".concat(n,"-item, ").concat(n,"-submenu, ").concat(n,"-submenu-title")]:{borderRadius:e.itemBorderRadius},["".concat(n,"-item-group-title")]:{padding:"".concat(rn(l)," ").concat(rn(c)),fontSize:b,lineHeight:v,transition:"all ".concat(o)},["&-horizontal ".concat(n,"-submenu")]:{transition:["border-color ".concat(o," ").concat(i),"background ".concat(o," ").concat(i)].join(",")},["".concat(n,"-submenu, ").concat(n,"-submenu-inline")]:{transition:["border-color ".concat(o," ").concat(i),"background ".concat(o," ").concat(i),"padding ".concat(a," ").concat(i)].join(",")},["".concat(n,"-submenu ").concat(n,"-sub")]:{cursor:"initial",transition:["background ".concat(o," ").concat(i),"padding ".concat(o," ").concat(i)].join(",")},["".concat(n,"-title-content")]:{transition:"color ".concat(o),["> ".concat(t,"-typography-ellipsis-single-line")]:{display:"inline",verticalAlign:"unset"}},["".concat(n,"-item a")]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},["".concat(n,"-item-divider")]:{overflow:"hidden",lineHeight:0,borderColor:s,borderStyle:g,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}}}),nh(e)),{["".concat(n,"-item-group")]:{["".concat(n,"-item-group-list")]:{margin:0,padding:0,["".concat(n,"-item, ").concat(n,"-submenu-title")]:{paddingInline:"".concat(rn(e.calc(r).mul(2).equal())," ").concat(rn(c))}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",["&".concat(n,"-submenu")]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},["> ".concat(n)]:Object.assign(Object.assign(Object.assign({borderRadius:f},nh(e)),rh(e)),{["".concat(n,"-item, ").concat(n,"-submenu > ").concat(n,"-submenu-title")]:{borderRadius:p},["".concat(n,"-submenu-title::after")]:{transition:"transform ".concat(o," ").concat(i)}})},"\n          &-placement-leftTop,\n          &-placement-bottomRight,\n          ":{transformOrigin:"100% 0"},"\n          &-placement-leftBottom,\n          &-placement-topRight,\n          ":{transformOrigin:"100% 100%"},"\n          &-placement-rightBottom,\n          &-placement-topLeft,\n          ":{transformOrigin:"0 100%"},"\n          &-placement-bottomLeft,\n          &-placement-rightTop,\n          ":{transformOrigin:"0 0"},"\n          &-placement-leftTop,\n          &-placement-leftBottom\n          ":{paddingInlineEnd:e.paddingXS},"\n          &-placement-rightTop,\n          &-placement-rightBottom\n          ":{paddingInlineStart:e.paddingXS},"\n          &-placement-topRight,\n          &-placement-topLeft\n          ":{paddingBottom:e.paddingXS},"\n          &-placement-bottomRight,\n          &-placement-bottomLeft\n          ":{paddingTop:e.paddingXS}}}),rh(e)),{["&-inline-collapsed ".concat(n,"-submenu-arrow,\n        &-inline ").concat(n,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateX(".concat(rn(m),")")},"&::after":{transform:"rotate(45deg) translateX(".concat(rn(e.calc(m).mul(-1).equal()),")")}},["".concat(n,"-submenu-open").concat(n,"-submenu-inline > ").concat(n,"-submenu-title > ").concat(n,"-submenu-arrow")]:{transform:"translateY(".concat(rn(e.calc(h).mul(.2).mul(-1).equal()),")"),"&::after":{transform:"rotate(-45deg) translateX(".concat(rn(e.calc(m).mul(-1).equal()),")")},"&::before":{transform:"rotate(45deg) translateX(".concat(rn(m),")")}}})},{["".concat(t,"-layout-header")]:{[n]:{lineHeight:"inherit"}}}]},ah=e=>{var t,n,r;const{colorPrimary:o,colorError:a,colorTextDisabled:i,colorErrorBg:l,colorText:c,colorTextDescription:s,colorBgContainer:d,colorFillAlter:u,colorFillContent:f,lineWidth:p,lineWidthBold:h,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:v,lineHeight:b,colorBgElevated:y,marginXXS:x,padding:w,fontSize:C,controlHeightSM:S,fontSizeLG:E,colorTextLightSolid:k,colorErrorHover:j}=e,I=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,T=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,A=null!==(r=e.itemMarginInline)&&void 0!==r?r:e.marginXXS,O=new ao(k).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:c,itemColor:c,colorItemTextHover:c,itemHoverColor:c,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:o,itemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:d,itemBg:d,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:m,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:I,colorActiveBarHeight:h,activeBarHeight:h,colorActiveBarBorderSize:p,activeBarBorderWidth:T,colorItemTextDisabled:i,itemDisabledColor:i,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:A,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:b,collapsedWidth:2*v,popupBg:y,itemMarginBlock:x,itemPaddingInline:w,horizontalLineHeight:"".concat(1.15*v,"px"),iconSize:C,iconMarginInlineEnd:S-C,collapsedIconSize:E,groupTitleFontSize:C,darkItemDisabledColor:new ao(k).setAlpha(.25).toRgbString(),darkItemColor:O,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:k,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:O,darkItemHoverColor:k,darkDangerItemHoverColor:j,darkDangerItemSelectedColor:k,darkDangerItemActiveBg:a,itemWidth:I?"calc(100% + ".concat(T,"px)"):"calc(100% - ".concat(2*A,"px)")}},ih=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=$o("Menu",(e=>{const{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:o,darkDangerItemColor:a,darkItemBg:i,darkSubMenuItemBg:l,darkItemSelectedColor:c,darkItemSelectedBg:s,darkDangerItemSelectedBg:d,darkItemHoverBg:u,darkGroupTitleColor:f,darkItemHoverColor:p,darkItemDisabledColor:h,darkDangerItemHoverColor:m,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:v,popupBg:b,darkPopupBg:y}=e,x=e.calc(r).div(7).mul(5).equal(),w=Ho(e,{menuArrowSize:x,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(x).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:b}),C=Ho(w,{itemColor:o,itemHoverColor:p,groupTitleColor:f,itemSelectedColor:c,itemBg:i,popupBg:y,subMenuItemBg:l,itemActiveBg:"transparent",itemSelectedBg:s,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:u,itemDisabledColor:h,dangerItemColor:a,dangerItemHoverColor:m,dangerItemSelectedColor:g,dangerItemActiveBg:v,dangerItemSelectedBg:d,menuSubMenuBg:l,horizontalItemSelectedColor:c,horizontalItemSelectedBg:s});return[oh(w),$p(w),th(w),Zp(w,"light"),Zp(C,"dark"),Jp(w),Bp(w),Yp(w,"slide-up"),Yp(w,"slide-down"),Td(w,"zoom-big")]}),ah,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:!(arguments.length>2&&void 0!==arguments[2])||arguments[2],unitless:{groupTitleLineHeight:!0}});return n(e,t)},lh=e=>{const[,,,,t]=jo();return t?"".concat(e,"-css-var"):""};var ch=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const sh=(0,t.forwardRef)(((e,n)=>{var r,o;const a=t.useContext(zp),i=a||{},{getPrefixCls:l,getPopupContainer:c,direction:s,menu:d}=t.useContext(at),u=l(),{prefixCls:f,className:p,style:h,theme:m="light",expandIcon:g,_internalDisableMenuItemTitleTooltip:b,inlineCollapsed:y,siderCollapsed:x,items:w,children:C,rootClassName:S,mode:E,selectable:k,onClick:j,overflowedIndicatorPopupClassName:I}=e,T=rt(ch(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),["collapsedWidth"]),A=Mp(w)||C;null===(r=i.validator)||void 0===r||r.call(i,{mode:E});const O=Mr((function(){var e;null===j||void 0===j||j.apply(void 0,arguments),null===(e=i.onClick)||void 0===e||e.call(i)})),N=i.mode||E,R=null!==k&&void 0!==k?k:i.selectable,P=t.useMemo((()=>void 0!==x?x:y),[y,x]),M={horizontal:{motionName:"".concat(u,"-slide-up")},inline:Qs(u),other:{motionName:"".concat(u,"-zoom-big")}},D=l("menu",f||i.prefixCls),L=lh(D),[_,z,B]=ih(D,L,!a),F=v()("".concat(D,"-").concat(m),null===d||void 0===d?void 0:d.className,p);let H;if("function"===typeof g)H=g;else if(null===g||!1===g)H=null;else if(null===i.expandIcon||!1===i.expandIcon)H=null;else{const e=null!==g&&void 0!==g?g:i.expandIcon;H=ha(e,{className:v()("".concat(D,"-submenu-expand-icon"),ua(e)?null===(o=e.props)||void 0===o?void 0:o.className:"")})}const W=t.useMemo((()=>({prefixCls:D,inlineCollapsed:P||!1,direction:s,firstLevel:!0,theme:m,mode:N,disableMenuItemTitleTooltip:b})),[D,P,s,b,m]);return _(t.createElement(zp.Provider,{value:null},t.createElement(Ap.Provider,{value:W},t.createElement(Sp,Object.assign({getPopupContainer:c,overflowedIndicator:t.createElement(jp,null),overflowedIndicatorPopupClassName:v()(D,"".concat(D,"-").concat(m),I),mode:N,selectable:R,onClick:O},T,{inlineCollapsed:P,style:Object.assign(Object.assign({},null===d||void 0===d?void 0:d.style),h),className:F,prefixCls:D,direction:s,defaultMotions:M,expandIcon:H,ref:n,rootClassName:v()(S,z,i.rootClassName,B,L)}),A))))})),dh=sh,uh=(0,t.forwardRef)(((e,n)=>{const r=(0,t.useRef)(null),o=t.useContext(Ct);return(0,t.useImperativeHandle)(n,(()=>({menu:r.current,focus:e=>{var t;null===(t=r.current)||void 0===t||t.focus(e)}}))),t.createElement(dh,Object.assign({ref:r},e,o))}));uh.Item=Op,uh.SubMenu=Np,uh.Divider=Tp,uh.ItemGroup=hp;const fh=uh,ph=new Rr("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),hh=new Rr("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),mh=new Rr("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),gh=new Rr("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),vh=new Rr("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),bh=new Rr("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),yh={"move-up":{inKeyframes:new Rr("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new Rr("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:ph,outKeyframes:hh},"move-left":{inKeyframes:mh,outKeyframes:gh},"move-right":{inKeyframes:vh,outKeyframes:bh}},xh=(e,t)=>{const{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:o,outKeyframes:a}=yh[t];return[hd(r,o,a,e.motionDurationMid),{["\n        ".concat(r,"-enter,\n        ").concat(r,"-appear\n      ")]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]},wh=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,a="".concat(n,"-item");return{["".concat(t,", ").concat(t,"-menu-submenu")]:{["".concat(n," ").concat(a)]:{["&".concat(a,"-danger:not(").concat(a,"-disabled)")]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},Ch=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:a,antCls:i,iconCls:l,motionDurationMid:c,paddingBlock:s,fontSize:d,dropdownEdgeChildPadding:u,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:h,colorBgElevated:m}=e;return[{[t]:Object.assign(Object.assign({},$r(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},["&-trigger".concat(i,"-btn")]:{["& > ".concat(l,"-down, & > ").concat(i,"-btn-icon > ").concat(l,"-down")]:{fontSize:p}},["".concat(t,"-wrap")]:{position:"relative",["".concat(i,"-btn > ").concat(l,"-down")]:{fontSize:p},["".concat(l,"-down::before")]:{transition:"transform ".concat(c)}},["".concat(t,"-wrap-open")]:{["".concat(l,"-down::before")]:{transform:"rotate(180deg)"}},"\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ":{display:"none"},["&".concat(i,"-slide-down-enter").concat(i,"-slide-down-enter-active").concat(t,"-placement-bottomLeft,\n          &").concat(i,"-slide-down-appear").concat(i,"-slide-down-appear-active").concat(t,"-placement-bottomLeft,\n          &").concat(i,"-slide-down-enter").concat(i,"-slide-down-enter-active").concat(t,"-placement-bottom,\n          &").concat(i,"-slide-down-appear").concat(i,"-slide-down-appear-active").concat(t,"-placement-bottom,\n          &").concat(i,"-slide-down-enter").concat(i,"-slide-down-enter-active").concat(t,"-placement-bottomRight,\n          &").concat(i,"-slide-down-appear").concat(i,"-slide-down-appear-active").concat(t,"-placement-bottomRight")]:{animationName:Fp},["&".concat(i,"-slide-up-enter").concat(i,"-slide-up-enter-active").concat(t,"-placement-topLeft,\n          &").concat(i,"-slide-up-appear").concat(i,"-slide-up-appear-active").concat(t,"-placement-topLeft,\n          &").concat(i,"-slide-up-enter").concat(i,"-slide-up-enter-active").concat(t,"-placement-top,\n          &").concat(i,"-slide-up-appear").concat(i,"-slide-up-appear-active").concat(t,"-placement-top,\n          &").concat(i,"-slide-up-enter").concat(i,"-slide-up-enter-active").concat(t,"-placement-topRight,\n          &").concat(i,"-slide-up-appear").concat(i,"-slide-up-appear-active").concat(t,"-placement-topRight")]:{animationName:Wp},["&".concat(i,"-slide-down-leave").concat(i,"-slide-down-leave-active").concat(t,"-placement-bottomLeft,\n          &").concat(i,"-slide-down-leave").concat(i,"-slide-down-leave-active").concat(t,"-placement-bottom,\n          &").concat(i,"-slide-down-leave").concat(i,"-slide-down-leave-active").concat(t,"-placement-bottomRight")]:{animationName:Hp},["&".concat(i,"-slide-up-leave").concat(i,"-slide-up-leave-active").concat(t,"-placement-topLeft,\n          &").concat(i,"-slide-up-leave").concat(i,"-slide-up-leave-active").concat(t,"-placement-top,\n          &").concat(i,"-slide-up-leave").concat(i,"-slide-up-leave-active").concat(t,"-placement-topRight")]:{animationName:Vp}})},od(e,m,{arrowPlacement:{top:!0,bottom:!0}}),{["".concat(t," ").concat(n)]:{position:"relative",margin:0},["".concat(n,"-submenu-popup")]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},["".concat(t,", ").concat(t,"-menu-submenu")]:{[n]:Object.assign(Object.assign({padding:u,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},eo(e)),{"&:empty":{padding:0,boxShadow:"none"},["".concat(n,"-item-group-title")]:{padding:"".concat(rn(s)," ").concat(rn(h)),color:e.colorTextDescription,transition:"all ".concat(c)},["".concat(n,"-item")]:{position:"relative",display:"flex",alignItems:"center"},["".concat(n,"-item-icon")]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},["".concat(n,"-title-content")]:{flex:"auto","> a":{color:"inherit",transition:"all ".concat(c),"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:Object.assign(Object.assign({clear:"both",margin:0,padding:"".concat(rn(s)," ").concat(rn(h)),color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(c),borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},eo(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:"".concat(rn(e.marginXXS)," 0"),overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},["".concat(t,"-menu-submenu-expand-icon")]:{position:"absolute",insetInlineEnd:e.paddingXS,["".concat(t,"-menu-submenu-arrow-icon")]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:p,fontStyle:"normal"}}}),["".concat(n,"-item-group-list")]:{margin:"0 ".concat(rn(e.marginXS)),padding:0,listStyle:"none"},["".concat(n,"-submenu-title")]:{paddingInlineEnd:e.calc(h).add(e.fontSizeSM).equal()},["".concat(n,"-submenu-vertical")]:{position:"relative"},["".concat(n,"-submenu").concat(n,"-submenu-disabled ").concat(t,"-menu-submenu-title")]:{["&, ".concat(t,"-menu-submenu-arrow-icon")]:{color:f,backgroundColor:m,cursor:"not-allowed"}},["".concat(n,"-submenu-selected ").concat(t,"-menu-submenu-title")]:{color:e.colorPrimary}})}},[Yp(e,"slide-up"),Yp(e,"slide-down"),xh(e,"move-up"),xh(e,"move-down"),Td(e,"zoom-big")]]},Sh=$o("Dropdown",(e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,a=Ho(e,{menuCls:"".concat(o,"-menu"),dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Ch(a),wh(a)]}),(e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},nd({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Zs(e)))),Eh=e=>{const{menu:n,arrow:r,prefixCls:o,children:a,trigger:i,disabled:l,dropdownRender:c,getPopupContainer:s,overlayClassName:d,rootClassName:u,overlayStyle:f,open:p,onOpenChange:h,visible:m,onVisibleChange:g,mouseEnterDelay:b=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:x=!0,placement:w="",overlay:C,transitionName:S}=e,{getPopupContainer:E,getPrefixCls:k,direction:j,dropdown:I}=t.useContext(at);ud("Dropdown");const T=t.useMemo((()=>{const e=k();return void 0!==S?S:w.includes("top")?"".concat(e,"-slide-down"):"".concat(e,"-slide-up")}),[k,w,S]),A=t.useMemo((()=>w?w.includes("Center")?w.slice(0,w.indexOf("Center")):w:"rtl"===j?"bottomRight":"bottomLeft"),[w,j]);const O=k("dropdown",o),N=lh(O),[R,P,M]=Sh(O,N),[,D]=jo(),L=t.Children.only(a),_=ha(L,{className:v()("".concat(O,"-trigger"),{["".concat(O,"-rtl")]:"rtl"===j},L.props.className),disabled:l}),z=l?[]:i;let B;z&&z.includes("contextMenu")&&(B=!0);const[F,H]=_r(!1,{value:null!==p&&void 0!==p?p:m}),W=Mr((e=>{null===h||void 0===h||h(e,{source:"trigger"}),null===g||void 0===g||g(e),H(e)})),V=v()(d,u,P,M,N,null===I||void 0===I?void 0:I.className,{["".concat(O,"-rtl")]:"rtl"===j}),U=cd({arrowPointAtCenter:"object"===typeof r&&r.pointAtCenter,autoAdjustOverflow:x,offset:D.marginXXS,arrowWidth:r?D.sizePopupArrow:0,borderRadius:D.borderRadius}),K=t.useCallback((()=>{(null===n||void 0===n?void 0:n.selectable)&&(null===n||void 0===n?void 0:n.multiple)||(null===h||void 0===h||h(!1,{source:"menu"}),H(!1))}),[null===n||void 0===n?void 0:n.selectable,null===n||void 0===n?void 0:n.multiple]),[G,q]=Gs("Dropdown",null===f||void 0===f?void 0:f.zIndex);let X=t.createElement(Qd,Object.assign({alignPoint:B},rt(e,["rootClassName"]),{mouseEnterDelay:b,mouseLeaveDelay:y,visible:F,builtinPlacements:U,arrow:!!r,overlayClassName:V,prefixCls:O,getPopupContainer:s||E,transitionName:T,trigger:z,overlay:()=>{let e;return e=(null===n||void 0===n?void 0:n.items)?t.createElement(fh,Object.assign({},n)):"function"===typeof C?C():C,c&&(e=c(e)),e=t.Children.only("string"===typeof e?t.createElement("span",null,e):e),t.createElement(_p,{prefixCls:"".concat(O,"-menu"),rootClassName:v()(M,N),expandIcon:t.createElement("span",{className:"".concat(O,"-menu-submenu-arrow")},t.createElement(bt,{className:"".concat(O,"-menu-submenu-arrow-icon")})),mode:"vertical",selectable:!1,onClick:K,validator:e=>{let{mode:t}=e}},e)},placement:A,onVisibleChange:W,overlayStyle:Object.assign(Object.assign(Object.assign({},null===I||void 0===I?void 0:I.style),f),{zIndex:G})}),_);return G&&(X=t.createElement(Hs.Provider,{value:q},X)),R(X)};const kh=Pu(Eh,"dropdown",(e=>e),(function(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})}));Eh._InternalPanelDoNotUseOrYouWillBeFired=e=>t.createElement(kh,Object.assign({},e),t.createElement("span",null));const jh=Eh;var Ih=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Th=e=>{const{getPopupContainer:n,getPrefixCls:r,direction:o}=t.useContext(at),{prefixCls:a,type:i="default",danger:l,disabled:c,loading:s,onClick:d,htmlType:u,children:f,className:p,menu:h,arrow:m,autoFocus:g,overlay:b,trigger:y,align:x,open:w,onOpenChange:C,placement:S,getPopupContainer:E,href:k,icon:j=t.createElement(jp,null),title:I,buttonsRender:T=(e=>e),mouseEnterDelay:A,mouseLeaveDelay:O,overlayClassName:N,overlayStyle:R,destroyPopupOnHide:P,dropdownRender:M}=e,D=Ih(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),L=r("dropdown",a),_="".concat(L,"-button"),z={menu:h,arrow:m,autoFocus:g,align:x,disabled:c,trigger:c?[]:y,onOpenChange:C,getPopupContainer:E||n,mouseEnterDelay:A,mouseLeaveDelay:O,overlayClassName:N,overlayStyle:R,destroyPopupOnHide:P,dropdownRender:M},{compactSize:B,compactItemClassnames:F}=nl(L,o),H=v()(_,F,p);"overlay"in e&&(z.overlay=b),"open"in e&&(z.open=w),z.placement="placement"in e?S:"rtl"===o?"bottomLeft":"bottomRight";const W=t.createElement(ac,{type:i,danger:l,disabled:c,loading:s,onClick:d,htmlType:u,href:k,title:I},f),V=t.createElement(ac,{type:i,danger:l,icon:j}),[U,K]=T([W,V]);return t.createElement(hc.Compact,Object.assign({className:H,size:B,block:!0},D),U,t.createElement(jh,Object.assign({},z),K))};Th.__ANT_BUTTON=!0;const Ah=Th,Oh=jh;Oh.Button=Ah;const Nh=Oh,Rh=["xxl","xl","lg","md","sm","xs"],Ph=e=>({xs:"(max-width: ".concat(e.screenXSMax,"px)"),sm:"(min-width: ".concat(e.screenSM,"px)"),md:"(min-width: ".concat(e.screenMD,"px)"),lg:"(min-width: ".concat(e.screenLG,"px)"),xl:"(min-width: ".concat(e.screenXL,"px)"),xxl:"(min-width: ".concat(e.screenXXL,"px)")}),Mh=e=>{const t=e,n=[].concat(Rh).reverse();return n.forEach(((e,r)=>{const o=e.toUpperCase(),a="screen".concat(o,"Min"),i="screen".concat(o);if(!(t[a]<=t[i]))throw new Error("".concat(a,"<=").concat(i," fails : !(").concat(t[a],"<=").concat(t[i],")"));if(r<n.length-1){const e="screen".concat(o,"Max");if(!(t[i]<=t[e]))throw new Error("".concat(i,"<=").concat(e," fails : !(").concat(t[i],"<=").concat(t[e],")"));const a=n[r+1].toUpperCase(),l="screen".concat(a,"Min");if(!(t[e]<=t[l]))throw new Error("".concat(e,"<=").concat(l," fails : !(").concat(t[e],"<=").concat(t[l],")"))}})),e};function Dh(){const[,e]=jo(),n=Ph(Mh(e));return t.useMemo((()=>{const e=new Map;let t=-1,r={};return{matchHandlers:{},dispatch:t=>(r=t,e.forEach((e=>e(r))),e.size>=1),subscribe(n){return e.size||this.register(),t+=1,e.set(t,n),n(r),t},unsubscribe(t){e.delete(t),e.size||this.unregister()},unregister(){Object.keys(n).forEach((e=>{const t=n[e],r=this.matchHandlers[t];null===r||void 0===r||r.mql.removeListener(null===r||void 0===r?void 0:r.listener)})),e.clear()},register(){Object.keys(n).forEach((e=>{const t=n[e],o=t=>{let{matches:n}=t;this.dispatch(Object.assign(Object.assign({},r),{[e]:n}))},a=window.matchMedia(t);a.addListener(o),this.matchHandlers[t]={mql:a,listener:o},o(a)}))},responsiveMap:n}}),[e])}function Lh(){const[,e]=t.useReducer((e=>e+1),0);return e}const _h=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n=(0,t.useRef)({}),r=Lh(),o=Dh();return fn((()=>{const t=o.subscribe((t=>{n.current=t,e&&r()}));return()=>o.unsubscribe(t)}),[]),n.current},zh=t.createContext({}),Bh=e=>{const{antCls:t,componentCls:n,iconCls:r,avatarBg:o,avatarColor:a,containerSize:i,containerSizeLG:l,containerSizeSM:c,textFontSize:s,textFontSizeLG:d,textFontSizeSM:u,borderRadius:f,borderRadiusLG:p,borderRadiusSM:h,lineWidth:m,lineType:g}=e,v=(e,t,o)=>({width:e,height:e,borderRadius:"50%",["&".concat(n,"-square")]:{borderRadius:o},["&".concat(n,"-icon")]:{fontSize:t,["> ".concat(r)]:{margin:0}}});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:a,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:o,border:"".concat(rn(m)," ").concat(g," transparent"),"&-image":{background:"transparent"},["".concat(t,"-image-img")]:{display:"block"}}),v(i,s,f)),{"&-lg":Object.assign({},v(l,d,p)),"&-sm":Object.assign({},v(c,u,h)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},Fh=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:o}=e;return{["".concat(t,"-group")]:{display:"inline-flex",["".concat(t)]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},["".concat(t,"-group-popover")]:{["".concat(t," + ").concat(t)]:{marginInlineStart:o}}}},Hh=$o("Avatar",(e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=Ho(e,{avatarBg:n,avatarColor:t});return[Bh(r),Fh(r)]}),(e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:o,fontSizeLG:a,fontSizeXL:i,fontSizeHeading3:l,marginXS:c,marginXXS:s,colorBorderBg:d}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:Math.round((a+i)/2),textFontSizeLG:l,textFontSizeSM:o,groupSpace:s,groupOverlapping:-c,groupBorderColor:d}}));var Wh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Vh=(e,n)=>{const[r,o]=t.useState(1),[a,i]=t.useState(!1),[l,c]=t.useState(!0),s=t.useRef(null),d=t.useRef(null),u=Br(n,s),{getPrefixCls:f,avatar:p}=t.useContext(at),h=t.useContext(zh),m=()=>{if(!d.current||!s.current)return;const t=d.current.offsetWidth,n=s.current.offsetWidth;if(0!==t&&0!==n){const{gap:r=4}=e;2*r<n&&o(n-2*r<t?(n-2*r)/t:1)}};t.useEffect((()=>{i(!0)}),[]),t.useEffect((()=>{c(!0),o(1)}),[e.src]),t.useEffect(m,[e.gap]);const g=()=>{const{onError:t}=e;!1!==(null===t||void 0===t?void 0:t())&&c(!1)},{prefixCls:b,shape:y,size:x,src:w,srcSet:C,icon:S,className:E,rootClassName:k,alt:j,draggable:I,children:T,crossOrigin:A}=e,O=Wh(e,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","alt","draggable","children","crossOrigin"]),N=Yi((e=>{var t,n;return null!==(n=null!==(t=null!==x&&void 0!==x?x:null===h||void 0===h?void 0:h.size)&&void 0!==t?t:e)&&void 0!==n?n:"default"})),R=Object.keys("object"===typeof N&&N||{}).some((e=>["xs","sm","md","lg","xl","xxl"].includes(e))),P=_h(R),M=t.useMemo((()=>{if("object"!==typeof N)return{};const e=Rh.find((e=>P[e])),t=N[e];return t?{width:t,height:t,fontSize:t&&(S||T)?t/2:18}:{}}),[P,N]);const D=f("avatar",b),L=lh(D),[_,z,B]=Hh(D,L),F=v()({["".concat(D,"-lg")]:"large"===N,["".concat(D,"-sm")]:"small"===N}),H=t.isValidElement(w),W=y||(null===h||void 0===h?void 0:h.shape)||"circle",V=v()(D,F,null===p||void 0===p?void 0:p.className,"".concat(D,"-").concat(W),{["".concat(D,"-image")]:H||w&&l,["".concat(D,"-icon")]:!!S},B,L,E,k,z),U="number"===typeof N?{width:N,height:N,fontSize:S?N/2:18}:{};let K;if("string"===typeof w&&l)K=t.createElement("img",{src:w,draggable:I,srcSet:C,onError:g,alt:j,crossOrigin:A});else if(H)K=w;else if(S)K=S;else if(a||1!==r){const e="scale(".concat(r,")"),n={msTransform:e,WebkitTransform:e,transform:e};K=t.createElement(as,{onResize:m},t.createElement("span",{className:"".concat(D,"-string"),ref:d,style:Object.assign({},n)},T))}else K=t.createElement("span",{className:"".concat(D,"-string"),style:{opacity:0},ref:d},T);return delete O.onError,delete O.gap,_(t.createElement("span",Object.assign({},O,{style:Object.assign(Object.assign(Object.assign(Object.assign({},U),M),null===p||void 0===p?void 0:p.style),O.style),className:V,ref:u}),K))};const Uh=t.forwardRef(Vh),Kh=e=>e?"function"===typeof e?e():e:null,Gh=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:a,boxShadowSecondary:i,colorTextHeading:l,borderRadiusLG:c,zIndexPopup:s,titleMarginBottom:d,colorBgElevated:u,popoverBg:f,titleBorderBottom:p,innerContentPadding:h,titlePadding:m}=e;return[{[t]:Object.assign(Object.assign({},$r(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:s,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":u,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},["".concat(t,"-content")]:{position:"relative"},["".concat(t,"-inner")]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:c,boxShadow:i,padding:a},["".concat(t,"-title")]:{minWidth:r,marginBottom:d,color:l,fontWeight:o,borderBottom:p,padding:m},["".concat(t,"-inner-content")]:{color:n,padding:h}})},od(e,"var(--antd-arrow-background-color)"),{["".concat(t,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",["".concat(t,"-content")]:{display:"inline-block"}}}]},qh=e=>{const{componentCls:t}=e;return{[t]:Ad.map((n=>{const r=e["".concat(n,"6")];return{["&".concat(t,"-").concat(n)]:{"--antd-arrow-background-color":r,["".concat(t,"-inner")]:{backgroundColor:r},["".concat(t,"-arrow")]:{background:"transparent"}}}}))}},Xh=$o("Popover",(e=>{const{colorBgElevated:t,colorText:n}=e,r=Ho(e,{popoverBg:t,popoverColor:n});return[Gh(r),qh(r),Td(r,"zoom-big")]}),(e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:a,zIndexPopupBase:i,borderRadiusLG:l,marginXS:c,lineType:s,colorSplit:d,paddingSM:u}=e,f=n-r,p=f/2,h=f/2-t,m=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:i+30},Zs(e)),nd({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?"".concat(p,"px ").concat(m,"px ").concat(h,"px"):0,titleBorderBottom:a?"".concat(t,"px ").concat(s," ").concat(d):"none",innerContentPadding:a?"".concat(u,"px ").concat(m,"px"):0})}),{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var Yh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const $h=e=>{const{hashId:n,prefixCls:r,className:o,style:a,placement:i="top",title:l,content:c,children:s}=e;return t.createElement("div",{className:v()(n,r,"".concat(r,"-pure"),"".concat(r,"-placement-").concat(i),o),style:a},t.createElement("div",{className:"".concat(r,"-arrow")}),t.createElement(mc,Object.assign({},e,{className:n,prefixCls:r}),s||((e,n,r)=>n||r?t.createElement(t.Fragment,null,n&&t.createElement("div",{className:"".concat(e,"-title")},Kh(n)),t.createElement("div",{className:"".concat(e,"-inner-content")},Kh(r))):null)(r,l,c)))},Jh=e=>{const{prefixCls:n,className:r}=e,o=Yh(e,["prefixCls","className"]),{getPrefixCls:a}=t.useContext(at),i=a("popover",n),[l,c,s]=Xh(i);return l(t.createElement($h,Object.assign({},o,{prefixCls:i,hashId:c,className:v()(r,s)})))};var Qh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Zh=e=>{let{title:n,content:r,prefixCls:o}=e;return t.createElement(t.Fragment,null,n&&t.createElement("div",{className:"".concat(o,"-title")},Kh(n)),t.createElement("div",{className:"".concat(o,"-inner-content")},Kh(r)))},em=t.forwardRef(((e,n)=>{const{prefixCls:r,title:o,content:a,overlayClassName:i,placement:l="top",trigger:c="hover",mouseEnterDelay:s=.1,mouseLeaveDelay:d=.1,overlayStyle:u={}}=e,f=Qh(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:p}=t.useContext(at),h=p("popover",r),[m,g,b]=Xh(h),y=p(),x=v()(i,g,b);return m(t.createElement(Hd,Object.assign({placement:l,trigger:c,mouseEnterDelay:s,mouseLeaveDelay:d,overlayStyle:u},f,{prefixCls:h,overlayClassName:x,ref:n,overlay:o||a?t.createElement(Zh,{prefixCls:h,title:o,content:a}):null,transitionName:Js(y,"zoom-big",f.transitionName),"data-popover-inject":!0})))}));em._InternalPanelDoNotUseOrYouWillBeFired=Jh;const tm=em,nm=e=>{const{size:n,shape:r}=t.useContext(zh),o=t.useMemo((()=>({size:e.size||n,shape:e.shape||r})),[e.size,e.shape,n,r]);return t.createElement(zh.Provider,{value:o},e.children)},rm=e=>{const{getPrefixCls:n,direction:r}=t.useContext(at),{prefixCls:o,className:a,rootClassName:i,style:l,maxCount:c,maxStyle:s,size:d,shape:u,maxPopoverPlacement:f="top",maxPopoverTrigger:p="hover",children:h}=e,m=n("avatar",o),g="".concat(m,"-group"),b=lh(m),[y,x,w]=Hh(m,b),C=v()(g,{["".concat(g,"-rtl")]:"rtl"===r},w,b,a,i,x),S=st(h).map(((e,t)=>ha(e,{key:"avatar-key-".concat(t)}))),E=S.length;if(c&&c<E){const e=S.slice(0,c),n=S.slice(c,E);return e.push(t.createElement(tm,{key:"avatar-popover-key",content:n,trigger:p,placement:f,overlayClassName:"".concat(g,"-popover"),destroyTooltipOnHide:!0},t.createElement(Uh,{style:s},"+".concat(E-c)))),y(t.createElement(nm,{shape:u,size:d},t.createElement("div",{className:C,style:l},e)))}return y(t.createElement(nm,{shape:u,size:d},t.createElement("div",{className:C,style:l},S)))},om=Uh;om.Group=rm;const am=om;var im;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(im||(im={}));var lm=function(e){return e};var cm="beforeunload",sm="hashchange",dm="popstate";function um(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function o(){var e=gm(n.location.hash.substr(1)),t=e.pathname,o=void 0===t?"/":t,a=e.search,i=void 0===a?"":a,l=e.hash,c=void 0===l?"":l,s=r.state||{};return[s.idx,lm({pathname:o,search:i,hash:c,state:s.usr||null,key:s.key||"default"})]}var i=null;function l(){if(i)p.call(i),i=null;else{var e=im.Pop,t=o(),n=t[0],r=t[1];if(p.length){if(null!=n){var a=d-n;a&&(i={action:e,location:r,retry:function(){y(-1*a)}},y(a))}}else b(e)}}n.addEventListener(dm,l),n.addEventListener(sm,(function(){mm(o()[1])!==mm(u)&&l()}));var c=im.Pop,s=o(),d=s[0],u=s[1],f=pm(),p=pm();function h(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var r=n.location.href,o=r.indexOf("#");t=-1===o?r:r.slice(0,o)}return t}()+"#"+("string"===typeof e?e:mm(e))}function m(e,t){return void 0===t&&(t=null),lm(a({pathname:u.pathname,hash:"",search:""},"string"===typeof e?gm(e):e,{state:t,key:hm()}))}function g(e,t){return[{usr:e.state,key:e.key,idx:t},h(e)]}function v(e,t,n){return!p.length||(p.call({action:e,location:t,retry:n}),!1)}function b(e){c=e;var t=o();d=t[0],u=t[1],f.call({action:c,location:u})}function y(e){r.go(e)}null==d&&(d=0,r.replaceState(a({},r.state,{idx:d}),""));var x={get action(){return c},get location(){return u},createHref:h,push:function e(t,o){var a=im.Push,i=m(t,o);if(v(a,i,(function(){e(t,o)}))){var l=g(i,d+1),c=l[0],s=l[1];try{r.pushState(c,"",s)}catch(u){n.location.assign(s)}b(a)}},replace:function e(t,n){var o=im.Replace,a=m(t,n);if(v(o,a,(function(){e(t,n)}))){var i=g(a,d),l=i[0],c=i[1];r.replaceState(l,"",c),b(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return f.push(e)},block:function(e){var t=p.push(e);return 1===p.length&&n.addEventListener(cm,fm),function(){t(),p.length||n.removeEventListener(cm,fm)}}};return x}function fm(e){e.preventDefault(),e.returnValue=""}function pm(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function hm(){return Math.random().toString(36).substr(2,8)}function mm(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,o=void 0===r?"":r,a=e.hash,i=void 0===a?"":a;return o&&"?"!==o&&(n+="?"===o.charAt(0)?o:"?"+o),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n}function gm(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}const vm=(0,t.createContext)(null);const bm=(0,t.createContext)(null);const ym=(0,t.createContext)({outlet:null,matches:[]});function xm(e,t){if(!e)throw new Error(t)}function wm(e,t,n){void 0===n&&(n="/");let r=Mm(("string"===typeof t?gm(t):t).pathname||"/",n);if(null==r)return null;let o=Cm(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let i=0;null==a&&i<o.length;++i)a=Nm(o[i],r);return a}function Cm(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach(((e,o)=>{let a={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(a.relativePath.startsWith(r)||xm(!1),a.relativePath=a.relativePath.slice(r.length));let i=Dm([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(!0===e.index&&xm(!1),Cm(e.children,t,l,i)),(null!=e.path||e.index)&&t.push({path:i,score:Om(i,e.index),routesMeta:l})})),t}const Sm=/^:\w+$/,Em=3,km=2,jm=1,Im=10,Tm=-2,Am=e=>"*"===e;function Om(e,t){let n=e.split("/"),r=n.length;return n.some(Am)&&(r+=Tm),t&&(r+=km),n.filter((e=>!Am(e))).reduce(((e,t)=>e+(Sm.test(t)?Em:""===t?jm:Im)),r)}function Nm(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let i=0;i<n.length;++i){let e=n[i],l=i===n.length-1,c="/"===o?t:t.slice(o.length)||"/",s=Rm({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c);if(!s)return null;Object.assign(r,s.params);let d=e.route;a.push({params:r,pathname:Dm([o,s.pathname]),pathnameBase:Lm(Dm([o,s.pathnameBase])),route:d}),"/"!==s.pathnameBase&&(o=Dm([o,s.pathnameBase]))}return a}function Rm(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,((e,t)=>(r.push(t),"([^\\/]+)")));e.endsWith("*")?(r.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):o+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)";let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1),c=r.reduce(((e,t,n)=>{if("*"===t){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return e}}(l[n]||""),e}),{});return{params:c,pathname:a,pathnameBase:i,pattern:e}}function Pm(e,t,n){let r,o="string"===typeof e?gm(e):e,a=""===e||""===o.pathname?"/":o.pathname;if(null==a)r=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}r=e>=0?t[e]:"/"}let i=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?gm(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:_m(r),hash:zm(o)}}(o,r);return a&&"/"!==a&&a.endsWith("/")&&!i.pathname.endsWith("/")&&(i.pathname+="/"),i}function Mm(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const Dm=e=>e.join("/").replace(/\/\/+/g,"/"),Lm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_m=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",zm=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function Bm(e){Fm()||xm(!1);let{basename:n,navigator:r}=(0,t.useContext)(vm),{hash:o,pathname:a,search:i}=Vm(e),l=a;if("/"!==n){let t=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?gm(e).pathname:e.pathname}(e),r=null!=t&&t.endsWith("/");l="/"===a?n+(r?"/":""):Dm([n,a])}return r.createHref({pathname:l,search:i,hash:o})}function Fm(){return null!=(0,t.useContext)(bm)}function Hm(){return Fm()||xm(!1),(0,t.useContext)(bm).location}function Wm(){Fm()||xm(!1);let{basename:e,navigator:n}=(0,t.useContext)(vm),{matches:r}=(0,t.useContext)(ym),{pathname:o}=Hm(),a=JSON.stringify(r.map((e=>e.pathnameBase))),i=(0,t.useRef)(!1);(0,t.useEffect)((()=>{i.current=!0}));let l=(0,t.useCallback)((function(t,r){if(void 0===r&&(r={}),!i.current)return;if("number"===typeof t)return void n.go(t);let l=Pm(t,JSON.parse(a),o);"/"!==e&&(l.pathname=Dm([e,l.pathname])),(r.replace?n.replace:n.push)(l,r.state)}),[e,n,a,o]);return l}function Vm(e){let{matches:n}=(0,t.useContext)(ym),{pathname:r}=Hm(),o=JSON.stringify(n.map((e=>e.pathnameBase)));return(0,t.useMemo)((()=>Pm(e,JSON.parse(o),r)),[e,o,r])}function Um(e,n){return void 0===n&&(n=[]),null==e?null:e.reduceRight(((r,o,a)=>(0,t.createElement)(ym.Provider,{children:void 0!==o.route.element?o.route.element:r,value:{outlet:r,matches:n.concat(e.slice(0,a+1))}})),null)}function Km(e){let{to:n,replace:r,state:o}=e;Fm()||xm(!1);let a=Wm();return(0,t.useEffect)((()=>{a(n,{replace:r,state:o})})),null}function Gm(e){xm(!1)}function qm(e){let{basename:n="/",children:r=null,location:o,navigationType:a=im.Pop,navigator:i,static:l=!1}=e;Fm()&&xm(!1);let c=Lm(n),s=(0,t.useMemo)((()=>({basename:c,navigator:i,static:l})),[c,i,l]);"string"===typeof o&&(o=gm(o));let{pathname:d="/",search:u="",hash:f="",state:p=null,key:h="default"}=o,m=(0,t.useMemo)((()=>{let e=Mm(d,c);return null==e?null:{pathname:e,search:u,hash:f,state:p,key:h}}),[c,d,u,f,p,h]);return null==m?null:(0,t.createElement)(vm.Provider,{value:s},(0,t.createElement)(bm.Provider,{children:r,value:{location:m,navigationType:a}}))}function Xm(e){let{children:n,location:r}=e;return function(e,n){Fm()||xm(!1);let{matches:r}=(0,t.useContext)(ym),o=r[r.length-1],a=o?o.params:{},i=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let l,c=Hm();if(n){var s;let e="string"===typeof n?gm(n):n;"/"===i||(null==(s=e.pathname)?void 0:s.startsWith(i))||xm(!1),l=e}else l=c;let d=l.pathname||"/",u=wm(e,{pathname:"/"===i?d:d.slice(i.length)||"/"});return Um(u&&u.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:Dm([i,e.pathname]),pathnameBase:"/"===e.pathnameBase?i:Dm([i,e.pathnameBase])}))),r)}(Ym(n),r)}function Ym(e){let n=[];return t.Children.forEach(e,(e=>{if(!(0,t.isValidElement)(e))return;if(e.type===t.Fragment)return void n.push.apply(n,Ym(e.props.children));e.type!==Gm&&xm(!1);let r={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(r.children=Ym(e.props.children)),n.push(r)})),n}const $m={edit:"Edit",delete:"Delete",export:"Export",cancel:"Cancel",title:"Title",icon:"Icon",save:"Save",alarm:"Alarm",connection:"Connection",warning:"Warning",name:"Name",statoConn:"Connection status",pleaseSelect:"Please select",send:"Send",general:"General",network:"Network",networkSett:"Network settings",serialPort:"Ports",serialPortSett:"Ports settings",settings:"Settings",diagnostic:"Diagnostic",addresType:"Addres type",ipAddress:"IP address",plant:"Plant data",localization:"Localization",languageSettings:"Language settings",timezoneSettings:"Timezone settings",restartDevice:"Restart device",dnsPrimary:"Primary DNS",dnsSecondary:"Secondary DNS",showLog:"Show log",swUpdate:"Software update",enabled:"Enabled",disabled:"Disabled",gatewayAdd:"Gateway address",protocol:"Protocol",baudRate:"Baud rate",parity:"Parity",enable:"Enable",address:"Address",description:"Description",language:"Language",timeZone:"Timezone",user:"User",password:"Password",login:"Sign in",messageLoginFailed:"Invalid user or password",forgotPassword:"Forgot password?",localNetwork:"Local network",deviceInfo:"Device information",model:"Model",serialNumber:"Serial number",firmware:"FW version",firmwareAgent:"Agent FW version",appVersion:"WEB app. version",macAddress:"MAC address",titleAreYouSure:"Are you sure?",dataExchange:"Data Exchange",dataCache:"Data cache",readAlarm:"Reading alarms",bacnet_transparent:"BACnet router",cbus_transparent:"C-Bus gateway",statistic:"Statistics",ylc:"YLC",modbus_transparent:"Modbus gateway",numBits:"Bits",stopBit:"Stop bit",none:"None",odd:"Odd",even:"Even",port:"Port",false:"No",true:"Yes",details:"Details",ethernetPorts:"Ethernet Ports",networkMode:"Network mode",passwordChange:"Change password",forgotUser:"Forgot user?",messageCodeCheckFailed:"Error: invalid code",messageRecoveryUser:"Request of user recovery sent via mail",messageRecoveryUserFailed:"Sending user recovery request failed",messageCodeReqSent:"Request sent via mail to the entered user",messageCodeReqFailed:"Sending the request failed",newPassword:"New password",passwordRepeat:"Repeat new password",messageChangePasswordOk:"Password successfully changed",messageChangePasswordFailed:"Change password failed",messagePasswordNotMatch:"Error: passwords does not match",titleRecoveryPassword:"Password recovery",recoveryCode:"Enter code",reqCode:"Request code",service:"Service",projects:"Projects",project:"Project",titlePortForwarding:"Port Forwarding",webUpdate:"Web update",fileUpdate:"Updating from File",uploadingFile:"Uploading file...",updateInProgress:"Update in progress",wgUpdateTitle:"{0} update",restartService:"Restart Service",shutdownDevice:"Turn off Device",cloudUnsub:"Cloud unsubscribe",confirmLogout:"Do you confirm logout?",date:"Date",hours:"Hours",bkProj:"Backup project",bkAllProj:"Backup all projects",delProj:"Delete Project",restoreProj:"Restore Project",all:"All",serviceConfig:"Services configuration",ip_setting:"Ip Setting",lastSeen:"Last seen",nets:"Networks",sentPackets:"Sent packets",recvPackets:"Received packets",errPackets:"Errors",repeatPackets:"Retransmissions",type:"Type",networkCard:"Network card",updFromWeb:"Update from Web",updFromFile:"Update from File",settStatus:"Settings status",error401:"Wrong Password. Try again or click forgot password to reset it.",error500:"Server error.",installUpd:"Install update",selectFile:"Select file",fileVersion:"File version",restarting:"Device is restarting ...",isRestarted:"If the device address will not change after restarting, the page will be updated automatically.",restartWarning:"Attention! When the update is complete, your device will restart",updateFailed:"Error: software installation failed!",updateNotAvailable:"Error: update not available!",newVersionAvailable:"A new version is available:",noUpdAvailable:"No updates available",update:"Update",notAvailable:"N/A",downloadFailed:"Error: download failed!",slaveAddress:"Slave address",routerBacnetRilevati:"BACnet routers detected",size:"Size",stopWg:"Stop service",virtual_device:"Virtual Device",category:"Category",virtualAddress:"Virtual address",fisicalAddress:"Physical address",parentDevice:"Parent device",emailAddress:"Email address",configEmail:"Email configuration",sendAlarms:"Send alarms",sender:"Sender",addressee:"Addressee",addressees:"Addressees",add:"Add",alarms:"Alarms",lastRead:"Last read",lastWrite:"Last write",commStatusDiag:"Communication status diagnostics",DiagExtVar:"Diagnostics of \u201cext\u201d variables",fwVersion:"Firmware version",status:"Status",totalPackets:"Attempted communications",successPackets:"Success packets",failedPackets:"Failed packets",value:"Value",maxValidity:"Max time",setting:"Setting",udpPort:"UDP port",natEnable:"Enabling NAT",natIp:"IP address or NAT URL",natPort:"NAT port",bacnetIpsetting:"IP BACnet setting",settingBACnetMSTP:"BACnet MS/TP setting",testMail:"Email sending test",result:"Result",errorMail:"Error email sending",bus:"Bus",emr3:"Three-phase multimeters",emr1:"Single-phase multimeters",gsp:"Pulse counters",hmr:"Heat meters",exp:"Expansion modules",mbusgtw:"Gateway M-Bus",csw:"Radio probe concentrators",sensor:"Radio probes",brgc:"Radio bridge concentrators",bridge:"Bridge",co2sens:"CO2 probes",mdbsensor:"Modbus/M-Bus probes",act:"Actuators",cbusdev:"C-Bus device",optionalParam:"Optional parameters",countingType:"Counting type",multiplier:"Multiplier",uom:"Unit of measure",forceUom:"Force unit of measurement",inParamEnable:"Enable input parameterization",slopeCoeff:"Slope coefficient",csvFileName:"Name of the CSV file",numMetersConnect:"Number of connected meters",numapArtments:"Number of apartments",offset:"Offset",addNewVD:"Add new device",specificParams:"Specific parameters",warningDelDevice:"Warning, deleting the device will also delete the devices connected in it",delDeviceQuestion:"Do you want to delete the device?",descr:"Description",mult:"Multiplier",multIn:"Multiplier",uomIn:"Unit of measure",paramEnable:"Enable input parameterization",angCoeff:"Slope coefficient",filename:"Name of the CSV file",numMeters:"Number of connected meters",ip:"IP",numApartments:"Number of apartments",cumulative:"Cumulative",partial:"Partial",dontForce:"Don't force it",forceMwh:"Force MWh",forceKwh:"Force kWh",search:"Search",editDevice:"Edit device",vAddressWarning:"Virtual address already in use",fAddressWarning:"Physical address already in use",clone:"Clone",cloneDevice:"Clone device",cpuTemperature:"CPU temperature",device:"Device",never:"Never",lastComm:"Last Communication",invalid:"Invalid",error:"Error",ok:"OK",numOfCopy:"Number of copies",addSuccessfully:"Added successfully",editSuccessfully:"Modified correctly",vaAlreadyUsed:"Address already used",devDetected:"Devices detected",devFound:"Devices found",loadFile:"Load file",numOfMetersToConnect:"Number of meters to connect",scan:"Scan",auto:"Automatic",man:"Manual",devCreationMode:"Device creation mode",alertEditNotSave:"You have unsaved changes!",alertEditNotSaveQuestion:"Are you sure you want to leave this page?",qualityRxSignale:"Reception signal quality",powerTx:"Transmission power",batteryLevel:"Battery level",communication:"Communication",notyetcomm:"Communication not yet",wrongcrc:"Wrong CRC",configurationmismatch:"",voltageL1L2:"Voltage L1-L2",voltageL2L3:"Voltage L2-L3",voltageL3L1:"Voltage L3-L1",currentIntensityL:"Current intensity L{0}",cosFiL:"COS-FI L{0}",activePower3P:"Active power three-phase",reactivePower3P:"Reactive power three-phase",apparentPower3P:"Apparent power three-phase",cosFi3P:"COS-FI three-phase",activePosEnergy3P:"Active energy three-phase (+)",reactivePosEnergy3P:"Reactive energy three-phase (+)",apparentPosEnergy3P:"Apparent energy three-phase (+)",activeNegEnergy3P:"Active energy three-phase (-)",reactiveNegEnergy3P:"Reactive energy three-phase (-)",apparentNegEnergy3P:"Apparent energy three-phase (-)",activePowerL:"Active power L{0}",activePosEnergy3PT:"Active energy three-phase (+) T{0}",reactivePosEnergy3PT:"Reactive energy three-phase (+) T{0}",apparentPosEnergy3PT:"Apparent energy three-phase (+) T{0}",activeNegEnergy3PT:"Active energy three-phase (-) T{0}",reactiveNegEnergy3PT:"Reactive energy three-phase (-) T{0}",apparentNegEnergy3PT:"Apparent energy three-phase (-) T{0}",voltage:"Voltage",currentIntensity:"Current intensity",cosFi:"COS-FI",activePower:"Active power",activePosEnergy:"Active energy mono-fase (+)",reactivePosEnergy:"Reactive energy mono-fase (+)",apparentPosEnergy:"Apparent energy mono-fase (+)",activeNegEnergy:"Active energy mono-fase (-)",reactiveNegEnergy:"Reactive energy mono-fase (-)",apparentNegEnergy:"Apparent energy mono-fase (-)",activePosEnergyT:"Active energy mono-fase (+) T{0}",reactivePosEnergyT:"Reactive energy mono-fase (+) T{0}",apparentPosEnergyT:"Apparent energy mono-fase (+) T{0}",activeNegEnergyT:"Active energy mono-fase (-) T{0}",reactiveNegEnergyT:"Reactive energy mono-fase (-) T{0}",apparentNegEnergyT:"Apparent energy mono-fase (-) T{0}",totalNoOfPulses:"Total no. of pulses {0}",energyHot:"Energy (hot)",energyCold:"Energy (cold)",volume:"Volume",power:"Power",flowRate:"Flow rate",supplyTemperature:"Supply temperature",returnTemperature:"Return temperature",deltaTemperature:"Delta temperature",pressure:"Pressure",massCounter:"Mass counter",density:"Density",pulsesInput:"Pulse input {0}",meterID:"Meter ID",timeout:"Timeout",setPoint:"Set point",temperature:"Temperature {0}",digitalInput:"Digital input {0}",analogInput:"Analog input {0}",computedInput:"Computed input {0}",humidity:"Humidity",co2:"CO2",pulseCount:"Total no. of pulses {0}",version:"Version",errorDetail:"Error Detail",yes:"Yes",no:"No",infoHw:"Hardware information",input:"Input",connections:"Connections",measures:"Measures",pollingTime:"Polling time",minutes:"Minutes",hour:"Hours",restore:"Restore",backup:"Backup",updatedFile:"Updated file",errorDownloadCSV:"Error download Csv",errorDownloadExcel:"Error download Excel",stopDocker:"Stop service",restartDocker:"Restart service",graphic:"Graphic",table:"Table",containerStatus:"Service status",containerInfo:"".concat("Web Garage"," service status information"),downloadCsvWg:"Download points for ".concat("Web Garage"),rowNumber:"Row number",notFound:"Not found",newProject:"New project",overvwriteProject:"This project already exists and will be overwritten",plantDescription:"Plant description",networkAlertConfirm1:"The network mode has changed.",networkAlertConfirm2:"Proceeding with the save the system will restart",networkAlertConfirm3:"Do you want to proceed?",licenseSett:"License settings",license:"License",hisPoints:"Points that can have History",pointAux:"Points With Aux Tag",maintDue:"Maintenance Date",install:"Install",uploadLic:"Upload license file",noLicIntalled:"No license installed",frequency:"Frequency",validLic:"Valid license!",notValidLic:"Invalid license.",licExpired:"License expired on: ",diffHostId:"Different  host id.",hostIdFound:"License host id: ",invalidFile:"Invalid file.",checkMaintence:"Check the maintenance date.",now:"Now",updateDateHour:"Date & hour",custom:"Customized",ntpServer:"NTP Server",mode:"Mode",alertUpdateDateTime:"Warning, changing the date or time will reboot your device!",managePassword:"Password management",infoPassword:"The password must be at least 8 characters long and must contain at least one number and one special character",missUsername:"Warning, missing username",mandatoryPasswordReset:"Mandatory password reset",forever:"Forever active",timerInactiveWifi:"Downtime",undoEdit:"Cancel changes",attenzione:"Warning",normale:"Normal",critico:"Critical",ports:"IP ports",usingPorts:"Used IP ports",alarmReceptionServer:"Alarm reception server",serverEnable:"Server enabled",deviceNotConnected:"Device not connected",webGarage:"Web Garage",generalSettings:"General settings",ethernet:"Ethernet",server:"Server",deviceInstance:"Device instance",maxInfoFrames:"Max info frames",maxMasters:"Max masters",bacnetMSTPNetwork:"BACnet MS/TP network",bacnetIPNetwork:"BACnet IP network",climatelCloud:"Climatel Cloud",smtpSsl:"Smtp SSL",smtpSTARTTLS:"Smtp STARTTLS",smtpNoAuth:"Smtp NoAuth",csv:"CSV",host:"Host",test:"Test",webGarageSettings:"container settings",bacnetConfig:"BACnet router configuration",modbusConfig:"Modbus gateway configuration",virtualDeviceConfig:"Virtual device configuration",cbusConfig:"C-BUS gateway configuration",ylcConfig:"YLC configuration",ylcDiag:"YLC diagnostic",virtualDeviceDiag:"Virtual device diagnostic",statusSettDiag:"Settings status diagnostic",deviceDiag:"Device diagnostic",portsIPDiag:"IP ports diagnostic",bacnetDiag:"BACnet router diagnostic",dual:"Dual",dns:"DNS",gateway:"Gateway",subnetMask:"Subnet mask",lan:"LAN",wan:"WAN",dhpcEnabled:"Enabled DHCP",changeIpAlert:"Attention! By changing the IP address the page will no longer be available",latency:"Latency",utility:"Utility",wifi:"Wi-Fi",ssid:"SSID",xlsx:"XLSX",download:"Download",level:"Level",timestamp:"Timestamp",log:"Log",containerId:"Container Id",containerName:"Container Name",image:"Image",hostId:"Host Id",created:"Created",cpuUsage:"CPU usage",ramUsage:"RAM usage",memUsage:"Memory usage",action:"Action",id:"Id",modbusRTUTCP:"Modbus RTUTCP",modbusTcp:"Modbus TCP",hwVersion:"HW version",ErrorRequestAPI:"Error request API",undoClick:"Click to discard current changes and restore the saved value",wifiPasswordReset:"Change Wi-Fi password",wiFiActived:"Wi-Fi Activated",wiFiDisabled:"Wi-Fi Disabled",currentStatus:"Current status",hide:"Hide",show:"Show",oldPassword:"Old password",alertWiFiActiveTitle:"Attention, Wi-Fi Active!",alertWiFiActiveMessage:"Changing the SSID will restart the connection and you will need to reconnect",messageChangeSSIDOk:"SSID successfully changed",messageChangeSSIDFailed:"Change SSID failed",deleteDocker:"Delete Docker image",deleteDockerDetail:"Delete all Docker images",dockerImages:"Docker Images",dockerManage:"Docker Image Management",deleteDockerNotAllowed:"Default image",logFile:"Log Files",logFileManage:"Log File Management",deleteAllLogFile:"Delete all log files",deleteLogFile:"Delete Log Files",deleteLogFileNotAllowed:"Active log",active:"Active",noActive:"Not active",logStatus:"Log Status",logInfo:"Log Service Status Information",downloadAllLogFile:"Download all log files",downloadLogFile:"Download the log file",logActived:"Log Activated",logDisabled:"Log Disabled",logConfig:"Log config",logView:"View Log",lessDetrails:"Less detail",modeDetrails:"More detail",serviceNotRun:"Service not started",wifiDisconnectMsg:"Warning, if the connection is Wi-Fi, you will be disconnected from the device",continue:"Continue",advanced:"Advanced Settings",rfg:"Gas leak detectors",concentrationSensor:"Sensor {0} concentration",thresholdExcSensor:"Sensor {0} threshold exceeded",statusSensor:"Sensor {0} status",statusRele:"Relays status",valveStatus:"Valve status",setValveStatus:"Set valve status",passMinLength:"Minimum password length of 5 characters",userRequired:"Username required",passRequired:"Password required",noMailRecConfigured:"Warning! No password recovery email set!",mail_error:"Request sent via mail to the entered user!",mail_not_configured:"Password recovery email not configured",bbmdDefaultActive:"BBMD default enabled",bbmdDefaultDeActive:"BBMD default disabled",cloudSuscribe:"Cloud Service Subscription",unsuscribeCloud:"Cloud unsubscribe",security:"Security",httpsActived:"HTTPS Activated",httpsDisabled:"HTTPS Disabled",activateHttps:"Enable HTTPS",httpsConnectMsg:"Do you confirm HTTPS activation?",httpsDisconnectMsg:"Are you sure you want to disable HTTPS?",variableExchange:"Variable exchange",addBlock:"Add block",execDiagram:"Run diagram",undo:"Undo",redo:"Redo",editTitle:"Edit title",blockRename:"Rename block",newName:"New name",functions:"Functions",misc:"Misc",devices:"Devices",copy:"Copy",cut:"Cut",paste:"Paste",group:"Group",groupT:"Group",unGroup:"Ungroup",arrange:"Arrange",rename:"Rename",delNote:"Delete note",dellConnect:"Delete link",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",distributeHoriz:"Distribute horizontally",distributeVert:"Distribute vertically",variables:"Variables",constants:"Constants",constant:"Constant",pressurePa:"Druck (Pa)",pressureBar:"Druck (Bar)",pressureMbar:"Druck (mbar)",actuatorPerc:"Actuator Perc.",pureNumber:"Pure number",onOff:"ON/OFF",functionType:"Function type",varType:"Variable type",variable:"Variable",editVar:"Edit Variable",editConst:"Edit constant",editFunct:"Edit function",selectAll:"Select all",deleteAll:"Delete all",read:"Read",write:"Write",modbusTerminal:"Modbus terminal",readEvery:"Read every",once:"Once",index:"Index",functionCode:"Function code",numberOfRegisters:"Number of registers",registerAddress:"Register address",data:"Data",preset:"Preset",portConfig:"Port config",dec:"Dec",hex:"Hex",readCoils:"Read coils",readDiscreteInput:"Read discrete input",readHoldingRegisters:"Read holding registers",readInputRegisters:"Read input registers",writeSingleCoil:"Write single coil",writeSingleHoldingRegisters:"Write single holding registers",writeMultipleCoils:"Write multiple coils",writeMultipleHoldingRegisters:"Write multiple holding registers",writeData:"Write data",readData:"Read data",useSemicolonAsSeparator:'Use ";" as data separator',decodedValue:"Decoded value",decoderType:"Decoder",clear:"Clear",hideLog:"Hide Log",for:"for",connectError:"Connection error",connected:"Connected",disconnected:"Disconnected",disconnection:"Disconnection",showConfiguration:"Show registers settings",hideConfiguration:"Hide registers settings",connect:"Connect",disconnect:"Disconnect",startRead:"Start reading",stopRead:"Stop reading",inRunning:"In running",errorWriteNull:"Error: null value inserted",to:"to",alertDisconnection:"Clicking OK will disconnect you from the device.",terminator:"Terminator",mstpNodes:"MS/TP nodes",currentDevice:"Current device",deviceNotAvaible:"Device not avaible",anno:"Year",mese:"Month",giorno:"Day",minuto:"Minute",secondi:"Second",anni:"Years",mesi:"Months",giorni:"Days",minuti:"Minutes",ora:"Hour",ore:"Hours",deleteBacnetStats:"The statistics file will be deleted. Are you sure?",releStatus:"Relay state {0}",irradiancelevel:"Current irradiance level",cellTemperature:"Current cell temperature",deviceNotRespondingFor:"The device has not responded for",overMaxMaster:"Higher than Max Master",process:"Process",memoryBusy:"Memory busy",cpuFrequency:"CPU frequency",anOut:"Output {0} preset",anOutStatus:"Output value {0}",factoryDefault:"Reset to factory defaults",resetPasswordOk:"Password reset successfully",resetPasswordFailed:"Reset password failed",titleAreYouSurePasswordReset:"Are you sure you want to reset password?",actived:"Activated",inactive:"Deactivated",unreacheable:"Device unreachable/data unavailable",unknownVar:"Unknown variable or incorrect refId",noLinks:"Block not connected",vDevNotFound:"Virtual device not found or incorrect refId",extNotFound:"Ext variable not available or empty",unkown:"Unknown error",sum:"Sum",sub:"Subtraction",mul:"Multiplication",div:"Division",min:"Minimum",max:"Maximum",avg:"Average",sqrt:"Square root",other:"Other",varAlreadyExist:"Variable name already exists",descrVar:"Variable description",typeVar:"Variable type",selDevice:"Select device",selVar:"Select variable",deleteAllDiagrams:"Are you sure you want to delete all diagrams?",pause:"Pause",deleteAllVar:"Deleting the VAR OUT will delete all the connected VAR IN",duplicateVarBlock:"Duplicate variable block",ylcVarNotFound:"Check that the YLC control unit is present and that variable exchange is enabled",deleteSelected:"Delete selected",dataFlow:"Data flow",used:"used",free:"free",total:"total",overview:"Overview",cleanFs:"Clear System log",diagFs:"File System Diagnostics",diagFsSubTitle:"View disk space and quick cleanup",systemLogs:"System logs",systemLogsToolTip:"Operating system log files",home:"Application Folders",homeToolTip:"Application files and folders, log files, and container projects",system:"System Folders",systemToolTip:"System files and folders",unhookNote:"Unhook note",color:"Color",valveStatusS:"Sensor {0} - Valve status",setValveStatusS:"Sensor {0} - Set point valve status",alarmsS:"Sensor {0} - Alarm",temperatureS:"Sensor {0} - Temperature",humidityS:"Sensor {0} - Humidity",co2S:"Sensor {0} - CO2",exportVar:"Expose Variable",delExportVar:"Cancel exposure",addNewTag:"Add New Tag",copyTags:"Copy Tags",pasteTags:"Paste Tags",exposedVar:"Exposed Variable",electricity:"Electricity",energy:"Energy",percentage:"Percentage",irradiance:"Irradiance",signalPower:"Signal power",warningDelDeviceVVar:"Exposed variables from it will also be deleted.",viewExpVarList:"View list of exposed variables",expoVarList:"Exposed variables",velocity:"Speed",delAllTags:"Delete all Tags",sessionExpired:"Session expired",timeOut:"Connection timeout",serviceUnavailable:"Service Unavailable",redirect:"You will be redirected to the login page.",bacnetBMDSettings:"BACnet BBMD Settings",passwordReset:"Password reset",warningAWSCLI:"You need to install the AWS-CLI package to enable {0} to start properly",confirmPkgInstall:"Confirm package installation",pkgNotValid:"Invalid package",pkgInstalled:"Installation completed successfully",installationAborted:"Installation cancelled",maintenancePkgs:"Maintenance packages",installMaintenancePkgs:"Install maintenance packages",time:"Time",invalidCredentials:"Incorrect username or password",fwUpdate:"Firmware update",portDisabled:"Transparent",retroCompYHC:"YHC 700 Backward compatibility",infoYhcCompatibility:"By enabling backward compatibility with YHC 700, it will be possible to reach the control units connected via Ethernet based on the slave address, which must be different for each configured control unit.",wgVersion:"{0} version",finVersion:"FIN Framework version",localVersion:"Local version",thermalThrottlingActive:"Thermal throttling active: CPU frequency reduced due to overheating",underVoltageDetected:"Under voltage detected: check the power supply",serverUnable:"Unable to connect to the server"},Jm={edit:"Modifica",delete:"Elimina",export:"Esporta",cancel:"Annulla",title:"Titolo",icon:"Icona",save:"Salva",alarm:"Allarme",connection:"Connessione",warning:"Avviso",name:"Nome",statoConn:"Stato connessione",pleaseSelect:"Seleziona",send:"Invia",general:"Generali",network:"Rete",networkSett:"Impostazioni di rete",serialPort:"Porte",serialPortSett:"Impostazioni porte",settings:"Impostazioni",diagnostic:"Diagnostica",addresType:"Tipo indirizzo",ipAddress:"Indirizzo IP",plant:"Dati impianto",localization:"Localizzazione",languageSettings:"Impostazioni lingua",timezoneSettings:"Impostazioni fuso orario",restartDevice:"Riavvia dispositivo",dnsPrimary:"DNS primario",dnsSecondary:"DNS secondario",swUpdate:"Aggiornamento software",enabled:"Abilitato",disabled:"Disabilitato",gatewayAdd:"Indirizzo gateway",protocol:"Protocollo",baudRate:"Baud rate",parity:"Parit\xe0",enable:"Abilita",address:"Indirizzo",description:"Descrizione",language:"Lingua",timeZone:"Fuso orario",user:"Utente",password:"Password",login:"Accedi",messageLoginFailed:"Utente o password errati!",forgotPassword:"Password dimenticata?",localNetwork:"Rete locale",deviceInfo:"Informazioni dispositivo",model:"Modello",serialNumber:"Numero di serie",firmware:"Versione FW",firmwareAgent:"Versione FW agent",appVersion:"Versione app. WEB",macAddress:"Indirizzo MAC",titleAreYouSure:"Sei sicuro?",dataExchange:"Scambio Dati",dataCache:"Cache dati",readAlarm:"Lettura Allarmi",bacnet_transparent:"BACnet router",cbus_transparent:"C-BUS gateway",statistic:"Statistiche",ylc:"YLC",modbus_transparent:"Modbus gateway",numBits:"Numero bit",stopBit:"Bit di stop",none:"Nessuna",odd:"Dispari",even:"Pari",port:"Porta",false:"No",true:"S\xec",details:"Dettagli",ethernetPorts:"Porte Ethernet",networkMode:"Modalit\xe0 rete",passwordChange:"Cambia password",forgotUser:"Utente dimenticato?",messageCodeCheckFailed:"Attenzione: codice non valido",messageRecoveryUser:"Richiesta di recupero utente inviata via mail",messageRecoveryUserFailed:"Invio richiesta di recupero utente fallita!",messageCodeReqSent:"Richiesta inviata via mail all'utente indicato",messageCodeReqFailed:"Invio richiesta fallito!",newPassword:"Nuova password",passwordRepeat:"Ripeti nuova password",messageChangePasswordOk:"Cambio password effettuato correttamente",messageChangePasswordFailed:"Cambio password fallito",messagePasswordNotMatch:"Errore: le password sono diverse!",titleRecoveryPassword:"Recupero password",recoveryCode:"Inserisci codice",reqCode:"Richiedi codice",service:"Servizio",projects:"Progetti",project:"Progetto",titlePortForwarding:"Port Forwarding",webUpdate:"Aggiornamento da Web",fileUpdate:"Aggiornamento da File",uploadingFile:"Caricamento file in corso...",updateInProgress:"Aggiornamento in corso",wgUpdateTitle:"Aggiornamento {0}",restartService:"Riavvia Servizio",shutdownDevice:"Spegni Dispositivo",cloudUnsub:"Rimozione della registrazione al cloud",confirmLogout:"Confermi il logout?",date:"Data",hours:"Ora",bkProj:"Backup progetto",bkAllProj:"Backup tutti i progetti",delProj:"Elimina progetti",restoreProj:"Restore progetti",all:"Tutte",serviceConfig:"Configurazione servizi",ip_setting:"Impostazioni Ip",lastSeen:"Ultima visualizzazione",nets:"Reti",sentPackets:"Pacchetti inviati",recvPackets:"Pacchetti ricevuti",errPackets:"Errori",repeatPackets:"Ritrasmissioni",type:"Tipo",networkCard:"Scheda di rete",updFromWeb:"Aggiorna da Web",updFromFile:"Aggiorna da File",settStatus:"Stato impostazioni",error401:'Password sbagliata, riprova o resetta la password cliccando "Password dimenticata?".',error500:"Errore del server.",installUpd:"Installa aggiornamento",selectFile:"Seleziona file",fileVersion:"Versione file",restarting:"Riavvio del dispositivo in corso ...",isRestarted:"Se l'indirizzo del dispositivo non cambier\xe0 dopo il riavvio, la pagina verr\xe0 aggiornata automaticamente",restartWarning:"Attenzione! Al termine dell'aggiornamento il dispositivo verr\xe0 riavviato",updateFailed:"Errore: installazione software fallita!",updateNotAvailable:"Errore: aggiornamento non disponibile!",newVersionAvailable:"\xc8 disponibile una nuova versione:",noUpdAvailable:"Non ci sono aggiornamenti disponibili",update:"Aggiorna",notAvailable:"N/D",downloadFailed:"Errore: download file fallito!",slaveAddress:"Indirizzo slave",routerBacnetRilevati:"Router BACnet rilevati",size:"Dimensione",stopWg:"Stop servizio",virtual_device:"Virtual device",category:"Categoria",virtualAddress:"Indirizzo virtuale",fisicalAddress:"Indirizzo fisico",parentDevice:"Dispositivo padre",emailAddress:"Indirizzo email",configEmail:"Configurazione email",sendAlarms:"Invio allarmi",sender:"Mittente",addressee:"Destinatario",addressees:"Destinatari",add:"Aggiungi",alarms:"Allarmi",lastRead:"Ultima lettura",lastWrite:"Ultima scrittura",commStatusDiag:"Diagnostica stato comunicazione",DiagExtVar:"Diagnostica variabili ext",fwVersion:"Versione firmware",status:"Stato",totalPackets:"Comunicazioni tentate",successPackets:"Comunicazioni riuscite",failedPackets:"Pacchetti falliti",value:"Valore",maxValidity:"Tempo massimo",setting:"Impostazioni",udpPort:"Porta UDP",natEnable:"Abilitazione NAT",natIp:"Indirizzo IP o URL NAT",natPort:"Porta NAT",bacnetIpsetting:"Impostazioni BACnet IP",settingBACnetMSTP:"Impostazioni BACnet MS/TP",testMail:"Test invio email",result:"Risultato",errorMail:"Errore invio email",bus:"Bus",emr3:"Multimetri tri-fase",emr1:"Multimetri mono-fase",gsp:"Contatori di impulsi",hmr:"Misuratori di calore",exp:"Moduli di espansione",mbusgtw:"Gateway M-Bus",csw:"Concentratori di sonde radio",sensor:"Sonde radio",brgc:"Concentratori di bridge radio",bridge:"Bridge",co2sens:"Sonde CO2",mdbsensor:"Sonde Modbus/M-Bus",act:"Attuatori",cbusdev:"Dispositivo C-Bus",optionalParam:"Parametri opzionali",countingType:"Tipo di conteggio",multiplier:"Moltiplicatore",uom:"Unit\xe0 di misura",forceUom:"Forza unit\xe0 di misura",inParamEnable:"Abilita parametrizzazione ingresso",slopeCoeff:"Coefficiente angolare",csvFileName:"Nome del file CSV",numMetersConnect:"Numero di misuratori connessi",numapArtments:"Numero appartamenti",offset:"Offset",addNewVD:"Aggiungi dispositivo",specificParams:"Parametri specifici",warningDelDevice:"Attenzione, eliminando il dispositivo verranno eliminati anche i dispositivi ad esso collegati",delDeviceQuestion:"Vuoi eliminare il dispositivo?",descr:"Descrizione",mult:"Moltiplicatore",multIn:"Moltiplicatore",uomIn:"Unit\xe0 di misura",paramEnable:"Abilita parametrizzazione ingresso",angCoeff:"Coefficiente angolare",filename:"Nome del file CSV",numMeters:"Numero di misuratori connessi",ip:"IP",numApartments:"Numero appartamenti",cumulative:"Cumulativo",partial:"Parziale",dontForce:"Non forzare",forceMwh:"Forza MWh",forceKwh:"Forza kWh",search:"Cerca",editDevice:"Modifica dispositivo",vAddressWarning:"Indirizzo virtuale gi\xe0 in usato",fAddressWarning:"Indirizzo fisico gi\xe0 in usato",clone:"Clona",cloneDevice:"Clona dispositivo",cpuTemperature:"Temperatura CPU",device:"Dispositivo",never:"Mai",lastComm:"Ultima Comunicazione",invalid:"Invalido",error:"Errore",ok:"OK",numOfCopy:"Numero di copie",addSuccessfully:"Aggiunto correttamente",editSuccessfully:"Modificato correttamente",addressAlreadyUsed:"Indirizzo gi\xe0 usato",devDetected:"Dispositivi rilevati",devFound:"Dispositivi trovati",loadFile:"Carica file",numOfMetersToConnect:"Numero misuratori da collegare",scan:"Scansione",auto:"Automatica",man:"Manuale",devCreationMode:"Modalit\xe0 di creazione dispositivo",alertEditNotSave:"Ci sono modifiche non salvate!",alertEditNotSaveQuestion:"Sicuro di voler abbandonare la pagina?",qualityRxSignale:"Qualit\xe0 segnale di ricezione",powerTx:"Potenza trasmissione",batteryLevel:"Livello della batteria",communication:"Comunicazione",notyetcomm:"Comunicazione non ancora avvenuta",wrongcrc:"CRC Errato",configurationmismatch:"Configurazione errata del dispositivo",voltageL1L2:"Tensione L1-L2",voltageL2L3:"Tensione L2-L3",voltageL3L1:"Tensione L3-L1",currentIntensityL:"Corrente L{0}",cosFiL:"COS-FI {0}",activePower3P:"Potenza attiva trifase",reactivePower3P:"Potenza reattiva trifase",apparentPower3P:"Potenza apparente trifase",cosFi3P:"COS-FI trifase",activePosEnergy3P:"Energia attiva trifase (+)",reactivePosEnergy3P:"Energia reattiva trifase (+)",apparentPosEnergy3P:"Energia apparente trifase (+)",activeNegEnergy3P:"Energia attiva trifase (-)",reactiveNegEnergy3P:"Energia reattiva trifase (-)",apparentNegEnergy3P:"Energia apparente trifase (-)",activePowerL:"Potenza attiva L{0}",activePosEnergy3PT:"Energia attiva trifase (+) T{0}",reactivePosEnergy3PT:"Energia reattiva trifase (+) T{0}",apparentPosEnergy3PT:"Energia apparente trifase (+) T{0}",activeNegEnergy3PT:"Energia attiva trifase (-) T{0}",reactiveNegEnergy3PT:"Energia reattiva trifase (-) T{0}",apparentNegEnergy3PT:"Energia apparente trifase (-) T{0}",voltage:"Tensione",currentIntensity:"Corrente",cosFi:"COS-FI",activePower:"Potenza attiva",activePosEnergy:"Energia attiva monofase (+)",reactivePosEnergy:"Energia reattiva monofase (+)",apparentPosEnergy:"Energia apparente monofase (+)",activeNegEnergy:"Energia attiva monofase (-)",reactiveNegEnergy:"Energia reattiva monofase (-)",apparentNegEnergy:"Energia apparente monofase (-)",activePosEnergyT:"Energia attiva monofase (+) T{0}",reactivePosEnergyT:"Energia reattiva monofase (+) T{0}",apparentPosEnergyT:"Energia apparente monofase (+) T{0}",activeNegEnergyT:"Energia attiva monofase (-) T{0}",reactiveNegEnergyT:"Energia reattiva monofase (-) T{0}",apparentNegEnergyT:"Energia apparente monofase (-) T{0}",totalNoOfPulses:"Impulsi totali {0}",energyHot:"Energia (caldo)",energyCold:"Energia (freddo)",volume:"Volume",power:"Potenza",flowRate:"Portata",supplyTemperature:"Temperatura mandata",returnTemperature:"Temperatura ritorno",deltaTemperature:"Delta temperatura",pressure:"Pressione",massCounter:"Contatore massa",density:"Densit\xe0",pulsesInput:"Impulsi ingr. {0}",meterID:"ID misuratore",timeout:"Timeout",setPoint:"Set point",temperature:"Temperatura {0}",digitalInput:"Ingresso digitale {0}",analogInput:"Ingresso analogico {0}",computedInput:"Ingresso calcolato {0}",humidity:"Umidit\xe0",co2:"CO2",pulseCount:"Impulsi totali {0}",version:"Versione",errorDetail:"Dettagio Errore",yes:"S\xec",no:"No",infoHw:"Informazioni hardware",input:"Ingresso",connections:"Connessioni",measures:"Misure",pollingTime:"Periodo di polling",minutes:"Minuti",hour:"Ore",restore:"Ripristino",backup:"Backup",updatedFile:"File Caricato",errorDownloadExcel:"Errore download Excel",errorDownloadCSV:"Errore download Csv",stopDocker:"Stop servizio",restartDocker:"Riavvia servizio",containerStatus:"Stato del servizio",graphic:"Grafico",table:"Tabella",containerInfo:"Informazioni sullo stato del servizio ".concat("Web Garage"),downloadCsvWg:"Download punti per ".concat("Web Garage"),rowNumber:"Numero di righe",notFound:"Non trovato",newProject:"Progetto nuovo",overvwriteProject:"Questo progetto \xe9 gi\xe0 presente e verr\xe0 sovrascritto",plantDescription:"Descrizione impianto",networkAlertConfirm1:"La modalit\xe0 di rete \xe9 cambiata.",networkAlertConfirm2:"Procedendo col salvataggio il sistema verr\xe0 riavviato",networkAlertConfirm3:"Vuoi procedere?",licenseSett:"Impostazioni licenza",license:"Licenza",hisPoints:"Punti che possono avere History",pointAux:"Punti con tag Aux",maintDue:"Data di manutenzione",install:"Installa",uploadLic:"Carica file della licenza",noLicIntalled:"Nessuna licenza installata",frequency:"Frequenza",validLic:"LIcenza valida!",notValidLic:"Nella licenza mancano alcune informazioni.",licExpired:"Licenza scaduta il: ",diffHostId:"Host id diversi.",hostIdFound:"Host id Licenza: ",invalidFile:"File non valido.",checkMaintence:"Controllare la data di manutenzione.",now:"Adesso",updateDateHour:"Data e ora",custom:"Personalizzata",ntpServer:"Server NTP",mode:"Modalit\xe0",alertUpdateDateTime:"Attenzione, la modifica della data o dell'ora riavvier\xe0 il dispositivo!",managePassword:"Gestione password",infoPassword:"La password deve essere lunga almeno 8 caratteri e deve contenere almeno un numero e un carettere speciale",missUsername:"Attenzione, manca l'utente",mandatoryPasswordReset:"Cambio password obbligatorio",forever:"Sempre attivo",timerInactiveWifi:"Tempo di inattivit\xe0",undoEdit:"Annulla modifiche",attenzione:"Attenzione",normale:"Normale",critico:"Critico",ports:"Porte IP",usingPorts:"Porte IP in uso",alarmReceptionServer:"Server ricezione allarmi",serverEnable:"Abilita server",deviceNotConnected:"Dispositivo non connesso",webGarage:"Web Garage",generalSettings:"Impostazioni generali",ethernet:"Ethernet",server:"Server",deviceInstance:"Device instance",maxInfoFrames:"Max info frames",maxMasters:"Max masters",bacnetMSTPNetwork:"BACnet MS/TP network",bacnetIPNetwork:"BACnet IP network",climatelCloud:"Climatel Cloud",smtpSsl:"Smtp SSL",smtpSTARTTLS:"Smtp STARTTLS",smtpNoAuth:"Smtp NoAuth",csv:"CSV",host:"Host",test:"Test",webGarageSettings:"Impostazioni container",bacnetConfig:"Configurazione router BACnet",modbusConfig:"Configurazione gateway Modbus",virtualDeviceConfig:"Configurazione virtual device",cbusConfig:"Configurazione gateway C-BUS",ylcConfig:"Configurazione YLC",ylcDiag:"Diagnostica YLC",virtualDeviceDiag:"Diagnostica virtual device",statusSettDiag:"Diagnostica stato impostazioni",deviceDiag:"Diagnostica dispositivo",portsIPDiag:"Diagnostica porte IP",bacnetDiag:"Diagnostica router BACnet",dual:"Dual",dns:"DNS",gateway:"Gateway",subnetMask:"Subnet mask",lan:"LAN",wan:"WAN",dhpcEnabled:"DHCP abilitato",changeIpAlert:"Attenzione! Modificando l'indirizzo ip la pagina non sar\xe0 pi\xf9 disponibile",latency:"Latenza",utility:"Utilit\xe0",wifi:"Wi-Fi",ssid:"SSID",xlsx:"XLSX",download:"Download",level:"Livello",timestamp:"Timestamp",log:"Log",containerId:"Container Id",containerName:"Nome Container",image:"Immagine",hostId:"Host Id",created:"Creato",cpuUsage:"CPU utilizzata",ramUsage:"RAM utilizzata",memUsage:"Memoria utilizzata",action:"Azioni",id:"Id",modbusRTUTCP:"Modbus RTUTCP",modbusTcp:"Modbus TCP",hwVersion:"Versione HW",ErrorRequestAPI:"Errore durante la richiesta API",undoClick:"Fai click per eliminare le modifiche correnti e ripristinare il valore salvato",wifiPasswordReset:"Cambio password Wi-Fi",wiFiActived:"Wi-Fi Attivato",wiFiDisabled:"Wi-Fi Disattivato",currentStatus:"Stato corrente",hide:"Nascondi",show:"Visualizza",oldPassword:"Vecchia password",alertWiFiActiveTitle:"Attenzione, Wi-Fi Attivo!",alertWiFiActiveMessage:"Cambiando l'SSID la connessione verr\xe0 riavviata e sar\xe0 necessario ricollegarsi",messageChangeSSIDOk:"Cambio SSID effettuato correttamente",messageChangeSSIDFailed:"Cambio SSID fallito",deleteDocker:"Elimina immagine Docker",deleteDockerDetail:"Elimina tutte le immagini docker",dockerImages:"Immagini Docker",dockerManage:"Gestione immagini Docker",deleteDockerNotAllowed:"Immagine di default",logFile:"File di Log",logFileManage:"Gestione file di Log",deleteAllLogFile:"Elimina tutti i file di Log",deleteLogFile:"Elimina file di Log",deleteLogFileNotAllowed:"Log attivo",active:"Attivo",noActive:"Non attivo",logStatus:"Stato del log",logInfo:"Informazioni sullo stato del servizio di Log",downloadAllLogFile:"Scarica tutti i file di Log",downloadLogFile:"Scarica il file di log",logActived:"Log attivato",logDisabled:"Log disattivato",logConfig:"Configurazione Log",logView:"Visualizza Log",lessDetrails:"Minor dettaglio",modeDetrails:"Maggior dettaglio",serviceNotRun:"Servizio non avviato",wifiDisconnectMsg:"Attenzione, se il collegamento sta avvenendo in wi-fi, verrete disconnessi dal dispositivo",continue:"Continuare",advanced:"Impostazioni avanzate",rfg:"Rilevatori fughe di gas",concentrationSensor:"Concentrazione sonda {0}",thresholdExcSensor:"Superamenti soglie sonda {0}",statusSensor:"Stato sonda {0}",statusRele:"Stato dei rele",valveStatus:"Stato valvola",setValveStatus:"Set stato valvola",passMinLength:"Lunghezza minima della password di 5 caratteri",userRequired:"Nome utente obbligatorio",passRequired:"Password obbligatoria",noMailRecConfigured:"Attenzione! Nessuna mail di recupero password settata!",mail_error:"Invio richiesta fallito!",mail_not_configured:"Email per il recupero della password non configurata",bbmdDefaultActive:"BBMD di default attivati",bbmdDefaultDeActive:"BBMD di default disattivati",cloudSuscribe:"Iscrizione al servizio Cloud",unsuscribeCloud:"Annullamento iscrizione al Cloud",security:"Sicurezza",httpsActived:"HTTPS Attivato",httpsDisabled:"HTTPS Disattivato",activateHttps:"Attiva HTTPS",httpsConnectMsg:"Confermi l'attivazione di HTTPS ?",httpsDisconnectMsg:"Confermi la disattivazione di HTTPS ?",variableExchange:"Scambio variabili",addBlock:"Aggiungi blocco",execDiagram:"Esegui diagramma",undo:"Annulla",redo:"Ripeti",editTitle:"Modifica titolo",blockRename:"Rinomina blocco",newName:"Nuovo nome",functions:"Funzioni",misc:"Varie",devices:"Dispositivi",copy:"Copia",cut:"Taglia",paste:"Incolla",group:"Gruppo",groupT:"Raggruppa",unGroup:"Separa",arrange:"Disponi",rename:"Rinomina",delNote:"Elimina nota",dellConnect:"Elimina collegamento",alignLeft:"Allinea a sinistra",alignCenter:"Allinea al centro",alignRight:"Allinea a destra",alignTop:"Allinea in alto",alignMiddle:"Allinea a met\xe0",alignBottom:"Allinea in basso",distributeHoriz:"Distribuisci orizzontalmente",distributeVert:"Distribuisci verticalmente",variables:"Variabili",constants:"Costanti",constant:"Costante",pressurePa:"Pressione (Pa)",pressureBar:"Pressione (Bar)",pressureMbar:"Pressione (mbar)",actuatorPerc:"Perc. attuatore",pureNumber:"Numero puro",onOff:"ON/OFF",functionType:"Tipo funzione",varType:"Tipo Variabile",variable:"Variabile",editVar:"Modifica Variabile",editConst:"Modifica Constante",editFunct:"Modifica Funzione",selectAll:"Seleziona tutto",deleteAll:"Cancella tutto",read:"Lettura",write:"Scrittura",modbusTerminal:"Terminale Modbus",readEvery:"Leggi ogni",once:"Una volta",index:"Indice",functionCode:"Codice funzione",numberOfRegisters:"Numero di registri",registerAddress:"Indirizzo registro",data:"Dati",preset:"Scrivi",portConfig:"Configura porta",dec:"Dec",hex:"Hex",readCoils:"Read coils",readDiscreteInput:"Read discrete input",readHoldingRegisters:"Read holding registers",readInputRegisters:"Read input registers",writeSingleCoil:"Write single coil",writeSingleHoldingRegisters:"Write single holding registers",writeMultipleCoils:"Write multiple coils",writeMultipleHoldingRegisters:"Write multiple holding registers",writeData:"Dati scritti",readData:"Dati letti",useSemicolonAsSeparator:'Usare ";" per separare i dati',decodedValue:"Valore decodificato",decoderType:"Decodifica",clear:"Pulisci",showLog:"Mostra Log",hideLog:"Nascondi Log",for:"per",connectError:"Errore di connessione",connected:"Connesso",disconnected:"Disconnesso",disconnection:"Disconnessione",showConfiguration:"Mostra impostazioni registri",hideConfiguration:"Nascondi impostazioni registri",connect:"Connetti",disconnect:"Disconnetti",startRead:"Avvia lettura",stopRead:"Ferma lettura",inRunning:"In esecuzione",errorWriteNull:"Errore: inserito valore nullo",to:"a",alertDisconnection:"Cliccando OK ci si disconnetter\xe0 dal dispositivo.",terminator:"Terminatore",mstpNodes:"Nodi MS/TP",currentDevice:"Dispositivo corrente",deviceNotAvaible:"Dispositivo non disponibile",anno:"anno",mese:"mese",giorno:"giorno",minuto:"minuto",secondi:"secondi",anni:"anni",mesi:"mesi",giorni:"giorni",minuti:"minuti",ora:"ora",ore:"ore",deleteBacnetStats:"Il file delle statistiche sar\xe0 cancellato. Confermi ?",releStatus:"Stato rel\xe8 {0}",irradiancelevel:"Livello di irradianza attuale",cellTemperature:"Temperatura attuale della cella",deviceNotRespondingFor:"Il dispositivo non risponde da",overMaxMaster:"Superiore a Max Master",process:"Processo",memoryBusy:"Memoria occupata",cpuFrequency:"Frequenza CPU",anOut:"Preset uscita {0}",anOutStatus:"Valore uscita {0}",factoryDefault:"Reset a default di fabbrica",resetPasswordOk:"Reset password effettuato correttamente",resetPasswordFailed:"Reset password fallito",titleAreYouSurePasswordReset:"Sei sicuro di voler resettare la password?",actived:"Attivato",inactive:"Disattivato",unreacheable:"Dispositivo non raggiungibile/dato non disponibile",unknownVar:"Variabile sconosciuta o refId errato",noLinks:"Blocco non collegato",vDevNotFound:"Virtual device non trovato o refId errato",extNotFound:"Variabile ext non disponibile o vuota",unkown:"Errore sconosciuto",sum:"Somma",sub:"Sottrazione",mul:"Moltiplicazione",div:"Divisione",min:"Minimo",max:"Massimo",avg:"Media",sqrt:"Radice quadrata",other:"Altro",varAlreadyExist:"Nome variabile gi\xe0 esistente",descrVar:"Descrizione variabile",typeVar:"Tipo variabile",selDevice:"Seleziona dispositivo",selVar:"Seleziona variabile",deleteAllDiagrams:"Sei sicuro di voler eliminare tutti i diagrammi?",pause:"Pausa",deleteAllVar:"Eliminando la VAR OUT verranno eliminate tutte le VAR IN collegate",duplicateVarBlock:"Blocco variabile duplicato",ylcVarNotFound:"Verificare la presenza della centralina YLC e che lo scambio variabili sia abilitato",deleteSelected:"Elimina selezionato",dataFlow:"Flusso dati",used:"usati",free:"liberi",total:"totali",overview:"Panoramica",cleanFs:"Pulisci System logs",diagFs:"Diagnostica File System",diagFsSubTitle:"Visualizza spazio disco e pulizia rapida",systemLogs:"Log di sistema",systemLogsToolTip:"Files di log del sistema operativo",home:"Cartelle dell'applicazione",homeToolTip:"Files e cartelle dell'applicazione, files di log e progetti del container",system:"Cartelle di sistema",systemToolTip:"Files e cartelle di sistema",unhookNote:"Sgancia nota",color:"Colore",valveStatusS:"Sonda {0} - Stato valvola",setValveStatusS:"Sonda {0} - Set point stato valvola",alarmsS:"Sonda {0} - Allarme",temperatureS:"Sonda {0} - Temperatura",humidityS:"Sonda {0} - Umidit\xe0",co2S:"Sonda {0} - CO2",exportVar:"Esposizione variabile",delExportVar:"Cancella esposizione",warningDelDeviceVVar:"Verranno eliminate anche le variabili da esso esportate",viewExpVarList:"Visualizza elenco variabili esposte",expoVarList:"Variabili esposte",addNewTag:"Aggiungi Nuovo Tag",copyTags:"Copia Tags",pasteTags:"Incolla tags",exposedVar:"Variabile esposta",electricity:"Elettricit\xe0",energy:"Energia",percentage:"Percentuale",irradiance:"Irradianza",signalPower:"Potenza segnale",velocity:"Velocit\xe0",delAllTags:"Elimina tutti i Tag",sessionExpired:"Sessione scaduta",timeOut:"Timeout di connessione",serviceUnavailable:"Servizio non disponibile",redirect:"Verrai reindirizzato alla pagina di login.",bacnetBMDSettings:"Impostazioni BACnet BBMD",passwordReset:"Reimposta password",warningAWSCLI:"\xc8 necessario installare il package AWS-CLI per permettere il corretto avvio di {0}",confirmPkgInstall:"Conferma installazione pacchetto",pkgNotValid:"Pacchetto non valido",pkgInstalled:"Installazione completata correttamente",installationAborted:"Installazione annullata",maintenancePkgs:"Pacchetti di manutenzione",installMaintenancePkgs:"Installa pacchetti di manutenzione",time:"Ora",invalidCredentials:"Username o password errati",fwUpdate:"Aggiornamento firmware",portDisabled:"Disabilitato",retroCompYHC:"Retrocompatibilit\xe0 YHC 700",infoYhcCompatibility:"Abilitando la retrocompatibilit\xe0 con YHC 700, sar\xe0 possibile raggiungere le centraline connesse via ethernet in base allo slave address, che dovr\xe0 essere diverso per ogni centralina configurata.",wgVersion:"Versione {0}",finVersion:"Versione FIN Framework",localVersion:"Versione locale",thermalThrottlingActive:"Thermal throttling attivo: frequenza CPU ridotta per surriscaldamento",underVoltageDetected:"Sottotensione rilevata: verificare l'alimentatore",serverUnable:"Impossibile contattare il server"},Qm={edit:"Edit",delete:"Delete",export:"Export",cancel:"Cancel",title:"Title",icon:"Icon",save:"speichern",alarm:"Alarm",connection:"Verbindung",warning:"Warnung",name:"Name",statoConn:"Verbindungsstatus",pleaseSelect:"Bitte w\xe4hlen Sie aus",send:"Schicken",general:"Allgemein",network:"Netz",networkSett:"Network einstellungen",serialPort:"Ports",serialPortSett:"Ports einstellungen",settings:"Einstellungen",diagnostic:"Diagnostik",addresType:"Adresstyp",ipAddress:"IP adresse",plant:"Anlagendaten",localization:"Spracheinstellungen",languageSettings:"Spracheinstellungen",timezoneSettings:"Zeitzoneneinstellungen",restartDevice:"Ger\xe4t neu starten",dnsPrimary:"Prim\xe4rer DNS",dnsSecondary:"Sekund\xe4rer DNS",showLog:"Protokoll anzeigen",swUpdate:"Software-Update",enabled:"Erm\xf6glicht",disabled:"Deaktiviert",gatewayAdd:"Gateway adresse",protocol:"Protokoll",baudRate:"Baudrate",parity:"Parity",enable:"Aktivieren",address:"Adresse",description:"Beschreibung",language:"Sprache",timeZone:"Zeitzone",user:"Benutzer",password:"Passwort",login:"Anmelden",messageLoginFailed:"Falscher Benutzer oder falsches Passwort!",forgotPassword:"Passwort vergessen?",localNetwork:"Lokales Netzwerk",deviceInfo:"Ger\xe4teinformationen",model:"Modell",serialNumber:"Seriennummer",firmware:"FW-Version",firmwareAgent:"Agent-FW-Version",appVersion:"App-Version. WEB",macAddress:"MAC-Adresse",titleAreYouSure:"Bist du sicher?",dataExchange:"Datenaustausch",dataCache:"Datencache",readAlarm:"Lesen von Alarmen",bacnet_transparent:"BACnet-Router",cbus_transparent:"C-BUS-Gateway",statistic:"Statistiken",ylc:"YLC",modbus_transparent:"Modbus-Gateway",numBits:"Bits",stopBit:"Stop bit",none:"Niemand",odd:"Sch\xfcsse",even:"Sogar",port:"Port",false:"Nein",true:"Ja",details:"Einzelheiten",ethernetPorts:"Ethernet-Ports",networkMode:"Netzwerkmodus",passwordChange:"Passwort \xe4ndern",forgotUser:"Benutzer vergessen?",messageCodeCheckFailed:"Achtung: ung\xfcltiger Code",messageRecoveryUser:"Antrag auf Wiederherstellung des Benutzers per E-Mail gesendet",messageRecoveryUserFailed:"Das Senden der Benutzerwiederherstellungsanfrage ist fehlgeschlagen",messageCodeReqSent:"Anfrage per E-Mail an den angegebenen Benutzer gesendet",messageCodeReqFailed:"Das Senden der Anfrage ist fehlgeschlagen",newPassword:"Neues Passwort",passwordRepeat:"Neues Passwort wiederholen",messageChangePasswordOk:"Passwort wurde erfolgreich ge\xe4ndert",messageChangePasswordFailed:"Passwort\xe4nderung ist fehlgeschlagen",messagePasswordNotMatch:"Fehler: Die Passw\xf6rter sind unterschiedlich!",titleRecoveryPassword:"Passwort wiederherstellen",recoveryCode:"Code eingeben",reqCode:"Code anfragen",service:"Service",projects:"Projekte",project:"Projekt",titlePortForwarding:"Port-Weiterleitung",webUpdate:"Web-Update",fileUpdate:"Aktualisierung aus Datei",uploadingFile:"Datei wird hochgeladen...",updateInProgress:"Aktualisierung l\xe4uft",wgUpdateTitle:"{0}-Aktualisierung",restartService:"Dienst neu starten",shutdownDevice:"Schalten Sie das Ger\xe4t aus",cloudUnsub:"Cloud abbestellen",confirmLogout:"Logout best\xe4tigen?",date:"Datum",hours:"Jetzt",bkProj:"Backup-Projekt",bkAllProj:"Sichern Sie alle Projekte",delProj:"Projekt l\xf6schen",restoreProj:"Projekt wiederherstellen",all:"Alle",serviceConfig:"Konfiguration der Dienste",ip_setting:"Einstellungen Ip",lastSeen:"Letzte Ansicht",nets:"Netzwerke",sentPackets:"Gesendet Pakete",recvPackets:"Empfangene Pakete",errPackets:"Fehler",repeatPackets:"Neu\xfcbertragung",type:"Typologie",networkCard:"Netzwerkkarte",updFromWeb:"Update aus dem Internet",updFromFile:"Update aus Datei",settStatus:"Einstellungsstatus",error401:"Wrong Password. Try again or click forgot password to reset it.",error500:"Server error.",installUpd:"Installiere Update",selectFile:"Datei aussuchen",fileVersion:"Dateiversion",restarting:"Ger\xe4teneustart l\xe4uft ...",isRestarted:"Wenn sich die Ger\xe4teadresse nach dem Neustart nicht \xe4ndert, wird die Seite automatisch aktualisiert.",restartWarning:"Aufmerksamkeit! Wenn das Update abgeschlossen ist, wird Ihr Ger\xe4t neu gestartet",updateFailed:"Fehler: Software-Installation fehlgeschlagen!",updateNotAvailable:"Fehler: Update nicht verf\xfcgbar!",newVersionAvailable:"Eine neue Version ist verf\xfcgbar:",noUpdAvailable:"Keine Updates verf\xfcgbar",update:"Aktualisieren",notAvailable:"N/V",downloadFailed:"Fehler: Dateien-Download fehlgeschlagen!",slaveAddress:"Slave-Adresse",routerBacnetRilevati:"BACnet-Router erkannt",size:"Gr\xf6\xdfe",stopWg:"Dienst anhalten",virtual_device:"Virtual Device",category:"Kategorie",virtualAddress:"Virtuelle Adresse",fisicalAddress:"Physikalische Adresse",parentDevice:"\xdcbergeordnetes Ger\xe4t",emailAddress:"Email address",configEmail:"E-Mail-Konfiguration",sendAlarms:"Send alarms",sender:"Sender",addressee:"Addressee",addressees:"Addressees",add:"Hinzuf\xfcgen",alarms:"Alarm",lastRead:"Zuletzt gelesen",lastWrite:"Letzter Beitrag",commStatusDiag:"Kommunikationsstatusdiagnose",DiagExtVar:"Diagnostik von \u201eext\u201c-Variablen",fwVersion:"Firmware-Version",status:"Status",totalPackets:"Kommunikationsversuch",successPackets:"Erfolgspakete",failedPackets:"Fehlgeschlagene Pakete",value:"Wert",maxValidity:"maximale Zeit",setting:"Einstellung",udpPort:"UDP-Port",natEnable:"NAT aktivieren",natIp:"IP-Adresse oder NAT-URL",natPort:"NAT-Port",bacnetIpsetting:"IP BACnet-Einstellung",settingBACnetMSTP:"BACnet MS/TP-Einstellung",testMail:"E-Mail-Versandtest",result:"Ergebnis",errorMail:"Fehler beim Senden der E-Mail",bus:"Bus",emr3:"Dreiphasen-Multimeter",emr1:"Einphasen-Multimeter",gsp:"Impulsz\xe4hler",hmr:"W\xe4rmez\xe4hler",exp:"Erweiterungsmodule",mbusgtw:"Gateway M-Bus",csw:"Radiosonden-Konzentratoren",sensor:"Funksonden",brgc:"Funkbr\xfcckenkonzentratoren",bridge:"Br\xfcckenradio",co2sens:"CO2-Sonden",mdbsensor:"Modbus/M-Bus-Sonden",act:"Aktuatoren",cbusdev:"C-Bus-Ger\xe4t",optionalParam:"Optionale Parameter",countingType:"Z\xe4hltyp",multiplier:"Multiplikator",uom:"Ma\xdfeinheit",forceUom:"Kraft-Ma\xdfeinheit",inParamEnable:"Eingabeparametrisierung aktivieren",slopeCoeff:"Steigungskoeffizient",csvFileName:"Name der CSV-Datei",numMetersConnect:"Anzahl der angeschlossenen Z\xe4hler",numapArtments:"Anzahl Wohnungen",offset:"Offsetdruck",addNewVD:"Neues Ger\xe4t hinzuf\xfcgen",specificParams:"Spezifische Parameter",warningDelDevice:"Achtung, durch das L\xf6schen des Ger\xe4ts werden auch die mit ihm verbundenen Ger\xe4te gel\xf6scht",delDeviceQuestion:"M\xf6chten Sie das Ger\xe4t l\xf6schen?",descr:"Description",mult:"Multiplikator",multIn:"Multiplikator",uomIn:"Ma\xdfeinheit",paramEnable:"Eingabeparametrisierung aktivieren",angCoeff:"Steigungskoeffizient",filename:"Name der CSV-Datei",numMeters:"Anzahl der angeschlossenen Z\xe4hler",ip:"IP",numApartments:"Anzahl Wohnungen",cumulative:"Kumulativ",partial:"Teilweise",dontForce:"Don't force it",forceMwh:"Force MWh",forceKwh:"Force kWh",Search:"Suchen",editDevice:"Ger\xe4t bearbeiten",vAddressWarning:"Virtuelle Adresse wird bereits verwendet",fAddressWarning:"Die physische Adresse wird bereits verwendet",clone:"Klon",cloneDevice:"Ger\xe4t klonen",cpuTemperature:"CPU-Temperatur",device:"Ger\xe4t",never:"Niemals",lastComm:"Letzte Mitteilung",invalid:"Invalid",error:"Fehler",ok:"OK",numOfCopy:"Anzahl der Kopien",addSuccessfully:"Erfolgreich hinzugef\xfcgt",editSuccessfully:"Korrekt ge\xe4ndert",vaAlreadyUsed:"Adresse bereits verwendet",devDetected:"Ger\xe4te erkannt",devFound:"Ger\xe4te gefunden",loadFile:"Lade Datei",numOfMetersToConnect:"Anzahl der zu verbindenden Z\xe4hler",scan:"Scan",auto:"Automatisch",man:"Handbuch",devCreationMode:"Ger\xe4teerstellungsmodus",alertEditNotSave:"Du hast nicht gespeicherte \xc4nderungen!",alertEditNotSaveQuestion:"Sind Sie sicher, dass Sie die Seite verlassen m\xf6chten?",qualityRxSignale:"Empfangssignalqualit\xe4t",powerTx:"\xdcbertragungsleistung",batteryLevel:"Batterie Level",communication:"Kommunikation",notyetcomm:"Kommunikation hat noch nicht stattgefunden",wrongcrc:"CRC falsch",configurationmismatch:"",voltageL1L2:"Spannung L1-L2",voltageL2L3:"Spannung L2-L3",voltageL3L1:"Spannung L3-L1",currentIntensityL:"Strom L{0}",cosFiL:"COS-FI L{0}",activePower3P:"3-Phasen-Wirkleistung",reactivePower3P:"3-Phasen-Blindleistung",apparentPower3P:"3-Phasen-Scheinleistung",cosFi3P:"3-Phas. COS-FI",activePosEnergy3P:"3-Phasen-Wirkenergie (+)",reactivePosEnergy3P:"3-Phasen-Blindenergie (+)",apparentPosEnergy3P:"3-Phasen-Scheinenergie (+)",activeNegEnergy3P:"3-Phasen-Wirkenergie (-)",reactiveNegEnergy3P:"3-Phasen-Blindenergie (-)",apparentNegEnergy3P:"3-Phasen-Scheinenergie (-)",activePowerL:"Wirkleistung L{0}",activePosEnergy3PT:"3-Phasen-Wirkenergie (+) T{0}",reactivePosEnergy3PT:"3-Phasen-Blindenergie (+) T{0}",apparentPosEnergy3PT:"3-Phasen-Scheinenergie (+) T{0}",activeNegEnergy3PT:"3-Phasen-Wirkenergie (-) T{0}",reactiveNegEnergy3PT:"3-Phasen-Blindenergie (-) T{0}",apparentNegEnergy3PT:"3-Phasen-Scheinenergie (-) T{0}",voltage:"Spannung",currentIntensity:"Strom",cosFi:"COS-FI",activePower:"Wirkleistung",activePosEnergy:"Mono-phasen-Wirkenergie (+)",reactivePosEnergy:"Mono-phasen-Blindenergie (+)",apparentPosEnergy:"Mono-phasen-Scheinenergie (+)",activeNegEnergy:"Mono-phasen-Wirkenergie (-)",reactiveNegEnergy:"Mono-phasen-Blindenergie (-)",apparentNegEnergy:"Mono-phasen-Scheinenergie (-)",activePosEnergyT:"Mono-phasen-Wirkenergie (+) T{0}",reactivePosEnergyT:"Mono-phasen-Blindenergie (+) T{0}",apparentPosEnergyT:"Mono-phasen-Scheinenergie (+) T{0}",activeNegEnergyT:"Mono-phasen-Wirkenergie (-) T{0}",reactiveNegEnergyT:"Mono-phasen-Blindenergie (-) T{0}",apparentNegEnergyT:"Mono-phasen-Scheinenergie (-) T{0}",activeCurrentIntPosT:"Wirkenergie (+) T{0}",activeCurrentIntNegT:"Wirkenergie (-) T{0}",totalNoOfPulses:"Impulse insges. {0}",energyHot:"Energie (W\xe4rme)",energyCold:"Energie (K\xe4lte)",volume:"Volumen",power:"Leistung",flowRate:"Durchfluss",supplyTemperature:"Vorlauftemperatur",returnTemperature:"R\xfccklauftemperatur",deltaTemperature:"Delta-Temperatur",pressure:"Druck",massCounter:"Massemesser",density:"Dichte",pulsesInput:"Impulse insges. {0}",meterID:"Messger-ID",timeout:"Timeout",setPoint:"Set point",temperature:"Temperatur {0}",digitalInput:"Digitale eingabe {0}",analogInput:"Analoger eingang {0}",computedInput:"Berechnete eingabe {0}",humidity:"Feuchte",co2:"CO2",pulseCount:"Impulse insges. {0}",version:"Version",errorDetail:"Fehlerdetails",yes:"Ja",no:"NEIN",infoHw:"Hardwareinformationen",input:"Eingang",connections:"Connections",measures:"Ma\xdfnahmen",pollingTime:"Polling-Zeit",minutes:"Minuten",hour:"Std",restore:"Wiederherstellen",backup:"Backup",updatedFile:"Aktualisierte Datei",stopDocker:"Service einstellen",restartDocker:"Dienst neu starten",errorDownloadCSV:"Fehler beim Herunterladen der CSV-Datei",errorDownloadExcel:"Fehler beim Herunterladen von Excel",containerStatus:"Servicestatus",containerInfo:"Informationen zum Servicestatus von ".concat("Web Garage"),downloadCsvWg:"Downloadpunkte f\xfcr ".concat("Web Garage"),graphic:"Grafik",table:"Tisch",rowNumber:"Zeilennummer",notFound:"Nicht gefunden",newProject:"Neues Projekt",overvwriteProject:"Dieses Projekt existiert bereits und wird \xfcberschrieben",plantDescription:"Pflanzenbeschreibung",networkAlertConfirm1:"Der Netzwerkmodus hat sich ge\xe4ndert.",networkAlertConfirm2:"Wenn Sie mit dem Speichern fortfahren, wird das System neu gestartet.",networkAlertConfirm3:"M\xf6chten Sie fortfahren?",licenseSett:"Lizenzverwaltung",license:"Lizenz",hisPoints:"Punkte, die eine Geschichte haben k\xf6nnen",pointAux:"Punkte mit Aux-Tag",maintDue:"Wartungsdatum",install:"Installieren",uploadLic:"Lizenzdatei hochladen",noLicIntalled:"Keine Lizenzen installiert",frequency:"Frequenz",validLic:"G\xfcltige Lizenz!",notValidLic:"Ung\xfcltige Lizenz.",licExpired:"Lizenz abgelaufen am: ",diffHostId:"Different  host id.",hostIdFound:"Lizenz host id: ",invalidFile:"Invalid file.",checkMaintence:"\xdcberpr\xfcfen Sie das Wartungsdatum.",now:"Now",updateDateHour:"Date & hour",custom:"Ma\xdfgeschneidert",ntpServer:"NTP-Server",mode:"Modus",alertUpdateDateTime:"Achtung: Durch das \xc4ndern von Datum oder Uhrzeit wird Ihr Ger\xe4t neu gestartet!",managePassword:"Passwortverwaltung",infoPassword:"TDas Passwort muss mindestens 8 Zeichen lang sein und mindestens eine Zahl und ein Sonderzeichen enthalten.",missUsername:"Warnung: Benutzername fehlt",mandatoryPasswordReset:"Passwort zur\xfccksetzen",forever:"F\xfcr immer aktiv",timerInactiveWifi:"Ausfallzeit",undoEdit:"\xc4nderungen stornieren",attenzione:"Warnung",normale:"Normal",critico:"Kritisch",ports:"IP-Ports",usingPorts:"Verwendete IP-Ports",alarmReceptionServer:"Alarmempfangsserver",serverEnable:"Server aktiviert",deviceNotConnected:"Ger\xe4t nicht verbunden",webGarage:"Web Garage",generalSettings:"Allgemeine Einstellungen",ethernet:"Ethernet",server:"Server",deviceInstance:"Ger\xe4teinstanz",maxInfoFrames:"Max Info Frames",maxMasters:"Max-Meister",bacnetMSTPNetwork:"BACnet MS/TP network",bacnetIPNetwork:"BACnet IP network",climatelCloud:"Climatel Cloud",smtpSsl:"Smtp SSL",smtpSTARTTLS:"Smtp STARTTLS",smtpNoAuth:"Smtp NoAuth",csv:"CSV",host:"Host",test:"Test",webGarageSettings:"Containereinstellungen",bacnetConfig:"BACnet-Router konfiguration",modbusConfig:"Modbus-Gateway konfiguration",virtualDeviceConfig:"Konfiguration virtueller Ger\xe4te",cbusConfig:"C-BUS-Gateway konfiguration",ylcConfig:"YLC-Konfiguration",ylcDiag:"YLC-Diagnostik",virtualDeviceDiag:"Virtual device diagnostic",statusSettDiag:"Statusdiagnose der Einstellungen",deviceDiag:"Ger\xe4tediagnose",portsIPDiag:"IP-Port-Diagnose",bacnetDiag:"BACnet-Router BACnet-Diagnose",dual:"Dual",dns:"DNS",gateway:"Gateway",subnetMask:"Subnetzmaske",lan:"LAN",wan:"WAN",dhpcEnabled:"Enabled DHCP",changeIpAlert:"Aufmerksamkeit! Durch die \xc4nderung der IP-Adresse ist die Seite nicht mehr erreichbar",latency:"Latenz",utility:"Dienstprogramm",wifi:"Wi-Fi",ssid:"SSID",xlsx:"XLSX",download:"Herunterladen",level:"Level",timestamp:"Zeitstempel",log:"Protokoll",containerId:"Container-ID",containerName:"Containername",image:"Bild",hostId:"Host-ID",created:"Erstellt",cpuUsage:"CPU-Auslastung",ramUsage:"RAM-Nutzung",memUsage:"Speichernutzung",action:"Aktion",id:"Id",modbusRTUTCP:"Modbus RTUTCP",modbusTcp:"Modbus TCP",hwVersion:"Hardwareversion",ErrorRequestAPI:"Fehler bei der API-Anfrage.",undoClick:"Klicken Sie hier, um die aktuellen \xc4nderungen zu verwerfen und den gespeicherten Wert wiederherzustellen.",wifiPasswordReset:"Wi-Fi-Passwort \xe4ndern",wiFiActived:"Wi-Fi aktiviert",wiFiDisabled:"Wi-Fi Deaktiviert",currentStatus:"Aktueller Status",hide:"Verstecken",show:"Sicht",oldPassword:"Altes Passwort",alertWiFiActiveTitle:"Achtung, Wi-Fi aktiv!",alertWiFiActiveMessage:"Durch das \xc4ndern der SSID wird die Verbindung neu gestartet und Sie m\xfcssen die Verbindung erneut herstellen",messageChangeSSIDOk:"SSID wurde erfolgreich ge\xe4ndert",messageChangeSSIDFailed:"SSID ist fehlgeschlagen",deleteDocker:"Docker-Image l\xf6schen",deleteDockerDetail:"Alle Docker-Images l\xf6schen",dockerImages:"Docker-Bilder",dockerManage:"Docker-Image-Verwaltung",deleteDockerNotAllowed:"Standardbild",logFile:"Protokolldateien",logFileManage:"Protokolldateiverwaltung",deleteAllLogFile:"L\xf6schen aller Protokolldateien",deleteLogFile:"L\xf6schen von Protokolldateien",deleteLogFileNotAllowed:"Aktives Protokoll",active:"Aktiv",noActive:"Nicht aktiv",logStatus:"Protokollstatus",logInfo:"Informationen zum Protokolldienststatus",downloadAllLogFile:"Alle Logdateien herunterladen",downloadLogFile:"Herunterladen der Protokolldatei",logActived:"Log aktiviert",logDisabled:"Log Deaktiviert",logConfig:"Protokollkonfiguration",logView:"Protokoll anzeigen",lessDetrails:"Weniger Details",modeDetrails:"Mehr Details",serviceNotRun:"Dienst nicht gestartet",wifiDisconnectMsg:"Achtung, wenn die Verbindung \xfcber WLAN erfolgt, wird die Verbindung zum Ger\xe4t getrennt",continue:"Weitermachen",advanced:"Erweiterte Einstellungen",rfg:"Gasleckdetektoren",concentrationSensor:"Konzentration von Sensor {0}",thresholdExcSensor:"Schwellenwert von Sensor {0} \xfcberschritten",statusSensor:"Status von Sensor {0}",statusRele:"Relaisstatus",valveStatus:"Ventilstatus",setValveStatus:"Ventilstatus einstellen",passMinLength:"Mindestl\xe4nge des Passworts: 5 Zeichen",userRequired:"Benutzername erforderlich",passRequired:"Passwort erforderlich",noMailRecConfigured:"Aufmerksamkeit! Keine E-Mail-Adresse zur Passwortwiederherstellung festgelegt!",mail_error:"Anfrage per E-Mail an den angegebenen Benutzer gesendet",mail_not_configured:"E-Mail zur Kennwortwiederherstellung nicht konfiguriert",bbmdDefaultActive:"BBMD di default attivati",bbmdDefaultDeActive:"BBMD-Standards aktiviert",cloudSuscribe:"Cloud-Service-Abonnement",unsuscribeCloud:"Cloud-Abmeldung",security:"Sicherheit",httpsActived:"HTTPS aktiviert",httpsDisabled:"HTTPS Deaktiviert",activateHttps:"Aktivieren Sie HTTPS",httpsConnectMsg:"Best\xe4tigen Sie die HTTPS-Aktivierung?",httpsDisconnectMsg:"M\xf6chten Sie HTTPS wirklich deaktivieren?",variableExchange:"Variablenaustausch",addBlock:"Block hinzuf\xfcgen",execDiagram:"Ablaufdiagramm",undo:"R\xfcckg\xe4ngig machen",redo:"Wiederholen",editTitle:"Titel bearbeiten",blockRename:"Block umbenennen",newName:"Neuer name",functions:"Funktionen",misc:"Sonstiges",devices:"Ger\xe4te",copy:"Kopie",cut:"Schneiden",paste:"Paste",group:"Gruppe",groupT:"Gruppe",unGroup:"Gruppierung aufheben",arrange:"Arrangieren",rename:"Umbenennen",delNote:"Notiz l\xf6schen",dellConnect:"Link l\xf6schen",alignLeft:"Linksb\xfcndig",alignCenter:"Auf die Mitte ausrichten",alignRight:"Rechtsb\xfcndig",alignTop:"Oben ausrichten",alignMiddle:"Mitte ausrichten",alignBottom:"Unten ausrichten",distributeHoriz:"Horizontal verteilen",distributeVert:"Vertikal verteilen",variables:"Variablen",constants:"Konstanten",constant:"Konstante",pressurePa:"Pressione (Pa)",pressureBar:"Pressione (Bar)",pressureMbar:"Pressione (mbar)",actuatorPerc:"Aktuatorprozentsatz",pureNumber:"Reine Zahl",onOff:"ON/OFF",functionType:"Funktionstyp",varType:"Variablentyp",variable:"Variable",editVar:"Variable bearbeiten",editConst:"Konstante bearbeitene",editFunct:"Editierfunktion",selectAll:"Select all",deleteAll:"Alle l\xf6schen",read:"Lesen",write:"Schreiben",modbusTerminal:"Modbus terminal",readEvery:"Read every",once:"Once",index:"Index",functionCode:"Funktionscode",numberOfRegister:"Registernummer",registerAddress:"Adresse registrieren",data:"Daten",preset:"Voreingestellt",portConfig:"Portkonfiguration",dec:"Dec",hex:"Hex",readCoils:"Lesespulen",readDiscreteInput:"Lesen Sie diskrete Eingaben",readHoldingRegisters:"Lesen Sie die Wartelisten.",readInputRegisters:"Eingangsregister lesen",writeSingleCoil:"Schreiben Sie eine einzelne Spule",writeSingleHoldingRegisters:"Schreiben Sie einzelne Halteregister",writeMultipleCoils:"Mehrere Spulen schreiben",writeMultipleHoldingRegisters:"Schreiben Sie mehrere Halteregister",writeData:"Daten schreiben",readData:"Daten lesen",useSemicolonAsSeparator:'Verwenden Sie ";" als Datentrennzeichen',decodedValue:"Dekodierter Wert",decoderType:"Decoder",clear:"Klar",hideLog:"Protokoll ausblenden",for:"f\xfcr",connectError:"Verbindungsfehler",connected:"Verbunden",disconnected:"Getrennt",disconnection:"Trennung",showConfiguration:"Registereinstellungen anzeigen",hideConfiguration:"Registereinstellungen ausblenden",connect:"Verbinden",disconnect:"Trennen",startRead:"Lesen starten",stopRead:"Lesen stoppen",inRunning:"In Ausf\xfchrung",errorWriteNull:"Fehler: Nullwert eingef\xfcgt",to:"Zu",alertDisconnection:"Durch Klicken auf OK wird die Verbindung zum Ger\xe4t getrennt.",terminator:"Terminator",mstpNodes:"MS/TP-Knoten",currentDevice:"Aktuelles Ger\xe4t",deviceNotAvaible:"Ger\xe4t nicht verf\xfcgbar",anno:"Jahr",mese:"Monat",giorno:"Tag",minuto:"Minute",secondi:"Zweite",anni:"Jahre",mesi:"Monate",giorni:"Tage",minuti:"Minuten",ora:"Stunde",ore:"Std",deleteBacnetStats:"Die Statistikdatei wird gel\xf6scht. Sind Sie sicher?",releStatus:"Relaiszustand {0}",irradiancelevel:"Aktuelle Bestrahlungsst\xe4rke",cellTemperature:"Aktuelle Zelltemperatur",deviceNotRespondingFor:"Das Ger\xe4t hat nicht reagiert.",overMaxMaster:"H\xf6her als Max Master",process:"Verfahren",memoryBusy:"Speicher belegt",cpuFrequency:"CPU-Frequenz",anOut:"Ausgabevoreinstellung {0}",anOutStatus:"Ausgabewert {0}",factoryDefault:"Auf Werkseinstellungen zur\xfccksetzen",resetPasswordOk:"Passwort erfolgreich zur\xfcckgesetzt",resetPasswordFailed:"Passwortzur\xfccksetzung fehlgeschlagen",titleAreYouSurePasswordReset:"M\xf6chten Sie Ihr Passwort wirklich zur\xfccksetzen?",actived:"Aktiviert",inactive:"Deaktiviert",unreacheable:"Ger\xe4t nicht erreichbar/Daten nicht verf\xfcgbar",unknownVar:"Unknown variable or incorrect refId",noLinks:"Block not connected",vDevNotFound:"Virtuelles Ger\xe4t nicht gefunden oder falsche RefId",extNotFound:"Ext-Variable nicht verf\xfcgbar oder leer",unkown:"Unbekannter Fehler",sum:"Summe",sub:"Subtraktion",mul:"Multiplikation",div:"Division",min:"Minimum",max:"Maximal",avg:"Durchschnitt",sqrt:"Quadratwurzel",other:"Andere",varAlreadyExist:"Der Variablenname existiert bereits",descrVar:"Variablenbeschreibung",typeVar:"Variablentyp",selDevice:"Ger\xe4t ausw\xe4hlen",selVar:"Variable ausw\xe4hlen",deleteAllDiagrams:"Sind Sie sicher, dass Sie alle Diagramme l\xf6schen m\xf6chten?",pause:"Pause",deleteAllVar:"Durch das L\xf6schen von VAR OUT werden alle verbundenen VAR INs gel\xf6scht.",duplicateVarBlock:"Doppelte Variablenblock",ylcVarNotFound:"Pr\xfcfen Sie, ob das YLC-Steuerger\xe4t vorhanden ist und der variable Datenaustausch aktiviert ist",deleteSelected:"Ausgew\xe4hlte l\xf6schen",dataFlow:"Datenfluss",used:"gebraucht",free:"frei",total:"gesamt",overview:"\xdcberblick",cleanFs:"Systemprotokolle bereinigen",diagFs:"Dateisystemdiagnose",diagFsSubTitle:"Speicherplatz anzeigen und Schnellbereinigung",systemLogs:"Systemprotokolle",systemLogsToolTip:"Betriebssystem-Protokolldateien",home:"Anwendungsordner",homeToolTip:"Anwendungsdateien und -ordner, Protokolldateien und Containerprojekte",system:"Systemordner",systemToolTip:"Systemdateien und -ordner",unhookNote:"Notiz ablegen",color:"Farbe",valveStatusS:"Sensor {0} - Ventilstatus",setValveStatusS:"Sensor {0} - Sollwertventilstatus",alarmsS:"Sensor {0} - Alarm",temperatureS:"Sensor {0} - Temperatur",humidityS:"Sensor {0} - Luftfeuchtigkeit",co2S:"Sensor {0} - CO2",exportVar:"Variable freigeben",delExportVar:"Ausstellung abbrechen",addNewTag:"Neuen Tag hinzuf\xfcgen",copyTags:"Tags kopieren",pasteTags:"Tags einf\xfcgen",exposedVar:"Exponierte Variable",electricity:"Strom",energy:"Energie",percentage:"Prozentsatz",irradiance:"Bestrahlungsst\xe4rke",signalPower:"Signalst\xe4rke",warningDelDeviceVVar:"Die daraus exportierten Variablen werden ebenfalls gel\xf6scht.",viewExpVarList:"Liste der exponierten Variablen anzeigen",expoVarList:"Exponierte Variablen",velocity:"Geschwindigkeit",delAllTags:"Alle Tags l\xf6schen",sessionExpired:"Sitzung abgelaufen",timeOut:"Verbindungstimeout",serviceUnavailable:"Dienst nicht verf\xfcgbar",redirect:"Sie werden zur Anmeldeseite weitergeleitet.",bacnetBMDSettings:"BACnet BBMD-Einstellungen",passwordReset:"Passwort zur\xfccksetzen",warningAWSCLI:"Sie m\xfcssen das AWS-CLI-Paket installieren, damit {0} ordnungsgem\xe4\xdf startet",confirmPkgInstall:"Paketinstallation best\xe4tigen",pkgNotValid:"Ung\xfcltiges Paket",pkgInstalled:"Installation erfolgreich abgeschlossen",installationAborted:"Installation abgesagt",maintenancePkgs:"Wartungspakete",installMaintenancePkgs:"Wartungspakete installieren",time:"Zeit",invalidCredentials:"Falscher Benutzername oder falsches Passwort",fwUpdate:"Firmware-Update",portDisabled:"Transparent",retroCompYHC:"YHC 700 R\xfcckw\xe4rtskompatibilit\xe4t",infoYhcCompatibility:"Durch die Aktivierung der R\xfcckw\xe4rtskompatibilit\xe4t mit YHC 700 wird es m\xf6glich sein, die \xfcber Ethernet angeschlossenen Steuereinheiten anhand der Slave-Adresse zu erreichen, die f\xfcr jede konfigurierte Steuereinheit unterschiedlich sein muss.",wgVersion:"{0}-Version",finVersion:"FIN Framework-Version",localVersion:"Lokale Version",thermalThrottlingActive:"Thermal Throttling aktiv: CPU-Frequenz wegen \xdcberhitzung reduziert",underVoltageDetected:"Unterspannung erkannt: Netzteil \xfcberpr\xfcfen",serverUnable:"Server konnte nicht kontaktiert werden"};let Zm=e=>e;function eg(e){Zm=null!==e&&void 0!==e?e:e=>e}function tg(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Zm(e,...n)}catch{return e}}var ng=n(579);const rg=(0,t.createContext)(void 0),og=()=>{const e=(0,t.useContext)(rg);if(!e)throw new Error("useLocalization must be used within a LocalizationProvider");return e};function ag(e){return e.startsWith("en")?$m:e.startsWith("it")?Jm:e.startsWith("de")?Qm:(console.warn("Translation for language '".concat(e,"' not found. Falling back to 'en'.")),$m)}function ig(e,t){return e.replace(/\{(\d+)\}/g,((e,n)=>{const r=parseInt(n,10);return null!=t[r]?String(t[r]):""}))}const lg=e=>{let{initialLanguage:n,children:r}=e;const[o,a]=t.useState(n),[i,l]=t.useState((()=>ag(n)));(0,t.useEffect)((()=>{l(ag(o))}),[o]);const c=(0,t.useCallback)((function(e){const t=i[e];if(null!=t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.length?ig(t,r):t.replace(/\{\d+\}/g,"")}const a=e.match(/^(.+?)(\d+)$/);if(a){const e=a[1],t=a[2],n=i[e];if(n)return ig(n,[t])}return e}),[i]);(0,t.useEffect)((()=>(eg(c),()=>eg(null))),[c]);return(0,ng.jsx)(rg.Provider,{value:{language:o,setLanguage:a,translate:c,changeLanguage:e=>a(e)},children:r})},cg=e=>{const{prefixCls:n,className:r,style:o,size:a,shape:i}=e,l=v()({["".concat(n,"-lg")]:"large"===a,["".concat(n,"-sm")]:"small"===a}),c=v()({["".concat(n,"-circle")]:"circle"===i,["".concat(n,"-square")]:"square"===i,["".concat(n,"-round")]:"round"===i}),s=t.useMemo((()=>"number"===typeof a?{width:a,height:a,lineHeight:"".concat(a,"px")}:{}),[a]);return t.createElement("span",{className:v()(n,l,c,r),style:Object.assign(Object.assign({},s),o)})},sg=new Rr("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),dg=e=>({height:e,lineHeight:rn(e)}),ug=e=>Object.assign({width:e},dg(e)),fg=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:sg,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),pg=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},dg(e)),hg=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:a}=e;return{["".concat(t)]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},ug(r)),["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"},["".concat(t).concat(t,"-lg")]:Object.assign({},ug(o)),["".concat(t).concat(t,"-sm")]:Object.assign({},ug(a))}},mg=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:a,gradientFromColor:i,calc:l}=e;return{["".concat(r)]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:n},pg(t,l)),["".concat(r,"-lg")]:Object.assign({},pg(o,l)),["".concat(r,"-sm")]:Object.assign({},pg(a,l))}},gg=e=>Object.assign({width:e},dg(e)),vg=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:a}=e;return{["".concat(t)]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:r,borderRadius:o},gg(a(n).mul(2).equal())),{["".concat(t,"-path")]:{fill:"#bfbfbf"},["".concat(t,"-svg")]:Object.assign(Object.assign({},gg(n)),{maxWidth:a(n).mul(4).equal(),maxHeight:a(n).mul(4).equal()}),["".concat(t,"-svg").concat(t,"-svg-circle")]:{borderRadius:"50%"}}),["".concat(t).concat(t,"-circle")]:{borderRadius:"50%"}}},bg=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{["".concat(n).concat(r,"-circle")]:{width:t,minWidth:t,borderRadius:"50%"},["".concat(n).concat(r,"-round")]:{borderRadius:t}}},yg=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},dg(e)),xg=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:a,gradientFromColor:i,calc:l}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:l(r).mul(2).equal(),minWidth:l(r).mul(2).equal()},yg(r,l))},bg(e,r,n)),{["".concat(n,"-lg")]:Object.assign({},yg(o,l))}),bg(e,o,"".concat(n,"-lg"))),{["".concat(n,"-sm")]:Object.assign({},yg(a,l))}),bg(e,a,"".concat(n,"-sm")))},wg=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:a,skeletonInputCls:i,skeletonImageCls:l,controlHeight:c,controlHeightLG:s,controlHeightSM:d,gradientFromColor:u,padding:f,marginSM:p,borderRadius:h,titleHeight:m,blockRadius:g,paragraphLiHeight:v,controlHeightXS:b,paragraphMarginTop:y}=e;return{["".concat(t)]:{display:"table",width:"100%",["".concat(t,"-header")]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:u},ug(c)),["".concat(n,"-circle")]:{borderRadius:"50%"},["".concat(n,"-lg")]:Object.assign({},ug(s)),["".concat(n,"-sm")]:Object.assign({},ug(d))},["".concat(t,"-content")]:{display:"table-cell",width:"100%",verticalAlign:"top",["".concat(r)]:{width:"100%",height:m,background:u,borderRadius:g,["+ ".concat(o)]:{marginBlockStart:d}},["".concat(o)]:{padding:0,"> li":{width:"100%",height:v,listStyle:"none",background:u,borderRadius:g,"+ li":{marginBlockStart:b}}},["".concat(o,"> li:last-child:not(:first-child):not(:nth-child(2))")]:{width:"61%"}},["&-round ".concat(t,"-content")]:{["".concat(r,", ").concat(o," > li")]:{borderRadius:h}}},["".concat(t,"-with-avatar ").concat(t,"-content")]:{["".concat(r)]:{marginBlockStart:p,["+ ".concat(o)]:{marginBlockStart:y}}},["".concat(t).concat(t,"-element")]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},xg(e)),hg(e)),mg(e)),vg(e)),["".concat(t).concat(t,"-block")]:{width:"100%",["".concat(a)]:{width:"100%"},["".concat(i)]:{width:"100%"}},["".concat(t).concat(t,"-active")]:{["\n        ".concat(r,",\n        ").concat(o," > li,\n        ").concat(n,",\n        ").concat(a,",\n        ").concat(i,",\n        ").concat(l,"\n      ")]:Object.assign({},fg(e))}}},Cg=$o("Skeleton",(e=>{const{componentCls:t,calc:n}=e,r=Ho(e,{skeletonAvatarCls:"".concat(t,"-avatar"),skeletonTitleCls:"".concat(t,"-title"),skeletonParagraphCls:"".concat(t,"-paragraph"),skeletonButtonCls:"".concat(t,"-button"),skeletonInputCls:"".concat(t,"-input"),skeletonImageCls:"".concat(t,"-image"),imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:"linear-gradient(90deg, ".concat(e.gradientFromColor," 25%, ").concat(e.gradientToColor," 37%, ").concat(e.gradientFromColor," 63%)"),skeletonLoadingMotionDuration:"1.4s"});return[wg(r)]}),(e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}}),{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Sg=e=>{const{prefixCls:n,className:r,rootClassName:o,active:a,shape:i="circle",size:l="default"}=e,{getPrefixCls:c}=t.useContext(at),s=c("skeleton",n),[d,u,f]=Cg(s),p=rt(e,["prefixCls","className"]),h=v()(s,"".concat(s,"-element"),{["".concat(s,"-active")]:a},r,o,u,f);return d(t.createElement("div",{className:h},t.createElement(cg,Object.assign({prefixCls:"".concat(s,"-avatar"),shape:i,size:l},p))))},Eg=e=>{const{prefixCls:n,className:r,rootClassName:o,active:a,block:i=!1,size:l="default"}=e,{getPrefixCls:c}=t.useContext(at),s=c("skeleton",n),[d,u,f]=Cg(s),p=rt(e,["prefixCls"]),h=v()(s,"".concat(s,"-element"),{["".concat(s,"-active")]:a,["".concat(s,"-block")]:i},r,o,u,f);return d(t.createElement("div",{className:h},t.createElement(cg,Object.assign({prefixCls:"".concat(s,"-button"),size:l},p))))},kg=e=>{const{prefixCls:n,className:r,rootClassName:o,style:a,active:i}=e,{getPrefixCls:l}=t.useContext(at),c=l("skeleton",n),[s,d,u]=Cg(c),f=v()(c,"".concat(c,"-element"),{["".concat(c,"-active")]:i},r,o,d,u);return s(t.createElement("div",{className:f},t.createElement("div",{className:v()("".concat(c,"-image"),r),style:a},t.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(c,"-image-svg")},t.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:"".concat(c,"-image-path")})))))},jg=e=>{const{prefixCls:n,className:r,rootClassName:o,active:a,block:i,size:l="default"}=e,{getPrefixCls:c}=t.useContext(at),s=c("skeleton",n),[d,u,f]=Cg(s),p=rt(e,["prefixCls"]),h=v()(s,"".concat(s,"-element"),{["".concat(s,"-active")]:a,["".concat(s,"-block")]:i},r,o,u,f);return d(t.createElement("div",{className:h},t.createElement(cg,Object.assign({prefixCls:"".concat(s,"-input"),size:l},p))))};const Ig={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"};var Tg=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Ig}))};const Ag=t.forwardRef(Tg),Og=e=>{const{prefixCls:n,className:r,rootClassName:o,style:a,active:i,children:l}=e,{getPrefixCls:c}=t.useContext(at),s=c("skeleton",n),[d,u,f]=Cg(s),p=v()(s,"".concat(s,"-element"),{["".concat(s,"-active")]:i},u,r,o,f),h=null!==l&&void 0!==l?l:t.createElement(Ag,null);return d(t.createElement("div",{className:p},t.createElement("div",{className:v()("".concat(s,"-image"),r),style:a},h)))},Ng=e=>{const n=t=>{const{width:n,rows:r=2}=e;return Array.isArray(n)?n[t]:r-1===t?n:void 0},{prefixCls:r,className:o,style:a,rows:i}=e,l=nt(Array(i)).map(((e,r)=>t.createElement("li",{key:r,style:{width:n(r)}})));return t.createElement("ul",{className:v()(r,o),style:a},l)},Rg=e=>{let{prefixCls:n,className:r,width:o,style:a}=e;return t.createElement("h3",{className:v()(n,r),style:Object.assign({width:o},a)})};function Pg(e){return e&&"object"===typeof e?e:{}}const Mg=e=>{const{prefixCls:n,loading:r,className:o,rootClassName:a,style:i,children:l,avatar:c=!1,title:s=!0,paragraph:d=!0,active:u,round:f}=e,{getPrefixCls:p,direction:h,skeleton:m}=t.useContext(at),g=p("skeleton",n),[b,y,x]=Cg(g);if(r||!("loading"in e)){const e=!!c,n=!!s,r=!!d;let l,p;if(e){const e=Object.assign(Object.assign({prefixCls:"".concat(g,"-avatar")},function(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}(n,r)),Pg(c));l=t.createElement("div",{className:"".concat(g,"-header")},t.createElement(cg,Object.assign({},e)))}if(n||r){let o,a;if(n){const n=Object.assign(Object.assign({prefixCls:"".concat(g,"-title")},function(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}(e,r)),Pg(s));o=t.createElement(Rg,Object.assign({},n))}if(r){const r=Object.assign(Object.assign({prefixCls:"".concat(g,"-paragraph")},function(e,t){const n={};return e&&t||(n.width="61%"),n.rows=!e&&t?3:2,n}(e,n)),Pg(d));a=t.createElement(Ng,Object.assign({},r))}p=t.createElement("div",{className:"".concat(g,"-content")},o,a)}const w=v()(g,{["".concat(g,"-with-avatar")]:e,["".concat(g,"-active")]:u,["".concat(g,"-rtl")]:"rtl"===h,["".concat(g,"-round")]:f},null===m||void 0===m?void 0:m.className,o,a,y,x);return b(t.createElement("div",{className:w,style:Object.assign(Object.assign({},null===m||void 0===m?void 0:m.style),i)},l,p))}return"undefined"!==typeof l?l:null};Mg.Button=Eg,Mg.Avatar=Sg,Mg.Input=jg,Mg.Image=kg,Mg.Node=Og;const Dg=Mg;const Lg={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var _g=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Lg}))};const zg=t.forwardRef(_g);const Bg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var Fg=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Bg}))};const Hg=t.forwardRef(Fg),Wg=(0,t.createContext)(null);const Vg=function(e){var n=e.activeTabOffset,r=e.horizontal,o=e.rtl,a=e.indicator,i=void 0===a?{}:a,l=i.size,c=i.align,s=void 0===c?"center":c,d=u((0,t.useState)(),2),f=d[0],p=d[1],h=(0,t.useRef)(),m=t.useCallback((function(e){return"function"===typeof l?l(e):"number"===typeof l?l:e}),[l]);function g(){Sa.cancel(h.current)}return(0,t.useEffect)((function(){var e={};if(n)if(r){e.width=m(n.width);var t=o?"right":"left";"start"===s&&(e[t]=n[t]),"center"===s&&(e[t]=n[t]+n.width/2,e.transform=o?"translateX(50%)":"translateX(-50%)"),"end"===s&&(e[t]=n[t]+n.width,e.transform="translateX(-100%)")}else e.height=m(n.height),"start"===s&&(e.top=n.top),"center"===s&&(e.top=n.top+n.height/2,e.transform="translateY(-50%)"),"end"===s&&(e.top=n.top+n.height,e.transform="translateY(-100%)");return g(),h.current=Sa((function(){p(e)})),g}),[n,r,o,s,m]),{style:f}};var Ug={width:0,height:0,left:0,top:0};function Kg(e,n){var r=t.useRef(e),o=u(t.useState({}),2)[1];return[r.current,function(e){var t="function"===typeof e?e(r.current):e;t!==r.current&&n(t,r.current),r.current=t,o({})}]}var Gg=Math.pow(.995,20);function qg(e){var n=u((0,t.useState)(0),2),r=n[0],o=n[1],a=(0,t.useRef)(0),i=(0,t.useRef)();return i.current=e,un((function(){var e;null===(e=i.current)||void 0===e||e.call(i)}),[r]),function(){a.current===r&&(a.current+=1,o(a.current))}}var Xg={width:0,height:0,left:0,top:0,right:0};function Yg(e){var t;return e instanceof Map?(t={},e.forEach((function(e,n){t[n]=e}))):t=e,JSON.stringify(t)}function $g(e){return String(e).replace(/"/g,"TABS_DQ")}function Jg(e,t,n,r){return!(!n||r||!1===e||void 0===e&&(!1===t||null===t))}var Qg=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.editable,a=e.locale,i=e.style;return o&&!1!==o.showAdd?t.createElement("button",{ref:n,type:"button",className:"".concat(r,"-nav-add"),style:i,"aria-label":(null===a||void 0===a?void 0:a.addAriaLabel)||"Add tab",onClick:function(e){o.onEdit("add",{event:e})}},o.addIcon||"+"):null}));const Zg=Qg;var ev=t.forwardRef((function(e,n){var r,o=e.position,a=e.prefixCls,i=e.extra;if(!i)return null;var l={};return"object"!==f(i)||t.isValidElement(i)?l.right=i:l=i,"right"===o&&(r=l.right),"left"===o&&(r=l.left),r?t.createElement("div",{className:"".concat(a,"-extra-content"),ref:n},r):null}));const tv=ev;var nv=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.id,a=e.tabs,i=e.locale,l=e.mobile,c=e.moreIcon,s=void 0===c?"More":c,d=e.moreTransitionName,f=e.style,p=e.className,m=e.editable,g=e.tabBarGutter,b=e.rtl,y=e.removeAriaLabel,x=e.onTabClick,w=e.getPopupContainer,C=e.popupClassName,S=u((0,t.useState)(!1),2),E=S[0],k=S[1],j=u((0,t.useState)(null),2),I=j[0],T=j[1],A="".concat(o,"-more-popup"),O="".concat(r,"-dropdown"),N=null!==I?"".concat(A,"-").concat(I):null,R=null===i||void 0===i?void 0:i.dropdownAriaLabel;var P=t.createElement(Sp,{onClick:function(e){var t=e.key,n=e.domEvent;x(t,n),k(!1)},prefixCls:"".concat(O,"-menu"),id:A,tabIndex:-1,role:"listbox","aria-activedescendant":N,selectedKeys:[I],"aria-label":void 0!==R?R:"expanded dropdown"},a.map((function(e){var n=e.closable,r=e.disabled,a=e.closeIcon,i=e.key,l=e.label,c=Jg(n,a,m,r);return t.createElement(Xf,{key:i,id:"".concat(A,"-").concat(i),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(i),disabled:r},t.createElement("span",null,l),c&&t.createElement("button",{type:"button","aria-label":y||"remove",tabIndex:0,className:"".concat(O,"-menu-item-remove"),onClick:function(e){e.stopPropagation(),function(e,t){e.preventDefault(),e.stopPropagation(),m.onEdit("remove",{key:t,event:e})}(e,i)}},a||m.removeIcon||"\xd7"))})));function M(e){for(var t=a.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===I}))||0,r=t.length,o=0;o<r;o+=1){var i=t[n=(n+e+r)%r];if(!i.disabled)return void T(i.key)}}(0,t.useEffect)((function(){var e=document.getElementById(N);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[I]),(0,t.useEffect)((function(){E||T(null)}),[E]);var D=h({},b?"marginRight":"marginLeft",g);a.length||(D.visibility="hidden",D.order=1);var L=v()(h({},"".concat(O,"-rtl"),b)),_=l?null:t.createElement(Qd,{prefixCls:O,overlay:P,trigger:["hover"],visible:!!a.length&&E,transitionName:d,onVisibleChange:k,overlayClassName:v()(L,C),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:w},t.createElement("button",{type:"button",className:"".concat(r,"-nav-more"),style:D,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":A,id:"".concat(o,"-more"),"aria-expanded":E,onKeyDown:function(e){var t=e.which;if(E)switch(t){case Vd.UP:M(-1),e.preventDefault();break;case Vd.DOWN:M(1),e.preventDefault();break;case Vd.ESC:k(!1);break;case Vd.SPACE:case Vd.ENTER:null!==I&&x(I,e)}else[Vd.DOWN,Vd.SPACE,Vd.ENTER].includes(t)&&(k(!0),e.preventDefault())}},s));return t.createElement("div",{className:v()("".concat(r,"-nav-operations"),p),style:f,ref:n},_,t.createElement(Zg,{prefixCls:r,locale:i,editable:m}))}));const rv=t.memo(nv,(function(e,t){return t.tabMoving}));const ov=function(e){var n=e.prefixCls,r=e.id,o=e.active,a=e.tab,i=a.key,l=a.label,c=a.disabled,s=a.closeIcon,d=a.icon,u=e.closable,f=e.renderWrapper,p=e.removeAriaLabel,m=e.editable,g=e.onClick,b=e.onFocus,y=e.style,x="".concat(n,"-tab"),w=Jg(u,s,m,c);function C(e){c||g(e)}var S=t.useMemo((function(){return d&&"string"===typeof l?t.createElement("span",null,l):l}),[l,d]),E=t.createElement("div",{key:i,"data-node-key":$g(i),className:v()(x,h(h(h({},"".concat(x,"-with-remove"),w),"".concat(x,"-active"),o),"".concat(x,"-disabled"),c)),style:y,onClick:C},t.createElement("div",{role:"tab","aria-selected":o,id:r&&"".concat(r,"-tab-").concat(i),className:"".concat(x,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(i),"aria-disabled":c,tabIndex:c?null:0,onClick:function(e){e.stopPropagation(),C(e)},onKeyDown:function(e){[Vd.SPACE,Vd.ENTER].includes(e.which)&&(e.preventDefault(),C(e))},onFocus:b},d&&t.createElement("span",{className:"".concat(x,"-icon")},d),l&&S),w&&t.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:"".concat(x,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),m.onEdit("remove",{key:i,event:t})}},s||m.removeIcon||"\xd7"));return f?f(E):E};var av=function(e){var t=e.current||{},n=t.offsetWidth,r=void 0===n?0:n,o=t.offsetHeight,a=void 0===o?0:o;if(e.current){var i=e.current.getBoundingClientRect(),l=i.width,c=i.height;if(Math.abs(l-r)<1)return[l,c]}return[r,a]},iv=function(e,t){return e[t?0:1]},lv=t.forwardRef((function(e,n){var r=e.className,o=e.style,i=e.id,l=e.animated,c=e.activeKey,s=e.rtl,d=e.extra,f=e.editable,p=e.locale,m=e.tabPosition,g=e.tabBarGutter,b=e.children,y=e.onTabClick,x=e.onTabScroll,w=e.indicator,C=t.useContext(Wg),S=C.prefixCls,E=C.tabs,k=(0,t.useRef)(null),j=(0,t.useRef)(null),I=(0,t.useRef)(null),T=(0,t.useRef)(null),A=(0,t.useRef)(null),O=(0,t.useRef)(null),N=(0,t.useRef)(null),R="top"===m||"bottom"===m,P=Kg(0,(function(e,t){R&&x&&x({direction:e>t?"left":"right"})})),M=u(P,2),D=M[0],L=M[1],_=Kg(0,(function(e,t){!R&&x&&x({direction:e>t?"top":"bottom"})})),z=u(_,2),B=z[0],F=z[1],H=u((0,t.useState)([0,0]),2),W=H[0],V=H[1],U=u((0,t.useState)([0,0]),2),K=U[0],G=U[1],q=u((0,t.useState)([0,0]),2),X=q[0],Y=q[1],$=u((0,t.useState)([0,0]),2),J=$[0],Q=$[1],Z=function(e){var n=(0,t.useRef)([]),r=u((0,t.useState)({}),2)[1],o=(0,t.useRef)("function"===typeof e?e():e),a=qg((function(){var e=o.current;n.current.forEach((function(t){e=t(e)})),n.current=[],o.current=e,r({})}));return[o.current,function(e){n.current.push(e),a()}]}(new Map),ee=u(Z,2),te=ee[0],ne=ee[1],re=function(e,n,r){return(0,t.useMemo)((function(){for(var t,r=new Map,o=n.get(null===(t=e[0])||void 0===t?void 0:t.key)||Ug,a=o.left+o.width,i=0;i<e.length;i+=1){var l,c=e[i].key,s=n.get(c);s||(s=n.get(null===(l=e[i-1])||void 0===l?void 0:l.key)||Ug);var d=r.get(c)||oe({},s);d.right=a-d.left-d.width,r.set(c,d)}return r}),[e.map((function(e){return e.key})).join("_"),n,r])}(E,te,K[0]),ae=iv(W,R),ie=iv(K,R),le=iv(X,R),ce=iv(J,R),se=ae<ie+le,de=se?ae-ce:ae-le,ue="".concat(S,"-nav-operations-hidden"),fe=0,pe=0;function he(e){return e<fe?fe:e>pe?pe:e}R&&s?(fe=0,pe=Math.max(0,ie-de)):(fe=Math.min(0,de-ie),pe=0);var me=(0,t.useRef)(null),ge=u((0,t.useState)(),2),ve=ge[0],be=ge[1];function ye(){be(Date.now())}function xe(){me.current&&clearTimeout(me.current)}!function(e,n){var r=u((0,t.useState)(),2),o=r[0],a=r[1],i=u((0,t.useState)(0),2),l=i[0],c=i[1],s=u((0,t.useState)(0),2),d=s[0],f=s[1],p=u((0,t.useState)(),2),h=p[0],m=p[1],g=(0,t.useRef)(),v=(0,t.useRef)(),b=(0,t.useRef)(null);b.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;a({x:n,y:r}),window.clearInterval(g.current)},onTouchMove:function(e){if(o){e.preventDefault();var t=e.touches[0],r=t.screenX,i=t.screenY;a({x:r,y:i});var s=r-o.x,d=i-o.y;n(s,d);var u=Date.now();c(u),f(u-l),m({x:s,y:d})}},onTouchEnd:function(){if(o&&(a(null),m(null),h)){var e=h.x/d,t=h.y/d,r=Math.abs(e),i=Math.abs(t);if(Math.max(r,i)<.1)return;var l=e,c=t;g.current=window.setInterval((function(){Math.abs(l)<.01&&Math.abs(c)<.01?window.clearInterval(g.current):n(20*(l*=Gg),20*(c*=Gg))}),20)}},onWheel:function(e){var t=e.deltaX,r=e.deltaY,o=0,a=Math.abs(t),i=Math.abs(r);a===i?o="x"===v.current?t:r:a>i?(o=t,v.current="x"):(o=r,v.current="y"),n(-o,-o)&&e.preventDefault()}},t.useEffect((function(){function t(e){b.current.onTouchMove(e)}function n(e){b.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){b.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){b.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(T,(function(e,t){function n(e,t){e((function(e){return he(e+t)}))}return!!se&&(R?n(L,e):n(F,t),xe(),ye(),!0)})),(0,t.useEffect)((function(){return xe(),ve&&(me.current=setTimeout((function(){be(0)}),100)),xe}),[ve]);var we=function(e,n,r,o,a,i,l){var c,s,d,u=l.tabs,f=l.tabPosition,p=l.rtl;return["top","bottom"].includes(f)?(c="width",s=p?"right":"left",d=Math.abs(r)):(c="height",s="top",d=-r),(0,t.useMemo)((function(){if(!u.length)return[0,0];for(var t=u.length,r=t,o=0;o<t;o+=1){var a=e.get(u[o].key)||Xg;if(a[s]+a[c]>d+n){r=o-1;break}}for(var i=0,l=t-1;l>=0;l-=1)if((e.get(u[l].key)||Xg)[s]<d){i=l+1;break}return i>=r?[0,0]:[i,r]}),[e,n,o,a,i,d,f,u.map((function(e){return e.key})).join("_"),p])}(re,de,R?D:B,ie,le,ce,oe(oe({},e),{},{tabs:E})),Ce=u(we,2),Se=Ce[0],Ee=Ce[1],ke=Mr((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=re.get(e)||{width:0,height:0,left:0,right:0,top:0};if(R){var n=D;s?t.right<D?n=t.right:t.right+t.width>D+de&&(n=t.right+t.width-de):t.left<-D?n=-t.left:t.left+t.width>-D+de&&(n=-(t.left+t.width-de)),F(0),L(he(n))}else{var r=B;t.top<-B?r=-t.top:t.top+t.height>-B+de&&(r=-(t.top+t.height-de)),L(0),F(he(r))}})),je={};"top"===m||"bottom"===m?je[s?"marginRight":"marginLeft"]=g:je.marginTop=g;var Ie=E.map((function(e,n){var r=e.key;return t.createElement(ov,{id:i,prefixCls:S,key:r,tab:e,style:0===n?void 0:je,closable:e.closable,editable:f,active:r===c,renderWrapper:b,removeAriaLabel:null===p||void 0===p?void 0:p.removeAriaLabel,onClick:function(e){y(r,e)},onFocus:function(){ke(r),ye(),T.current&&(s||(T.current.scrollLeft=0),T.current.scrollTop=0)}})})),Te=function(){return ne((function(){var e,t=new Map,n=null===(e=A.current)||void 0===e?void 0:e.getBoundingClientRect();return E.forEach((function(e){var r,o=e.key,a=null===(r=A.current)||void 0===r?void 0:r.querySelector('[data-node-key="'.concat($g(o),'"]'));if(a){var i=function(e,t){var n=e.offsetWidth,r=e.offsetHeight,o=e.offsetTop,a=e.offsetLeft,i=e.getBoundingClientRect(),l=i.width,c=i.height,s=i.x,d=i.y;return Math.abs(l-n)<1?[l,c,s-t.x,d-t.y]:[n,r,a,o]}(a,n),l=u(i,4),c=l[0],s=l[1],d=l[2],f=l[3];t.set(o,{width:c,height:s,left:d,top:f})}})),t}))};(0,t.useEffect)((function(){Te()}),[E.map((function(e){return e.key})).join("_")]);var Ae=qg((function(){var e=av(k),t=av(j),n=av(I);V([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=av(N);Y(r);var o=av(O);Q(o);var a=av(A);G([a[0]-r[0],a[1]-r[1]]),Te()})),Oe=E.slice(0,Se),Ne=E.slice(Ee+1),Re=[].concat(nt(Oe),nt(Ne)),Pe=re.get(c),Me=Vg({activeTabOffset:Pe,horizontal:R,indicator:w,rtl:s}).style;(0,t.useEffect)((function(){ke()}),[c,fe,pe,Yg(Pe),Yg(re),R]),(0,t.useEffect)((function(){Ae()}),[s]);var De,Le,_e,ze,Be=!!Re.length,Fe="".concat(S,"-nav-wrap");return R?s?(Le=D>0,De=D!==pe):(De=D<0,Le=D!==fe):(_e=B<0,ze=B!==fe),t.createElement(as,{onResize:Ae},t.createElement("div",{ref:Fr(n,k),role:"tablist",className:v()("".concat(S,"-nav"),r),style:o,onKeyDown:function(){ye()}},t.createElement(tv,{ref:j,position:"left",extra:d,prefixCls:S}),t.createElement(as,{onResize:Ae},t.createElement("div",{className:v()(Fe,h(h(h(h({},"".concat(Fe,"-ping-left"),De),"".concat(Fe,"-ping-right"),Le),"".concat(Fe,"-ping-top"),_e),"".concat(Fe,"-ping-bottom"),ze)),ref:T},t.createElement(as,{onResize:Ae},t.createElement("div",{ref:A,className:"".concat(S,"-nav-list"),style:{transform:"translate(".concat(D,"px, ").concat(B,"px)"),transition:ve?"none":void 0}},Ie,t.createElement(Zg,{ref:N,prefixCls:S,locale:p,editable:f,style:oe(oe({},0===Ie.length?void 0:je),{},{visibility:Be?"hidden":null})}),t.createElement("div",{className:v()("".concat(S,"-ink-bar"),h({},"".concat(S,"-ink-bar-animated"),l.inkBar)),style:Me}))))),t.createElement(rv,a({},e,{removeAriaLabel:null===p||void 0===p?void 0:p.removeAriaLabel,ref:O,prefixCls:S,tabs:Re,className:!Be&&ue,tabMoving:!!ve})),t.createElement(tv,{ref:I,position:"right",extra:d,prefixCls:S})))}));const cv=lv;var sv=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.className,a=e.style,i=e.id,l=e.active,c=e.tabKey,s=e.children;return t.createElement("div",{id:i&&"".concat(i,"-panel-").concat(c),role:"tabpanel",tabIndex:l?0:-1,"aria-labelledby":i&&"".concat(i,"-tab-").concat(c),"aria-hidden":!l,style:a,className:v()(r,l&&"".concat(r,"-active"),o),ref:n},s)}));const dv=sv;var uv=["renderTabBar"],fv=["label","key"];const pv=function(e){var n=e.renderTabBar,r=m(e,uv),o=t.useContext(Wg).tabs;return n?n(oe(oe({},r),{},{panes:o.map((function(e){var n=e.label,r=e.key,o=m(e,fv);return t.createElement(dv,a({tab:n,key:r,tabKey:r},o))}))}),cv):t.createElement(cv,r)};var hv=["key","forceRender","style","className","destroyInactiveTabPane"];const mv=function(e){var n=e.id,r=e.activeKey,o=e.animated,i=e.tabPosition,l=e.destroyInactiveTabPane,c=t.useContext(Wg),s=c.prefixCls,d=c.tabs,u=o.tabPane,f="".concat(s,"-tabpane");return t.createElement("div",{className:v()("".concat(s,"-content-holder"))},t.createElement("div",{className:v()("".concat(s,"-content"),"".concat(s,"-content-").concat(i),h({},"".concat(s,"-content-animated"),u))},d.map((function(e){var i=e.key,c=e.forceRender,s=e.style,d=e.className,p=e.destroyInactiveTabPane,h=m(e,hv),g=i===r;return t.createElement(xi,a({key:i,visible:g,forceRender:c,removeOnLeave:!(!l&&!p),leavedClassName:"".concat(f,"-hidden")},o.tabPaneMotion),(function(e,r){var o=e.style,l=e.className;return t.createElement(dv,a({},h,{prefixCls:f,id:n,tabKey:i,animated:u,active:g,style:oe(oe({},s),o),className:v()(d,l),ref:r}))}))}))))};var gv=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],vv=0,bv=t.forwardRef((function(e,n){var r=e.id,o=e.prefixCls,i=void 0===o?"rc-tabs":o,l=e.className,c=e.items,s=e.direction,d=e.activeKey,p=e.defaultActiveKey,g=e.editable,b=e.animated,y=e.tabPosition,x=void 0===y?"top":y,w=e.tabBarGutter,C=e.tabBarStyle,S=e.tabBarExtraContent,E=e.locale,k=e.moreIcon,j=e.moreTransitionName,I=e.destroyInactiveTabPane,T=e.renderTabBar,A=e.onChange,O=e.onTabClick,N=e.onTabScroll,R=e.getPopupContainer,P=e.popupClassName,M=e.indicator,D=m(e,gv),L=t.useMemo((function(){return(c||[]).filter((function(e){return e&&"object"===f(e)&&"key"in e}))}),[c]),_="rtl"===s,z=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:oe({inkBar:!0},"object"===f(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(b),B=u((0,t.useState)(!1),2),F=B[0],H=B[1];(0,t.useEffect)((function(){H(ss())}),[]);var W=u(_r((function(){var e;return null===(e=L[0])||void 0===e?void 0:e.key}),{value:d,defaultValue:p}),2),V=W[0],U=W[1],K=u((0,t.useState)((function(){return L.findIndex((function(e){return e.key===V}))})),2),G=K[0],q=K[1];(0,t.useEffect)((function(){var e,t=L.findIndex((function(e){return e.key===V}));-1===t&&(t=Math.max(0,Math.min(G,L.length-1)),U(null===(e=L[t])||void 0===e?void 0:e.key));q(t)}),[L.map((function(e){return e.key})).join("_"),V,G]);var X=u(_r(null,{value:r}),2),Y=X[0],$=X[1];(0,t.useEffect)((function(){r||($("rc-tabs-".concat(vv)),vv+=1)}),[]);var J={id:Y,activeKey:V,animated:z,tabPosition:x,rtl:_,mobile:F},Q=oe(oe({},J),{},{editable:g,locale:E,moreIcon:k,moreTransitionName:j,tabBarGutter:w,onTabClick:function(e,t){null===O||void 0===O||O(e,t);var n=e!==V;U(e),n&&(null===A||void 0===A||A(e))},onTabScroll:N,extra:S,style:C,panes:null,getPopupContainer:R,popupClassName:P,indicator:M});return t.createElement(Wg.Provider,{value:{tabs:L,prefixCls:i}},t.createElement("div",a({ref:n,id:r,className:v()(i,"".concat(i,"-").concat(x),h(h(h({},"".concat(i,"-mobile"),F),"".concat(i,"-editable"),g),"".concat(i,"-rtl"),_),l)},D),t.createElement(pv,a({},Q,{renderTabBar:T})),t.createElement(mv,a({destroyInactiveTabPane:I},J,{animated:z}))))}));const yv=bv,xv={motionAppear:!1,motionEnter:!0,motionLeave:!0};var wv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Cv=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{["".concat(t,"-switch")]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:"opacity ".concat(n)}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:"opacity ".concat(n)}}}}},[Yp(e,"slide-up"),Yp(e,"slide-down")]]},Sv=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:o,colorBorderSecondary:a,itemSelectedColor:i}=e;return{["".concat(t,"-card")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:0,padding:n,background:r,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(a),transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut)},["".concat(t,"-tab-active")]:{color:i,background:e.colorBgContainer},["".concat(t,"-ink-bar")]:{visibility:"hidden"}},["&".concat(t,"-top, &").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginLeft:{_skip_check_:!0,value:rn(o)}}}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)," 0 0")},["".concat(t,"-tab-active")]:{borderBottomColor:e.colorBgContainer}}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"0 0 ".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG))},["".concat(t,"-tab-active")]:{borderTopColor:e.colorBgContainer}}},["&".concat(t,"-left, &").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginTop:rn(o)}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat(rn(e.borderRadiusLG)," 0 0 ").concat(rn(e.borderRadiusLG))}},["".concat(t,"-tab-active")]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)," 0")}},["".concat(t,"-tab-active")]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},Ev=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{["".concat(t,"-dropdown")]:Object.assign(Object.assign({},$r(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},["".concat(t,"-dropdown-menu")]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:"".concat(rn(r)," 0"),overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Yr),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:"".concat(rn(e.paddingXXS)," ").concat(rn(e.paddingSM)),color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},kv=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:o,verticalItemPadding:a,verticalItemMargin:i,calc:l}=e;return{["".concat(t,"-top, ").concat(t,"-bottom")]:{flexDirection:"column",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(r),content:"''"},["".concat(t,"-ink-bar")]:{height:e.lineWidthBold,"&-animated":{transition:"width ".concat(e.motionDurationSlow,", left ").concat(e.motionDurationSlow,",\n            right ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-wrap")]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},["&".concat(t,"-nav-wrap-ping-left::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-right::after")]:{opacity:1}}}},["".concat(t,"-top")]:{["> ".concat(t,"-nav,\n        > div > ").concat(t,"-nav")]:{"&::before":{bottom:0},["".concat(t,"-ink-bar")]:{bottom:0}}},["".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},["".concat(t,"-ink-bar")]:{top:0}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0}},["".concat(t,"-left, ").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{flexDirection:"column",minWidth:l(e.controlHeight).mul(1.25).equal(),["".concat(t,"-tab")]:{padding:a,textAlign:"center"},["".concat(t,"-tab + ").concat(t,"-tab")]:{margin:i},["".concat(t,"-nav-wrap")]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},["&".concat(t,"-nav-wrap-ping-top::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-bottom::after")]:{opacity:1}},["".concat(t,"-ink-bar")]:{width:e.lineWidthBold,"&-animated":{transition:"height ".concat(e.motionDurationSlow,", top ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-list, ").concat(t,"-nav-operations")]:{flex:"1 0 auto",flexDirection:"column"}}},["".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-ink-bar")]:{right:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{marginLeft:{_skip_check_:!0,value:rn(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},["".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,["".concat(t,"-ink-bar")]:{left:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0,marginRight:{_skip_check_:!0,value:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},jv=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,horizontalItemPaddingSM:o,horizontalItemPaddingLG:a}=e;return{[t]:{"&-small":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:a,fontSize:e.titleFontSizeLG}}}},["".concat(t,"-card")]:{["&".concat(t,"-small")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:n}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"0 0 ".concat(rn(e.borderRadius)," ").concat(rn(e.borderRadius))}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"".concat(rn(e.borderRadius)," ").concat(rn(e.borderRadius)," 0 0")}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat(rn(e.borderRadius)," ").concat(rn(e.borderRadius)," 0")}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat(rn(e.borderRadius)," 0 0 ").concat(rn(e.borderRadius))}}}},["&".concat(t,"-large")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:r}}}}}},Iv=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:o,tabsHorizontalItemMargin:a,horizontalItemPadding:i,itemSelectedColor:l,itemColor:c}=e,s="".concat(t,"-tab");return{[s]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:i,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:c,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},eo(e)),"&-btn":{outline:"none",transition:"all 0.3s",["".concat(s,"-icon:not(:last-child)")]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"&:hover":{color:e.colorTextHeading}},"&:hover":{color:r},["&".concat(s,"-active ").concat(s,"-btn")]:{color:l,textShadow:e.tabsActiveTextShadow},["&".concat(s,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed"},["&".concat(s,"-disabled ").concat(s,"-btn, &").concat(s,"-disabled ").concat(t,"-remove")]:{"&:focus, &:active":{color:e.colorTextDisabled}},["& ".concat(s,"-remove ").concat(o)]:{margin:0},["".concat(o,":not(:last-child)")]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},["".concat(s," + ").concat(s)]:{margin:{_skip_check_:!0,value:a}}}},Tv=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:o,calc:a}=e;return{["".concat(t,"-rtl")]:{direction:"rtl",["".concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:{_skip_check_:!0,value:n},["".concat(t,"-tab:last-of-type")]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:rn(e.marginSM)}},["".concat(t,"-tab-remove")]:{marginRight:{_skip_check_:!0,value:rn(e.marginXS)},marginLeft:{_skip_check_:!0,value:rn(a(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav")]:{order:1},["> ".concat(t,"-content-holder")]:{order:0}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav")]:{order:0},["> ".concat(t,"-content-holder")]:{order:1}},["&".concat(t,"-card").concat(t,"-top, &").concat(t,"-card").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginRight:{_skip_check_:!0,value:o},marginLeft:{_skip_check_:!0,value:0}}}}},["".concat(t,"-dropdown-rtl")]:{direction:"rtl"},["".concat(t,"-menu-item")]:{["".concat(t,"-dropdown-rtl")]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Av=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:a,itemActiveColor:i,colorBorderSecondary:l}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{display:"flex",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{position:"relative",display:"flex",flex:"none",alignItems:"center",["".concat(t,"-nav-wrap")]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:"opacity ".concat(e.motionDurationSlow),content:"''",pointerEvents:"none"}},["".concat(t,"-nav-list")]:{position:"relative",display:"flex",transition:"opacity ".concat(e.motionDurationSlow)},["".concat(t,"-nav-operations")]:{display:"flex",alignSelf:"stretch"},["".concat(t,"-nav-operations-hidden")]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},["".concat(t,"-nav-more")]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},["".concat(t,"-nav-add")]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:o},padding:"0 ".concat(rn(e.paddingXS)),background:"transparent",border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(l),borderRadius:"".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)," 0 0"),outline:"none",cursor:"pointer",color:e.colorText,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut),"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:i}},eo(e))},["".concat(t,"-extra-content")]:{flex:"none"},["".concat(t,"-ink-bar")]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),Iv(e)),{["".concat(t,"-content")]:{position:"relative",width:"100%"},["".concat(t,"-content-holder")]:{flex:"auto",minWidth:0,minHeight:0},["".concat(t,"-tabpane")]:{outline:"none","&-hidden":{display:"none"}}}),["".concat(t,"-centered")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-nav-wrap")]:{["&:not([class*='".concat(t,"-nav-wrap-ping'])")]:{justifyContent:"center"}}}}}},Ov=$o("Tabs",(e=>{const t=Ho(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:"0 0 0 ".concat(rn(e.horizontalItemGutter)),tabsHorizontalItemMarginRTL:"0 0 0 ".concat(rn(e.horizontalItemGutter))});return[jv(t),Tv(t),kv(t),Ev(t),Sv(t),Av(t),Cv(t)]}),(e=>{const t=e.controlHeightLG;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:t,cardPadding:"".concat((t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth,"px ").concat(e.padding,"px"),cardPaddingSM:"".concat(1.5*e.paddingXXS,"px ").concat(e.padding,"px"),cardPaddingLG:"".concat(e.paddingXS,"px ").concat(e.padding,"px ").concat(1.5*e.paddingXXS,"px"),titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:"0 0 ".concat(e.margin,"px 0"),horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:"".concat(e.paddingSM,"px 0"),horizontalItemPaddingSM:"".concat(e.paddingXS,"px 0"),horizontalItemPaddingLG:"".concat(e.padding,"px 0"),verticalItemPadding:"".concat(e.paddingXS,"px ").concat(e.paddingLG,"px"),verticalItemMargin:"".concat(e.margin,"px 0 0 0"),itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}));const Nv=()=>null;var Rv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Pv=e=>{var n,r,o,a,i,l,c;const{type:s,className:d,rootClassName:u,size:f,onEdit:p,hideAdd:h,centered:m,addIcon:g,moreIcon:b,popupClassName:y,children:x,items:w,animated:C,style:S,indicatorSize:E,indicator:k}=e,j=Rv(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","moreIcon","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:I}=j,{direction:T,tabs:A,getPrefixCls:O,getPopupContainer:N}=t.useContext(at),R=O("tabs",I),P=lh(R),[M,D,L]=Ov(R,P);let _;"editable-card"===s&&(_={onEdit:(e,t)=>{let{key:n,event:r}=t;null===p||void 0===p||p("add"===e?r:n,e)},removeIcon:t.createElement(zg,null),addIcon:(null!==g&&void 0!==g?g:null===A||void 0===A?void 0:A.addIcon)||t.createElement(Hg,null),showAdd:!0!==h});const z=O();const B=Yi(f),F=function(e,n){if(e)return e;const r=st(n).map((e=>{if(t.isValidElement(e)){const{key:t,props:n}=e,r=n||{},{tab:o}=r,a=wv(r,["tab"]);return Object.assign(Object.assign({key:String(t)},a),{label:o})}return null}));return function(e){return e.filter((e=>e))}(r)}(w,x),H=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return t=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"===typeof n?n:{}),t.tabPane&&(t.tabPaneMotion=Object.assign(Object.assign({},xv),{motionName:Js(e,"switch")})),t}(R,C),W=Object.assign(Object.assign({},null===A||void 0===A?void 0:A.style),S),V={align:null!==(n=null===k||void 0===k?void 0:k.align)&&void 0!==n?n:null===(r=null===A||void 0===A?void 0:A.indicator)||void 0===r?void 0:r.align,size:null!==(l=null!==(a=null!==(o=null===k||void 0===k?void 0:k.size)&&void 0!==o?o:E)&&void 0!==a?a:null===(i=null===A||void 0===A?void 0:A.indicator)||void 0===i?void 0:i.size)&&void 0!==l?l:null===A||void 0===A?void 0:A.indicatorSize};return M(t.createElement(yv,Object.assign({direction:T,getPopupContainer:N,moreTransitionName:"".concat(z,"-slide-up")},j,{items:F,className:v()({["".concat(R,"-").concat(B)]:B,["".concat(R,"-card")]:["card","editable-card"].includes(s),["".concat(R,"-editable-card")]:"editable-card"===s,["".concat(R,"-centered")]:m},null===A||void 0===A?void 0:A.className,d,u,D,L,P),popupClassName:v()(y,D,L,P),style:W,editable:_,moreIcon:null!==(c=null!==b&&void 0!==b?b:null===A||void 0===A?void 0:A.moreIcon)&&void 0!==c?c:t.createElement(jp,null),prefixCls:R,animated:H,indicator:V})))};Pv.TabPane=Nv;const Mv=Pv;var Dv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Lv=e=>{var{prefixCls:n,className:r,hoverable:o=!0}=e,a=Dv(e,["prefixCls","className","hoverable"]);const{getPrefixCls:i}=t.useContext(at),l=i("card",n),c=v()("".concat(l,"-grid"),r,{["".concat(l,"-grid-hoverable")]:o});return t.createElement("div",Object.assign({},a,{className:c}))},_v=e=>{const{antCls:t,componentCls:n,headerHeight:r,cardPaddingBase:o,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:"0 ".concat(rn(o)),color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary),borderRadius:"".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)," 0 0")},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},Yr),{["\n          > ".concat(n,"-typography,\n          > ").concat(n,"-typography-edit-content\n        ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(t,"-tabs-top")]:{clear:"both",marginBottom:a,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary)}}})},zv=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:"\n      ".concat(rn(o)," 0 0 0 ").concat(n,",\n      0 ").concat(rn(o)," 0 0 ").concat(n,",\n      ").concat(rn(o)," ").concat(rn(o)," 0 0 ").concat(n,",\n      ").concat(rn(o)," 0 0 0 ").concat(n," inset,\n      0 ").concat(rn(o)," 0 0 ").concat(n," inset;\n    "),transition:"all ".concat(e.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},Bv=e=>{const{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:o,colorBorderSecondary:a,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(a),display:"flex",borderRadius:"0 0 ".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG))},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:"color ".concat(e.motionDurationMid)},["a:not(".concat(t,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:rn(e.fontHeight),transition:"color ".concat(e.motionDurationMid),"&:hover":{color:e.colorPrimary}},["> ".concat(n)]:{fontSize:o,lineHeight:rn(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(a)}}})},Fv=e=>Object.assign(Object.assign({margin:"".concat(rn(e.calc(e.marginXXS).mul(-1).equal())," 0"),display:"flex"},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},Yr),"&-description":{color:e.colorTextDescription}}),Hv=e=>{const{componentCls:t,cardPaddingBase:n,colorFillAlter:r}=e;return{["".concat(t,"-head")]:{padding:"0 ".concat(rn(n)),background:r,"&-title":{fontSize:e.fontSize}},["".concat(t,"-body")]:{padding:"".concat(rn(e.padding)," ").concat(rn(n))}}},Wv=e=>{const{componentCls:t}=e;return{overflow:"hidden",["".concat(t,"-body")]:{userSelect:"none"}}},Vv=e=>{const{antCls:t,componentCls:n,cardShadow:r,cardHeadPadding:o,colorBorderSecondary:a,boxShadowTertiary:i,cardPaddingBase:l,extraColor:c}=e;return{[n]:Object.assign(Object.assign({},$r(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,["&:not(".concat(n,"-bordered)")]:{boxShadow:i},["".concat(n,"-head")]:_v(e),["".concat(n,"-extra")]:{marginInlineStart:"auto",color:c,fontWeight:"normal",fontSize:e.fontSize},["".concat(n,"-body")]:Object.assign({padding:l,borderRadius:" 0 0 ".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG))},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),["".concat(n,"-grid")]:zv(e),["".concat(n,"-cover")]:{"> *":{display:"block",width:"100%"},["img, img + ".concat(t,"-image-mask")]:{borderRadius:"".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)," 0 0")}},["".concat(n,"-actions")]:Bv(e),["".concat(n,"-meta")]:Fv(e)}),["".concat(n,"-bordered")]:{border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(a),["".concat(n,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(n,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(e.motionDurationMid,", border-color ").concat(e.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:r}},["".concat(n,"-contain-grid")]:{borderRadius:"".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)," 0 0 "),["".concat(n,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(n,"-loading) ").concat(n,"-body")]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},["".concat(n,"-contain-tabs")]:{["> ".concat(n,"-head")]:{minHeight:0,["".concat(n,"-head-title, ").concat(n,"-extra")]:{paddingTop:o}}},["".concat(n,"-type-inner")]:Hv(e),["".concat(n,"-loading")]:Wv(e),["".concat(n,"-rtl")]:{direction:"rtl"}}},Uv=e=>{const{componentCls:t,cardPaddingSM:n,headerHeightSM:r,headerFontSizeSM:o}=e;return{["".concat(t,"-small")]:{["> ".concat(t,"-head")]:{minHeight:r,padding:"0 ".concat(rn(n)),fontSize:o,["> ".concat(t,"-head-wrapper")]:{["> ".concat(t,"-extra")]:{fontSize:e.fontSize}}},["> ".concat(t,"-body")]:{padding:n}},["".concat(t,"-small").concat(t,"-contain-tabs")]:{["> ".concat(t,"-head")]:{["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},Kv=$o("Card",(e=>{const t=Ho(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[Vv(t),Uv(t)]}),(e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:"".concat(e.paddingSM,"px 0"),tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText})));var Gv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const qv=e=>{const{actionClasses:n,actions:r=[],actionStyle:o}=e;return t.createElement("ul",{className:n,style:o},r.map(((e,n)=>{const o="action-".concat(n);return t.createElement("li",{style:{width:"".concat(100/r.length,"%")},key:o},t.createElement("span",null,e))})))},Xv=t.forwardRef(((e,n)=>{const{prefixCls:r,className:o,rootClassName:a,style:i,extra:l,headStyle:c={},bodyStyle:s={},title:d,loading:u,bordered:f=!0,size:p,type:h,cover:m,actions:g,tabList:b,children:y,activeTabKey:x,defaultActiveTabKey:w,tabBarExtraContent:C,hoverable:S,tabProps:E={},classNames:k,styles:j}=e,I=Gv(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:T,direction:A,card:O}=t.useContext(at);const N=e=>{var t;return v()(null===(t=null===O||void 0===O?void 0:O.classNames)||void 0===t?void 0:t[e],null===k||void 0===k?void 0:k[e])},R=e=>{var t;return Object.assign(Object.assign({},null===(t=null===O||void 0===O?void 0:O.styles)||void 0===t?void 0:t[e]),null===j||void 0===j?void 0:j[e])},P=t.useMemo((()=>{let e=!1;return t.Children.forEach(y,(t=>{t&&t.type&&t.type===Lv&&(e=!0)})),e}),[y]),M=T("card",r),[D,L,_]=Kv(M),z=t.createElement(Dg,{loading:!0,active:!0,paragraph:{rows:4},title:!1},y),B=void 0!==x,F=Object.assign(Object.assign({},E),{[B?"activeKey":"defaultActiveKey"]:B?x:w,tabBarExtraContent:C});let H;const W=Yi(p),V=W&&"default"!==W?W:"large",U=b?t.createElement(Mv,Object.assign({size:V},F,{className:"".concat(M,"-head-tabs"),onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:b.map((e=>{var{tab:t}=e,n=Gv(e,["tab"]);return Object.assign({label:t},n)}))})):null;if(d||l||U){const e=v()("".concat(M,"-head"),N("header")),n=v()("".concat(M,"-head-title"),N("title")),r=v()("".concat(M,"-extra"),N("extra")),o=Object.assign(Object.assign({},c),R("header"));H=t.createElement("div",{className:e,style:o},t.createElement("div",{className:"".concat(M,"-head-wrapper")},d&&t.createElement("div",{className:n,style:R("title")},d),l&&t.createElement("div",{className:r,style:R("extra")},l)),U)}const K=v()("".concat(M,"-cover"),N("cover")),G=m?t.createElement("div",{className:K,style:R("cover")},m):null,q=v()("".concat(M,"-body"),N("body")),X=Object.assign(Object.assign({},s),R("body")),Y=t.createElement("div",{className:q,style:X},u?z:y),$=v()("".concat(M,"-actions"),N("actions")),J=g&&g.length?t.createElement(qv,{actionClasses:$,actionStyle:R("actions"),actions:g}):null,Q=rt(I,["onTabChange"]),Z=v()(M,null===O||void 0===O?void 0:O.className,{["".concat(M,"-loading")]:u,["".concat(M,"-bordered")]:f,["".concat(M,"-hoverable")]:S,["".concat(M,"-contain-grid")]:P,["".concat(M,"-contain-tabs")]:b&&b.length,["".concat(M,"-").concat(W)]:W,["".concat(M,"-type-").concat(h)]:!!h,["".concat(M,"-rtl")]:"rtl"===A},o,a,L,_),ee=Object.assign(Object.assign({},null===O||void 0===O?void 0:O.style),i);return D(t.createElement("div",Object.assign({ref:n},Q,{className:Z,style:ee}),H,G,Y,J))}));var Yv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const $v=e=>{const{prefixCls:n,className:r,avatar:o,title:a,description:i}=e,l=Yv(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(at),s=c("card",n),d=v()("".concat(s,"-meta"),r),u=o?t.createElement("div",{className:"".concat(s,"-meta-avatar")},o):null,f=a?t.createElement("div",{className:"".concat(s,"-meta-title")},a):null,p=i?t.createElement("div",{className:"".concat(s,"-meta-description")},i):null,h=f||p?t.createElement("div",{className:"".concat(s,"-meta-detail")},f,p):null;return t.createElement("div",Object.assign({},l,{className:d}),u,h)},Jv=Xv;Jv.Grid=Lv,Jv.Meta=$v;const Qv=Jv;function Zv(e,t){return function(){return e.apply(t,arguments)}}const{toString:eb}=Object.prototype,{getPrototypeOf:tb}=Object,nb=(rb=Object.create(null),e=>{const t=eb.call(e);return rb[t]||(rb[t]=t.slice(8,-1).toLowerCase())});var rb;const ob=e=>(e=e.toLowerCase(),t=>nb(t)===e),ab=e=>t=>typeof t===e,{isArray:ib}=Array,lb=ab("undefined");const cb=ob("ArrayBuffer");const sb=ab("string"),db=ab("function"),ub=ab("number"),fb=e=>null!==e&&"object"===typeof e,pb=e=>{if("object"!==nb(e))return!1;const t=tb(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},hb=ob("Date"),mb=ob("File"),gb=ob("Blob"),vb=ob("FileList"),bb=ob("URLSearchParams");function yb(e,t){let n,r,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),ib(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{const r=o?Object.getOwnPropertyNames(e):Object.keys(e),a=r.length;let i;for(n=0;n<a;n++)i=r[n],t.call(null,e[i],i,e)}}function xb(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const wb="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,Cb=e=>!lb(e)&&e!==wb;const Sb=(Eb="undefined"!==typeof Uint8Array&&tb(Uint8Array),e=>Eb&&e instanceof Eb);var Eb;const kb=ob("HTMLFormElement"),jb=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),Ib=ob("RegExp"),Tb=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};yb(n,((n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)})),Object.defineProperties(e,r)},Ab="abcdefghijklmnopqrstuvwxyz",Ob="0123456789",Nb={DIGIT:Ob,ALPHA:Ab,ALPHA_DIGIT:Ab+Ab.toUpperCase()+Ob};const Rb=ob("AsyncFunction"),Pb={isArray:ib,isArrayBuffer:cb,isBuffer:function(e){return null!==e&&!lb(e)&&null!==e.constructor&&!lb(e.constructor)&&db(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||db(e.append)&&("formdata"===(t=nb(e))||"object"===t&&db(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&cb(e.buffer),t},isString:sb,isNumber:ub,isBoolean:e=>!0===e||!1===e,isObject:fb,isPlainObject:pb,isUndefined:lb,isDate:hb,isFile:mb,isBlob:gb,isRegExp:Ib,isFunction:db,isStream:e=>fb(e)&&db(e.pipe),isURLSearchParams:bb,isTypedArray:Sb,isFileList:vb,forEach:yb,merge:function e(){const{caseless:t}=Cb(this)&&this||{},n={},r=(r,o)=>{const a=t&&xb(n,o)||o;pb(n[a])&&pb(r)?n[a]=e(n[a],r):pb(r)?n[a]=e({},r):ib(r)?n[a]=r.slice():n[a]=r};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&yb(arguments[o],r);return n},extend:function(e,t,n){let{allOwnKeys:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return yb(t,((t,r)=>{n&&db(t)?e[r]=Zv(t,n):e[r]=t}),{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&tb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:nb,kindOfTest:ob,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ib(e))return e;let t=e.length;if(!ub(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:kb,hasOwnProperty:jb,hasOwnProp:jb,reduceDescriptors:Tb,freezeMethods:e=>{Tb(e,((t,n)=>{if(db(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];db(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return ib(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:xb,global:wb,isContextDefined:Cb,ALPHABET:Nb,generateString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nb.ALPHA_DIGIT,n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&db(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(fb(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ib(e)?[]:{};return yb(e,((e,t)=>{const a=n(e,r+1);!lb(a)&&(o[t]=a)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Rb,isThenable:e=>e&&(fb(e)||db(e))&&db(e.then)&&db(e.catch)};function Mb(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Pb.inherits(Mb,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Pb.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Db=Mb.prototype,Lb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Lb[e]={value:e}})),Object.defineProperties(Mb,Lb),Object.defineProperty(Db,"isAxiosError",{value:!0}),Mb.from=(e,t,n,r,o,a)=>{const i=Object.create(Db);return Pb.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Mb.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const _b=Mb;function zb(e){return Pb.isPlainObject(e)||Pb.isArray(e)}function Bb(e){return Pb.endsWith(e,"[]")?e.slice(0,-2):e}function Fb(e,t,n){return e?e.concat(t).map((function(e,t){return e=Bb(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Hb=Pb.toFlatObject(Pb,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Wb=function(e,t,n){if(!Pb.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Pb.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Pb.isUndefined(t[e])}))).metaTokens,o=n.visitor||s,a=n.dots,i=n.indexes,l=(n.Blob||"undefined"!==typeof Blob&&Blob)&&Pb.isSpecCompliantForm(t);if(!Pb.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Pb.isDate(e))return e.toISOString();if(!l&&Pb.isBlob(e))throw new _b("Blob is not supported. Use a Buffer instead.");return Pb.isArrayBuffer(e)||Pb.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function s(e,n,o){let l=e;if(e&&!o&&"object"===typeof e)if(Pb.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Pb.isArray(e)&&function(e){return Pb.isArray(e)&&!e.some(zb)}(e)||(Pb.isFileList(e)||Pb.endsWith(n,"[]"))&&(l=Pb.toArray(e)))return n=Bb(n),l.forEach((function(e,r){!Pb.isUndefined(e)&&null!==e&&t.append(!0===i?Fb([n],r,a):null===i?n:n+"[]",c(e))})),!1;return!!zb(e)||(t.append(Fb(o,n,a),c(e)),!1)}const d=[],u=Object.assign(Hb,{defaultVisitor:s,convertValue:c,isVisitable:zb});if(!Pb.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Pb.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),Pb.forEach(n,(function(n,a){!0===(!(Pb.isUndefined(n)||null===n)&&o.call(t,n,Pb.isString(a)?a.trim():a,r,u))&&e(n,r?r.concat(a):[a])})),d.pop()}}(e),t};function Vb(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Ub(e,t){this._pairs=[],e&&Wb(e,this,t)}const Kb=Ub.prototype;Kb.append=function(e,t){this._pairs.push([e,t])},Kb.toString=function(e){const t=e?function(t){return e.call(this,t,Vb)}:Vb;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Gb=Ub;function qb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xb(e,t,n){if(!t)return e;const r=n&&n.encode||qb,o=n&&n.serialize;let a;if(a=o?o(t,n):Pb.isURLSearchParams(t)?t.toString():new Gb(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const Yb=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Pb.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$b={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Jb={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:Gb,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Qb="undefined"!==typeof window&&"undefined"!==typeof document,Zb=(ey="undefined"!==typeof navigator&&navigator.product,Qb&&["ReactNative","NativeScript","NS"].indexOf(ey)<0);var ey;const ty="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,ny={...e,...Jb};const ry=function(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),l=o>=e.length;if(a=!a&&Pb.isArray(r)?r.length:a,l)return Pb.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i;r[a]&&Pb.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],o)&&Pb.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!i}if(Pb.isFormData(e)&&Pb.isFunction(e.entries)){const n={};return Pb.forEachEntry(e,((e,r)=>{t(function(e){return Pb.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const oy={transitional:$b,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Pb.isObject(e);o&&Pb.isHTMLForm(e)&&(e=new FormData(e));if(Pb.isFormData(e))return r?JSON.stringify(ry(e)):e;if(Pb.isArrayBuffer(e)||Pb.isBuffer(e)||Pb.isStream(e)||Pb.isFile(e)||Pb.isBlob(e))return e;if(Pb.isArrayBufferView(e))return e.buffer;if(Pb.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Wb(e,new ny.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ny.isNode&&Pb.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=Pb.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Wb(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Pb.isString(e))try{return(t||JSON.parse)(e),Pb.trim(e)}catch(r5){if("SyntaxError"!==r5.name)throw r5}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||oy.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Pb.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(r5){if(n){if("SyntaxError"===r5.name)throw _b.from(r5,_b.ERR_BAD_RESPONSE,this,null,this.response);throw r5}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ny.classes.FormData,Blob:ny.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Pb.forEach(["delete","get","head","post","put","patch"],(e=>{oy.headers[e]={}}));const ay=oy,iy=Pb.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ly=Symbol("internals");function cy(e){return e&&String(e).trim().toLowerCase()}function sy(e){return!1===e||null==e?e:Pb.isArray(e)?e.map(sy):String(e)}function dy(e,t,n,r,o){return Pb.isFunction(r)?r.call(this,t,n):(o&&(t=n),Pb.isString(t)?Pb.isString(r)?-1!==t.indexOf(r):Pb.isRegExp(r)?r.test(t):void 0:void 0)}class uy{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=cy(t);if(!o)throw new Error("header name must be a non-empty string");const a=Pb.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=sy(e))}const a=(e,t)=>Pb.forEach(e,((e,n)=>o(e,n,t)));return Pb.isPlainObject(e)||e instanceof this.constructor?a(e,t):Pb.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&iy[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=cy(e)){const n=Pb.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Pb.isFunction(t))return t.call(this,e,n);if(Pb.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=cy(e)){const n=Pb.findKey(this,e);return!(!n||void 0===this[n]||t&&!dy(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=cy(e)){const o=Pb.findKey(n,e);!o||t&&!dy(0,n[o],o,t)||(delete n[o],r=!0)}}return Pb.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!dy(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Pb.forEach(this,((r,o)=>{const a=Pb.findKey(n,o);if(a)return t[a]=sy(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=sy(r),n[i]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return Pb.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Pb.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,n]=e;return t+": "+n})).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((e=>t.set(e))),t}static accessor(e){const t=(this[ly]=this[ly]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=cy(e);t[r]||(!function(e,t){const n=Pb.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Pb.isArray(e)?e.forEach(r):r(e),this}}uy.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Pb.reduceDescriptors(uy.prototype,((e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}})),Pb.freezeMethods(uy);const fy=uy;function py(e,t){const n=this||ay,r=t||n,o=fy.from(r.headers);let a=r.data;return Pb.forEach(e,(function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function hy(e){return!(!e||!e.__CANCEL__)}function my(e,t,n){_b.call(this,null==e?"canceled":e,_b.ERR_CANCELED,t,n),this.name="CanceledError"}Pb.inherits(my,_b,{__CANCEL__:!0});const gy=my;const vy=ny.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];Pb.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Pb.isString(r)&&i.push("path="+r),Pb.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function by(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const yy=ny.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Pb.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};const xy=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(l){const c=Date.now(),s=r[i];o||(o=c),n[a]=l,r[a]=c;let d=i,u=0;for(;d!==a;)u+=n[d++],d%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-o<t)return;const f=s&&c-s;return f?Math.round(1e3*u/f):void 0}};function wy(e,t){let n=0;const r=xy(50,250);return o=>{const a=o.loaded,i=o.lengthComputable?o.total:void 0,l=a-n,c=r(l);n=a;const s={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&a<=i?(i-a)/c:void 0,event:o};s[t?"download":"upload"]=!0,e(s)}}const Cy="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=fy.from(e.headers).normalize();let a,i,{responseType:l,withXSRFToken:c}=e;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(Pb.isFormData(r))if(ny.hasStandardBrowserEnv||ny.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const u=by(e.baseURL,e.url);function f(){if(!d)return;const r=fy.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new _b("Request failed with status code "+n.status,[_b.ERR_BAD_REQUEST,_b.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:l&&"text"!==l&&"json"!==l?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:e,request:d}),d=null}if(d.open(e.method.toUpperCase(),Xb(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=f:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(f)},d.onabort=function(){d&&(n(new _b("Request aborted",_b.ECONNABORTED,e,d)),d=null)},d.onerror=function(){n(new _b("Network Error",_b.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||$b;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new _b(t,r.clarifyTimeoutError?_b.ETIMEDOUT:_b.ECONNABORTED,e,d)),d=null},ny.hasStandardBrowserEnv&&(c&&Pb.isFunction(c)&&(c=c(e)),c||!1!==c&&yy(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&vy.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in d&&Pb.forEach(o.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),Pb.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&"json"!==l&&(d.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",wy(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",wy(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{d&&(n(!t||t.type?new gy(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);p&&-1===ny.protocols.indexOf(p)?n(new _b("Unsupported protocol "+p+":",_b.ERR_BAD_REQUEST,e)):d.send(r||null)}))},Sy={http:null,xhr:Cy};Pb.forEach(Sy,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r5){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ey=e=>"- ".concat(e),ky=e=>Pb.isFunction(e)||null===e||!1===e,jy=e=>{e=Pb.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){let t;if(n=e[a],r=n,!ky(n)&&(r=Sy[(t=String(n)).toLowerCase()],void 0===r))throw new _b("Unknown adapter '".concat(t,"'"));if(r)break;o[t||"#"+a]=r}if(!r){const e=Object.entries(o).map((e=>{let[t,n]=e;return"adapter ".concat(t," ")+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=t?e.length>1?"since :\n"+e.map(Ey).join("\n"):" "+Ey(e[0]):"as no adapter specified";throw new _b("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Iy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gy(null,e)}function Ty(e){Iy(e),e.headers=fy.from(e.headers),e.data=py.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return jy(e.adapter||ay.adapter)(e).then((function(t){return Iy(e),t.data=py.call(e,e.transformResponse,t),t.headers=fy.from(t.headers),t}),(function(t){return hy(t)||(Iy(e),t&&t.response&&(t.response.data=py.call(e,e.transformResponse,t.response),t.response.headers=fy.from(t.response.headers))),Promise.reject(t)}))}const Ay=e=>e instanceof fy?{...e}:e;function Oy(e,t){t=t||{};const n={};function r(e,t,n){return Pb.isPlainObject(e)&&Pb.isPlainObject(t)?Pb.merge.call({caseless:n},e,t):Pb.isPlainObject(t)?Pb.merge({},t):Pb.isArray(t)?t.slice():t}function o(e,t,n){return Pb.isUndefined(t)?Pb.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!Pb.isUndefined(t))return r(void 0,t)}function i(e,t){return Pb.isUndefined(t)?Pb.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function l(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(e,t)=>o(Ay(e),Ay(t),!0)};return Pb.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=c[r]||o,i=a(e[r],t[r],r);Pb.isUndefined(i)&&a!==l||(n[r]=i)})),n}const Ny="1.6.8",Ry={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ry[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Py={};Ry.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new _b(r(o," has been removed"+(t?" in "+t:"")),_b.ERR_DEPRECATED);return t&&!Py[o]&&(Py[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};const My={assertOptions:function(e,t,n){if("object"!==typeof e)throw new _b("options must be an object",_b.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new _b("option "+a+" must be "+n,_b.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new _b("Unknown option "+a,_b.ERR_BAD_OPTION)}},validators:Ry},Dy=My.validators;class Ly{constructor(e){this.defaults=e,this.interceptors={request:new Yb,response:new Yb}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=Oy(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&My.assertOptions(n,{silentJSONParsing:Dy.transitional(Dy.boolean),forcedJSONParsing:Dy.transitional(Dy.boolean),clarifyTimeoutError:Dy.transitional(Dy.boolean)},!1),null!=r&&(Pb.isFunction(r)?t.paramsSerializer={serialize:r}:My.assertOptions(r,{encode:Dy.function,serialize:Dy.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&Pb.merge(o.common,o[t.method]);o&&Pb.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=fy.concat(a,o);const i=[];let l=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let s;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!l){const e=[Ty.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),d=e.length,s=Promise.resolve(t);u<d;)s=s.then(e[u++],e[u++]);return s}d=i.length;let f=t;for(u=0;u<d;){const e=i[u++],t=i[u++];try{f=e(f)}catch(p){t.call(this,p);break}}try{s=Ty.call(this,f)}catch(p){return Promise.reject(p)}for(u=0,d=c.length;u<d;)s=s.then(c[u++],c[u++]);return s}getUri(e){return Xb(by((e=Oy(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Pb.forEach(["delete","get","head","options"],(function(e){Ly.prototype[e]=function(t,n){return this.request(Oy(n||{},{method:e,url:t,data:(n||{}).data}))}})),Pb.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Oy(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ly.prototype[e]=t(),Ly.prototype[e+"Form"]=t(!0)}));const _y=Ly;class zy{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new gy(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new zy((function(t){e=t})),cancel:e}}}const By=zy;const Fy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fy).forEach((e=>{let[t,n]=e;Fy[n]=t}));const Hy=Fy;const Wy=function e(t){const n=new _y(t),r=Zv(_y.prototype.request,n);return Pb.extend(r,_y.prototype,n,{allOwnKeys:!0}),Pb.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Oy(t,n))},r}(ay);Wy.Axios=_y,Wy.CanceledError=gy,Wy.CancelToken=By,Wy.isCancel=hy,Wy.VERSION=Ny,Wy.toFormData=Wb,Wy.AxiosError=_b,Wy.Cancel=Wy.CanceledError,Wy.all=function(e){return Promise.all(e)},Wy.spread=function(e){return function(t){return e.apply(null,t)}},Wy.isAxiosError=function(e){return Pb.isObject(e)&&!0===e.isAxiosError},Wy.mergeConfig=Oy,Wy.AxiosHeaders=fy,Wy.formToJSON=e=>ry(Pb.isHTMLForm(e)?new FormData(e):e),Wy.getAdapter=jy,Wy.HttpStatusCode=Hy,Wy.default=Wy;const Vy=Wy;const Uy={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var Ky=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Uy}))};const Gy=t.forwardRef(Ky);const qy={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var Xy=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:qy}))};const Yy=t.forwardRef(Xy);const $y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var Jy=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:$y}))};const Qy=t.forwardRef(Jy);const Zy={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var ex=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Zy}))};const tx=t.forwardRef(ex),nx=(e,n)=>{const r=t.useContext(du),o=t.useMemo((()=>{var t;const o=n||au[e],a=null!==(t=null===r||void 0===r?void 0:r[e])&&void 0!==t?t:{};return Object.assign(Object.assign({},"function"===typeof o?o():o),a||{})}),[e,n,r]);return[o,t.useMemo((()=>{const e=null===r||void 0===r?void 0:r.locale;return(null===r||void 0===r?void 0:r.exist)&&!e?au.locale:e}),[r])]};function rx(e){return!(!e||!e.then)}const ox=e=>{const{type:n,children:r,prefixCls:o,buttonProps:a,close:i,autoFocus:l,emitEvent:c,isSilent:s,quitOnNullishReturnValue:d,actionFn:u}=e,f=t.useRef(!1),p=t.useRef(null),[h,m]=Dr(!1),g=function(){null===i||void 0===i||i.apply(void 0,arguments)};t.useEffect((()=>{let e=null;return l&&(e=setTimeout((()=>{var e;null===(e=p.current)||void 0===e||e.focus()}))),()=>{e&&clearTimeout(e)}}),[]);return t.createElement(ac,Object.assign({},ul(n),{onClick:e=>{if(f.current)return;if(f.current=!0,!u)return void g();let t;if(c){if(t=u(e),d&&!rx(t))return f.current=!1,void g(e)}else if(u.length)t=u(i),f.current=!1;else if(t=u(),!t)return void g();(e=>{rx(e)&&(m(!0),e.then((function(){m(!1,!0),g.apply(void 0,arguments),f.current=!1}),(e=>{if(m(!1,!0),f.current=!1,!(null===s||void 0===s?void 0:s()))return Promise.reject(e)})))})(t)},loading:h,prefixCls:o},a,{ref:p}),r)},ax=t.createContext({}),{Provider:ix}=ax,lx=()=>{const{autoFocusButton:e,cancelButtonProps:n,cancelTextLocale:r,isSilent:o,mergedOkCancel:a,rootPrefixCls:i,close:l,onCancel:c,onConfirm:s}=(0,t.useContext)(ax);return a?t.createElement(ox,{isSilent:o,actionFn:c,close:function(){null===l||void 0===l||l.apply(void 0,arguments),null===s||void 0===s||s(!1)},autoFocus:"cancel"===e,buttonProps:n,prefixCls:"".concat(i,"-btn")},r):null},cx=()=>{const{autoFocusButton:e,close:n,isSilent:r,okButtonProps:o,rootPrefixCls:a,okTextLocale:i,okType:l,onConfirm:c,onOk:s}=(0,t.useContext)(ax);return t.createElement(ox,{isSilent:r,type:l||"primary",actionFn:s,close:function(){null===n||void 0===n||n.apply(void 0,arguments),null===c||void 0===c||c(!0)},autoFocus:"ok"===e,buttonProps:o,prefixCls:"".concat(a,"-btn")},i)};var sx=t.createContext({}),dx="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n    alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n    charSet checked classID className colSpan cols content contentEditable contextMenu\n    controls coords crossOrigin data dateTime default defer dir disabled download draggable\n    encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n    headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n    is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n    mediaGroup method min minLength multiple muted name noValidate nonce open\n    optimum pattern placeholder poster preload radioGroup readOnly rel required\n    reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n    shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n    summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n    onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n    onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n    onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n    onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n    onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n    onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),ux="aria-",fx="data-";function px(e,t){return 0===e.indexOf(t)}function hx(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:oe({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||px(n,ux))||t.data&&px(n,fx)||t.attr&&dx.includes(n))&&(r[n]=e[n])})),r}function mx(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function gx(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var o=e.document;"number"!==typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}const vx=t.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate}));var bx={width:0,height:0,overflow:"hidden",outline:"none"},yx=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.className,i=e.style,l=e.title,c=e.ariaId,s=e.footer,d=e.closable,u=e.closeIcon,f=e.onClose,p=e.children,h=e.bodyStyle,m=e.bodyProps,g=e.modalRender,b=e.onMouseDown,y=e.onMouseUp,x=e.holderRef,w=e.visible,C=e.forceRender,S=e.width,E=e.height,k=e.classNames,j=e.styles,I=Fr(x,t.useContext(sx).panel),T=(0,t.useRef)(),A=(0,t.useRef)();t.useImperativeHandle(n,(function(){return{focus:function(){var e;null===(e=T.current)||void 0===e||e.focus()},changeActive:function(e){var t=document.activeElement;e&&t===A.current?T.current.focus():e||t!==T.current||A.current.focus()}}}));var O,N,R,P={};void 0!==S&&(P.width=S),void 0!==E&&(P.height=E),s&&(O=t.createElement("div",{className:v()("".concat(r,"-footer"),null===k||void 0===k?void 0:k.footer),style:oe({},null===j||void 0===j?void 0:j.footer)},s)),l&&(N=t.createElement("div",{className:v()("".concat(r,"-header"),null===k||void 0===k?void 0:k.header),style:oe({},null===j||void 0===j?void 0:j.header)},t.createElement("div",{className:"".concat(r,"-title"),id:c},l))),d&&(R=t.createElement("button",{type:"button",onClick:f,"aria-label":"Close",className:"".concat(r,"-close")},u||t.createElement("span",{className:"".concat(r,"-close-x")})));var M=t.createElement("div",{className:v()("".concat(r,"-content"),null===k||void 0===k?void 0:k.content),style:null===j||void 0===j?void 0:j.content},R,N,t.createElement("div",a({className:v()("".concat(r,"-body"),null===k||void 0===k?void 0:k.body),style:oe(oe({},h),null===j||void 0===j?void 0:j.body)},m),p),O);return t.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":l?c:null,"aria-modal":"true",ref:I,style:oe(oe({},i),P),className:v()(r,o),onMouseDown:b,onMouseUp:y},t.createElement("div",{tabIndex:0,ref:T,style:bx,"aria-hidden":"true"}),t.createElement(vx,{shouldUpdate:w||C},g?g(M):M),t.createElement("div",{tabIndex:0,ref:A,style:bx,"aria-hidden":"true"}))}));const xx=yx;var wx=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.title,i=e.style,l=e.className,c=e.visible,s=e.forceRender,d=e.destroyOnClose,f=e.motionName,p=e.ariaId,h=e.onVisibleChanged,m=e.mousePosition,g=(0,t.useRef)(),b=u(t.useState(),2),y=b[0],x=b[1],w={};function C(){var e=function(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=gx(o),n.top+=gx(o,!0),n}(g.current);x(m?"".concat(m.x-e.left,"px ").concat(m.y-e.top,"px"):"")}return y&&(w.transformOrigin=y),t.createElement(xi,{visible:c,onVisibleChanged:h,onAppearPrepare:C,onEnterPrepare:C,forceRender:s,motionName:f,removeOnLeave:d,ref:g},(function(c,s){var d=c.className,u=c.style;return t.createElement(xx,a({},e,{ref:n,title:o,ariaId:p,prefixCls:r,holderRef:s,style:oe(oe(oe({},u),i),w),className:v()(l,d)}))}))}));wx.displayName="Content";const Cx=wx;function Sx(e){var n=e.prefixCls,r=e.style,o=e.visible,i=e.maskProps,l=e.motionName,c=e.className;return t.createElement(xi,{key:"mask",visible:o,motionName:l,leavedClassName:"".concat(n,"-mask-hidden")},(function(e,o){var l=e.className,s=e.style;return t.createElement("div",a({ref:o,style:oe(oe({},s),r),className:v()("".concat(n,"-mask"),l,c)},i))}))}function Ex(e){var n=e.prefixCls,r=void 0===n?"rc-dialog":n,o=e.zIndex,i=e.visible,l=void 0!==i&&i,c=e.keyboard,s=void 0===c||c,d=e.focusTriggerAfterClose,f=void 0===d||d,p=e.wrapStyle,h=e.wrapClassName,m=e.wrapProps,g=e.onClose,b=e.afterOpenChange,y=e.afterClose,x=e.transitionName,w=e.animation,C=e.closable,S=void 0===C||C,E=e.mask,k=void 0===E||E,j=e.maskTransitionName,I=e.maskAnimation,T=e.maskClosable,A=void 0===T||T,O=e.maskStyle,N=e.maskProps,R=e.rootClassName,P=e.classNames,M=e.styles;var D=(0,t.useRef)(),L=(0,t.useRef)(),_=(0,t.useRef)(),z=u(t.useState(l),2),B=z[0],F=z[1],H=cs();function W(e){null===g||void 0===g||g(e)}var V=(0,t.useRef)(!1),U=(0,t.useRef)(),K=null;return A&&(K=function(e){V.current?V.current=!1:L.current===e.target&&W(e)}),(0,t.useEffect)((function(){l&&(F(!0),ie(L.current,document.activeElement)||(D.current=document.activeElement))}),[l]),(0,t.useEffect)((function(){return function(){clearTimeout(U.current)}}),[]),t.createElement("div",a({className:v()("".concat(r,"-root"),R)},hx(e,{data:!0})),t.createElement(Sx,{prefixCls:r,visible:k&&l,motionName:mx(r,j,I),style:oe(oe({zIndex:o},O),null===M||void 0===M?void 0:M.mask),maskProps:N,className:null===P||void 0===P?void 0:P.mask}),t.createElement("div",a({tabIndex:-1,onKeyDown:function(e){if(s&&e.keyCode===Vd.ESC)return e.stopPropagation(),void W(e);l&&e.keyCode===Vd.TAB&&_.current.changeActive(!e.shiftKey)},className:v()("".concat(r,"-wrap"),h,null===P||void 0===P?void 0:P.wrapper),ref:L,onClick:K,style:oe(oe(oe({zIndex:o},p),null===M||void 0===M?void 0:M.wrapper),{},{display:B?null:"none"})},m),t.createElement(Cx,a({},e,{onMouseDown:function(){clearTimeout(U.current),V.current=!0},onMouseUp:function(){U.current=setTimeout((function(){V.current=!1}))},ref:_,closable:S,ariaId:H,prefixCls:r,visible:l&&B,onClose:W,onVisibleChanged:function(e){if(e)!function(){var e;ie(L.current,document.activeElement)||null===(e=_.current)||void 0===e||e.focus()}();else{if(F(!1),k&&D.current&&f){try{D.current.focus({preventScroll:!0})}catch(r5){}D.current=null}B&&(null===y||void 0===y||y())}null===b||void 0===b||b(e)},motionName:mx(r,x,w)}))))}var kx=function(e){var n=e.visible,r=e.getContainer,o=e.forceRender,i=e.destroyOnClose,l=void 0!==i&&i,c=e.afterClose,s=e.panelRef,d=u(t.useState(n),2),f=d[0],p=d[1],h=t.useMemo((function(){return{panel:s}}),[s]);return t.useEffect((function(){n&&p(!0)}),[n]),o||!l||f?t.createElement(sx.Provider,{value:h},t.createElement(Tc,{open:n||o||f,autoDestroy:!1,getContainer:r,autoLock:n||f},t.createElement(Ex,a({},e,{destroyOnClose:l,afterClose:function(){null===c||void 0===c||c(),p(!1)}})))):null};kx.displayName="Dialog";const jx=kx;const Ix=function(e,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.createElement(zg,null);if(!function(e,t,n){return"boolean"===typeof e?e:void 0===t?!!n:!1!==t&&null!==t}(e,n,arguments.length>4&&void 0!==arguments[4]&&arguments[4]))return[!1,null];const a="boolean"===typeof n||void 0===n||null===n?o:n;return[!0,r?r(a):a]};var Tx="RC_FORM_INTERNAL_HOOKS",Ax=function(){Ie(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const Ox=t.createContext({getFieldValue:Ax,getFieldsValue:Ax,getFieldError:Ax,getFieldWarning:Ax,getFieldsError:Ax,isFieldsTouched:Ax,isFieldTouched:Ax,isFieldValidating:Ax,isFieldsValidating:Ax,resetFields:Ax,setFields:Ax,setFieldValue:Ax,setFieldsValue:Ax,validateFields:Ax,submit:Ax,getInternalHooks:function(){return Ax(),{dispatch:Ax,initEntityValue:Ax,registerField:Ax,useSubscribe:Ax,setInitialValues:Ax,destroyForm:Ax,setCallbacks:Ax,registerWatch:Ax,getFields:Ax,setValidateMessages:Ax,setPreserve:Ax,getInitialValue:Ax}}});const Nx=t.createContext(null);function Rx(e){return void 0===e||null===e?[]:Array.isArray(e)?e:[e]}function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Px.apply(this,arguments)}function Mx(e){return Mx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mx(e)}function Dx(e,t){return Dx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dx(e,t)}function Lx(e,t,n){return Lx=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r5){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Dx(o,n.prototype),o},Lx.apply(null,arguments)}function _x(e){var t="function"===typeof Map?new Map:void 0;return _x=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Lx(e,arguments,Mx(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Dx(r,e)},_x(e)}var zx=/%[sdj%]/g;function Bx(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function Fx(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,a=n.length;return"function"===typeof e?e.apply(null,n):"string"===typeof e?e.replace(zx,(function(e){if("%%"===e)return"%";if(o>=a)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(t){return"[Circular]"}break;default:return e}})):e}function Hx(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!==typeof e||e))}function Wx(e,t,n){var r=0,o=e.length;!function a(i){if(i&&i.length)n(i);else{var l=r;r+=1,l<o?t(e[l],a):n([])}}([])}var Vx=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,"Async Validation Error")||this).errors=t,r.fields=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Dx(t,n),r}(_x(Error));function Ux(e,t,n,r,o){if(t.first){var a=new Promise((function(t,a){var i=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n]||[])})),t}(e);Wx(i,n,(function(e){return r(e),e.length?a(new Vx(e,Bx(e))):t(o)}))}));return a.catch((function(e){return e})),a}var i=!0===t.firstFields?Object.keys(e):t.firstFields||[],l=Object.keys(e),c=l.length,s=0,d=[],u=new Promise((function(t,a){var u=function(e){if(d.push.apply(d,e),++s===c)return r(d),d.length?a(new Vx(d,Bx(d))):t(o)};l.length||(r(d),t(o)),l.forEach((function(t){var r=e[t];-1!==i.indexOf(t)?Wx(r,n,u):function(e,t,n){var r=[],o=0,a=e.length;function i(e){r.push.apply(r,e||[]),++o===a&&n(r)}e.forEach((function(e){t(e,i)}))}(r,n,u)}))}));return u.catch((function(e){return e})),u}function Kx(e,t){return function(n){var r,o;return r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length;r++){if(void 0==n)return n;n=n[t[r]]}return n}(t,e.fullFields):t[n.field||e.fullField],(o=n)&&void 0!==o.message?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"===typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function Gx(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];"object"===typeof r&&"object"===typeof e[n]?e[n]=Px({},e[n],r):e[n]=r}return e}var qx,Xx=function(e,t,n,r,o,a){!e.required||n.hasOwnProperty(e.field)&&!Hx(t,a||e.type)||r.push(Fx(o.messages.required,e.fullField))},Yx=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,$x=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Jx={integer:function(e){return Jx.number(e)&&parseInt(e,10)===e},float:function(e){return Jx.number(e)&&!Jx.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(r5){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"===typeof e},object:function(e){return"object"===typeof e&&!Jx.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&e.length<=320&&!!e.match(Yx)},url:function(e){return"string"===typeof e&&e.length<=2048&&!!e.match(function(){if(qx)return qx;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=("\n(?:\n(?:"+r+":){7}(?:"+r+"|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8\n(?:"+r+":){6}(?:"+n+"|:"+r+"|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4\n(?:"+r+":){5}(?::"+n+"|(?::"+r+"){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4\n(?:"+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+"){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4\n(?:"+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+"){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4\n(?:"+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+"){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4\n(?:"+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+"){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+r+"){0,5}:"+n+"|(?::"+r+"){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+n+"$)|(?:^"+o+"$)"),i=new RegExp("^"+n+"$"),l=new RegExp("^"+o+"$"),c=function(e){return e&&e.exact?a:new RegExp("(?:"+t(e)+n+t(e)+")|(?:"+t(e)+o+t(e)+")","g")};c.v4=function(e){return e&&e.exact?i:new RegExp(""+t(e)+n+t(e),"g")},c.v6=function(e){return e&&e.exact?l:new RegExp(""+t(e)+o+t(e),"g")};var s=c.v4().source,d=c.v6().source;return qx=new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+s+"|"+d+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")}())},hex:function(e){return"string"===typeof e&&!!e.match($x)}},Qx="enum",Zx={required:Xx,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(Fx(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&void 0===t)Xx(e,t,n,r,o);else{var a=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(a)>-1?Jx[a](t)||r.push(Fx(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(Fx(o.messages.types[a],e.fullField,e.type))}},range:function(e,t,n,r,o){var a="number"===typeof e.len,i="number"===typeof e.min,l="number"===typeof e.max,c=t,s=null,d="number"===typeof t,u="string"===typeof t,f=Array.isArray(t);if(d?s="number":u?s="string":f&&(s="array"),!s)return!1;f&&(c=t.length),u&&(c=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?c!==e.len&&r.push(Fx(o.messages[s].len,e.fullField,e.len)):i&&!l&&c<e.min?r.push(Fx(o.messages[s].min,e.fullField,e.min)):l&&!i&&c>e.max?r.push(Fx(o.messages[s].max,e.fullField,e.max)):i&&l&&(c<e.min||c>e.max)&&r.push(Fx(o.messages[s].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e[Qx]=Array.isArray(e[Qx])?e[Qx]:[],-1===e[Qx].indexOf(t)&&r.push(Fx(o.messages[Qx],e.fullField,e[Qx].join(", ")))},pattern:function(e,t,n,r,o){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Fx(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(Fx(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},ew=function(e,t,n,r,o){var a=e.type,i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t,a)&&!e.required)return n();Zx.required(e,t,r,i,o,a),Hx(t,a)||Zx.type(e,t,r,i,o)}n(i)},tw={string:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t,"string")&&!e.required)return n();Zx.required(e,t,r,a,o,"string"),Hx(t,"string")||(Zx.type(e,t,r,a,o),Zx.range(e,t,r,a,o),Zx.pattern(e,t,r,a,o),!0===e.whitespace&&Zx.whitespace(e,t,r,a,o))}n(a)},method:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),void 0!==t&&Zx.type(e,t,r,a,o)}n(a)},number:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),void 0!==t&&(Zx.type(e,t,r,a,o),Zx.range(e,t,r,a,o))}n(a)},boolean:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),void 0!==t&&Zx.type(e,t,r,a,o)}n(a)},regexp:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),Hx(t)||Zx.type(e,t,r,a,o)}n(a)},integer:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),void 0!==t&&(Zx.type(e,t,r,a,o),Zx.range(e,t,r,a,o))}n(a)},float:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),void 0!==t&&(Zx.type(e,t,r,a,o),Zx.range(e,t,r,a,o))}n(a)},array:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if((void 0===t||null===t)&&!e.required)return n();Zx.required(e,t,r,a,o,"array"),void 0!==t&&null!==t&&(Zx.type(e,t,r,a,o),Zx.range(e,t,r,a,o))}n(a)},object:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),void 0!==t&&Zx.type(e,t,r,a,o)}n(a)},enum:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o),void 0!==t&&Zx.enum(e,t,r,a,o)}n(a)},pattern:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t,"string")&&!e.required)return n();Zx.required(e,t,r,a,o),Hx(t,"string")||Zx.pattern(e,t,r,a,o)}n(a)},date:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t,"date")&&!e.required)return n();var i;if(Zx.required(e,t,r,a,o),!Hx(t,"date"))i=t instanceof Date?t:new Date(t),Zx.type(e,i,r,a,o),i&&Zx.range(e,i.getTime(),r,a,o)}n(a)},url:ew,hex:ew,email:ew,required:function(e,t,n,r,o){var a=[],i=Array.isArray(t)?"array":typeof t;Zx.required(e,t,r,a,o,i),n(a)},any:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Hx(t)&&!e.required)return n();Zx.required(e,t,r,a,o)}n(a)}};function nw(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var rw=nw(),ow=function(){function e(e){this.rules=null,this._messages=rw,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))},t.messages=function(e){return e&&(this._messages=Gx(nw(),e)),this._messages},t.validate=function(t,n,r){var o=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var a=t,i=n,l=r;if("function"===typeof i&&(l=i,i={}),!this.rules||0===Object.keys(this.rules).length)return l&&l(null,a),Promise.resolve(a);if(i.messages){var c=this.messages();c===rw&&(c=nw()),Gx(c,i.messages),i.messages=c}else i.messages=this.messages();var s={};(i.keys||Object.keys(this.rules)).forEach((function(e){var n=o.rules[e],r=a[e];n.forEach((function(n){var i=n;"function"===typeof i.transform&&(a===t&&(a=Px({},a)),r=a[e]=i.transform(r)),(i="function"===typeof i?{validator:i}:Px({},i)).validator=o.getValidationMethod(i),i.validator&&(i.field=e,i.fullField=i.fullField||e,i.type=o.getType(i),s[e]=s[e]||[],s[e].push({rule:i,value:r,source:a,field:e}))}))}));var d={};return Ux(s,i,(function(t,n){var r,o=t.rule,l=("object"===o.type||"array"===o.type)&&("object"===typeof o.fields||"object"===typeof o.defaultField);function c(e,t){return Px({},t,{fullField:o.fullField+"."+e,fullFields:o.fullFields?[].concat(o.fullFields,[e]):[e]})}function s(r){void 0===r&&(r=[]);var s=Array.isArray(r)?r:[r];!i.suppressWarning&&s.length&&e.warning("async-validator:",s),s.length&&void 0!==o.message&&(s=[].concat(o.message));var u=s.map(Kx(o,a));if(i.first&&u.length)return d[o.field]=1,n(u);if(l){if(o.required&&!t.value)return void 0!==o.message?u=[].concat(o.message).map(Kx(o,a)):i.error&&(u=[i.error(o,Fx(i.messages.required,o.field))]),n(u);var f={};o.defaultField&&Object.keys(t.value).map((function(e){f[e]=o.defaultField})),f=Px({},f,t.rule.fields);var p={};Object.keys(f).forEach((function(e){var t=f[e],n=Array.isArray(t)?t:[t];p[e]=n.map(c.bind(null,e))}));var h=new e(p);h.messages(i.messages),t.rule.options&&(t.rule.options.messages=i.messages,t.rule.options.error=i.error),h.validate(t.value,t.rule.options||i,(function(e){var t=[];u&&u.length&&t.push.apply(t,u),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)}))}else n(u)}if(l=l&&(o.required||!o.required&&t.value),o.field=t.field,o.asyncValidator)r=o.asyncValidator(o,t.value,s,t.source,i);else if(o.validator){try{r=o.validator(o,t.value,s,t.source,i)}catch(u){null==console.error||console.error(u),i.suppressValidatorError||setTimeout((function(){throw u}),0),s(u.message)}!0===r?s():!1===r?s("function"===typeof o.message?o.message(o.fullField||o.field):o.message||(o.fullField||o.field)+" fails"):r instanceof Array?s(r):r instanceof Error&&s(r.message)}r&&r.then&&r.then((function(){return s()}),(function(e){return s(e)}))}),(function(e){!function(e){var t=[],n={};function r(e){var n;Array.isArray(e)?t=(n=t).concat.apply(n,e):t.push(e)}for(var o=0;o<e.length;o++)r(e[o]);t.length?(n=Bx(t),l(t,n)):l(null,a)}(e)}),a)},t.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!==typeof e.validator&&e.type&&!tw.hasOwnProperty(e.type))throw new Error(Fx("Unknown rule type %s",e.type));return e.type||"string"},t.getValidationMethod=function(e){if("function"===typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?tw.required:tw[this.getType(e)]||void 0},e}();ow.register=function(e,t){if("function"!==typeof t)throw new Error("Cannot register a validator by type, validator is not a function");tw[e]=t},ow.warning=function(){},ow.messages=rw,ow.validators=tw;var aw="'${name}' is not a valid ${type}",iw={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:aw,method:aw,array:aw,object:aw,number:aw,date:aw,boolean:aw,integer:aw,float:aw,regexp:aw,email:aw,url:aw,hex:aw},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},lw=ow;function cw(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}var sw="CODE_LOGIC_ERROR";function dw(e,t,n,r,o){return uw.apply(this,arguments)}function uw(){return uw=Si(wi().mark((function e(n,r,o,a,i){var l,c,s,d,u,f,p,m,g;return wi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(l=oe({},o)).ruleIndex,lw.warning=function(){},l.validator&&(c=l.validator,l.validator=function(){try{return c.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(sw)}}),s=null,l&&"array"===l.type&&l.defaultField&&(s=l.defaultField,delete l.defaultField),d=new lw(h({},n,[l])),u=Xr(iw,a.validateMessages),d.messages(u),f=[],e.prev=10,e.next=13,Promise.resolve(d.validate(h({},n,r),oe({},a)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(f=e.t0.errors.map((function(e,n){var r=e.message,o=r===sw?u.default:r;return t.isValidElement(o)?t.cloneElement(o,{key:"error_".concat(n)}):o})));case 18:if(f.length||!s){e.next=23;break}return e.next=21,Promise.all(r.map((function(e,t){return dw("".concat(n,".").concat(t),e,s,a,i)})));case 21:return p=e.sent,e.abrupt("return",p.reduce((function(e,t){return[].concat(nt(e),nt(t))}),[]));case 23:return m=oe(oe({},o),{},{name:n,enum:(o.enum||[]).join(", ")},i),g=f.map((function(e){return"string"===typeof e?cw(e,m):e})),e.abrupt("return",g);case 26:case"end":return e.stop()}}),e,null,[[10,15]])}))),uw.apply(this,arguments)}function fw(e,t,n,r,o,a){var i,l=e.join("."),c=n.map((function(e,t){var n=e.validator,r=oe(oe({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var o=!1,a=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){Ie(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r.apply(void 0,t)}))}));o=a&&"function"===typeof a.then&&"function"===typeof a.catch,Ie(o,"`callback` is deprecated. Please return a promise instead."),o&&a.then((function(){r()})).catch((function(e){r(e||" ")}))}),r})).sort((function(e,t){var n=e.warningOnly,r=e.ruleIndex,o=t.warningOnly,a=t.ruleIndex;return!!n===!!o?r-a:n?1:-1}));if(!0===o)i=new Promise(function(){var e=Si(wi().mark((function e(n,o){var i,s,d;return wi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0;case 1:if(!(i<c.length)){e.next=12;break}return s=c[i],e.next=5,dw(l,t,s,r,a);case 5:if(!(d=e.sent).length){e.next=9;break}return o([{errors:d,rule:s}]),e.abrupt("return");case 9:i+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var s=c.map((function(e){return dw(l,t,e,r,a).then((function(t){return{errors:t,rule:e}}))}));i=(o?function(e){return hw.apply(this,arguments)}(s):function(e){return pw.apply(this,arguments)}(s)).then((function(e){return Promise.reject(e)}))}return i.catch((function(e){return e})),i}function pw(){return(pw=Si(wi().mark((function e(t){return wi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,nt(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hw(){return(hw=Si(wi().mark((function e(t){var n;return wi().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mw(e){return Rx(e)}function gw(e,t){var n={};return t.forEach((function(t){var r=Vr(e,t);n=Kr(n,t,r)})),n}function vw(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return bw(t,e,n)}))}function bw(e,t){return!(!e||!t)&&(!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t})))}function yw(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===f(t.target)&&e in t.target?t.target[e]:t}function xw(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],a=t-n;return a>0?[].concat(nt(e.slice(0,n)),[o],nt(e.slice(n,t)),nt(e.slice(t+1,r))):a<0?[].concat(nt(e.slice(0,t)),nt(e.slice(t+1,n+1)),[o],nt(e.slice(n+1,r))):e}var ww=["name"],Cw=[];function Sw(e,t,n,r,o,a){return"function"===typeof e?e(t,n,"source"in a?{source:a.source}:{}):r!==o}var Ew=function(e){Ro(r,e);var n=Na(r);function r(e){var o;(At(this,r),h(Io(o=n.call(this,e)),"state",{resetCount:0}),h(Io(o),"cancelRegisterFunc",null),h(Io(o),"mounted",!1),h(Io(o),"touched",!1),h(Io(o),"dirty",!1),h(Io(o),"validatePromise",void 0),h(Io(o),"prevValidating",void 0),h(Io(o),"errors",Cw),h(Io(o),"warnings",Cw),h(Io(o),"cancelRegister",(function(){var e=o.props,t=e.preserve,n=e.isListField,r=e.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(n,t,mw(r)),o.cancelRegisterFunc=null})),h(Io(o),"getNamePath",(function(){var e=o.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat(nt(void 0===n?[]:n),nt(t)):[]})),h(Io(o),"getRules",(function(){var e=o.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"===typeof e?e(r):e}))})),h(Io(o),"refresh",(function(){o.mounted&&o.setState((function(e){return{resetCount:e.resetCount+1}}))})),h(Io(o),"metaCache",null),h(Io(o),"triggerMetaEvent",(function(e){var t=o.props.onMetaChange;if(t){var n=oe(oe({},o.getMeta()),{},{destroy:e});Tt(o.metaCache,n)||t(n),o.metaCache=n}else o.metaCache=null})),h(Io(o),"onStoreChange",(function(e,t,n){var r=o.props,a=r.shouldUpdate,i=r.dependencies,l=void 0===i?[]:i,c=r.onReset,s=n.store,d=o.getNamePath(),u=o.getValue(e),f=o.getValue(s),p=t&&vw(t,d);switch("valueUpdate"===n.type&&"external"===n.source&&u!==f&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Cw,o.warnings=Cw,o.triggerMetaEvent()),n.type){case"reset":if(!t||p)return o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Cw,o.warnings=Cw,o.triggerMetaEvent(),null===c||void 0===c||c(),void o.refresh();break;case"remove":if(a)return void o.reRender();break;case"setField":var h=n.data;if(p)return"touched"in h&&(o.touched=h.touched),"validating"in h&&!("originRCField"in h)&&(o.validatePromise=h.validating?Promise.resolve([]):null),"errors"in h&&(o.errors=h.errors||Cw),"warnings"in h&&(o.warnings=h.warnings||Cw),o.dirty=!0,o.triggerMetaEvent(),void o.reRender();if("value"in h&&vw(t,d,!0))return void o.reRender();if(a&&!d.length&&Sw(a,e,s,u,f,n))return void o.reRender();break;case"dependenciesUpdate":if(l.map(mw).some((function(e){return vw(n.relatedFields,e)})))return void o.reRender();break;default:if(p||(!l.length||d.length||a)&&Sw(a,e,s,u,f,n))return void o.reRender()}!0===a&&o.reRender()})),h(Io(o),"validateRules",(function(e){var t=o.getNamePath(),n=o.getValue(),r=e||{},a=r.triggerName,i=r.validateOnly,l=void 0!==i&&i,c=Promise.resolve().then(Si(wi().mark((function r(){var i,l,s,d,u,f,p;return wi().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o.mounted){r.next=2;break}return r.abrupt("return",[]);case 2:if(i=o.props,l=i.validateFirst,s=void 0!==l&&l,d=i.messageVariables,u=i.validateDebounce,f=o.getRules(),a&&(f=f.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||Rx(t).includes(a)}))),!u||!a){r.next=10;break}return r.next=8,new Promise((function(e){setTimeout(e,u)}));case 8:if(o.validatePromise===c){r.next=10;break}return r.abrupt("return",[]);case 10:return(p=fw(t,n,f,e,s,d)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cw;if(o.validatePromise===c){var t;o.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,o=e.errors,a=void 0===o?Cw:o;t?r.push.apply(r,nt(a)):n.push.apply(n,nt(a))})),o.errors=n,o.warnings=r,o.triggerMetaEvent(),o.reRender()}})),r.abrupt("return",p);case 13:case"end":return r.stop()}}),r)}))));return l||(o.validatePromise=c,o.dirty=!0,o.errors=Cw,o.warnings=Cw,o.triggerMetaEvent(),o.reRender()),c})),h(Io(o),"isFieldValidating",(function(){return!!o.validatePromise})),h(Io(o),"isFieldTouched",(function(){return o.touched})),h(Io(o),"isFieldDirty",(function(){return!(!o.dirty&&void 0===o.props.initialValue)||void 0!==(0,o.props.fieldContext.getInternalHooks(Tx).getInitialValue)(o.getNamePath())})),h(Io(o),"getErrors",(function(){return o.errors})),h(Io(o),"getWarnings",(function(){return o.warnings})),h(Io(o),"isListField",(function(){return o.props.isListField})),h(Io(o),"isList",(function(){return o.props.isList})),h(Io(o),"isPreserve",(function(){return o.props.preserve})),h(Io(o),"getMeta",(function(){return o.prevValidating=o.isFieldValidating(),{touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:null===o.validatePromise}})),h(Io(o),"getOnlyChild",(function(e){if("function"===typeof e){var n=o.getMeta();return oe(oe({},o.getOnlyChild(e(o.getControlled(),n,o.props.fieldContext))),{},{isFunction:!0})}var r=st(e);return 1===r.length&&t.isValidElement(r[0])?{child:r[0],isFunction:!1}:{child:r,isFunction:!1}})),h(Io(o),"getValue",(function(e){var t=o.props.fieldContext.getFieldsValue,n=o.getNamePath();return Vr(e||t(!0),n)})),h(Io(o),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.props,n=t.trigger,r=t.validateTrigger,a=t.getValueFromEvent,i=t.normalize,l=t.valuePropName,c=t.getValueProps,s=t.fieldContext,d=void 0!==r?r:s.validateTrigger,u=o.getNamePath(),f=s.getInternalHooks,p=s.getFieldsValue,m=f(Tx).dispatch,g=o.getValue(),v=c||function(e){return h({},l,e)},b=e[n],y=oe(oe({},e),v(g));return y[n]=function(){var e;o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e=a?a.apply(void 0,n):yw.apply(void 0,[l].concat(n)),i&&(e=i(e,g,p(!0))),m({type:"updateValue",namePath:u,value:e}),b&&b.apply(void 0,n)},Rx(d||[]).forEach((function(e){var t=y[e];y[e]=function(){t&&t.apply(void 0,arguments);var n=o.props.rules;n&&n.length&&m({type:"validateField",namePath:u,triggerName:e})}})),y})),e.fieldContext)&&(0,(0,e.fieldContext.getInternalHooks)(Tx).initEntityValue)(Io(o));return o}return Nt(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(Tx).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,n=this.state.resetCount,r=this.props.children,o=this.getOnlyChild(r),a=o.child;return o.isFunction?e=a:t.isValidElement(a)?e=t.cloneElement(a,this.getControlled(a.props)):(Ie(!a,"`children` of Field is not validate ReactElement."),e=a),t.createElement(t.Fragment,{key:n},e)}}]),r}(t.Component);h(Ew,"contextType",Ox),h(Ew,"defaultProps",{trigger:"onChange",valuePropName:"value"});const kw=function(e){var n=e.name,r=m(e,ww),o=t.useContext(Ox),i=t.useContext(Nx),l=void 0!==n?mw(n):void 0,c="keep";return r.isListField||(c="_".concat((l||[]).join("_"))),t.createElement(Ew,a({key:c,name:l,isListField:!!i},r,{fieldContext:o}))};const jw=function(e){var n=e.name,r=e.initialValue,o=e.children,a=e.rules,i=e.validateTrigger,l=e.isListField,c=t.useContext(Ox),s=t.useContext(Nx),d=t.useRef({keys:[],id:0}).current,u=t.useMemo((function(){var e=mw(c.prefixName)||[];return[].concat(nt(e),nt(mw(n)))}),[c.prefixName,n]),f=t.useMemo((function(){return oe(oe({},c),{},{prefixName:u})}),[c,u]),p=t.useMemo((function(){return{getKey:function(e){var t=u.length,n=e[t];return[d.keys[n],e.slice(t+1)]}}}),[u]);return"function"!==typeof o?(Ie(!1,"Form.List only accepts function as children."),null):t.createElement(Nx.Provider,{value:p},t.createElement(Ox.Provider,{value:f},t.createElement(kw,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:a,validateTrigger:i,initialValue:r,isList:!0,isListField:null!==l&&void 0!==l?l:!!s},(function(e,t){var n=e.value,r=void 0===n?[]:n,a=e.onChange,i=c.getFieldValue,l=function(){return i(u||[])||[]},s={add:function(e,t){var n=l();t>=0&&t<=n.length?(d.keys=[].concat(nt(d.keys.slice(0,t)),[d.id],nt(d.keys.slice(t))),a([].concat(nt(n.slice(0,t)),[e],nt(n.slice(t))))):(d.keys=[].concat(nt(d.keys),[d.id]),a([].concat(nt(n),[e]))),d.id+=1},remove:function(e){var t=l(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(d.keys=d.keys.filter((function(e,t){return!n.has(t)})),a(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=l();e<0||e>=n.length||t<0||t>=n.length||(d.keys=xw(d.keys,e,t),a(xw(n,e,t)))}}},f=r||[];return Array.isArray(f)||(f=[]),o(f.map((function(e,t){var n=d.keys[t];return void 0===n&&(d.keys[t]=d.id,n=d.keys[t],d.id+=1),{name:t,key:n,isListField:!0}})),s,t)}))))};var Iw="__@field_split__";function Tw(e){return e.map((function(e){return"".concat(f(e),":").concat(e)})).join(Iw)}var Aw=function(){function e(){At(this,e),h(this,"kvs",new Map)}return Nt(e,[{key:"set",value:function(e,t){this.kvs.set(Tw(e),t)}},{key:"get",value:function(e){return this.kvs.get(Tw(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(Tw(e))}},{key:"map",value:function(e){return nt(this.kvs.entries()).map((function(t){var n=u(t,2),r=n[0],o=n[1],a=r.split(Iw);return e({key:a.map((function(e){var t=u(e.match(/^([^:]*):(.*)$/),3),n=t[1],r=t[2];return"number"===n?Number(r):r})),value:o})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}();const Ow=Aw;var Nw=["name"],Rw=Nt((function e(t){var n=this;At(this,e),h(this,"formHooked",!1),h(this,"forceRootUpdate",void 0),h(this,"subscribable",!0),h(this,"store",{}),h(this,"fieldEntities",[]),h(this,"initialValues",{}),h(this,"callbacks",{}),h(this,"validateMessages",null),h(this,"preserve",null),h(this,"lastValidatePromise",null),h(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),h(this,"getInternalHooks",(function(e){return e===Tx?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Ie(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),h(this,"useSubscribe",(function(e){n.subscribable=e})),h(this,"prevWithoutPreserves",null),h(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var r,o=Xr(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;o=Kr(o,n,Vr(e,n))})),n.prevWithoutPreserves=null,n.updateStore(o)}})),h(this,"destroyForm",(function(){var e=new Ow;n.getFieldEntities(!0).forEach((function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)})),n.prevWithoutPreserves=e})),h(this,"getInitialValue",(function(e){var t=Vr(n.initialValues,e);return e.length?Xr(t):t})),h(this,"setCallbacks",(function(e){n.callbacks=e})),h(this,"setValidateMessages",(function(e){n.validateMessages=e})),h(this,"setPreserve",(function(e){n.preserve=e})),h(this,"watchList",[]),h(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),h(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}})),h(this,"timeoutId",null),h(this,"warningUnhooked",(function(){0})),h(this,"updateStore",(function(e){n.store=e})),h(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),h(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Ow;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),h(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=mw(e);return t.get(n)||{INVALIDATE_NAME_PATH:mw(e)}}))})),h(this,"getFieldsValue",(function(e,t){var r,o,a;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,o=t):e&&"object"===f(e)&&(a=e.strict,o=e.filter),!0===r&&!o)return n.store;var i=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),l=[];return i.forEach((function(e){var t,n,i,c,s="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(a){if(null!==(i=(c=e).isList)&&void 0!==i&&i.call(c))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(o){var d="getMeta"in e?e.getMeta():null;o(d)&&l.push(s)}else l.push(s)})),gw(n.store,l.map(mw))})),h(this,"getFieldValue",(function(e){n.warningUnhooked();var t=mw(e);return Vr(n.store,t)})),h(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:mw(e[n]),errors:[],warnings:[]}}))})),h(this,"getFieldError",(function(e){n.warningUnhooked();var t=mw(e);return n.getFieldsError([t])[0].errors})),h(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=mw(e);return n.getFieldsError([t])[0].warnings})),h(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,a=t[0],i=t[1],l=!1;0===t.length?o=null:1===t.length?Array.isArray(a)?(o=a.map(mw),l=!1):(o=null,l=a):(o=a.map(mw),l=i);var c=n.getFieldEntities(!0),s=function(e){return e.isFieldTouched()};if(!o)return l?c.every(s):c.some(s);var d=new Ow;o.forEach((function(e){d.set(e,[])})),c.forEach((function(e){var t=e.getNamePath();o.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&d.update(n,(function(t){return[].concat(nt(t),[e])}))}))}));var u=function(e){return e.some(s)},f=d.map((function(e){return e.value}));return l?f.every(u):f.some(u)})),h(this,"isFieldTouched",(function(e){return n.warningUnhooked(),n.isFieldsTouched([e])})),h(this,"isFieldsValidating",(function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(mw);return t.some((function(e){var t=e.getNamePath();return vw(r,t)&&e.isFieldValidating()}))})),h(this,"isFieldValidating",(function(e){return n.warningUnhooked(),n.isFieldsValidating([e])})),h(this,"resetWithFieldInitialValue",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Ow,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var o=t.get(r)||new Set;o.add({entity:e,value:n}),t.set(r,o)}}));var o;e.entities?o=e.entities:e.namePathList?(o=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=o).push.apply(n,nt(nt(r).map((function(e){return e.entity}))))}))):o=r,o.forEach((function(r){if(void 0!==r.props.initialValue){var o=r.getNamePath();if(void 0!==n.getInitialValue(o))Ie(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var a=t.get(o);if(a&&a.size>1)Ie(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(a){var i=n.getFieldValue(o);r.isListField()||e.skipExist&&void 0!==i||n.updateStore(Kr(n.store,o,nt(a)[0].value))}}}}))})),h(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore(Xr(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(mw);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore(Kr(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)})),h(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var o=e.name,a=m(e,Nw),i=mw(o);r.push(i),"value"in a&&n.updateStore(Kr(n.store,i,a.value)),n.notifyObservers(t,[i],{type:"setField",data:e})})),n.notifyWatch(r)})),h(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=oe(oe({},e.getMeta()),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(r,"originRCField",{value:!0}),r}))})),h(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===Vr(n.store,r)&&n.updateStore(Kr(n.store,r,t))}})),h(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null===t||void 0===t||t})),h(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(o)&&(!r||a.length>1)){var i=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==i&&n.fieldEntities.every((function(e){return!bw(e.getNamePath(),t)}))){var l=n.store;n.updateStore(Kr(l,t,i,!0)),n.notifyObservers(l,[t],{type:"remove"}),n.triggerDependenciesUpdate(l,t)}}n.notifyWatch([t])}})),h(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,a=e.triggerName;n.validateFields([o],{triggerName:a})}})),h(this,"notifyObservers",(function(e,t,r){if(n.subscribable){var o=oe(oe({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()})),h(this,"triggerDependenciesUpdate",(function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat(nt(r))}),r})),h(this,"updateValue",(function(e,t){var r=mw(e),o=n.store;n.updateStore(Kr(n.store,r,t)),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var a=n.triggerDependenciesUpdate(o,r),i=n.callbacks.onValuesChange;i&&i(gw(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(nt(a)))})),h(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var r=Xr(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),h(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t}])})),h(this,"getDependencyChildrenFields",(function(e){var t=new Set,r=[],o=new Ow;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=mw(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r})),h(this,"triggerOnFieldsChange",(function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var a=new Ow;t.forEach((function(e){var t=e.name,n=e.errors;a.set(t,n)})),o.forEach((function(e){e.errors=a.get(e.name)||e.errors}))}var i=o.filter((function(t){var n=t.name;return vw(e,n)}));i.length&&r(i,o)}})),h(this,"validateFields",(function(e,t){var r,o;n.warningUnhooked(),Array.isArray(e)||"string"===typeof e||"string"===typeof t?(r=e,o=t):o=e;var a=!!r,i=a?r.map(mw):[],l=[],c=String(Date.now()),s=new Set,d=o||{},u=d.recursive,f=d.dirty;n.getFieldEntities(!0).forEach((function(e){if(a||i.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!f||e.isFieldDirty())){var t=e.getNamePath();if(s.add(t.join(c)),!a||vw(i,t,u)){var r=e.validateRules(oe({validateMessages:oe(oe({},iw),n.validateMessages)},o));l.push(r.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,r=[],o=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?o.push.apply(o,nt(n)):r.push.apply(r,nt(n))})),r.length?Promise.reject({name:t,errors:r,warnings:o}):{name:t,errors:r,warnings:o}})))}}}));var p=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,a){e.forEach((function(e,i){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[i]=e,n>0||(t&&a(r),o(r))}))}))})):Promise.resolve([])}(l);n.lastValidatePromise=p,p.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var h=p.then((function(){return n.lastValidatePromise===p?Promise.resolve(n.getFieldsValue(i)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(i),errorFields:t,outOfDate:n.lastValidatePromise!==p})}));h.catch((function(e){return e}));var m=i.filter((function(e){return s.has(e.join(c))}));return n.triggerOnFieldsChange(m),h})),h(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));const Pw=function(e){var n=t.useRef(),r=u(t.useState({}),2)[1];if(!n.current)if(e)n.current=e;else{var o=new Rw((function(){r({})}));n.current=o.getForm()}return[n.current]};var Mw=t.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Dw=function(e){var n=e.validateMessages,r=e.onFormChange,o=e.onFormFinish,a=e.children,i=t.useContext(Mw),l=t.useRef({});return t.createElement(Mw.Provider,{value:oe(oe({},i),{},{validateMessages:oe(oe({},i.validateMessages),n),triggerFormChange:function(e,t){r&&r(e,{changedFields:t,forms:l.current}),i.triggerFormChange(e,t)},triggerFormFinish:function(e,t){o&&o(e,{values:t,forms:l.current}),i.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(l.current=oe(oe({},l.current),{},h({},e,t))),i.registerForm(e,t)},unregisterForm:function(e){var t=oe({},l.current);delete t[e],l.current=t,i.unregisterForm(e)}})},a)};const Lw=Mw;var _w=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"];const zw=function(e,n){var r=e.name,o=e.initialValues,i=e.fields,l=e.form,c=e.preserve,s=e.children,d=e.component,p=void 0===d?"form":d,h=e.validateMessages,g=e.validateTrigger,v=void 0===g?"onChange":g,b=e.onValuesChange,y=e.onFieldsChange,x=e.onFinish,w=e.onFinishFailed,C=m(e,_w),S=t.useContext(Lw),E=u(Pw(l),1)[0],k=E.getInternalHooks(Tx),j=k.useSubscribe,I=k.setInitialValues,T=k.setCallbacks,A=k.setValidateMessages,O=k.setPreserve,N=k.destroyForm;t.useImperativeHandle(n,(function(){return E})),t.useEffect((function(){return S.registerForm(r,E),function(){S.unregisterForm(r)}}),[S,E,r]),A(oe(oe({},S.validateMessages),h)),T({onValuesChange:b,onFieldsChange:function(e){if(S.triggerFormChange(r,e),y){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];y.apply(void 0,[e].concat(n))}},onFinish:function(e){S.triggerFormFinish(r,e),x&&x(e)},onFinishFailed:w}),O(c);var R,P=t.useRef(null);I(o,!P.current),P.current||(P.current=!0),t.useEffect((function(){return N}),[]);var M="function"===typeof s;M?R=s(E.getFieldsValue(!0),E):R=s;j(!M);var D=t.useRef();t.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==f(e)||"object"!==f(t))return!1;var n=Object.keys(e),r=Object.keys(t);return nt(new Set([].concat(n,r))).every((function(n){var r=e[n],o=t[n];return"function"===typeof r&&"function"===typeof o||r===o}))})(D.current||[],i||[])||E.setFields(i||[]),D.current=i}),[i,E]);var L=t.useMemo((function(){return oe(oe({},E),{},{validateTrigger:v})}),[E,v]),_=t.createElement(Nx.Provider,{value:null},t.createElement(Ox.Provider,{value:L},R));return!1===p?_:t.createElement(p,a({},C,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),E.submit()},onReset:function(e){var t;e.preventDefault(),E.resetFields(),null===(t=C.onReset)||void 0===t||t.call(C,e)}}),_)};function Bw(e){try{return JSON.stringify(e)}catch(t){return Math.random()}}var Fw=function(){};const Hw=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n[0],a=n[1],i=void 0===a?{}:a,l=function(e){return e&&!!e._init}(i)?{form:i}:i,c=l.form,s=u((0,t.useState)(),2),d=s[0],f=s[1],p=(0,t.useMemo)((function(){return Bw(d)}),[d]),h=(0,t.useRef)(p);h.current=p;var m=(0,t.useContext)(Ox),g=c||m,v=g&&g._init,b=mw(o),y=(0,t.useRef)(b);return y.current=b,Fw(b),(0,t.useEffect)((function(){if(v){var e=g.getFieldsValue,t=(0,g.getInternalHooks)(Tx).registerWatch,n=function(e,t){var n=l.preserve?t:e;return"function"===typeof o?o(n):Vr(n,y.current)},r=t((function(e,t){var r=n(e,t),o=Bw(r);h.current!==o&&(h.current=o,f(r))})),a=n(e(),e(!0));return d!==a&&f(a),r}}),[v]),d};var Ww=t.forwardRef(zw);Ww.FormProvider=Dw,Ww.Field=kw,Ww.List=jw,Ww.useForm=Pw,Ww.useWatch=Hw;const Vw=Ww,Uw=t.createContext({labelAlign:"right",vertical:!1,itemRef:()=>{}}),Kw=t.createContext(null),Gw=e=>{const n=rt(e,["prefixCls"]);return t.createElement(Dw,Object.assign({},n))},qw=t.createContext({prefixCls:""}),Xw=t.createContext({});const Yw=e=>{let{children:n,status:r,override:o}=e;const a=(0,t.useContext)(Xw),i=(0,t.useMemo)((()=>{const e=Object.assign({},a);return o&&delete e.isFormItemInput,r&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[r,o,a]);return t.createElement(Xw.Provider,{value:i},n)},$w=(0,t.createContext)(void 0);function Jw(){}const Qw=t.createContext({add:Jw,remove:Jw});function Zw(e){const n=t.useContext(Qw),r=t.useRef();return Mr((t=>{if(t){const o=e?t.querySelector(e):t;n.add(o),r.current=o}else n.remove(r.current)}))}const eC=()=>{const{cancelButtonProps:e,cancelTextLocale:n,onCancel:r}=(0,t.useContext)(ax);return t.createElement(ac,Object.assign({onClick:r},e),n)},tC=()=>{const{confirmLoading:e,okButtonProps:n,okType:r,okTextLocale:o,onOk:a}=(0,t.useContext)(ax);return t.createElement(ac,Object.assign({},ul(r),{loading:e,onClick:a},n),o)};function nC(e,n){return t.createElement("span",{className:"".concat(e,"-close-x")},n||t.createElement(zg,{className:"".concat(e,"-close-icon")}))}const rC=e=>{const{okText:n,okType:r="primary",cancelText:o,confirmLoading:a,onOk:i,onCancel:l,okButtonProps:c,cancelButtonProps:s,footer:d}=e,[u]=nx("Modal",su()),f={confirmLoading:a,okButtonProps:c,cancelButtonProps:s,okTextLocale:n||(null===u||void 0===u?void 0:u.okText),cancelTextLocale:o||(null===u||void 0===u?void 0:u.cancelText),okType:r,onOk:i,onCancel:l},p=t.useMemo((()=>f),nt(Object.values(f)));let h;return"function"===typeof d||"undefined"===typeof d?(h=t.createElement(t.Fragment,null,t.createElement(eC,null),t.createElement(tC,null)),"function"===typeof d&&(h=d(h,{OkBtn:tC,CancelBtn:eC})),h=t.createElement(ix,{value:p},h)):h=d,t.createElement(Ui,{disabled:!1},h)},oC=new Rr("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),aC=new Rr("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),iC=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{antCls:n}=e,r="".concat(n,"-fade"),o=t?"&":"";return[hd(r,oC,aC,e.motionDurationMid,t),{["\n        ".concat(o).concat(r,"-enter,\n        ").concat(o).concat(r,"-appear\n      ")]:{opacity:0,animationTimingFunction:"linear"},["".concat(o).concat(r,"-leave")]:{animationTimingFunction:"linear"}}]};function lC(e){return{position:e,inset:0}}const cC=e=>{const{componentCls:t,antCls:n}=e;return[{["".concat(t,"-root")]:{["".concat(t).concat(n,"-zoom-enter, ").concat(t).concat(n,"-zoom-appear")]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},["".concat(t).concat(n,"-zoom-leave ").concat(t,"-content")]:{pointerEvents:"none"},["".concat(t,"-mask")]:Object.assign(Object.assign({},lC("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",["".concat(t,"-hidden")]:{display:"none"}}),["".concat(t,"-wrap")]:Object.assign(Object.assign({},lC("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{["".concat(t,"-root")]:iC(e)}]},sC=e=>{const{componentCls:t}=e;return[{["".concat(t,"-root")]:{["".concat(t,"-wrap-rtl")]:{direction:"rtl"},["".concat(t,"-centered")]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},["@media (max-width: ".concat(e.screenSMMax,"px)")]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:"".concat(rn(e.marginXS)," auto")},["".concat(t,"-centered")]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},$r(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:"calc(100vw - ".concat(rn(e.calc(e.margin).mul(2).equal()),")"),margin:"0 auto",paddingBottom:e.paddingLG,["".concat(t,"-title")]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},["".concat(t,"-content")]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},["".concat(t,"-close")]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:"color ".concat(e.motionDurationMid,", background-color ").concat(e.motionDurationMid),"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:"".concat(rn(e.modalCloseBtnSize)),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.closeBtnHoverBg,textDecoration:"none"},"&:active":{backgroundColor:e.closeBtnActiveBg}},eo(e)),["".concat(t,"-header")]:{color:e.colorText,background:e.headerBg,borderRadius:"".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)," 0 0"),marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},["".concat(t,"-body")]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding},["".concat(t,"-footer")]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,["> ".concat(e.antCls,"-btn + ").concat(e.antCls,"-btn")]:{marginInlineStart:e.marginXS}},["".concat(t,"-open")]:{overflow:"hidden"}})},{["".concat(t,"-pure-panel")]:{top:"auto",padding:0,display:"flex",flexDirection:"column",["".concat(t,"-content,\n          ").concat(t,"-body,\n          ").concat(t,"-confirm-body-wrapper")]:{display:"flex",flexDirection:"column",flex:"auto"},["".concat(t,"-confirm-body")]:{marginBottom:"auto"}}}]},dC=e=>{const{componentCls:t}=e;return{["".concat(t,"-root")]:{["".concat(t,"-wrap-rtl")]:{direction:"rtl",["".concat(t,"-confirm-body")]:{direction:"rtl"}}}}},uC=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return Ho(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalIconHoverColor:e.colorIconHover,modalCloseIconColor:e.colorIcon,modalCloseBtnSize:e.fontHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},fC=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,closeBtnHoverBg:e.wireframe?"transparent":e.colorFillContent,closeBtnActiveBg:e.wireframe?"transparent":e.colorFillContentHover,contentPadding:e.wireframe?0:"".concat(rn(e.paddingMD)," ").concat(rn(e.paddingContentHorizontalLG)),headerPadding:e.wireframe?"".concat(rn(e.padding)," ").concat(rn(e.paddingLG)):0,headerBorderBottom:e.wireframe?"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit):"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?"".concat(rn(e.paddingXS)," ").concat(rn(e.padding)):0,footerBorderTop:e.wireframe?"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit):"none",footerBorderRadius:e.wireframe?"0 0 ".concat(rn(e.borderRadiusLG)," ").concat(rn(e.borderRadiusLG)):0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?"".concat(rn(2*e.padding)," ").concat(rn(2*e.padding)," ").concat(rn(e.paddingLG)):0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),pC=$o("Modal",(e=>{const t=uC(e);return[sC(t),dC(t),cC(t),Td(t,"zoom")]}),fC,{unitless:{titleLineHeight:!0}});var hC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};let mC;const gC=e=>{mC={x:e.pageX,y:e.pageY},setTimeout((()=>{mC=null}),100)};ae()&&window.document.documentElement&&document.documentElement.addEventListener("click",gC,!0);const vC=e=>{var n;const{getPopupContainer:r,getPrefixCls:o,direction:a,modal:i}=t.useContext(at),l=t=>{const{onCancel:n}=e;null===n||void 0===n||n(t)};const{prefixCls:c,className:s,rootClassName:d,open:u,wrapClassName:f,centered:p,getContainer:h,closeIcon:m,closable:g,focusTriggerAfterClose:b=!0,style:y,visible:x,width:w=520,footer:C,classNames:S,styles:E}=e,k=hC(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","closeIcon","closable","focusTriggerAfterClose","style","visible","width","footer","classNames","styles"]),j=o("modal",c),I=o(),T=lh(j),[A,O,N]=pC(j,T),R=v()(f,{["".concat(j,"-centered")]:!!p,["".concat(j,"-wrap-rtl")]:"rtl"===a}),P=null!==C&&t.createElement(rC,Object.assign({},e,{onOk:t=>{const{onOk:n}=e;null===n||void 0===n||n(t)},onCancel:l})),[M,D]=Ix(g,"undefined"!==typeof m?m:null===i||void 0===i?void 0:i.closeIcon,(e=>nC(j,e)),t.createElement(zg,{className:"".concat(j,"-close-icon")}),!0),L=Zw(".".concat(j,"-content")),[_,z]=Gs("Modal",k.zIndex);return A(t.createElement(rl,null,t.createElement(Yw,{status:!0,override:!0},t.createElement(Hs.Provider,{value:z},t.createElement(jx,Object.assign({width:w},k,{zIndex:_,getContainer:void 0===h?r:h,prefixCls:j,rootClassName:v()(O,d,N,T),footer:P,visible:null!==u&&void 0!==u?u:x,mousePosition:null!==(n=k.mousePosition)&&void 0!==n?n:mC,onClose:l,closable:M,closeIcon:D,focusTriggerAfterClose:b,transitionName:Js(I,"zoom",e.transitionName),maskTransitionName:Js(I,"fade",e.maskTransitionName),className:v()(O,s,null===i||void 0===i?void 0:i.className),style:Object.assign(Object.assign({},null===i||void 0===i?void 0:i.style),y),classNames:Object.assign(Object.assign(Object.assign({},null===i||void 0===i?void 0:i.classNames),S),{wrapper:v()(R,null===S||void 0===S?void 0:S.wrapper)}),styles:Object.assign(Object.assign({},null===i||void 0===i?void 0:i.styles),E),panelRef:L}))))))},bC=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:a,lineHeight:i,modalTitleHeight:l,fontHeight:c,confirmBodyPadding:s}=e,d="".concat(t,"-confirm");return{[d]:{"&-rtl":{direction:"rtl"},["".concat(e.antCls,"-modal-header")]:{display:"none"},["".concat(d,"-body-wrapper")]:Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),["&".concat(t," ").concat(t,"-body")]:{padding:s},["".concat(d,"-body")]:{display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(e.iconCls)]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(o).equal()).div(2).equal()},["&-has-title > ".concat(e.iconCls)]:{marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()}},["".concat(d,"-paragraph")]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:"calc(100% - ".concat(rn(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal()),")")},["".concat(d,"-title")]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},["".concat(d,"-content")]:{color:e.colorText,fontSize:a,lineHeight:i},["".concat(d,"-btns")]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,["".concat(e.antCls,"-btn + ").concat(e.antCls,"-btn")]:{marginBottom:0,marginInlineStart:e.marginXS}}},["".concat(d,"-error ").concat(d,"-body > ").concat(e.iconCls)]:{color:e.colorError},["".concat(d,"-warning ").concat(d,"-body > ").concat(e.iconCls,",\n        ").concat(d,"-confirm ").concat(d,"-body > ").concat(e.iconCls)]:{color:e.colorWarning},["".concat(d,"-info ").concat(d,"-body > ").concat(e.iconCls)]:{color:e.colorInfo},["".concat(d,"-success ").concat(d,"-body > ").concat(e.iconCls)]:{color:e.colorSuccess}}},yC=Yo(["Modal","confirm"],(e=>{const t=uC(e);return[bC(t)]}),fC,{order:-1e3});var xC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function wC(e){const{prefixCls:n,icon:r,okText:o,cancelText:a,confirmPrefixCls:i,type:l,okCancel:c,footer:s,locale:d}=e,u=xC(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);let f=r;if(!r&&null!==r)switch(l){case"info":f=t.createElement(tx,null);break;case"success":f=t.createElement(Gy,null);break;case"error":f=t.createElement(Yy,null);break;default:f=t.createElement(Qy,null)}const p=null!==c&&void 0!==c?c:"confirm"===l,h=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),[m]=nx("Modal"),g=d||m,b=o||(p?null===g||void 0===g?void 0:g.okText:null===g||void 0===g?void 0:g.justOkText),y=a||(null===g||void 0===g?void 0:g.cancelText),x=Object.assign({autoFocusButton:h,cancelTextLocale:y,okTextLocale:b,mergedOkCancel:p},u),w=t.useMemo((()=>x),nt(Object.values(x))),C=t.createElement(t.Fragment,null,t.createElement(lx,null),t.createElement(cx,null)),S=void 0!==e.title&&null!==e.title,E="".concat(i,"-body");return t.createElement("div",{className:"".concat(i,"-body-wrapper")},t.createElement("div",{className:v()(E,{["".concat(E,"-has-title")]:S})},f,t.createElement("div",{className:"".concat(i,"-paragraph")},S&&t.createElement("span",{className:"".concat(i,"-title")},e.title),t.createElement("div",{className:"".concat(i,"-content")},e.content))),void 0===s||"function"===typeof s?t.createElement(ix,{value:w},t.createElement("div",{className:"".concat(i,"-btns")},"function"===typeof s?s(C,{OkBtn:cx,CancelBtn:lx}):C)):s,t.createElement(yC,{prefixCls:n}))}const CC=e=>{const{close:n,zIndex:r,afterClose:o,open:a,keyboard:i,centered:l,getContainer:c,maskStyle:s,direction:d,prefixCls:u,wrapClassName:f,rootPrefixCls:p,bodyStyle:h,closable:m=!1,closeIcon:g,modalRender:b,focusTriggerAfterClose:y,onConfirm:x,styles:w}=e;const C="".concat(u,"-confirm"),S=e.width||416,E=e.style||{},k=void 0===e.mask||e.mask,j=void 0!==e.maskClosable&&e.maskClosable,I=v()(C,"".concat(C,"-").concat(e.type),{["".concat(C,"-rtl")]:"rtl"===d},e.className),[,T]=jo(),A=t.useMemo((()=>void 0!==r?r:T.zIndexPopupBase+Vs),[r,T]);return t.createElement(vC,{prefixCls:u,className:I,wrapClassName:v()({["".concat(C,"-centered")]:!!e.centered},f),onCancel:()=>{null===n||void 0===n||n({triggerCancel:!0}),null===x||void 0===x||x(!1)},open:a,title:"",footer:null,transitionName:Js(p||"","zoom",e.transitionName),maskTransitionName:Js(p||"","fade",e.maskTransitionName),mask:k,maskClosable:j,style:E,styles:Object.assign({body:h,mask:s},w),width:S,zIndex:A,afterClose:o,keyboard:i,centered:l,getContainer:c,closable:m,closeIcon:g,modalRender:b,focusTriggerAfterClose:y},t.createElement(wC,Object.assign({},e,{confirmPrefixCls:C})))};const SC=e=>{const{rootPrefixCls:n,iconPrefixCls:r,direction:o,theme:a}=e;return t.createElement(Nu,{prefixCls:n,iconPrefixCls:r,direction:o,theme:a},t.createElement(CC,Object.assign({},e)))},EC=[];let kC="";function jC(){return kC}const IC=e=>{var n,r;const{prefixCls:o,getContainer:a,direction:i}=e,l=su(),c=(0,t.useContext)(at),s=jC()||c.getPrefixCls(),d=o||"".concat(s,"-modal");let u=a;return!1===u&&(u=void 0),t.createElement(SC,Object.assign({},e,{rootPrefixCls:s,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:null!==i&&void 0!==i?i:c.direction,locale:null!==(r=null===(n=c.locale)||void 0===n?void 0:n.Modal)&&void 0!==r?r:l,getContainer:u}))};function TC(e){const n=Tu();const r=document.createDocumentFragment();let o,a=Object.assign(Object.assign({},e),{close:c,open:!0});function i(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const a=n.some((e=>e&&e.triggerCancel));e.onCancel&&a&&e.onCancel.apply(e,[()=>{}].concat(nt(n.slice(1))));for(let e=0;e<EC.length;e++){if(EC[e]===c){EC.splice(e,1);break}}Di(r)}function l(e){clearTimeout(o),o=setTimeout((()=>{const o=n.getPrefixCls(void 0,jC()),a=n.getIconPrefixCls(),i=n.getTheme(),l=t.createElement(IC,Object.assign({},e));Ni(t.createElement(Nu,{prefixCls:o,iconPrefixCls:a,theme:i},n.holderRender?n.holderRender(l):l),r)}))}function c(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];a=Object.assign(Object.assign({},a),{open:!1,afterClose:()=>{"function"===typeof e.afterClose&&e.afterClose(),i.apply(this,n)}}),a.visible&&delete a.visible,l(a)}return l(a),EC.push(c),{destroy:c,update:function(e){a="function"===typeof e?e(a):Object.assign(Object.assign({},a),e),l(a)}}}function AC(e){return Object.assign(Object.assign({},e),{type:"warning"})}function OC(e){return Object.assign(Object.assign({},e),{type:"info"})}function NC(e){return Object.assign(Object.assign({},e),{type:"success"})}function RC(e){return Object.assign(Object.assign({},e),{type:"error"})}function PC(e){return Object.assign(Object.assign({},e),{type:"confirm"})}var MC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const DC=Ru((e=>{const{prefixCls:n,className:r,closeIcon:o,closable:a,type:i,title:l,children:c,footer:s}=e,d=MC(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=t.useContext(at),f=u(),p=n||u("modal"),h=lh(f),[m,g,b]=pC(p,h),y="".concat(p,"-confirm");let x={};return x=i?{closable:null!==a&&void 0!==a&&a,title:"",footer:"",children:t.createElement(wC,Object.assign({},e,{prefixCls:p,confirmPrefixCls:y,rootPrefixCls:f,content:c}))}:{closable:null===a||void 0===a||a,title:l,footer:null!==s&&t.createElement(rC,Object.assign({},e)),children:c},m(t.createElement(xx,Object.assign({prefixCls:p,className:v()(g,"".concat(p,"-pure-panel"),i&&y,i&&"".concat(y,"-").concat(i),r,b,h)},d,{closeIcon:nC(p,o),closable:a},x)))}));var LC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const _C=(e,n)=>{var r,{afterClose:o,config:a}=e,i=LC(e,["afterClose","config"]);const[l,c]=t.useState(!0),[s,d]=t.useState(a),{direction:u,getPrefixCls:f}=t.useContext(at),p=f("modal"),h=f(),m=function(){c(!1);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.some((e=>e&&e.triggerCancel));s.onCancel&&r&&s.onCancel.apply(s,[()=>{}].concat(nt(t.slice(1))))};t.useImperativeHandle(n,(()=>({destroy:m,update:e=>{d((t=>Object.assign(Object.assign({},t),e)))}})));const g=null!==(r=s.okCancel)&&void 0!==r?r:"confirm"===s.type,[v]=nx("Modal",au.Modal);return t.createElement(SC,Object.assign({prefixCls:p,rootPrefixCls:h},s,{close:m,open:l,afterClose:()=>{var e;o(),null===(e=s.afterClose)||void 0===e||e.call(s)},okText:s.okText||(g?null===v||void 0===v?void 0:v.okText:null===v||void 0===v?void 0:v.justOkText),direction:s.direction||u,cancelText:s.cancelText||(null===v||void 0===v?void 0:v.cancelText)},i))},zC=t.forwardRef(_C);let BC=0;const FC=t.memo(t.forwardRef(((e,n)=>{const[r,o]=function(){const[e,n]=t.useState([]);return[e,t.useCallback((e=>(n((t=>[].concat(nt(t),[e]))),()=>{n((t=>t.filter((t=>t!==e))))})),[])]}();return t.useImperativeHandle(n,(()=>({patchElement:o})),[]),t.createElement(t.Fragment,null,r)})));const HC=function(){const e=t.useRef(null),[n,r]=t.useState([]);t.useEffect((()=>{if(n.length){nt(n).forEach((e=>{e()})),r([])}}),[n]);const o=t.useCallback((n=>function(o){var a;BC+=1;const i=t.createRef();let l;const c=new Promise((e=>{l=e}));let s,d=!1;const u=t.createElement(zC,{key:"modal-".concat(BC),config:n(o),ref:i,afterClose:()=>{null===s||void 0===s||s()},isSilent:()=>d,onConfirm:e=>{l(e)}});s=null===(a=e.current)||void 0===a?void 0:a.patchElement(u),s&&EC.push(s);const f={destroy:()=>{function e(){var e;null===(e=i.current)||void 0===e||e.destroy()}i.current?e():r((t=>[].concat(nt(t),[e])))},update:e=>{function t(){var t;null===(t=i.current)||void 0===t||t.update(e)}i.current?t():r((e=>[].concat(nt(e),[t])))},then:e=>(d=!0,c.then(e))};return f}),[]);return[t.useMemo((()=>({info:o(OC),success:o(NC),error:o(RC),warning:o(AC),confirm:o(PC)})),[]),t.createElement(FC,{key:"modal-holder",ref:e})]};function WC(e){return TC(AC(e))}const VC=vC;VC.useModal=HC,VC.info=function(e){return TC(OC(e))},VC.success=function(e){return TC(NC(e))},VC.error=function(e){return TC(RC(e))},VC.warning=WC,VC.warn=WC,VC.confirm=function(e){return TC(PC(e))},VC.destroyAll=function(){for(;EC.length;){const e=EC.pop();e&&e()}},VC.config=function(e){let{rootPrefixCls:t}=e;kC=t},VC._InternalPanelDoNotUseOrYouWillBeFired=DC;const UC=VC;let KC="";const GC=()=>KC,qC=e=>(KC=e,GC()),XC=()=>(KC="",KC);let YC="";const $C=()=>YC||"",JC=()=>{YC=""},QC=e=>{const{translate:t}=og();let n;return e&&(n=e.replace("_"," ").replace("std","standard").replace("false",t("disabled")).replace("true",t("enabled")).replace("undefined",t("disabled")).replace(/(^\w{1})|(\s+\w{1})/g,(e=>e.toUpperCase())).replace("Rtu","RTU")),n},ZC=e=>{let t;return"rs485_1"===e?t="RS485-1":"rs485_2"===e?t="RS485-2":"mbus"===e?t="M-BUS":"cbus"===e?t="C-BUS":"eth0"===e?t="ETH-1":"eth1"===e?t="ETH-2":"eth"===e&&(t="ETH"),t},eS=(e,t)=>{const n=e.find((e=>e.id===t));return n?n.addressRange.min:0},tS=(e,t)=>{const n=e.find((e=>e.id===t));return n?n.addressRange.max:250},nS=(e,t)=>{const n=e.find((e=>e.id===t));return n?n.addressRange.step:1},rS=(e,t)=>{const n=e.find((e=>e.id===t));return n?n.defaultAddress:1};function oS(e,t){if(-1===e)return t("never");if(0===e)return t("now");const n=Math.floor(e/3600),r=Math.floor(e%3600/60),o=e%60;return(n?"".concat(n," ").concat(t("hours")," "):"")+(r?"".concat(r," min "):"")+(o?"".concat(o," sec"):"")}function aS(e,t,n){if(void 0===e||null===e)return"";if(e.length>=t){if(n){if("string"===typeof e||"number"===typeof e||"boolean"===typeof e){const n=String(e);return n.length>t?n.slice(0,t)+"...":n}try{const n=JSON.stringify(e);return n.length>t?n.slice(0,t)+"...":n}catch{return String(e).slice(0,t)}}return(0,ng.jsx)(Hd,{title:e,placement:"topLeft",children:e.slice(0,t)+"..."})}return e}function iS(e){const t={};let n=[];for(let r=0;r<e.length;r++){const o=e[r],a="object"===typeof o?JSON.stringify(o):String(o);t[a]||(t[a]=!0,n=[...n,o])}return n}function lS(e){return!/^(.{0,7}|[^A-Za-z]{1,}|[^\d]{1,}|[^\W]{1,})$|[\s]/.test(e)}function cS(e){return null==e?"":"0x".concat(e.toString(16).padStart(2,"0").toUpperCase())}let sS=null;const dS=e=>{sS=e},uS=()=>{var e;null===(e=sS)||void 0===e||e(!0)},fS=()=>{var e;null===(e=sS)||void 0===e||e(!1)},pS="/settings/info",hS="/settings/language",mS="/account/password",gS="/swupdate/getstatus",vS="/network/status",bS="/network/config",yS="/restart",xS="/diagnostic/bacnet/stats",wS="/ylc/device",CS="/ports",SS="/container/update/status",ES="/container/restart",kS="/container/projects/list",jS="/portforwarding",IS="/service/cbus_transparent_cbus",TS="/service/modbus_transparent_rs485_1",AS="/service/modbus_transparent_rs485_2",OS="/service/bacnet_transparent_rs485_1",NS="/service/bacnet_transparent_rs485_2",RS="/service/bacnet_config",PS="/service/ylc",MS="/vdev/devices",DS="/vdev/categories",LS="/vdev/models",_S="vdev/diag/status",zS="vdev/diag/measures",BS="/mail/config",FS="/container/logs",HS="/container/status",WS="/container/hostid",VS="/settings/datetime/mode",US="/settings/datetime/manual",KS="/network/wifi/status",GS="/diagnostic/network/ports",qS="/container/image/all",XS="/diagnostic/log/status",YS="/diagnostic/log/file",$S="/diagnostic/log/view",JS="/security/status",QS="/costerlogic/vars",ZS="/costerlogic/diagram",eE="/costerlogic/internalvars",tE="/diagnostic/filesystem/usage",nE="/vvdev/vars",rE="/container/localver";let oE=window.location.port,aE={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_COMPANY_NAME:"coster",REACT_APP_DEVICE_NAME:"EHC 602",REACT_APP_FAVICON_PATH:"coster.png",REACT_APP_FIN_NAME:"Web Garage",REACT_APP_Header:"coster",REACT_APP_NAME:"EHC 602 Web Application"}.REACT_APP_HOST_BE||window.location.hostname;const iE=Vy.create({baseURL:"//".concat(aE,":").concat(oE).concat("/api"),headers:{"Content-Type":"application/json"}});async function lE(e,t){try{const n=await iE(e);return!1!==t&&fS(),n.data}catch(n){return!1!==t&&fS(),Promise.reject(n)}}async function cE(e,t,n,r,o,a){const i={method:"GET",url:r?"".concat(e,"/").concat(r):e,params:o,headers:{...t&&{Authorization:"Bearer ".concat(t)}}};return i.silent=!!a,i.loader=n,"undefined"!==typeof n&&!0!==n||uS(),lE(i,n)}async function sE(e,t,n,r,o){const a={method:"POST",url:e,headers:{...n&&{Authorization:"Bearer ".concat(n)}},data:t};return a.silent=!!o,a.loader=r,"undefined"!==typeof r&&!0!==r||uS(),lE(a,r)}async function dE(e,t,n,r,o,a){const i={method:"PUT",url:r?"".concat(e,"/").concat(r):e,headers:{"Content-Type":"application/json",...n&&{Authorization:"Bearer ".concat(n)}},data:t};return i.silent=!!a,"undefined"!==typeof o&&!0!==o||uS(),lE(i)}async function uE(e,t,n,r,o){const a={method:"DELETE",url:t?"".concat(e,"/").concat(t):e,headers:{...r&&{Authorization:"Bearer ".concat(r)}},data:n};return a.silent=!!o,uS(),lE(a)}async function fE(e){const{request:t,file:n,token:r,loader:o,id:a,silent:i,onProgress:l,signal:c}=e,s=a?"".concat(t,"/").concat(a):t,d=new FormData,u=n.originFileObj||n;d.append("file",u,u.name);const f={method:"POST",url:s,headers:{"Content-Type":"multipart/form-data",...r&&{Authorization:"Bearer ".concat(r)}},data:d,onUploadProgress:l,signal:c};return"undefined"!==typeof o&&!0!==o||uS(),lE(f,o)}async function pE(e,t,n,r,o,a,i){const l={method:"GET",url:t?"".concat(e,"/").concat(t):e,responseType:"blob",headers:{...n&&{Authorization:"Bearer ".concat(n)}},onDownloadProgress:a,signal:i};l.silent=!!o,"undefined"!==typeof r&&!0!==r||uS();try{const e=await iE(l),t=e.headers["content-disposition"]||e.headers["Content-Disposition"]||"";let n;if(t){const e=t.match(/filename\*?=(?:UTF-8'')?["']?([^;"']+)["']?/i);if(e&&e[1])try{n=decodeURIComponent(e[1])}catch{n=e[1]}}const r=e.data,o=window.URL.createObjectURL(r),a=document.createElement("a");return a.href=o,a.download=n||"download",a.style.display="none",document.body.appendChild(a),a.click(),a.remove(),setTimeout((()=>{window.URL.revokeObjectURL(o)}),1e3),{blob:r,filename:n}}catch(f){var c,s,d,u;const e=(401===(null===(c=f.response)||void 0===c?void 0:c.status)?"error401":500===(null===(s=f.response)||void 0===s?void 0:s.status)&&"error500")||(null===(d=f.response)||void 0===d||null===(u=d.data)||void 0===u?void 0:u.message)||"ErrorRequestAPI";return console.error(e),Promise.reject(f)}finally{"undefined"!==typeof o&&!1!==o||fS()}}iE.interceptors.response.use((e=>e),(e=>{var t,n;const r=e.config||{},o=(r.url||"").toLowerCase();if(r.silent||!1===r.loader||null!==(t=e.request)&&void 0!==t&&t.silent)return Promise.reject(e);fS();const a=/\/account\/login/.test(o),i=/\/settings\/language/.test(o);if(a||i)return console.log("Interceptor: Rilevata rotta di login/lingua. Salto il redirect globale."),Promise.reject(e);const l=null===(n=e.response)||void 0===n?void 0:n.status;if([401,403,503,504].includes(l)){const t=401===l,n=403===l,r=504===l,o=503===l;let a=tg("error");const i=tg("redirect");t||n?a=tg("sessionExpired"):r?a=tg("timeOut"):o&&(a=tg("serviceUnavailable"));const c=UC.error({title:a,content:i,footer:null,closable:!1});return XC(),setTimeout((()=>{c.destroy(),window.location.href=window.location.origin}),5e3),Promise.reject(e)}return Promise.reject(e)}));var hE=function(){return hE=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hE.apply(this,arguments)};Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError;function mE(e,n,r){void 0===n&&(n=[]),void 0===r&&(r={loading:!1});var o=(0,t.useRef)(0),a=function(){var e=(0,t.useRef)(!1),n=(0,t.useCallback)((function(){return e.current}),[]);return(0,t.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),n}(),i=(0,t.useState)(r),l=i[0],c=i[1],s=(0,t.useCallback)((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=++o.current;return l.loading||c((function(e){return hE(hE({},e),{loading:!0})})),e.apply(void 0,t).then((function(e){return a()&&r===o.current&&c({value:e,loading:!1}),e}),(function(e){return a()&&r===o.current&&c({error:e,loading:!1}),e}))}),n);return[l,s]}const gE={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var vE=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:gE}))};const bE=t.forwardRef(vE);const yE={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};var xE=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:yE}))};const wE=t.forwardRef(xE),CE=t.createContext({});var SE=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.style,i=e.className,l=e.duration,c=void 0===l?4.5:l,s=e.eventKey,d=e.content,f=e.closable,p=e.closeIcon,m=void 0===p?"x":p,g=e.props,b=e.onClick,y=e.onNoticeClose,x=e.times,w=e.hovering,C=u(t.useState(!1),2),S=C[0],E=C[1],k=w||S,j=function(){y(s)};t.useEffect((function(){if(!k&&c>0){var e=setTimeout((function(){j()}),1e3*c);return function(){clearTimeout(e)}}}),[c,k,x]);var I="".concat(r,"-notice");return t.createElement("div",a({},g,{ref:n,className:v()(I,i,h({},"".concat(I,"-closable"),f)),style:o,onMouseEnter:function(e){var t;E(!0),null===g||void 0===g||null===(t=g.onMouseEnter)||void 0===t||t.call(g,e)},onMouseLeave:function(e){var t;E(!1),null===g||void 0===g||null===(t=g.onMouseLeave)||void 0===t||t.call(g,e)},onClick:b}),t.createElement("div",{className:"".concat(I,"-content")},d),f&&t.createElement("a",{tabIndex:0,className:"".concat(I,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==Vd.ENTER||j()},onClick:function(e){e.preventDefault(),e.stopPropagation(),j()}},m))}));const EE=SE;var kE=t.createContext({});const jE=function(e){var n=e.children,r=e.classNames;return t.createElement(kE.Provider,{value:{classNames:r}},n)};const IE=function(e){var t,n,r,o={offset:8,threshold:3,gap:16};e&&"object"===f(e)&&(o.offset=null!==(t=e.offset)&&void 0!==t?t:8,o.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,o.gap=null!==(r=e.gap)&&void 0!==r?r:16);return[!!e,o]};var TE=["className","style","classNames","styles"];const AE=function(e){var n,r=e.configList,o=e.placement,i=e.prefixCls,l=e.className,c=e.style,s=e.motion,d=e.onAllNoticeRemoved,f=e.onNoticeClose,p=e.stack,g=(0,t.useContext)(kE).classNames,b=(0,t.useRef)({}),y=u((0,t.useState)(null),2),x=y[0],w=y[1],C=u((0,t.useState)([]),2),S=C[0],E=C[1],k=r.map((function(e){return{config:e,key:String(e.key)}})),j=u(IE(p),2),I=j[0],T=j[1],A=T.offset,O=T.threshold,N=T.gap,R=I&&(S.length>0||k.length<=O),P="function"===typeof s?s(o):s;return(0,t.useEffect)((function(){I&&S.length>1&&E((function(e){return e.filter((function(e){return k.some((function(t){var n=t.key;return e===n}))}))}))}),[S,k,I]),(0,t.useEffect)((function(){var e,t;I&&b.current[null===(e=k[k.length-1])||void 0===e?void 0:e.key]&&w(b.current[null===(t=k[k.length-1])||void 0===t?void 0:t.key])}),[k,I]),t.createElement(yi,a({key:o,className:v()(i,"".concat(i,"-").concat(o),null===g||void 0===g?void 0:g.list,l,(n={},h(n,"".concat(i,"-stack"),!!I),h(n,"".concat(i,"-stack-expanded"),R),n)),style:c,keys:k,motionAppear:!0},P,{onAllRemoved:function(){d(o)}}),(function(e,n){var r=e.config,l=e.className,c=e.style,s=e.index,d=r,u=d.key,p=d.times,h=String(u),y=r,w=y.className,C=y.style,j=y.classNames,T=y.styles,O=m(y,TE),P=k.findIndex((function(e){return e.key===h})),M={};if(I){var D=k.length-1-(P>-1?P:s-1),L="top"===o||"bottom"===o?"-50%":"0";if(D>0){var _,z,B;M.height=R?null===(_=b.current[h])||void 0===_?void 0:_.offsetHeight:null===x||void 0===x?void 0:x.offsetHeight;for(var F=0,H=0;H<D;H++){var W;F+=(null===(W=b.current[k[k.length-1-H].key])||void 0===W?void 0:W.offsetHeight)+N}var V=(R?F:D*A)*(o.startsWith("top")?1:-1),U=!R&&null!==x&&void 0!==x&&x.offsetWidth&&null!==(z=b.current[h])&&void 0!==z&&z.offsetWidth?((null===x||void 0===x?void 0:x.offsetWidth)-2*A*(D<3?D:3))/(null===(B=b.current[h])||void 0===B?void 0:B.offsetWidth):1;M.transform="translate3d(".concat(L,", ").concat(V,"px, 0) scaleX(").concat(U,")")}else M.transform="translate3d(".concat(L,", 0, 0)")}return t.createElement("div",{ref:n,className:v()("".concat(i,"-notice-wrapper"),l,null===j||void 0===j?void 0:j.wrapper),style:oe(oe(oe({},c),M),null===T||void 0===T?void 0:T.wrapper),onMouseEnter:function(){return E((function(e){return e.includes(h)?e:[].concat(nt(e),[h])}))},onMouseLeave:function(){return E((function(e){return e.filter((function(e){return e!==h}))}))}},t.createElement(EE,a({},O,{ref:function(e){P>-1?b.current[h]=e:delete b.current[h]},prefixCls:i,classNames:j,styles:T,className:v()(w,null===g||void 0===g?void 0:g.notice),style:C,times:p,key:u,eventKey:u,onNoticeClose:f,hovering:I&&S.length>0})))}))};var OE=t.forwardRef((function(e,n){var r=e.prefixCls,o=void 0===r?"rc-notification":r,a=e.container,i=e.motion,l=e.maxCount,c=e.className,s=e.style,d=e.onAllRemoved,f=e.stack,p=e.renderNotifications,h=u(t.useState([]),2),m=h[0],g=h[1],v=function(e){var t,n=m.find((function(t){return t.key===e}));null===n||void 0===n||null===(t=n.onClose)||void 0===t||t.call(n),g((function(t){return t.filter((function(t){return t.key!==e}))}))};t.useImperativeHandle(n,(function(){return{open:function(e){g((function(t){var n,r=nt(t),o=r.findIndex((function(t){return t.key===e.key})),a=oe({},e);o>=0?(a.times=((null===(n=t[o])||void 0===n?void 0:n.times)||0)+1,r[o]=a):(a.times=0,r.push(a));return l>0&&r.length>l&&(r=r.slice(-l)),r}))},close:function(e){v(e)},destroy:function(){g([])}}}));var b=u(t.useState({}),2),y=b[0],x=b[1];t.useEffect((function(){var e={};m.forEach((function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))})),Object.keys(y).forEach((function(t){e[t]=e[t]||[]})),x(e)}),[m]);var w=function(e){x((function(t){var n=oe({},t);return(n[e]||[]).length||delete n[e],n}))},C=t.useRef(!1);if(t.useEffect((function(){Object.keys(y).length>0?C.current=!0:C.current&&(null===d||void 0===d||d(),C.current=!1)}),[y]),!a)return null;var S=Object.keys(y);return(0,Ea.createPortal)(t.createElement(t.Fragment,null,S.map((function(e){var n=y[e],r=t.createElement(AE,{key:e,configList:n,placement:e,prefixCls:o,className:null===c||void 0===c?void 0:c(e),style:null===s||void 0===s?void 0:s(e),motion:i,onNoticeClose:v,onAllNoticeRemoved:w,stack:f});return p?p(r,{prefixCls:o,key:e}):r}))),a)}));const NE=OE;var RE=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],PE=function(){return document.body},ME=0;function DE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.getContainer,r=void 0===n?PE:n,o=e.motion,a=e.prefixCls,i=e.maxCount,l=e.className,c=e.style,s=e.onAllRemoved,d=e.stack,f=e.renderNotifications,p=m(e,RE),h=u(t.useState(),2),g=h[0],v=h[1],b=t.useRef(),y=t.createElement(NE,{container:g,ref:b,prefixCls:a,motion:o,maxCount:i,className:l,style:c,onAllRemoved:s,stack:d,renderNotifications:f}),x=u(t.useState([]),2),w=x[0],C=x[1],S=t.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&Object.keys(t).forEach((function(n){var r=t[n];void 0!==r&&(e[n]=r)}))})),e}(p,e);null!==t.key&&void 0!==t.key||(t.key="rc-notification-".concat(ME),ME+=1),C((function(e){return[].concat(nt(e),[{type:"open",config:t}])}))},close:function(e){C((function(t){return[].concat(nt(t),[{type:"close",key:e}])}))},destroy:function(){C((function(e){return[].concat(nt(e),[{type:"destroy"}])}))}}}),[]);return t.useEffect((function(){v(r())})),t.useEffect((function(){b.current&&w.length&&(w.forEach((function(e){switch(e.type){case"open":b.current.open(e.config);break;case"close":b.current.close(e.key);break;case"destroy":b.current.destroy()}})),C((function(e){return e.filter((function(e){return!w.includes(e)}))})))}),[w]),[S,y]}const LE=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:a,colorError:i,colorWarning:l,colorInfo:c,fontSizeLG:s,motionEaseInOutCirc:d,motionDurationSlow:u,marginXS:f,paddingXS:p,borderRadiusLG:h,zIndexPopup:m,contentPadding:g,contentBg:v}=e,b="".concat(t,"-notice"),y=new Rr("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:p,transform:"translateY(0)",opacity:1}}),x=new Rr("MessageMoveOut",{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),w={padding:p,textAlign:"center",["".concat(t,"-custom-content > ").concat(n)]:{verticalAlign:"text-bottom",marginInlineEnd:f,fontSize:s},["".concat(b,"-content")]:{display:"inline-block",padding:g,background:v,borderRadius:h,boxShadow:r,pointerEvents:"all"},["".concat(t,"-success > ").concat(n)]:{color:a},["".concat(t,"-error > ").concat(n)]:{color:i},["".concat(t,"-warning > ").concat(n)]:{color:l},["".concat(t,"-info > ").concat(n,",\n      ").concat(t,"-loading > ").concat(n)]:{color:c}};return[{[t]:Object.assign(Object.assign({},$r(e)),{color:o,position:"fixed",top:f,width:"100%",pointerEvents:"none",zIndex:m,["".concat(t,"-move-up")]:{animationFillMode:"forwards"},["\n        ".concat(t,"-move-up-appear,\n        ").concat(t,"-move-up-enter\n      ")]:{animationName:y,animationDuration:u,animationPlayState:"paused",animationTimingFunction:d},["\n        ".concat(t,"-move-up-appear").concat(t,"-move-up-appear-active,\n        ").concat(t,"-move-up-enter").concat(t,"-move-up-enter-active\n      ")]:{animationPlayState:"running"},["".concat(t,"-move-up-leave")]:{animationName:x,animationDuration:u,animationPlayState:"paused",animationTimingFunction:d},["".concat(t,"-move-up-leave").concat(t,"-move-up-leave-active")]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{["".concat(b,"-wrapper")]:Object.assign({},w)}},{["".concat(t,"-notice-pure-panel")]:Object.assign(Object.assign({},w),{padding:0,textAlign:"start"})}]},_E=$o("Message",(e=>{const t=Ho(e,{height:150});return[LE(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase+Vs+10,contentBg:e.colorBgElevated,contentPadding:"".concat((e.controlHeightLG-e.fontSize*e.lineHeight)/2,"px ").concat(e.paddingSM,"px")})));var zE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const BE={info:t.createElement(tx,null),success:t.createElement(Gy,null),error:t.createElement(Yy,null),warning:t.createElement(Qy,null),loading:t.createElement(yl,null)},FE=e=>{let{prefixCls:n,type:r,icon:o,children:a}=e;return t.createElement("div",{className:v()("".concat(n,"-custom-content"),"".concat(n,"-").concat(r))},o||BE[r],t.createElement("span",null,a))},HE=e=>{const{prefixCls:n,className:r,type:o,icon:a,content:i}=e,l=zE(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:c}=t.useContext(at),s=n||c("message"),d=lh(s),[u,f,p]=_E(s,d);return u(t.createElement(EE,Object.assign({},l,{prefixCls:s,className:v()(r,f,"".concat(s,"-notice-pure-panel"),p,d),eventKey:"pure",duration:null,content:t.createElement(FE,{prefixCls:s,type:o,icon:a},i)})))};function WE(e){let t;const n=new Promise((n=>{t=e((()=>{n(!0)}))})),r=()=>{null===t||void 0===t||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var VE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const UE=3,KE=e=>{let{children:n,prefixCls:r}=e;const o=lh(r),[a,i,l]=_E(r,o);return a(t.createElement(jE,{classNames:{list:v()(i,l,o)}},n))},GE=(e,n)=>{let{prefixCls:r,key:o}=n;return t.createElement(KE,{prefixCls:r,key:o},e)},qE=t.forwardRef(((e,n)=>{const{top:r,prefixCls:o,getContainer:a,maxCount:i,duration:l=UE,rtl:c,transitionName:s,onAllRemoved:d}=e,{getPrefixCls:u,getPopupContainer:f,message:p,direction:h}=t.useContext(at),m=o||u("message"),g=t.createElement("span",{className:"".concat(m,"-close-x")},t.createElement(zg,{className:"".concat(m,"-close-icon")})),[b,y]=DE({prefixCls:m,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!==r&&void 0!==r?r:8}),className:()=>v()({["".concat(m,"-rtl")]:null!==c&&void 0!==c?c:"rtl"===h}),motion:()=>function(e,t){return{motionName:null!==t&&void 0!==t?t:"".concat(e,"-move-up")}}(m,s),closable:!1,closeIcon:g,duration:l,getContainer:()=>(null===a||void 0===a?void 0:a())||(null===f||void 0===f?void 0:f())||document.body,maxCount:i,onAllRemoved:d,renderNotifications:GE});return t.useImperativeHandle(n,(()=>Object.assign(Object.assign({},b),{prefixCls:m,message:p}))),y}));let XE=0;function YE(e){const n=t.useRef(null),r=(ud("Message"),t.useMemo((()=>{const e=e=>{var t;null===(t=n.current)||void 0===t||t.close(e)},r=r=>{if(!n.current){const e=()=>{};return e.then=()=>{},e}const{open:o,prefixCls:a,message:i}=n.current,l="".concat(a,"-notice"),{content:c,icon:s,type:d,key:u,className:f,style:p,onClose:h}=r,m=VE(r,["content","icon","type","key","className","style","onClose"]);let g=u;return void 0!==g&&null!==g||(XE+=1,g="antd-message-".concat(XE)),WE((n=>(o(Object.assign(Object.assign({},m),{key:g,content:t.createElement(FE,{prefixCls:a,type:d,icon:s},c),placement:"top",className:v()(d&&"".concat(l,"-").concat(d),f,null===i||void 0===i?void 0:i.className),style:Object.assign(Object.assign({},null===i||void 0===i?void 0:i.style),p),onClose:()=>{null===h||void 0===h||h(),n()}})),()=>{e(g)})))},o={open:r,destroy:t=>{var r;void 0!==t?e(t):null===(r=n.current)||void 0===r||r.destroy()}};return["info","success","warning","error","loading"].forEach((e=>{o[e]=(t,n,o)=>{let a,i,l;a=t&&"object"===typeof t&&"content"in t?t:{content:t},"function"===typeof n?l=n:(i=n,l=o);const c=Object.assign(Object.assign({onClose:l,duration:i},a),{type:e});return r(c)}})),o}),[]));return[r,t.createElement(qE,Object.assign({key:"message-holder"},e,{ref:n}))]}let $E=null,JE=e=>e(),QE=[],ZE={};function ek(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:o}=ZE,a=(null===e||void 0===e?void 0:e())||document.body;return{getContainer:()=>a,duration:t,rtl:n,maxCount:r,top:o}}const tk=t.forwardRef(((e,n)=>{const{messageConfig:r,sync:o}=e,{getPrefixCls:a}=(0,t.useContext)(at),i=ZE.prefixCls||a("message"),l=(0,t.useContext)(CE),[c,s]=YE(Object.assign(Object.assign(Object.assign({},r),{prefixCls:i}),l.message));return t.useImperativeHandle(n,(()=>{const e=Object.assign({},c);return Object.keys(e).forEach((t=>{e[t]=function(){return o(),c[t].apply(c,arguments)}})),{instance:e,sync:o}})),s})),nk=t.forwardRef(((e,n)=>{const[r,o]=t.useState(ek),a=()=>{o(ek)};t.useEffect(a,[]);const i=Tu(),l=i.getRootPrefixCls(),c=i.getIconPrefixCls(),s=i.getTheme(),d=t.createElement(tk,{ref:n,sync:a,messageConfig:r});return t.createElement(Nu,{prefixCls:l,iconPrefixCls:c,theme:s},i.holderRender?i.holderRender(d):d)}));function rk(){if(!$E){const e=document.createDocumentFragment(),n={fragment:e};return $E=n,void JE((()=>{Ni(t.createElement(nk,{ref:e=>{const{instance:t,sync:r}=e||{};Promise.resolve().then((()=>{!n.instance&&t&&(n.instance=t,n.sync=r,rk())}))}}),e)}))}$E.instance&&(QE.forEach((e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":JE((()=>{const t=$E.instance.open(Object.assign(Object.assign({},ZE),e.config));null===t||void 0===t||t.then(e.resolve),e.setCloseFn(t)}));break;case"destroy":JE((()=>{null===$E||void 0===$E||$E.instance.destroy(e.key)}));break;default:JE((()=>{var n;const r=(n=$E.instance)[t].apply(n,nt(e.args));null===r||void 0===r||r.then(e.resolve),e.setCloseFn(r)}))}})),QE=[])}const ok={open:function(e){const t=WE((t=>{let n;const r={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return QE.push(r),()=>{n?JE((()=>{n()})):r.skipped=!0}}));return rk(),t},destroy:function(e){QE.push({type:"destroy",key:e}),rk()},config:function(e){ZE=Object.assign(Object.assign({},ZE),e),JE((()=>{var e;null===(e=null===$E||void 0===$E?void 0:$E.sync)||void 0===e||e.call($E)}))},useMessage:function(e){return YE(e)},_InternalPanelDoNotUseOrYouWillBeFired:HE};["success","info","warning","error","loading"].forEach((e=>{ok[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){Tu();const n=WE((n=>{let r;const o={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return QE.push(o),()=>{r?JE((()=>{r()})):o.skipped=!0}}));return rk(),n}(e,n)}}));const ak=ok;function ik(e){return Ho(e,{inputAffixPadding:e.paddingXXS})}const lk=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:a,controlHeightLG:i,fontSizeLG:l,lineHeightLG:c,paddingSM:s,controlPaddingHorizontalSM:d,controlPaddingHorizontal:u,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:h,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:v,colorWarningOutline:b,colorBgContainer:y}=e;return{paddingBlock:Math.max(Math.round((t-n*r)/2*10)/10-o,0),paddingBlockSM:Math.max(Math.round((a-n*r)/2*10)/10-o,0),paddingBlockLG:Math.ceil((i-l*c)/2*10)/10-o,paddingInline:s-o,paddingInlineSM:d-o,paddingInlineLG:u-o,addonBg:f,activeBorderColor:h,hoverBorderColor:p,activeShadow:"0 0 0 ".concat(m,"px ").concat(g),errorActiveShadow:"0 0 0 ".concat(m,"px ").concat(v),warningActiveShadow:"0 0 0 ".concat(m,"px ").concat(b),hoverBg:y,activeBg:y,inputFontSize:n,inputFontSizeLG:l,inputFontSizeSM:n}},ck=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),sk=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},ck(Ho(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),dk=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),uk=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status,":not(").concat(e.componentCls,"-disabled)")]:Object.assign(Object.assign({},dk(e,t)),{["".concat(e.componentCls,"-prefix, ").concat(e.componentCls,"-suffix")]:{color:t.affixColor}})}),fk=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},dk(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{["&".concat(e.componentCls,"-disabled, &[disabled]")]:Object.assign({},sk(e))}),uk(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),uk(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),pk=(e,t)=>({["&".concat(e.componentCls,"-group-wrapper-status-").concat(t.status)]:{["".concat(e.componentCls,"-group-addon")]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),hk=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.addonBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},pk(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),pk(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{["&".concat(e.componentCls,"-group-wrapper-disabled")]:{["".concat(e.componentCls,"-group-addon")]:Object.assign({},sk(e))}})}),mk=(e,t)=>({"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},["&".concat(e.componentCls,"-disabled, &[disabled]")]:{color:e.colorTextDisabled}},t)}),gk=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:null===t||void 0===t?void 0:t.inputColor},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),vk=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status,":not(").concat(e.componentCls,"-disabled)")]:Object.assign(Object.assign({},gk(e,t)),{["".concat(e.componentCls,"-prefix, ").concat(e.componentCls,"-suffix")]:{color:t.affixColor}})}),bk=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},gk(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.colorPrimary})),{["&".concat(e.componentCls,"-disabled, &[disabled]")]:Object.assign({},sk(e))}),vk(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),vk(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),yk=(e,t)=>({["&".concat(e.componentCls,"-group-wrapper-status-").concat(t.status)]:{["".concat(e.componentCls,"-group-addon")]:{background:t.addonBg,color:t.addonColor}}}),xk=e=>({"&-filled":Object.assign(Object.assign(Object.assign({["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.colorFillTertiary},["".concat(e.componentCls,"-filled:not(:focus):not(:focus-within)")]:{"&:not(:first-child)":{borderInlineStart:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},"&:not(:last-child)":{borderInlineEnd:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}}}},yk(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),yk(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{["&".concat(e.componentCls,"-group-wrapper-disabled")]:{["".concat(e.componentCls,"-group")]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderTop:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},"&-addon:last-child":{borderInlineEnd:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderTop:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)}}}})}),wk=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Ck=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:"".concat(rn(t)," ").concat(rn(o)),fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},Sk=e=>({padding:"".concat(rn(e.paddingBlockSM)," ").concat(rn(e.paddingInlineSM)),fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Ek=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:"".concat(rn(e.paddingBlock)," ").concat(rn(e.paddingInline)),color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:"all ".concat(e.motionDurationMid)},wk(e.colorTextPlaceholder)),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:"all ".concat(e.motionDurationSlow,", height 0s"),resize:"vertical"},"&-lg":Object.assign({},Ck(e)),"&-sm":Object.assign({},Sk(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),kk=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},["&-lg ".concat(t,", &-lg > ").concat(t,"-group-addon")]:Object.assign({},Ck(e)),["&-sm ".concat(t,", &-sm > ").concat(t,"-group-addon")]:Object.assign({},Sk(e)),["&-lg ".concat(n,"-select-single ").concat(n,"-select-selector")]:{height:e.controlHeightLG},["&-sm ".concat(n,"-select-single ").concat(n,"-select-selector")]:{height:e.controlHeightSM},["> ".concat(t)]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},["".concat(t,"-group")]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:"0 ".concat(rn(e.paddingInline)),color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:"all ".concat(e.motionDurationSlow),lineHeight:1,["".concat(n,"-select")]:{margin:"".concat(rn(e.calc(e.paddingBlock).add(1).mul(-1).equal())," ").concat(rn(e.calc(e.paddingInline).mul(-1).equal())),["&".concat(n,"-select-single:not(").concat(n,"-select-customize-input):not(").concat(n,"-pagination-size-changer)")]:{["".concat(n,"-select-selector")]:{backgroundColor:"inherit",border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," transparent"),boxShadow:"none"}},"&-open, &-focused":{["".concat(n,"-select-selector")]:{color:e.colorPrimary}}},["".concat(n,"-cascader-picker")]:{margin:"-9px ".concat(rn(e.calc(e.paddingInline).mul(-1).equal())),backgroundColor:"transparent",["".concat(n,"-cascader-input")]:{textAlign:"start",border:0,boxShadow:"none"}}}},["".concat(t)]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,["".concat(t,"-search-with-button &")]:{zIndex:0}}},["> ".concat(t,":first-child, ").concat(t,"-group-addon:first-child")]:{borderStartEndRadius:0,borderEndEndRadius:0,["".concat(n,"-select ").concat(n,"-select-selector")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["> ".concat(t,"-affix-wrapper")]:{["&:not(:first-child) ".concat(t)]:{borderStartStartRadius:0,borderEndStartRadius:0},["&:not(:last-child) ".concat(t)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["> ".concat(t,":last-child, ").concat(t,"-group-addon:last-child")]:{borderStartStartRadius:0,borderEndStartRadius:0,["".concat(n,"-select ").concat(n,"-select-selector")]:{borderStartStartRadius:0,borderEndStartRadius:0}},["".concat(t,"-affix-wrapper")]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,["".concat(t,"-search &")]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},["&:not(:first-child), ".concat(t,"-search &:not(:first-child)")]:{borderStartStartRadius:0,borderEndStartRadius:0}},["&".concat(t,"-group-compact")]:Object.assign(Object.assign({display:"block"},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{["".concat(t,"-group-addon, ").concat(t,"-group-wrap, > ").concat(t)]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},["\n        & > ".concat(t,"-affix-wrapper,\n        & > ").concat(t,"-number-affix-wrapper,\n        & > ").concat(n,"-picker-range\n      ")]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},["".concat(t)]:{float:"none"},["& > ".concat(n,"-select > ").concat(n,"-select-selector,\n      & > ").concat(n,"-select-auto-complete ").concat(t,",\n      & > ").concat(n,"-cascader-picker ").concat(t,",\n      & > ").concat(t,"-group-wrapper ").concat(t)]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},["& > ".concat(n,"-select-focused")]:{zIndex:1},["& > ".concat(n,"-select > ").concat(n,"-select-arrow")]:{zIndex:1},["& > *:first-child,\n      & > ".concat(n,"-select:first-child > ").concat(n,"-select-selector,\n      & > ").concat(n,"-select-auto-complete:first-child ").concat(t,",\n      & > ").concat(n,"-cascader-picker:first-child ").concat(t)]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},["& > *:last-child,\n      & > ".concat(n,"-select:last-child > ").concat(n,"-select-selector,\n      & > ").concat(n,"-cascader-picker:last-child ").concat(t,",\n      & > ").concat(n,"-cascader-picker-focused:last-child ").concat(t)]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},["& > ".concat(n,"-select-auto-complete ").concat(t)]:{verticalAlign:"top"},["".concat(t,"-group-wrapper + ").concat(t,"-group-wrapper")]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),["".concat(t,"-affix-wrapper")]:{borderRadius:0}},["".concat(t,"-group-wrapper:not(:last-child)")]:{["&".concat(t,"-search > ").concat(t,"-group")]:{["& > ".concat(t,"-group-addon > ").concat(t,"-search-button")]:{borderRadius:0},["& > ".concat(t)]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},jk=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),Ek(e)),fk(e)),bk(e)),mk(e)),{'&[type="color"]':{height:e.controlHeight,["&".concat(t,"-lg")]:{height:e.controlHeightLG},["&".concat(t,"-sm")]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Ik=e=>{const{componentCls:t}=e;return{["".concat(t,"-clear-icon")]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:"0 ".concat(rn(e.inputAffixPadding))}}}},Tk=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:a,colorIconHover:i,iconCls:l}=e;return{["".concat(t,"-affix-wrapper")]:Object.assign(Object.assign(Object.assign(Object.assign({},Ek(e)),{display:"inline-flex",["&:not(".concat(t,"-disabled):hover")]:{zIndex:1,["".concat(t,"-search-with-button &")]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},["> input".concat(t)]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},["".concat(t)]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),Ik(e)),{["".concat(l).concat(t,"-password-icon")]:{color:a,cursor:"pointer",transition:"all ".concat(o),"&:hover":{color:i}}})}},Ak=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{["".concat(t,"-group")]:Object.assign(Object.assign(Object.assign({},$r(e)),kk(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{["".concat(t,"-group-addon")]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{["".concat(t,"-group-addon")]:{borderRadius:r}}},hk(e)),xk(e)),{["&:not(".concat(t,"-compact-first-item):not(").concat(t,"-compact-last-item)").concat(t,"-compact-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderRadius:0}},["&:not(".concat(t,"-compact-last-item)").concat(t,"-compact-first-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&:not(".concat(t,"-compact-first-item)").concat(t,"-compact-last-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartStartRadius:0,borderEndStartRadius:0}},["&:not(".concat(t,"-compact-last-item)").concat(t,"-compact-item")]:{["".concat(t,"-affix-wrapper")]:{borderStartEndRadius:0,borderEndEndRadius:0}}})})}},Ok=e=>{const{componentCls:t,antCls:n}=e,r="".concat(t,"-search");return{[r]:{["".concat(t)]:{"&:hover, &:focus":{borderColor:e.colorPrimaryHover,["+ ".concat(t,"-group-addon ").concat(r,"-button:not(").concat(n,"-btn-primary)")]:{borderInlineStartColor:e.colorPrimaryHover}}},["".concat(t,"-affix-wrapper")]:{borderRadius:0},["".concat(t,"-lg")]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal({unit:!1})},["> ".concat(t,"-group")]:{["> ".concat(t,"-group-addon:last-child")]:{insetInlineStart:-1,padding:0,border:0,["".concat(r,"-button")]:{marginInlineEnd:-1,paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius,borderEndStartRadius:0,boxShadow:"none"},["".concat(r,"-button:not(").concat(n,"-btn-primary)")]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},["&".concat(n,"-btn-loading::before")]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},["".concat(r,"-button")]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},["&-large ".concat(r,"-button")]:{height:e.controlHeightLG},["&-small ".concat(r,"-button")]:{height:e.controlHeightSM},"&-rtl":{direction:"rtl"},["&".concat(t,"-compact-item")]:{["&:not(".concat(t,"-compact-last-item)")]:{["".concat(t,"-group-addon")]:{["".concat(t,"-search-button")]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},["&:not(".concat(t,"-compact-first-item)")]:{["".concat(t,",").concat(t,"-affix-wrapper")]:{borderRadius:0}},["> ".concat(t,"-group-addon ").concat(t,"-search-button,\n        > ").concat(t,",\n        ").concat(t,"-affix-wrapper")]:{"&:hover,&:focus,&:active":{zIndex:2}},["> ".concat(t,"-affix-wrapper-focused")]:{zIndex:2}}}}},Nk=e=>{const{componentCls:t,paddingLG:n}=e,r="".concat(t,"-textarea");return{[r]:{position:"relative","&-show-count":{["> ".concat(t)]:{height:"100%"},["".concat(t,"-data-count")]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{["> ".concat(t)]:{paddingInlineEnd:n}},["&-affix-wrapper".concat(r,"-has-feedback")]:{["".concat(t)]:{paddingInlineEnd:n}},["&-affix-wrapper".concat(t,"-affix-wrapper")]:{padding:0,["> textarea".concat(t)]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent","&:focus":{boxShadow:"none !important"}},["".concat(t,"-suffix")]:{margin:0,"> *:not(:last-child)":{marginInline:0},["".concat(t,"-clear-icon")]:{position:"absolute",insetInlineEnd:e.paddingXS,insetBlockStart:e.paddingXS},["".concat(r,"-suffix")]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}},Rk=e=>{const{componentCls:t}=e;return{["".concat(t,"-out-of-range")]:{["&, & input, & textarea, ".concat(t,"-show-count-suffix, ").concat(t,"-data-count")]:{color:e.colorError}}}},Pk=$o("Input",(e=>{const t=Ho(e,ik(e));return[jk(t),Nk(t),Tk(t),Ak(t),Ok(t),Rk(t),Jl(t)]}),lk),Mk=e=>{const{getPrefixCls:n,direction:r}=(0,t.useContext)(at),{prefixCls:o,className:a}=e,i=n("input-group",o),l=n("input"),[c,s]=Pk(l),d=v()(i,{["".concat(i,"-lg")]:"large"===e.size,["".concat(i,"-sm")]:"small"===e.size,["".concat(i,"-compact")]:e.compact,["".concat(i,"-rtl")]:"rtl"===r},s,a),u=(0,t.useContext)(Xw),f=(0,t.useMemo)((()=>Object.assign(Object.assign({},u),{isFormItemInput:!1})),[u]);return c(t.createElement("span",{className:d,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},t.createElement(Xw.Provider,{value:f},e.children)))};function Dk(e,t,n,r){if(n){var o=t;if("click"===t.type){var a=e.cloneNode(!0);return o=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",void n(o)}if("file"!==e.type&&void 0!==r){var i=e.cloneNode(!0);return o=Object.create(t,{target:{value:i},currentTarget:{value:i}}),i.value=r,void n(o)}n(o)}}function Lk(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}const _k=function(e){var n,r,o=e.inputElement,i=e.children,l=e.prefixCls,c=e.prefix,s=e.suffix,d=e.addonBefore,u=e.addonAfter,p=e.className,m=e.style,g=e.disabled,b=e.readOnly,y=e.focused,x=e.triggerFocus,w=e.allowClear,C=e.value,S=e.handleReset,E=e.hidden,k=e.classes,j=e.classNames,I=e.dataAttrs,T=e.styles,A=e.components,O=null!==i&&void 0!==i?i:o,N=(null===A||void 0===A?void 0:A.affixWrapper)||"span",R=(null===A||void 0===A?void 0:A.groupWrapper)||"span",P=(null===A||void 0===A?void 0:A.wrapper)||"span",M=(null===A||void 0===A?void 0:A.groupAddon)||"span",D=(0,t.useRef)(null),L=function(e){return!!(e.prefix||e.suffix||e.allowClear)}(e),_=(0,t.cloneElement)(O,{value:C,className:v()(O.props.className,!L&&(null===j||void 0===j?void 0:j.variant))||null});if(L){var z,B=null;if(w){var F,H=!g&&!b&&C,W="".concat(l,"-clear-icon"),V="object"===f(w)&&null!==w&&void 0!==w&&w.clearIcon?w.clearIcon:"\u2716";B=t.createElement("span",{onClick:S,onMouseDown:function(e){return e.preventDefault()},className:v()(W,(F={},h(F,"".concat(W,"-hidden"),!H),h(F,"".concat(W,"-has-suffix"),!!s),F)),role:"button",tabIndex:-1},V)}var U="".concat(l,"-affix-wrapper"),K=v()(U,(h(z={},"".concat(l,"-disabled"),g),h(z,"".concat(U,"-disabled"),g),h(z,"".concat(U,"-focused"),y),h(z,"".concat(U,"-readonly"),b),h(z,"".concat(U,"-input-with-clear-btn"),s&&w&&C),z),null===k||void 0===k?void 0:k.affixWrapper,null===j||void 0===j?void 0:j.affixWrapper,null===j||void 0===j?void 0:j.variant),G=(s||w)&&t.createElement("span",{className:v()("".concat(l,"-suffix"),null===j||void 0===j?void 0:j.suffix),style:null===T||void 0===T?void 0:T.suffix},B,s);_=t.createElement(N,a({className:K,style:null===T||void 0===T?void 0:T.affixWrapper,onClick:function(e){var t;null!==(t=D.current)&&void 0!==t&&t.contains(e.target)&&(null===x||void 0===x||x())}},null===I||void 0===I?void 0:I.affixWrapper,{ref:D}),c&&t.createElement("span",{className:v()("".concat(l,"-prefix"),null===j||void 0===j?void 0:j.prefix),style:null===T||void 0===T?void 0:T.prefix},c),_,G)}if(function(e){return!(!e.addonBefore&&!e.addonAfter)}(e)){var q="".concat(l,"-group"),X="".concat(q,"-addon"),Y="".concat(q,"-wrapper"),$=v()("".concat(l,"-wrapper"),q,null===k||void 0===k?void 0:k.wrapper,null===j||void 0===j?void 0:j.wrapper),J=v()(Y,h({},"".concat(Y,"-disabled"),g),null===k||void 0===k?void 0:k.group,null===j||void 0===j?void 0:j.groupWrapper);_=t.createElement(R,{className:J},t.createElement(P,{className:$},d&&t.createElement(M,{className:X},d),_,u&&t.createElement(M,{className:X},u)))}return t.cloneElement(_,{className:v()(null===(n=_.props)||void 0===n?void 0:n.className,p)||null,style:oe(oe({},null===(r=_.props)||void 0===r?void 0:r.style),m),hidden:E})};var zk=["show"];function Bk(e,n){return t.useMemo((function(){var t={};n&&(t.show="object"===f(n)&&n.formatter?n.formatter:!!n);var r=t=oe(oe({},t),e),o=r.show,a=m(r,zk);return oe(oe({},a),{},{show:!!o,showFormatter:"function"===typeof o?o:void 0,strategy:a.strategy||function(e){return e.length}})}),[e,n])}var Fk=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Hk=(0,t.forwardRef)((function(e,n){var r=e.autoComplete,o=e.onChange,i=e.onFocus,l=e.onBlur,c=e.onPressEnter,s=e.onKeyDown,d=e.prefixCls,f=void 0===d?"rc-input":d,p=e.disabled,g=e.htmlSize,b=e.className,y=e.maxLength,x=e.suffix,w=e.showCount,C=e.count,S=e.type,E=void 0===S?"text":S,k=e.classes,j=e.classNames,I=e.styles,T=e.onCompositionStart,A=e.onCompositionEnd,O=m(e,Fk),N=u((0,t.useState)(!1),2),R=N[0],P=N[1],M=(0,t.useRef)(!1),D=(0,t.useRef)(null),L=function(e){D.current&&Lk(D.current,e)},_=u(_r(e.defaultValue,{value:e.value}),2),z=_[0],B=_[1],F=void 0===z||null===z?"":String(z),H=u((0,t.useState)(null),2),W=H[0],V=H[1],U=Bk(C,w),K=U.max||y,G=U.strategy(F),q=!!K&&G>K;(0,t.useImperativeHandle)(n,(function(){return{focus:L,blur:function(){var e;null===(e=D.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var r;null===(r=D.current)||void 0===r||r.setSelectionRange(e,t,n)},select:function(){var e;null===(e=D.current)||void 0===e||e.select()},input:D.current}})),(0,t.useEffect)((function(){P((function(e){return(!e||!p)&&e}))}),[p]);var X=function(e,t,n){var r,a,i=t;if(!M.current&&U.exceedFormatter&&U.max&&U.strategy(t)>U.max)t!==(i=U.exceedFormatter(t,{max:U.max}))&&V([(null===(r=D.current)||void 0===r?void 0:r.selectionStart)||0,(null===(a=D.current)||void 0===a?void 0:a.selectionEnd)||0]);else if("compositionEnd"===n.source)return;B(i),D.current&&Dk(D.current,e,o,i)};(0,t.useEffect)((function(){var e;W&&(null===(e=D.current)||void 0===e||e.setSelectionRange.apply(e,nt(W)))}),[W]);var Y=function(e){X(e,e.target.value,{source:"change"})},$=function(e){M.current=!1,X(e,e.currentTarget.value,{source:"compositionEnd"}),null===A||void 0===A||A(e)},J=function(e){c&&"Enter"===e.key&&c(e),null===s||void 0===s||s(e)},Q=function(e){P(!0),null===i||void 0===i||i(e)},Z=function(e){P(!1),null===l||void 0===l||l(e)},ee=q&&"".concat(f,"-out-of-range");return t.createElement(_k,a({},O,{prefixCls:f,className:v()(b,ee),handleReset:function(e){B(""),L(),D.current&&Dk(D.current,e,o)},value:F,focused:R,triggerFocus:L,suffix:function(){var e=Number(K)>0;if(x||U.show){var n=U.showFormatter?U.showFormatter({value:F,count:G,maxLength:K}):"".concat(G).concat(e?" / ".concat(K):"");return t.createElement(t.Fragment,null,U.show&&t.createElement("span",{className:v()("".concat(f,"-show-count-suffix"),h({},"".concat(f,"-show-count-has-suffix"),!!x),null===j||void 0===j?void 0:j.count),style:oe({},null===I||void 0===I?void 0:I.count)},n),x)}return null}(),disabled:p,classes:k,classNames:j,styles:I}),function(){var n=rt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames"]);return t.createElement("input",a({autoComplete:r},n,{onChange:Y,onFocus:Q,onBlur:Z,onKeyDown:J,className:v()(f,h({},"".concat(f,"-disabled"),p),null===j||void 0===j?void 0:j.input),style:null===I||void 0===I?void 0:I.input,ref:D,size:g,type:E,onCompositionStart:function(e){M.current=!0,null===T||void 0===T||T(e)},onCompositionEnd:$}))}())}));const Wk=Hk;function Vk(e,t,n){return v()({["".concat(e,"-status-success")]:"success"===t,["".concat(e,"-status-warning")]:"warning"===t,["".concat(e,"-status-error")]:"error"===t,["".concat(e,"-status-validating")]:"validating"===t,["".concat(e,"-has-feedback")]:n})}const Uk=(e,t)=>t||e;function Kk(e,n){const r=(0,t.useRef)([]),o=()=>{r.current.push(setTimeout((()=>{var t,n,r,o;(null===(t=e.current)||void 0===t?void 0:t.input)&&"password"===(null===(n=e.current)||void 0===n?void 0:n.input.getAttribute("type"))&&(null===(r=e.current)||void 0===r?void 0:r.input.hasAttribute("value"))&&(null===(o=e.current)||void 0===o||o.input.removeAttribute("value"))})))};return(0,t.useEffect)((()=>(n&&o(),()=>r.current.forEach((e=>{e&&clearTimeout(e)})))),[]),o}const Gk=["outlined","borderless","filled"],qk=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const r=(0,t.useContext)($w);let o;o="undefined"!==typeof e?e:!1===n?"borderless":null!==r&&void 0!==r?r:"outlined";return[o,Gk.includes(o)]},Xk=e=>{let n;return"object"===typeof e&&(null===e||void 0===e?void 0:e.clearIcon)?n=e:e&&(n={clearIcon:t.createElement(Yy,null)}),n};var Yk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const $k=(0,t.forwardRef)(((e,n)=>{var r;const{prefixCls:o,bordered:a=!0,status:i,size:l,disabled:c,onBlur:s,onFocus:d,suffix:u,allowClear:f,addonAfter:p,addonBefore:h,className:m,style:g,styles:b,rootClassName:y,onChange:x,classNames:w,variant:C}=e,S=Yk(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);const{getPrefixCls:E,direction:k,input:j}=t.useContext(at),I=E("input",o),T=(0,t.useRef)(null),A=lh(I),[O,N,R]=Pk(I,A),{compactSize:P,compactItemClassnames:M}=nl(I,k),D=Yi((e=>{var t;return null!==(t=null!==l&&void 0!==l?l:P)&&void 0!==t?t:e})),L=t.useContext(Ki),_=null!==c&&void 0!==c?c:L,{status:z,hasFeedback:B,feedbackIcon:F}=(0,t.useContext)(Xw),H=Uk(z,i),W=function(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}(e)||!!B;(0,t.useRef)(W);const V=Kk(T,!0),U=(B||u)&&t.createElement(t.Fragment,null,u,B&&F),K=Xk(f),[G,q]=qk(C,a);return O(t.createElement(Wk,Object.assign({ref:Br(n,T),prefixCls:I,autoComplete:null===j||void 0===j?void 0:j.autoComplete},S,{disabled:_,onBlur:e=>{V(),null===s||void 0===s||s(e)},onFocus:e=>{V(),null===d||void 0===d||d(e)},style:Object.assign(Object.assign({},null===j||void 0===j?void 0:j.style),g),styles:Object.assign(Object.assign({},null===j||void 0===j?void 0:j.styles),b),suffix:U,allowClear:K,className:v()(m,y,R,A,M,null===j||void 0===j?void 0:j.className),onChange:e=>{V(),null===x||void 0===x||x(e)},addonAfter:p&&t.createElement(rl,null,t.createElement(Yw,{override:!0,status:!0},p)),addonBefore:h&&t.createElement(rl,null,t.createElement(Yw,{override:!0,status:!0},h)),classNames:Object.assign(Object.assign(Object.assign({},w),null===j||void 0===j?void 0:j.classNames),{input:v()({["".concat(I,"-sm")]:"small"===D,["".concat(I,"-lg")]:"large"===D,["".concat(I,"-rtl")]:"rtl"===k},null===w||void 0===w?void 0:w.input,null===(r=null===j||void 0===j?void 0:j.classNames)||void 0===r?void 0:r.input,N),variant:v()({["".concat(I,"-").concat(G)]:q},Vk(I,H)),affixWrapper:v()({["".concat(I,"-affix-wrapper-sm")]:"small"===D,["".concat(I,"-affix-wrapper-lg")]:"large"===D,["".concat(I,"-affix-wrapper-rtl")]:"rtl"===k},N),wrapper:v()({["".concat(I,"-group-rtl")]:"rtl"===k},N),groupWrapper:v()({["".concat(I,"-group-wrapper-sm")]:"small"===D,["".concat(I,"-group-wrapper-lg")]:"large"===D,["".concat(I,"-group-wrapper-rtl")]:"rtl"===k,["".concat(I,"-group-wrapper-").concat(G)]:q},Vk("".concat(I,"-group-wrapper"),H,B),N)})})))})),Jk=$k;const Qk={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};var Zk=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Qk}))};const ej=t.forwardRef(Zk);const tj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var nj=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:tj}))};const rj=t.forwardRef(nj);var oj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const aj=e=>e?t.createElement(rj,null):t.createElement(ej,null),ij={click:"onClick",hover:"onMouseOver"},lj=t.forwardRef(((e,n)=>{const{visibilityToggle:r=!0}=e,o="object"===typeof r&&void 0!==r.visible,[a,i]=(0,t.useState)((()=>!!o&&r.visible)),l=(0,t.useRef)(null);t.useEffect((()=>{o&&i(r.visible)}),[o,r]);const c=Kk(l),s=()=>{const{disabled:t}=e;t||(a&&c(),i((e=>{var t;const n=!e;return"object"===typeof r&&(null===(t=r.onVisibleChange)||void 0===t||t.call(r,n)),n})))},{className:d,prefixCls:u,inputPrefixCls:f,size:p}=e,h=oj(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:m}=t.useContext(at),g=m("input",f),b=m("input-password",u),y=r&&(n=>{const{action:r="click",iconRender:o=aj}=e,i=ij[r]||"",l=o(a),c={[i]:s,className:"".concat(n,"-icon"),key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return t.cloneElement(t.isValidElement(l)?l:t.createElement("span",null,l),c)})(b),x=v()(b,d,{["".concat(b,"-").concat(p)]:!!p}),w=Object.assign(Object.assign({},rt(h,["suffix","iconRender","visibilityToggle"])),{type:a?"text":"password",className:x,prefixCls:g,suffix:y});return p&&(w.size=p),t.createElement(Jk,Object.assign({ref:Br(n,l)},w))}));const cj=lj;const sj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var dj=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:sj}))};const uj=t.forwardRef(dj);var fj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const pj=t.forwardRef(((e,n)=>{const{prefixCls:r,inputPrefixCls:o,className:a,size:i,suffix:l,enterButton:c=!1,addonAfter:s,loading:d,disabled:u,onSearch:f,onChange:p,onCompositionStart:h,onCompositionEnd:m}=e,g=fj(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:b,direction:y}=t.useContext(at),x=t.useRef(!1),w=b("input-search",r),C=b("input",o),{compactSize:S}=nl(w,y),E=Yi((e=>{var t;return null!==(t=null!==i&&void 0!==i?i:S)&&void 0!==t?t:e})),k=t.useRef(null),j=e=>{var t;document.activeElement===(null===(t=k.current)||void 0===t?void 0:t.input)&&e.preventDefault()},I=e=>{var t,n;f&&f(null===(n=null===(t=k.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},T="boolean"===typeof c?t.createElement(uj,null):null,A="".concat(w,"-button");let O;const N=c||{},R=N.type&&!0===N.type.__ANT_BUTTON;O=R||"button"===N.type?ha(N,Object.assign({onMouseDown:j,onClick:e=>{var t,n;null===(n=null===(t=null===N||void 0===N?void 0:N.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),I(e)},key:"enterButton"},R?{className:A,size:E}:{})):t.createElement(ac,{className:A,type:c?"primary":void 0,size:E,disabled:u,key:"enterButton",onMouseDown:j,onClick:I,loading:d,icon:T},c),s&&(O=[O,ha(s,{key:"addonAfter"})]);const P=v()(w,{["".concat(w,"-rtl")]:"rtl"===y,["".concat(w,"-").concat(E)]:!!E,["".concat(w,"-with-button")]:!!c},a);return t.createElement(Jk,Object.assign({ref:Br(k,n),onPressEnter:e=>{x.current||d||I(e)}},g,{size:E,onCompositionStart:e=>{x.current=!0,null===h||void 0===h||h(e)},onCompositionEnd:e=>{x.current=!1,null===m||void 0===m||m(e)},prefixCls:C,addonAfter:O,suffix:l,onChange:e=>{e&&e.target&&"click"===e.type&&f&&f(e.target.value,e,{source:"clear"}),p&&p(e)},className:P,disabled:u}))}));const hj=pj;var mj,gj=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],vj={};function bj(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;mj||((mj=document.createElement("textarea")).setAttribute("tab-index","-1"),mj.setAttribute("aria-hidden","true"),document.body.appendChild(mj)),e.getAttribute("wrap")?mj.setAttribute("wrap",e.getAttribute("wrap")):mj.removeAttribute("wrap");var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&vj[n])return vj[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),i=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:gj.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),paddingSize:a,borderSize:i,boxSizing:o};return t&&n&&(vj[n]=l),l}(e,t),a=o.paddingSize,i=o.borderSize,l=o.boxSizing,c=o.sizingStyle;mj.setAttribute("style","".concat(c,";").concat("\n  min-height:0 !important;\n  max-height:none !important;\n  height:0 !important;\n  visibility:hidden !important;\n  overflow:hidden !important;\n  position:absolute !important;\n  z-index:-1000 !important;\n  top:0 !important;\n  right:0 !important;\n  pointer-events: none !important;\n")),mj.value=e.value||e.placeholder||"";var s,d=void 0,u=void 0,f=mj.scrollHeight;if("border-box"===l?f+=i:"content-box"===l&&(f-=a),null!==n||null!==r){mj.value=" ";var p=mj.scrollHeight-a;null!==n&&(d=p*n,"border-box"===l&&(d=d+a+i),f=Math.max(d,f)),null!==r&&(u=p*r,"border-box"===l&&(u=u+a+i),s=f>u?"":"hidden",f=Math.min(u,f))}var h={height:f,overflowY:s,resize:"none"};return d&&(h.minHeight=d),u&&(h.maxHeight=u),h}var yj=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],xj=t.forwardRef((function(e,n){var r=e,o=r.prefixCls,i=(r.onPressEnter,r.defaultValue),l=r.value,c=r.autoSize,s=r.onResize,d=r.className,p=r.style,g=r.disabled,b=r.onChange,y=(r.onInternalAutoSize,m(r,yj)),x=u(_r(i,{value:l,postState:function(e){return null!==e&&void 0!==e?e:""}}),2),w=x[0],C=x[1],S=t.useRef();t.useImperativeHandle(n,(function(){return{textArea:S.current}}));var E=u(t.useMemo((function(){return c&&"object"===f(c)?[c.minRows,c.maxRows]:[]}),[c]),2),k=E[0],j=E[1],I=!!c,T=u(t.useState(2),2),A=T[0],O=T[1],N=u(t.useState(),2),R=N[0],P=N[1],M=function(){O(0)};fn((function(){I&&M()}),[l,k,j,I]),fn((function(){if(0===A)O(1);else if(1===A){var e=bj(S.current,!1,k,j);O(2),P(e)}else!function(){try{if(document.activeElement===S.current){var e=S.current,t=e.selectionStart,n=e.selectionEnd,r=e.scrollTop;S.current.setSelectionRange(t,n),S.current.scrollTop=r}}catch(r5){}}()}),[A]);var D=t.useRef(),L=function(){Sa.cancel(D.current)};t.useEffect((function(){return L}),[]);var _=I?R:null,z=oe(oe({},p),_);return 0!==A&&1!==A||(z.overflowY="hidden",z.overflowX="hidden"),t.createElement(as,{onResize:function(e){2===A&&(null===s||void 0===s||s(e),c&&(L(),D.current=Sa((function(){M()}))))},disabled:!(c||s)},t.createElement("textarea",a({},y,{ref:S,style:z,className:v()(o,d,h({},"".concat(o,"-disabled"),g)),disabled:g,value:w,onChange:function(e){C(e.target.value),null===b||void 0===b||b(e)}})))}));const wj=xj;var Cj=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize"],Sj=t.forwardRef((function(e,n){var r,o,i=e.defaultValue,l=e.value,c=e.onFocus,s=e.onBlur,d=e.onChange,f=e.allowClear,p=e.maxLength,g=e.onCompositionStart,b=e.onCompositionEnd,y=e.suffix,x=e.prefixCls,w=void 0===x?"rc-textarea":x,C=e.showCount,S=e.count,E=e.className,k=e.style,j=e.disabled,I=e.hidden,T=e.classNames,A=e.styles,O=e.onResize,N=m(e,Cj),R=u(_r(i,{value:l,defaultValue:i}),2),P=R[0],M=R[1],D=void 0===P||null===P?"":String(P),L=u(t.useState(!1),2),_=L[0],z=L[1],B=t.useRef(!1),F=u(t.useState(null),2),H=F[0],W=F[1],V=(0,t.useRef)(null),U=function(){var e;return null===(e=V.current)||void 0===e?void 0:e.textArea},K=function(){U().focus()};(0,t.useImperativeHandle)(n,(function(){return{resizableTextArea:V.current,focus:K,blur:function(){U().blur()}}})),(0,t.useEffect)((function(){z((function(e){return!j&&e}))}),[j]);var G=u(t.useState(null),2),q=G[0],X=G[1];t.useEffect((function(){var e;q&&(e=U()).setSelectionRange.apply(e,nt(q))}),[q]);var Y,$=Bk(S,C),J=null!==(r=$.max)&&void 0!==r?r:p,Q=Number(J)>0,Z=$.strategy(D),ee=!!J&&Z>J,te=function(e,t){var n=t;!B.current&&$.exceedFormatter&&$.max&&$.strategy(t)>$.max&&t!==(n=$.exceedFormatter(t,{max:$.max}))&&X([U().selectionStart||0,U().selectionEnd||0]),M(n),Dk(e.currentTarget,e,d,n)},ne=y;$.show&&(Y=$.showFormatter?$.showFormatter({value:D,count:Z,maxLength:J}):"".concat(Z).concat(Q?" / ".concat(J):""),ne=t.createElement(t.Fragment,null,ne,t.createElement("span",{className:v()("".concat(w,"-data-count"),null===T||void 0===T?void 0:T.count),style:null===A||void 0===A?void 0:A.count},Y)));var re=!N.autoSize&&!C&&!f;return t.createElement(_k,{value:D,allowClear:f,handleReset:function(e){M(""),K(),Dk(U(),e,d)},suffix:ne,prefixCls:w,classNames:oe(oe({},T),{},{affixWrapper:v()(null===T||void 0===T?void 0:T.affixWrapper,(o={},h(o,"".concat(w,"-show-count"),C),h(o,"".concat(w,"-textarea-allow-clear"),f),o))}),disabled:j,focused:_,className:v()(E,ee&&"".concat(w,"-out-of-range")),style:oe(oe({},k),H&&!re?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"===typeof Y?Y:void 0}},hidden:I},t.createElement(wj,a({},N,{maxLength:p,onKeyDown:function(e){var t=N.onPressEnter,n=N.onKeyDown;"Enter"===e.key&&t&&t(e),null===n||void 0===n||n(e)},onChange:function(e){te(e,e.target.value)},onFocus:function(e){z(!0),null===c||void 0===c||c(e)},onBlur:function(e){z(!1),null===s||void 0===s||s(e)},onCompositionStart:function(e){B.current=!0,null===g||void 0===g||g(e)},onCompositionEnd:function(e){B.current=!1,te(e,e.currentTarget.value),null===b||void 0===b||b(e)},className:v()(null===T||void 0===T?void 0:T.textarea),style:oe(oe({},null===A||void 0===A?void 0:A.textarea),{},{resize:null===k||void 0===k?void 0:k.resize}),disabled:j,prefixCls:w,onResize:function(e){var t;null===O||void 0===O||O(e),null!==(t=U())&&void 0!==t&&t.style.height&&W(!0)},ref:V})))}));const Ej=Sj;var kj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const jj=(0,t.forwardRef)(((e,n)=>{var r;const{prefixCls:o,bordered:a=!0,size:i,disabled:l,status:c,allowClear:s,classNames:d,rootClassName:u,className:f,variant:p}=e,h=kj(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","variant"]);const{getPrefixCls:m,direction:g}=t.useContext(at),b=Yi(i),y=t.useContext(Ki),x=null!==l&&void 0!==l?l:y,{status:w,hasFeedback:C,feedbackIcon:S}=t.useContext(Xw),E=Uk(w,c),k=t.useRef(null);t.useImperativeHandle(n,(()=>{var e;return{resizableTextArea:null===(e=k.current)||void 0===e?void 0:e.resizableTextArea,focus:e=>{var t,n;!function(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n){const t=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(t,t);break;default:e.setSelectionRange(0,t)}}}(null===(n=null===(t=k.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:()=>{var e;return null===(e=k.current)||void 0===e?void 0:e.blur()}}}));const j=m("input",o);let I;"object"===typeof s&&(null===s||void 0===s?void 0:s.clearIcon)?I=s:s&&(I={clearIcon:t.createElement(Yy,null)});const T=lh(j),[A,O,N]=Pk(j,T),[R,P]=qk(p,a);return A(t.createElement(Ej,Object.assign({},h,{disabled:x,allowClear:I,className:v()(N,T,f,u),classNames:Object.assign(Object.assign({},d),{textarea:v()({["".concat(j,"-sm")]:"small"===b,["".concat(j,"-lg")]:"large"===b},O,null===d||void 0===d?void 0:d.textarea),variant:v()({["".concat(j,"-").concat(R)]:P},Vk(j,E)),affixWrapper:v()("".concat(j,"-textarea-affix-wrapper"),{["".concat(j,"-affix-wrapper-rtl")]:"rtl"===g,["".concat(j,"-affix-wrapper-sm")]:"small"===b,["".concat(j,"-affix-wrapper-lg")]:"large"===b,["".concat(j,"-textarea-show-count")]:e.showCount||(null===(r=e.count)||void 0===r?void 0:r.show)},O)}),prefixCls:j,suffix:C&&t.createElement("span",{className:"".concat(j,"-textarea-suffix")},S),ref:k})))})),Ij=jj,Tj=Jk;Tj.Group=Mk,Tj.Search=hj,Tj.TextArea=Ij,Tj.Password=cj;const Aj=Tj,Oj=e=>{let{open:n,setOpen:r,descriprion:o,getData:a}=e;const{translate:i}=og(),[l,c]=(0,t.useState)(o);async function s(){try{await dE("/settings/description",JSON.stringify({description:l}),GC()),a(),r(!1),ak.success(i("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(i(e.message))}}return(0,t.useEffect)((()=>{const e=e=>{"Enter"===e.key&&s()};return n&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[n]),(0,ng.jsx)(UC,{style:{width:"30vw"},title:i("plantDescription"),open:n,onCancel:()=>r(!1),onOk:s,cancelText:i("cancel"),okText:i("ok"),children:(0,ng.jsx)(Aj,{style:{minWidth:"20vw"},placeholder:i("plantDescription"),value:l,onChange:e=>c(e.target.value)})})},Nj=JSON.parse('[{"value":"UTC-11","abbr":"U","offset":-11,"isdst":false,"text":"(UTC-11:00) Coordinated Universal Time-11","utc":["Pacific/Niue","Pacific/Pago_Pago"]},{"value":"Hawaiian Standard Time","abbr":"HST","offset":-10,"isdst":false,"text":"(UTC-10:00) Hawaii","utc":["Pacific/Honolulu","Pacific/Rarotonga","Pacific/Tahiti"]},{"value":"Alaskan Standard Time","abbr":"AKDT","offset":-8,"isdst":true,"text":"(UTC-09:00) Alaska","utc":["America/Anchorage","America/Juneau","America/Nome","America/Sitka","America/Yakutat"]},{"value":"Pacific Daylight Time","abbr":"PDT","offset":-7,"isdst":true,"text":"(UTC-07:00) Pacific Daylight Time (US & Canada)","utc":["America/Los_Angeles","America/Tijuana","America/Vancouver"]},{"value":"Pacific Standard Time","abbr":"PST","offset":-8,"isdst":false,"text":"(UTC-08:00) Pacific Standard Time (US & Canada)","utc":["America/Los_Angeles","America/Tijuana","America/Vancouver"]},{"value":"US Mountain Standard Time","abbr":"UMST","offset":-7,"isdst":false,"text":"(UTC-07:00) Arizona","utc":["America/Creston","America/Dawson","America/Dawson_Creek","America/Hermosillo","America/Phoenix","America/Whitehorse"]},{"value":"Mountain Standard Time (Mexico)","abbr":"MDT","offset":-6,"isdst":true,"text":"(UTC-07:00) Chihuahua, La Paz, Mazatlan","utc":["America/Chihuahua","America/Mazatlan"]},{"value":"Mountain Standard Time","abbr":"MDT","offset":-6,"isdst":true,"text":"(UTC-07:00) Mountain Time (US & Canada)","utc":["America/Boise","America/Cambridge_Bay","America/Denver","America/Edmonton","America/Inuvik","America/Ojinaga","America/Yellowknife"]},{"value":"Central America Standard Time","abbr":"CAST","offset":-6,"isdst":false,"text":"(UTC-06:00) Central America","utc":["America/Belize","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Managua","America/Tegucigalpa","Pacific/Galapagos"]},{"value":"Central Standard Time","abbr":"CDT","offset":-5,"isdst":true,"text":"(UTC-06:00) Central Time (US & Canada)","utc":["America/Chicago","America/Indiana/Knox","America/Indiana/Tell_City","America/Matamoros","America/Menominee","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Winnipeg"]},{"value":"Central Standard Time (Mexico)","abbr":"CDT","offset":-5,"isdst":true,"text":"(UTC-06:00) Guadalajara, Mexico City, Monterrey","utc":["America/Bahia_Banderas","America/Cancun","America/Merida","America/Mexico_City","America/Monterrey"]},{"value":"Canada Central Standard Time","abbr":"CCST","offset":-6,"isdst":false,"text":"(UTC-06:00) Saskatchewan","utc":["America/Regina","America/Swift_Current"]},{"value":"SA Pacific Standard Time","abbr":"SPST","offset":-5,"isdst":false,"text":"(UTC-05:00) Bogota, Lima, Quito","utc":["America/Bogota","America/Eirunepe","America/Guayaquil","America/Jamaica","America/Lima","America/Panama","America/Rio_Branco"]},{"value":"Eastern Standard Time","abbr":"EST","offset":-5,"isdst":false,"text":"(UTC-05:00) Eastern Time (US & Canada)","utc":["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto"]},{"value":"Eastern Daylight Time","abbr":"EDT","offset":-4,"isdst":true,"text":"(UTC-04:00) Eastern Daylight Time (US & Canada)","utc":["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto"]},{"value":"US Eastern Standard Time","abbr":"UEDT","offset":-5,"isdst":false,"text":"(UTC-05:00) Indiana (East)","utc":["America/Indiana/Marengo","America/Indiana/Vevay"]},{"value":"Venezuela Standard Time","abbr":"VST","offset":-4.5,"isdst":false,"text":"(UTC-04:30) Caracas","utc":["America/Caracas"]},{"value":"Paraguay Standard Time","abbr":"PYT","offset":-4,"isdst":false,"text":"(UTC-04:00) Asuncion","utc":["America/Asuncion"]},{"value":"Atlantic Standard Time","abbr":"ADT","offset":-3,"isdst":true,"text":"(UTC-04:00) Atlantic Time (Canada)","utc":["America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Moncton","America/Thule","Atlantic/Bermuda"]},{"value":"Central Brazilian Standard Time","abbr":"CBST","offset":-4,"isdst":false,"text":"(UTC-04:00) Cuiaba","utc":["America/Campo_Grande","America/Cuiaba"]},{"value":"SA Western Standard Time","abbr":"SWST","offset":-4,"isdst":false,"text":"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","utc":["America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Curacao","America/Grand_Turk","America/Guyana","America/La_Paz","America/Manaus","America/Martinique","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Santo_Domingo"]},{"value":"Pacific SA Standard Time","abbr":"PSST","offset":-4,"isdst":false,"text":"(UTC-04:00) Santiago","utc":["America/Santiago","Antarctica/Palmer"]},{"value":"Newfoundland Standard Time","abbr":"NDT","offset":-2.5,"isdst":true,"text":"(UTC-03:30) Newfoundland","utc":["America/St_Johns"]},{"value":"E. South America Standard Time","abbr":"ESAST","offset":-3,"isdst":false,"text":"(UTC-03:00) Brasilia","utc":["America/Sao_Paulo"]},{"value":"Argentina Standard Time","abbr":"AST","offset":-3,"isdst":false,"text":"(UTC-03:00) Buenos Aires","utc":["America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia"]},{"value":"SA Eastern Standard Time","abbr":"SEST","offset":-3,"isdst":false,"text":"(UTC-03:00) Cayenne, Fortaleza","utc":["America/Araguaina","America/Belem","America/Cayenne","America/Fortaleza","America/Maceio","America/Paramaribo","America/Recife","America/Santarem","Antarctica/Rothera","Atlantic/Stanley"]},{"value":"Montevideo Standard Time","abbr":"MST","offset":-3,"isdst":false,"text":"(UTC-03:00) Montevideo","utc":["America/Montevideo"]},{"value":"Bahia Standard Time","abbr":"BST","offset":-3,"isdst":false,"text":"(UTC-03:00) Salvador","utc":["America/Bahia"]},{"value":"UTC-02","abbr":"U","offset":-2,"isdst":false,"text":"(UTC-02:00) Coordinated Universal Time-02","utc":["America/Noronha","Atlantic/South_Georgia"]},{"value":"Azores Standard Time","abbr":"ADT","offset":0,"isdst":true,"text":"(UTC-01:00) Azores","utc":["America/Scoresbysund","Atlantic/Azores"]},{"value":"Cape Verde Standard Time","abbr":"CVST","offset":-1,"isdst":false,"text":"(UTC-01:00) Cape Verde Is.","utc":["Atlantic/Cape_Verde"]},{"value":"Morocco Standard Time","abbr":"MDT","offset":1,"isdst":true,"text":"(UTC) Casablanca","utc":["Africa/Casablanca","Africa/El_Aaiun"]},{"value":"UTC","abbr":"UTC","offset":0,"isdst":false,"text":"(UTC) Coordinated Universal Time","utc":["America/Danmarkshavn"]},{"value":"GMT Standard Time","abbr":"GMT","offset":0,"isdst":false,"text":"(UTC) Edinburgh, London","utc":["Europe/London"]},{"value":"British Summer Time","abbr":"BST","offset":1,"isdst":true,"text":"(UTC+01:00) Edinburgh, London","utc":["Europe/London"]},{"value":"GMT Standard Time","abbr":"GDT","offset":1,"isdst":true,"text":"(UTC) Dublin, Lisbon","utc":["Atlantic/Canary","Atlantic/Madeira","Europe/Dublin","Europe/Lisbon"]},{"value":"Greenwich Standard Time","abbr":"GST","offset":0,"isdst":false,"text":"(UTC) Monrovia, Reykjavik","utc":["Africa/Abidjan","Africa/Accra","Africa/Bissau","Africa/Monrovia","Africa/Sao_Tome","Atlantic/Reykjavik"]},{"value":"W. Europe Standard Time","abbr":"WEDT","offset":2,"isdst":true,"text":"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","utc":["Europe/Amsterdam","Europe/Andorra","Europe/Berlin","Europe/Gibraltar","Europe/Luxembourg","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Rome","Europe/Stockholm","Europe/Vienna","Europe/Zurich"]},{"value":"Central Europe Standard Time","abbr":"CEDT","offset":2,"isdst":true,"text":"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","utc":["Europe/Belgrade","Europe/Budapest","Europe/Prague","Europe/Tirane"]},{"value":"Romance Standard Time","abbr":"RDT","offset":2,"isdst":true,"text":"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","utc":["Africa/Ceuta","Europe/Brussels","Europe/Copenhagen","Europe/Madrid","Europe/Paris"]},{"value":"Central European Standard Time","abbr":"CEDT","offset":2,"isdst":true,"text":"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","utc":["Europe/Warsaw"]},{"value":"W. Central Africa Standard Time","abbr":"WCAST","offset":1,"isdst":false,"text":"(UTC+01:00) West Central Africa","utc":["Africa/Algiers","Africa/Lagos","Africa/Ndjamena","Africa/Tunis"]},{"value":"Namibia Standard Time","abbr":"NST","offset":1,"isdst":false,"text":"(UTC+01:00) Windhoek","utc":["Africa/Windhoek"]},{"value":"GTB Standard Time","abbr":"GDT","offset":3,"isdst":true,"text":"(UTC+02:00) Athens, Bucharest","utc":["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau"]},{"value":"Middle East Standard Time","abbr":"MEDT","offset":3,"isdst":true,"text":"(UTC+02:00) Beirut","utc":["Asia/Beirut"]},{"value":"Egypt Standard Time","abbr":"EST","offset":2,"isdst":false,"text":"(UTC+02:00) Cairo","utc":["Africa/Cairo"]},{"value":"Syria Standard Time","abbr":"SDT","offset":3,"isdst":true,"text":"(UTC+02:00) Damascus","utc":["Asia/Damascus"]},{"value":"E. Europe Standard Time","abbr":"EEDT","offset":3,"isdst":true,"text":"(UTC+02:00) E. Europe","utc":["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{"value":"South Africa Standard Time","abbr":"SAST","offset":2,"isdst":false,"text":"(UTC+02:00) Harare, Pretoria","utc":["Africa/Johannesburg","Africa/Maputo"]},{"value":"FLE Standard Time","abbr":"FDT","offset":3,"isdst":true,"text":"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","utc":["Europe/Helsinki","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{"value":"Turkey Standard Time","abbr":"TDT","offset":3,"isdst":false,"text":"(UTC+03:00) Istanbul","utc":["Europe/Istanbul"]},{"value":"Israel Standard Time","abbr":"JDT","offset":3,"isdst":true,"text":"(UTC+02:00) Jerusalem","utc":["Asia/Jerusalem"]},{"value":"Libya Standard Time","abbr":"LST","offset":2,"isdst":false,"text":"(UTC+02:00) Tripoli","utc":["Africa/Tripoli"]},{"value":"Jordan Standard Time","abbr":"JST","offset":3,"isdst":false,"text":"(UTC+03:00) Amman","utc":["Asia/Amman"]},{"value":"Arabic Standard Time","abbr":"AST","offset":3,"isdst":false,"text":"(UTC+03:00) Baghdad","utc":["Asia/Baghdad"]},{"value":"Kaliningrad Standard Time","abbr":"KST","offset":3,"isdst":false,"text":"(UTC+02:00) Kaliningrad","utc":["Europe/Kaliningrad"]},{"value":"Arab Standard Time","abbr":"AST","offset":3,"isdst":false,"text":"(UTC+03:00) Kuwait, Riyadh","utc":["Asia/Qatar","Asia/Riyadh"]},{"value":"E. Africa Standard Time","abbr":"EAST","offset":3,"isdst":false,"text":"(UTC+03:00) Nairobi","utc":["Africa/Juba","Africa/Khartoum","Africa/Nairobi","Antarctica/Syowa"]},{"value":"Moscow Standard Time","abbr":"MSK","offset":3,"isdst":false,"text":"(UTC+03:00) Moscow, St. Petersburg, Volgograd, Minsk","utc":["Europe/Kirov","Europe/Moscow","Europe/Simferopol","Europe/Volgograd","Europe/Minsk"]},{"value":"Samara Time","abbr":"SAMT","offset":4,"isdst":false,"text":"(UTC+04:00) Samara, Ulyanovsk, Saratov","utc":["Europe/Astrakhan","Europe/Samara","Europe/Ulyanovsk"]},{"value":"Iran Standard Time","abbr":"IDT","offset":4.5,"isdst":true,"text":"(UTC+03:30) Tehran","utc":["Asia/Tehran"]},{"value":"Arabian Standard Time","abbr":"AST","offset":4,"isdst":false,"text":"(UTC+04:00) Abu Dhabi, Muscat","utc":["Asia/Dubai"]},{"value":"Azerbaijan Standard Time","abbr":"ADT","offset":5,"isdst":true,"text":"(UTC+04:00) Baku","utc":["Asia/Baku"]},{"value":"Mauritius Standard Time","abbr":"MST","offset":4,"isdst":false,"text":"(UTC+04:00) Port Louis","utc":["Indian/Mahe","Indian/Mauritius","Indian/Reunion"]},{"value":"Georgian Standard Time","abbr":"GET","offset":4,"isdst":false,"text":"(UTC+04:00) Tbilisi","utc":["Asia/Tbilisi"]},{"value":"Caucasus Standard Time","abbr":"CST","offset":4,"isdst":false,"text":"(UTC+04:00) Yerevan","utc":["Asia/Yerevan"]},{"value":"Afghanistan Standard Time","abbr":"AST","offset":4.5,"isdst":false,"text":"(UTC+04:30) Kabul","utc":["Asia/Kabul"]},{"value":"West Asia Standard Time","abbr":"WAST","offset":5,"isdst":false,"text":"(UTC+05:00) Ashgabat, Tashkent","utc":["Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Dushanbe","Asia/Oral","Asia/Samarkand","Asia/Tashkent","Indian/Kerguelen","Indian/Maldives"]},{"value":"Yekaterinburg Time","abbr":"YEKT","offset":5,"isdst":false,"text":"(UTC+05:00) Yekaterinburg","utc":["Asia/Yekaterinburg"]},{"value":"Pakistan Standard Time","abbr":"PKT","offset":5,"isdst":false,"text":"(UTC+05:00) Islamabad, Karachi","utc":["Asia/Karachi"]},{"value":"India Standard Time","abbr":"IST","offset":5.5,"isdst":false,"text":"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","utc":["Asia/Kolkata"]},{"value":"Sri Lanka Standard Time","abbr":"SLST","offset":5.5,"isdst":false,"text":"(UTC+05:30) Sri Jayawardenepura","utc":["Asia/Colombo"]},{"value":"Nepal Standard Time","abbr":"NST","offset":5.75,"isdst":false,"text":"(UTC+05:45) Kathmandu","utc":["Asia/Kathmandu"]},{"value":"Central Asia Standard Time","abbr":"CAST","offset":6,"isdst":false,"text":"(UTC+06:00) Nur-Sultan (Astana)","utc":["Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Qyzylorda","Asia/Urumqi","Indian/Chagos"]},{"value":"Bangladesh Standard Time","abbr":"BST","offset":6,"isdst":false,"text":"(UTC+06:00) Dhaka","utc":["Asia/Dhaka","Asia/Thimphu"]},{"value":"Myanmar Standard Time","abbr":"MST","offset":6.5,"isdst":false,"text":"(UTC+06:30) Yangon (Rangoon)","utc":["Indian/Cocos"]},{"value":"SE Asia Standard Time","abbr":"SAST","offset":7,"isdst":false,"text":"(UTC+07:00) Bangkok, Hanoi, Jakarta","utc":["Antarctica/Davis","Asia/Bangkok","Asia/Hovd","Asia/Jakarta","Asia/Pontianak","Indian/Christmas"]},{"value":"N. Central Asia Standard Time","abbr":"NCAST","offset":7,"isdst":false,"text":"(UTC+07:00) Novosibirsk","utc":["Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk"]},{"value":"China Standard Time","abbr":"CST","offset":8,"isdst":false,"text":"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi","utc":["Asia/Hong_Kong","Asia/Macau","Asia/Shanghai"]},{"value":"North Asia Standard Time","abbr":"NAST","offset":8,"isdst":false,"text":"(UTC+08:00) Krasnoyarsk","utc":["Asia/Krasnoyarsk"]},{"value":"Singapore Standard Time","abbr":"MPST","offset":8,"isdst":false,"text":"(UTC+08:00) Kuala Lumpur, Singapore","utc":["Asia/Brunei","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Makassar","Asia/Manila","Asia/Singapore"]},{"value":"W. Australia Standard Time","abbr":"WAST","offset":8,"isdst":false,"text":"(UTC+08:00) Perth","utc":["Antarctica/Casey","Australia/Perth"]},{"value":"Taipei Standard Time","abbr":"TST","offset":8,"isdst":false,"text":"(UTC+08:00) Taipei","utc":["Asia/Taipei"]},{"value":"Ulaanbaatar Standard Time","abbr":"UST","offset":8,"isdst":false,"text":"(UTC+08:00) Ulaanbaatar","utc":["Asia/Choibalsan","Asia/Ulaanbaatar"]},{"value":"North Asia East Standard Time","abbr":"NAEST","offset":8,"isdst":false,"text":"(UTC+08:00) Irkutsk","utc":["Asia/Irkutsk"]},{"value":"Japan Standard Time","abbr":"JST","offset":9,"isdst":false,"text":"(UTC+09:00) Osaka, Sapporo, Tokyo","utc":["Asia/Dili","Asia/Jayapura","Asia/Tokyo","Pacific/Palau"]},{"value":"Korea Standard Time","abbr":"KST","offset":9,"isdst":false,"text":"(UTC+09:00) Seoul","utc":["Asia/Pyongyang","Asia/Seoul"]},{"value":"Cen. Australia Standard Time","abbr":"CAST","offset":9.5,"isdst":false,"text":"(UTC+09:30) Adelaide","utc":["Australia/Adelaide","Australia/Broken_Hill"]},{"value":"AUS Central Standard Time","abbr":"ACST","offset":9.5,"isdst":false,"text":"(UTC+09:30) Darwin","utc":["Australia/Darwin"]},{"value":"E. Australia Standard Time","abbr":"EAST","offset":10,"isdst":false,"text":"(UTC+10:00) Brisbane","utc":["Australia/Brisbane","Australia/Lindeman"]},{"value":"AUS Eastern Standard Time","abbr":"AEST","offset":10,"isdst":false,"text":"(UTC+10:00) Canberra, Melbourne, Sydney","utc":["Australia/Melbourne","Australia/Sydney"]},{"value":"West Pacific Standard Time","abbr":"WPST","offset":10,"isdst":false,"text":"(UTC+10:00) Guam, Port Moresby","utc":["Antarctica/DumontDUrville","Pacific/Guam","Pacific/Port_Moresby"]},{"value":"Tasmania Standard Time","abbr":"TST","offset":10,"isdst":false,"text":"(UTC+10:00) Hobart","utc":["Australia/Hobart"]},{"value":"Yakutsk Standard Time","abbr":"YST","offset":9,"isdst":false,"text":"(UTC+09:00) Yakutsk","utc":["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{"value":"Central Pacific Standard Time","abbr":"CPST","offset":11,"isdst":false,"text":"(UTC+11:00) Solomon Is., New Caledonia","utc":["Antarctica/Macquarie","Pacific/Efate","Pacific/Guadalcanal","Pacific/Kosrae","Pacific/Noumea"]},{"value":"Vladivostok Standard Time","abbr":"VST","offset":11,"isdst":false,"text":"(UTC+11:00) Vladivostok","utc":["Asia/Sakhalin","Asia/Ust-Nera","Asia/Vladivostok"]},{"value":"New Zealand Standard Time","abbr":"NZST","offset":12,"isdst":false,"text":"(UTC+12:00) Auckland, Wellington","utc":["Pacific/Auckland"]},{"value":"UTC+12","abbr":"U","offset":12,"isdst":false,"text":"(UTC+12:00) Coordinated Universal Time+12","utc":["Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis"]},{"value":"Fiji Standard Time","abbr":"FST","offset":12,"isdst":false,"text":"(UTC+12:00) Fiji","utc":["Pacific/Fiji"]},{"value":"Magadan Standard Time","abbr":"MST","offset":12,"isdst":false,"text":"(UTC+12:00) Magadan","utc":["Asia/Anadyr","Asia/Kamchatka","Asia/Magadan","Asia/Srednekolymsk"]},{"value":"Kamchatka Standard Time","abbr":"KDT","offset":13,"isdst":true,"text":"(UTC+12:00) Petropavlovsk-Kamchatsky - Old","utc":["Asia/Kamchatka"]},{"value":"Tonga Standard Time","abbr":"TST","offset":13,"isdst":false,"text":"(UTC+13:00) Nuku\'alofa","utc":["Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu"]},{"value":"Samoa Standard Time","abbr":"SST","offset":13,"isdst":false,"text":"(UTC+13:00) Samoa","utc":["Pacific/Apia"]}]');var Rj=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],Pj=t.forwardRef((function(e,n){var r=e.className,o=e.component,i=e.viewBox,l=e.spin,c=e.rotate,s=e.tabIndex,d=e.onClick,u=e.children,f=m(e,Rj),p=t.useRef(),g=Fr(p,n);Te(Boolean(o||u),"Should have `component` prop or `children`."),De(p);var b=t.useContext(ne),y=b.prefixCls,x=void 0===y?"anticon":y,w=b.rootClassName,C=v()(w,x,h({},"".concat(x,"-spin"),!!l&&!!o),r),S=v()(h({},"".concat(x,"-spin"),!!l)),E=c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0,k=oe(oe({},Me),{},{className:S,style:E,viewBox:i});i||delete k.viewBox;var j=s;return void 0===j&&d&&(j=-1),t.createElement("span",a({role:"img"},f,{ref:g,tabIndex:j,onClick:d,className:C}),o?t.createElement(o,k,u):u?(Te(Boolean(i)||1===t.Children.count(u)&&t.isValidElement(u)&&"use"===t.Children.only(u).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),t.createElement("svg",a({},k,{viewBox:i}),u)):null)}));Pj.displayName="AntdIcon";const Mj=Pj,Dj=e=>(0,ng.jsxs)("svg",{...e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,ng.jsx)("rect",{x:"1",y:"1",width:"22",height:"22",rx:"3.5"}),(0,ng.jsx)("line",{x1:"6",y1:"8",x2:"6",y2:"22"}),(0,ng.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"22"}),(0,ng.jsx)("line",{x1:"18",y1:"8",x2:"18",y2:"22"})]}),Lj=e=>{let{size:t,color:n,className:r,style:o,onClick:a}=e;return(0,ng.jsx)(Mj,{component:Dj,className:r,onClick:a,style:{fontSize:t,color:n,...o}})},_j=n(330),zj=()=>{var e,n;const{translate:r}=og(),[o,a]=(0,t.useState)({lang:"it",tz:"GMT+1"}),[i,l]=(0,t.useState)(!1),[c,s]=(0,t.useState)({descr:"",model:"",orderCode:"",fwVer:"",fwAgentVer:"",sn:"",hour:"",date:"",localDhcp:!1,localIp:"",localMask:"",localGateway:"",macAddr:"",loaded:!1,hwRev:""}),[d,u]=(0,t.useState)([{id:"eth0",name:"ETH-1",mac:"E0:00:01:02:03:04",ip:"192.168.123.50",mask:"string",gateway:"string",dns:["",""],status:"up",wanstatus:"up",latency:30}]),[f,p]=(0,t.useState)([]),[h,m]=(0,t.useState)([]),[g,v]=mE(((e,t)=>cE(e,t)),[]),[b,y]=mE(((e,t)=>cE(e,t)),[]),[x,w]=mE(((e,t)=>cE(e,t)),[]),[C,S]=mE(((e,t)=>cE(e,t)),[]),[E,k]=mE(((e,t)=>cE(e,t)),[]);function j(){v(vS,GC()),y(pS,GC()),w(hS,GC()),S(CS,GC()),k(jS,GC())}(0,t.useEffect)((()=>{if(x.value&&a({lang:x.value.language,tz:x.value.timezone}),b.value&&x.value){let e=new Date(b.value.now);s({descr:b.value.description,model:b.value.model,orderCode:b.value.orderCode,fwVer:b.value.fw,fwAgentVer:b.value.fwAgent,sn:b.value.sn,date:e.toLocaleDateString(x.value.language),hour:e.toLocaleTimeString(x.value.language),localDhcp:b.value.dhcp,localIp:b.value.ip,localMask:b.value.mask,localGateway:b.value.gateway,macAddr:b.value.macaddr,loaded:!0,hwRev:b.value.hwRev})}}),[b,x]),(0,t.useEffect)((()=>{g.value&&u(g.value)}),[g]),(0,t.useEffect)((()=>{C.value&&p(C.value)}),[C]),(0,t.useEffect)((()=>{E.value&&m(E.value)}),[E]),(0,t.useEffect)((()=>{j()}),[]);return(0,ng.jsxs)("div",{className:"home__card__container",children:[(0,ng.jsx)(Qv,{className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:c.model})}),i&&(0,ng.jsx)(Oj,{open:i,setOpen:l,getData:j,descriprion:c.descr}),(0,ng.jsx)("div",{className:"home__card",children:(0,ng.jsxs)("div",{className:"home__card-body",children:[(0,ng.jsx)("div",{className:c.descr.trim().length?"home__card-title":"home__card-title_empty",children:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)("span",{children:c.descr.trim().length?aS(c.descr,40):r("plantDescription")}),(0,ng.jsx)(ac,{icon:(0,ng.jsx)(bE,{}),onClick:()=>l(!0)})]})}),(0,ng.jsx)("div",{className:"home__card-text",children:(0,ng.jsx)("table",{width:"100%",children:(0,ng.jsx)("tbody",{children:(0,ng.jsxs)("tr",{children:[(0,ng.jsx)("td",{style:{padding:"20px 20px"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,ng.jsx)("span",{children:r("date")}),(0,ng.jsx)("span",{children:r("time")}),(0,ng.jsx)("span",{children:r("timeZone")}),(0,ng.jsx)("span",{children:r("language")})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",color:"gray"},children:[(0,ng.jsx)("span",{children:c.date}),(0,ng.jsx)("span",{children:c.hour}),(0,ng.jsx)("span",{children:"".concat(null===(e=Nj.find((e=>e.utc.includes(o.tz))))||void 0===e?void 0:e.text)}),(0,ng.jsxs)("span",{children:[null===(n=[{value:"it-IT",label:"Italiano"},{value:"en-UK",label:"English (UK)"},{value:"en-US",label:"English (US)"},{value:"de-DE",label:"Deutsch"}].find((e=>e.value===o.lang)))||void 0===n?void 0:n.label.toUpperCase(),(0,ng.jsx)("small",{children:" ("+o.lang+")"})]})]})})]})})})})]})}),(0,ng.jsx)("div",{className:"home__card",children:(0,ng.jsxs)("div",{className:"home__card-body",children:[(0,ng.jsx)("div",{className:"home__card-title",children:(0,ng.jsx)("span",{children:r("deviceInfo")})}),(0,ng.jsx)("div",{className:"home__card-text",children:(0,ng.jsx)("table",{width:"100%",children:(0,ng.jsx)("tbody",{children:(0,ng.jsxs)("tr",{children:[(0,ng.jsx)("td",{style:{padding:"20px 20px"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,ng.jsx)("span",{children:r("model")}),(0,ng.jsx)("span",{children:"Order code"}),(0,ng.jsx)("span",{children:r("firmware")}),(0,ng.jsx)("span",{children:r("firmwareAgent")}),(0,ng.jsx)("span",{children:r("appVersion")}),(0,ng.jsx)("span",{children:r("serialNumber")}),(0,ng.jsx)("span",{children:r("hwVersion")})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",color:"gray"},children:[(0,ng.jsx)("span",{children:c.model}),(0,ng.jsx)("span",{children:c.orderCode}),(0,ng.jsx)("span",{children:c.fwVer}),(0,ng.jsx)("span",{children:c.fwAgentVer}),(0,ng.jsx)("span",{children:_j.version}),(0,ng.jsx)("span",{children:c.sn}),(0,ng.jsx)("span",{children:c.hwRev})]})})]})})})})]})}),(0,ng.jsx)("div",{className:"home__card",children:(0,ng.jsxs)("div",{className:"home__card-body",children:[(0,ng.jsx)("div",{className:"home__card-title",children:(0,ng.jsx)("span",{children:r("localNetwork")})}),(0,ng.jsx)("div",{className:"home__card-text",children:(0,ng.jsx)("table",{width:"100%",children:(0,ng.jsx)("tbody",{children:d.map(((e,t)=>e.id.includes("eth")?(0,ng.jsxs)("tr",{children:[(0,ng.jsx)("td",{style:{textAlign:"center",padding:"20px 0px"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,ng.jsx)(wE,{style:{fontSize:"20px"}}),(0,ng.jsx)("span",{style:{fontSize:"10px"},children:e.name})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,ng.jsx)("span",{children:r("ipAddress")}),(0,ng.jsx)("span",{children:r("macAddress")})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",color:"gray"},children:[(0,ng.jsx)("span",{children:e.ip}),(0,ng.jsx)("span",{children:e.mac})]})})]},t):null))})})})]})}),(0,ng.jsx)("div",{className:"home__card",children:(0,ng.jsxs)("div",{className:"home__card-body",children:[(0,ng.jsx)("div",{className:"home__card-title",children:(0,ng.jsx)("span",{children:r("serialPort")})}),(0,ng.jsx)("div",{className:"home__card-text",children:(0,ng.jsx)("table",{width:"100%",children:(0,ng.jsx)("tbody",{children:f.filter((e=>"undefined"!==e.service)).map((e=>{var t;return(0,ng.jsxs)("tr",{children:[(0,ng.jsx)("td",{style:{textAlign:"center",padding:"20px 0px",width:"4.5vw"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,ng.jsx)(Lj,{style:{fontSize:"20px"}}),(0,ng.jsx)("span",{style:{fontSize:"10px"},children:ZC(e.id)})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,ng.jsx)("span",{children:r("service")}),(0,ng.jsx)("span",{children:"IP Port"})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",color:"gray"},children:[(0,ng.jsx)("span",{children:r(e.service)}),(0,ng.jsx)("span",{children:null===(t=h.find((t=>t.id.includes(e.id)&&t.id.includes(e.service))))||void 0===t?void 0:t.from.ipport})]})})]},e.id)}))})})})]})})]})},Bj=(0,t.memo)(zj),Fj=t.createContext(null),Hj=Fj.Provider,Wj=Fj,Vj=t.createContext(null),Uj=Vj.Provider;var Kj=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Gj=(0,t.forwardRef)((function(e,n){var r,o=e.prefixCls,i=void 0===o?"rc-checkbox":o,l=e.className,c=e.style,s=e.checked,d=e.disabled,f=e.defaultChecked,p=void 0!==f&&f,g=e.type,b=void 0===g?"checkbox":g,y=e.title,x=e.onChange,w=m(e,Kj),C=(0,t.useRef)(null),S=u(_r(p,{value:s}),2),E=S[0],k=S[1];(0,t.useImperativeHandle)(n,(function(){return{focus:function(){var e;null===(e=C.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=C.current)||void 0===e||e.blur()},input:C.current}}));var j=v()(i,l,(h(r={},"".concat(i,"-checked"),E),h(r,"".concat(i,"-disabled"),d),r));return t.createElement("span",{className:j,title:y,style:c},t.createElement("input",a({},w,{className:"".concat(i,"-input"),ref:C,onChange:function(t){d||("checked"in e||k(t.target.checked),null===x||void 0===x||x({target:oe(oe({},e),{},{type:b,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:d,checked:!!E,type:b})),t.createElement("span",{className:"".concat(i,"-inner")}))}));const qj=Gj,Xj=e=>{const{componentCls:t,antCls:n}=e,r="".concat(t,"-group");return{[r]:Object.assign(Object.assign({},$r(e)),{display:"inline-block",fontSize:0,["&".concat(r,"-rtl")]:{direction:"rtl"},["".concat(n,"-badge ").concat(n,"-badge-count")]:{zIndex:1},["> ".concat(n,"-badge:not(:first-child) > ").concat(n,"-button-wrapper")]:{borderInlineStart:"none"}})}},Yj=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:a,motionDurationMid:i,motionEaseInOutCirc:l,colorBgContainer:c,colorBorder:s,lineWidth:d,colorBgContainerDisabled:u,colorTextDisabled:f,paddingXS:p,dotColorDisabled:h,lineType:m,radioColor:g,radioBgColor:v,calc:b}=e,y="".concat(t,"-inner"),x=b(o).sub(b(4).mul(2)),w=b(1).mul(o).equal();return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},$r(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",["&".concat(t,"-wrapper-rtl")]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},["".concat(t,"-checked::after")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:"".concat(rn(d)," ").concat(m," ").concat(r),borderRadius:"50%",visibility:"hidden",content:'""'},[t]:Object.assign(Object.assign({},$r(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),["".concat(t,"-wrapper:hover &,\n        &:hover ").concat(y)]:{borderColor:r},["".concat(t,"-input:focus-visible + ").concat(y)]:Object.assign({},Zr(e)),["".concat(t,":hover::after, ").concat(t,"-wrapper:hover &::after")]:{visibility:"visible"},["".concat(t,"-inner")]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:w,height:w,marginBlockStart:b(1).mul(o).div(-2).equal(),marginInlineStart:b(1).mul(o).div(-2).equal(),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:w,transform:"scale(0)",opacity:0,transition:"all ".concat(a," ").concat(l),content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:w,height:w,backgroundColor:c,borderColor:s,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:"all ".concat(i)},["".concat(t,"-input")]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},["".concat(t,"-checked")]:{[y]:{borderColor:r,backgroundColor:v,"&::after":{transform:"scale(".concat(e.calc(e.dotSize).div(o).equal(),")"),opacity:1,transition:"all ".concat(a," ").concat(l)}}},["".concat(t,"-disabled")]:{cursor:"not-allowed",[y]:{backgroundColor:u,borderColor:s,cursor:"not-allowed","&::after":{backgroundColor:h}},["".concat(t,"-input")]:{cursor:"not-allowed"},["".concat(t,"-disabled + span")]:{color:f,cursor:"not-allowed"},["&".concat(t,"-checked")]:{[y]:{"&::after":{transform:"scale(".concat(b(x).div(o).equal({unit:!1}),")")}}}},["span".concat(t," + *")]:{paddingInlineStart:p,paddingInlineEnd:p}})}},$j=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:a,colorBorder:i,motionDurationSlow:l,motionDurationMid:c,buttonPaddingInline:s,fontSize:d,buttonBg:u,fontSizeLG:f,controlHeightLG:p,controlHeightSM:h,paddingXS:m,borderRadius:g,borderRadiusSM:v,borderRadiusLG:b,buttonCheckedBg:y,buttonSolidCheckedColor:x,colorTextDisabled:w,colorBgContainerDisabled:C,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:E,colorPrimary:k,colorPrimaryHover:j,colorPrimaryActive:I,buttonSolidCheckedBg:T,buttonSolidCheckedHoverBg:A,buttonSolidCheckedActiveBg:O,calc:N}=e;return{["".concat(r,"-button-wrapper")]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:s,paddingBlock:0,color:t,fontSize:d,lineHeight:rn(N(n).sub(N(o).mul(2)).equal()),background:u,border:"".concat(rn(o)," ").concat(a," ").concat(i),borderBlockStartWidth:N(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:["color ".concat(c),"background ".concat(c),"box-shadow ".concat(c)].join(","),a:{color:t},["> ".concat(r,"-button")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:N(o).mul(-1).equal(),insetInlineStart:N(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:i,transition:"background-color ".concat(l),content:'""'}},"&:first-child":{borderInlineStart:"".concat(rn(o)," ").concat(a," ").concat(i),borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},["".concat(r,"-group-large &")]:{height:p,fontSize:f,lineHeight:rn(N(p).sub(N(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},["".concat(r,"-group-small &")]:{height:h,paddingInline:N(m).sub(o).equal(),paddingBlock:0,lineHeight:rn(N(h).sub(N(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:"relative",color:k},"&:has(:focus-visible)":Object.assign({},Zr(e)),["".concat(r,"-inner, input[type='checkbox'], input[type='radio']")]:{width:0,height:0,opacity:0,pointerEvents:"none"},["&-checked:not(".concat(r,"-button-wrapper-disabled)")]:{zIndex:1,color:k,background:y,borderColor:k,"&::before":{backgroundColor:k},"&:first-child":{borderColor:k},"&:hover":{color:j,borderColor:j,"&::before":{backgroundColor:j}},"&:active":{color:I,borderColor:I,"&::before":{backgroundColor:I}}},["".concat(r,"-group-solid &-checked:not(").concat(r,"-button-wrapper-disabled)")]:{color:x,background:T,borderColor:T,"&:hover":{color:x,background:A,borderColor:A},"&:active":{color:x,background:O,borderColor:O}},"&-disabled":{color:w,backgroundColor:C,borderColor:i,cursor:"not-allowed","&:first-child, &:hover":{color:w,backgroundColor:C,borderColor:i}},["&-disabled".concat(r,"-button-wrapper-checked")]:{color:E,backgroundColor:S,borderColor:i,boxShadow:"none"}}}},Jj=$o("Radio",(e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r="0 0 0 ".concat(rn(n)," ").concat(t),o=Ho(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[Xj(o),Yj(o),$j(o)]}),(e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:a,colorText:i,colorBgContainer:l,colorTextDisabled:c,controlItemBgActiveDisabled:s,colorTextLightSolid:d,colorPrimary:u,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:h}=e;return{radioSize:a,dotSize:t?a-8:a-2*(4+o),dotColorDisabled:c,buttonSolidCheckedColor:d,buttonSolidCheckedBg:u,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:l,buttonCheckedBg:l,buttonColor:i,buttonCheckedBgDisabled:s,buttonCheckedColorDisabled:c,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?u:h,radioBgColor:t?l:u}}),{unitless:{radioSize:!0,dotSize:!0}});var Qj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Zj=(e,n)=>{var r,o;const a=t.useContext(Wj),i=t.useContext(Vj),{getPrefixCls:l,direction:c,radio:s}=t.useContext(at),d=Br(n,t.useRef(null)),{isFormItemInput:u}=t.useContext(Xw);const f=t=>{var n,r;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(r=null===a||void 0===a?void 0:a.onChange)||void 0===r||r.call(a,t)},{prefixCls:p,className:h,rootClassName:m,children:g,style:b,title:y}=e,x=Qj(e,["prefixCls","className","rootClassName","children","style","title"]),w=l("radio",p),C="button"===((null===a||void 0===a?void 0:a.optionType)||i),S=C?"".concat(w,"-button"):w,E=lh(w),[k,j,I]=Jj(w,E),T=Object.assign({},x),A=t.useContext(Ki);a&&(T.name=a.name,T.onChange=f,T.checked=e.value===a.value,T.disabled=null!==(r=T.disabled)&&void 0!==r?r:a.disabled),T.disabled=null!==(o=T.disabled)&&void 0!==o?o:A;const O=v()("".concat(S,"-wrapper"),{["".concat(S,"-wrapper-checked")]:T.checked,["".concat(S,"-wrapper-disabled")]:T.disabled,["".concat(S,"-wrapper-rtl")]:"rtl"===c,["".concat(S,"-wrapper-in-form-item")]:u},null===s||void 0===s?void 0:s.className,h,m,j,I,E);return k(t.createElement(Wi,{component:"Radio",disabled:T.disabled},t.createElement("label",{className:O,style:Object.assign(Object.assign({},null===s||void 0===s?void 0:s.style),b),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y},t.createElement(qj,Object.assign({},T,{className:v()(T.className,!C&&zi),type:"radio",prefixCls:S,ref:d})),void 0!==g?t.createElement("span",null,g):null)))};const eI=t.forwardRef(Zj),tI=t.forwardRef(((e,n)=>{const{getPrefixCls:r,direction:o}=t.useContext(at),[a,i]=_r(e.defaultValue,{value:e.value}),{prefixCls:l,className:c,rootClassName:s,options:d,buttonStyle:u="outline",disabled:f,children:p,size:h,style:m,id:g,onMouseEnter:b,onMouseLeave:y,onFocus:x,onBlur:w}=e,C=r("radio",l),S="".concat(C,"-group"),E=lh(C),[k,j,I]=Jj(C,E);let T=p;d&&d.length>0&&(T=d.map((e=>"string"===typeof e||"number"===typeof e?t.createElement(eI,{key:e.toString(),prefixCls:C,disabled:f,value:e,checked:a===e},e):t.createElement(eI,{key:"radio-group-value-options-".concat(e.value),prefixCls:C,disabled:e.disabled||f,value:e.value,checked:a===e.value,title:e.title,style:e.style,id:e.id,required:e.required},e.label))));const A=Yi(h),O=v()(S,"".concat(S,"-").concat(u),{["".concat(S,"-").concat(A)]:A,["".concat(S,"-rtl")]:"rtl"===o},c,s,j,I,E);return k(t.createElement("div",Object.assign({},hx(e,{aria:!0,data:!0}),{className:O,style:m,onMouseEnter:b,onMouseLeave:y,onFocus:x,onBlur:w,id:g,ref:n}),t.createElement(Hj,{value:{onChange:t=>{const n=a,r=t.target.value;"value"in e||i(r);const{onChange:o}=e;o&&r!==n&&o(t)},value:a,disabled:e.disabled,name:e.name,optionType:e.optionType}},T)))})),nI=t.memo(tI);var rI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const oI=(e,n)=>{const{getPrefixCls:r}=t.useContext(at),{prefixCls:o}=e,a=rI(e,["prefixCls"]),i=r("radio",o);return t.createElement(Uj,{value:"button"},t.createElement(eI,Object.assign({prefixCls:i},a,{type:"radio",ref:n})))},aI=t.forwardRef(oI),iI=eI;iI.Button=aI,iI.Group=nI,iI.__ANT_RADIO=!0;const lI=iI;var cI=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],sI=t.forwardRef((function(e,n){var r,o=e.prefixCls,i=void 0===o?"rc-switch":o,l=e.className,c=e.checked,s=e.defaultChecked,d=e.disabled,f=e.loadingIcon,p=e.checkedChildren,g=e.unCheckedChildren,b=e.onClick,y=e.onChange,x=e.onKeyDown,w=m(e,cI),C=u(_r(!1,{value:c,defaultValue:s}),2),S=C[0],E=C[1];function k(e,t){var n=S;return d||(E(n=e),null===y||void 0===y||y(n,t)),n}var j=v()(i,l,(h(r={},"".concat(i,"-checked"),S),h(r,"".concat(i,"-disabled"),d),r));return t.createElement("button",a({},w,{type:"button",role:"switch","aria-checked":S,disabled:d,className:j,ref:n,onKeyDown:function(e){e.which===Vd.LEFT?k(!1,e):e.which===Vd.RIGHT&&k(!0,e),null===x||void 0===x||x(e)},onClick:function(e){var t=k(!S,e);null===b||void 0===b||b(t,e)}}),f,t.createElement("span",{className:"".concat(i,"-inner")},t.createElement("span",{className:"".concat(i,"-inner-checked")},p),t.createElement("span",{className:"".concat(i,"-inner-unchecked")},g)))}));sI.displayName="Switch";const dI=sI,uI=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:o,innerMinMarginSM:a,innerMaxMarginSM:i,handleSizeSM:l,calc:c}=e,s="".concat(t,"-inner"),d=rn(c(l).add(c(r).mul(2)).equal()),u=rn(c(i).mul(2).equal());return{[t]:{["&".concat(t,"-small")]:{minWidth:o,height:n,lineHeight:rn(n),["".concat(t,"-inner")]:{paddingInlineStart:i,paddingInlineEnd:a,["".concat(s,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(d," - ").concat(u,")"),marginInlineEnd:"calc(100% - ".concat(d," + ").concat(u,")")},["".concat(s,"-unchecked")]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["".concat(t,"-handle")]:{width:l,height:l},["".concat(t,"-loading-icon")]:{top:c(c(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},["&".concat(t,"-checked")]:{["".concat(t,"-inner")]:{paddingInlineStart:a,paddingInlineEnd:i,["".concat(s,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(s,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(d," + ").concat(u,")"),marginInlineEnd:"calc(-100% + ".concat(d," - ").concat(u,")")}},["".concat(t,"-handle")]:{insetInlineStart:"calc(100% - ".concat(rn(c(l).add(r).equal()),")")}},["&:not(".concat(t,"-disabled):active")]:{["&:not(".concat(t,"-checked) ").concat(s)]:{["".concat(s,"-unchecked")]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},["&".concat(t,"-checked ").concat(s)]:{["".concat(s,"-checked")]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},fI=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{["".concat(t,"-loading-icon").concat(e.iconCls)]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},["&".concat(t,"-checked ").concat(t,"-loading-icon")]:{color:e.switchColor}}}},pI=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:o,handleSize:a,calc:i}=e,l="".concat(t,"-handle");return{[t]:{[l]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:"all ".concat(e.switchDuration," ease-in-out"),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:i(a).div(2).equal(),boxShadow:o,transition:"all ".concat(e.switchDuration," ease-in-out"),content:'""'}},["&".concat(t,"-checked ").concat(l)]:{insetInlineStart:"calc(100% - ".concat(rn(i(a).add(n).equal()),")")},["&:not(".concat(t,"-disabled):active")]:{["".concat(l,"::before")]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},["&".concat(t,"-checked ").concat(l,"::before")]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},hI=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:o,innerMaxMargin:a,handleSize:i,calc:l}=e,c="".concat(t,"-inner"),s=rn(l(i).add(l(r).mul(2)).equal()),d=rn(l(a).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:o,transition:"padding-inline-start ".concat(e.switchDuration," ease-in-out, padding-inline-end ").concat(e.switchDuration," ease-in-out"),["".concat(c,"-checked, ").concat(c,"-unchecked")]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:"margin-inline-start ".concat(e.switchDuration," ease-in-out, margin-inline-end ").concat(e.switchDuration," ease-in-out"),pointerEvents:"none"},["".concat(c,"-checked")]:{marginInlineStart:"calc(-100% + ".concat(s," - ").concat(d,")"),marginInlineEnd:"calc(100% - ".concat(s," + ").concat(d,")")},["".concat(c,"-unchecked")]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},["&".concat(t,"-checked ").concat(c)]:{paddingInlineStart:o,paddingInlineEnd:a,["".concat(c,"-checked")]:{marginInlineStart:0,marginInlineEnd:0},["".concat(c,"-unchecked")]:{marginInlineStart:"calc(100% - ".concat(s," + ").concat(d,")"),marginInlineEnd:"calc(-100% + ".concat(s," - ").concat(d,")")}},["&:not(".concat(t,"-disabled):active")]:{["&:not(".concat(t,"-checked) ").concat(c)]:{["".concat(c,"-unchecked")]:{marginInlineStart:l(r).mul(2).equal(),marginInlineEnd:l(r).mul(-1).mul(2).equal()}},["&".concat(t,"-checked ").concat(c)]:{["".concat(c,"-checked")]:{marginInlineStart:l(r).mul(-1).mul(2).equal(),marginInlineEnd:l(r).mul(2).equal()}}}}}},mI=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:"".concat(rn(n)),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),userSelect:"none",["&:hover:not(".concat(t,"-disabled)")]:{background:e.colorTextTertiary}}),eo(e)),{["&".concat(t,"-checked")]:{background:e.switchColor,["&:hover:not(".concat(t,"-disabled)")]:{background:e.colorPrimaryHover}},["&".concat(t,"-loading, &").concat(t,"-disabled")]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},["&".concat(t,"-rtl")]:{direction:"rtl"}})}},gI=$o("Switch",(e=>{const t=Ho(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:"rgba(0, 0, 0, ".concat(e.opacityLoading,")"),switchHandleActiveInset:"-30%"});return[mI(t),hI(t),pI(t),fI(t),uI(t)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:o}=e,a=t*n,i=r/2,l=a-4,c=i-4;return{trackHeight:a,trackHeightSM:i,trackMinWidth:2*l+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:o,handleSize:l,handleSizeSM:c,handleShadow:"0 2px 4px 0 ".concat(new ao("#00230b").setAlpha(.2).toRgbString()),innerMinMargin:l/2,innerMaxMargin:l+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}));var vI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const bI=t.forwardRef(((e,n)=>{const{prefixCls:r,size:o,disabled:a,loading:i,className:l,rootClassName:c,style:s,checked:d,value:u,defaultChecked:f,defaultValue:p,onChange:h}=e,m=vI(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[g,b]=_r(!1,{value:null!==d&&void 0!==d?d:u,defaultValue:null!==f&&void 0!==f?f:p}),{getPrefixCls:y,direction:x,switch:w}=t.useContext(at),C=t.useContext(Ki),S=(null!==a&&void 0!==a?a:C)||i,E=y("switch",r),k=t.createElement("div",{className:"".concat(E,"-handle")},i&&t.createElement(yl,{className:"".concat(E,"-loading-icon")})),[j,I,T]=gI(E),A=Yi(o),O=v()(null===w||void 0===w?void 0:w.className,{["".concat(E,"-small")]:"small"===A,["".concat(E,"-loading")]:i,["".concat(E,"-rtl")]:"rtl"===x},l,c,I,T),N=Object.assign(Object.assign({},null===w||void 0===w?void 0:w.style),s);return j(t.createElement(Wi,{component:"Switch"},t.createElement(dI,Object.assign({},m,{checked:g,onChange:function(){b(arguments.length<=0?void 0:arguments[0]),null===h||void 0===h||h.apply(void 0,arguments)},prefixCls:E,className:O,style:N,disabled:S,ref:n,loadingIcon:k}))))}));bI.__ANT_SWITCH=!0;const yI=bI;const xI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"};var wI=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:xI}))};const CI=t.forwardRef(wI),SI=e=>{let{ipAddress:n=!1,label:r,isMandatory:o=!1,defaultValue:a="",initValue:i="",isModified:l=!1,isValidProps:c=!0,onChange:s,disabled:d=!1}=e;const[u,f]=(0,t.useState)(a||""),[p,h]=(0,t.useState)(!0),[m,g]=(0,t.useState)(!1),{translate:v}=og(),b=(0,t.useRef)(i||"");(0,t.useEffect)((()=>{f(a||""),b.current=i}),[a]);const y=(e,t)=>{g(!0);let r=e;f(r);let a=!0;(o&&""===r.trim()||n&&""!==r.trim()&&!/^(25[0-5]|2[0-4]\d|[01]?\d\d?)(\.(25[0-5]|2[0-4]\d|[01]?\d\d?)){3}$/.test(r))&&(a=!1),h(a),s(e,a,t)};return(0,ng.jsxs)("div",{className:"inputBox-container",children:[(0,ng.jsx)(Hd,{placement:"bottomLeft",title:v("undoClick"),children:(0,ng.jsx)("span",{style:{visibility:l?"visible":"hidden"},onClick:()=>y(b.current,!1),children:(0,ng.jsx)(CI,{})})}),(0,ng.jsxs)("div",{className:"inputBox",children:[(0,ng.jsx)("input",{disabled:d,type:"text",value:u,onChange:e=>y(e.target.value,!0),onKeyDown:e=>{["0","1","2","3","4","5","6","7","8","9","."].includes(e.key)||["Backspace","Delete","ArrowLeft","ArrowRight","Tab"].includes(e.key)||e.preventDefault()},style:{border:c?"1px solid #d9d9d9":"1px solid red"}}),(0,ng.jsxs)("span",{className:"label-over",children:[r,o&&(0,ng.jsx)("sup",{children:"*"})]})]})]})},EI=um();function kI(e){const n=Wm(),r=Hm(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(null),[c,s]=(0,t.useState)(!1),d=(0,t.useCallback)((()=>{a(!1),l(null)}),[]),u=(0,t.useCallback)((e=>!(!c&&e.location.pathname!==r.pathname)||(a(!0),l(e),!1)),[c,r]),f=(0,t.useCallback)((()=>{a(!1),s(!0)}),[]);return(0,t.useEffect)((()=>{var e;c&&i&&(n(null===(e=i.location)||void 0===e?void 0:e.pathname),s(!1))}),[c,i]),function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,t.useEffect)((()=>{if(!n)return;const t=EI.block((n=>{const r={...n,retry(){t(),n.retry()}};e(r)}));return t}),[e,n])}(u,e),[o,f,d]}const jI=e=>{let{showDialog:t}=e;const[n,r,o]=kI(t),{translate:a}=og();return(0,ng.jsxs)(UC,{title:a("attenzione")+"!",open:n,onOk:r,onCancel:o,cancelText:a("cancel"),okText:a("ok"),children:[(0,ng.jsx)("p",{children:a("alertEditNotSave")}),(0,ng.jsx)("p",{children:a("alertEditNotSaveQuestion")})]})},II=e=>{let{onClick:t,disabled:n,justEdit:r}=e;const{translate:o}=og();return(0,ng.jsx)(ac,{type:"primary",onClick:t,disabled:!r||n,children:o("save")})};const TI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var AI=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:TI}))};const OI=t.forwardRef(AI),NI=e=>{let{confirmSave:t,disabled:n,contentWarning:r,justEdit:o}=e;const{translate:a}=og();return(0,ng.jsx)(ac,{type:"primary",onClick:()=>{UC.confirm({icon:(0,ng.jsx)(OI,{}),title:a("warning"),content:r,okText:a("ok"),cancelText:a("cancel"),onOk:()=>{t()}})},disabled:!o||n,children:a("save")})};let RI=!1,PI=null;const MI=e=>{RI=!0,PI=e},{Search:DI}=Aj,LI={id:"",name:"",mac:"",ip:"",mask:"",gateway:"",dns:["",""],status:"",wanstatus:"",latency:0},_I=e=>{var n,r,o,a,i,l,c,s,d,u,f,p,h,m,g,v,b,y,x,w;let{clearToken:C,restartDevice:S}=e;const[E,k]=(0,t.useState)(),[j,I]=(0,t.useState)([LI]),[T,A]=(0,t.useState)(),[O,N]=mE(((e,t)=>cE(e,t)),[]),[R,P]=mE(((e,t,n)=>cE(e,t,n)),[]),{translate:M}=og(),[D,L]=(0,t.useState)(0),[_,z]=(0,t.useState)({}),[B,F]=(0,t.useState)(),[H,W]=(0,t.useState)(!1),[V,U]=(0,t.useState)(!1),[K,G]=(0,t.useState)(!1),[q,X]=(0,t.useState)([]),[Y,$]=(0,t.useState)(),J=(0,t.useRef)();function Q(){P(vS,GC(),!1)}function Z(e,t){let n,r,o;for(var a=arguments.length,i=new Array(a>2?a-2:0),l=2;l<a;l++)i[l-2]=arguments[l];if("dns"===t){const[t,a,l]=i;o=t,n=l;const c=[...E.interfaces[e].dns];c[o]=a,E.interfaces[e].dns=c,r=!0}else{const[o,a,l]=i;n=a,r=l,E.interfaces[e][t]=o}X((a=>{const i=a.map(((a,i)=>{if(i!==e)return a;const l="dns"===t?"dns".concat(o):t;return{...a,isModified:{...a.isModified,[l]:n},isValidProps:{...a.isValidProps,[l]:r},isRecordModified:Object.values({...a.isModified,[l]:n}).some((e=>!0===e))}}));return i})),G(!0),k({...E})}(0,t.useEffect)((()=>(Q(),J.current=setInterval((()=>{Q()}),5e3),N(bS,GC()),()=>{clearInterval(J.current)})),[]),(0,t.useEffect)((()=>{if(O.value){k(O.value),$(JSON.parse(JSON.stringify(O.value)));const e={};O.value.interfaces.forEach(((t,n)=>{e[n]=t.dhcp})),z(e),F(O.value.mode);const t=O.value.interfaces.map((e=>({...e,isModified:!1,isValidProps:!0})));X(t)}}),[O]),(0,t.useEffect)((()=>{R.value&&I(R.value)}),[R]),(0,t.useEffect)((()=>{const e=q.some((e=>Object.values(e.isModified).some((e=>e))));if("bridge"===B){const t=q.find((e=>e.isValidProps)),n=!t||Object.values(t.isValidProps).every((e=>!1!==e));U(e&&n)}else{const t=q.every((e=>!e.isValidProps||Object.values(e.isValidProps).every((e=>!1!==e))));U(e&&t)}}),[q]);return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(jI,{showDialog:V}),O.value&&(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:M("networkSett")})}),(0,ng.jsxs)(Qv,{bordered:!1,title:M("ethernetPorts"),className:"network-card",children:[(0,ng.jsxs)("div",{className:"network-mode",children:[(0,ng.jsx)("span",{children:M("networkMode")}),(0,ng.jsxs)("small",{style:{display:"none"},children:["(",B,")"]}),(0,ng.jsxs)(lI.Group,{defaultValue:B,value:B,onChange:e=>{const t=null===Y||void 0===Y?void 0:Y.mode,n=e.target.value!==t;X((e=>e.map(((e,t)=>({...e,isModified:{...e.isModified,mode:n},isRecordModified:n||Object.entries(e.isModified).some((e=>{let[t,n]=e;return"mode"!==t&&n}))}))))),F(e.target.value),G(!0),E.mode=e.target.value,k(E),"bridge"===e.target.value&&L(0)},optionType:"button",buttonStyle:"solid",children:[(0,ng.jsx)(lI,{value:"bridge",children:M("bridge")}),(0,ng.jsx)(lI,{value:"dual",children:M("dual")})]})]}),(0,ng.jsx)("table",{width:"100%",children:(0,ng.jsx)("tbody",{children:null===E||void 0===E?void 0:E.interfaces.map(((e,t)=>{var n,r,o,a,i,l,c,s,d,u;return"bridge"===B&&0===t||"dual"===B?(0,ng.jsxs)("tr",{onClick:()=>L(t),className:"bordered clickable-row ".concat(D===t?"selected":""),style:{fontStyle:null!==(n=q[t])&&void 0!==n&&n.isRecordModified?"italic":"normal"},children:[(0,ng.jsx)("span",{className:"icon-isModified",style:{visibility:null!==(r=q[t])&&void 0!==r&&r.isRecordModified?"visible":"hidden"},children:(0,ng.jsx)(bE,{})}),(0,ng.jsx)("td",{style:{textAlign:"center",padding:"20px 10px"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,ng.jsx)(wE,{style:{fontSize:"20px"}}),(0,ng.jsx)("span",{style:{fontSize:"10px"},children:"dual"===B?null===(o=j[t])||void 0===o?void 0:o.name:"ETH-1/2"})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",color:"gray",fontSize:"12px"},children:[(0,ng.jsxs)("span",{children:[M("ip"),": ",null===(a=j[t])||void 0===a?void 0:a.ip," | ",M("dns")," 1:"," ",null===(i=j[t])||void 0===i?void 0:i.dns[0]," | ",M("dns")," 2: ",null===(l=j[t])||void 0===l?void 0:l.dns[1]]}),(0,ng.jsxs)("span",{children:[M("gateway"),": ",null===(c=j[t])||void 0===c?void 0:c.gateway," | ","Subnet mask",":"," ",null===(s=j[t])||void 0===s?void 0:s.mask]})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",color:"gray",fontSize:"12px"},children:[(0,ng.jsx)("span",{children:M("lan")}),(0,ng.jsx)("div",{className:"up"===(null===(d=j[t])||void 0===d?void 0:d.status)?"led-on":"led-off"})]})}),(0,ng.jsx)("td",{children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",color:"gray",fontSize:"12px"},children:[(0,ng.jsx)("span",{children:M("wan")}),(0,ng.jsx)("div",{className:"up"===(null===(u=j[t])||void 0===u?void 0:u.wanstatus)?"led-on":"led-off"})]})})]},t):null}))})}),(0,ng.jsxs)("div",{className:"netSave-block",children:[(0,ng.jsxs)("span",{style:{visibility:H?"visible":"hidden"},children:[" ",M("changeIpAlert")]}),K?(0,ng.jsx)(NI,{confirmSave:async()=>{try{await dE(bS,JSON.stringify(E),GC()),await N(bS,GC()),G(!1),W(!1),U(!1),ak.success(M("ok")),MI(1),XC(),JC(),S(),C()}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(M(e.message))}},contentWarning:(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("p",{children:M("networkAlertConfirm1")}),(0,ng.jsx)("p",{children:M("networkAlertConfirm2")}),(0,ng.jsx)("p",{children:M("networkAlertConfirm3")})]}),justEdit:V}):(0,ng.jsx)(II,{justEdit:V,onClick:async()=>{try{await dE(bS,JSON.stringify(E),GC()),await N(bS,GC()),G(!1),W(!1),U(!1),ak.success(M("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(M(e.message))}}})]})]}),(0,ng.jsx)(Qv,{bordered:!1,title:"".concat(M("details")," ").concat("dual"===B?null===E||void 0===E||null===(n=E.interfaces[D])||void 0===n?void 0:n.name:"ETH-1/2"),className:"network-card",children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"20px",flexWrap:"wrap"},children:[(0,ng.jsxs)("span",{children:[(0,ng.jsx)(yI,{checked:_[D],onChange:e=>((e,t)=>{const n=null===Y||void 0===Y?void 0:Y.interfaces[e].dhcp,r=t!==n;Z(e,"dhcp",t,!1,!0),z((n=>({...n,[e]:t}))),X((t=>t.map(((t,n)=>n!==e?t:{...t,isModified:{...t.isModified,dhcp:r},isRecordModified:r||Object.entries(t.isModified).some((e=>{let[t,n]=e;return"dhcp"!==t&&n}))})))),G(!0)})(D,e)}),(0,ng.jsxs)("span",{className:"label-filed",children:[" ",M("dhpcEnabled")]})]}),_[D]?(0,ng.jsx)("div",{style:{minHeight:"160px"}}):(0,ng.jsxs)("div",{style:{minHeight:"160px"},children:[(0,ng.jsxs)("div",{style:{display:"flex",gap:"15px",marginTop:"40px",flexWrap:"wrap"},children:[(0,ng.jsx)(SI,{ipAddress:!0,label:M("ipAddress"),isMandatory:!0,defaultValue:null===E||void 0===E||null===(r=E.interfaces[D])||void 0===r?void 0:r.ip,initValue:null===(o=q[D])||void 0===o?void 0:o.ip,isModified:null===(a=q[D])||void 0===a?void 0:a.isModified.ip,isValidProps:null===(i=q[D])||void 0===i?void 0:i.isValidProps.ip,onChange:(e,t,n)=>{W(n),Z(D,"ip",e,n,t)}}),(0,ng.jsx)(SI,{ipAddress:!0,label:M("subnetMask"),isMandatory:!0,defaultValue:null===E||void 0===E||null===(l=E.interfaces[D])||void 0===l?void 0:l.mask,initValue:null===(c=q[D])||void 0===c?void 0:c.mask,isModified:null===(s=q[D])||void 0===s?void 0:s.isModified.mask,isValidProps:null===(d=q[D])||void 0===d?void 0:d.isValidProps.mask,onChange:(e,t,n)=>Z(D,"mask",e,n,t)}),(0,ng.jsx)(SI,{ipAddress:!0,label:M("gatewayAdd"),defaultValue:null===E||void 0===E||null===(u=E.interfaces[D])||void 0===u?void 0:u.gateway,initValue:null===(f=q[D])||void 0===f?void 0:f.gateway,isModified:null===(p=q[D])||void 0===p?void 0:p.isModified.gateway,isValidProps:null===(h=q[D])||void 0===h?void 0:h.isValidProps.gateway,onChange:(e,t,n)=>Z(D,"gateway",e,n,t)})]}),(0,ng.jsxs)("div",{style:{display:"flex",gap:"15px",marginTop:"40px",flexWrap:"wrap"},children:[(0,ng.jsx)(SI,{label:M("dnsPrimary"),defaultValue:null===E||void 0===E||null===(m=E.interfaces[D])||void 0===m?void 0:m.dns[0],initValue:null===(g=q[D])||void 0===g?void 0:g.dns[0],isModified:null===(v=q[D])||void 0===v?void 0:v.isModified.dns0,onChange:(e,t,n)=>Z(D,"dns",0,e,n,!0)}),(0,ng.jsx)(SI,{label:M("dnsSecondary"),defaultValue:null===E||void 0===E||null===(b=E.interfaces[D])||void 0===b?void 0:b.dns[1],initValue:null===(y=q[D])||void 0===y?void 0:y.dns[1],isModified:null===(x=q[D])||void 0===x?void 0:x.isModified.dns1,onChange:(e,t,n)=>Z(D,"dns",1,e,n,!0)})]})]})]})}),(0,ng.jsx)(Qv,{bordered:!1,className:"network-card",children:(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"flex-start",flexDirection:"column",gap:"20px"},children:[(0,ng.jsx)(DI,{onSearch:async e=>{const t={address:e,port:null===E||void 0===E?void 0:E.interfaces[D].id.toString()};try{const e=await sE("/network/ping",JSON.stringify(t),GC());A(e)}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return;ak.error(M(n.message))}},addonBefore:"".concat("dual"===B?null===E||void 0===E||null===(w=E.interfaces[D])||void 0===w?void 0:w.name:"ETH-1/2"),allowClear:!0,enterButton:"Ping"}),T&&(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",color:"gray",fontSize:"12px"},children:[(0,ng.jsxs)("span",{children:[M("status"),":"," ",(0,ng.jsx)("span",{style:{color:"down"===(null===T||void 0===T?void 0:T.status)?"red":"green",fontWeight:"bold"},children:null===T||void 0===T?void 0:T.status})]}),(0,ng.jsxs)("span",{style:{visibility:"down"===(null===T||void 0===T?void 0:T.status)?"hidden":"visible"},children:[M("latency"),":"," ",(0,ng.jsxs)("span",{style:{color:"green",fontWeight:"bold"},children:[null===T||void 0===T?void 0:T.latency," (ms)"]})]})]})]})})]})]})},zI=n.p+"static/media/bk-pattern.b07acac2d1867d6b1e39.png";const BI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"};var FI=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:BI}))};const HI=t.forwardRef(FI);const WI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};var VI=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:WI}))};const UI=t.forwardRef(VI);const KI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888.3 693.2c-42.5-24.6-94.3-18-129.2 12.8l-53-30.7V523.6c0-15.7-8.4-30.3-22-38.1l-136-78.3v-67.1c44.2-15 76-56.8 76-106.1 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 49.3 31.8 91.1 76 106.1v67.1l-136 78.3c-13.6 7.8-22 22.4-22 38.1v151.6l-53 30.7c-34.9-30.8-86.8-37.4-129.2-12.8-53.5 31-71.7 99.4-41 152.9 30.8 53.5 98.9 71.9 152.2 41 42.5-24.6 62.7-73 53.6-118.8l48.7-28.3 140.6 81c6.8 3.9 14.4 5.9 22 5.9s15.2-2 22-5.9L674.5 740l48.7 28.3c-9.1 45.7 11.2 94.2 53.6 118.8 53.3 30.9 121.5 12.6 152.2-41 30.8-53.6 12.6-122-40.7-152.9zm-673 138.4a47.6 47.6 0 01-65.2-17.6c-13.2-22.9-5.4-52.3 17.5-65.5a47.6 47.6 0 0165.2 17.6c13.2 22.9 5.4 52.3-17.5 65.5zM522 463.8zM464 234a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm170 446.2l-122 70.3-122-70.3V539.8l122-70.3 122 70.3v140.4zm239.9 133.9c-13.2 22.9-42.4 30.8-65.2 17.6-22.8-13.2-30.7-42.6-17.5-65.5s42.4-30.8 65.2-17.6c22.9 13.2 30.7 42.5 17.5 65.5z"}}]},name:"deployment-unit",theme:"outlined"};var GI=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:KI}))};const qI=t.forwardRef(GI);const XI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};var YI=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:XI}))};const $I=t.forwardRef(YI);const JI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"};var QI=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:JI}))};const ZI=t.forwardRef(QI);var eT=t.createContext(null),tT=t.createContext({});const nT=eT;const rT=function(e){var n=e.prefixCls,r=e.className,o=e.style,i=e.children,l=e.containerRef,c=e.id,s={onMouseEnter:e.onMouseEnter,onMouseOver:e.onMouseOver,onMouseLeave:e.onMouseLeave,onClick:e.onClick,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp},d=Fr(t.useContext(tT).panel,l);return t.createElement(t.Fragment,null,t.createElement("div",a({id:c,className:v()("".concat(n,"-content"),r),style:oe({},o),"aria-modal":"true",role:"dialog",ref:d},s),i))};function oT(e){return"string"===typeof e&&String(Number(e))===e?(Ie(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var aT={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function iT(e,n){var r,o,i,l=e.prefixCls,c=e.open,s=e.placement,d=e.inline,f=e.push,p=e.forceRender,m=e.autoFocus,g=e.keyboard,b=e.classNames,y=e.rootClassName,x=e.rootStyle,w=e.zIndex,C=e.className,S=e.id,E=e.style,k=e.motion,j=e.width,I=e.height,T=e.children,A=e.mask,O=e.maskClosable,N=e.maskMotion,R=e.maskClassName,P=e.maskStyle,M=e.afterOpenChange,D=e.onClose,L=e.onMouseEnter,_=e.onMouseOver,z=e.onMouseLeave,B=e.onClick,F=e.onKeyDown,H=e.onKeyUp,W=e.styles,V=t.useRef(),U=t.useRef(),K=t.useRef();t.useImperativeHandle(n,(function(){return V.current}));t.useEffect((function(){var e;c&&m&&(null===(e=V.current)||void 0===e||e.focus({preventScroll:!0}))}),[c]);var G=u(t.useState(!1),2),q=G[0],X=G[1],Y=t.useContext(nT),$=null!==(r=null!==(o=null===(i=!1===f?{distance:0}:!0===f?{}:f||{})||void 0===i?void 0:i.distance)&&void 0!==o?o:null===Y||void 0===Y?void 0:Y.pushDistance)&&void 0!==r?r:180,J=t.useMemo((function(){return{pushDistance:$,push:function(){X(!0)},pull:function(){X(!1)}}}),[$]);t.useEffect((function(){var e,t;c?null===Y||void 0===Y||null===(e=Y.push)||void 0===e||e.call(Y):null===Y||void 0===Y||null===(t=Y.pull)||void 0===t||t.call(Y)}),[c]),t.useEffect((function(){return function(){var e;null===Y||void 0===Y||null===(e=Y.pull)||void 0===e||e.call(Y)}}),[]);var Q=A&&t.createElement(xi,a({key:"mask"},N,{visible:c}),(function(e,n){var r=e.className,o=e.style;return t.createElement("div",{className:v()("".concat(l,"-mask"),r,null===b||void 0===b?void 0:b.mask,R),style:oe(oe(oe({},o),P),null===W||void 0===W?void 0:W.mask),onClick:O&&c?D:void 0,ref:n})})),Z="function"===typeof k?k(s):k,ee={};if(q&&$)switch(s){case"top":ee.transform="translateY(".concat($,"px)");break;case"bottom":ee.transform="translateY(".concat(-$,"px)");break;case"left":ee.transform="translateX(".concat($,"px)");break;default:ee.transform="translateX(".concat(-$,"px)")}"left"===s||"right"===s?ee.width=oT(j):ee.height=oT(I);var te={onMouseEnter:L,onMouseOver:_,onMouseLeave:z,onClick:B,onKeyDown:F,onKeyUp:H},ne=t.createElement(xi,a({key:"panel"},Z,{visible:c,forceRender:p,onVisibleChanged:function(e){null===M||void 0===M||M(e)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),(function(n,r){var o=n.className,i=n.style;return t.createElement("div",a({className:v()("".concat(l,"-content-wrapper"),null===b||void 0===b?void 0:b.wrapper,o),style:oe(oe(oe({},ee),i),null===W||void 0===W?void 0:W.wrapper)},hx(e,{data:!0})),t.createElement(rT,a({id:S,containerRef:r,prefixCls:l,className:v()(C,null===b||void 0===b?void 0:b.content),style:oe(oe({},E),null===W||void 0===W?void 0:W.content)},te),T))})),re=oe({},x);return w&&(re.zIndex=w),t.createElement(nT.Provider,{value:J},t.createElement("div",{className:v()(l,"".concat(l,"-").concat(s),y,h(h({},"".concat(l,"-open"),c),"".concat(l,"-inline"),d)),style:re,tabIndex:-1,ref:V,onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey;switch(t){case Vd.TAB:var r;if(t===Vd.TAB)if(n||document.activeElement!==K.current){if(n&&document.activeElement===U.current){var o;null===(o=K.current)||void 0===o||o.focus({preventScroll:!0})}}else null===(r=U.current)||void 0===r||r.focus({preventScroll:!0});break;case Vd.ESC:D&&g&&(e.stopPropagation(),D(e))}}},Q,t.createElement("div",{tabIndex:0,ref:U,style:aT,"aria-hidden":"true","data-sentinel":"start"}),ne,t.createElement("div",{tabIndex:0,ref:K,style:aT,"aria-hidden":"true","data-sentinel":"end"})))}const lT=t.forwardRef(iT);const cT=function(e){var n=e.open,r=void 0!==n&&n,o=e.prefixCls,a=void 0===o?"rc-drawer":o,i=e.placement,l=void 0===i?"right":i,c=e.autoFocus,s=void 0===c||c,d=e.keyboard,f=void 0===d||d,p=e.width,h=void 0===p?378:p,m=e.mask,g=void 0===m||m,v=e.maskClosable,b=void 0===v||v,y=e.getContainer,x=e.forceRender,w=e.afterOpenChange,C=e.destroyOnClose,S=e.onMouseEnter,E=e.onMouseOver,k=e.onMouseLeave,j=e.onClick,I=e.onKeyDown,T=e.onKeyUp,A=e.panelRef,O=u(t.useState(!1),2),N=O[0],R=O[1];var P=u(t.useState(!1),2),M=P[0],D=P[1];fn((function(){D(!0)}),[]);var L=!!M&&r,_=t.useRef(),z=t.useRef();fn((function(){L&&(z.current=document.activeElement)}),[L]);var B=t.useMemo((function(){return{panel:A}}),[A]);if(!x&&!N&&!L&&C)return null;var F={onMouseEnter:S,onMouseOver:E,onMouseLeave:k,onClick:j,onKeyDown:I,onKeyUp:T},H=oe(oe({},e),{},{open:L,prefixCls:a,placement:l,autoFocus:s,keyboard:f,width:h,mask:g,maskClosable:b,inline:!1===y,afterOpenChange:function(e){var t,n;(R(e),null===w||void 0===w||w(e),e||!z.current||null!==(t=_.current)&&void 0!==t&&t.contains(z.current))||(null===(n=z.current)||void 0===n||n.focus({preventScroll:!0}))},ref:_},F);return t.createElement(tT.Provider,{value:B},t.createElement(Tc,{open:L||x||N,autoDestroy:!1,getContainer:y,autoLock:g&&(L||N)},t.createElement(lT,H)))},sT=cT,dT=e=>{var n,r;const{prefixCls:o,title:a,footer:i,extra:l,closeIcon:c,closable:s,onClose:d,headerStyle:u,bodyStyle:f,footerStyle:p,children:h,classNames:m,styles:g}=e,{drawer:b}=t.useContext(at),y=t.useCallback((e=>t.createElement("button",{type:"button",onClick:d,"aria-label":"Close",className:"".concat(o,"-close")},e)),[d]),[x,w]=Ix(s,"undefined"!==typeof c?c:null===b||void 0===b?void 0:b.closeIcon,y,void 0,!0),C=t.useMemo((()=>{var e,n;return a||x?t.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null===(e=null===b||void 0===b?void 0:b.styles)||void 0===e?void 0:e.header),u),null===g||void 0===g?void 0:g.header),className:v()("".concat(o,"-header"),{["".concat(o,"-header-close-only")]:x&&!a&&!l},null===(n=null===b||void 0===b?void 0:b.classNames)||void 0===n?void 0:n.header,null===m||void 0===m?void 0:m.header)},t.createElement("div",{className:"".concat(o,"-header-title")},w,a&&t.createElement("div",{className:"".concat(o,"-title")},a)),l&&t.createElement("div",{className:"".concat(o,"-extra")},l)):null}),[x,w,l,u,o,a]),S=t.useMemo((()=>{var e,n;if(!i)return null;const r="".concat(o,"-footer");return t.createElement("div",{className:v()(r,null===(e=null===b||void 0===b?void 0:b.classNames)||void 0===e?void 0:e.footer,null===m||void 0===m?void 0:m.footer),style:Object.assign(Object.assign(Object.assign({},null===(n=null===b||void 0===b?void 0:b.styles)||void 0===n?void 0:n.footer),p),null===g||void 0===g?void 0:g.footer)},i)}),[i,p,o]);return t.createElement(t.Fragment,null,C,t.createElement("div",{className:v()("".concat(o,"-body"),null===m||void 0===m?void 0:m.body,null===(n=null===b||void 0===b?void 0:b.classNames)||void 0===n?void 0:n.body),style:Object.assign(Object.assign(Object.assign({},null===(r=null===b||void 0===b?void 0:b.styles)||void 0===r?void 0:r.body),f),null===g||void 0===g?void 0:g.body)},h),S)},uT=e=>{const t="100%";return{left:"translateX(-".concat(t,")"),right:"translateX(".concat(t,")"),top:"translateY(-".concat(t,")"),bottom:"translateY(".concat(t,")")}[e]},fT=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),pT=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:"all ".concat(t)}}},fT({opacity:e},{opacity:1})),hT=(e,t)=>[pT(.7,t),fT({transform:uT(e)},{transform:"none"})],mT=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[t]:{["".concat(t,"-mask-motion")]:pT(0,n),["".concat(t,"-panel-motion")]:["left","right","top","bottom"].reduce(((e,t)=>Object.assign(Object.assign({},e),{["&-".concat(t)]:hT(t,n)})),{})}}},gT=e=>{const{componentCls:t,zIndexPopup:n,colorBgMask:r,colorBgElevated:o,motionDurationSlow:a,motionDurationMid:i,padding:l,paddingLG:c,fontSizeLG:s,lineHeightLG:d,lineWidth:u,lineType:f,colorSplit:p,marginSM:h,colorIcon:m,colorIconHover:g,colorText:v,fontWeightStrong:b,footerPaddingBlock:y,footerPaddingInline:x}=e,w="".concat(t,"-content-wrapper");return{[t]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:o,display:"flex",flexDirection:"column",["&".concat(t,"-left")]:{boxShadow:e.boxShadowDrawerLeft},["&".concat(t,"-right")]:{boxShadow:e.boxShadowDrawerRight},["&".concat(t,"-top")]:{boxShadow:e.boxShadowDrawerUp},["&".concat(t,"-bottom")]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},["".concat(t,"-mask")]:{position:"absolute",inset:0,zIndex:n,background:r,pointerEvents:"auto"},[w]:{position:"absolute",zIndex:n,maxWidth:"100vw",transition:"all ".concat(a),"&-hidden":{display:"none"}},["&-left > ".concat(w)]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},["&-right > ".concat(w)]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},["&-top > ".concat(w)]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},["&-bottom > ".concat(w)]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},["".concat(t,"-content")]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},["".concat(t,"-header")]:{display:"flex",flex:0,alignItems:"center",padding:"".concat(rn(l)," ").concat(rn(c)),fontSize:s,lineHeight:d,borderBottom:"".concat(rn(u)," ").concat(f," ").concat(p),"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},["".concat(t,"-extra")]:{flex:"none"},["".concat(t,"-close")]:{display:"inline-block",marginInlineEnd:h,color:m,fontWeight:b,fontSize:s,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:"color ".concat(i),textRendering:"auto","&:focus, &:hover":{color:g,textDecoration:"none"}},["".concat(t,"-title")]:{flex:1,margin:0,color:v,fontWeight:e.fontWeightStrong,fontSize:s,lineHeight:d},["".concat(t,"-body")]:{flex:1,minWidth:0,minHeight:0,padding:c,overflow:"auto"},["".concat(t,"-footer")]:{flexShrink:0,padding:"".concat(rn(y)," ").concat(rn(x)),borderTop:"".concat(rn(u)," ").concat(f," ").concat(p)},"&-rtl":{direction:"rtl"}}}},vT=$o("Drawer",(e=>{const t=Ho(e,{});return[gT(t),mT(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding})));var bT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const yT={distance:180},xT=e=>{const{rootClassName:n,width:r,height:o,size:a="default",mask:i=!0,push:l=yT,open:c,afterOpenChange:s,onClose:d,prefixCls:u,getContainer:f,style:p,className:h,visible:m,afterVisibleChange:g,maskStyle:b,drawerStyle:y,contentWrapperStyle:x}=e,w=bT(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle"]),{getPopupContainer:C,getPrefixCls:S,direction:E,drawer:k}=t.useContext(at),j=S("drawer",u),[I,T,A]=vT(j),O=void 0===f&&C?()=>C(document.body):f,N=v()({"no-mask":!i,["".concat(j,"-rtl")]:"rtl"===E},n,T,A);const R=t.useMemo((()=>null!==r&&void 0!==r?r:"large"===a?736:378),[r,a]),P=t.useMemo((()=>null!==o&&void 0!==o?o:"large"===a?736:378),[o,a]),M={motionName:Js(j,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},D=Zw(),[L,_]=Gs("Drawer",w.zIndex),{classNames:z={},styles:B={}}=w,{classNames:F={},styles:H={}}=k||{};return I(t.createElement(rl,null,t.createElement(Yw,{status:!0,override:!0},t.createElement(Hs.Provider,{value:_},t.createElement(sT,Object.assign({prefixCls:j,onClose:d,maskMotion:M,motion:e=>({motionName:Js(j,"panel-motion-".concat(e)),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},w,{classNames:{mask:v()(z.mask,F.mask),content:v()(z.content,F.content)},styles:{mask:Object.assign(Object.assign(Object.assign({},B.mask),b),H.mask),content:Object.assign(Object.assign(Object.assign({},B.content),y),H.content),wrapper:Object.assign(Object.assign(Object.assign({},B.wrapper),x),H.wrapper)},open:null!==c&&void 0!==c?c:m,mask:i,push:l,width:R,height:P,style:Object.assign(Object.assign({},null===k||void 0===k?void 0:k.style),p),className:v()(null===k||void 0===k?void 0:k.className,h),rootClassName:N,getContainer:O,afterOpenChange:null!==s&&void 0!==s?s:g,panelRef:D,zIndex:L}),t.createElement(dT,Object.assign({prefixCls:j},w,{onClose:d})))))))};xT._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:n,style:r,className:o,placement:a="right"}=e,i=bT(e,["prefixCls","style","className","placement"]),{getPrefixCls:l}=t.useContext(at),c=l("drawer",n),[s,d,u]=vT(c),f=v()(c,"".concat(c,"-pure"),"".concat(c,"-").concat(a),d,u,o);return s(t.createElement("div",{className:f,style:r},t.createElement(dT,Object.assign({prefixCls:c},i))))};const wT=xT;function CT(){return CT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CT.apply(this,arguments)}function ST(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}const ET=["onClick","reloadDocument","replace","state","target","to"];function kT(e){let{basename:n,children:r,window:o}=e,a=(0,t.useRef)();null==a.current&&(a.current=um({window:o}));let i=a.current,[l,c]=(0,t.useState)({action:i.action,location:i.location});return(0,t.useLayoutEffect)((()=>i.listen(c)),[i]),(0,t.createElement)(qm,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:i})}function jT(e){let{basename:n,children:r,history:o}=e;const[a,i]=(0,t.useState)({action:o.action,location:o.location});return(0,t.useLayoutEffect)((()=>o.listen(i)),[o]),(0,t.createElement)(qm,{basename:n,children:r,location:a.location,navigationType:a.action,navigator:o})}const IT=(0,t.forwardRef)((function(e,n){let{onClick:r,reloadDocument:o,replace:a=!1,state:i,target:l,to:c}=e,s=ST(e,ET),d=Bm(c),u=function(e,n){let{target:r,replace:o,state:a}=void 0===n?{}:n,i=Wm(),l=Hm(),c=Vm(e);return(0,t.useCallback)((t=>{if(0===t.button&&(!r||"_self"===r)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)){t.preventDefault();let n=!!o||mm(l)===mm(c);i(e,{replace:n,state:a})}}),[l,i,c,o,a,r,e])}(c,{replace:a,state:i,target:l});return(0,t.createElement)("a",CT({},s,{href:d,onClick:function(e){r&&r(e),e.defaultPrevented||o||u(e)},ref:n,target:l}))}));const TT=(0,t.createContext)({menuItems:{},updateMenuService:()=>{}}),AT=e=>{let{children:n}=e;const[r,o]=(0,t.useState)({});return(0,ng.jsx)(TT.Provider,{value:{menuItems:r,updateMenuService:e=>{o(e)}},children:n})},OT=()=>(0,t.useContext)(TT),NT=(0,t.createContext)(void 0),RT=e=>{let{children:n,oemProduct:r}=e;const[o,a]=(0,t.useState)(null),[i,l]=(0,t.useState)(null),[c,s]=(0,t.useState)(null),[d,u]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{u("/profile",GC())}),[]),(0,t.useEffect)((()=>{if(null===d||void 0===d||!d.value)return a(null),l(null),void s(null);const e=d.value;if(r&&e.profile!==r)return a(null),l(null),void s(null);a(e.product),l(e.services),s(e.ports)}),[d]);const f={product:o,services:i,port:c};return(0,ng.jsx)(NT.Provider,{value:f,children:n})},PT=()=>{const{translate:e,language:n}=og(),[r,o]=(0,t.useState)([]),{menuItems:a,updateMenuService:i}=OT(),{product:l,services:c,port:s}=(()=>{const e=(0,t.useContext)(NT);if(!e)throw new Error("useProfile must be used within ProfileProvider");return e})(),[d,u]=mE(((e,t)=>cE(e,t)),[]),f=Hm();function p(e,t,n,r){return{key:t,icon:n,children:r,label:e}}function h(t){const n={...a},r=t.map((e=>{let{service:t}=e;return t})),o=t.filter(((e,t)=>{let{service:n}=e;return!r.includes(n,t+1)})),l=t.some((e=>("rs485_1"===e.id||"rs485_2"===e.id)&&("ylc"===e.service||"virtual_device"===e.service||"modbus_transparent"===e.service))),c=o.map((t=>"undefined"!==t.service?{key:"".concat(t.service),label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service),children:e("".concat(t.service))})}:null));n.serviceMenu=c;const s=o.map((t=>"bacnet_transparent"===t.service?{key:"".concat(t.service.replace("_transparent","Diagnostic")),label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service.replace("_transparent","Diagnostic")),children:e("".concat(t.service))})}:"ylc"===t.service?{key:"".concat(t.service,"Diagnostic"),label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service,"Diagnostic"),children:e("".concat(t.service))})}:"virtual_device"===t.service?{key:"".concat(t.service.replace("_",""),"Diagnostic"),label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service.replace("_",""),"Diagnostic"),children:e("".concat(t.service))})}:null));s.push(l?{key:"modbusTerminal",label:(0,ng.jsx)(IT,{className:"Link",to:"/modbusTerminal",children:e("modbusTerminal")})}:null),s.push({key:"sub3-4",label:(0,ng.jsx)(IT,{className:"Link",to:"/settingStatus",children:e("settStatus")})},{key:"sub3-5",label:(0,ng.jsx)(IT,{className:"Link",to:"/systemDiagnostic",children:e("device")})}),n.diagnosticSubMenu=s,i(n)}(0,t.useEffect)((()=>{u(CS,GC())}),[]),(0,t.useEffect)((()=>{d.value&&o([...d.value]),d.value&&h(d.value)}),[d]),(0,t.useEffect)((()=>{u(CS,GC()),d.value&&h(r)}),[n]);const m=a.serviceMenu||[],g=a.diagnosticSubMenu||[],v=[p((0,ng.jsx)(IT,{className:"Link",to:"/",children:"Home"}),"1",(0,ng.jsx)(HI,{style:{fontSize:"18px",color:"rgba(0, 0, 0, 0.65)"}})),p(e("settings"),"sub1",(0,ng.jsx)(UI,{style:{fontSize:"18px",color:"rgba(0, 0, 0, 0.65)"}}),[p((0,ng.jsx)(IT,{className:"Link",to:"/general",children:e("general")}),"sub1-1"),p((0,ng.jsx)(IT,{className:"Link",to:"/network",children:e("network")}),"sub1-2"),p((0,ng.jsx)(IT,{className:"Link",to:"/serialports",children:e("serialPort")}),"sub1-3"),p((0,ng.jsx)(IT,{className:"Link",to:"/container",children:"Web Garage"}),"sub1-4")]),p(e("serviceConfig"),"serviceMenu",(0,ng.jsx)(qI,{style:{fontSize:"18px",color:"rgba(0, 0, 0, 0.65)"}}),m),l&&l.costerLogicEnabled?p((0,ng.jsx)(IT,{className:"Link",to:"/exchange_variables",children:e("dataFlow")}),"4",(0,ng.jsx)($I,{style:{fontSize:"18px",color:"rgba(0, 0, 0, 0.65)"}})):null,p(e("diagnostic"),"sub3",(0,ng.jsx)(ZI,{style:{fontSize:"18px",color:"rgba(0, 0, 0, 0.65)"}}),g)].map((e=>e));return(0,ng.jsx)(fh,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},theme:"light",mode:"inline",selectedKeys:(()=>{const e=f.pathname;if("/"===e)return["1"];if("/general"===e)return["sub1-1"];if("/network"===e)return["sub1-2"];if("/serialports"===e)return["sub1-3"];if("/container"===e)return["sub1-4"];if("/exchange_variables"===e)return["4"];if("/modbusTerminal"===e)return["modbusTerminal"];if("/settingStatus"===e)return["sub3-4"];if("/systemDiagnostic"===e)return["sub3-5"];const t=e.substring(1);return e.includes("Diagnostic"),["".concat(t)]})(),defaultOpenKeys:(()=>{const e=f.pathname;return["/general","/network","/serialports","/container"].includes(e)?["sub1"]:e.includes("virtual_device")||e.includes("_transparent")||e.includes("ylc")?["serviceMenu"]:e.includes("Diagnostic")||"/modbusTerminal"===e||"/settingStatus"===e?["sub3"]:[]})(),items:v,style:{userSelect:"none"},draggable:!1,onDragStart:e=>e.preventDefault()})},MT=e=>{let{setShowDrawer:t,showDrawer:n}=e;return(0,ng.jsx)(wT,{placement:"left",onClose:()=>{t(!1)},open:n,style:{userSelect:"none"},children:(0,ng.jsx)(PT,{})})},DT=e=>{let{setCollapsed:t,collapsed:n}=e;return(0,ng.jsxs)(kt,{trigger:null,collapsible:!0,collapsed:n,theme:"light",width:240,style:{height:"100vh",left:0,position:"fixed",padding:n?"0px":"10px 0px",textTransform:"none"},children:[(0,ng.jsx)("div",{style:{overflow:"hidden auto"},children:(0,ng.jsx)(PT,{})}),(0,ng.jsx)(ac,{className:"collapse-button",type:"text",icon:n?(0,ng.jsx)(bt,{style:{fontSize:"10px"}}):(0,ng.jsx)(mt,{style:{fontSize:"10px"}}),onClick:()=>t(!n)})]})};const LT=function(e){var n=e.className,r=e.customizeIcon,o=e.customizeIconProps,a=e.children,i=e.onMouseDown,l=e.onClick,c="function"===typeof r?r(o):r;return t.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),null===i||void 0===i||i(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:l,"aria-hidden":!0},void 0!==c?c:t.createElement("span",{className:v()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},a))};var _T=t.createContext(null);function zT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,n=t.useRef(null),r=t.useRef(null);return t.useEffect((function(){return function(){window.clearTimeout(r.current)}}),[]),[function(){return n.current},function(t){(t||null===n.current)&&(n.current=t),window.clearTimeout(r.current),r.current=window.setTimeout((function(){n.current=null}),e)}]}var BT=function(e,n){var r,o=e.prefixCls,a=e.id,i=e.inputElement,l=e.disabled,c=e.tabIndex,s=e.autoFocus,d=e.autoComplete,u=e.editable,f=e.activeDescendantId,p=e.value,h=e.maxLength,m=e.onKeyDown,g=e.onMouseDown,b=e.onChange,y=e.onPaste,x=e.onCompositionStart,w=e.onCompositionEnd,C=e.open,S=e.attrs,E=i||t.createElement("input",null),k=E,j=k.ref,I=k.props,T=I.onKeyDown,A=I.onChange,O=I.onMouseDown,N=I.onCompositionStart,R=I.onCompositionEnd,P=I.style;return E.props,E=t.cloneElement(E,oe(oe(oe({type:"search"},I),{},{id:a,ref:Br(n,j),disabled:l,tabIndex:c,autoComplete:d||"off",autoFocus:s,className:v()("".concat(o,"-selection-search-input"),null===(r=E)||void 0===r||null===(r=r.props)||void 0===r?void 0:r.className),role:"combobox","aria-expanded":C||!1,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":C?f:void 0},S),{},{value:u?p:"",maxLength:h,readOnly:!u,unselectable:u?null:"on",style:oe(oe({},P),{},{opacity:u?null:0}),onKeyDown:function(e){m(e),T&&T(e)},onMouseDown:function(e){g(e),O&&O(e)},onChange:function(e){b(e),A&&A(e)},onCompositionStart:function(e){x(e),N&&N(e)},onCompositionEnd:function(e){w(e),R&&R(e)},onPaste:y}))};const FT=t.forwardRef(BT);function HT(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var WT="undefined"!==typeof window&&window.document&&window.document.documentElement;function VT(e){return["string","number"].includes(f(e))}function UT(e){var t=void 0;return e&&(VT(e.title)?t=e.title.toString():VT(e.label)&&(t=e.label.toString())),t}function KT(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var GT=function(e){e.preventDefault(),e.stopPropagation()};const qT=function(e){var n,r,o=e.id,a=e.prefixCls,i=e.values,l=e.open,c=e.searchValue,s=e.autoClearSearchValue,d=e.inputRef,f=e.placeholder,p=e.disabled,m=e.mode,g=e.showSearch,b=e.autoFocus,y=e.autoComplete,x=e.activeDescendantId,w=e.tabIndex,C=e.removeIcon,S=e.maxTagCount,E=e.maxTagTextLength,k=e.maxTagPlaceholder,j=void 0===k?function(e){return"+ ".concat(e.length," ...")}:k,I=e.tagRender,T=e.onToggleOpen,A=e.onRemove,O=e.onInputChange,N=e.onInputPaste,R=e.onInputKeyDown,P=e.onInputMouseDown,M=e.onInputCompositionStart,D=e.onInputCompositionEnd,L=t.useRef(null),_=u((0,t.useState)(0),2),z=_[0],B=_[1],F=u((0,t.useState)(!1),2),H=F[0],W=F[1],V="".concat(a,"-selection"),U=l||"multiple"===m&&!1===s||"tags"===m?c:"",K="tags"===m||"multiple"===m&&!1===s||g&&(l||H);n=function(){B(L.current.scrollWidth)},r=[U],WT?t.useLayoutEffect(n,r):t.useEffect(n,r);var G=function(e,n,r,o,a){return t.createElement("span",{title:UT(e),className:v()("".concat(V,"-item"),h({},"".concat(V,"-item-disabled"),r))},t.createElement("span",{className:"".concat(V,"-item-content")},n),o&&t.createElement(LT,{className:"".concat(V,"-item-remove"),onMouseDown:GT,onClick:a,customizeIcon:C},"\xd7"))},q=t.createElement("div",{className:"".concat(V,"-search"),style:{width:z},onFocus:function(){W(!0)},onBlur:function(){W(!1)}},t.createElement(FT,{ref:d,open:l,prefixCls:a,id:o,inputElement:null,disabled:p,autoFocus:b,autoComplete:y,editable:K,activeDescendantId:x,value:U,onKeyDown:R,onMouseDown:P,onChange:O,onPaste:N,onCompositionStart:M,onCompositionEnd:D,tabIndex:w,attrs:hx(e,!0)}),t.createElement("span",{ref:L,className:"".concat(V,"-search-mirror"),"aria-hidden":!0},U,"\xa0")),X=t.createElement(ef,{prefixCls:"".concat(V,"-overflow"),data:i,renderItem:function(e){var n=e.disabled,r=e.label,o=e.value,a=!p&&!n,i=r;if("number"===typeof E&&("string"===typeof r||"number"===typeof r)){var c=String(i);c.length>E&&(i="".concat(c.slice(0,E),"..."))}var s=function(t){t&&t.stopPropagation(),A(e)};return"function"===typeof I?function(e,n,r,o,a){return t.createElement("span",{onMouseDown:function(e){GT(e),T(!l)}},I({label:n,value:e,disabled:r,closable:o,onClose:a}))}(o,i,n,a,s):G(e,i,n,a,s)},renderRest:function(e){var t="function"===typeof j?j(e):j;return G({title:t},t,!1)},suffix:q,itemKey:KT,maxCount:S});return t.createElement(t.Fragment,null,X,!i.length&&!U&&t.createElement("span",{className:"".concat(V,"-placeholder")},f))};const XT=function(e){var n=e.inputElement,r=e.prefixCls,o=e.id,a=e.inputRef,i=e.disabled,l=e.autoFocus,c=e.autoComplete,s=e.activeDescendantId,d=e.mode,f=e.open,p=e.values,h=e.placeholder,m=e.tabIndex,g=e.showSearch,v=e.searchValue,b=e.activeValue,y=e.maxLength,x=e.onInputKeyDown,w=e.onInputMouseDown,C=e.onInputChange,S=e.onInputPaste,E=e.onInputCompositionStart,k=e.onInputCompositionEnd,j=e.title,I=u(t.useState(!1),2),T=I[0],A=I[1],O="combobox"===d,N=O||g,R=p[0],P=v||"";O&&b&&!T&&(P=b),t.useEffect((function(){O&&A(!1)}),[O,b]);var M=!("combobox"!==d&&!f&&!g)&&!!P,D=void 0===j?UT(R):j,L=t.useMemo((function(){return R?null:t.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:M?{visibility:"hidden"}:void 0},h)}),[R,M,h,r]);return t.createElement(t.Fragment,null,t.createElement("span",{className:"".concat(r,"-selection-search")},t.createElement(FT,{ref:a,prefixCls:r,id:o,open:f,inputElement:n,disabled:i,autoFocus:l,autoComplete:c,editable:N,activeDescendantId:s,value:P,onKeyDown:x,onMouseDown:w,onChange:function(e){A(!0),C(e)},onPaste:S,onCompositionStart:E,onCompositionEnd:k,tabIndex:m,attrs:hx(e,!0),maxLength:O?y:void 0})),!O&&R?t.createElement("span",{className:"".concat(r,"-selection-item"),title:D,style:M?{visibility:"hidden"}:void 0},R.label):null,L)};var YT=function(e,n){var r=(0,t.useRef)(null),o=(0,t.useRef)(!1),i=e.prefixCls,l=e.open,c=e.mode,s=e.showSearch,d=e.tokenWithEnter,f=e.autoClearSearchValue,p=e.onSearch,h=e.onSearchSubmit,m=e.onToggleOpen,g=e.onInputKeyDown,v=e.domRef;t.useImperativeHandle(n,(function(){return{focus:function(){r.current.focus()},blur:function(){r.current.blur()}}}));var b=u(zT(0),2),y=b[0],x=b[1],w=(0,t.useRef)(null),C=function(e){!1!==p(e,!0,o.current)&&m(!0)},S={inputRef:r,onInputKeyDown:function(e){var t,n=e.which;n!==Vd.UP&&n!==Vd.DOWN||e.preventDefault(),g&&g(e),n!==Vd.ENTER||"tags"!==c||o.current||l||null===h||void 0===h||h(e.target.value),t=n,[Vd.ESC,Vd.SHIFT,Vd.BACKSPACE,Vd.TAB,Vd.WIN_KEY,Vd.ALT,Vd.META,Vd.WIN_KEY_RIGHT,Vd.CTRL,Vd.SEMICOLON,Vd.EQUALS,Vd.CAPS_LOCK,Vd.CONTEXT_MENU,Vd.F1,Vd.F2,Vd.F3,Vd.F4,Vd.F5,Vd.F6,Vd.F7,Vd.F8,Vd.F9,Vd.F10,Vd.F11,Vd.F12].includes(t)||m(!0)},onInputMouseDown:function(){x(!0)},onInputChange:function(e){var t=e.target.value;if(d&&w.current&&/[\r\n]/.test(w.current)){var n=w.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,w.current)}w.current=null,C(t)},onInputPaste:function(e){var t=e.clipboardData,n=null===t||void 0===t?void 0:t.getData("text");w.current=n||""},onInputCompositionStart:function(){o.current=!0},onInputCompositionEnd:function(e){o.current=!1,"combobox"!==c&&C(e.target.value)}},E="multiple"===c||"tags"===c?t.createElement(qT,a({},e,S)):t.createElement(XT,a({},e,S));return t.createElement("div",{ref:v,className:"".concat(i,"-selector"),onClick:function(e){e.target!==r.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){r.current.focus()})):r.current.focus())},onMouseDown:function(e){var t=y();e.target===r.current||t||"combobox"===c||e.preventDefault(),("combobox"===c||s&&t)&&l||(l&&!1!==f&&p("",!0,!1),m())}},E)};const $T=t.forwardRef(YT);var JT=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],QT=function(e,n){var r=e.prefixCls,o=(e.disabled,e.visible),i=e.children,l=e.popupElement,c=e.animation,s=e.transitionName,d=e.dropdownStyle,u=e.dropdownClassName,f=e.direction,p=void 0===f?"ltr":f,g=e.placement,b=e.builtinPlacements,y=e.dropdownMatchSelectWidth,x=e.dropdownRender,w=e.dropdownAlign,C=e.getPopupContainer,S=e.empty,E=e.getTriggerDOMNode,k=e.onPopupVisibleChange,j=e.onPopupMouseEnter,I=m(e,JT),T="".concat(r,"-dropdown"),A=l;x&&(A=x(l));var O=t.useMemo((function(){return b||function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}}(y)}),[b,y]),N=c?"".concat(T,"-").concat(c):s,R="number"===typeof y,P=t.useMemo((function(){return R?null:!1===y?"minWidth":"width"}),[y,R]),M=d;R&&(M=oe(oe({},M),{},{width:y}));var D=t.useRef(null);return t.useImperativeHandle(n,(function(){return{getPopupElement:function(){return D.current}}})),t.createElement(Ps,a({},I,{showAction:k?["click"]:[],hideAction:k?["click"]:[],popupPlacement:g||("rtl"===p?"bottomRight":"bottomLeft"),builtinPlacements:O,prefixCls:T,popupTransitionName:N,popup:t.createElement("div",{ref:D,onMouseEnter:j},A),stretch:P,popupAlign:w,popupVisible:o,getPopupContainer:C,popupClassName:v()(u,h({},"".concat(T,"-empty"),S)),popupStyle:M,getTriggerDOMNode:E,onPopupVisibleChange:k}),i)};const ZT=t.forwardRef(QT);function eA(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!==r&&void 0!==r?r:void 0!==n?n:"rc-index-key-".concat(t)}function tA(e,t){var n=e||{},r=n.label||(t?"children":"label");return{label:r,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||r}}function nA(e){var t=oe({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Ie(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const rA=t.createContext(null);var oA=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],aA=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],iA=function(e){return"tags"===e||"multiple"===e},lA=t.forwardRef((function(e,n){var r,o,i=e.id,l=e.prefixCls,c=e.className,s=e.showSearch,d=e.tagRender,p=e.direction,g=e.omitDomProps,b=e.displayValues,y=e.onDisplayValuesChange,x=e.emptyOptions,w=e.notFoundContent,C=void 0===w?"Not Found":w,S=e.onClear,E=e.mode,k=e.disabled,j=e.loading,I=e.getInputElement,T=e.getRawInputElement,A=e.open,O=e.defaultOpen,N=e.onDropdownVisibleChange,R=e.activeValue,P=e.onActiveValueChange,M=e.activeDescendantId,D=e.searchValue,L=e.autoClearSearchValue,_=e.onSearch,z=e.onSearchSplit,B=e.tokenSeparators,F=e.allowClear,H=e.suffixIcon,W=e.clearIcon,V=e.OptionList,U=e.animation,K=e.transitionName,G=e.dropdownStyle,q=e.dropdownClassName,X=e.dropdownMatchSelectWidth,Y=e.dropdownRender,$=e.dropdownAlign,J=e.placement,Q=e.builtinPlacements,Z=e.getPopupContainer,ee=e.showAction,te=void 0===ee?[]:ee,ne=e.onFocus,re=e.onBlur,ae=e.onKeyUp,ie=e.onKeyDown,le=e.onMouseDown,ce=m(e,oA),se=iA(E),de=(void 0!==s?s:se)||"combobox"===E,ue=oe({},ce);aA.forEach((function(e){delete ue[e]})),null===g||void 0===g||g.forEach((function(e){delete ue[e]}));var fe=u(t.useState(!1),2),pe=fe[0],he=fe[1];t.useEffect((function(){he(ss())}),[]);var me=t.useRef(null),ge=t.useRef(null),ve=t.useRef(null),be=t.useRef(null),ye=t.useRef(null),xe=t.useRef(!1),we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=u(t.useState(!1),2),r=n[0],o=n[1],a=t.useRef(null),i=function(){window.clearTimeout(a.current)};return t.useEffect((function(){return i}),[]),[r,function(t,n){i(),a.current=window.setTimeout((function(){o(t),n&&n()}),e)},i]}(),Ce=u(we,3),Se=Ce[0],Ee=Ce[1],ke=Ce[2];t.useImperativeHandle(n,(function(){var e,t;return{focus:null===(e=be.current)||void 0===e?void 0:e.focus,blur:null===(t=be.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=ye.current)||void 0===t?void 0:t.scrollTo(e)}}}));var je=t.useMemo((function(){var e;if("combobox"!==E)return D;var t=null===(e=b[0])||void 0===e?void 0:e.value;return"string"===typeof t||"number"===typeof t?String(t):""}),[D,E,b]),Ie="combobox"===E&&"function"===typeof I&&I()||null,Te="function"===typeof T&&T(),Ae=Fr(ge,null===Te||void 0===Te||null===(r=Te.props)||void 0===r?void 0:r.ref),Oe=u(t.useState(!1),2),Ne=Oe[0],Re=Oe[1];fn((function(){Re(!0)}),[]);var Pe=u(_r(!1,{defaultValue:O,value:A}),2),Me=Pe[0],De=Pe[1],Le=!!Ne&&Me,_e=!C&&x;(k||_e&&Le&&"combobox"===E)&&(Le=!1);var ze=!_e&&Le,Be=t.useCallback((function(e){var t=void 0!==e?e:!Le;k||(De(t),Le!==t&&(null===N||void 0===N||N(t)))}),[k,Le,De,N]),Fe=t.useMemo((function(){return(B||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[B]),He=t.useContext(rA)||{},We=He.maxCount,Ve=He.rawValues,Ue=function(e,t,n){if(!((null===Ve||void 0===Ve?void 0:Ve.size)>=We)){var r=!0,o=e;null===P||void 0===P||P(null);var a=function(e,t,n){if(!t||!t.length)return null;var r=!1,o=function e(t,n){var o=Wr(n),a=o[0],i=o.slice(1);if(!a)return[t];var l=t.split(a);return r=r||l.length>1,l.reduce((function(t,n){return[].concat(nt(t),nt(e(n,i)))}),[]).filter(Boolean)}(e,t);return r?"undefined"!==typeof n?o.slice(0,n):o:null}(e,B,We&&We-Ve.size),i=n?null:a;return"combobox"!==E&&i&&(o="",null===z||void 0===z||z(i),Be(!1),r=!1),_&&je!==o&&_(o,{source:t?"typing":"effect"}),r}};t.useEffect((function(){Le||se||"combobox"===E||Ue("",!1,!1)}),[Le]),t.useEffect((function(){Me&&k&&De(!1),k&&!xe.current&&Ee(!1)}),[k]);var Ke=u(zT(),2),Ge=Ke[0],qe=Ke[1],Xe=t.useRef(!1),Ye=[];t.useEffect((function(){return function(){Ye.forEach((function(e){return clearTimeout(e)})),Ye.splice(0,Ye.length)}}),[]);var $e,Je=u(t.useState({}),2)[1];Te&&($e=function(e){Be(e)}),function(e,n,r,o){var a=t.useRef(null);a.current={open:n,triggerOpen:r,customizedTrigger:o},t.useEffect((function(){function t(t){var n;if(null===(n=a.current)||void 0===n||!n.customizedTrigger){var r=t.target;r.shadowRoot&&t.composed&&(r=t.composedPath()[0]||r),a.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&a.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[me.current,null===(e=ve.current)||void 0===e?void 0:e.getPopupElement()]}),ze,Be,!!Te);var Qe,Ze=t.useMemo((function(){return oe(oe({},e),{},{notFoundContent:C,open:Le,triggerOpen:ze,id:i,showSearch:de,multiple:se,toggleOpen:Be})}),[e,C,ze,Le,i,de,se,Be]),et=!!H||j;et&&(Qe=t.createElement(LT,{className:v()("".concat(l,"-arrow"),h({},"".concat(l,"-arrow-loading"),j)),customizeIcon:H,customizeIconProps:{loading:j,searchValue:je,open:Le,focused:Se,showSearch:de}}));var tt,rt=function(e,n,r,o,a){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0,s=t.useMemo((function(){return"object"===f(o)?o.clearIcon:a||void 0}),[o,a]);return{allowClear:t.useMemo((function(){return!(i||!o||!r.length&&!l||"combobox"===c&&""===l)}),[o,i,r.length,l,c]),clearIcon:t.createElement(LT,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:s},"\xd7")}}(l,(function(){var e;null===S||void 0===S||S(),null===(e=be.current)||void 0===e||e.focus(),y([],{type:"clear",values:b}),Ue("",!1,!1)}),b,F,W,k,je,E),ot=rt.allowClear,at=rt.clearIcon,it=t.createElement(V,{ref:ye}),lt=v()(l,c,(h(o={},"".concat(l,"-focused"),Se),h(o,"".concat(l,"-multiple"),se),h(o,"".concat(l,"-single"),!se),h(o,"".concat(l,"-allow-clear"),F),h(o,"".concat(l,"-show-arrow"),et),h(o,"".concat(l,"-disabled"),k),h(o,"".concat(l,"-loading"),j),h(o,"".concat(l,"-open"),Le),h(o,"".concat(l,"-customize-input"),Ie),h(o,"".concat(l,"-show-search"),de),o)),ct=t.createElement(ZT,{ref:ve,disabled:k,prefixCls:l,visible:ze,popupElement:it,animation:U,transitionName:K,dropdownStyle:G,dropdownClassName:q,direction:p,dropdownMatchSelectWidth:X,dropdownRender:Y,dropdownAlign:$,placement:J,builtinPlacements:Q,getPopupContainer:Z,empty:x,getTriggerDOMNode:function(){return ge.current},onPopupVisibleChange:$e,onPopupMouseEnter:function(){Je({})}},Te?t.cloneElement(Te,{ref:Ae}):t.createElement($T,a({},e,{domRef:ge,prefixCls:l,inputElement:Ie,ref:be,id:i,showSearch:de,autoClearSearchValue:L,mode:E,activeDescendantId:M,tagRender:d,values:b,open:Le,onToggleOpen:Be,activeValue:R,searchValue:je,onSearch:Ue,onSearchSubmit:function(e){e&&e.trim()&&_(e,{source:"submit"})},onRemove:function(e){var t=b.filter((function(t){return t!==e}));y(t,{type:"remove",values:[e]})},tokenWithEnter:Fe})));return tt=Te?ct:t.createElement("div",a({className:lt},ue,{ref:me,onMouseDown:function(e){var t,n=e.target,r=null===(t=ve.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var o=setTimeout((function(){var e,t=Ye.indexOf(o);-1!==t&&Ye.splice(t,1),ke(),pe||r.contains(document.activeElement)||null===(e=be.current)||void 0===e||e.focus()}));Ye.push(o)}for(var a=arguments.length,i=new Array(a>1?a-1:0),l=1;l<a;l++)i[l-1]=arguments[l];null===le||void 0===le||le.apply(void 0,[e].concat(i))},onKeyDown:function(e){var t,n=Ge(),r=e.which;if(r===Vd.ENTER&&("combobox"!==E&&e.preventDefault(),Le||Be(!0)),qe(!!je),r===Vd.BACKSPACE&&!n&&se&&!je&&b.length){for(var o=nt(b),a=null,i=o.length-1;i>=0;i-=1){var l=o[i];if(!l.disabled){o.splice(i,1),a=l;break}}a&&y(o,{type:"remove",values:[a]})}for(var c=arguments.length,s=new Array(c>1?c-1:0),d=1;d<c;d++)s[d-1]=arguments[d];Le&&(null===(t=ye.current)||void 0===t||t.onKeyDown.apply(t,[e].concat(s))),null===ie||void 0===ie||ie.apply(void 0,[e].concat(s))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o;Le&&(null===(o=ye.current)||void 0===o||o.onKeyUp.apply(o,[e].concat(n))),null===ae||void 0===ae||ae.apply(void 0,[e].concat(n))},onFocus:function(){Ee(!0),k||(ne&&!Xe.current&&ne.apply(void 0,arguments),te.includes("focus")&&Be(!0)),Xe.current=!0},onBlur:function(){xe.current=!0,Ee(!1,(function(){Xe.current=!1,xe.current=!1,Be(!1)})),k||(je&&("tags"===E?_(je,{source:"submit"}):"multiple"===E&&_("",{source:"blur"})),re&&re.apply(void 0,arguments))}}),Se&&!Le&&t.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(b.map((function(e){var t=e.label,n=e.value;return["number","string"].includes(f(t))?t:n})).join(", "))),ct,Qe,ot&&at),t.createElement(_T.Provider,{value:Ze},tt)}));const cA=lA;var sA=function(){return null};sA.isSelectOptGroup=!0;const dA=sA;var uA=function(){return null};uA.isSelectOption=!0;const fA=uA;var pA=t.forwardRef((function(e,n){var r=e.height,o=e.offsetY,i=e.offsetX,l=e.children,c=e.prefixCls,s=e.onInnerResize,d=e.innerProps,u=e.rtl,f=e.extra,p={},m={display:"flex",flexDirection:"column"};return void 0!==o&&(p={height:r,position:"relative",overflow:"hidden"},m=oe(oe({},m),{},h(h(h(h(h({transform:"translateY(".concat(o,"px)")},u?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),t.createElement("div",{style:p},t.createElement(as,{onResize:function(e){e.offsetHeight&&s&&s()}},t.createElement("div",a({style:m,className:v()(h({},"".concat(c,"-holder-inner"),c)),ref:n},d),l,f)))}));pA.displayName="Filler";const hA=pA;function mA(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}var gA=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.rtl,a=e.scrollOffset,i=e.scrollRange,l=e.onStartMove,c=e.onStopMove,s=e.onScroll,d=e.horizontal,f=e.spinSize,p=e.containerSize,m=e.style,g=e.thumbStyle,b=u(t.useState(!1),2),y=b[0],x=b[1],w=u(t.useState(null),2),C=w[0],S=w[1],E=u(t.useState(null),2),k=E[0],j=E[1],I=!o,T=t.useRef(),A=t.useRef(),O=u(t.useState(!1),2),N=O[0],R=O[1],P=t.useRef(),M=function(){clearTimeout(P.current),R(!0),P.current=setTimeout((function(){R(!1)}),3e3)},D=i-p||0,L=p-f||0,_=t.useMemo((function(){return 0===a||0===D?0:a/D*L}),[a,D,L]),z=t.useRef({top:_,dragging:y,pageY:C,startTop:k});z.current={top:_,dragging:y,pageY:C,startTop:k};var B=function(e){x(!0),S(mA(e,d)),j(z.current.top),l(),e.stopPropagation(),e.preventDefault()};t.useEffect((function(){var e=function(e){e.preventDefault()},t=T.current,n=A.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",B),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",B)}}),[]);var F=t.useRef();F.current=D;var H=t.useRef();H.current=L,t.useEffect((function(){if(y){var e,t=function(t){var n=z.current,r=n.dragging,o=n.pageY,a=n.startTop;if(Sa.cancel(e),r){var i=mA(t,d)-o,l=a;!I&&d?l-=i:l+=i;var c=F.current,u=H.current,f=u?l/u:0,p=Math.ceil(f*c);p=Math.max(p,0),p=Math.min(p,c),e=Sa((function(){s(p,d)}))}},n=function(){x(!1),c()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Sa.cancel(e)}}}),[y]),t.useEffect((function(){M()}),[a]),t.useImperativeHandle(n,(function(){return{delayHidden:M}}));var W="".concat(r,"-scrollbar"),V={position:"absolute",visibility:N?null:"hidden"},U={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return d?(V.height=8,V.left=0,V.right=0,V.bottom=0,U.height="100%",U.width=f,I?U.left=_:U.right=_):(V.width=8,V.top=0,V.bottom=0,I?V.right=0:V.left=0,U.width="100%",U.height=f,U.top=_),t.createElement("div",{ref:T,className:v()(W,h(h(h({},"".concat(W,"-horizontal"),d),"".concat(W,"-vertical"),!d),"".concat(W,"-visible"),N)),style:oe(oe({},V),m),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:M},t.createElement("div",{ref:A,className:v()("".concat(W,"-thumb"),h({},"".concat(W,"-thumb-moving"),y)),style:oe(oe({},U),g),onMouseDown:B}))}));const vA=gA;function bA(e){var n=e.children,r=e.setRef,o=t.useCallback((function(e){r(e)}),[]);return t.cloneElement(n,{ref:o})}const yA=function(){function e(){At(this,e),h(this,"maps",void 0),h(this,"id",0),this.maps=Object.create(null)}return Nt(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}();var xA=10;function wA(e,n,r){var o=u(t.useState(e),2),a=o[0],i=o[1],l=u(t.useState(null),2),c=l[0],s=l[1];return t.useEffect((function(){var t=function(e,t,n){var r,o,a=e.length,i=t.length;if(0===a&&0===i)return null;a<i?(r=e,o=t):(r=t,o=e);var l={__EMPTY_ITEM__:!0};function c(e){return void 0!==e?n(e):l}for(var s=null,d=1!==Math.abs(a-i),u=0;u<o.length;u+=1){var f=c(r[u]);if(f!==c(o[u])){s=u,d=d||f!==c(o[u+1]);break}}return null===s?null:{index:s,multiple:d}}(a||[],e||[],n);void 0!==(null===t||void 0===t?void 0:t.index)&&(null===r||void 0===r||r(t.index),s(e[t.index])),i(e)}),[e]),[c]}const CA="object"===("undefined"===typeof navigator?"undefined":f(navigator))&&/Firefox/i.test(navigator.userAgent),SA=function(e,n){var r=(0,t.useRef)(!1),o=(0,t.useRef)(null);var a=(0,t.useRef)({top:e,bottom:n});return a.current.top=e,a.current.bottom=n,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e<0&&a.current.top||e>0&&a.current.bottom;return t&&n?(clearTimeout(o.current),r.current=!1):n&&!r.current||(clearTimeout(o.current),r.current=!0,o.current=setTimeout((function(){r.current=!1}),50)),!r.current&&n}};function EA(e,n,r,o,a){var i=(0,t.useRef)(0),l=(0,t.useRef)(null),c=(0,t.useRef)(null),s=(0,t.useRef)(!1),d=SA(n,r);var u=(0,t.useRef)(null),f=(0,t.useRef)(null);return[function(t){if(e){Sa.cancel(f.current),f.current=Sa((function(){u.current=null}),2);var n=t.deltaX,r=t.deltaY,p=t.shiftKey,h=n,m=r;("sx"===u.current||!u.current&&p&&r&&!n)&&(h=r,m=0,u.current="sx");var g=Math.abs(h),v=Math.abs(m);null===u.current&&(u.current=o&&g>v?"x":"y"),"y"===u.current?function(e,t){Sa.cancel(l.current),i.current+=t,c.current=t,d(t)||(CA||e.preventDefault(),l.current=Sa((function(){var e=s.current?10:1;a(i.current*e),i.current=0})))}(t,m):function(e,t){a(t,!0),CA||e.preventDefault()}(t,h)}},function(t){e&&(s.current=t.detail===c.current)}]}var kA=14/15;var jA=20;function IA(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*e;return isNaN(t)&&(t=0),t=Math.max(t,jA),Math.floor(t)}var TA=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],AA=[],OA={overflowY:"auto",overflowAnchor:"none"};function NA(e,n){var r=e.prefixCls,o=void 0===r?"rc-virtual-list":r,i=e.className,l=e.height,c=e.itemHeight,s=e.fullHeight,d=void 0===s||s,p=e.style,g=e.data,b=e.children,y=e.itemKey,x=e.virtual,w=e.direction,C=e.scrollWidth,S=e.component,E=void 0===S?"div":S,k=e.onScroll,j=e.onVirtualScroll,I=e.onVisibleChange,T=e.innerProps,A=e.extraRender,O=e.styles,N=m(e,TA),R=!(!1===x||!l||!c),P=R&&g&&(c*g.length>l||!!C),M="rtl"===w,D=v()(o,h({},"".concat(o,"-rtl"),M),i),L=g||AA,_=(0,t.useRef)(),z=(0,t.useRef)(),B=u((0,t.useState)(0),2),F=B[0],H=B[1],W=u((0,t.useState)(0),2),V=W[0],U=W[1],K=u((0,t.useState)(!1),2),G=K[0],q=K[1],X=function(){q(!0)},Y=function(){q(!1)},$=t.useCallback((function(e){return"function"===typeof y?y(e):null===e||void 0===e?void 0:e[y]}),[y]),J={getKey:$};function Q(e){H((function(t){var n=function(e){var t=e;Number.isNaN(Ce.current)||(t=Math.min(t,Ce.current));return t=Math.max(t,0),t}("function"===typeof e?e(t):e);return _.current.scrollTop=n,n}))}var Z=(0,t.useRef)({start:0,end:L.length}),ee=(0,t.useRef)(),te=u(wA(L,$),1)[0];ee.current=te;var ne=function(e,n,r){var o=u(t.useState(0),2),a=o[0],i=o[1],l=(0,t.useRef)(new Map),c=(0,t.useRef)(new yA),s=(0,t.useRef)();function d(){Sa.cancel(s.current)}function f(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){l.current.forEach((function(e,t){if(e&&e.offsetParent){var n=Ia(e),r=n.offsetHeight;c.current.get(t)!==r&&c.current.set(t,n.offsetHeight)}})),i((function(e){return e+1}))};e?t():s.current=Sa(t)}return(0,t.useEffect)((function(){return d}),[]),[function(t,o){var a=e(t),i=l.current.get(a);o?(l.current.set(a,o),f()):l.current.delete(a),!i!==!o&&(o?null===n||void 0===n||n(t):null===r||void 0===r||r(t))},f,c.current,a]}($,null,null),re=u(ne,4),ae=re[0],ie=re[1],le=re[2],ce=re[3],se=t.useMemo((function(){if(!R)return{scrollHeight:void 0,start:0,end:L.length-1,offset:void 0};var e;if(!P)return{scrollHeight:(null===(e=z.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:L.length-1,offset:void 0};for(var t,n,r,o=0,a=L.length,i=0;i<a;i+=1){var s=L[i],d=$(s),u=le.get(d),f=o+(void 0===u?c:u);f>=F&&void 0===t&&(t=i,n=o),f>F+l&&void 0===r&&(r=i),o=f}return void 0===t&&(t=0,n=0,r=Math.ceil(l/c)),void 0===r&&(r=L.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,L.length-1),offset:n}}),[P,R,F,L,ce,l]),de=se.scrollHeight,ue=se.start,fe=se.end,pe=se.offset;Z.current.start=ue,Z.current.end=fe;var he=u(t.useState({width:0,height:l}),2),me=he[0],ge=he[1],ve=(0,t.useRef)(),be=(0,t.useRef)(),ye=t.useMemo((function(){return IA(me.width,C)}),[me.width,C]),xe=t.useMemo((function(){return IA(me.height,de)}),[me.height,de]),we=de-l,Ce=(0,t.useRef)(we);Ce.current=we;var Se=F<=0,Ee=F>=we,ke=SA(Se,Ee),je=function(){return{x:M?-V:V,y:F}},Ie=(0,t.useRef)(je()),Te=Mr((function(){if(j){var e=je();Ie.current.x===e.x&&Ie.current.y===e.y||(j(e),Ie.current=e)}}));function Ae(e,t){var n=e;t?((0,Ea.flushSync)((function(){U(n)})),Te()):Q(n)}var Oe=function(e){var t=e,n=C-me.width;return t=Math.max(t,0),t=Math.min(t,n)},Ne=Mr((function(e,t){t?((0,Ea.flushSync)((function(){U((function(t){return Oe(t+(M?-e:e))}))})),Te()):Q((function(t){return t+e}))})),Re=u(EA(R,Se,Ee,!!C,Ne),2),Pe=Re[0],Me=Re[1];!function(e,n,r){var o,a=(0,t.useRef)(!1),i=(0,t.useRef)(0),l=(0,t.useRef)(null),c=(0,t.useRef)(null),s=function(e){if(a.current){var t=Math.ceil(e.touches[0].pageY),n=i.current-t;i.current=t,r(n)&&e.preventDefault(),clearInterval(c.current),c.current=setInterval((function(){(!r(n*=kA,!0)||Math.abs(n)<=.1)&&clearInterval(c.current)}),16)}},d=function(){a.current=!1,o()},u=function(e){o(),1!==e.touches.length||a.current||(a.current=!0,i.current=Math.ceil(e.touches[0].pageY),l.current=e.target,l.current.addEventListener("touchmove",s),l.current.addEventListener("touchend",d))};o=function(){l.current&&(l.current.removeEventListener("touchmove",s),l.current.removeEventListener("touchend",d))},fn((function(){return e&&n.current.addEventListener("touchstart",u),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchstart",u),o(),clearInterval(c.current)}}),[e])}(R,_,(function(e,t){return!ke(e,t)&&(Pe({preventDefault:function(){},deltaY:e}),!0)})),fn((function(){function e(e){R&&e.preventDefault()}var t=_.current;return t.addEventListener("wheel",Pe),t.addEventListener("DOMMouseScroll",Me),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",Pe),t.removeEventListener("DOMMouseScroll",Me),t.removeEventListener("MozMousePixelScroll",e)}}),[R]),fn((function(){C&&U((function(e){return Oe(e)}))}),[me.width,C]);var De=function(){var e,t;null===(e=ve.current)||void 0===e||e.delayHidden(),null===(t=be.current)||void 0===t||t.delayHidden()},Le=function(e,n,r,o,a,i,l,c){var s=t.useRef(),d=u(t.useState(null),2),p=d[0],h=d[1];return fn((function(){if(p&&p.times<xA){if(!e.current)return void h((function(e){return oe({},e)}));i();var t=p.targetAlign,c=p.originAlign,s=p.index,d=p.offset,u=e.current.clientHeight,f=!1,m=t,g=null;if(u){for(var v=t||c,b=0,y=0,x=0,w=Math.min(n.length-1,s),C=0;C<=w;C+=1){var S=a(n[C]);y=b;var E=r.get(S);b=x=y+(void 0===E?o:E)}for(var k="top"===v?d:u-d,j=w;j>=0;j-=1){var I=a(n[j]),T=r.get(I);if(void 0===T){f=!0;break}if((k-=T)<=0)break}switch(v){case"top":g=y-d;break;case"bottom":g=x-u+d;break;default:var A=e.current.scrollTop;y<A?m="top":x>A+u&&(m="bottom")}null!==g&&l(g),g!==p.lastTop&&(f=!0)}f&&h(oe(oe({},p),{},{times:p.times+1,targetAlign:m,lastTop:g}))}}),[p,e.current]),function(e){if(null!==e&&void 0!==e){if(Sa.cancel(s.current),"number"===typeof e)l(e);else if(e&&"object"===f(e)){var t,r=e.align;t="index"in e?e.index:n.findIndex((function(t){return a(t)===e.key}));var o=e.offset;h({times:0,index:t,offset:void 0===o?0:o,originAlign:r})}}else c()}}(_,L,le,c,$,(function(){return ie(!0)}),Q,De);t.useImperativeHandle(n,(function(){return{getScrollInfo:je,scrollTo:function(e){var t;(t=e)&&"object"===f(t)&&("left"in t||"top"in t)?(void 0!==e.left&&U(Oe(e.left)),Le(e.top)):Le(e)}}})),fn((function(){if(I){var e=L.slice(ue,fe+1);I(e,L)}}),[ue,fe,L]);var _e=function(e,n,r,o){var a=u(t.useMemo((function(){return[new Map,[]]}),[e,r.id,o]),2),i=a[0],l=a[1];return function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=i.get(t),s=i.get(a);if(void 0===c||void 0===s)for(var d=e.length,u=l.length;u<d;u+=1){var f,p=e[u],h=n(p);i.set(h,u);var m=null!==(f=r.get(h))&&void 0!==f?f:o;if(l[u]=(l[u-1]||0)+m,h===t&&(c=u),h===a&&(s=u),void 0!==c&&void 0!==s)break}return{top:l[c-1]||0,bottom:l[s]}}}(L,$,le,c),ze=null===A||void 0===A?void 0:A({start:ue,end:fe,virtual:P,offsetX:V,offsetY:pe,rtl:M,getSize:_e}),Be=function(e,n,r,o,a,i,l){var c=l.getKey;return e.slice(n,r+1).map((function(e,r){var l=i(e,n+r,{style:{width:o}}),s=c(e);return t.createElement(bA,{key:s,setRef:function(t){return a(e,t)}},l)}))}(L,ue,fe,C,ae,b,J),Fe=null;l&&(Fe=oe(h({},d?"height":"maxHeight",l),OA),R&&(Fe.overflowY="hidden",C&&(Fe.overflowX="hidden"),G&&(Fe.pointerEvents="none")));var He={};return M&&(He.dir="rtl"),t.createElement("div",a({style:oe(oe({},p),{},{position:"relative"}),className:D},He,N),t.createElement(as,{onResize:function(e){ge({width:e.width||e.offsetWidth,height:e.height||e.offsetHeight})}},t.createElement(E,{className:"".concat(o,"-holder"),style:Fe,ref:_,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==F&&Q(t),null===k||void 0===k||k(e),Te()},onMouseEnter:De},t.createElement(hA,{prefixCls:o,height:de,offsetX:V,offsetY:pe,scrollWidth:C,onInnerResize:ie,ref:z,innerProps:T,rtl:M,extra:ze},Be))),P&&de>l&&t.createElement(vA,{ref:ve,prefixCls:o,scrollOffset:F,scrollRange:de,rtl:M,onScroll:Ae,onStartMove:X,onStopMove:Y,spinSize:xe,containerSize:me.height,style:null===O||void 0===O?void 0:O.verticalScrollBar,thumbStyle:null===O||void 0===O?void 0:O.verticalScrollBarThumb}),P&&C>me.width&&t.createElement(vA,{ref:be,prefixCls:o,scrollOffset:V,scrollRange:C,rtl:M,onScroll:Ae,onStartMove:X,onStopMove:Y,spinSize:ye,containerSize:me.width,horizontal:!0,style:null===O||void 0===O?void 0:O.horizontalScrollBar,thumbStyle:null===O||void 0===O?void 0:O.horizontalScrollBarThumb}))}var RA=t.forwardRef(NA);RA.displayName="List";const PA=RA;var MA=["disabled","title","children","style","className"];function DA(e){return"string"===typeof e||"number"===typeof e}var LA=function(e,n){var r=t.useContext(_T),o=r.prefixCls,i=r.id,l=r.open,c=r.multiple,s=r.mode,d=r.searchValue,f=r.toggleOpen,p=r.notFoundContent,g=r.onPopupScroll,b=t.useContext(rA),y=b.maxCount,x=b.flattenOptions,w=b.onActiveValue,C=b.defaultActiveFirstOption,S=b.onSelect,E=b.menuItemSelectedIcon,k=b.rawValues,j=b.fieldNames,I=b.virtual,T=b.direction,A=b.listHeight,O=b.listItemHeight,N=b.optionRender,R="".concat(o,"-item"),P=It((function(){return x}),[l,x],(function(e,t){return t[0]&&e[1]!==t[1]})),M=t.useRef(null),D=t.useMemo((function(){return c&&"undefined"!==typeof y&&(null===k||void 0===k?void 0:k.size)>=y}),[c,y,null===k||void 0===k?void 0:k.size]),L=function(e){e.preventDefault()},_=function(e){var t;null===(t=M.current)||void 0===t||t.scrollTo("number"===typeof e?{index:e}:e)},z=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=P.length,r=0;r<n;r+=1){var o=(e+r*t+n)%n,a=P[o]||{},i=a.group,l=a.data;if(!i&&(null===l||void 0===l||!l.disabled)&&!D)return o}return-1},B=u(t.useState((function(){return z(0)})),2),F=B[0],H=B[1],W=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];H(e);var n={source:t?"keyboard":"mouse"},r=P[e];r?w(r.value,e,n):w(null,-1,n)};(0,t.useEffect)((function(){W(!1!==C?z(0):-1)}),[P.length,d]);var V=t.useCallback((function(e){return k.has(e)&&"combobox"!==s}),[s,nt(k).toString(),k.size]);(0,t.useEffect)((function(){var e,t=setTimeout((function(){if(!c&&l&&1===k.size){var e=Array.from(k)[0],t=P.findIndex((function(t){return t.data.value===e}));-1!==t&&(W(t),_(t))}}));l&&(null===(e=M.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[l,d]);var U=function(e){void 0!==e&&S(e,{selected:!k.has(e)}),c||f(!1)};if(t.useImperativeHandle(n,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case Vd.N:case Vd.P:case Vd.UP:case Vd.DOWN:var r=0;if(t===Vd.UP?r=-1:t===Vd.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===Vd.N?r=1:t===Vd.P&&(r=-1)),0!==r){var o=z(F+r,r);_(o),W(o,!0)}break;case Vd.ENTER:var a,i=P[F];!i||null!==i&&void 0!==i&&null!==(a=i.data)&&void 0!==a&&a.disabled||D?U(void 0):U(i.value),l&&e.preventDefault();break;case Vd.ESC:f(!1),l&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){_(e)}}})),0===P.length)return t.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(R,"-empty"),onMouseDown:L},p);var K=Object.keys(j).map((function(e){return j[e]})),G=function(e){return e.label};function q(e,t){return{role:e.group?"presentation":"option",id:"".concat(i,"_list_").concat(t)}}var X=function(e){var n=P[e];if(!n)return null;var r=n.data||{},o=r.value,i=n.group,l=hx(r,!0),c=G(n);return n?t.createElement("div",a({"aria-label":"string"!==typeof c||i?null:c},l,{key:e},q(n,e),{"aria-selected":V(o)}),o):null},Y={role:"listbox",id:"".concat(i,"_list")};return t.createElement(t.Fragment,null,I&&t.createElement("div",a({},Y,{style:{height:0,width:0,overflow:"hidden"}}),X(F-1),X(F),X(F+1)),t.createElement(PA,{itemKey:"key",ref:M,data:P,height:A,itemHeight:O,fullHeight:!1,onMouseDown:L,onScroll:g,virtual:I,direction:T,innerProps:I?null:Y},(function(e,n){var r,o=e.group,i=e.groupOption,l=e.data,c=e.label,s=e.value,d=l.key;if(o){var u,f=null!==(u=l.title)&&void 0!==u?u:DA(c)?c.toString():void 0;return t.createElement("div",{className:v()(R,"".concat(R,"-group")),title:f},void 0!==c?c:d)}var p=l.disabled,g=l.title,b=(l.children,l.style),y=l.className,x=rt(m(l,MA),K),w=V(s),C=p||!w&&D,S="".concat(R,"-option"),k=v()(R,S,y,(h(r={},"".concat(S,"-grouped"),i),h(r,"".concat(S,"-active"),F===n&&!C),h(r,"".concat(S,"-disabled"),C),h(r,"".concat(S,"-selected"),w),r)),j=G(e),T=!E||"function"===typeof E||w,A="number"===typeof j?j:j||s,O=DA(A)?A.toString():void 0;return void 0!==g&&(O=g),t.createElement("div",a({},hx(x),I?{}:q(e,n),{"aria-selected":w,className:k,title:O,onMouseMove:function(){F===n||C||W(n)},onClick:function(){C||U(s)},style:b}),t.createElement("div",{className:"".concat(S,"-content")},"function"===typeof N?N(e,{index:n}):A),t.isValidElement(E)||w,T&&t.createElement(LT,{className:"".concat(R,"-option-state"),customizeIcon:E,customizeIconProps:{value:s,disabled:C,isSelected:w}},w?"\u2713":null))})))};const _A=t.forwardRef(LA);function zA(e,t){return HT(e).join("").toUpperCase().includes(t)}var BA=0,FA=ae();function HA(e){var n=u(t.useState(),2),r=n[0],o=n[1];return t.useEffect((function(){o("rc_select_".concat(function(){var e;return FA?(e=BA,BA+=1):e="TEST_OR_SSR",e}()))}),[]),e||r}var WA=["children","value"],VA=["children"];function UA(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return st(e).map((function(e,r){if(!t.isValidElement(e)||!e.type)return null;var o=e,a=o.type.isSelectOptGroup,i=o.key,l=o.props,c=l.children,s=m(l,VA);return n||!a?function(e){var t=e,n=t.key,r=t.props,o=r.children,a=r.value;return oe({key:n,value:void 0!==a?a:n,children:o},m(r,WA))}(e):oe(oe({key:"__RC_SELECT_GRP__".concat(null===i?r:i,"__"),label:i},s),{},{options:UA(c)})})).filter((function(e){return e}))}const KA=function(e,n,r,o,a){return t.useMemo((function(){var t=e;!e&&(t=UA(n));var i=new Map,l=new Map,c=function(e,t,n){n&&"string"===typeof n&&e.set(t[n],t)};return function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=0;s<t.length;s+=1){var d=t[s];!d[r.options]||n?(i.set(d[r.value],d),c(l,d,r.label),c(l,d,o),c(l,d,a)):e(d[r.options],!0)}}(t),{options:t,valueOptions:i,labelOptions:l}}),[e,n,r,o,a])};function GA(e){var n=t.useRef();n.current=e;var r=t.useCallback((function(){return n.current.apply(n,arguments)}),[]);return r}var qA=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange","maxCount"],XA=["inputValue"];var YA=t.forwardRef((function(e,n){var r=e.id,o=e.mode,i=e.prefixCls,l=void 0===i?"rc-select":i,c=e.backfill,s=e.fieldNames,d=e.inputValue,p=e.searchValue,g=e.onSearch,v=e.autoClearSearchValue,b=void 0===v||v,y=e.onSelect,x=e.onDeselect,w=e.dropdownMatchSelectWidth,C=void 0===w||w,S=e.filterOption,E=e.filterSort,k=e.optionFilterProp,j=e.optionLabelProp,I=e.options,T=e.optionRender,A=e.children,O=e.defaultActiveFirstOption,N=e.menuItemSelectedIcon,R=e.virtual,P=e.direction,M=e.listHeight,D=void 0===M?200:M,L=e.listItemHeight,_=void 0===L?20:L,z=e.value,B=e.defaultValue,F=e.labelInValue,H=e.onChange,W=e.maxCount,V=m(e,qA),U=HA(r),K=iA(o),G=!(I||!A),q=t.useMemo((function(){return(void 0!==S||"combobox"!==o)&&S}),[S,o]),X=t.useMemo((function(){return tA(s,G)}),[JSON.stringify(s),G]),Y=u(_r("",{value:void 0!==p?p:d,postState:function(e){return e||""}}),2),$=Y[0],J=Y[1],Q=KA(I,A,X,k,j),Z=Q.valueOptions,ee=Q.labelOptions,te=Q.options,ne=t.useCallback((function(e){return HT(e).map((function(e){var t,n,r,o,a,i;(function(e){return!e||"object"!==f(e)})(e)?t=e:(r=e.key,n=e.label,t=null!==(i=e.value)&&void 0!==i?i:r);var l,c=Z.get(t);c&&(void 0===n&&(n=null===c||void 0===c?void 0:c[j||X.label]),void 0===r&&(r=null!==(l=null===c||void 0===c?void 0:c.key)&&void 0!==l?l:t),o=null===c||void 0===c?void 0:c.disabled,a=null===c||void 0===c?void 0:c.title);return{label:n,value:t,key:r,disabled:o,title:a}}))}),[X,j,Z]),re=u(_r(B,{value:z}),2),ae=re[0],ie=re[1],le=t.useMemo((function(){var e,t=ne(K&&null===ae?[]:ae);return"combobox"===o&&function(e){return!e&&0!==e}(null===(e=t[0])||void 0===e?void 0:e.value)?[]:t}),[ae,ne,o,K]),ce=function(e,n){var r=t.useRef({values:new Map,options:new Map});return[t.useMemo((function(){var t=r.current,o=t.values,a=t.options,i=e.map((function(e){var t;return void 0===e.label?oe(oe({},e),{},{label:null===(t=o.get(e.value))||void 0===t?void 0:t.label}):e})),l=new Map,c=new Map;return i.forEach((function(e){l.set(e.value,e),c.set(e.value,n.get(e.value)||a.get(e.value))})),r.current.values=l,r.current.options=c,i}),[e,n]),t.useCallback((function(e){return n.get(e)||r.current.options.get(e)}),[n])]}(le,Z),se=u(ce,2),de=se[0],ue=se[1],fe=t.useMemo((function(){if(!o&&1===de.length){var e=de[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return de.map((function(e){var t;return oe(oe({},e),{},{label:null!==(t=e.label)&&void 0!==t?t:e.value})}))}),[o,de]),pe=t.useMemo((function(){return new Set(de.map((function(e){return e.value})))}),[de]);t.useEffect((function(){if("combobox"===o){var e,t=null===(e=de[0])||void 0===e?void 0:e.value;J(function(e){return void 0!==e&&null!==e}(t)?String(t):"")}}),[de]);var he=GA((function(e,t){var n,r=null!==t&&void 0!==t?t:e;return h(n={},X.value,e),h(n,X.label,r),n})),me=function(e,n,r,o,a){return t.useMemo((function(){if(!r||!1===o)return e;var t=n.options,i=n.label,l=n.value,c=[],s="function"===typeof o,d=r.toUpperCase(),u=s?o:function(e,n){return a?zA(n[a],d):n[t]?zA(n["children"!==i?i:"label"],d):zA(n[l],d)},f=s?function(e){return nA(e)}:function(e){return e};return e.forEach((function(e){if(e[t])if(u(r,f(e)))c.push(e);else{var n=e[t].filter((function(e){return u(r,f(e))}));n.length&&c.push(oe(oe({},e),{},h({},t,n)))}else u(r,f(e))&&c.push(e)})),c}),[e,o,a,r,n])}(t.useMemo((function(){if("tags"!==o)return te;var e=nt(te);return nt(de).sort((function(e,t){return e.value<t.value?-1:1})).forEach((function(t){var n=t.value;(function(e){return Z.has(e)})(n)||e.push(he(n,t.label))})),e}),[he,te,Z,de,o]),X,$,q,k),ge=t.useMemo((function(){return"tags"!==o||!$||me.some((function(e){return e[k||"value"]===$}))||me.some((function(e){return e[X.value]===$}))?me:[he($)].concat(nt(me))}),[he,k,o,me,$,X]),ve=t.useMemo((function(){return E?nt(ge).sort((function(e,t){return E(e,t)})):ge}),[ge,E]),be=t.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,o=[],a=tA(n,!1),i=a.label,l=a.value,c=a.options,s=a.groupLabel;return function e(t,n){Array.isArray(t)&&t.forEach((function(t){if(n||!(c in t)){var a=t[l];o.push({key:eA(t,o.length),groupOption:n,data:t,label:t[i],value:a})}else{var d=t[s];void 0===d&&r&&(d=t.label),o.push({key:eA(t,o.length),group:!0,data:t,label:d}),e(t[c],!0)}}))}(e,!1),o}(ve,{fieldNames:X,childrenAsData:G})}),[ve,X,G]),ye=function(e){var t=ne(e);if(ie(t),H&&(t.length!==de.length||t.some((function(e,t){var n;return(null===(n=de[t])||void 0===n?void 0:n.value)!==(null===e||void 0===e?void 0:e.value)})))){var n=F?t:t.map((function(e){return e.value})),r=t.map((function(e){return nA(ue(e.value))}));H(K?n:n[0],K?r:r[0])}},xe=u(t.useState(null),2),we=xe[0],Ce=xe[1],Se=u(t.useState(0),2),Ee=Se[0],ke=Se[1],je=void 0!==O?O:"combobox"!==o,Ie=t.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,r=void 0===n?"keyboard":n;ke(t),c&&"combobox"===o&&null!==e&&"keyboard"===r&&Ce(String(e))}),[c,o]),Te=function(e,t,n){var r=function(){var t,n=ue(e);return[F?{label:null===n||void 0===n?void 0:n[X.label],value:e,key:null!==(t=null===n||void 0===n?void 0:n.key)&&void 0!==t?t:e}:e,nA(n)]};if(t&&y){var o=u(r(),2),a=o[0],i=o[1];y(a,i)}else if(!t&&x&&"clear"!==n){var l=u(r(),2),c=l[0],s=l[1];x(c,s)}},Ae=GA((function(e,t){var n,r=!K||t.selected;n=r?K?[].concat(nt(de),[e]):[e]:de.filter((function(t){return t.value!==e})),ye(n),Te(e,r),"combobox"===o?Ce(""):iA&&!b||(J(""),Ce(""))})),Oe=t.useMemo((function(){var e=!1!==R&&!1!==C;return oe(oe({},Q),{},{flattenOptions:be,onActiveValue:Ie,defaultActiveFirstOption:je,onSelect:Ae,menuItemSelectedIcon:N,rawValues:pe,fieldNames:X,virtual:e,direction:P,listHeight:D,listItemHeight:_,childrenAsData:G,maxCount:W,optionRender:T})}),[W,Q,be,Ie,je,Ae,N,pe,X,R,C,P,D,_,G,T]);return t.createElement(rA.Provider,{value:Oe},t.createElement(cA,a({},V,{id:U,prefixCls:l,ref:n,omitDomProps:XA,mode:o,displayValues:fe,onDisplayValuesChange:function(e,t){ye(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){Te(e.value,!1,n)}))},direction:P,searchValue:$,onSearch:function(e,t){if(J(e),Ce(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===o&&ye(e),null===g||void 0===g||g(e));else{var n=(e||"").trim();if(n){var r=Array.from(new Set([].concat(nt(pe),[n])));ye(r),Te(n,!0),J("")}}},autoClearSearchValue:b,onSearchSplit:function(e){var t=e;"tags"!==o&&(t=e.map((function(e){var t=ee.get(e);return null===t||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat(nt(pe),nt(t))));ye(n),n.forEach((function(e){Te(e,!0)}))},dropdownMatchSelectWidth:C,OptionList:_A,emptyOptions:!be.length,activeValue:we,activeDescendantId:"".concat(U,"_list_").concat(Ee)})))}));var $A=YA;$A.Option=fA,$A.OptGroup=dA;const JA=$A;const QA=()=>{const[,e]=jo(),n=new ao(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return t.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{fill:"none",fillRule:"evenodd"},t.createElement("g",{transform:"translate(24 31.67)"},t.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),t.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),t.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),t.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),t.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),t.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),t.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},t.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),t.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};const ZA=()=>{const[,e]=jo(),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:a}=e,{borderColor:i,shadowColor:l,contentColor:c}=(0,t.useMemo)((()=>({borderColor:new ao(n).onBackground(a).toHexShortString(),shadowColor:new ao(r).onBackground(a).toHexShortString(),contentColor:new ao(o).onBackground(a).toHexShortString()})),[n,r,o,a]);return t.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},t.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),t.createElement("g",{fillRule:"nonzero",stroke:i},t.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),t.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:c}))))},eO=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:a,lineHeight:i}=e;return{[t]:{marginInline:r,fontSize:a,lineHeight:i,textAlign:"center",["".concat(t,"-image")]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},["".concat(t,"-description")]:{color:e.colorText},["".concat(t,"-footer")]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDisabled,["".concat(t,"-description")]:{color:e.colorTextDisabled},["".concat(t,"-image")]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDisabled,["".concat(t,"-image")]:{height:e.emptyImgHeightSM}}}}},tO=$o("Empty",(e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=Ho(e,{emptyImgCls:"".concat(t,"-img"),emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[eO(o)]}));var nO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const rO=t.createElement(QA,null),oO=t.createElement(ZA,null),aO=e=>{var{className:n,rootClassName:r,prefixCls:o,image:a=rO,description:i,children:l,imageStyle:c,style:s}=e,d=nO(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:u,direction:f,empty:p}=t.useContext(at),h=u("empty",o),[m,g,b]=tO(h),[y]=nx("Empty"),x="undefined"!==typeof i?i:null===y||void 0===y?void 0:y.description,w="string"===typeof x?x:"empty";let C=null;return C="string"===typeof a?t.createElement("img",{alt:w,src:a}):a,m(t.createElement("div",Object.assign({className:v()(g,b,h,null===p||void 0===p?void 0:p.className,{["".concat(h,"-normal")]:a===oO,["".concat(h,"-rtl")]:"rtl"===f},n,r),style:Object.assign(Object.assign({},null===p||void 0===p?void 0:p.style),s)},d),t.createElement("div",{className:"".concat(h,"-image"),style:c},C),x&&t.createElement("div",{className:"".concat(h,"-description")},x),l&&t.createElement("div",{className:"".concat(h,"-footer")},l)))};aO.PRESENTED_IMAGE_DEFAULT=rO,aO.PRESENTED_IMAGE_SIMPLE=oO;const iO=aO,lO=e=>{const{componentName:n}=e,{getPrefixCls:r}=(0,t.useContext)(at),o=r("empty");switch(n){case"Table":case"List":return t.createElement(iO,{image:iO.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return t.createElement(iO,{image:iO.PRESENTED_IMAGE_SIMPLE,className:"".concat(o,"-small")});default:return t.createElement(iO,null)}};const cO=function(e,t){return e||(e=>{const t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}})(t)},sO=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},dO=e=>{const{antCls:t,componentCls:n}=e,r="".concat(n,"-item"),o="&".concat(t,"-slide-up-enter").concat(t,"-slide-up-enter-active"),a="&".concat(t,"-slide-up-appear").concat(t,"-slide-up-appear-active"),i="&".concat(t,"-slide-up-leave").concat(t,"-slide-up-leave-active"),l="".concat(n,"-dropdown-placement-");return[{["".concat(n,"-dropdown")]:Object.assign(Object.assign({},$r(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,["\n          ".concat(o).concat(l,"bottomLeft,\n          ").concat(a).concat(l,"bottomLeft\n        ")]:{animationName:Fp},["\n          ".concat(o).concat(l,"topLeft,\n          ").concat(a).concat(l,"topLeft,\n          ").concat(o).concat(l,"topRight,\n          ").concat(a).concat(l,"topRight\n        ")]:{animationName:Wp},["".concat(i).concat(l,"bottomLeft")]:{animationName:Hp},["\n          ".concat(i).concat(l,"topLeft,\n          ").concat(i).concat(l,"topRight\n        ")]:{animationName:Vp},"&-hidden":{display:"none"},["".concat(r)]:Object.assign(Object.assign({},sO(e)),{cursor:"pointer",transition:"background ".concat(e.motionDurationSlow," ease"),borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Yr),"&-state":{flex:"none",display:"flex",alignItems:"center"},["&-active:not(".concat(r,"-option-disabled)")]:{backgroundColor:e.optionActiveBg},["&-selected:not(".concat(r,"-option-disabled)")]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,["".concat(r,"-option-state")]:{color:e.colorPrimary},["&:has(+ ".concat(r,"-option-selected:not(").concat(r,"-option-disabled))")]:{borderEndStartRadius:0,borderEndEndRadius:0,["& + ".concat(r,"-option-selected:not(").concat(r,"-option-disabled)")]:{borderStartStartRadius:0,borderStartEndRadius:0}}},"&-disabled":{["&".concat(r,"-option-selected")]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},sO(e)),{color:e.colorTextDisabled})}),"&-rtl":{direction:"rtl"}})},Yp(e,"slide-up"),Yp(e,"slide-down"),xh(e,"move-up"),xh(e,"move-down")]},uO=(e,t)=>{const{componentCls:n,iconCls:r}=e,o="".concat(n,"-selection-overflow"),a=e.multipleSelectItemHeight,i=(e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()})(e),l=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-multiple").concat(l)]:{[o]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},["".concat(n,"-selector")]:{display:"flex",flexWrap:"wrap",alignItems:"center",height:"100%",paddingInline:e.calc(2).mul(2).equal(),paddingBlock:e.calc(i).sub(2).equal(),borderRadius:e.borderRadius,["".concat(n,"-disabled&")]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:"".concat(rn(2)," 0"),lineHeight:rn(a),visibility:"hidden",content:'"\\a0"'}},["".concat(n,"-selection-item")]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:a,marginTop:2,marginBottom:2,lineHeight:rn(e.calc(a).sub(e.calc(e.lineWidth).mul(2)).equal()),borderRadius:e.borderRadiusSM,cursor:"default",transition:"font-size ".concat(e.motionDurationSlow,", line-height ").concat(e.motionDurationSlow,", height ").concat(e.motionDurationSlow),marginInlineEnd:e.calc(2).mul(2).equal(),paddingInlineStart:e.paddingXS,paddingInlineEnd:e.calc(e.paddingXS).div(2).equal(),["".concat(n,"-disabled&")]:{color:e.multipleItemColorDisabled,borderColor:e.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(e.paddingXS).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{display:"inline-flex",alignItems:"center",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",["> ".concat(r)]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},["".concat(o,"-item + ").concat(o,"-item")]:{["".concat(n,"-selection-search")]:{marginInlineStart:0}},["".concat(o,"-item-suffix")]:{height:"100%"},["".concat(n,"-selection-search")]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(i).equal(),"\n          &-input,\n          &-mirror\n        ":{height:a,fontFamily:e.fontFamily,lineHeight:rn(a),transition:"all ".concat(e.motionDurationSlow)},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},["".concat(n,"-selection-placeholder")]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:"all ".concat(e.motionDurationSlow)}}}};function fO(e,t){const{componentCls:n}=e,r=t?"".concat(n,"-").concat(t):"",o={["".concat(n,"-multiple").concat(r)]:{fontSize:e.fontSize,["".concat(n,"-selector")]:{["".concat(n,"-show-search&")]:{cursor:"text"}},["\n        &".concat(n,"-show-arrow ").concat(n,"-selector,\n        &").concat(n,"-allow-clear ").concat(n,"-selector\n      ")]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[uO(e,t),o]}const pO=e=>{const{componentCls:t}=e,n=Ho(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=Ho(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[fO(e),fO(n,"sm"),{["".concat(t,"-multiple").concat(t,"-sm")]:{["".concat(t,"-selection-placeholder")]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},["".concat(t,"-selection-search")]:{marginInlineStart:2}}},fO(r,"lg")]};function hO(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),i=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-single").concat(i)]:{fontSize:e.fontSize,height:e.controlHeight,["".concat(n,"-selector")]:Object.assign(Object.assign({},$r(e,!0)),{display:"flex",borderRadius:o,["".concat(n,"-selection-search")]:{position:"absolute",top:0,insetInlineStart:r,insetInlineEnd:r,bottom:0,"&-input":{width:"100%",WebkitAppearance:"textfield"}},["\n          ".concat(n,"-selection-item,\n          ").concat(n,"-selection-placeholder\n        ")]:{padding:0,lineHeight:rn(a),transition:"all ".concat(e.motionDurationSlow,", visibility 0s"),alignSelf:"center"},["".concat(n,"-selection-placeholder")]:{transition:"none",pointerEvents:"none"},[["&:after","".concat(n,"-selection-item:empty:after"),"".concat(n,"-selection-placeholder:empty:after")].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),["\n        &".concat(n,"-show-arrow ").concat(n,"-selection-item,\n        &").concat(n,"-show-arrow ").concat(n,"-selection-placeholder\n      ")]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},["&".concat(n,"-open ").concat(n,"-selection-item")]:{color:e.colorTextPlaceholder},["&:not(".concat(n,"-customize-input)")]:{["".concat(n,"-selector")]:{width:"100%",height:"100%",padding:"0 ".concat(rn(r)),["".concat(n,"-selection-search-input")]:{height:a},"&:after":{lineHeight:rn(a)}}},["&".concat(n,"-customize-input")]:{["".concat(n,"-selector")]:{"&:after":{display:"none"},["".concat(n,"-selection-search")]:{position:"static",width:"100%"},["".concat(n,"-selection-placeholder")]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:"0 ".concat(rn(r)),"&:after":{display:"none"}}}}}}}function mO(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[hO(e),hO(Ho(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{["".concat(t,"-single").concat(t,"-sm")]:{["&:not(".concat(t,"-customize-input)")]:{["".concat(t,"-selection-search")]:{insetInlineStart:n,insetInlineEnd:n},["".concat(t,"-selector")]:{padding:"0 ".concat(rn(n))},["&".concat(t,"-show-arrow ").concat(t,"-selection-search")]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},["\n            &".concat(t,"-show-arrow ").concat(t,"-selection-item,\n            &").concat(t,"-show-arrow ").concat(t,"-selection-placeholder\n          ")]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},hO(Ho(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const gO=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(t.borderColor),background:e.selectorBg},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{borderColor:t.hoverBorderHover},["".concat(n,"-focused& ").concat(n,"-selector")]:{borderColor:t.activeBorderColor,boxShadow:"0 0 0 ".concat(rn(o)," ").concat(t.activeShadowColor),outline:0}}}},vO=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},gO(e,t))}),bO=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},gO(e,{borderColor:e.colorBorder,hoverBorderHover:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadowColor:e.controlOutline})),vO(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeShadowColor:e.colorErrorOutline})),vO(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeShadowColor:e.colorWarningOutline})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}})}),yO=(e,t)=>{const{componentCls:n,antCls:r}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{background:t.bg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," transparent"),color:t.color},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{background:t.hoverBg},["".concat(n,"-focused& ").concat(n,"-selector")]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},xO=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},yO(e,t))}),wO=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},yO(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.colorPrimary,color:e.colorText})),xO(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),xO(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.colorBgContainer,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}})}),CO=e=>({"&-borderless":{["".concat(e.componentCls,"-selector")]:{background:"transparent",borderColor:"transparent"},["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}}}),SO=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign({},bO(e)),wO(e)),CO(e))}),EO=e=>{const{componentCls:t}=e;return{position:"relative",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),input:{cursor:"pointer"},["".concat(t,"-show-search&")]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},["".concat(t,"-disabled&")]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},kO=e=>{const{componentCls:t}=e;return{["".concat(t,"-selection-search-input")]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},jO=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=e;return{[n]:Object.assign(Object.assign({},$r(e)),{position:"relative",display:"inline-block",cursor:"pointer",["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:Object.assign(Object.assign({},EO(e)),kO(e)),["".concat(n,"-selection-item")]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Yr),{["> ".concat(t,"-typography")]:{display:"inline"}}),["".concat(n,"-selection-placeholder")]:Object.assign(Object.assign({},Yr),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),["".concat(n,"-arrow")]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:"opacity ".concat(e.motionDurationSlow," ease"),[o]:{verticalAlign:"top",transition:"transform ".concat(e.motionDurationSlow),"> svg":{verticalAlign:"top"},["&:not(".concat(n,"-suffix)")]:{pointerEvents:"auto"}},["".concat(n,"-disabled &")]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),["".concat(n,"-clear")]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:"color ".concat(e.motionDurationMid," ease, opacity ").concat(e.motionDurationSlow," ease"),textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{["".concat(n,"-clear")]:{opacity:1},["".concat(n,"-arrow:not(:last-child)")]:{opacity:0}}}),["".concat(n,"-has-feedback")]:{["".concat(n,"-clear")]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}},IO=e=>{const{componentCls:t}=e;return[{[t]:{["&".concat(t,"-in-form-item")]:{width:"100%"}}},jO(e),mO(e),pO(e),dO(e),{["".concat(t,"-rtl")]:{direction:"rtl"}},Jl(e,{borderElCls:"".concat(t,"-selector"),focusElCls:"".concat(t,"-focused")})]},TO=$o("Select",((e,t)=>{let{rootPrefixCls:n}=t;const r=Ho(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[IO(r),SO(r)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:r,controlPaddingHorizontal:o,zIndexPopupBase:a,colorText:i,fontWeightStrong:l,controlItemBgActive:c,controlItemBgHover:s,colorBgContainer:d,colorFillSecondary:u,controlHeightLG:f,controlHeightSM:p,colorBgContainerDisabled:h,colorTextDisabled:m}=e;return{zIndexPopup:a+50,optionSelectedColor:i,optionSelectedFontWeight:l,optionSelectedBg:c,optionActiveBg:s,optionPadding:"".concat((r-t*n)/2,"px ").concat(o,"px"),optionFontSize:t,optionLineHeight:n,optionHeight:r,selectorBg:d,clearBg:d,singleItemHeightLG:f,multipleItemBg:u,multipleItemBorderColor:"transparent",multipleItemHeight:p,multipleItemHeightLG:r,multipleSelectorBgDisabled:h,multipleItemColorDisabled:m,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize)}}),{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});const AO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var OO=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:AO}))};const NO=t.forwardRef(OO);const RO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var PO=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:RO}))};const MO=t.forwardRef(PO);function DO(e){let{suffixIcon:n,clearIcon:r,menuItemSelectedIcon:o,removeIcon:a,loading:i,multiple:l,hasFeedback:c,prefixCls:s,showSuffixIcon:d,feedbackIcon:u,showArrow:f,componentName:p}=e;const h=null!==r&&void 0!==r?r:t.createElement(Yy,null),m=e=>null!==n||c||f?t.createElement(t.Fragment,null,!1!==d&&e,c&&u):null;let g=null;if(void 0!==n)g=m(n);else if(i)g=m(t.createElement(yl,{spin:!0}));else{const e="".concat(s,"-suffix");g=n=>{let{open:r,showSearch:o}=n;return m(r&&o?t.createElement(uj,{className:e}):t.createElement(MO,{className:e}))}}let v=null;v=void 0!==o?o:l?t.createElement(NO,null):null;let b=null;return b=void 0!==a?a:t.createElement(zg,null),{clearIcon:h,suffixIcon:g,itemIcon:v,removeIcon:b}}var LO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const _O="SECRET_COMBOBOX_MODE_DO_NOT_USE",zO=(e,n)=>{var r;const{prefixCls:o,bordered:a,className:i,rootClassName:l,getPopupContainer:c,popupClassName:s,dropdownClassName:d,listHeight:u=256,placement:f,listItemHeight:p,size:h,disabled:m,notFoundContent:g,status:b,builtinPlacements:y,dropdownMatchSelectWidth:x,popupMatchSelectWidth:w,direction:C,style:S,allowClear:E,variant:k,dropdownStyle:j,transitionName:I,tagRender:T,maxCount:A}=e,O=LO(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount"]),{getPopupContainer:N,getPrefixCls:R,renderEmpty:P,direction:M,virtual:D,popupMatchSelectWidth:L,popupOverflow:_,select:z}=t.useContext(at),[,B]=jo(),F=null!==p&&void 0!==p?p:null===B||void 0===B?void 0:B.controlHeight,H=R("select",o),W=R(),V=null!==C&&void 0!==C?C:M,{compactSize:U,compactItemClassnames:K}=nl(H,V),[G,q]=qk(k,a),X=lh(H),[Y,$,J]=TO(H,X),Q=t.useMemo((()=>{const{mode:t}=e;if("combobox"!==t)return t===_O?"combobox":t}),[e.mode]),Z="multiple"===Q||"tags"===Q,ee=function(e,t){return void 0!==t?t:null!==e}(e.suffixIcon,e.showArrow),te=null!==(r=null!==w&&void 0!==w?w:x)&&void 0!==r?r:L,{status:ne,hasFeedback:re,isFormItemInput:oe,feedbackIcon:ae}=t.useContext(Xw),ie=Uk(ne,b);let le;le=void 0!==g?g:"combobox"===Q?null:(null===P||void 0===P?void 0:P("Select"))||t.createElement(lO,{componentName:"Select"});const{suffixIcon:ce,itemIcon:se,removeIcon:de,clearIcon:ue}=DO(Object.assign(Object.assign({},O),{multiple:Z,hasFeedback:re,feedbackIcon:ae,showSuffixIcon:ee,prefixCls:H,componentName:"Select"})),fe=!0===E?{clearIcon:ue}:E,pe=rt(O,["suffixIcon","itemIcon"]),he=v()(s||d,{["".concat(H,"-dropdown-").concat(V)]:"rtl"===V},l,J,X,$),me=Yi((e=>{var t;return null!==(t=null!==h&&void 0!==h?h:U)&&void 0!==t?t:e})),ge=t.useContext(Ki),ve=null!==m&&void 0!==m?m:ge,be=v()({["".concat(H,"-lg")]:"large"===me,["".concat(H,"-sm")]:"small"===me,["".concat(H,"-rtl")]:"rtl"===V,["".concat(H,"-").concat(G)]:q,["".concat(H,"-in-form-item")]:oe},Vk(H,ie,re),K,null===z||void 0===z?void 0:z.className,i,l,J,X,$),ye=t.useMemo((()=>void 0!==f?f:"rtl"===V?"bottomRight":"bottomLeft"),[f,V]);const[xe]=Gs("SelectLike",null===j||void 0===j?void 0:j.zIndex);return Y(t.createElement(JA,Object.assign({ref:n,virtual:D,showSearch:null===z||void 0===z?void 0:z.showSearch},pe,{style:Object.assign(Object.assign({},null===z||void 0===z?void 0:z.style),S),dropdownMatchSelectWidth:te,transitionName:Js(W,"slide-up",I),builtinPlacements:cO(y,_),listHeight:u,listItemHeight:F,mode:Q,prefixCls:H,placement:ye,direction:V,suffixIcon:ce,menuItemSelectedIcon:se,removeIcon:de,allowClear:fe,notFoundContent:le,className:be,getPopupContainer:c||N,dropdownClassName:he,disabled:ve,dropdownStyle:Object.assign(Object.assign({},j),{zIndex:xe}),maxCount:Z?A:void 0,tagRender:Z?T:void 0})))};const BO=t.forwardRef(zO),FO=Pu(BO);BO.SECRET_COMBOBOX_MODE_DO_NOT_USE=_O,BO.Option=fA,BO.OptGroup=dA,BO._InternalPanelDoNotUseOrYouWillBeFired=FO;const HO=BO;const WO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};var VO=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:WO}))};const UO=t.forwardRef(VO);function KO(){return"function"===typeof BigInt}function GO(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function qO(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var r=t||"0",o=r.split("."),a=o[0]||"0",i=o[1]||"0";"0"===a&&"0"===i&&(n=!1);var l=n?"-":"";return{negative:n,negativeStr:l,trimStr:r,integerStr:a,decimalStr:i,fullStr:"".concat(l).concat(r)}}function XO(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function YO(e){var t=String(e);if(XO(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return null!==r&&void 0!==r&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&JO(t)?t.length-t.indexOf(".")-1:0}function $O(e){var t=String(e);if(XO(e)){if(e>Number.MAX_SAFE_INTEGER)return String(KO()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(KO()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(YO(t))}return qO(t).fullStr}function JO(e){return"number"===typeof e?!Number.isNaN(e):!!e&&(/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e))}var QO=function(){function e(t){if(At(this,e),h(this,"origin",""),h(this,"negative",void 0),h(this,"integer",void 0),h(this,"decimal",void 0),h(this,"decimalLen",void 0),h(this,"empty",void 0),h(this,"nan",void 0),GO(t))this.empty=!0;else if(this.origin=String(t),"-"===t||Number.isNaN(t))this.nan=!0;else{var n=t;if(XO(n)&&(n=Number(n)),JO(n="string"===typeof n?n:$O(n))){var r=qO(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var a=o[1]||"0";this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}}return Nt(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(e){var t="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(e,"0"));return BigInt(t)}},{key:"negate",value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:"cal",value:function(t,n,r){var o=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(o),t.alignDecimal(o)).toString(),i=r(o),l=qO(a),c=l.negativeStr,s=l.trimStr,d="".concat(c).concat(s.padStart(i+1,"0"));return new e("".concat(d.slice(0,-i),".").concat(d.slice(-i)))}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,(function(e,t){return e+t}),(function(e){return e}))}},{key:"multi",value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,(function(e,t){return e*t}),(function(e){return 2*e}))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toString()===(null===e||void 0===e?void 0:e.toString())}},{key:"lessEquals",value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){return!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.isInvalidate()?"":qO("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}(),ZO=function(){function e(t){At(this,e),h(this,"origin",""),h(this,"number",void 0),h(this,"empty",void 0),GO(t)?this.empty=!0:(this.origin=String(t),this.number=Number(t))}return Nt(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(YO(this.number),YO(n));return new e(r.toFixed(o))}},{key:"multi",value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(YO(this.number),YO(n));return new e(r.toFixed(o))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toNumber()===(null===e||void 0===e?void 0:e.toNumber())}},{key:"lessEquals",value:function(e){return this.add(e.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){return!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.isInvalidate()?"":$O(this.number):this.origin}}]),e}();function eN(e){return KO()?new QO(e):new ZO(e)}function tN(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var o=qO(e),a=o.negativeStr,i=o.integerStr,l=o.decimalStr,c="".concat(t).concat(l),s="".concat(a).concat(i);if(n>=0){var d=Number(l[n]);return d>=5&&!r?tN(eN(e).add("".concat(a,"0.").concat("0".repeat(n)).concat(10-d)).toString(),t,n,r):0===n?s:"".concat(s).concat(t).concat(l.padEnd(n,"0").slice(0,n))}return".0"===c?s:"".concat(s).concat(c)}const nN=eN;const rN=function(){var e=u((0,t.useState)(!1),2),n=e[0],r=e[1];return fn((function(){r(ss())}),[]),n};function oN(e){var n=e.prefixCls,r=e.upNode,o=e.downNode,i=e.upDisabled,l=e.downDisabled,c=e.onStep,s=t.useRef(),d=t.useRef([]),u=t.useRef();u.current=c;var f=function(){clearTimeout(s.current)},p=function(e,t){e.preventDefault(),f(),u.current(t),s.current=setTimeout((function e(){u.current(t),s.current=setTimeout(e,200)}),600)};if(t.useEffect((function(){return function(){f(),d.current.forEach((function(e){return Sa.cancel(e)}))}}),[]),rN())return null;var m="".concat(n,"-handler"),g=v()(m,"".concat(m,"-up"),h({},"".concat(m,"-up-disabled"),i)),b=v()(m,"".concat(m,"-down"),h({},"".concat(m,"-down-disabled"),l)),y=function(){return d.current.push(Sa(f))},x={unselectable:"on",role:"button",onMouseUp:y,onMouseLeave:y};return t.createElement("div",{className:"".concat(m,"-wrap")},t.createElement("span",a({},x,{onMouseDown:function(e){p(e,!0)},"aria-label":"Increase Value","aria-disabled":i,className:g}),r||t.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner")})),t.createElement("span",a({},x,{onMouseDown:function(e){p(e,!1)},"aria-label":"Decrease Value","aria-disabled":l,className:b}),o||t.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner")})))}function aN(e){var t="number"===typeof e?$O(e):qO(e).fullStr;return t.includes(".")?qO(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var iN=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur"],lN=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],cN=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},sN=function(e){var t=nN(e);return t.isInvalidate()?null:t},dN=t.forwardRef((function(e,n){var r,o=e.prefixCls,i=void 0===o?"rc-input-number":o,l=e.className,c=e.style,s=e.min,d=e.max,p=e.step,g=void 0===p?1:p,b=e.defaultValue,y=e.value,x=e.disabled,w=e.readOnly,C=e.upHandler,S=e.downHandler,E=e.keyboard,k=e.changeOnWheel,j=void 0!==k&&k,I=e.controls,T=void 0===I||I,A=(e.classNames,e.stringMode),O=e.parser,N=e.formatter,R=e.precision,P=e.decimalSeparator,M=e.onChange,D=e.onInput,L=e.onPressEnter,_=e.onStep,z=e.changeOnBlur,B=void 0===z||z,F=m(e,iN),H="".concat(i,"-input"),W=t.useRef(null),V=u(t.useState(!1),2),U=V[0],K=V[1],G=t.useRef(!1),q=t.useRef(!1),X=t.useRef(!1),Y=u(t.useState((function(){return nN(null!==y&&void 0!==y?y:b)})),2),$=Y[0],J=Y[1];var Q=t.useCallback((function(e,t){if(!t)return R>=0?R:Math.max(YO(e),YO(g))}),[R,g]),Z=t.useCallback((function(e){var t=String(e);if(O)return O(t);var n=t;return P&&(n=n.replace(P,".")),n.replace(/[^\w.-]+/g,"")}),[O,P]),ee=t.useRef(""),te=t.useCallback((function(e,t){if(N)return N(e,{userTyping:t,input:String(ee.current)});var n="number"===typeof e?$O(e):e;if(!t){var r=Q(n,t);if(JO(n)&&(P||r>=0))n=tN(n,P||".",r)}return n}),[N,Q,P]),ne=u(t.useState((function(){var e=null!==b&&void 0!==b?b:y;return $.isInvalidate()&&["string","number"].includes(f(e))?Number.isNaN(e)?"":e:te($.toString(),!1)})),2),re=ne[0],oe=ne[1];function ae(e,t){oe(te(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}ee.current=re;var ie=t.useMemo((function(){return sN(d)}),[d,R]),le=t.useMemo((function(){return sN(s)}),[s,R]),ce=t.useMemo((function(){return!(!ie||!$||$.isInvalidate())&&ie.lessEquals($)}),[ie,$]),se=t.useMemo((function(){return!(!le||!$||$.isInvalidate())&&$.lessEquals(le)}),[le,$]),de=function(e,n){var r=(0,t.useRef)(null);return[function(){try{var t=e.selectionStart,n=e.selectionEnd,o=e.value,a=o.substring(0,t),i=o.substring(n);r.current={start:t,end:n,value:o,beforeTxt:a,afterTxt:i}}catch(r5){}},function(){if(e&&r.current&&n)try{var t=e.value,o=r.current,a=o.beforeTxt,i=o.afterTxt,l=o.start,c=t.length;if(t.endsWith(i))c=t.length-r.current.afterTxt.length;else if(t.startsWith(a))c=a.length;else{var s=a[l-1],d=t.indexOf(s,l-1);-1!==d&&(c=d+1)}e.setSelectionRange(c,c)}catch(r5){Ie(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(r5.message))}}]}(W.current,U),ue=u(de,2),fe=ue[0],pe=ue[1],he=function(e){return ie&&!e.lessEquals(ie)?ie:le&&!le.lessEquals(e)?le:null},me=function(e){return!he(e)},ge=function(e,t){var n,r=e,o=me(r)||r.isEmpty();if(r.isEmpty()||t||(r=he(r)||r,o=!0),!w&&!x&&o){var a=r.toString(),i=Q(a,t);return i>=0&&(r=nN(tN(a,".",i)),me(r)||(r=nN(tN(a,".",i,!0)))),r.equals($)||(n=r,void 0===y&&J(n),null===M||void 0===M||M(r.isEmpty()?null:cN(A,r)),void 0===y&&ae(r,t)),r}return $},ve=function(){var e=(0,t.useRef)(0),n=function(){Sa.cancel(e.current)};return(0,t.useEffect)((function(){return n}),[]),function(t){n(),e.current=Sa((function(){t()}))}}(),be=function e(t){if(fe(),ee.current=t,oe(t),!q.current){var n=Z(t),r=nN(n);r.isNaN()||ge(r,!0)}null===D||void 0===D||D(t),ve((function(){var n=t;O||(n=t.replace(/\u3002/g,".")),n!==t&&e(n)}))},ye=function(e){var t;if(!(e&&ce||!e&&se)){G.current=!1;var n=nN(X.current?aN(g):g);e||(n=n.negate());var r=($||nN(0)).add(n.toString()),o=ge(r,!1);null===_||void 0===_||_(cN(A,o),{offset:X.current?aN(g):g,type:e?"up":"down"}),null===(t=W.current)||void 0===t||t.focus()}},xe=function(e){var t=nN(Z(re)),n=t;n=t.isNaN()?ge($,e):ge(t,e),void 0!==y?ae($,!1):n.isNaN()||ae(n,!1)};t.useEffect((function(){if(j&&U){var e=function(e){ye(e.deltaY<0),e.preventDefault()},t=W.current;if(t)return t.addEventListener("wheel",e,{passive:!1}),function(){return t.removeEventListener("wheel",e)}}}));return un((function(){$.isInvalidate()||ae($,!1)}),[R,N]),un((function(){var e=nN(y);J(e);var t=nN(Z(re));e.equals(t)&&G.current&&!N||ae(e,G.current)}),[y]),un((function(){N&&pe()}),[re]),t.createElement("div",{className:v()(i,l,(r={},h(r,"".concat(i,"-focused"),U),h(r,"".concat(i,"-disabled"),x),h(r,"".concat(i,"-readonly"),w),h(r,"".concat(i,"-not-a-number"),$.isNaN()),h(r,"".concat(i,"-out-of-range"),!$.isInvalidate()&&!me($)),r)),style:c,onFocus:function(){K(!0)},onBlur:function(){B&&xe(!1),K(!1),G.current=!1},onKeyDown:function(e){var t=e.key,n=e.shiftKey;G.current=!0,X.current=n,"Enter"===t&&(q.current||(G.current=!1),xe(!1),null===L||void 0===L||L(e)),!1!==E&&!q.current&&["Up","ArrowUp","Down","ArrowDown"].includes(t)&&(ye("Up"===t||"ArrowUp"===t),e.preventDefault())},onKeyUp:function(){G.current=!1,X.current=!1},onCompositionStart:function(){q.current=!0},onCompositionEnd:function(){q.current=!1,be(W.current.value)},onBeforeInput:function(){G.current=!0}},T&&t.createElement(oN,{prefixCls:i,upNode:C,downNode:S,upDisabled:ce,downDisabled:se,onStep:ye}),t.createElement("div",{className:"".concat(H,"-wrap")},t.createElement("input",a({autoComplete:"off",role:"spinbutton","aria-valuemin":s,"aria-valuemax":d,"aria-valuenow":$.isInvalidate()?null:$.toString(),step:g},F,{ref:Br(W,n),className:H,value:re,onChange:function(e){be(e.target.value)},disabled:x,readOnly:w}))))})),uN=t.forwardRef((function(e,n){var r=e.disabled,o=e.style,i=e.prefixCls,l=e.value,c=e.prefix,s=e.suffix,d=e.addonBefore,u=e.addonAfter,f=e.className,p=e.classNames,h=m(e,lN),g=t.useRef(null);return t.createElement(_k,{className:f,triggerFocus:function(e){g.current&&Lk(g.current,e)},prefixCls:i,value:l,disabled:r,style:o,prefix:c,suffix:s,addonAfter:u,addonBefore:d,classNames:p,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}},t.createElement(dN,a({prefixCls:i,disabled:r,ref:Br(g,n),className:null===p||void 0===p?void 0:p.input},h)))}));uN.displayName="InputNumber";const fN=uN,pN=(e,t)=>{let{componentCls:n,borderRadiusSM:r,borderRadiusLG:o}=e;const a="lg"===t?o:r;return{["&-".concat(t)]:{["".concat(n,"-handler-wrap")]:{borderStartEndRadius:a,borderEndEndRadius:a},["".concat(n,"-handler-up")]:{borderStartEndRadius:a},["".concat(n,"-handler-down")]:{borderEndEndRadius:a}}}},hN=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,fontSizeLG:a,controlHeightLG:i,controlHeightSM:l,colorError:c,paddingInlineSM:s,paddingBlockSM:d,paddingBlockLG:u,paddingInlineLG:f,colorTextDescription:p,motionDurationMid:h,handleHoverColor:m,paddingInline:g,paddingBlock:v,handleBg:b,handleActiveBg:y,colorTextDisabled:x,borderRadiusSM:w,borderRadiusLG:C,controlWidth:S,handleOpacity:E,handleBorderColor:k,filledHandleBg:j,lineHeightLG:I,calc:T}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),Ek(e)),{display:"inline-block",width:S,margin:0,padding:0,borderRadius:o}),fk(e,{["".concat(t,"-handler-wrap")]:{background:b,["".concat(t,"-handler-down")]:{borderBlockStart:"".concat(rn(n)," ").concat(r," ").concat(k)}}})),bk(e,{["".concat(t,"-handler-wrap")]:{background:j,["".concat(t,"-handler-down")]:{borderBlockStart:"".concat(rn(n)," ").concat(r," ").concat(k)}},"&:focus-within":{["".concat(t,"-handler-wrap")]:{background:b}}})),mk(e)),{"&-rtl":{direction:"rtl",["".concat(t,"-input")]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:I,borderRadius:C,["input".concat(t,"-input")]:{height:T(i).sub(T(n).mul(2)).equal(),padding:"".concat(rn(u)," ").concat(rn(f))}},"&-sm":{padding:0,borderRadius:w,["input".concat(t,"-input")]:{height:T(l).sub(T(n).mul(2)).equal(),padding:"".concat(rn(d)," ").concat(rn(s))}},"&-out-of-range":{["".concat(t,"-input-wrap")]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},$r(e)),kk(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",["".concat(t,"-affix-wrapper")]:{width:"100%"},"&-lg":{["".concat(t,"-group-addon")]:{borderRadius:C,fontSize:e.fontSizeLG}},"&-sm":{["".concat(t,"-group-addon")]:{borderRadius:w}}},hk(e)),xk(e)),{["&:not(".concat(t,"-compact-first-item):not(").concat(t,"-compact-last-item)").concat(t,"-compact-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderRadius:0}},["&:not(".concat(t,"-compact-last-item)").concat(t,"-compact-first-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&:not(".concat(t,"-compact-first-item)").concat(t,"-compact-last-item")]:{["".concat(t,", ").concat(t,"-group-addon")]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),["&-disabled ".concat(t,"-input")]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{width:"100%",padding:"".concat(rn(v)," ").concat(rn(g)),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:"all ".concat(h," linear"),appearance:"textfield",fontSize:"inherit"}),wk(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:Object.assign(Object.assign(Object.assign({["&:hover ".concat(t,"-handler-wrap, &-focused ").concat(t,"-handler-wrap")]:{opacity:1},["".concat(t,"-handler-wrap")]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,opacity:E,display:"flex",flexDirection:"column",alignItems:"stretch",transition:"opacity ".concat(h," linear ").concat(h),["".concat(t,"-handler")]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",["\n              ".concat(t,"-handler-up-inner,\n              ").concat(t,"-handler-down-inner\n            ")]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},["".concat(t,"-handler")]:{height:"50%",overflow:"hidden",color:p,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:"".concat(rn(n)," ").concat(r," ").concat(k),transition:"all ".concat(h," linear"),"&:active":{background:y},"&:hover":{height:"60%",["\n              ".concat(t,"-handler-up-inner,\n              ").concat(t,"-handler-down-inner\n            ")]:{color:m}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{color:p,transition:"all ".concat(h," linear"),userSelect:"none"})},["".concat(t,"-handler-up")]:{borderStartEndRadius:o},["".concat(t,"-handler-down")]:{borderEndEndRadius:o}},pN(e,"lg")),pN(e,"sm")),{"&-disabled, &-readonly":{["".concat(t,"-handler-wrap")]:{display:"none"},["".concat(t,"-input")]:{color:"inherit"}},["\n          ".concat(t,"-handler-up-disabled,\n          ").concat(t,"-handler-down-disabled\n        ")]:{cursor:"not-allowed"},["\n          ".concat(t,"-handler-up-disabled:hover &-handler-up-inner,\n          ").concat(t,"-handler-down-disabled:hover &-handler-down-inner\n        ")]:{color:x}})}]},mN=e=>{const{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:a,borderRadiusLG:i,borderRadiusSM:l,paddingInlineLG:c,paddingInlineSM:s,paddingBlockLG:d,paddingBlockSM:u}=e;return{["".concat(t,"-affix-wrapper")]:Object.assign(Object.assign({["input".concat(t,"-input")]:{padding:"".concat(rn(n)," 0")}},Ek(e)),{position:"relative",display:"inline-flex",width:a,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:i,paddingInlineStart:c,["input".concat(t,"-input")]:{padding:"".concat(rn(d)," 0")}},"&-sm":{borderRadius:l,paddingInlineStart:s,["input".concat(t,"-input")]:{padding:"".concat(rn(u)," 0")}},["&:not(".concat(t,"-disabled):hover")]:{zIndex:1},"&-focused, &:focus":{zIndex:1},["&-disabled > ".concat(t,"-disabled")]:{background:"transparent"},["> div".concat(t)]:{width:"100%",border:"none",outline:"none",["&".concat(t,"-focused")]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},["".concat(t,"-handler-wrap")]:{zIndex:2},[t]:{color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:r,marginInlineStart:o}}})}},gN=$o("InputNumber",(e=>{const t=Ho(e,ik(e));return[hN(t),mN(t),Jl(t)]}),(e=>{var t;const n=null!==(t=e.handleVisible)&&void 0!==t?t:"auto";return Object.assign(Object.assign({},lk(e)),{controlWidth:90,handleWidth:e.controlHeightSM-2*e.lineWidth,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new ao(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:!0===n?1:0})}),{unitless:{handleOpacity:!0}});var vN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const bN=t.forwardRef(((e,n)=>{const{getPrefixCls:r,direction:o}=t.useContext(at),a=t.useRef(null);t.useImperativeHandle(n,(()=>a.current));const{className:i,rootClassName:l,size:c,disabled:s,prefixCls:d,addonBefore:u,addonAfter:f,prefix:p,bordered:h,readOnly:m,status:g,controls:b,variant:y}=e,x=vN(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls","variant"]),w=r("input-number",d),C=lh(w),[S,E,k]=gN(w,C),{compactSize:j,compactItemClassnames:I}=nl(w,o);let T=t.createElement(UO,{className:"".concat(w,"-handler-up-inner")}),A=t.createElement(MO,{className:"".concat(w,"-handler-down-inner")});const O="boolean"===typeof b?b:void 0;"object"===typeof b&&(T="undefined"===typeof b.upIcon?T:t.createElement("span",{className:"".concat(w,"-handler-up-inner")},b.upIcon),A="undefined"===typeof b.downIcon?A:t.createElement("span",{className:"".concat(w,"-handler-down-inner")},b.downIcon));const{hasFeedback:N,status:R,isFormItemInput:P,feedbackIcon:M}=t.useContext(Xw),D=Uk(R,g),L=Yi((e=>{var t;return null!==(t=null!==c&&void 0!==c?c:j)&&void 0!==t?t:e})),_=t.useContext(Ki),z=null!==s&&void 0!==s?s:_,[B,F]=qk(y,h),H=N&&t.createElement(t.Fragment,null,M),W=v()({["".concat(w,"-lg")]:"large"===L,["".concat(w,"-sm")]:"small"===L,["".concat(w,"-rtl")]:"rtl"===o,["".concat(w,"-in-form-item")]:P},E),V="".concat(w,"-group");return S(t.createElement(fN,Object.assign({ref:a,disabled:z,className:v()(k,C,i,l,I),upHandler:T,downHandler:A,prefixCls:w,readOnly:m,controls:O,prefix:p,suffix:H,addonAfter:f&&t.createElement(rl,null,t.createElement(Yw,{override:!0,status:!0},f)),addonBefore:u&&t.createElement(rl,null,t.createElement(Yw,{override:!0,status:!0},u)),classNames:{input:W,variant:v()({["".concat(w,"-").concat(B)]:F},Vk(w,D,N)),affixWrapper:v()({["".concat(w,"-affix-wrapper-sm")]:"small"===L,["".concat(w,"-affix-wrapper-lg")]:"large"===L,["".concat(w,"-affix-wrapper-rtl")]:"rtl"===o},E),wrapper:v()({["".concat(V,"-rtl")]:"rtl"===o},E),groupWrapper:v()({["".concat(w,"-group-wrapper-sm")]:"small"===L,["".concat(w,"-group-wrapper-lg")]:"large"===L,["".concat(w,"-group-wrapper-rtl")]:"rtl"===o,["".concat(w,"-group-wrapper-").concat(B)]:F},Vk("".concat(w,"-group-wrapper"),D,N),E)}},x)))})),yN=bN;yN._InternalPanelDoNotUseOrYouWillBeFired=e=>t.createElement(Nu,{theme:{components:{InputNumber:{handleVisible:!0}}}},t.createElement(bN,Object.assign({},e)));const xN=yN,wN=$o("Popconfirm",(e=>(e=>{const{componentCls:t,iconCls:n,antCls:r,zIndexPopup:o,colorText:a,colorWarning:i,marginXXS:l,marginXS:c,fontSize:s,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:o,["&".concat(r,"-popover")]:{fontSize:s},["".concat(t,"-message")]:{marginBottom:c,display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(t,"-message-icon ").concat(n)]:{color:i,fontSize:s,lineHeight:1,marginInlineEnd:c},["".concat(t,"-title")]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},["".concat(t,"-description")]:{marginTop:l,color:a}},["".concat(t,"-buttons")]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:c}}}}})(e)),(e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}}),{resetStyle:!1});var CN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const SN=e=>{const{prefixCls:n,okButtonProps:r,cancelButtonProps:o,title:a,description:i,cancelText:l,okText:c,okType:s="primary",icon:d=t.createElement(Qy,null),showCancel:u=!0,close:f,onConfirm:p,onCancel:h,onPopupClick:m}=e,{getPrefixCls:g}=t.useContext(at),[b]=nx("Popconfirm",au.Popconfirm),y=Kh(a),x=Kh(i);return t.createElement("div",{className:"".concat(n,"-inner-content"),onClick:m},t.createElement("div",{className:"".concat(n,"-message")},d&&t.createElement("span",{className:"".concat(n,"-message-icon")},d),t.createElement("div",{className:"".concat(n,"-message-text")},y&&t.createElement("div",{className:v()("".concat(n,"-title"))},y),x&&t.createElement("div",{className:"".concat(n,"-description")},x))),t.createElement("div",{className:"".concat(n,"-buttons")},u&&t.createElement(ac,Object.assign({onClick:h,size:"small"},o),l||(null===b||void 0===b?void 0:b.cancelText)),t.createElement(ox,{buttonProps:Object.assign(Object.assign({size:"small"},ul(s)),r),actionFn:p,close:f,prefixCls:g("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},c||(null===b||void 0===b?void 0:b.okText))))},EN=e=>{const{prefixCls:n,placement:r,className:o,style:a}=e,i=CN(e,["prefixCls","placement","className","style"]),{getPrefixCls:l}=t.useContext(at),c=l("popconfirm",n),[s]=wN(c);return s(t.createElement(Jh,{placement:r,className:v()(c,o),style:a,content:t.createElement(SN,Object.assign({prefixCls:c},i))}))};var kN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const jN=t.forwardRef(((e,n)=>{var r,o;const{prefixCls:a,placement:i="top",trigger:l="click",okType:c="primary",icon:s=t.createElement(Qy,null),children:d,overlayClassName:u,onOpenChange:f,onVisibleChange:p}=e,h=kN(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:m}=t.useContext(at),[g,b]=_r(!1,{value:null!==(r=e.open)&&void 0!==r?r:e.visible,defaultValue:null!==(o=e.defaultOpen)&&void 0!==o?o:e.defaultVisible}),y=(e,t)=>{b(e,!0),null===p||void 0===p||p(e),null===f||void 0===f||f(e,t)},x=m("popconfirm",a),w=v()(x,u),[C]=wN(x);return C(t.createElement(tm,Object.assign({},rt(h,["title"]),{trigger:l,placement:i,onOpenChange:t=>{const{disabled:n=!1}=e;n||y(t)},open:g,ref:n,overlayClassName:w,content:t.createElement(SN,Object.assign({okType:c,icon:s},e,{prefixCls:x,close:e=>{y(!1,e)},onConfirm:t=>{var n;return null===(n=e.onConfirm)||void 0===n?void 0:n.call(void 0,t)},onCancel:t=>{var n;y(!1,t),null===(n=e.onCancel)||void 0===n||n.call(void 0,t)}})),"data-popover-inject":!0}),ha(d,{onKeyDown:e=>{var n,r;t.isValidElement(d)&&(null===(r=null===d||void 0===d?void 0:(n=d.props).onKeyDown)||void 0===r||r.call(n,e)),(e=>{e.keyCode===Vd.ESC&&g&&y(!1,e)})(e)}})))}));jN._InternalPanelDoNotUseOrYouWillBeFired=EN;const IN=jN;const TN=function(e){let t;const n=function(){if(null==t){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t=Sa((n=>()=>{t=null,e.apply(void 0,nt(n))})(r))}};return n.cancel=()=>{Sa.cancel(t),t=null},n},AN=$o("Affix",(e=>{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}}),(e=>({zIndexPopup:e.zIndexBase+10})));function ON(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function NN(e,t,n){if(void 0!==n&&Math.round(t.top)>Math.round(e.top)-n)return n+t.top}function RN(e,t,n){if(void 0!==n&&Math.round(t.bottom)<Math.round(e.bottom)+n){return n+(window.innerHeight-t.bottom)}}const PN=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function MN(){return"undefined"!==typeof window?window:null}var DN;!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(DN||(DN={}));const LN=t.forwardRef(((e,n)=>{var r;const{style:o,offsetTop:a,offsetBottom:i,prefixCls:l,className:c,rootClassName:s,children:d,target:u,onChange:f}=e,{getPrefixCls:p,getTargetContainer:h}=t.useContext(at),m=p("affix",l),[g,b]=t.useState(!1),[y,x]=t.useState(),[w,C]=t.useState(),S=t.useRef(DN.None),E=t.useRef(null),k=t.useRef(),j=t.useRef(null),I=t.useRef(null),T=t.useRef(null),A=null!==(r=null!==u&&void 0!==u?u:h)&&void 0!==r?r:MN,O=void 0===i&&void 0===a?0:a,N=()=>{S.current=DN.Prepare,(()=>{if(S.current!==DN.Prepare||!I.current||!j.current||!A)return;const e=A();if(e){const t={status:DN.None},n=ON(j.current);if(0===n.top&&0===n.left&&0===n.width&&0===n.height)return;const r=ON(e),o=NN(n,r,O),a=RN(n,r,i);void 0!==o?(t.affixStyle={position:"fixed",top:o,width:n.width,height:n.height},t.placeholderStyle={width:n.width,height:n.height}):void 0!==a&&(t.affixStyle={position:"fixed",bottom:a,width:n.width,height:n.height},t.placeholderStyle={width:n.width,height:n.height}),t.lastAffix=!!t.affixStyle,g!==t.lastAffix&&(null===f||void 0===f||f(t.lastAffix)),S.current=t.status,x(t.affixStyle),C(t.placeholderStyle),b(t.lastAffix)}})()},R=TN((()=>{N()})),P=TN((()=>{if(A&&y){const e=A();if(e&&j.current){const t=ON(e),n=ON(j.current),r=NN(n,t,O),o=RN(n,t,i);if(void 0!==r&&y.top===r||void 0!==o&&y.bottom===o)return}}N()})),M=()=>{const e=null===A||void 0===A?void 0:A();e&&(PN.forEach((t=>{var n;k.current&&(null===(n=E.current)||void 0===n||n.removeEventListener(t,k.current)),null===e||void 0===e||e.addEventListener(t,P)})),E.current=e,k.current=P)};t.useImperativeHandle(n,(()=>({updatePosition:R}))),t.useEffect((()=>(T.current=setTimeout(M),()=>(()=>{T.current&&(clearTimeout(T.current),T.current=null);const e=null===A||void 0===A?void 0:A();PN.forEach((t=>{var n;null===e||void 0===e||e.removeEventListener(t,P),k.current&&(null===(n=E.current)||void 0===n||n.removeEventListener(t,k.current))})),R.cancel(),P.cancel()})())),[]),t.useEffect((()=>{M()}),[u,y]),t.useEffect((()=>{R()}),[u,a,i]);const[D,L,_]=AN(m),z=v()(s,L,m,_),B=v()({[z]:y});let F=rt(e,["prefixCls","offsetTop","offsetBottom","target","onChange","rootClassName"]);return D(t.createElement(as,{onResize:R},t.createElement("div",Object.assign({style:o,className:c,ref:j},F),y&&t.createElement("div",{style:w,"aria-hidden":"true"}),t.createElement("div",{className:B,ref:I,style:y},t.createElement(as,{onResize:R},d)))))}));const _N=LN;var zN={},BN="rc-table-internal-hook";function FN(e){var n=t.createContext(void 0);return{Context:n,Provider:function(e){var r=e.value,o=e.children,a=t.useRef(r);a.current=r;var i=u(t.useState((function(){return{getValue:function(){return a.current},listeners:new Set}})),1)[0];return fn((function(){(0,Ea.unstable_batchedUpdates)((function(){i.listeners.forEach((function(e){e(r)}))}))}),[r]),t.createElement(n.Provider,{value:i},o)},defaultValue:e}}function HN(e,n){var r=Mr("function"===typeof n?n:function(e){if(void 0===n)return e;if(!Array.isArray(n))return e[n];var t={};return n.forEach((function(n){t[n]=e[n]})),t}),o=t.useContext(null===e||void 0===e?void 0:e.Context),a=o||{},i=a.listeners,l=a.getValue,c=t.useRef();c.current=r(o?l():null===e||void 0===e?void 0:e.defaultValue);var s=u(t.useState({}),2)[1];return fn((function(){if(o)return i.add(e),function(){i.delete(e)};function e(e){var t=r(e);Tt(c.current,t,!0)||s({})}}),[o]),c.current}function WN(){var e=t.createContext(null);function n(){return t.useContext(e)}return{makeImmutable:function(r,o){var i=Hr(r),l=function(l,c){var s=i?{ref:c}:{},d=t.useRef(0),u=t.useRef(l);return null!==n()?t.createElement(r,a({},l,s)):(o&&!o(u.current,l)||(d.current+=1),u.current=l,t.createElement(e.Provider,{value:d.current},t.createElement(r,a({},l,s))))};return i?t.forwardRef(l):l},responseImmutable:function(e,r){var o=Hr(e),i=function(r,i){var l=o?{ref:i}:{};return n(),t.createElement(e,a({},r,l))};return o?t.memo(t.forwardRef(i),r):t.memo(i,r)},useImmutableMark:n}}var VN=WN(),UN=(VN.makeImmutable,VN.responseImmutable,VN.useImmutableMark,WN()),KN=UN.makeImmutable,GN=UN.responseImmutable,qN=UN.useImmutableMark;const XN=FN();const YN=t.createContext({renderWithProps:!1});var $N="RC_TABLE_KEY";function JN(e){var t=[],n={};return e.forEach((function(e){for(var r,o=e||{},a=o.key,i=o.dataIndex,l=a||(r=i,void 0===r||null===r?[]:Array.isArray(r)?r:[r]).join("-")||$N;n[l];)l="".concat(l,"_next");n[l]=!0,t.push(l)})),t}function QN(e){return null!==e&&void 0!==e}function ZN(e,n,r,o,a,i){var l=t.useContext(YN),c=It((function(){if(QN(o))return[o];var i,c=null===n||void 0===n||""===n?[]:Array.isArray(n)?n:[n],s=Vr(e,c),d=s,u=void 0;if(a){var p=a(s,e,r);!(i=p)||"object"!==f(i)||Array.isArray(i)||t.isValidElement(i)?d=p:(d=p.children,u=p.props,l.renderWithProps=!0)}return[d,u]}),[qN(),e,o,n,a,r],(function(e,t){if(i){var n=u(e,2)[1],r=u(t,2)[1];return i(r,n)}return!!l.renderWithProps||!Tt(e,t,!0)}));return c}function eR(e){var n,r,o,i,l,c,s,d;var p=e.component,m=e.children,g=e.ellipsis,b=e.scope,y=e.prefixCls,x=e.className,w=e.align,C=e.record,S=e.render,E=e.dataIndex,k=e.renderIndex,j=e.shouldCellUpdate,I=e.index,T=e.rowType,A=e.colSpan,O=e.rowSpan,N=e.fixLeft,R=e.fixRight,P=e.firstFixLeft,M=e.lastFixLeft,D=e.firstFixRight,L=e.lastFixRight,_=e.appendNode,z=e.additionalProps,B=void 0===z?{}:z,F=e.isSticky,H="".concat(y,"-cell"),W=HN(XN,["supportSticky","allColumnsFixedLeft"]),V=W.supportSticky,U=W.allColumnsFixedLeft,K=u(ZN(C,E,k,m,S,j),2),G=K[0],q=K[1],X={},Y="number"===typeof N&&V,$="number"===typeof R&&V;Y&&(X.position="sticky",X.left=N),$&&(X.position="sticky",X.right=R);var J=null!==(n=null!==(r=null!==(o=null===q||void 0===q?void 0:q.colSpan)&&void 0!==o?o:B.colSpan)&&void 0!==r?r:A)&&void 0!==n?n:1,Q=null!==(i=null!==(l=null!==(c=null===q||void 0===q?void 0:q.rowSpan)&&void 0!==c?c:B.rowSpan)&&void 0!==l?l:O)&&void 0!==i?i:1,Z=function(e,t){return HN(XN,(function(n){var r,o,a,i;return[(r=e,o=t||1,a=n.hoverStartRow,i=n.hoverEndRow,r<=i&&r+o-1>=a),n.onHover]}))}(I,Q),ee=u(Z,2),te=ee[0],ne=ee[1],re=Mr((function(e){var t;C&&ne(I,I+Q-1),null===B||void 0===B||null===(t=B.onMouseEnter)||void 0===t||t.call(B,e)})),ae=Mr((function(e){var t;C&&ne(-1,-1),null===B||void 0===B||null===(t=B.onMouseLeave)||void 0===t||t.call(B,e)}));if(0===J||0===Q)return null;var ie=null!==(s=B.title)&&void 0!==s?s:function(e){var n,r=e.ellipsis,o=e.rowType,a=e.children,i=!0===r?{showTitle:!0}:r;return i&&(i.showTitle||"header"===o)&&("string"===typeof a||"number"===typeof a?n=a.toString():t.isValidElement(a)&&"string"===typeof a.props.children&&(n=a.props.children)),n}({rowType:T,ellipsis:g,children:G}),le=v()(H,x,(h(d={},"".concat(H,"-fix-left"),Y&&V),h(d,"".concat(H,"-fix-left-first"),P&&V),h(d,"".concat(H,"-fix-left-last"),M&&V),h(d,"".concat(H,"-fix-left-all"),M&&U&&V),h(d,"".concat(H,"-fix-right"),$&&V),h(d,"".concat(H,"-fix-right-first"),D&&V),h(d,"".concat(H,"-fix-right-last"),L&&V),h(d,"".concat(H,"-ellipsis"),g),h(d,"".concat(H,"-with-append"),_),h(d,"".concat(H,"-fix-sticky"),(Y||$)&&F&&V),h(d,"".concat(H,"-row-hover"),!q&&te),d),B.className,null===q||void 0===q?void 0:q.className),ce={};w&&(ce.textAlign=w);var se=oe(oe(oe(oe({},X),B.style),ce),null===q||void 0===q?void 0:q.style),de=G;return"object"!==f(de)||Array.isArray(de)||t.isValidElement(de)||(de=null),g&&(M||D)&&(de=t.createElement("span",{className:"".concat(H,"-content")},de)),t.createElement(p,a({},q,B,{className:le,style:se,title:ie,scope:b,onMouseEnter:re,onMouseLeave:ae,colSpan:1!==J?J:null,rowSpan:1!==Q?Q:null}),_,de)}const tR=t.memo(eR);function nR(e,t,n,r,o,a){var i,l,c=n[e]||{},s=n[t]||{};"left"===c.fixed?i=r.left["rtl"===o?t:e]:"right"===s.fixed&&(l=r.right["rtl"===o?e:t]);var d=!1,u=!1,f=!1,p=!1,h=n[t+1],m=n[e-1],g=!(null!==a&&void 0!==a&&a.children);if("rtl"===o){if(void 0!==i)p=!(m&&"left"===m.fixed)&&g;else if(void 0!==l){f=!(h&&"right"===h.fixed)&&g}}else if(void 0!==i){d=!(h&&"left"===h.fixed)&&g}else if(void 0!==l){u=!(m&&"right"===m.fixed)&&g}return{fixLeft:i,fixRight:l,lastFixLeft:d,firstFixRight:u,lastFixRight:f,firstFixLeft:p,isSticky:r.isSticky}}const rR=t.createContext({});var oR=["children"];function aR(e){return e.children}aR.Row=function(e){var n=e.children,r=m(e,oR);return t.createElement("tr",r,n)},aR.Cell=function(e){var n=e.className,r=e.index,o=e.children,i=e.colSpan,l=void 0===i?1:i,c=e.rowSpan,s=e.align,d=HN(XN,["prefixCls","direction"]),u=d.prefixCls,f=d.direction,p=t.useContext(rR),h=p.scrollColumnIndex,m=p.stickyOffsets,g=p.flattenColumns,v=p.columns,b=r+l-1+1===h?l+1:l,y=nR(r,r+b-1,g,m,f,null===v||void 0===v?void 0:v[r]);return t.createElement(tR,a({className:n,index:r,component:"td",prefixCls:u,record:null,dataIndex:null,align:s,colSpan:b,rowSpan:c,render:function(){return o}},y))};const iR=aR;const lR=GN((function(e){var n=e.children,r=e.stickyOffsets,o=e.flattenColumns,a=e.columns,i=HN(XN,"prefixCls"),l=o.length-1,c=o[l],s=t.useMemo((function(){return{stickyOffsets:r,flattenColumns:o,scrollColumnIndex:null!==c&&void 0!==c&&c.scrollbar?l:null,columns:a}}),[c,o,l,r,a]);return t.createElement(rR.Provider,{value:s},t.createElement("tfoot",{className:"".concat(i,"-summary")},n))}));var cR=iR,sR=function(e){if(ae()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1},dR=function(e,t){if(!sR(e))return!1;var n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function uR(e,t,n,r,o,a,i){e.push({record:t,indent:n,index:i});var l=a(t),c=null===o||void 0===o?void 0:o.has(l);if(t&&Array.isArray(t[r])&&c)for(var s=0;s<t[r].length;s+=1)uR(e,t[r][s],n+1,r,o,a,s)}function fR(e,n,r,o){var a=t.useMemo((function(){if(null!==r&&void 0!==r&&r.size){for(var t=[],a=0;a<(null===e||void 0===e?void 0:e.length);a+=1){uR(t,e[a],0,n,r,o,a)}return t}return null===e||void 0===e?void 0:e.map((function(e,t){return{record:e,indent:0,index:t}}))}),[e,n,r,o]);return a}function pR(e,t,n,r){var o,a=HN(XN,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),i=a.flattenColumns,l=a.expandableType,c=a.expandedKeys,s=a.childrenColumnName,d=a.onTriggerExpand,u=a.rowExpandable,f=a.onRow,p=a.expandRowByClick,h=a.rowClassName,m="nest"===l,g="row"===l&&(!u||u(e)),b=g||m,y=c&&c.has(t),x=s&&e&&e[s],w=Mr(d),C=null===f||void 0===f?void 0:f(e,n),S=null===C||void 0===C?void 0:C.onClick;"string"===typeof h?o=h:"function"===typeof h&&(o=h(e,n,r));var E=JN(i);return oe(oe({},a),{},{columnsKey:E,nestExpandable:m,expanded:y,hasNestChildren:x,record:e,onTriggerExpand:w,rowSupportExpand:g,expandable:b,rowProps:oe(oe({},C),{},{className:v()(o,null===C||void 0===C?void 0:C.className),onClick:function(t){p&&b&&d(e,t);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null===S||void 0===S||S.apply(void 0,[t].concat(r))}})})}const hR=function(e){var n=e.prefixCls,r=e.children,o=e.component,a=e.cellComponent,i=e.className,l=e.expanded,c=e.colSpan,s=e.isEmpty,d=HN(XN,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),u=d.scrollbarSize,f=d.fixHeader,p=d.fixColumn,h=d.componentWidth,m=d.horizonScroll,g=r;return(s?m&&h:p)&&(g=t.createElement("div",{style:{width:h-(f?u:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(n,"-expanded-row-fixed")},g)),t.createElement(o,{className:i,style:{display:l?null:"none"}},t.createElement(tR,{component:a,prefixCls:n,colSpan:c},g))};function mR(e,n,r,o,a){var i,l,c=e.record,s=e.prefixCls,d=e.columnsKey,u=e.fixedInfoList,f=e.expandIconColumnIndex,p=e.nestExpandable,h=e.indentSize,m=e.expandIcon,g=e.expanded,v=e.hasNestChildren,b=e.onTriggerExpand,y=d[r],x=u[r];return r===(f||0)&&p&&(i=t.createElement(t.Fragment,null,t.createElement("span",{style:{paddingLeft:"".concat(h*o,"px")},className:"".concat(s,"-row-indent indent-level-").concat(o)}),m({prefixCls:s,expanded:g,expandable:v,record:c,onExpand:b}))),n.onCell&&(l=n.onCell(c,a)),{key:y,fixedInfo:x,appendCellNode:i,additionalCellProps:l||{}}}const gR=GN((function(e){var n=e.className,r=e.style,o=e.record,i=e.index,l=e.renderIndex,c=e.rowKey,s=e.indent,d=void 0===s?0:s,u=e.rowComponent,f=e.cellComponent,p=e.scopeCellComponent,h=pR(o,c,i,d),m=h.prefixCls,g=h.flattenColumns,b=h.expandedRowClassName,y=h.expandedRowRender,x=h.rowProps,w=h.expanded,C=h.rowSupportExpand,S=t.useRef(!1);S.current||(S.current=w);var E,k=b&&b(o,i,d),j=t.createElement(u,a({},x,{"data-row-key":c,className:v()(n,"".concat(m,"-row"),"".concat(m,"-row-level-").concat(d),null===x||void 0===x?void 0:x.className,d>=1?k:""),style:oe(oe({},r),null===x||void 0===x?void 0:x.style)}),g.map((function(e,n){var r=e.render,c=e.dataIndex,s=e.className,u=mR(h,e,n,d,i),g=u.key,v=u.fixedInfo,b=u.appendCellNode,y=u.additionalCellProps;return t.createElement(tR,a({className:s,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:f,prefixCls:m,key:g,record:o,index:i,renderIndex:l,dataIndex:c,render:r,shouldCellUpdate:e.shouldCellUpdate},v,{appendNode:b,additionalProps:y}))})));if(C&&(S.current||w)){var I=y(o,i,d+1,w);E=t.createElement(hR,{expanded:w,className:v()("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(d+1),k),prefixCls:m,component:u,cellComponent:f,colSpan:g.length,isEmpty:!1},I)}return t.createElement(t.Fragment,null,j,E)}));function vR(e){var n=e.columnKey,r=e.onColumnResize,o=t.useRef();return t.useEffect((function(){o.current&&r(n,o.current.offsetWidth)}),[]),t.createElement(as,{data:n},t.createElement("td",{ref:o,style:{padding:0,border:0,height:0}},t.createElement("div",{style:{height:0,overflow:"hidden"}},"\xa0")))}function bR(e){var n=e.prefixCls,r=e.columnsKey,o=e.onColumnResize;return t.createElement("tr",{"aria-hidden":"true",className:"".concat(n,"-measure-row"),style:{height:0,fontSize:0}},t.createElement(as.Collection,{onBatchResize:function(e){e.forEach((function(e){var t=e.data,n=e.size;o(t,n.offsetWidth)}))}},r.map((function(e){return t.createElement(vR,{key:e,columnKey:e,onColumnResize:o})}))))}const yR=GN((function(e){var n,r=e.data,o=e.measureColumnWidth,a=HN(XN,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),i=a.prefixCls,l=a.getComponent,c=a.onColumnResize,s=a.flattenColumns,d=a.getRowKey,u=a.expandedKeys,f=a.childrenColumnName,p=a.emptyNode,h=fR(r,f,u,d),m=t.useRef({renderWithProps:!1}),g=l(["body","wrapper"],"tbody"),v=l(["body","row"],"tr"),b=l(["body","cell"],"td"),y=l(["body","cell"],"th");n=r.length?h.map((function(e,n){var r=e.record,o=e.indent,a=e.index,i=d(r,n);return t.createElement(gR,{key:i,rowKey:i,record:r,index:n,renderIndex:a,rowComponent:v,cellComponent:b,scopeCellComponent:y,getRowKey:d,indent:o})})):t.createElement(hR,{expanded:!0,className:"".concat(i,"-placeholder"),prefixCls:i,component:v,cellComponent:b,colSpan:s.length,isEmpty:!0},p);var x=JN(s);return t.createElement(YN.Provider,{value:m.current},t.createElement(g,{className:"".concat(i,"-tbody")},o&&t.createElement(bR,{prefixCls:i,columnsKey:x,onColumnResize:c}),n))}));var xR=["expandable"],wR="RC_TABLE_INTERNAL_COL_DEFINE";var CR=["columnType"];const SR=function(e){for(var n=e.colWidths,r=e.columns,o=[],i=!1,l=(e.columCount||r.length)-1;l>=0;l-=1){var c=n[l],s=r&&r[l],d=s&&s[wR];if(c||d||i){var u=d||{},f=(u.columnType,m(u,CR));o.unshift(t.createElement("col",a({key:l,style:{width:c}},f))),i=!0}}return t.createElement("colgroup",null,o)};var ER=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];var kR=t.forwardRef((function(e,n){var r=e.className,o=e.noData,a=e.columns,i=e.flattenColumns,l=e.colWidths,c=e.columCount,s=e.stickyOffsets,d=e.direction,u=e.fixHeader,f=e.stickyTopOffset,p=e.stickyBottomOffset,g=e.stickyClassName,b=e.onScroll,y=e.maxContentScroll,x=e.children,w=m(e,ER),C=HN(XN,["prefixCls","scrollbarSize","isSticky"]),S=C.prefixCls,E=C.scrollbarSize,k=C.isSticky,j=k&&!u?0:E,I=t.useRef(null),T=t.useCallback((function(e){zr(n,e),zr(I,e)}),[]);t.useEffect((function(){var e;function t(e){var t=e,n=t.currentTarget,r=t.deltaX;r&&(b({currentTarget:n,scrollLeft:n.scrollLeft+r}),e.preventDefault())}return null===(e=I.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=I.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var A=t.useMemo((function(){return i.every((function(e){return e.width}))}),[i]),O=i[i.length-1],N={fixed:O?O.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(S,"-cell-scrollbar")}}},R=(0,t.useMemo)((function(){return j?[].concat(nt(a),[N]):a}),[j,a]),P=(0,t.useMemo)((function(){return j?[].concat(nt(i),[N]):i}),[j,i]),M=(0,t.useMemo)((function(){var e=s.right,t=s.left;return oe(oe({},s),{},{left:"rtl"===d?[].concat(nt(t.map((function(e){return e+j}))),[0]):t,right:"rtl"===d?e:[].concat(nt(e.map((function(e){return e+j}))),[0]),isSticky:k})}),[j,s,k]),D=function(e,n){return(0,t.useMemo)((function(){for(var t=[],r=0;r<n;r+=1){var o=e[r];if(void 0===o)return null;t[r]=o}return t}),[e.join("_"),n])}(l,c);return t.createElement("div",{style:oe({overflow:"hidden"},k?{top:f,bottom:p}:{}),ref:T,className:v()(r,h({},g,!!g))},t.createElement("table",{style:{tableLayout:"fixed",visibility:o||D?null:"hidden"}},(!o||!y||A)&&t.createElement(SR,{colWidths:D?[].concat(nt(D),[j]):[],columCount:c+1,columns:P}),x(oe(oe({},w),{},{stickyOffsets:M,columns:R,flattenColumns:P}))))}));const jR=t.memo(kR);const IR=function(e){var n,r=e.cells,o=e.stickyOffsets,i=e.flattenColumns,l=e.rowComponent,c=e.cellComponent,s=e.tdCellComponent,d=e.onHeaderRow,u=e.index,f=HN(XN,["prefixCls","direction"]),p=f.prefixCls,h=f.direction;d&&(n=d(r.map((function(e){return e.column})),u));var m=JN(r.map((function(e){return e.column})));return t.createElement(l,n,r.map((function(e,n){var r,l=e.column,d=nR(e.colStart,e.colEnd,i,o,h,l);return l&&l.onHeaderCell&&(r=e.column.onHeaderCell(l)),t.createElement(tR,a({},e,{scope:l.title?e.colSpan>1?"colgroup":"col":null,ellipsis:l.ellipsis,align:l.align,component:l.title?c:s,prefixCls:p,key:m[n]},d,{additionalProps:r,rowType:"header"}))})))};const TR=GN((function(e){var n=e.stickyOffsets,r=e.columns,o=e.flattenColumns,a=e.onHeaderRow,i=HN(XN,["prefixCls","getComponent"]),l=i.prefixCls,c=i.getComponent,s=t.useMemo((function(){return function(e){var t=[];!function e(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[o]=t[o]||[];var a=r,i=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},i=1,l=n.children;return l&&l.length>0&&(i=e(l,a,o+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(i=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=i,r.colEnd=r.colStart+i-1,t[o].push(r),a+=i,i}));return i}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},o=0;o<n;o+=1)r(o);return t}(r)}),[r]),d=c(["header","wrapper"],"thead"),u=c(["header","row"],"tr"),f=c(["header","cell"],"th"),p=c(["header","cell"],"td");return t.createElement(d,{className:"".concat(l,"-thead")},s.map((function(e,r){return t.createElement(IR,{key:r,flattenColumns:o,cells:e,stickyOffsets:n,rowComponent:u,cellComponent:f,tdCellComponent:p,onHeaderRow:a,index:r})})))}));function AR(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"===typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var OR=["children"],NR=["fixed"];function RR(e){return st(e).filter((function(e){return t.isValidElement(e)})).map((function(e){var t=e.key,n=e.props,r=n.children,o=oe({key:t},m(n,OR));return r&&(o.children=RR(r)),o}))}function PR(e){return e.filter((function(e){return e&&"object"===f(e)&&!e.hidden})).map((function(e){var t=e.children;return t&&t.length>0?oe(oe({},e),{},{children:PR(t)}):e}))}function MR(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter((function(e){return e&&"object"===f(e)})).reduce((function(e,n,r){var o=n.fixed,a=!0===o?"left":o,i="".concat(t,"-").concat(r),l=n.children;return l&&l.length>0?[].concat(nt(e),nt(MR(l,i).map((function(e){return oe({fixed:a},e)})))):[].concat(nt(e),[oe(oe({key:i},n),{},{fixed:a})])}),[])}const DR=function(e,n){var r=e.prefixCls,o=e.columns,a=e.children,i=e.expandable,l=e.expandedKeys,c=e.columnTitle,s=e.getRowKey,d=e.onTriggerExpand,f=e.expandIcon,p=e.rowExpandable,g=e.expandIconColumnIndex,v=e.direction,b=e.expandRowByClick,y=e.columnWidth,x=e.fixed,w=e.scrollWidth,C=e.clientWidth,S=t.useMemo((function(){return PR((o||RR(a)||[]).slice())}),[o,a]),E=t.useMemo((function(){if(i){var e,n=S.slice();if(!n.includes(zN)){var o=g||0;o>=0&&n.splice(o,0,zN)}0;var a=n.indexOf(zN);n=n.filter((function(e,t){return e!==zN||t===a}));var u,m=S[a];u="left"!==x&&!x||g?"right"!==x&&!x||g!==S.length?m?m.fixed:null:"right":"left";var v=(h(e={},wR,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),h(e,"title",c),h(e,"fixed",u),h(e,"className","".concat(r,"-row-expand-icon-cell")),h(e,"width",y),h(e,"render",(function(e,n,o){var a=s(n,o),i=l.has(a),c=!p||p(n),u=f({prefixCls:r,expanded:i,expandable:c,record:n,onExpand:d});return b?t.createElement("span",{onClick:function(e){return e.stopPropagation()}},u):u})),e);return n.map((function(e){return e===zN?v:e}))}return S.filter((function(e){return e!==zN}))}),[i,S,s,l,f,v]),k=t.useMemo((function(){var e=E;return n&&(e=n(e)),e.length||(e=[{render:function(){return null}}]),e}),[n,E,v]),j=t.useMemo((function(){return"rtl"===v?function(e){return e.map((function(e){var t=e.fixed,n=t;return"left"===t?n="right":"right"===t&&(n="left"),oe({fixed:n},m(e,NR))}))}(MR(k)):MR(k)}),[k,v,w]),I=t.useMemo((function(){for(var e=-1,t=j.length-1;t>=0;t-=1){var n=j[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var r=0;r<=e;r+=1){var o=j[r].fixed;if("left"!==o&&!0!==o)return!0}var a=j.findIndex((function(e){return"right"===e.fixed}));if(a>=0)for(var i=a;i<j.length;i+=1){if("right"!==j[i].fixed)return!0}return!1}),[j]),T=function(e,n,r){return t.useMemo((function(){if(n&&n>0){var t=0,o=0;e.forEach((function(e){var r=AR(n,e.width);r?t+=r:o+=1}));var a=Math.max(n,r),i=Math.max(a-t,o),l=o,c=i/o,s=0,d=e.map((function(e){var t=oe({},e),r=AR(n,t.width);if(r)t.width=r;else{var o=Math.floor(c);t.width=1===l?i:o,i-=o,l-=1}return s+=t.width,t}));if(s<a){var u=a/s;i=a,d.forEach((function(e,t){var n=Math.floor(e.width*u);e.width=t===d.length-1?i:n,i-=n}))}return[d,Math.max(s,a)]}return[e,n]}),[e,n,r])}(j,w,C),A=u(T,2),O=A[0],N=A[1];return[k,O,N,I]};function LR(e){var n,r=e.prefixCls,o=e.record,a=e.onExpand,i=e.expanded,l=e.expandable,c="".concat(r,"-row-expand-icon");if(!l)return t.createElement("span",{className:v()(c,"".concat(r,"-row-spaced"))});return t.createElement("span",{className:v()(c,(n={},h(n,"".concat(r,"-row-expanded"),i),h(n,"".concat(r,"-row-collapsed"),!i),n)),onClick:function(e){a(o,e),e.stopPropagation()}})}function _R(e,n,r){var o=function(e){var t,n=e.expandable,r=m(e,xR);return!1===(t="expandable"in e?oe(oe({},r),n):r).showExpandColumn&&(t.expandIconColumnIndex=-1),t}(e),a=o.expandIcon,i=o.expandedRowKeys,l=o.defaultExpandedRowKeys,c=o.defaultExpandAllRows,s=o.expandedRowRender,d=o.onExpand,p=o.onExpandedRowsChange,h=a||LR,g=o.childrenColumnName||"children",v=t.useMemo((function(){return s?"row":!!(e.expandable&&e.internalHooks===BN&&e.expandable.__PARENT_RENDER_ICON__||n.some((function(e){return e&&"object"===f(e)&&e[g]})))&&"nest"}),[!!s,n]),b=t.useState((function(){return l||(c?function(e,t,n){var r=[];return function e(o){(o||[]).forEach((function(o,a){r.push(t(o,a)),e(o[n])}))}(e),r}(n,r,g):[])})),y=u(b,2),x=y[0],w=y[1],C=t.useMemo((function(){return new Set(i||x||[])}),[i,x]),S=t.useCallback((function(e){var t,o=r(e,n.indexOf(e)),a=C.has(o);a?(C.delete(o),t=nt(C)):t=[].concat(nt(C),[o]),w(t),d&&d(!a,e),p&&p(t)}),[r,C,n,d,p]);return[o,v,C,h,g,S]}function zR(e){var n=(0,t.useRef)(e),r=u((0,t.useState)({}),2)[1],o=(0,t.useRef)(null),a=(0,t.useRef)([]);return(0,t.useEffect)((function(){return function(){o.current=null}}),[]),[n.current,function(e){a.current.push(e);var t=Promise.resolve();o.current=t,t.then((function(){if(o.current===t){var e=a.current,i=n.current;a.current=[],e.forEach((function(e){n.current=e(n.current)})),o.current=null,i!==n.current&&r({})}}))}]}var BR=ae()?window:null;const FR=function(e,n,r){var o=(0,t.useMemo)((function(){var t=n.length,o=function(t,r,o){for(var a=[],i=0,l=t;l!==r;l+=o)a.push(i),n[l].fixed&&(i+=e[l]||0);return a},a=o(0,t,1),i=o(t-1,-1,-1).reverse();return"rtl"===r?{left:i,right:a}:{left:a,right:i}}),[e,n,r]);return o};const HR=function(e){var n=e.className,r=e.children;return t.createElement("div",{className:n},r)};function WR(e,t,n,r){var o=Ea.unstable_batchedUpdates?function(e){Ea.unstable_batchedUpdates(n,e)}:n;return null!==e&&void 0!==e&&e.addEventListener&&e.addEventListener(t,o,r),{remove:function(){null!==e&&void 0!==e&&e.removeEventListener&&e.removeEventListener(t,o,r)}}}function VR(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var UR=function(e,n){var r,o,a=e.scrollBodyRef,i=e.onScroll,l=e.offsetScroll,c=e.container,s=HN(XN,"prefixCls"),d=(null===(r=a.current)||void 0===r?void 0:r.scrollWidth)||0,f=(null===(o=a.current)||void 0===o?void 0:o.clientWidth)||0,p=d&&f*(f/d),m=t.useRef(),g=u(zR({scrollLeft:0,isHiddenScrollBar:!1}),2),b=g[0],y=g[1],x=t.useRef({delta:0,x:0}),w=u(t.useState(!1),2),C=w[0],S=w[1],E=function(){S(!1)},k=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(C&&0!==n){var r=x.current.x+e.pageX-x.current.x-x.current.delta;r<=0&&(r=0),r+p>=f&&(r=f-p),i({scrollLeft:r/f*(d+2)}),x.current.x=e.pageX}else C&&S(!1)},j=function(){if(a.current){var e=VR(a.current).top,t=e+a.current.offsetHeight,n=c===window?document.documentElement.scrollTop+window.innerHeight:VR(c).top+c.clientHeight;t-yc()<=n||e>=n-l?y((function(e){return oe(oe({},e),{},{isHiddenScrollBar:!0})})):y((function(e){return oe(oe({},e),{},{isHiddenScrollBar:!1})}))}},I=function(e){y((function(t){return oe(oe({},t),{},{scrollLeft:e/d*f||0})}))};return t.useImperativeHandle(n,(function(){return{setScrollLeft:I}})),t.useEffect((function(){var e=WR(document.body,"mouseup",E,!1),t=WR(document.body,"mousemove",k,!1);return j(),function(){e.remove(),t.remove()}}),[p,C]),t.useEffect((function(){var e=WR(c,"scroll",j,!1),t=WR(window,"resize",j,!1);return function(){e.remove(),t.remove()}}),[c]),t.useEffect((function(){b.isHiddenScrollBar||y((function(e){var t=a.current;return t?oe(oe({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e}))}),[b.isHiddenScrollBar]),d<=f||!p||b.isHiddenScrollBar?null:t.createElement("div",{style:{height:yc(),width:f,bottom:l},className:"".concat(s,"-sticky-scroll")},t.createElement("div",{onMouseDown:function(e){e.persist(),x.current.delta=e.pageX-b.scrollLeft,x.current.x=0,S(!0),e.preventDefault()},ref:m,className:v()("".concat(s,"-sticky-scroll-bar"),h({},"".concat(s,"-sticky-scroll-bar-active"),C)),style:{width:"".concat(p,"px"),transform:"translate3d(".concat(b.scrollLeft,"px, 0, 0)")}}))};const KR=t.forwardRef(UR);const GR=function(e){return null};const qR=function(e){return null};var XR="rc-table",YR=[],$R={};function JR(){return"No Data"}function QR(e,n){var r,o=oe({rowKey:"key",prefixCls:XR,emptyText:JR},e),i=o.prefixCls,l=o.className,c=o.rowClassName,s=o.style,d=o.data,p=o.rowKey,m=o.scroll,g=o.tableLayout,b=o.direction,y=o.title,x=o.footer,w=o.summary,C=o.caption,S=o.id,E=o.showHeader,k=o.components,j=o.emptyText,I=o.onRow,T=o.onHeaderRow,A=o.internalHooks,O=o.transformColumns,N=o.internalRefs,R=o.tailor,P=o.getContainerWidth,M=o.sticky,D=d||YR,L=!!D.length,_=A===BN;var z=t.useCallback((function(e,t){return Vr(k,e)||t}),[k]),B=t.useMemo((function(){return"function"===typeof p?p:function(e){return e&&e[p]}}),[p]),F=z(["body"]),H=function(){var e=u(t.useState(-1),2),n=e[0],r=e[1],o=u(t.useState(-1),2),a=o[0],i=o[1];return[n,a,t.useCallback((function(e,t){r(e),i(t)}),[])]}(),W=u(H,3),V=W[0],U=W[1],K=W[2],G=u(_R(o,D,B),6),q=G[0],X=G[1],Y=G[2],$=G[3],J=G[4],Q=G[5],Z=null===m||void 0===m?void 0:m.x,ee=u(t.useState(0),2),te=ee[0],ne=ee[1],re=u(DR(oe(oe(oe({},o),q),{},{expandable:!!q.expandedRowRender,columnTitle:q.columnTitle,expandedKeys:Y,getRowKey:B,onTriggerExpand:Q,expandIcon:$,expandIconColumnIndex:q.expandIconColumnIndex,direction:b,scrollWidth:_&&R&&"number"===typeof Z?Z:null,clientWidth:te}),_?O:null),4),ae=re[0],ie=re[1],le=re[2],ce=re[3],se=null!==le&&void 0!==le?le:Z,de=t.useMemo((function(){return{columns:ae,flattenColumns:ie}}),[ae,ie]),ue=t.useRef(),fe=t.useRef(),pe=t.useRef(),he=t.useRef();t.useImperativeHandle(n,(function(){return{nativeElement:ue.current,scrollTo:function(e){var t;if(pe.current instanceof HTMLElement){var n=e.index,r=e.top,o=e.key;if(r){var a;null===(a=pe.current)||void 0===a||a.scrollTo({top:r})}else{var i,l=null!==o&&void 0!==o?o:B(D[n]);null===(i=pe.current.querySelector('[data-row-key="'.concat(l,'"]')))||void 0===i||i.scrollIntoView()}}else null!==(t=pe.current)&&void 0!==t&&t.scrollTo&&pe.current.scrollTo(e)}}}));var me,ge,ve,be=t.useRef(),ye=u(t.useState(!1),2),xe=ye[0],we=ye[1],Ce=u(t.useState(!1),2),Se=Ce[0],Ee=Ce[1],ke=u(zR(new Map),2),je=ke[0],Ie=ke[1],Te=JN(ie).map((function(e){return je.get(e)})),Ae=t.useMemo((function(){return Te}),[Te.join("_")]),Oe=FR(Ae,ie,b),Ne=m&&QN(m.y),Re=m&&QN(se)||Boolean(q.fixed),Pe=Re&&ie.some((function(e){return e.fixed})),Me=t.useRef(),De=function(e,n){var r="object"===f(e)?e:{},o=r.offsetHeader,a=void 0===o?0:o,i=r.offsetSummary,l=void 0===i?0:i,c=r.offsetScroll,s=void 0===c?0:c,d=r.getContainer,u=(void 0===d?function(){return BR}:d)()||BR;return t.useMemo((function(){var t=!!e;return{isSticky:t,stickyClassName:t?"".concat(n,"-sticky-holder"):"",offsetHeader:a,offsetSummary:l,offsetScroll:s,container:u}}),[s,a,l,n,u])}(M,i),Le=De.isSticky,_e=De.offsetHeader,ze=De.offsetSummary,Be=De.offsetScroll,Fe=De.stickyClassName,He=De.container,We=t.useMemo((function(){return null===w||void 0===w?void 0:w(D)}),[w,D]),Ve=(Ne||Le)&&t.isValidElement(We)&&We.type===iR&&We.props.fixed;Ne&&(ge={overflowY:"scroll",maxHeight:m.y}),Re&&(me={overflowX:"auto"},Ne||(ge={overflowY:"hidden"}),ve={width:!0===se?"auto":se,minWidth:"100%"});var Ue=t.useCallback((function(e,t){da(ue.current)&&Ie((function(n){if(n.get(e)!==t){var r=new Map(n);return r.set(e,t),r}return n}))}),[]),Ke=u(function(e){var n=(0,t.useRef)(e||null),r=(0,t.useRef)();function o(){window.clearTimeout(r.current)}return(0,t.useEffect)((function(){return o}),[]),[function(e){n.current=e,o(),r.current=window.setTimeout((function(){n.current=null,r.current=void 0}),100)},function(){return n.current}]}(null),2),Ge=Ke[0],qe=Ke[1];function Xe(e,t){t&&("function"===typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout((function(){t.scrollLeft=e}),0)))}var Ye=Mr((function(e){var t,n=e.currentTarget,r=e.scrollLeft,o="rtl"===b,a="number"===typeof r?r:n.scrollLeft,i=n||$R;qe()&&qe()!==i||(Ge(i),Xe(a,fe.current),Xe(a,pe.current),Xe(a,be.current),Xe(a,null===(t=Me.current)||void 0===t?void 0:t.setScrollLeft));var l=n||fe.current;if(l){var c=l.scrollWidth,s=l.clientWidth;if(c===s)return we(!1),void Ee(!1);o?(we(-a<c-s),Ee(-a>0)):(we(a>0),Ee(a<c-s))}})),$e=function(){Re&&pe.current?Ye({currentTarget:pe.current}):(we(!1),Ee(!1))},Je=t.useRef(!1);t.useEffect((function(){Je.current&&$e()}),[Re,d,ae.length]),t.useEffect((function(){Je.current=!0}),[]);var Qe=u(t.useState(0),2),Ze=Qe[0],et=Qe[1],tt=u(t.useState(!0),2),nt=tt[0],rt=tt[1];t.useEffect((function(){var e,t;R&&_||(pe.current instanceof Element?et(wc(pe.current).width):et(wc(he.current).width)),rt((e="position",t="sticky",Array.isArray(e)||void 0===t?sR(e):dR(e,t)))}),[]),t.useEffect((function(){_&&N&&(N.body.current=pe.current)}));var ot,at=t.useCallback((function(e){return t.createElement(t.Fragment,null,t.createElement(TR,e),"top"===Ve&&t.createElement(lR,e,We))}),[Ve,We]),it=t.useCallback((function(e){return t.createElement(lR,e,We)}),[We]),lt=z(["table"],"table"),ct=t.useMemo((function(){return g||(Pe?"max-content"===se?"auto":"fixed":Ne||Le||ie.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[Ne,Pe,ie,g,Le]),st={colWidths:Ae,columCount:ie.length,stickyOffsets:Oe,onHeaderRow:T,fixHeader:Ne,scroll:m},dt=t.useMemo((function(){return L?null:"function"===typeof j?j():j}),[L,j]),ut=t.createElement(yR,{data:D,measureColumnWidth:Ne||Re||Le}),ft=t.createElement(SR,{colWidths:ie.map((function(e){return e.width})),columns:ie}),pt=null!==C&&void 0!==C?t.createElement("caption",{className:"".concat(i,"-caption")},C):void 0,ht=hx(o,{data:!0}),mt=hx(o,{aria:!0});if(Ne||Le){var gt;"function"===typeof F?(gt=F(D,{scrollbarSize:Ze,ref:pe,onScroll:Ye}),st.colWidths=ie.map((function(e,t){var n=e.width,r=t===ie.length-1?n-Ze:n;return"number"!==typeof r||Number.isNaN(r)?0:r}))):gt=t.createElement("div",{style:oe(oe({},me),ge),onScroll:Ye,ref:pe,className:v()("".concat(i,"-body"))},t.createElement(lt,a({style:oe(oe({},ve),{},{tableLayout:ct})},mt),pt,ft,ut,!Ve&&We&&t.createElement(lR,{stickyOffsets:Oe,flattenColumns:ie,columns:ae},We)));var vt=oe(oe(oe({noData:!D.length,maxContentScroll:Re&&"max-content"===se},st),de),{},{direction:b,stickyClassName:Fe,onScroll:Ye});ot=t.createElement(t.Fragment,null,!1!==E&&t.createElement(jR,a({},vt,{stickyTopOffset:_e,className:"".concat(i,"-header"),ref:fe}),at),gt,Ve&&"top"!==Ve&&t.createElement(jR,a({},vt,{stickyBottomOffset:ze,className:"".concat(i,"-summary"),ref:be}),it),Le&&pe.current&&pe.current instanceof Element&&t.createElement(KR,{ref:Me,offsetScroll:Be,scrollBodyRef:pe,onScroll:Ye,container:He}))}else ot=t.createElement("div",{style:oe(oe({},me),ge),className:v()("".concat(i,"-content")),onScroll:Ye,ref:pe},t.createElement(lt,a({style:oe(oe({},ve),{},{tableLayout:ct})},mt),pt,ft,!1!==E&&t.createElement(TR,a({},st,de)),ut,We&&t.createElement(lR,{stickyOffsets:Oe,flattenColumns:ie,columns:ae},We)));var bt=t.createElement("div",a({className:v()(i,l,(r={},h(r,"".concat(i,"-rtl"),"rtl"===b),h(r,"".concat(i,"-ping-left"),xe),h(r,"".concat(i,"-ping-right"),Se),h(r,"".concat(i,"-layout-fixed"),"fixed"===g),h(r,"".concat(i,"-fixed-header"),Ne),h(r,"".concat(i,"-fixed-column"),Pe),h(r,"".concat(i,"-fixed-column-gapped"),Pe&&ce),h(r,"".concat(i,"-scroll-horizontal"),Re),h(r,"".concat(i,"-has-fix-left"),ie[0]&&ie[0].fixed),h(r,"".concat(i,"-has-fix-right"),ie[ie.length-1]&&"right"===ie[ie.length-1].fixed),r)),style:s,id:S,ref:ue},ht),y&&t.createElement(HR,{className:"".concat(i,"-title")},y(D)),t.createElement("div",{ref:he,className:"".concat(i,"-container")},ot),x&&t.createElement(HR,{className:"".concat(i,"-footer")},x(D)));Re&&(bt=t.createElement(as,{onResize:function(e){var t=e.width,n=ue.current?ue.current.offsetWidth:t;_&&P&&ue.current&&(n=P(ue.current,n)||n),n!==te&&($e(),ne(n))}},bt));var yt=function(e,t,n,r){var o=e.map((function(o,a){return nR(a,a,e,t,n,null===r||void 0===r?void 0:r[a])}));return It((function(){return o}),[o],(function(e,t){return!Tt(e,t)}))}(ie,Oe,b,ae),xt=t.useMemo((function(){return{scrollX:se,prefixCls:i,getComponent:z,scrollbarSize:Ze,direction:b,fixedInfoList:yt,isSticky:Le,supportSticky:nt,componentWidth:te,fixHeader:Ne,fixColumn:Pe,horizonScroll:Re,tableLayout:ct,rowClassName:c,expandedRowClassName:q.expandedRowClassName,expandIcon:$,expandableType:X,expandRowByClick:q.expandRowByClick,expandedRowRender:q.expandedRowRender,onTriggerExpand:Q,expandIconColumnIndex:q.expandIconColumnIndex,indentSize:q.indentSize,allColumnsFixedLeft:ie.every((function(e){return"left"===e.fixed})),emptyNode:dt,columns:ae,flattenColumns:ie,onColumnResize:Ue,hoverStartRow:V,hoverEndRow:U,onHover:K,rowExpandable:q.rowExpandable,onRow:I,getRowKey:B,expandedKeys:Y,childrenColumnName:J}}),[se,i,z,Ze,b,yt,Le,nt,te,Ne,Pe,Re,ct,c,q.expandedRowClassName,$,X,q.expandRowByClick,q.expandedRowRender,Q,q.expandIconColumnIndex,q.indentSize,dt,ae,ie,Ue,V,U,K,q.rowExpandable,I,B,Y,J]);return t.createElement(XN.Provider,{value:xt},bt)}var ZR=t.forwardRef(QR);function eP(e){return KN(ZR,e)}var tP=eP();tP.EXPAND_COLUMN=zN,tP.INTERNAL_HOOKS=BN,tP.Column=GR,tP.ColumnGroup=qR,tP.Summary=cR;const nP=tP;var rP=FN(null),oP=FN(null);const aP=function(e){var n=e.rowInfo,r=e.column,o=e.colIndex,i=e.indent,l=e.index,c=e.component,s=e.renderIndex,d=e.record,u=e.style,f=e.className,p=e.inverse,h=e.getHeight,m=r.render,g=r.dataIndex,b=r.className,y=r.width,x=HN(oP,["columnsOffset"]).columnsOffset,w=mR(n,r,o,i,l),C=w.key,S=w.fixedInfo,E=w.appendCellNode,k=w.additionalCellProps,j=k.style,I=k.colSpan,T=void 0===I?1:I,A=k.rowSpan,O=void 0===A?1:A,N=function(e,t,n){return n[e+(t||1)]-(n[e]||0)}(o-1,T,x),R=T>1?y-N:0,P=oe(oe(oe({},j),u),{},{flex:"0 0 ".concat(N,"px"),width:"".concat(N,"px"),marginRight:R,pointerEvents:"auto"}),M=t.useMemo((function(){return p?O<=1:0===T||0===O||O>1}),[O,T,p]);M?P.visibility="hidden":p&&(P.height=null===h||void 0===h?void 0:h(O));var D=M?function(){return null}:m,L={};return 0!==O&&0!==T||(L.rowSpan=1,L.colSpan=1),t.createElement(tR,a({className:v()(b,f),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:c,prefixCls:n.prefixCls,key:C,record:d,index:l,renderIndex:s,dataIndex:g,render:D,shouldCellUpdate:r.shouldCellUpdate},S,{appendNode:E,additionalProps:oe(oe({},k),{},{style:P},L)}))};var iP=["data","index","className","rowKey","style","extra","getHeight"],lP=t.forwardRef((function(e,n){var r,o=e.data,i=e.index,l=e.className,c=e.rowKey,s=e.style,d=e.extra,u=e.getHeight,f=m(e,iP),p=o.record,g=o.indent,b=o.index,y=HN(XN,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),x=y.scrollX,w=y.flattenColumns,C=y.prefixCls,S=y.fixColumn,E=y.componentWidth,k=HN(rP,["getComponent"]).getComponent,j=pR(p,c,i,g),I=k(["body","row"],"div"),T=k(["body","cell"],"div"),A=j.rowSupportExpand,O=j.expanded,N=j.rowProps,R=j.expandedRowRender,P=j.expandedRowClassName;if(A&&O){var M=R(p,i,g+1,O),D=null===P||void 0===P?void 0:P(p,i,g),L={};S&&(L={style:h({},"--virtual-width","".concat(E,"px"))});var _="".concat(C,"-expanded-row-cell");r=t.createElement(I,{className:v()("".concat(C,"-expanded-row"),"".concat(C,"-expanded-row-level-").concat(g+1),D)},t.createElement(tR,{component:T,prefixCls:C,className:v()(_,h({},"".concat(_,"-fixed"),S)),additionalProps:L},M))}var z=oe(oe({},s),{},{width:x});d&&(z.position="absolute",z.pointerEvents="none");var B=t.createElement(I,a({},N,f,{ref:A?null:n,className:v()(l,"".concat(C,"-row"),null===N||void 0===N?void 0:N.className,h({},"".concat(C,"-row-extra"),d)),style:oe(oe({},z),null===N||void 0===N?void 0:N.style)}),w.map((function(e,n){return t.createElement(aP,{key:n,component:T,rowInfo:j,column:e,colIndex:n,indent:g,index:i,renderIndex:b,record:p,inverse:d,getHeight:u})})));return A?t.createElement("div",{ref:n},B,r):B}));const cP=GN(lP);var sP=t.forwardRef((function(e,n){var r=e.data,o=e.onScroll,i=HN(XN,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),l=i.flattenColumns,c=i.onColumnResize,s=i.getRowKey,d=i.expandedKeys,p=i.prefixCls,h=i.childrenColumnName,m=i.emptyNode,g=i.scrollX,b=HN(rP),y=b.sticky,x=b.scrollY,w=b.listItemHeight,C=b.getComponent,S=t.useRef(),E=fR(r,h,d,s),k=t.useMemo((function(){var e=0;return l.map((function(t){var n=t.width;return[t.key,n,e+=n]}))}),[l]),j=t.useMemo((function(){return k.map((function(e){return e[2]}))}),[k]);t.useEffect((function(){k.forEach((function(e){var t=u(e,2),n=t[0],r=t[1];c(n,r)}))}),[k]),t.useImperativeHandle(n,(function(){var e={scrollTo:function(e){var t;null===(t=S.current)||void 0===t||t.scrollTo(e)}};return Object.defineProperty(e,"scrollLeft",{get:function(){var e;return(null===(e=S.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=S.current)||void 0===t||t.scrollTo({left:e})}}),e}));var I,T=function(e,t){var n,r=null===(n=E[t])||void 0===n?void 0:n.record,o=e.onCell;if(o){var a,i=o(r,t);return null!==(a=null===i||void 0===i?void 0:i.rowSpan)&&void 0!==a?a:1}return 1},A=t.useMemo((function(){return{columnsOffset:j}}),[j]),O="".concat(p,"-tbody"),N=C(["body","wrapper"]),R=C(["body","row"],"div"),P=C(["body","cell"],"div");if(E.length){var M={};y&&(M.position="sticky",M.bottom=0,"object"===f(y)&&y.offsetScroll&&(M.bottom=y.offsetScroll)),I=t.createElement(PA,{fullHeight:!1,ref:S,styles:{horizontalScrollBar:M},className:v()(O,"".concat(O,"-virtual")),height:x,itemHeight:w||24,data:E,itemKey:function(e){return s(e.record)},component:N,scrollWidth:g,onVirtualScroll:function(e){var t=e.x;o({scrollLeft:t})},extraRender:function(e){var n=e.start,r=e.end,o=e.getSize,a=e.offsetY;if(r<0)return null;for(var i=l.filter((function(e){return 0===T(e,n)})),c=n,d=function(e){if(i=i.filter((function(t){return 0===T(t,e)})),!i.length)return c=e,1},u=n;u>=0&&!d(u);u-=1);for(var f=l.filter((function(e){return 1!==T(e,r)})),p=r,h=function(e){if(f=f.filter((function(t){return 1!==T(t,e)})),!f.length)return p=Math.max(e-1,r),1},m=r;m<E.length&&!h(m);m+=1);for(var g=[],v=function(e){if(!E[e])return 1;l.some((function(t){return T(t,e)>1}))&&g.push(e)},b=c;b<=p;b+=1)v(b);var y=g.map((function(e){var n=E[e],r=s(n.record,e),i=o(r);return t.createElement(cP,{key:e,data:n,rowKey:r,index:e,style:{top:-a+i.top},extra:!0,getHeight:function(t){var n=e+t-1,a=s(E[n].record,n),i=o(r,a);return i.bottom-i.top}})}));return y}},(function(e,n,r){var o=s(e.record,n);return t.createElement(cP,a({data:e,rowKey:o,index:n},r))}))}else I=t.createElement(R,{className:v()("".concat(p,"-placeholder"))},t.createElement(tR,{component:P,prefixCls:p},m));return t.createElement(oP.Provider,{value:A},I)}));const dP=GN(sP);var uP=function(e,n){var r=n.ref,o=n.onScroll;return t.createElement(dP,{ref:r,data:e,onScroll:o})};function fP(e,n){var r=e.columns,o=e.scroll,i=e.sticky,l=e.prefixCls,c=void 0===l?XR:l,s=e.className,d=e.listItemHeight,u=e.components,f=o||{},p=f.x,h=f.y;"number"!==typeof p&&(p=1),"number"!==typeof h&&(h=500);var m=Mr((function(e,t){return Vr(u,e)||t})),g=t.useMemo((function(){return{sticky:i,scrollY:h,listItemHeight:d,getComponent:m}}),[i,h,d,m]);return t.createElement(rP.Provider,{value:g},t.createElement(nP,a({},e,{className:v()(s,"".concat(c,"-virtual")),scroll:oe(oe({},o),{},{x:p}),components:oe(oe({},u),{},{body:uP}),columns:r,internalHooks:BN,tailor:!0,ref:n})))}var pP=t.forwardRef(fP);function hP(e){return KN(pP,e)}hP();const mP=function(e){return null};const gP=function(e){return null};var vP=t.createContext(null),bP=function(e){for(var n=e.prefixCls,r=e.level,o=e.isStart,a=e.isEnd,i="".concat(n,"-indent-unit"),l=[],c=0;c<r;c+=1)l.push(t.createElement("span",{key:c,className:v()(i,h(h({},"".concat(i,"-start"),o[c]),"".concat(i,"-end"),a[c]))}));return t.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},l)};const yP=t.memo(bP);function xP(e,t){return e[t]}var wP=["children"];function CP(e,t){return"".concat(e,"-").concat(t)}function SP(e,t){return null!==e&&void 0!==e?e:t}function EP(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function kP(e){return function e(t){return st(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return Ie(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,a=oe({key:n},m(r,wP)),i=e(o);return i.length&&(a.children=i),a})).filter((function(e){return e}))}(e)}function jP(e,t,n){var r=EP(n),o=r._title,a=r.key,i=r.children,l=new Set(!0===t?[]:t),c=[];return function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(s,d){for(var u,f=CP(r?r.pos:"0",d),p=SP(s[a],f),h=0;h<o.length;h+=1){var m=o[h];if(void 0!==s[m]){u=s[m];break}}var g=oe(oe({},rt(s,[].concat(nt(o),[a,i]))),{},{title:u,key:p,parent:r,pos:f,children:null,data:s,isStart:[].concat(nt(r?r.isStart:[]),[0===d]),isEnd:[].concat(nt(r?r.isEnd:[]),[d===n.length-1])});return c.push(g),!0===t||l.has(p)?g.children=e(s[i]||[],g):g.children=[],g}))}(e),c}function IP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,i=t.childrenPropName,l=t.fieldNames,c=a||(arguments.length>2?arguments[2]:void 0),s={},d={},u={posEntities:s,keyEntities:d};return n&&(u=n(u)||u),function(e,t,n){var r,o=("object"===f(n)?n:{externalGetKey:n})||{},a=o.childrenPropName,i=o.externalGetKey,l=EP(o.fieldNames),c=l.key,s=l.children,d=a||s;i?"string"===typeof i?r=function(e){return e[i]}:"function"===typeof i&&(r=function(e){return i(e)}):r=function(e,t){return SP(e[c],t)},function n(o,a,i,l){var c=o?o[d]:e,s=o?CP(i.pos,a):"0",u=o?[].concat(nt(l),[o]):[];if(o){var f=r(o,s),p={node:o,index:a,pos:s,key:f,parentPos:i.node?i.pos:null,level:i.level+1,nodes:u};t(p)}c&&c.forEach((function(e,t){n(e,t,{node:o,pos:s,level:i?i.level+1:-1},u)}))}(null)}(e,(function(e){var t=e.node,n=e.index,o=e.pos,a=e.key,i=e.parentPos,l=e.level,c={node:t,nodes:e.nodes,index:n,key:a,pos:o,level:l},f=SP(a,o);s[o]=c,d[f]=c,c.parent=s[i],c.parent&&(c.parent.children=c.parent.children||[],c.parent.children.push(c)),r&&r(c,u)}),{externalGetKey:c,childrenPropName:i,fieldNames:l}),o&&o(u),u}function TP(e,t){var n=t.expandedKeys,r=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,i=t.checkedKeys,l=t.halfCheckedKeys,c=t.dragOverNodeKey,s=t.dropPosition,d=xP(t.keyEntities,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==o.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==i.indexOf(e),halfChecked:-1!==l.indexOf(e),pos:String(d?d.pos:""),dragOver:c===e&&0===s,dragOverGapTop:c===e&&-1===s,dragOverGapBottom:c===e&&1===s}}function AP(e){var t=e.data,n=e.expanded,r=e.selected,o=e.checked,a=e.loaded,i=e.loading,l=e.halfChecked,c=e.dragOver,s=e.dragOverGapTop,d=e.dragOverGapBottom,u=e.pos,f=e.active,p=e.eventKey,h=oe(oe({},t),{},{expanded:n,selected:r,checked:o,loaded:a,loading:i,halfChecked:l,dragOver:c,dragOverGapTop:s,dragOverGapBottom:d,pos:u,active:f,key:p});return"props"in h||Object.defineProperty(h,"props",{get:function(){return Ie(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),h}var OP=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],NP="open",RP="close",PP=function(e){Ro(r,e);var n=Na(r);function r(){var e;At(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return h(Io(e=n.call.apply(n,[this].concat(a))),"state",{dragNodeHighlight:!1}),h(Io(e),"selectHandle",void 0),h(Io(e),"cacheIndent",void 0),h(Io(e),"onSelectorClick",(function(t){(0,e.props.context.onNodeClick)(t,AP(e.props)),e.isSelectable()?e.onSelect(t):e.onCheck(t)})),h(Io(e),"onSelectorDoubleClick",(function(t){(0,e.props.context.onNodeDoubleClick)(t,AP(e.props))})),h(Io(e),"onSelect",(function(t){e.isDisabled()||(0,e.props.context.onNodeSelect)(t,AP(e.props))})),h(Io(e),"onCheck",(function(t){if(!e.isDisabled()){var n=e.props,r=n.disableCheckbox,o=n.checked,a=e.props.context.onNodeCheck;if(e.isCheckable()&&!r){var i=!o;a(t,AP(e.props),i)}}})),h(Io(e),"onMouseEnter",(function(t){(0,e.props.context.onNodeMouseEnter)(t,AP(e.props))})),h(Io(e),"onMouseLeave",(function(t){(0,e.props.context.onNodeMouseLeave)(t,AP(e.props))})),h(Io(e),"onContextMenu",(function(t){(0,e.props.context.onNodeContextMenu)(t,AP(e.props))})),h(Io(e),"onDragStart",(function(t){var n=e.props.context.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),n(t,Io(e));try{t.dataTransfer.setData("text/plain","")}catch(r){}})),h(Io(e),"onDragEnter",(function(t){var n=e.props.context.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),n(t,Io(e))})),h(Io(e),"onDragOver",(function(t){var n=e.props.context.onNodeDragOver;t.preventDefault(),t.stopPropagation(),n(t,Io(e))})),h(Io(e),"onDragLeave",(function(t){var n=e.props.context.onNodeDragLeave;t.stopPropagation(),n(t,Io(e))})),h(Io(e),"onDragEnd",(function(t){var n=e.props.context.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Io(e))})),h(Io(e),"onDrop",(function(t){var n=e.props.context.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Io(e))})),h(Io(e),"onExpand",(function(t){var n=e.props,r=n.loading,o=n.context.onNodeExpand;r||o(t,AP(e.props))})),h(Io(e),"setSelectHandle",(function(t){e.selectHandle=t})),h(Io(e),"getNodeState",(function(){var t=e.props.expanded;return e.isLeaf()?null:t?NP:RP})),h(Io(e),"hasChildren",(function(){var t=e.props.eventKey;return!!((xP(e.props.context.keyEntities,t)||{}).children||[]).length})),h(Io(e),"isLeaf",(function(){var t=e.props,n=t.isLeaf,r=t.loaded,o=e.props.context.loadData,a=e.hasChildren();return!1!==n&&(n||!o&&!a||o&&r&&!a)})),h(Io(e),"isDisabled",(function(){var t=e.props.disabled;return!(!e.props.context.disabled&&!t)})),h(Io(e),"isCheckable",(function(){var t=e.props.checkable,n=e.props.context.checkable;return!(!n||!1===t)&&n})),h(Io(e),"syncLoadData",(function(t){var n=t.expanded,r=t.loading,o=t.loaded,a=e.props.context,i=a.loadData,l=a.onNodeLoad;r||i&&n&&!e.isLeaf()&&(e.hasChildren()||o||l(AP(e.props)))})),h(Io(e),"isDraggable",(function(){var t=e.props,n=t.data,r=t.context.draggable;return!(!r||r.nodeDraggable&&!r.nodeDraggable(n))})),h(Io(e),"renderDragHandler",(function(){var n=e.props.context,r=n.draggable,o=n.prefixCls;return null!==r&&void 0!==r&&r.icon?t.createElement("span",{className:"".concat(o,"-draggable-icon")},r.icon):null})),h(Io(e),"renderSwitcherIconDom",(function(t){var n=e.props.switcherIcon,r=e.props.context.switcherIcon,o=n||r;return"function"===typeof o?o(oe(oe({},e.props),{},{isLeaf:t})):o})),h(Io(e),"renderSwitcher",(function(){var n=e.props.expanded,r=e.props.context.prefixCls;if(e.isLeaf()){var o=e.renderSwitcherIconDom(!0);return!1!==o?t.createElement("span",{className:v()("".concat(r,"-switcher"),"".concat(r,"-switcher-noop"))},o):null}var a=v()("".concat(r,"-switcher"),"".concat(r,"-switcher_").concat(n?NP:RP)),i=e.renderSwitcherIconDom(!1);return!1!==i?t.createElement("span",{onClick:e.onExpand,className:a},i):null})),h(Io(e),"renderCheckbox",(function(){var n=e.props,r=n.checked,o=n.halfChecked,a=n.disableCheckbox,i=e.props.context.prefixCls,l=e.isDisabled(),c=e.isCheckable();if(!c)return null;var s="boolean"!==typeof c?c:null;return t.createElement("span",{className:v()("".concat(i,"-checkbox"),r&&"".concat(i,"-checkbox-checked"),!r&&o&&"".concat(i,"-checkbox-indeterminate"),(l||a)&&"".concat(i,"-checkbox-disabled")),onClick:e.onCheck},s)})),h(Io(e),"renderIcon",(function(){var n=e.props.loading,r=e.props.context.prefixCls;return t.createElement("span",{className:v()("".concat(r,"-iconEle"),"".concat(r,"-icon__").concat(e.getNodeState()||"docu"),n&&"".concat(r,"-icon_loading"))})})),h(Io(e),"renderSelector",(function(){var n,r,o=e.state.dragNodeHighlight,a=e.props,i=a.title,l=void 0===i?"---":i,c=a.selected,s=a.icon,d=a.loading,u=a.data,f=e.props.context,p=f.prefixCls,h=f.showIcon,m=f.icon,g=f.loadData,b=f.titleRender,y=e.isDisabled(),x="".concat(p,"-node-content-wrapper");if(h){var w=s||m;n=w?t.createElement("span",{className:v()("".concat(p,"-iconEle"),"".concat(p,"-icon__customize"))},"function"===typeof w?w(e.props):w):e.renderIcon()}else g&&d&&(n=e.renderIcon());r="function"===typeof l?l(u):b?b(u):l;var C=t.createElement("span",{className:"".concat(p,"-title")},r);return t.createElement("span",{ref:e.setSelectHandle,title:"string"===typeof l?l:"",className:v()("".concat(x),"".concat(x,"-").concat(e.getNodeState()||"normal"),!y&&(c||o)&&"".concat(p,"-node-selected")),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick},n,C,e.renderDropIndicator())})),h(Io(e),"renderDropIndicator",(function(){var t=e.props,n=t.disabled,r=t.eventKey,o=e.props.context,a=o.draggable,i=o.dropLevelOffset,l=o.dropPosition,c=o.prefixCls,s=o.indent,d=o.dropIndicatorRender,u=o.dragOverNodeKey,f=o.direction,p=!n&&!!a&&u===r,h=null!==s&&void 0!==s?s:e.cacheIndent;return e.cacheIndent=s,p?d({dropPosition:l,dropLevelOffset:i,indent:h,prefixCls:c,direction:f}):null})),e}return Nt(r,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.props.context.selectable;return"boolean"===typeof e?e:t}},{key:"render",value:function(){var e,n=this.props,r=n.eventKey,o=n.className,i=n.style,l=n.dragOver,c=n.dragOverGapTop,s=n.dragOverGapBottom,d=n.isLeaf,u=n.isStart,f=n.isEnd,p=n.expanded,g=n.selected,b=n.checked,y=n.halfChecked,x=n.loading,w=n.domRef,C=n.active,S=(n.data,n.onMouseMove),E=n.selectable,k=m(n,OP),j=this.props.context,I=j.prefixCls,T=j.filterTreeNode,A=j.keyEntities,O=j.dropContainerKey,N=j.dropTargetKey,R=j.draggingNodeKey,P=this.isDisabled(),M=hx(k,{aria:!0,data:!0}),D=(xP(A,r)||{}).level,L=f[f.length-1],_=this.isDraggable(),z=!P&&_,B=R===r,F=void 0!==E?{"aria-selected":!!E}:void 0;return t.createElement("div",a({ref:w,className:v()(o,"".concat(I,"-treenode"),(e={},h(h(h(h(h(h(h(h(h(h(e,"".concat(I,"-treenode-disabled"),P),"".concat(I,"-treenode-switcher-").concat(p?"open":"close"),!d),"".concat(I,"-treenode-checkbox-checked"),b),"".concat(I,"-treenode-checkbox-indeterminate"),y),"".concat(I,"-treenode-selected"),g),"".concat(I,"-treenode-loading"),x),"".concat(I,"-treenode-active"),C),"".concat(I,"-treenode-leaf-last"),L),"".concat(I,"-treenode-draggable"),_),"dragging",B),h(h(h(h(h(h(e,"drop-target",N===r),"drop-container",O===r),"drag-over",!P&&l),"drag-over-gap-top",!P&&c),"drag-over-gap-bottom",!P&&s),"filter-node",T&&T(AP(this.props))))),style:i,draggable:z,"aria-grabbed":B,onDragStart:z?this.onDragStart:void 0,onDragEnter:_?this.onDragEnter:void 0,onDragOver:_?this.onDragOver:void 0,onDragLeave:_?this.onDragLeave:void 0,onDrop:_?this.onDrop:void 0,onDragEnd:_?this.onDragEnd:void 0,onMouseMove:S},F,M),t.createElement(yP,{prefixCls:I,level:D,isStart:u,isEnd:f}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),r}(t.Component),MP=function(e){return t.createElement(vP.Consumer,null,(function(n){return t.createElement(PP,a({},e,{context:n}))}))};MP.displayName="TreeNode",MP.isTreeNode=1;const DP=MP;function LP(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function _P(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function zP(e){return e.split("-")}function BP(e,t){var n=[];return function e(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var r=t.key,o=t.children;n.push(r),e(o)}))}(xP(t,e).children),n}function FP(e){if(e.parent){var t=zP(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function HP(e,t,n,r,o,a,i,l,c,s){var d,u=e.clientX,f=e.clientY,p=e.target.getBoundingClientRect(),h=p.top,m=p.height,g=(("rtl"===s?-1:1)*(((null===o||void 0===o?void 0:o.x)||0)-u)-12)/r,v=c.filter((function(e){var t;return null===(t=l[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),b=xP(l,n.props.eventKey);if(f<h+m/2){var y=i.findIndex((function(e){return e.key===b.key})),x=i[y<=0?0:y-1].key;b=xP(l,x)}var w=b.key,C=b,S=b.key,E=0,k=0;if(!v.includes(w))for(var j=0;j<g&&FP(b);j+=1)b=b.parent,k+=1;var I=t.props.data,T=b.node,A=!0;return function(e){var t=zP(e.pos);return 0===Number(t[t.length-1])}(b)&&0===b.level&&f<h+m/2&&a({dragNode:I,dropNode:T,dropPosition:-1})&&b.key===n.props.eventKey?E=-1:(C.children||[]).length&&v.includes(S)?a({dragNode:I,dropNode:T,dropPosition:0})?E=0:A=!1:0===k?g>-1.5?a({dragNode:I,dropNode:T,dropPosition:1})?E=1:A=!1:a({dragNode:I,dropNode:T,dropPosition:0})?E=0:a({dragNode:I,dropNode:T,dropPosition:1})?E=1:A=!1:a({dragNode:I,dropNode:T,dropPosition:1})?E=1:A=!1,{dropPosition:E,dropLevelOffset:k,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:S,dropContainerKey:0===E?null:(null===(d=b.parent)||void 0===d?void 0:d.key)||null,dropAllowed:A}}function WP(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function VP(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==f(e))return Ie(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function UP(e,t){var n=new Set;function r(e){if(!n.has(e)){var o=xP(t,e);if(o){n.add(e);var a=o.parent;o.node.disabled||a&&r(a.key)}}}return(e||[]).forEach((function(e){r(e)})),nt(n)}function KP(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function GP(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,o=t.checkable;return!(!n&&!r)||!1===o}function qP(e,t,n,r){var o,a=[];o=r||GP;var i,l=new Set(e.filter((function(e){var t=!!xP(n,e);return t||a.push(e),t}))),c=new Map,s=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,o=c.get(r);o||(o=new Set,c.set(r,o)),o.add(t),s=Math.max(s,r)})),Ie(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),i=!0===t?function(e,t,n,r){for(var o=new Set(e),a=new Set,i=0;i<=n;i+=1)(t.get(i)||new Set).forEach((function(e){var t=e.key,n=e.node,a=e.children,i=void 0===a?[]:a;o.has(t)&&!r(n)&&i.filter((function(e){return!r(e.node)})).forEach((function(e){o.add(e.key)}))}));for(var l=new Set,c=n;c>=0;c-=1)(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,c=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);i&&!n&&(i=!1),c||!n&&!a.has(t)||(c=!0)})),i&&o.add(t.key),c&&a.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(KP(a,o))}}(l,c,s,o):function(e,t,n,r,o){for(var a=new Set(e),i=new Set(t),l=0;l<=r;l+=1)(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,l=void 0===r?[]:r;a.has(t)||i.has(t)||o(n)||l.filter((function(e){return!o(e.node)})).forEach((function(e){a.delete(e.key)}))}));i=new Set;for(var c=new Set,s=r;s>=0;s-=1)(n.get(s)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!o(n)&&e.parent&&!c.has(e.parent.key))if(o(e.parent.node))c.add(t.key);else{var r=!0,l=!1;(t.children||[]).filter((function(e){return!o(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);r&&!n&&(r=!1),l||!n&&!i.has(t)||(l=!0)})),r||a.delete(t.key),l&&i.add(t.key),c.add(t.key)}}));return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(KP(i,a))}}(l,t.halfCheckedKeys,c,s,o),i}const XP=t.createContext(null),YP=e=>{const{checkboxCls:t}=e,n="".concat(t,"-wrapper");return[{["".concat(t,"-group")]:Object.assign(Object.assign({},$r(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,["> ".concat(e.antCls,"-row")]:{flex:1}}),[n]:Object.assign(Object.assign({},$r(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},["& + ".concat(n)]:{marginInlineStart:0},["&".concat(n,"-in-form-item")]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},$r(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",["".concat(t,"-input")]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,["&:focus-visible + ".concat(t,"-inner")]:Object.assign({},Zr(e))},["".concat(t,"-inner")]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:"all ".concat(e.motionDurationSlow),"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:"".concat(rn(e.lineWidthBold)," solid ").concat(e.colorWhite),borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:"all ".concat(e.motionDurationFast," ").concat(e.motionEaseInBack,", opacity ").concat(e.motionDurationFast)}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{["\n        ".concat(n,":not(").concat(n,"-disabled),\n        ").concat(t,":not(").concat(t,"-disabled)\n      ")]:{["&:hover ".concat(t,"-inner")]:{borderColor:e.colorPrimary}},["".concat(n,":not(").concat(n,"-disabled)")]:{["&:hover ".concat(t,"-checked:not(").concat(t,"-disabled) ").concat(t,"-inner")]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},["&:hover ".concat(t,"-checked:not(").concat(t,"-disabled):after")]:{borderColor:e.colorPrimaryHover}}},{["".concat(t,"-checked")]:{["".concat(t,"-inner")]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack," ").concat(e.motionDurationFast)}}},["\n        ".concat(n,"-checked:not(").concat(n,"-disabled),\n        ").concat(t,"-checked:not(").concat(t,"-disabled)\n      ")]:{["&:hover ".concat(t,"-inner")]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{["".concat(t,"-inner")]:{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{["".concat(n,"-disabled")]:{cursor:"not-allowed"},["".concat(t,"-disabled")]:{["&, ".concat(t,"-input")]:{cursor:"not-allowed",pointerEvents:"none"},["".concat(t,"-inner")]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},["&".concat(t,"-indeterminate ").concat(t,"-inner::after")]:{background:e.colorTextDisabled}}}]};function $P(e,t){const n=Ho(t,{checkboxCls:".".concat(e),checkboxSize:t.controlInteractiveSize});return[YP(n)]}const JP=$o("Checkbox",((e,t)=>{let{prefixCls:n}=t;return[$P(n,e)]}));var QP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const ZP=(e,n)=>{var r;const{prefixCls:o,className:a,rootClassName:i,children:l,indeterminate:c=!1,style:s,onMouseEnter:d,onMouseLeave:u,skipGroup:f=!1,disabled:p}=e,h=QP(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:m,direction:g,checkbox:b}=t.useContext(at),y=t.useContext(XP),{isFormItemInput:x}=t.useContext(Xw),w=t.useContext(Ki),C=null!==(r=(null===y||void 0===y?void 0:y.disabled)||p)&&void 0!==r?r:w,S=t.useRef(h.value);t.useEffect((()=>{null===y||void 0===y||y.registerValue(h.value)}),[]),t.useEffect((()=>{if(!f)return h.value!==S.current&&(null===y||void 0===y||y.cancelValue(S.current),null===y||void 0===y||y.registerValue(h.value),S.current=h.value),()=>null===y||void 0===y?void 0:y.cancelValue(h.value)}),[h.value]);const E=m("checkbox",o),k=lh(E),[j,I,T]=JP(E,k),A=Object.assign({},h);y&&!f&&(A.onChange=function(){h.onChange&&h.onChange.apply(h,arguments),y.toggleOption&&y.toggleOption({label:l,value:h.value})},A.name=y.name,A.checked=y.value.includes(h.value));const O=v()("".concat(E,"-wrapper"),{["".concat(E,"-rtl")]:"rtl"===g,["".concat(E,"-wrapper-checked")]:A.checked,["".concat(E,"-wrapper-disabled")]:C,["".concat(E,"-wrapper-in-form-item")]:x},null===b||void 0===b?void 0:b.className,a,i,T,k,I),N=v()({["".concat(E,"-indeterminate")]:c},zi,I),R=c?"mixed":void 0;return j(t.createElement(Wi,{component:"Checkbox",disabled:C},t.createElement("label",{className:O,style:Object.assign(Object.assign({},null===b||void 0===b?void 0:b.style),s),onMouseEnter:d,onMouseLeave:u},t.createElement(qj,Object.assign({"aria-checked":R},A,{prefixCls:E,className:N,disabled:C,ref:n})),void 0!==l&&t.createElement("span",null,l))))};const eM=t.forwardRef(ZP);var tM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const nM=t.forwardRef(((e,n)=>{const{defaultValue:r,children:o,options:a=[],prefixCls:i,className:l,rootClassName:c,style:s,onChange:d}=e,u=tM(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:f,direction:p}=t.useContext(at),[h,m]=t.useState(u.value||r||[]),[g,b]=t.useState([]);t.useEffect((()=>{"value"in u&&m(u.value||[])}),[u.value]);const y=t.useMemo((()=>a.map((e=>"string"===typeof e||"number"===typeof e?{label:e,value:e}:e))),[a]),x=f("checkbox",i),w="".concat(x,"-group"),C=lh(x),[S,E,k]=JP(x,C),j=rt(u,["value","disabled"]),I=a.length?y.map((e=>t.createElement(eM,{prefixCls:x,key:e.value.toString(),disabled:"disabled"in e?e.disabled:u.disabled,value:e.value,checked:h.includes(e.value),onChange:e.onChange,className:"".concat(w,"-item"),style:e.style,title:e.title,id:e.id,required:e.required},e.label))):o,T={toggleOption:e=>{const t=h.indexOf(e.value),n=nt(h);-1===t?n.push(e.value):n.splice(t,1),"value"in u||m(n),null===d||void 0===d||d(n.filter((e=>g.includes(e))).sort(((e,t)=>y.findIndex((t=>t.value===e))-y.findIndex((e=>e.value===t)))))},value:h,disabled:u.disabled,name:u.name,registerValue:e=>{b((t=>[].concat(nt(t),[e])))},cancelValue:e=>{b((t=>t.filter((t=>t!==e))))}},A=v()(w,{["".concat(w,"-rtl")]:"rtl"===p},l,c,k,C,E);return S(t.createElement("div",Object.assign({className:A,style:s},j,{ref:n}),t.createElement(XP.Provider,{value:T},I)))})),rM=nM,oM=eM;oM.Group=rM,oM.__ANT_CHECKBOX=!0;const aM=oM,iM={},lM="SELECT_ALL",cM="SELECT_INVERT",sM="SELECT_NONE",dM=[],uM=(e,t)=>{let n=[];return(t||[]).forEach((t=>{n.push(t),t&&"object"===typeof t&&e in t&&(n=[].concat(nt(n),nt(uM(e,t[e]))))})),n},fM=(e,n)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:o,defaultSelectedRowKeys:a,getCheckboxProps:i,onChange:l,onSelect:c,onSelectAll:s,onSelectInvert:d,onSelectNone:u,onSelectMultiple:f,columnWidth:p,type:h,selections:m,fixed:g,renderCell:b,hideSelectAll:y,checkStrictly:x=!0}=n||{},{prefixCls:w,data:C,pageData:S,getRecordByKey:E,getRowKey:k,expandType:j,childrenColumnName:I,locale:T,getPopupContainer:A}=e,O=ud("Table"),[N,R]=function(e){const[n,r]=(0,t.useState)(null);return[(0,t.useCallback)(((t,o,a)=>{const i=null!==n&&void 0!==n?n:t,l=Math.min(i||0,t),c=Math.max(i||0,t),s=o.slice(l,c+1).map((t=>e(t))),d=s.some((e=>!a.has(e))),u=[];return s.forEach((e=>{d?(a.has(e)||u.push(e),a.add(e)):(a.delete(e),u.push(e))})),r(d?c:null),u}),[n]),e=>{r(e)}]}((e=>e)),[P,M]=_r(o||a||dM,{value:o}),D=t.useRef(new Map),L=(0,t.useCallback)((e=>{if(r){const t=new Map;e.forEach((e=>{let n=E(e);!n&&D.current.has(e)&&(n=D.current.get(e)),t.set(e,n)})),D.current=t}}),[E,r]);t.useEffect((()=>{L(P)}),[P]);const{keyEntities:_}=(0,t.useMemo)((()=>{if(x)return{keyEntities:null};let e=C;if(r){const t=new Set(C.map(((e,t)=>k(e,t)))),n=Array.from(D.current).reduce(((e,n)=>{let[r,o]=n;return t.has(r)?e:e.concat(o)}),[]);e=[].concat(nt(e),nt(n))}return IP(e,{externalGetKey:k,childrenPropName:I})}),[C,k,x,I,r]),z=(0,t.useMemo)((()=>uM(I,S)),[I,S]),B=(0,t.useMemo)((()=>{const e=new Map;return z.forEach(((t,n)=>{const r=k(t,n),o=(i?i(t):null)||{};e.set(r,o)})),e}),[z,k,i]),F=(0,t.useCallback)((e=>{var t;return!!(null===(t=B.get(k(e)))||void 0===t?void 0:t.disabled)}),[B,k]),[H,W]=(0,t.useMemo)((()=>{if(x)return[P||[],[]];const{checkedKeys:e,halfCheckedKeys:t}=qP(P,!0,_,F);return[e||[],t]}),[P,x,_,F]),V=(0,t.useMemo)((()=>{const e="radio"===h?H.slice(0,1):H;return new Set(e)}),[H,h]),U=(0,t.useMemo)((()=>"radio"===h?new Set:new Set(W)),[W,h]);t.useEffect((()=>{n||M(dM)}),[!!n]);const K=(0,t.useCallback)(((e,t)=>{let n,o;L(e),r?(n=e,o=e.map((e=>D.current.get(e)))):(n=[],o=[],e.forEach((e=>{const t=E(e);void 0!==t&&(n.push(e),o.push(t))}))),M(n),null===l||void 0===l||l(n,o,{type:t})}),[M,E,l,r]),G=(0,t.useCallback)(((e,t,n,r)=>{if(c){const o=n.map((e=>E(e)));c(E(e),t,o,r)}K(n,"single")}),[c,E,K]),q=(0,t.useMemo)((()=>{if(!m||y)return null;return(!0===m?[lM,cM,sM]:m).map((e=>e===lM?{key:"all",text:T.selectionAll,onSelect(){K(C.map(((e,t)=>k(e,t))).filter((e=>{const t=B.get(e);return!(null===t||void 0===t?void 0:t.disabled)||V.has(e)})),"all")}}:e===cM?{key:"invert",text:T.selectInvert,onSelect(){const e=new Set(V);S.forEach(((t,n)=>{const r=k(t,n),o=B.get(r);(null===o||void 0===o?void 0:o.disabled)||(e.has(r)?e.delete(r):e.add(r))}));const t=Array.from(e);d&&(O.deprecated(!1,"onSelectInvert","onChange"),d(t)),K(t,"invert")}}:e===sM?{key:"none",text:T.selectNone,onSelect(){null===u||void 0===u||u(),K(Array.from(V).filter((e=>{const t=B.get(e);return null===t||void 0===t?void 0:t.disabled})),"none")}}:e)).map((e=>Object.assign(Object.assign({},e),{onSelect:function(){for(var t,n,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];null===(n=e.onSelect)||void 0===n||(t=n).call.apply(t,[e].concat(o)),R(null)}})))}),[m,V,S,k,d,K]),X=(0,t.useCallback)((e=>{var r;if(!n)return e.filter((e=>e!==iM));let o=nt(e);const a=new Set(V),i=z.map(k).filter((e=>!B.get(e).disabled)),l=i.every((e=>a.has(e))),c=i.some((e=>a.has(e))),d=()=>{const e=[];l?i.forEach((t=>{a.delete(t),e.push(t)})):i.forEach((t=>{a.has(t)||(a.add(t),e.push(t))}));const t=Array.from(a);null===s||void 0===s||s(!l,t.map((e=>E(e))),e.map((e=>E(e)))),K(t,"all"),R(null)};let u,C,S;if("radio"!==h){let e;if(q){const n={getPopupContainer:A,items:q.map(((e,t)=>{const{key:n,text:r,onSelect:o}=e;return{key:null!==n&&void 0!==n?n:t,onClick:()=>{null===o||void 0===o||o(i)},label:r}}))};e=t.createElement("div",{className:"".concat(w,"-selection-extra")},t.createElement(Nh,{menu:n,getPopupContainer:A},t.createElement("span",null,t.createElement(MO,null))))}const n=z.map(((e,t)=>{const n=k(e,t),r=B.get(n)||{};return Object.assign({checked:a.has(n)},r)})).filter((e=>{let{disabled:t}=e;return t})),r=!!n.length&&n.length===z.length,o=r&&n.every((e=>{let{checked:t}=e;return t})),s=r&&n.some((e=>{let{checked:t}=e;return t}));C=t.createElement(aM,{checked:r?o:!!z.length&&l,indeterminate:r?!o&&s:!l&&c,onChange:d,disabled:0===z.length||r,"aria-label":e?"Custom selection":"Select all",skipGroup:!0}),u=!y&&t.createElement("div",{className:"".concat(w,"-selection")},C,e)}S="radio"===h?(e,n,r)=>{const o=k(n,r),i=a.has(o);return{node:t.createElement(lI,Object.assign({},B.get(o),{checked:i,onClick:e=>e.stopPropagation(),onChange:e=>{a.has(o)||G(o,!0,[o],e.nativeEvent)}})),checked:i}}:(e,n,r)=>{var o;const l=k(n,r),c=a.has(l),s=U.has(l),d=B.get(l);let u;return u="nest"===j?s:null!==(o=null===d||void 0===d?void 0:d.indeterminate)&&void 0!==o?o:s,{node:t.createElement(aM,Object.assign({},d,{indeterminate:u,checked:c,skipGroup:!0,onClick:e=>e.stopPropagation(),onChange:e=>{let{nativeEvent:t}=e;const{shiftKey:n}=t,r=i.findIndex((e=>e===l)),o=H.some((e=>i.includes(e)));if(n&&x&&o){const e=N(r,i,a),t=Array.from(a);null===f||void 0===f||f(!c,t.map((e=>E(e))),e.map((e=>E(e)))),K(t,"multiple")}else{const e=H;if(x){const n=c?LP(e,l):_P(e,l);G(l,!c,n,t)}else{const n=qP([].concat(nt(e),[l]),!0,_,F),{checkedKeys:r,halfCheckedKeys:o}=n;let a=r;if(c){const e=new Set(r);e.delete(l),a=qP(Array.from(e),{checked:!1,halfCheckedKeys:o},_,F).checkedKeys}G(l,!c,a,t)}}R(c?null:r)}})),checked:c}};if(!o.includes(iM))if(0===o.findIndex((e=>{var t;return"EXPAND_COLUMN"===(null===(t=e[wR])||void 0===t?void 0:t.columnType)}))){const[e,...t]=o;o=[e,iM].concat(nt(t))}else o=[iM].concat(nt(o));const I=o.indexOf(iM);o=o.filter(((e,t)=>e!==iM||t===I));const T=o[I-1],O=o[I+1];let P=g;void 0===P&&(void 0!==(null===O||void 0===O?void 0:O.fixed)?P=O.fixed:void 0!==(null===T||void 0===T?void 0:T.fixed)&&(P=T.fixed)),P&&T&&"EXPAND_COLUMN"===(null===(r=T[wR])||void 0===r?void 0:r.columnType)&&void 0===T.fixed&&(T.fixed=P);const M=v()("".concat(w,"-selection-col"),{["".concat(w,"-selection-col-with-dropdown")]:m&&"checkbox"===h}),D={fixed:P,width:p,className:"".concat(w,"-selection-column"),title:(null===n||void 0===n?void 0:n.columnTitle)?"function"===typeof n.columnTitle?n.columnTitle(C):n.columnTitle:u,render:(e,t,n)=>{const{node:r,checked:o}=S(e,t,n);return b?b(o,t,n,r):r},onCell:n.onCell,[wR]:{className:M}};return o.map((e=>e===iM?D:e))}),[k,z,n,H,V,U,p,q,j,B,f,G,F]);return[X,V]};function pM(e,n){return(0,t.useImperativeHandle)(e,(()=>{const e=n(),{nativeElement:t}=e;return"undefined"!==typeof Proxy?new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)}):(o=e,(r=t)._antProxy=r._antProxy||{},Object.keys(o).forEach((e=>{if(!(e in r._antProxy)){const t=r[e];r._antProxy[e]=t,r[e]=o[e]}})),r);var r,o}))}function hM(e){return null!==e&&void 0!==e&&e===e.window}function mM(e,t){var n,r;if("undefined"===typeof window)return 0;const o=t?"scrollTop":"scrollLeft";let a=0;return hM(e)?a=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?a=e.documentElement[o]:(e instanceof HTMLElement||e)&&(a=e[o]),e&&!hM(e)&&"number"!==typeof a&&(a=null===(r=(null!==(n=e.ownerDocument)&&void 0!==n?n:e).documentElement)||void 0===r?void 0:r[o]),a}function gM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{getContainer:n=(()=>window),callback:r,duration:o=450}=t,a=n(),i=mM(a,!0),l=Date.now(),c=()=>{const t=Date.now()-l,n=function(e,t,n,r){const o=n-t;return(e/=r/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}(t>o?o:t,i,e,o);hM(a)?a.scrollTo(window.pageXOffset,n):a instanceof Document||"HTMLDocument"===a.constructor.name?a.documentElement.scrollTop=n:a.scrollTop=n,t<o?Sa(c):"function"===typeof r&&r()};Sa(c)}const vM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};var bM=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:vM}))};const yM=t.forwardRef(bM);const xM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};var wM=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:xM}))};const CM=t.forwardRef(wM);const SM={items_per_page:"\u6761/\u9875",jump_to:"\u8df3\u81f3",jump_to_confirm:"\u786e\u5b9a",page:"\u9875",prev_page:"\u4e0a\u4e00\u9875",next_page:"\u4e0b\u4e00\u9875",prev_5:"\u5411\u524d 5 \u9875",next_5:"\u5411\u540e 5 \u9875",prev_3:"\u5411\u524d 3 \u9875",next_3:"\u5411\u540e 3 \u9875",page_size:"\u9875\u7801"};var EM=["10","20","50","100"];const kM=function(e){var n=e.pageSizeOptions,r=void 0===n?EM:n,o=e.locale,a=e.changeSize,i=e.pageSize,l=e.goButton,c=e.quickGo,s=e.rootPrefixCls,d=e.selectComponentClass,f=e.selectPrefixCls,p=e.disabled,h=e.buildOptionText,m=u(t.useState(""),2),g=m[0],v=m[1],b=function(){return!g||Number.isNaN(g)?void 0:Number(g)},y="function"===typeof h?h:function(e){return"".concat(e," ").concat(o.items_per_page)},x=function(e){""!==g&&(e.keyCode!==Vd.ENTER&&"click"!==e.type||(v(""),null===c||void 0===c||c(b())))},w="".concat(s,"-options");if(!a&&!c)return null;var C=null,S=null,E=null;if(a&&d){var k=(r.some((function(e){return e.toString()===i.toString()}))?r:r.concat([i.toString()]).sort((function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))}))).map((function(e,n){return t.createElement(d.Option,{key:n,value:e.toString()},y(e))}));C=t.createElement(d,{disabled:p,prefixCls:f,showSearch:!1,className:"".concat(w,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(i||r[0]).toString(),onChange:function(e){null===a||void 0===a||a(Number(e))},getPopupContainer:function(e){return e.parentNode},"aria-label":o.page_size,defaultOpen:!1},k)}return c&&(l&&(E="boolean"===typeof l?t.createElement("button",{type:"button",onClick:x,onKeyUp:x,disabled:p,className:"".concat(w,"-quick-jumper-button")},o.jump_to_confirm):t.createElement("span",{onClick:x,onKeyUp:x},l)),S=t.createElement("div",{className:"".concat(w,"-quick-jumper")},o.jump_to,t.createElement("input",{disabled:p,type:"text",value:g,onChange:function(e){v(e.target.value)},onKeyUp:x,onBlur:function(e){l||""===g||(v(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(s,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(s,"-item"))>=0)||null===c||void 0===c||c(b()))},"aria-label":o.page}),o.page,E)),t.createElement("li",{className:w},C,S)};const jM=function(e){var n,r=e.rootPrefixCls,o=e.page,a=e.active,i=e.className,l=e.showTitle,c=e.onClick,s=e.onKeyPress,d=e.itemRender,u="".concat(r,"-item"),f=v()(u,"".concat(u,"-").concat(o),(h(n={},"".concat(u,"-active"),a),h(n,"".concat(u,"-disabled"),!o),n),i),p=d(o,"page",t.createElement("a",{rel:"nofollow"},o));return p?t.createElement("li",{title:l?String(o):null,className:f,onClick:function(){c(o)},onKeyDown:function(e){s(e,c,o)},tabIndex:0},p):null};var IM=function(e,t,n){return n};function TM(){}function AM(e){var t=Number(e);return"number"===typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function OM(e,t,n){var r="undefined"===typeof e?t:e;return Math.floor((n-1)/r)+1}const NM=function(e){var n,r=e.prefixCls,o=void 0===r?"rc-pagination":r,i=e.selectPrefixCls,l=void 0===i?"rc-select":i,c=e.className,s=e.selectComponentClass,d=e.current,f=e.defaultCurrent,p=void 0===f?1:f,m=e.total,g=void 0===m?0:m,b=e.pageSize,y=e.defaultPageSize,x=void 0===y?10:y,w=e.onChange,C=void 0===w?TM:w,S=e.hideOnSinglePage,E=e.showPrevNextJumpers,k=void 0===E||E,j=e.showQuickJumper,I=e.showLessItems,T=e.showTitle,A=void 0===T||T,O=e.onShowSizeChange,N=void 0===O?TM:O,R=e.locale,P=void 0===R?SM:R,M=e.style,D=e.totalBoundaryShowSizeChanger,L=void 0===D?50:D,_=e.disabled,z=e.simple,B=e.showTotal,F=e.showSizeChanger,H=e.pageSizeOptions,W=e.itemRender,V=void 0===W?IM:W,U=e.jumpPrevIcon,K=e.jumpNextIcon,G=e.prevIcon,q=e.nextIcon,X=t.useRef(null),Y=u(_r(10,{value:b,defaultValue:x}),2),$=Y[0],J=Y[1],Q=u(_r(1,{value:d,defaultValue:p,postState:function(e){return Math.max(1,Math.min(e,OM(void 0,$,g)))}}),2),Z=Q[0],ee=Q[1],te=u(t.useState(Z),2),ne=te[0],re=te[1];(0,t.useEffect)((function(){re(Z)}),[Z]);var ae=Math.max(1,Z-(I?3:5)),ie=Math.min(OM(void 0,$,g),Z+(I?3:5));function le(n,r){var a=n||t.createElement("button",{type:"button","aria-label":r,className:"".concat(o,"-item-link")});return"function"===typeof n&&(a=t.createElement(n,oe({},e))),a}function ce(e){var t=e.target.value,n=OM(void 0,$,g);return""===t?t:Number.isNaN(Number(t))?ne:t>=n?n:Number(t)}var se=g>$&&j;function de(e){var t=ce(e);switch(t!==ne&&re(t),e.keyCode){case Vd.ENTER:ue(t);break;case Vd.UP:ue(t-1);break;case Vd.DOWN:ue(t+1)}}function ue(e){if(function(e){return AM(e)&&e!==Z&&AM(g)&&g>0}(e)&&!_){var t=OM(void 0,$,g),n=e;return e>t?n=t:e<1&&(n=1),n!==ne&&re(n),ee(n),null===C||void 0===C||C(n,$),n}return Z}var fe=Z>1,pe=Z<OM(void 0,$,g),he=null!==F&&void 0!==F?F:g>L;function me(){fe&&ue(Z-1)}function ge(){pe&&ue(Z+1)}function ve(){ue(ae)}function be(){ue(ie)}function ye(e,t){if("Enter"===e.key||e.charCode===Vd.ENTER||e.keyCode===Vd.ENTER){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];t.apply(void 0,r)}}function xe(e){"click"!==e.type&&e.keyCode!==Vd.ENTER||ue(ne)}var we=null,Ce=hx(e,{aria:!0,data:!0}),Se=B&&t.createElement("li",{className:"".concat(o,"-total-text")},B(g,[0===g?0:(Z-1)*$+1,Z*$>g?g:Z*$])),Ee=null,ke=OM(void 0,$,g);if(S&&g<=$)return null;var je=[],Ie={rootPrefixCls:o,onClick:ue,onKeyPress:ye,showTitle:A,itemRender:V,page:-1},Te=Z-1>0?Z-1:0,Ae=Z+1<ke?Z+1:ke,Oe=j&&j.goButton,Ne=Oe,Re=null;z&&(Oe&&(Ne="boolean"===typeof Oe?t.createElement("button",{type:"button",onClick:xe,onKeyUp:xe},P.jump_to_confirm):t.createElement("span",{onClick:xe,onKeyUp:xe},Oe),Ne=t.createElement("li",{title:A?"".concat(P.jump_to).concat(Z,"/").concat(ke):null,className:"".concat(o,"-simple-pager")},Ne)),Re=t.createElement("li",{title:A?"".concat(Z,"/").concat(ke):null,className:"".concat(o,"-simple-pager")},t.createElement("input",{type:"text",value:ne,disabled:_,onKeyDown:function(e){e.keyCode!==Vd.UP&&e.keyCode!==Vd.DOWN||e.preventDefault()},onKeyUp:de,onChange:de,onBlur:function(e){ue(ce(e))},size:3}),t.createElement("span",{className:"".concat(o,"-slash")},"/"),ke));var Pe=I?1:2;if(ke<=3+2*Pe){ke||je.push(t.createElement(jM,a({},Ie,{key:"noPager",page:1,className:"".concat(o,"-item-disabled")})));for(var Me=1;Me<=ke;Me+=1)je.push(t.createElement(jM,a({},Ie,{key:Me,page:Me,active:Z===Me})))}else{var De=I?P.prev_3:P.prev_5,Le=I?P.next_3:P.next_5,_e=V(ae,"jump-prev",le(U,"prev page")),ze=V(ie,"jump-next",le(K,"next page"));k&&(we=_e?t.createElement("li",{title:A?De:null,key:"prev",onClick:ve,tabIndex:0,onKeyDown:function(e){ye(e,ve)},className:v()("".concat(o,"-jump-prev"),h({},"".concat(o,"-jump-prev-custom-icon"),!!U))},_e):null,Ee=ze?t.createElement("li",{title:A?Le:null,key:"next",onClick:be,tabIndex:0,onKeyDown:function(e){ye(e,be)},className:v()("".concat(o,"-jump-next"),h({},"".concat(o,"-jump-next-custom-icon"),!!K))},ze):null);var Be=Math.max(1,Z-Pe),Fe=Math.min(Z+Pe,ke);Z-1<=Pe&&(Fe=1+2*Pe),ke-Z<=Pe&&(Be=ke-2*Pe);for(var He=Be;He<=Fe;He+=1)je.push(t.createElement(jM,a({},Ie,{key:He,page:He,active:Z===He})));if(Z-1>=2*Pe&&3!==Z&&(je[0]=t.cloneElement(je[0],{className:v()("".concat(o,"-item-after-jump-prev"),je[0].props.className)}),je.unshift(we)),ke-Z>=2*Pe&&Z!==ke-2){var We=je[je.length-1];je[je.length-1]=t.cloneElement(We,{className:v()("".concat(o,"-item-before-jump-next"),We.props.className)}),je.push(Ee)}1!==Be&&je.unshift(t.createElement(jM,a({},Ie,{key:1,page:1}))),Fe!==ke&&je.push(t.createElement(jM,a({},Ie,{key:ke,page:ke})))}var Ve=function(e){var n=V(e,"prev",le(G,"prev page"));return t.isValidElement(n)?t.cloneElement(n,{disabled:!fe}):n}(Te);if(Ve){var Ue=!fe||!ke;Ve=t.createElement("li",{title:A?P.prev_page:null,onClick:me,tabIndex:Ue?null:0,onKeyDown:function(e){ye(e,me)},className:v()("".concat(o,"-prev"),h({},"".concat(o,"-disabled"),Ue)),"aria-disabled":Ue},Ve)}var Ke,Ge,qe=function(e){var n=V(e,"next",le(q,"next page"));return t.isValidElement(n)?t.cloneElement(n,{disabled:!pe}):n}(Ae);qe&&(z?(Ke=!pe,Ge=fe?0:null):Ge=(Ke=!pe||!ke)?null:0,qe=t.createElement("li",{title:A?P.next_page:null,onClick:ge,tabIndex:Ge,onKeyDown:function(e){ye(e,ge)},className:v()("".concat(o,"-next"),h({},"".concat(o,"-disabled"),Ke)),"aria-disabled":Ke},qe));var Xe=v()(o,c,(h(n={},"".concat(o,"-simple"),z),h(n,"".concat(o,"-disabled"),_),n));return t.createElement("ul",a({className:Xe,style:M,ref:X},Ce),Se,Ve,z?Re:je,qe,t.createElement(kM,{locale:P,rootPrefixCls:o,disabled:_,selectComponentClass:s,selectPrefixCls:l,changeSize:he?function(e){var t=OM(e,$,g),n=Z>t&&0!==t?t:Z;J(e),re(n),null===N||void 0===N||N(Z,e),ee(n),null===C||void 0===C||C(n,e)}:null,pageSize:$,pageSizeOptions:H,quickGo:se?ue:null,goButton:Ne}))},RM=e=>t.createElement(HO,Object.assign({},e,{showSearch:!0,size:"small"})),PM=e=>t.createElement(HO,Object.assign({},e,{showSearch:!0,size:"middle"}));RM.Option=HO.Option,PM.Option=HO.Option;const MM=e=>{const{componentCls:t}=e;return{["".concat(t,"-disabled")]:{"&, &:hover":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},["&".concat(t,"-disabled")]:{cursor:"not-allowed",["".concat(t,"-item")]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},["".concat(t,"-simple&")]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},["".concat(t,"-simple-pager")]:{color:e.colorTextDisabled},["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{["".concat(t,"-item-link-icon")]:{opacity:0},["".concat(t,"-item-ellipsis")]:{opacity:1}}},["&".concat(t,"-simple")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["&".concat(t,"-disabled ").concat(t,"-item-link")]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},DM=e=>{const{componentCls:t}=e;return{["&".concat(t,"-mini ").concat(t,"-total-text, &").concat(t,"-mini ").concat(t,"-simple-pager")]:{height:e.itemSizeSM,lineHeight:rn(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-item")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:rn(e.calc(e.itemSizeSM).sub(2).equal())},["&".concat(t,"-mini:not(").concat(t,"-disabled) ").concat(t,"-item:not(").concat(t,"-item-active)")]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},["&".concat(t,"-mini ").concat(t,"-prev, &").concat(t,"-mini ").concat(t,"-next")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:rn(e.itemSizeSM)},["&".concat(t,"-mini:not(").concat(t,"-disabled)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover ").concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["\n    &".concat(t,"-mini ").concat(t,"-prev ").concat(t,"-item-link,\n    &").concat(t,"-mini ").concat(t,"-next ").concat(t,"-item-link\n    ")]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:rn(e.itemSizeSM)}},["&".concat(t,"-mini ").concat(t,"-jump-prev, &").concat(t,"-mini ").concat(t,"-jump-next")]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:rn(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-options")]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:rn(e.itemSizeSM),input:Object.assign(Object.assign({},Sk(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},LM=e=>{const{componentCls:t}=e;return{["\n    &".concat(t,"-simple ").concat(t,"-prev,\n    &").concat(t,"-simple ").concat(t,"-next\n    ")]:{height:e.itemSizeSM,lineHeight:rn(e.itemSizeSM),verticalAlign:"top",["".concat(t,"-item-link")]:{height:e.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSizeSM,lineHeight:rn(e.itemSizeSM)}}},["&".concat(t,"-simple ").concat(t,"-simple-pager")]:{display:"inline-block",height:e.itemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:e.marginXS,padding:"0 ".concat(rn(e.paginationItemPaddingInline)),textAlign:"center",backgroundColor:e.itemInputBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadius,outline:"none",transition:"border-color ".concat(e.motionDurationMid),color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:"".concat(rn(e.inputOutlineOffset)," 0 ").concat(rn(e.controlOutlineWidth)," ").concat(e.controlOutline)},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},_M=e=>{const{componentCls:t}=e;return{["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{outline:0,["".concat(t,"-item-container")]:{position:"relative",["".concat(t,"-item-link-icon")]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:"all ".concat(e.motionDurationMid),"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},["".concat(t,"-item-ellipsis")]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:"all ".concat(e.motionDurationMid)}},"&:hover":{["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}}},["\n    ".concat(t,"-prev,\n    ").concat(t,"-jump-prev,\n    ").concat(t,"-jump-next\n    ")]:{marginInlineEnd:e.marginXS},["\n    ".concat(t,"-prev,\n    ").concat(t,"-next,\n    ").concat(t,"-jump-prev,\n    ").concat(t,"-jump-next\n    ")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:"".concat(rn(e.itemSize)),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:"all ".concat(e.motionDurationMid)},["".concat(t,"-prev, ").concat(t,"-next")]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},["".concat(t,"-item-link")]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:"none",transition:"all ".concat(e.motionDurationMid)},["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover")]:{["".concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["".concat(t,"-slash")]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},["".concat(t,"-options")]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:rn(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},Ek(e)),dk(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},sk(e)),width:e.calc(e.controlHeightLG).mul(1.25).equal(),height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},zM=e=>{const{componentCls:t}=e;return{["".concat(t,"-item")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:rn(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:"0 ".concat(rn(e.paginationItemPaddingInline)),color:e.colorText,"&:hover":{textDecoration:"none"}},["&:not(".concat(t,"-item-active)")]:{"&:hover":{transition:"all ".concat(e.motionDurationMid),backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},BM=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},["".concat(t,"-total-text")]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:rn(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),zM(e)),_M(e)),LM(e)),DM(e)),MM(e)),{["@media only screen and (max-width: ".concat(e.screenLG,"px)")]:{["".concat(t,"-item")]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},["@media only screen and (max-width: ".concat(e.screenSM,"px)")]:{["".concat(t,"-options")]:{display:"none"}}}),["&".concat(e.componentCls,"-rtl")]:{direction:"rtl"}}},FM=e=>{const{componentCls:t}=e;return{["".concat(t,":not(").concat(t,"-disabled)")]:{["".concat(t,"-item")]:Object.assign({},eo(e)),["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{"&:focus-visible":Object.assign({["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}},Zr(e))},["".concat(t,"-prev, ").concat(t,"-next")]:{["&:focus-visible ".concat(t,"-item-link")]:Object.assign({},Zr(e))}}}},HM=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},lk(e)),WM=e=>Ho(e,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},ik(e)),VM=$o("Pagination",(e=>{const t=WM(e);return[BM(t),FM(t)]}),HM),UM=e=>{const{componentCls:t}=e;return{["".concat(t).concat(t,"-bordered").concat(t,"-disabled:not(").concat(t,"-mini)")]:{"&, &:hover":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},"&:focus-visible":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},["".concat(t,"-item, ").concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,["&:hover:not(".concat(t,"-item-active)")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},["&".concat(t,"-item-active")]:{backgroundColor:e.itemActiveBgDisabled}},["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},["".concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},["".concat(t).concat(t,"-bordered:not(").concat(t,"-mini)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},["".concat(t,"-item-link")]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},["&:hover ".concat(t,"-item-link")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},["&".concat(t,"-disabled")]:{["".concat(t,"-item-link")]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},["".concat(t,"-item")]:{backgroundColor:e.itemBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),["&:hover:not(".concat(t,"-item-active)")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},KM=Yo(["Pagination","bordered"],(e=>{const t=WM(e);return[UM(t)]}),HM);var GM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const qM=e=>{const{prefixCls:n,selectPrefixCls:r,className:o,rootClassName:a,style:i,size:l,locale:c,selectComponentClass:s,responsive:d,showSizeChanger:u}=e,f=GM(e,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:p}=_h(d),[,h]=jo(),{getPrefixCls:m,direction:g,pagination:b={}}=t.useContext(at),y=m("pagination",n),[x,w,C]=VM(y),S=null!==u&&void 0!==u?u:b.showSizeChanger,E=t.useMemo((()=>{const e=t.createElement("span",{className:"".concat(y,"-item-ellipsis")},"\u2022\u2022\u2022");return{prevIcon:t.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},"rtl"===g?t.createElement(bt,null):t.createElement(mt,null)),nextIcon:t.createElement("button",{className:"".concat(y,"-item-link"),type:"button",tabIndex:-1},"rtl"===g?t.createElement(mt,null):t.createElement(bt,null)),jumpPrevIcon:t.createElement("a",{className:"".concat(y,"-item-link")},t.createElement("div",{className:"".concat(y,"-item-container")},"rtl"===g?t.createElement(CM,{className:"".concat(y,"-item-link-icon")}):t.createElement(yM,{className:"".concat(y,"-item-link-icon")}),e)),jumpNextIcon:t.createElement("a",{className:"".concat(y,"-item-link")},t.createElement("div",{className:"".concat(y,"-item-container")},"rtl"===g?t.createElement(yM,{className:"".concat(y,"-item-link-icon")}):t.createElement(CM,{className:"".concat(y,"-item-link-icon")}),e))}}),[g,y]),[k]=nx("Pagination",eu),j=Object.assign(Object.assign({},k),c),I=Yi(l),T="small"===I||!(!p||I||!d),A=m("select",r),O=v()({["".concat(y,"-mini")]:T,["".concat(y,"-rtl")]:"rtl"===g,["".concat(y,"-bordered")]:h.wireframe},null===b||void 0===b?void 0:b.className,o,a,w,C),N=Object.assign(Object.assign({},null===b||void 0===b?void 0:b.style),i);return x(t.createElement(t.Fragment,null,h.wireframe&&t.createElement(KM,{prefixCls:y}),t.createElement(NM,Object.assign({},E,f,{style:N,prefixCls:y,selectPrefixCls:A,className:O,selectComponentClass:s||(T?RM:PM),locale:j,showSizeChanger:S}))))},XM=qM;function YM(e,t,n){var r=(n||{}).atBegin;return function(e,t,n){var r,o=n||{},a=o.noTrailing,i=void 0!==a&&a,l=o.noLeading,c=void 0!==l&&l,s=o.debounceMode,d=void 0===s?void 0:s,u=!1,f=0;function p(){r&&clearTimeout(r)}function h(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];var l=this,s=Date.now()-f;function h(){f=Date.now(),t.apply(l,o)}function m(){r=void 0}u||(c||!d||r||h(),p(),void 0===d&&s>e?c?(f=Date.now(),i||(r=setTimeout(d?m:h,e))):h():!0!==i&&(r=setTimeout(d?m:h,void 0===d?e-s:e)))}return h.cancel=function(e){var t=(e||{}).upcomingOnly,n=void 0!==t&&t;p(),u=!n},h}(e,t,{debounceMode:!1!==(void 0!==r&&r)})}const $M=new Rr("antSpinMove",{to:{opacity:1}}),JM=new Rr("antRotate",{to:{transform:"rotate(405deg)"}}),QM=e=>{const{componentCls:t,calc:n}=e;return{["".concat(t)]:Object.assign(Object.assign({},$r(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:"transform ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOutCirc),"&-spinning":{position:"static",display:"inline-block",opacity:1},["".concat(t,"-text")]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:"all ".concat(e.motionDurationMid),"&-show":{opacity:1,visibility:"visible"},["".concat(t,"-dot ").concat(t,"-dot-item")]:{backgroundColor:e.colorWhite},["".concat(t,"-text")]:{color:e.colorTextLightSolid}},"&-nested-loading":{position:"relative",["> div > ".concat(t)]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,["".concat(t,"-dot")]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},["".concat(t,"-text")]:{position:"absolute",top:"50%",width:"100%",textShadow:"0 1px 2px ".concat(e.colorBgContainer)},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{["".concat(t,"-dot")]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{["".concat(t,"-dot")]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},["".concat(t,"-text")]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},["&".concat(t,"-show-text ").concat(t,"-dot")]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},["".concat(t,"-container")]:{position:"relative",transition:"opacity ".concat(e.motionDurationSlow),"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:"all ".concat(e.motionDurationSlow),content:'""',pointerEvents:"none"}},["".concat(t,"-blur")]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},["".concat(t,"-dot")]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:$M,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:JM,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&-sm ".concat(t,"-dot")]:{fontSize:e.dotSizeSM,i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},["&-lg ".concat(t,"-dot")]:{fontSize:e.dotSizeLG,i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},["&".concat(t,"-show-text ").concat(t,"-text")]:{display:"block"}})}},ZM=$o("Spin",(e=>{const t=Ho(e,{spinDotDefault:e.colorTextDescription});return[QM(t)]}),(e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}}));var eD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};let tD=null;const nD=e=>{const{prefixCls:n,spinning:r=!0,delay:o=0,className:a,rootClassName:i,size:l="default",tip:c,wrapperClassName:s,style:d,children:u,fullscreen:f=!1}=e,p=eD(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen"]),{getPrefixCls:h}=t.useContext(at),m=h("spin",n),[g,b,y]=ZM(m),[x,w]=t.useState((()=>r&&!function(e,t){return!!e&&!!t&&!isNaN(Number(t))}(r,o)));t.useEffect((()=>{if(r){const e=YM(o,(()=>{w(!0)}));return e(),()=>{var t;null===(t=null===e||void 0===e?void 0:e.cancel)||void 0===t||t.call(e)}}w(!1)}),[o,r]);const C=t.useMemo((()=>"undefined"!==typeof u&&!f),[u,f]);const{direction:S,spin:E}=t.useContext(at),k=v()(m,null===E||void 0===E?void 0:E.className,{["".concat(m,"-sm")]:"small"===l,["".concat(m,"-lg")]:"large"===l,["".concat(m,"-spinning")]:x,["".concat(m,"-show-text")]:!!c,["".concat(m,"-fullscreen")]:f,["".concat(m,"-fullscreen-show")]:f&&x,["".concat(m,"-rtl")]:"rtl"===S},a,i,b,y),j=v()("".concat(m,"-container"),{["".concat(m,"-blur")]:x}),I=rt(p,["indicator"]),T=Object.assign(Object.assign({},null===E||void 0===E?void 0:E.style),d),A=t.createElement("div",Object.assign({},I,{style:T,className:k,"aria-live":"polite","aria-busy":x}),function(e,n){const{indicator:r}=n,o="".concat(e,"-dot");return null===r?null:ua(r)?ha(r,{className:v()(r.props.className,o)}):ua(tD)?ha(tD,{className:v()(tD.props.className,o)}):t.createElement("span",{className:v()(o,"".concat(e,"-dot-spin"))},t.createElement("i",{className:"".concat(e,"-dot-item"),key:1}),t.createElement("i",{className:"".concat(e,"-dot-item"),key:2}),t.createElement("i",{className:"".concat(e,"-dot-item"),key:3}),t.createElement("i",{className:"".concat(e,"-dot-item"),key:4}))}(m,e),c&&(C||f)?t.createElement("div",{className:"".concat(m,"-text")},c):null);return g(C?t.createElement("div",Object.assign({},I,{className:v()("".concat(m,"-nested-loading"),s,b,y)}),x&&t.createElement("div",{key:"loading"},A),t.createElement("div",{className:j,key:"container"},u)):A)};nD.setDefaultIndicator=e=>{tD=e};const rD=nD;const oD=function(e){return function(n){let{prefixCls:r,onExpand:o,record:a,expanded:i,expandable:l}=n;const c="".concat(r,"-row-expand-icon");return t.createElement("button",{type:"button",onClick:e=>{o(a,e),e.stopPropagation()},className:v()(c,{["".concat(c,"-spaced")]:!l,["".concat(c,"-expanded")]:l&&i,["".concat(c,"-collapsed")]:l&&!i}),"aria-label":i?e.collapse:e.expand,"aria-expanded":i})}};function aD(e,t){return"key"in e&&void 0!==e.key&&null!==e.key?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t}function iD(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function lD(e,t){return"function"===typeof e?e(t):e}const cD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};var sD=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:cD}))};const dD=t.forwardRef(sD);function uD(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var fD=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],pD=function(e,n){var r=e.className,o=e.style,i=e.motion,l=e.motionNodes,c=e.motionType,s=e.onMotionStart,d=e.onMotionEnd,f=e.active,p=e.treeNodeRequiredProps,h=m(e,fD),g=u(t.useState(!0),2),b=g[0],y=g[1],x=t.useContext(vP).prefixCls,w=l&&"hide"!==c;fn((function(){l&&w!==b&&y(w)}),[l]);var C=t.useRef(!1),S=function(){l&&!C.current&&(C.current=!0,d())};!function(e,n){var r=u(t.useState(!1),2),o=r[0],a=r[1];fn((function(){if(o)return e(),function(){n()}}),[o]),fn((function(){return a(!0),function(){a(!1)}}),[])}((function(){l&&s()}),S);return l?t.createElement(xi,a({ref:n,visible:b},i,{motionAppear:"show"===c,onVisibleChanged:function(e){w===e&&S()}}),(function(e,n){var r=e.className,o=e.style;return t.createElement("div",{ref:n,className:v()("".concat(x,"-treenode-motion"),r),style:o},l.map((function(e){var n=Object.assign({},(uD(e.data),e.data)),r=e.title,o=e.key,i=e.isStart,l=e.isEnd;delete n.children;var c=TP(o,p);return t.createElement(DP,a({},n,c,{title:r,active:f,data:e.data,key:o,isStart:i,isEnd:l}))})))})):t.createElement(DP,a({domRef:n,className:r,style:o},h,{active:f}))};pD.displayName="MotionTreeNode";const hD=t.forwardRef(pD);function mD(e,t,n){var r=e.findIndex((function(e){return e.key===n})),o=e[r+1],a=t.findIndex((function(e){return e.key===n}));if(o){var i=t.findIndex((function(e){return e.key===o.key}));return t.slice(a+1,i)}return t.slice(a+1)}var gD=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],vD={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},bD=function(){},yD="RC_TREE_MOTION_".concat(Math.random()),xD={key:yD},wD={key:yD,level:0,index:0,pos:"0",node:xD,nodes:[xD]},CD={parent:null,children:[],pos:wD.pos,data:xD,title:null,key:yD,isStart:[],isEnd:[]};function SD(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function ED(e){return SP(e.key,e.pos)}var kD=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.data,i=(e.selectable,e.checkable,e.expandedKeys),l=e.selectedKeys,c=e.checkedKeys,s=e.loadedKeys,d=e.loadingKeys,f=e.halfCheckedKeys,p=e.keyEntities,h=e.disabled,g=e.dragging,v=e.dragOverNodeKey,b=e.dropPosition,y=e.motion,x=e.height,w=e.itemHeight,C=e.virtual,S=e.focusable,E=e.activeItem,k=e.focused,j=e.tabIndex,I=e.onKeyDown,T=e.onFocus,A=e.onBlur,O=e.onActiveChange,N=e.onListChangeStart,R=e.onListChangeEnd,P=m(e,gD),M=t.useRef(null),D=t.useRef(null);t.useImperativeHandle(n,(function(){return{scrollTo:function(e){M.current.scrollTo(e)},getIndentWidth:function(){return D.current.offsetWidth}}}));var L=u(t.useState(i),2),_=L[0],z=L[1],B=u(t.useState(o),2),F=B[0],H=B[1],W=u(t.useState(o),2),V=W[0],U=W[1],K=u(t.useState([]),2),G=K[0],q=K[1],X=u(t.useState(null),2),Y=X[0],$=X[1],J=t.useRef(o);function Q(){var e=J.current;H(e),U(e),q([]),$(null),R()}J.current=o,fn((function(){z(i);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function o(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n<r?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}(_,i);if(null!==e.key)if(e.add){var t=F.findIndex((function(t){return t.key===e.key})),n=SD(mD(F,o,e.key),C,x,w),r=F.slice();r.splice(t+1,0,CD),U(r),q(n),$("show")}else{var a=o.findIndex((function(t){return t.key===e.key})),l=SD(mD(o,F,e.key),C,x,w),c=o.slice();c.splice(a+1,0,CD),U(c),q(l),$("hide")}else F!==o&&(H(o),U(o))}),[i,o]),t.useEffect((function(){g||Q()}),[g]);var Z=y?V:o,ee={expandedKeys:i,selectedKeys:l,loadedKeys:s,loadingKeys:d,checkedKeys:c,halfCheckedKeys:f,dragOverNodeKey:v,dropPosition:b,keyEntities:p};return t.createElement(t.Fragment,null,k&&E&&t.createElement("span",{style:vD,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(E)),t.createElement("div",null,t.createElement("input",{style:vD,disabled:!1===S||h,tabIndex:!1!==S?j:null,onKeyDown:I,onFocus:T,onBlur:A,value:"",onChange:bD,"aria-label":"for screen reader"})),t.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},t.createElement("div",{className:"".concat(r,"-indent")},t.createElement("div",{ref:D,className:"".concat(r,"-indent-unit")}))),t.createElement(PA,a({},P,{data:Z,itemKey:ED,height:x,fullHeight:!1,virtual:C,itemHeight:w,prefixCls:"".concat(r,"-list"),ref:M,onVisibleChange:function(e,t){var n=new Set(e);t.filter((function(e){return!n.has(e)})).some((function(e){return ED(e)===yD}))&&Q()}}),(function(e){var n=e.pos,r=Object.assign({},(uD(e.data),e.data)),o=e.title,i=e.key,l=e.isStart,c=e.isEnd,s=SP(i,n);delete r.key,delete r.children;var d=TP(s,ee);return t.createElement(hD,a({},r,d,{title:o,active:!!E&&i===E.key,pos:n,data:e.data,isStart:l,isEnd:c,motion:y,motionNodes:i===yD?G:null,motionType:Y,onMotionStart:N,onMotionEnd:Q,treeNodeRequiredProps:ee,onMouseMove:function(){O(null)}}))})))}));kD.displayName="NodeList";const jD=kD;var ID=function(e){Ro(r,e);var n=Na(r);function r(){var e;At(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return h(Io(e=n.call.apply(n,[this].concat(a))),"destroyed",!1),h(Io(e),"delayedDragEnterLogic",void 0),h(Io(e),"loadingRetryTimes",{}),h(Io(e),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:EP()}),h(Io(e),"dragStartMousePosition",null),h(Io(e),"dragNode",void 0),h(Io(e),"currentMouseOverDroppableNodeKey",null),h(Io(e),"listRef",t.createRef()),h(Io(e),"onNodeDragStart",(function(t,n){var r=e.state,o=r.expandedKeys,a=r.keyEntities,i=e.props.onDragStart,l=n.props.eventKey;e.dragNode=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var c=LP(o,l);e.setState({draggingNodeKey:l,dragChildrenKeys:BP(l,a),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(c),window.addEventListener("dragend",e.onWindowDragEnd),null===i||void 0===i||i({event:t,node:AP(n.props)})})),h(Io(e),"onNodeDragEnter",(function(t,n){var r=e.state,o=r.expandedKeys,a=r.keyEntities,i=r.dragChildrenKeys,l=r.flattenNodes,c=r.indent,s=e.props,d=s.onDragEnter,u=s.onExpand,f=s.allowDrop,p=s.direction,h=n.props,m=h.pos,g=h.eventKey,v=Io(e).dragNode;if(e.currentMouseOverDroppableNodeKey!==g&&(e.currentMouseOverDroppableNodeKey=g),v){var b=HP(t,v,n,c,e.dragStartMousePosition,f,l,a,o,p),y=b.dropPosition,x=b.dropLevelOffset,w=b.dropTargetKey,C=b.dropContainerKey,S=b.dropTargetPos,E=b.dropAllowed,k=b.dragOverNodeKey;-1===i.indexOf(w)&&E?(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach((function(t){clearTimeout(e.delayedDragEnterLogic[t])})),v.props.eventKey!==n.props.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout((function(){if(null!==e.state.draggingNodeKey){var r=nt(o),i=xP(a,n.props.eventKey);i&&(i.children||[]).length&&(r=_P(o,n.props.eventKey)),"expandedKeys"in e.props||e.setExpandedKeys(r),null===u||void 0===u||u(r,{node:AP(n.props),expanded:!0,nativeEvent:t.nativeEvent})}}),800)),v.props.eventKey!==w||0!==x?(e.setState({dragOverNodeKey:k,dropPosition:y,dropLevelOffset:x,dropTargetKey:w,dropContainerKey:C,dropTargetPos:S,dropAllowed:E}),null===d||void 0===d||d({event:t,node:AP(n.props),expandedKeys:o})):e.resetDragState()):e.resetDragState()}else e.resetDragState()})),h(Io(e),"onNodeDragOver",(function(t,n){var r=e.state,o=r.dragChildrenKeys,a=r.flattenNodes,i=r.keyEntities,l=r.expandedKeys,c=r.indent,s=e.props,d=s.onDragOver,u=s.allowDrop,f=s.direction,p=Io(e).dragNode;if(p){var h=HP(t,p,n,c,e.dragStartMousePosition,u,a,i,l,f),m=h.dropPosition,g=h.dropLevelOffset,v=h.dropTargetKey,b=h.dropContainerKey,y=h.dropAllowed,x=h.dropTargetPos,w=h.dragOverNodeKey;-1===o.indexOf(v)&&y&&(p.props.eventKey===v&&0===g?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():m===e.state.dropPosition&&g===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&b===e.state.dropContainerKey&&x===e.state.dropTargetPos&&y===e.state.dropAllowed&&w===e.state.dragOverNodeKey||e.setState({dropPosition:m,dropLevelOffset:g,dropTargetKey:v,dropContainerKey:b,dropTargetPos:x,dropAllowed:y,dragOverNodeKey:w}),null===d||void 0===d||d({event:t,node:AP(n.props)}))}})),h(Io(e),"onNodeDragLeave",(function(t,n){e.currentMouseOverDroppableNodeKey!==n.props.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var r=e.props.onDragLeave;null===r||void 0===r||r({event:t,node:AP(n.props)})})),h(Io(e),"onWindowDragEnd",(function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)})),h(Io(e),"onNodeDragEnd",(function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null===r||void 0===r||r({event:t,node:AP(n.props)}),e.dragNode=null,window.removeEventListener("dragend",e.onWindowDragEnd)})),h(Io(e),"onNodeDrop",(function(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=e.state,i=a.dragChildrenKeys,l=a.dropPosition,c=a.dropTargetKey,s=a.dropTargetPos;if(a.dropAllowed){var d=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==c){var u=oe(oe({},TP(c,e.getTreeNodeRequiredProps())),{},{active:(null===(r=e.getActiveItem())||void 0===r?void 0:r.key)===c,data:xP(e.state.keyEntities,c).node}),f=-1!==i.indexOf(c);Ie(!f,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=zP(s),h={event:t,node:AP(u),dragNode:e.dragNode?AP(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(i),dropToGap:0!==l,dropPosition:l+Number(p[p.length-1])};o||null===d||void 0===d||d(h),e.dragNode=null}}})),h(Io(e),"cleanDragState",(function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null})),h(Io(e),"triggerExpandActionExpand",(function(t,n){var r=e.state,o=r.expandedKeys,a=r.flattenNodes,i=n.expanded,l=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var c=a.filter((function(e){return e.key===l}))[0],s=AP(oe(oe({},TP(l,e.getTreeNodeRequiredProps())),{},{data:c.data}));e.setExpandedKeys(i?LP(o,l):_P(o,l)),e.onNodeExpand(t,s)}})),h(Io(e),"onNodeClick",(function(t,n){var r=e.props,o=r.onClick;"click"===r.expandAction&&e.triggerExpandActionExpand(t,n),null===o||void 0===o||o(t,n)})),h(Io(e),"onNodeDoubleClick",(function(t,n){var r=e.props,o=r.onDoubleClick;"doubleClick"===r.expandAction&&e.triggerExpandActionExpand(t,n),null===o||void 0===o||o(t,n)})),h(Io(e),"onNodeSelect",(function(t,n){var r=e.state.selectedKeys,o=e.state,a=o.keyEntities,i=o.fieldNames,l=e.props,c=l.onSelect,s=l.multiple,d=n.selected,u=n[i.key],f=!d,p=(r=f?s?_P(r,u):[u]:LP(r,u)).map((function(e){var t=xP(a,e);return t?t.node:null})).filter((function(e){return e}));e.setUncontrolledState({selectedKeys:r}),null===c||void 0===c||c(r,{event:"select",selected:f,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})})),h(Io(e),"onNodeCheck",(function(t,n,r){var o,a=e.state,i=a.keyEntities,l=a.checkedKeys,c=a.halfCheckedKeys,s=e.props,d=s.checkStrictly,u=s.onCheck,f=n.key,p={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(d){var h=r?_P(l,f):LP(l,f);o={checked:h,halfChecked:LP(c,f)},p.checkedNodes=h.map((function(e){return xP(i,e)})).filter((function(e){return e})).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:h})}else{var m=qP([].concat(nt(l),[f]),!0,i),g=m.checkedKeys,v=m.halfCheckedKeys;if(!r){var b=new Set(g);b.delete(f);var y=qP(Array.from(b),{checked:!1,halfCheckedKeys:v},i);g=y.checkedKeys,v=y.halfCheckedKeys}o=g,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=v,g.forEach((function(e){var t=xP(i,e);if(t){var n=t.node,r=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}})),e.setUncontrolledState({checkedKeys:g},!1,{halfCheckedKeys:v})}null===u||void 0===u||u(o,p)})),h(Io(e),"onNodeLoad",(function(t){var n=t.key,r=new Promise((function(r,o){e.setState((function(a){var i=a.loadedKeys,l=void 0===i?[]:i,c=a.loadingKeys,s=void 0===c?[]:c,d=e.props,u=d.loadData,f=d.onLoad;return u&&-1===l.indexOf(n)&&-1===s.indexOf(n)?(u(t).then((function(){var o=_P(e.state.loadedKeys,n);null===f||void 0===f||f(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState((function(e){return{loadingKeys:LP(e.loadingKeys,n)}})),r()})).catch((function(t){if(e.setState((function(e){return{loadingKeys:LP(e.loadingKeys,n)}})),e.loadingRetryTimes[n]=(e.loadingRetryTimes[n]||0)+1,e.loadingRetryTimes[n]>=10){var a=e.state.loadedKeys;Ie(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:_P(a,n)}),r()}o(t)})),{loadingKeys:_P(s,n)}):null}))}));return r.catch((function(){})),r})),h(Io(e),"onNodeMouseEnter",(function(t,n){var r=e.props.onMouseEnter;null===r||void 0===r||r({event:t,node:n})})),h(Io(e),"onNodeMouseLeave",(function(t,n){var r=e.props.onMouseLeave;null===r||void 0===r||r({event:t,node:n})})),h(Io(e),"onNodeContextMenu",(function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))})),h(Io(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null===t||void 0===t||t.apply(void 0,r)})),h(Io(e),"onBlur",(function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null===t||void 0===t||t.apply(void 0,r)})),h(Io(e),"getTreeNodeRequiredProps",(function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}})),h(Io(e),"setExpandedKeys",(function(t){var n=e.state,r=jP(n.treeData,t,n.fieldNames);e.setUncontrolledState({expandedKeys:t,flattenNodes:r},!0)})),h(Io(e),"onNodeExpand",(function(t,n){var r=e.state.expandedKeys,o=e.state,a=o.listChanging,i=o.fieldNames,l=e.props,c=l.onExpand,s=l.loadData,d=n.expanded,u=n[i.key];if(!a){var f=r.indexOf(u),p=!d;if(Ie(d&&-1!==f||!d&&-1===f,"Expand state not sync with index check"),r=p?_P(r,u):LP(r,u),e.setExpandedKeys(r),null===c||void 0===c||c(r,{node:n,expanded:p,nativeEvent:t.nativeEvent}),p&&s){var h=e.onNodeLoad(n);h&&h.then((function(){var t=jP(e.state.treeData,r,i);e.setUncontrolledState({flattenNodes:t})})).catch((function(){var t=LP(e.state.expandedKeys,u);e.setExpandedKeys(t)}))}}})),h(Io(e),"onListChangeStart",(function(){e.setUncontrolledState({listChanging:!0})})),h(Io(e),"onListChangeEnd",(function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))})),h(Io(e),"onActiveChange",(function(t){var n=e.state.activeKey,r=e.props,o=r.onActiveChange,a=r.itemScrollOffset,i=void 0===a?0:a;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:i}),null===o||void 0===o||o(t))})),h(Io(e),"getActiveItem",(function(){var t=e.state,n=t.activeKey,r=t.flattenNodes;return null===n?null:r.find((function(e){return e.key===n}))||null})),h(Io(e),"offsetActiveKey",(function(t){var n=e.state,r=n.flattenNodes,o=n.activeKey,a=r.findIndex((function(e){return e.key===o}));-1===a&&t<0&&(a=r.length);var i=r[a=(a+t+r.length)%r.length];if(i){var l=i.key;e.onActiveChange(l)}else e.onActiveChange(null)})),h(Io(e),"onKeyDown",(function(t){var n=e.state,r=n.activeKey,o=n.expandedKeys,a=n.checkedKeys,i=n.fieldNames,l=e.props,c=l.onKeyDown,s=l.checkable,d=l.selectable;switch(t.which){case Vd.UP:e.offsetActiveKey(-1),t.preventDefault();break;case Vd.DOWN:e.offsetActiveKey(1),t.preventDefault()}var u=e.getActiveItem();if(u&&u.data){var f=e.getTreeNodeRequiredProps(),p=!1===u.data.isLeaf||!!(u.data[i.children]||[]).length,h=AP(oe(oe({},TP(r,f)),{},{data:u.data,active:!0}));switch(t.which){case Vd.LEFT:p&&o.includes(r)?e.onNodeExpand({},h):u.parent&&e.onActiveChange(u.parent.key),t.preventDefault();break;case Vd.RIGHT:p&&!o.includes(r)?e.onNodeExpand({},h):u.children&&u.children.length&&e.onActiveChange(u.children[0].key),t.preventDefault();break;case Vd.ENTER:case Vd.SPACE:!s||h.disabled||!1===h.checkable||h.disableCheckbox?s||!d||h.disabled||!1===h.selectable||e.onNodeSelect({},h):e.onNodeCheck({},h,!a.includes(r))}}null===c||void 0===c||c(t)})),h(Io(e),"setUncontrolledState",(function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var o=!1,a=!0,i={};Object.keys(t).forEach((function(n){n in e.props?a=!1:(o=!0,i[n]=t[n])})),!o||n&&!a||e.setState(oe(oe({},i),r))}})),h(Io(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return Nt(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,r=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:r}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,n=this.state,r=n.focused,o=n.flattenNodes,i=n.keyEntities,l=n.draggingNodeKey,c=n.activeKey,s=n.dropLevelOffset,d=n.dropContainerKey,u=n.dropTargetKey,p=n.dropPosition,m=n.dragOverNodeKey,g=n.indent,b=this.props,y=b.prefixCls,x=b.className,w=b.style,C=b.showLine,S=b.focusable,E=b.tabIndex,k=void 0===E?0:E,j=b.selectable,I=b.showIcon,T=b.icon,A=b.switcherIcon,O=b.draggable,N=b.checkable,R=b.checkStrictly,P=b.disabled,M=b.motion,D=b.loadData,L=b.filterTreeNode,_=b.height,z=b.itemHeight,B=b.virtual,F=b.titleRender,H=b.dropIndicatorRender,W=b.onContextMenu,V=b.onScroll,U=b.direction,K=b.rootClassName,G=b.rootStyle,q=hx(this.props,{aria:!0,data:!0});return O&&(e="object"===f(O)?O:"function"===typeof O?{nodeDraggable:O}:{}),t.createElement(vP.Provider,{value:{prefixCls:y,selectable:j,showIcon:I,icon:T,switcherIcon:A,draggable:e,draggingNodeKey:l,checkable:N,checkStrictly:R,disabled:P,keyEntities:i,dropLevelOffset:s,dropContainerKey:d,dropTargetKey:u,dropPosition:p,dragOverNodeKey:m,indent:g,direction:U,dropIndicatorRender:H,loadData:D,filterTreeNode:L,titleRender:F,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},t.createElement("div",{role:"tree",className:v()(y,x,K,h(h(h({},"".concat(y,"-show-line"),C),"".concat(y,"-focused"),r),"".concat(y,"-active-focused"),null!==c)),style:G},t.createElement(jD,a({ref:this.listRef,prefixCls:y,style:w,data:o,disabled:P,selectable:j,checkable:!!N,motion:M,dragging:null!==l,height:_,itemHeight:z,virtual:B,focusable:S,focused:r,tabIndex:k,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:W,onScroll:V},this.getTreeNodeRequiredProps(),q))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=t.prevProps,o={prevProps:e};function a(t){return!r&&t in e||r&&r[t]!==e[t]}var i=t.fieldNames;if(a("fieldNames")&&(i=EP(e.fieldNames),o.fieldNames=i),a("treeData")?n=e.treeData:a("children")&&(Ie(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=kP(e.children)),n){o.treeData=n;var l=IP(n,{fieldNames:i});o.keyEntities=oe(h({},yD,wD),l.keyEntities)}var c,s=o.keyEntities||t.keyEntities;if(a("expandedKeys")||r&&a("autoExpandParent"))o.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?UP(e.expandedKeys,s):e.expandedKeys;else if(!r&&e.defaultExpandAll){var d=oe({},s);delete d[yD],o.expandedKeys=Object.keys(d).map((function(e){return d[e].key}))}else!r&&e.defaultExpandedKeys&&(o.expandedKeys=e.autoExpandParent||e.defaultExpandParent?UP(e.defaultExpandedKeys,s):e.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,n||o.expandedKeys){var u=jP(n||t.treeData,o.expandedKeys||t.expandedKeys,i);o.flattenNodes=u}if((e.selectable&&(a("selectedKeys")?o.selectedKeys=WP(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(o.selectedKeys=WP(e.defaultSelectedKeys,e))),e.checkable)&&(a("checkedKeys")?c=VP(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?c=VP(e.defaultCheckedKeys)||{}:n&&(c=VP(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),c)){var f=c,p=f.checkedKeys,m=void 0===p?[]:p,g=f.halfCheckedKeys,v=void 0===g?[]:g;if(!e.checkStrictly){var b=qP(m,!0,s);m=b.checkedKeys,v=b.halfCheckedKeys}o.checkedKeys=m,o.halfCheckedKeys=v}return a("loadedKeys")&&(o.loadedKeys=e.loadedKeys),o}}]),r}(t.Component);h(ID,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var n=e.dropPosition,r=e.dropLevelOffset,o=e.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(n){case-1:a.top=0,a.left=-r*o;break;case 1:a.bottom=0,a.left=-r*o;break;case 0:a.bottom=0,a.left=o}return t.createElement("div",{style:a})},allowDrop:function(){return!0},expandAction:!1}),h(ID,"TreeNode",DP);const TD=ID;const AD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};var OD=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:AD}))};const ND=t.forwardRef(OD);const RD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};var PD=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:RD}))};const MD=t.forwardRef(PD);const DD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};var LD=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:DD}))};const _D=t.forwardRef(LD);const zD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};var BD=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:zD}))};const FD=t.forwardRef(BD),HD=new Rr("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),WD=(e,t)=>({[".".concat(e,"-switcher-icon")]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:"transform ".concat(t.motionDurationSlow)}}}),VD=(e,t)=>({[".".concat(e,"-drop-indicator")]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:"".concat(rn(t.lineWidthBold)," solid ").concat(t.colorPrimary),borderRadius:"50%",content:'""'}}}),UD=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:o,titleHeight:a,nodeSelectedBg:i,nodeHoverBg:l}=t,c=t.paddingXS;return{[n]:Object.assign(Object.assign({},$r(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:"background-color ".concat(t.motionDurationSlow),["&".concat(n,"-rtl")]:{["".concat(n,"-switcher")]:{"&_close":{["".concat(n,"-switcher-icon")]:{svg:{transform:"rotate(90deg)"}}}}},["&-focused:not(:hover):not(".concat(n,"-active-focused)")]:Object.assign({},Zr(t)),["".concat(n,"-list-holder-inner")]:{alignItems:"flex-start"},["&".concat(n,"-block-node")]:{["".concat(n,"-list-holder-inner")]:{alignItems:"stretch",["".concat(n,"-node-content-wrapper")]:{flex:"auto"},["".concat(r,".dragging")]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,border:"1px solid ".concat(t.colorPrimary),opacity:0,animationName:HD,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},["".concat(r)]:{display:"flex",alignItems:"flex-start",padding:"0 0 ".concat(rn(o)," 0"),outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{["".concat(n,"-node-content-wrapper")]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},["&-active ".concat(n,"-node-content-wrapper")]:{background:t.controlItemBgHover},["&:not(".concat(r,"-disabled).filter-node ").concat(n,"-title")]:{color:"inherit",fontWeight:500},"&-draggable":{cursor:"grab",["".concat(n,"-draggable-icon")]:{flexShrink:0,width:a,lineHeight:"".concat(rn(a)),textAlign:"center",visibility:"visible",opacity:.2,transition:"opacity ".concat(t.motionDurationSlow),["".concat(r,":hover &")]:{opacity:.45}},["&".concat(r,"-disabled")]:{["".concat(n,"-draggable-icon")]:{visibility:"hidden"}}}},["".concat(n,"-indent")]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:a}},["".concat(n,"-draggable-icon")]:{visibility:"hidden"},["".concat(n,"-switcher")]:Object.assign(Object.assign({},WD(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,margin:0,lineHeight:"".concat(rn(a)),textAlign:"center",cursor:"pointer",userSelect:"none",transition:"all ".concat(t.motionDurationSlow),borderRadius:t.borderRadius,"&-noop":{cursor:"unset"},["&:not(".concat(n,"-switcher-noop):hover")]:{backgroundColor:t.colorBgTextHover},"&_close":{["".concat(n,"-switcher-icon")]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:"1px solid ".concat(t.colorBorder),content:'""'}}}),["".concat(n,"-checkbox")]:{top:"initial",marginInlineEnd:c,alignSelf:"flex-start",marginTop:t.marginXXS},["".concat(n,"-node-content-wrapper, ").concat(n,"-checkbox + span")]:{position:"relative",zIndex:"auto",minHeight:a,margin:0,padding:"0 ".concat(rn(t.calc(t.paddingXS).div(2).equal())),color:"inherit",lineHeight:"".concat(rn(a)),background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:"all ".concat(t.motionDurationMid,", border 0s, line-height 0s, box-shadow 0s"),"&:hover":{backgroundColor:l},["&".concat(n,"-node-selected")]:{backgroundColor:i},["".concat(n,"-iconEle")]:{display:"inline-block",width:a,height:a,lineHeight:"".concat(rn(a)),textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},["".concat(n,"-unselectable ").concat(n,"-node-content-wrapper:hover")]:{backgroundColor:"transparent"},["".concat(n,"-node-content-wrapper")]:Object.assign({lineHeight:"".concat(rn(a)),userSelect:"none"},VD(e,t)),["".concat(r,".drop-container")]:{"> [draggable]":{boxShadow:"0 0 0 2px ".concat(t.colorPrimary)}},"&-show-line":{["".concat(n,"-indent")]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&-end":{"&:before":{display:"none"}}}},["".concat(n,"-switcher")]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},["".concat(r,"-leaf-last")]:{["".concat(n,"-switcher")]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:"".concat(rn(t.calc(a).div(2).equal())," !important")}}}}})}},KD=e=>{const{treeCls:t,treeNodeCls:n,treeNodePadding:r,directoryNodeSelectedBg:o,directoryNodeSelectedColor:a}=e;return{["".concat(t).concat(t,"-directory")]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,transition:"background-color ".concat(e.motionDurationMid),content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},["".concat(t,"-switcher")]:{transition:"color ".concat(e.motionDurationMid)},["".concat(t,"-node-content-wrapper")]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},["&".concat(t,"-node-selected")]:{color:a,background:"transparent"}},"&-selected":{"\n            &:hover::before,\n            &::before\n          ":{background:o},["".concat(t,"-switcher")]:{color:a},["".concat(t,"-node-content-wrapper")]:{color:a,background:"transparent"}}}}}},GD=(e,t)=>{const n=".".concat(e),r="".concat(n,"-treenode"),o=t.calc(t.paddingXS).div(2).equal(),a=Ho(t,{treeCls:n,treeNodeCls:r,treeNodePadding:o});return[UD(e,a),KD(a)]},qD=$o("Tree",((e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:$P("".concat(n,"-checkbox"),e)},GD(n,e),Bp(e)]}),(e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},(e=>{const{controlHeightSM:t}=e;return{titleHeight:t,nodeHoverBg:e.controlItemBgHover,nodeSelectedBg:e.controlItemBgActive}})(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})}));function XD(e){const{dropPosition:n,dropLevelOffset:r,prefixCls:o,indent:a,direction:i="ltr"}=e,l="ltr"===i?"left":"right",c={[l]:-r*a+4,["ltr"===i?"right":"left"]:0};switch(n){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[l]=a+4}return t.createElement("div",{style:c,className:"".concat(o,"-drop-indicator")})}const YD={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};var $D=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:YD}))};const JD=t.forwardRef($D);const QD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};var ZD=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:QD}))};const eL=t.forwardRef(ZD);const tL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};var nL=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:tL}))};const rL=t.forwardRef(nL),oL=e=>{const{prefixCls:n,switcherIcon:r,treeNodeProps:o,showLine:a}=e,{isLeaf:i,expanded:l,loading:c}=o;if(c)return t.createElement(yl,{className:"".concat(n,"-switcher-loading-icon")});let s;if(a&&"object"===typeof a&&(s=a.showLeafIcon),i){if(!a)return null;if("boolean"!==typeof s&&s){const e="function"===typeof s?s(o):s,t="".concat(n,"-switcher-line-custom-icon");return ua(e)?ha(e,{className:v()(e.props.className||"",t)}):e}return s?t.createElement(ND,{className:"".concat(n,"-switcher-line-icon")}):t.createElement("span",{className:"".concat(n,"-switcher-leaf-line")})}const d="".concat(n,"-switcher-icon"),u="function"===typeof r?r(o):r;return ua(u)?ha(u,{className:v()(u.props.className||"",d)}):void 0!==u?u:a?l?t.createElement(eL,{className:"".concat(n,"-switcher-line-icon")}):t.createElement(rL,{className:"".concat(n,"-switcher-line-icon")}):t.createElement(JD,{className:d})},aL=t.forwardRef(((e,n)=>{var r;const{getPrefixCls:o,direction:a,virtual:i,tree:l}=t.useContext(at),{prefixCls:c,className:s,showIcon:d=!1,showLine:u,switcherIcon:f,blockNode:p=!1,children:h,checkable:m=!1,selectable:g=!0,draggable:b,motion:y,style:x}=e,w=o("tree",c),C=o(),S=null!==y&&void 0!==y?y:Object.assign(Object.assign({},Qs(C)),{motionAppear:!1}),E=Object.assign(Object.assign({},e),{checkable:m,selectable:g,showIcon:d,motion:S,blockNode:p,showLine:Boolean(u),dropIndicatorRender:XD}),[k,j,I]=qD(w),[,T]=jo(),A=T.paddingXS/2+((null===(r=T.Tree)||void 0===r?void 0:r.titleHeight)||T.controlHeightSM),O=t.useMemo((()=>{if(!b)return!1;let e={};switch(typeof b){case"function":e.nodeDraggable=b;break;case"object":e=Object.assign({},b)}return!1!==e.icon&&(e.icon=e.icon||t.createElement(FD,null)),e}),[b]);return k(t.createElement(TD,Object.assign({itemHeight:A,ref:n,virtual:i},E,{style:Object.assign(Object.assign({},null===l||void 0===l?void 0:l.style),x),prefixCls:w,className:v()({["".concat(w,"-icon-hide")]:!d,["".concat(w,"-block-node")]:p,["".concat(w,"-unselectable")]:!g,["".concat(w,"-rtl")]:"rtl"===a},null===l||void 0===l?void 0:l.className,s,j,I),direction:a,checkable:m?t.createElement("span",{className:"".concat(w,"-checkbox-inner")}):m,selectable:g,switcherIcon:e=>t.createElement(oL,{prefixCls:w,switcherIcon:f,treeNodeProps:e,showLine:u}),draggable:O}),h))}));const iL=aL;var lL;function cL(e,t,n){const{key:r,children:o}=n;e.forEach((function(e){const a=e[r],i=e[o];!1!==t(a,e)&&cL(i||[],t,n)}))}function sL(e){let{treeData:t,expandedKeys:n,startKey:r,endKey:o,fieldNames:a}=e;const i=[];let l=lL.None;if(r&&r===o)return[r];if(!r||!o)return[];return cL(t,(e=>{if(l===lL.End)return!1;if(function(e){return e===r||e===o}(e)){if(i.push(e),l===lL.None)l=lL.Start;else if(l===lL.Start)return l=lL.End,!1}else l===lL.Start&&i.push(e);return n.includes(e)}),EP(a)),i}function dL(e,t,n){const r=nt(t),o=[];return cL(e,((e,t)=>{const n=r.indexOf(e);return-1!==n&&(o.push(t),r.splice(n,1)),!!r.length}),EP(n)),o}!function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"}(lL||(lL={}));var uL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function fL(e){const{isLeaf:n,expanded:r}=e;return n?t.createElement(ND,null):r?t.createElement(MD,null):t.createElement(_D,null)}function pL(e){let{treeData:t,children:n}=e;return t||kP(n)}const hL=(e,n)=>{var{defaultExpandAll:r,defaultExpandParent:o,defaultExpandedKeys:a}=e,i=uL(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const l=t.useRef(),c=t.useRef(),[s,d]=t.useState(i.selectedKeys||i.defaultSelectedKeys||[]),[u,f]=t.useState((()=>(()=>{const{keyEntities:e}=IP(pL(i));let t;return t=r?Object.keys(e):o?UP(i.expandedKeys||a||[],e):i.expandedKeys||a,t})()));t.useEffect((()=>{"selectedKeys"in i&&d(i.selectedKeys)}),[i.selectedKeys]),t.useEffect((()=>{"expandedKeys"in i&&f(i.expandedKeys)}),[i.expandedKeys]);const{getPrefixCls:p,direction:h}=t.useContext(at),{prefixCls:m,className:g,showIcon:b=!0,expandAction:y="click"}=i,x=uL(i,["prefixCls","className","showIcon","expandAction"]),w=p("tree",m),C=v()("".concat(w,"-directory"),{["".concat(w,"-directory-rtl")]:"rtl"===h},g);return t.createElement(iL,Object.assign({icon:fL,ref:n,blockNode:!0},x,{showIcon:b,expandAction:y,prefixCls:w,className:C,expandedKeys:u,selectedKeys:s,onSelect:(e,t)=>{var n;const{multiple:r,fieldNames:o}=i,{node:a,nativeEvent:s}=t,{key:f=""}=a,p=pL(i),h=Object.assign(Object.assign({},t),{selected:!0}),m=(null===s||void 0===s?void 0:s.ctrlKey)||(null===s||void 0===s?void 0:s.metaKey),g=null===s||void 0===s?void 0:s.shiftKey;let v;r&&m?(v=e,l.current=f,c.current=v,h.selectedNodes=dL(p,v,o)):r&&g?(v=Array.from(new Set([].concat(nt(c.current||[]),nt(sL({treeData:p,expandedKeys:u,startKey:f,endKey:l.current,fieldNames:o}))))),h.selectedNodes=dL(p,v,o)):(v=[f],l.current=f,c.current=v,h.selectedNodes=dL(p,v,o)),null===(n=i.onSelect)||void 0===n||n.call(i,v,h),"selectedKeys"in i||d(v)},onExpand:(e,t)=>{var n;return"expandedKeys"in i||f(e),null===(n=i.onExpand)||void 0===n?void 0:n.call(i,e,t)}}))};const mL=t.forwardRef(hL),gL=iL;gL.DirectoryTree=mL,gL.TreeNode=DP;const vL=gL;const bL=function(e){let{value:n,onChange:r,filterSearch:o,tablePrefixCls:a,locale:i}=e;return o?t.createElement("div",{className:"".concat(a,"-filter-dropdown-search")},t.createElement(Aj,{prefix:t.createElement(uj,null),placeholder:i.filterSearchPlaceholder,onChange:r,value:n,htmlSize:1,className:"".concat(a,"-filter-dropdown-search-input")})):null},yL=e=>{const{keyCode:t}=e;t===Vd.ENTER&&e.stopPropagation()},xL=t.forwardRef(((e,n)=>t.createElement("div",{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:yL,ref:n},e.children)));const wL=xL;function CL(e){let t=[];return(e||[]).forEach((e=>{let{value:n,children:r}=e;t.push(n),r&&(t=[].concat(nt(t),nt(CL(r))))})),t}function SL(e,t){return("string"===typeof t||"number"===typeof t)&&(null===t||void 0===t?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()))}function EL(e){let{filters:n,prefixCls:r,filteredKeys:o,filterMultiple:a,searchValue:i,filterSearch:l}=e;return n.map(((e,n)=>{const c=String(e.value);if(e.children)return{key:c||n,label:e.text,popupClassName:"".concat(r,"-dropdown-submenu"),children:EL({filters:e.children,prefixCls:r,filteredKeys:o,filterMultiple:a,searchValue:i,filterSearch:l})};const s=a?aM:lI,d={key:void 0!==e.value?c:n,label:t.createElement(t.Fragment,null,t.createElement(s,{checked:o.includes(c)}),t.createElement("span",null,e.text))};return i.trim()?"function"===typeof l?l(i,e)?d:null:SL(i,e.text)?d:null:d}))}function kL(e){return e||[]}const jL=function(e){var n,r;const{tablePrefixCls:o,prefixCls:a,column:i,dropdownPrefixCls:l,columnKey:c,filterMultiple:s,filterMode:d="menu",filterSearch:u=!1,filterState:f,triggerFilter:p,locale:h,children:m,getPopupContainer:g,rootClassName:b}=e,{filterDropdownOpen:y,onFilterDropdownOpenChange:x,filterResetToDefaultFilteredValue:w,defaultFilteredValue:C,filterDropdownVisible:S,onFilterDropdownVisibleChange:E}=i,[k,j]=t.useState(!1),I=!(!f||!(null===(n=f.filteredKeys)||void 0===n?void 0:n.length)&&!f.forceFiltered),T=e=>{j(e),null===x||void 0===x||x(e),null===E||void 0===E||E(e)},A=null!==(r=null!==y&&void 0!==y?y:S)&&void 0!==r?r:k,O=null===f||void 0===f?void 0:f.filteredKeys,[N,R]=function(e){const n=t.useRef(e),r=Lh();return[()=>n.current,e=>{n.current=e,r()}]}(kL(O)),P=e=>{let{selectedKeys:t}=e;R(t)},M=(e,t)=>{let{node:n,checked:r}=t;P(s?{selectedKeys:e}:{selectedKeys:r&&n.key?[n.key]:[]})};t.useEffect((()=>{k&&P({selectedKeys:kL(O)})}),[O]);const[D,L]=t.useState([]),_=e=>{L(e)},[z,B]=t.useState(""),F=e=>{const{value:t}=e.target;B(t)};t.useEffect((()=>{k||B("")}),[k]);const H=e=>{const t=e&&e.length?e:null;return null!==t||f&&f.filteredKeys?Tt(t,null===f||void 0===f?void 0:f.filteredKeys,!0)?null:void p({column:i,key:c,filteredKeys:t}):null},W=()=>{T(!1),H(N())},V=function(){let{confirm:e,closeDropdown:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{confirm:!1,closeDropdown:!1};e&&H([]),t&&T(!1),B(""),R(w?(C||[]).map((e=>String(e))):[])},U=function(){let{closeDropdown:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{closeDropdown:!0};e&&T(!1),H(N())},K=v()({["".concat(l,"-menu-without-submenu")]:(G=i.filters||[],!G.some((e=>{let{children:t}=e;return t})))});var G;const q=e=>{if(e.target.checked){const e=CL(null===i||void 0===i?void 0:i.filters).map((e=>String(e)));R(e)}else R([])},X=e=>{let{filters:t}=e;return(t||[]).map(((e,t)=>{const n=String(e.value),r={title:e.text,key:void 0!==e.value?n:String(t)};return e.children&&(r.children=X({filters:e.children})),r}))},Y=e=>{var t;return Object.assign(Object.assign({},e),{text:e.title,value:e.key,children:(null===(t=e.children)||void 0===t?void 0:t.map((e=>Y(e))))||[]})};let $,J;if("function"===typeof i.filterDropdown)$=i.filterDropdown({prefixCls:"".concat(l,"-custom"),setSelectedKeys:e=>P({selectedKeys:e}),selectedKeys:N(),confirm:U,clearFilters:V,filters:i.filters,visible:A,close:()=>{T(!1)}});else if(i.filterDropdown)$=i.filterDropdown;else{const e=N()||[],n=()=>0===(i.filters||[]).length?t.createElement(iO,{image:iO.PRESENTED_IMAGE_SIMPLE,description:h.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):"tree"===d?t.createElement(t.Fragment,null,t.createElement(bL,{filterSearch:u,value:z,onChange:F,tablePrefixCls:o,locale:h}),t.createElement("div",{className:"".concat(o,"-filter-dropdown-tree")},s?t.createElement(aM,{checked:e.length===CL(i.filters).length,indeterminate:e.length>0&&e.length<CL(i.filters).length,className:"".concat(o,"-filter-dropdown-checkall"),onChange:q},h.filterCheckall):null,t.createElement(vL,{checkable:!0,selectable:!1,blockNode:!0,multiple:s,checkStrictly:!s,className:"".concat(l,"-menu"),onCheck:M,checkedKeys:e,selectedKeys:e,showIcon:!1,treeData:X({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:z.trim()?e=>"function"===typeof u?u(z,Y(e)):SL(z,e.title):void 0}))):t.createElement(t.Fragment,null,t.createElement(bL,{filterSearch:u,value:z,onChange:F,tablePrefixCls:o,locale:h}),t.createElement(fh,{selectable:!0,multiple:s,prefixCls:"".concat(l,"-menu"),className:K,onSelect:P,onDeselect:P,selectedKeys:e,getPopupContainer:g,openKeys:D,onOpenChange:_,items:EL({filters:i.filters||[],filterSearch:u,prefixCls:a,filteredKeys:N(),filterMultiple:s,searchValue:z})})),r=()=>w?Tt((C||[]).map((e=>String(e))),e,!0):0===e.length;$=t.createElement(t.Fragment,null,n(),t.createElement("div",{className:"".concat(a,"-dropdown-btns")},t.createElement(ac,{type:"link",size:"small",disabled:r(),onClick:()=>V()},h.filterReset),t.createElement(ac,{type:"primary",size:"small",onClick:W},h.filterConfirm)))}i.filterDropdown&&($=t.createElement(_p,{selectable:void 0},$)),J="function"===typeof i.filterIcon?i.filterIcon(I):i.filterIcon?i.filterIcon:t.createElement(dD,null);const{direction:Q}=t.useContext(at);return t.createElement("div",{className:"".concat(a,"-column")},t.createElement("span",{className:"".concat(o,"-column-title")},m),t.createElement(Nh,{dropdownRender:()=>t.createElement(wL,{className:"".concat(a,"-dropdown")},$),trigger:["click"],open:A,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==O&&R(kL(O)),T(e),e||i.filterDropdown||W())},getPopupContainer:g,placement:"rtl"===Q?"bottomLeft":"bottomRight",rootClassName:b},t.createElement("span",{role:"button",tabIndex:-1,className:v()("".concat(a,"-trigger"),{active:I}),onClick:e=>{e.stopPropagation()}},J)))};function IL(e,t,n){let r=[];return(e||[]).forEach(((e,o)=>{var a;const i=iD(o,n);if(e.filters||"filterDropdown"in e||"onFilter"in e)if("filteredValue"in e){let t=e.filteredValue;"filterDropdown"in e||(t=null!==(a=null===t||void 0===t?void 0:t.map(String))&&void 0!==a?a:t),r.push({column:e,key:aD(e,i),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:aD(e,i),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});"children"in e&&(r=[].concat(nt(r),nt(IL(e.children,t,i))))})),r}function TL(e,n,r,o,a,i,l,c,s){return r.map(((r,d)=>{const u=iD(d,c),{filterMultiple:f=!0,filterMode:p,filterSearch:h}=r;let m=r;if(m.filters||m.filterDropdown){const c=aD(m,u),d=o.find((e=>{let{key:t}=e;return c===t}));m=Object.assign(Object.assign({},m),{title:o=>t.createElement(jL,{tablePrefixCls:e,prefixCls:"".concat(e,"-filter"),dropdownPrefixCls:n,column:m,columnKey:c,filterState:d,filterMultiple:f,filterMode:p,filterSearch:h,triggerFilter:i,locale:a,getPopupContainer:l,rootClassName:s},lD(r.title,o))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:TL(e,n,m.children,o,a,i,l,u,s)})),m}))}function AL(e){const t={};return e.forEach((e=>{let{key:n,filteredKeys:r,column:o}=e;const a=n,{filters:i,filterDropdown:l}=o;if(l)t[a]=r||null;else if(Array.isArray(r)){const e=CL(i);t[a]=e.filter((e=>r.includes(String(e))))}else t[a]=null})),t}function OL(e,t,n){return t.reduce(((e,r)=>{const{column:{onFilter:o,filters:a},filteredKeys:i}=r;return o&&i&&i.length?e.map((e=>Object.assign({},e))).filter((e=>i.some((r=>{const i=CL(a),l=i.findIndex((e=>String(e)===String(r))),c=-1!==l?i[l]:r;return e[n]&&(e[n]=OL(e[n],t,n)),o(c,e)})))):e}),e)}const NL=e=>e.flatMap((e=>"children"in e?[e].concat(nt(NL(e.children||[]))):[e]));const RL=function(e){let{prefixCls:n,dropdownPrefixCls:r,mergedColumns:o,onFilterChange:a,getPopupContainer:i,locale:l,rootClassName:c}=e;ud("Table");const s=t.useMemo((()=>NL(o||[])),[o]),[d,u]=t.useState((()=>IL(s,!0))),f=t.useMemo((()=>{const e=IL(s,!1);if(0===e.length)return e;let t=!0,n=!0;if(e.forEach((e=>{let{filteredKeys:r}=e;void 0!==r?t=!1:n=!1})),t){const e=(s||[]).map(((e,t)=>aD(e,iD(t))));return d.filter((t=>{let{key:n}=t;return e.includes(n)})).map((t=>{const n=s[e.findIndex((e=>e===t.key))];return Object.assign(Object.assign({},t),{column:Object.assign(Object.assign({},t.column),n),forceFiltered:n.filtered})}))}return e}),[s,d]),p=t.useMemo((()=>AL(f)),[f]),h=e=>{const t=f.filter((t=>{let{key:n}=t;return n!==e.key}));t.push(e),u(t),a(AL(t),t)};return[e=>TL(n,r,e,f,l,h,i,void 0,c),f,p]};const PL=function(){const e=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t];n&&Object.keys(n).forEach((t=>{const r=n[t];void 0!==r&&(e[t]=r)}))}return e};var ML=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const DL=10;const LL=function(e,n,r){const o=r&&"object"===typeof r?r:{},{total:a=0}=o,i=ML(o,["total"]),[l,c]=(0,t.useState)((()=>({current:"defaultCurrent"in i?i.defaultCurrent:1,pageSize:"defaultPageSize"in i?i.defaultPageSize:DL}))),s=PL(l,i,{total:a>0?a:e}),d=Math.ceil((a||e)/s.pageSize);s.current>d&&(s.current=d||1);const u=(e,t)=>{c({current:null!==e&&void 0!==e?e:1,pageSize:t||s.pageSize})};return!1===r?[{},()=>{}]:[Object.assign(Object.assign({},s),{onChange:(e,t)=>{var o;r&&(null===(o=r.onChange)||void 0===o||o.call(r,e,t)),u(e,t),n(e,t||(null===s||void 0===s?void 0:s.pageSize))}}),u]};const _L={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};var zL=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:_L}))};const BL=t.forwardRef(zL);const FL={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};var HL=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:FL}))};const WL=t.forwardRef(HL),VL="ascend",UL="descend";function KL(e){return"object"===typeof e.sorter&&"number"===typeof e.sorter.multiple&&e.sorter.multiple}function GL(e){return"function"===typeof e?e:!(!e||"object"!==typeof e||!e.compare)&&e.compare}function qL(e,t,n){let r=[];function o(e,t){r.push({column:e,key:aD(e,t),multiplePriority:KL(e),sortOrder:e.sortOrder})}return(e||[]).forEach(((e,a)=>{const i=iD(a,n);e.children?("sortOrder"in e&&o(e,i),r=[].concat(nt(r),nt(qL(e.children,t,i)))):e.sorter&&("sortOrder"in e?o(e,i):t&&e.defaultSortOrder&&r.push({column:e,key:aD(e,i),multiplePriority:KL(e),sortOrder:e.defaultSortOrder}))})),r}function XL(e,n,r,o,a,i,l,c){return(n||[]).map(((n,s)=>{const d=iD(s,c);let u=n;if(u.sorter){const c=u.sortDirections||a,s=void 0===u.showSorterTooltip?l:u.showSorterTooltip,f=aD(u,d),p=r.find((e=>{let{key:t}=e;return t===f})),h=p?p.sortOrder:null,m=function(e,t){return t?e[e.indexOf(t)+1]:e[0]}(c,h);let g;if(n.sortIcon)g=n.sortIcon({sortOrder:h});else{const n=c.includes(VL)&&t.createElement(WL,{className:v()("".concat(e,"-column-sorter-up"),{active:h===VL})}),r=c.includes(UL)&&t.createElement(BL,{className:v()("".concat(e,"-column-sorter-down"),{active:h===UL})});g=t.createElement("span",{className:v()("".concat(e,"-column-sorter"),{["".concat(e,"-column-sorter-full")]:!(!n||!r)})},t.createElement("span",{className:"".concat(e,"-column-sorter-inner"),"aria-hidden":"true"},n,r))}const{cancelSort:b,triggerAsc:y,triggerDesc:x}=i||{};let w=b;m===UL?w=x:m===VL&&(w=y);const C="object"===typeof s?Object.assign({title:w},s):{title:w};u=Object.assign(Object.assign({},u),{className:v()(u.className,{["".concat(e,"-column-sort")]:h}),title:r=>{const o=t.createElement("div",{className:"".concat(e,"-column-sorters")},t.createElement("span",{className:"".concat(e,"-column-title")},lD(n.title,r)),g);return s?t.createElement(Hd,Object.assign({},C),o):o},onHeaderCell:t=>{const r=n.onHeaderCell&&n.onHeaderCell(t)||{},a=r.onClick,i=r.onKeyDown;r.onClick=e=>{o({column:n,key:f,sortOrder:m,multiplePriority:KL(n)}),null===a||void 0===a||a(e)},r.onKeyDown=e=>{e.keyCode===Vd.ENTER&&(o({column:n,key:f,sortOrder:m,multiplePriority:KL(n)}),null===i||void 0===i||i(e))};const l=function(e,t){const n=lD(e,t);return"[object Object]"===Object.prototype.toString.call(n)?"":n}(n.title,{}),c=null===l||void 0===l?void 0:l.toString();return h?r["aria-sort"]="ascend"===h?"ascending":"descending":r["aria-label"]=c||"",r.className=v()(r.className,"".concat(e,"-column-has-sorters")),r.tabIndex=0,n.ellipsis&&(r.title=(null!==l&&void 0!==l?l:"").toString()),r}})}return"children"in u&&(u=Object.assign(Object.assign({},u),{children:XL(e,u.children,r,o,a,i,l,d)})),u}))}function YL(e){const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function $L(e){const t=e.filter((e=>{let{sortOrder:t}=e;return t})).map(YL);return 0===t.length&&e.length?Object.assign(Object.assign({},YL(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function JL(e,t,n){const r=t.slice().sort(((e,t)=>t.multiplePriority-e.multiplePriority)),o=e.slice(),a=r.filter((e=>{let{column:{sorter:t},sortOrder:n}=e;return GL(t)&&n}));return a.length?o.sort(((e,t)=>{for(let n=0;n<a.length;n+=1){const r=a[n],{column:{sorter:o},sortOrder:i}=r,l=GL(o);if(l&&i){const n=l(e,t,i);if(0!==n)return i===VL?n:-n}}return 0})).map((e=>{const r=e[n];return r?Object.assign(Object.assign({},e),{[n]:JL(r,t,n)}):e})):o}function QL(e,t){return e.map((e=>{const n=Object.assign({},e);return n.title=lD(e.title,t),"children"in n&&(n.children=QL(n.children,t)),n}))}function ZL(e){return[t.useCallback((t=>QL(t,e)),[e])]}const e_=eP(((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r})),t_=hP(((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r})),n_=e=>{const{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:i,tablePaddingHorizontal:l,calc:c}=e,s="".concat(rn(n)," ").concat(r," ").concat(o),d=(e,r,o)=>({["&".concat(t,"-").concat(e)]:{["> ".concat(t,"-container")]:{["> ".concat(t,"-content, > ").concat(t,"-body")]:{"\n            > table > tbody > tr > th,\n            > table > tbody > tr > td\n          ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat(rn(c(r).mul(-1).equal()),"\n              ").concat(rn(c(c(o).add(n)).mul(-1).equal()))}}}}}});return{["".concat(t,"-wrapper")]:{["".concat(t).concat(t,"-bordered")]:Object.assign(Object.assign(Object.assign({["> ".concat(t,"-title")]:{border:s,borderBottom:0},["> ".concat(t,"-container")]:{borderInlineStart:s,borderTop:s,["\n            > ".concat(t,"-content,\n            > ").concat(t,"-header,\n            > ").concat(t,"-body,\n            > ").concat(t,"-summary\n          ")]:{"> table":{"\n                > thead > tr > th,\n                > thead > tr > td,\n                > tbody > tr > th,\n                > tbody > tr > td,\n                > tfoot > tr > th,\n                > tfoot > tr > td\n              ":{borderInlineEnd:s},"> thead":{"> tr:not(:last-child) > th":{borderBottom:s},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n                > thead > tr,\n                > tbody > tr,\n                > tfoot > tr\n              ":{["> ".concat(t,"-cell-fix-right-first::after")]:{borderInlineEnd:s}},"\n                > tbody > tr > th,\n                > tbody > tr > td\n              ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat(rn(c(i).mul(-1).equal())," ").concat(rn(c(c(l).add(n)).mul(-1).equal())),"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:s,content:'""'}}}}}},["&".concat(t,"-scroll-horizontal")]:{["> ".concat(t,"-container > ").concat(t,"-body")]:{"> table > tbody":{["\n                > tr".concat(t,"-expanded-row,\n                > tr").concat(t,"-placeholder\n              ")]:{"> th, > td":{borderInlineEnd:0}}}}}},d("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),d("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{["> ".concat(t,"-footer")]:{border:s,borderTop:0}}),["".concat(t,"-cell")]:{["".concat(t,"-container:first-child")]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:"0 ".concat(rn(n)," 0 ").concat(rn(n)," ").concat(a)}},["".concat(t,"-bordered ").concat(t,"-cell-scrollbar")]:{borderInlineEnd:s}}}},r_=e=>{const{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-cell-ellipsis")]:Object.assign(Object.assign({},Yr),{wordBreak:"keep-all",["\n          &".concat(t,"-cell-fix-left-last,\n          &").concat(t,"-cell-fix-right-first\n        ")]:{overflow:"visible",["".concat(t,"-cell-content")]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},["".concat(t,"-column-title")]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},o_=e=>{const{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody > tr").concat(t,"-placeholder")]:{textAlign:"center",color:e.colorTextDisabled,"\n          &:hover > th,\n          &:hover > td,\n        ":{background:e.colorBgContainer}}}}},a_=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:"color ".concat(e.motionDurationSlow),"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),i_=e=>{const{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:o,paddingXS:a,lineType:i,tableBorderColor:l,tableExpandIconBg:c,tableExpandColumnWidth:s,borderRadius:d,tablePaddingVertical:u,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:h,expandIconMarginTop:m,expandIconSize:g,expandIconHalfInner:v,expandIconScale:b,calc:y}=e,x="".concat(rn(o)," ").concat(i," ").concat(l),w=y(h).sub(o).equal();return{["".concat(t,"-wrapper")]:{["".concat(t,"-expand-icon-col")]:{width:s},["".concat(t,"-row-expand-icon-cell")]:{textAlign:"center",["".concat(t,"-row-expand-icon")]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},["".concat(t,"-row-indent")]:{height:1,float:"left"},["".concat(t,"-row-expand-icon")]:Object.assign(Object.assign({},a_(e)),{position:"relative",float:"left",boxSizing:"border-box",width:g,height:g,padding:0,color:"inherit",lineHeight:rn(g),background:c,border:x,borderRadius:d,transform:"scale(".concat(b,")"),transition:"all ".concat(r),userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:"transform ".concat(r," ease-out"),content:'""'},"&::before":{top:v,insetInlineEnd:w,insetInlineStart:w,height:o},"&::after":{top:w,bottom:w,insetInlineStart:v,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),["".concat(t,"-row-indent + ").concat(t,"-row-expand-icon")]:{marginTop:m,marginInlineEnd:a},["tr".concat(t,"-expanded-row")]:{"&, &:hover":{"> th, > td":{background:p}},["".concat(n,"-descriptions-view")]:{display:"flex",table:{flex:"auto",width:"auto"}}},["".concat(t,"-expanded-row-fixed")]:{position:"relative",margin:"".concat(rn(y(u).mul(-1).equal())," ").concat(rn(y(f).mul(-1).equal())),padding:"".concat(rn(u)," ").concat(rn(f))}}}},l_=e=>{const{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:i,paddingXS:l,colorText:c,lineWidth:s,lineType:d,tableBorderColor:u,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:h,borderRadius:m,motionDurationSlow:g,colorTextDescription:v,colorPrimary:b,tableHeaderFilterActiveBg:y,colorTextDisabled:x,tableFilterDropdownBg:w,tableFilterDropdownHeight:C,controlItemBgHover:S,controlItemBgActive:E,boxShadowSecondary:k,filterDropdownMenuBg:j,calc:I}=e,T="".concat(n,"-dropdown"),A="".concat(t,"-filter-dropdown"),O="".concat(n,"-tree"),N="".concat(rn(s)," ").concat(d," ").concat(u);return[{["".concat(t,"-wrapper")]:{["".concat(t,"-filter-column")]:{display:"flex",justifyContent:"space-between"},["".concat(t,"-filter-trigger")]:{position:"relative",display:"flex",alignItems:"center",marginBlock:I(i).mul(-1).equal(),marginInline:"".concat(rn(i)," ").concat(rn(I(h).div(2).mul(-1).equal())),padding:"0 ".concat(rn(i)),color:f,fontSize:p,borderRadius:m,cursor:"pointer",transition:"all ".concat(g),"&:hover":{color:v,background:y},"&.active":{color:b}}}},{["".concat(n,"-dropdown")]:{[A]:Object.assign(Object.assign({},$r(e)),{minWidth:o,backgroundColor:w,borderRadius:m,boxShadow:k,overflow:"hidden",["".concat(T,"-menu")]:{maxHeight:C,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:j,"&:empty::after":{display:"block",padding:"".concat(rn(l)," 0"),color:x,fontSize:p,textAlign:"center",content:'"Not Found"'}},["".concat(A,"-tree")]:{paddingBlock:"".concat(rn(l)," 0"),paddingInline:l,[O]:{padding:0},["".concat(O,"-treenode ").concat(O,"-node-content-wrapper:hover")]:{backgroundColor:S},["".concat(O,"-treenode-checkbox-checked ").concat(O,"-node-content-wrapper")]:{"&, &:hover":{backgroundColor:E}}},["".concat(A,"-search")]:{padding:l,borderBottom:N,"&-input":{input:{minWidth:a},[r]:{color:x}}},["".concat(A,"-checkall")]:{width:"100%",marginBottom:i,marginInlineStart:i},["".concat(A,"-btns")]:{display:"flex",justifyContent:"space-between",padding:"".concat(rn(I(l).sub(s).equal())," ").concat(rn(l)),overflow:"hidden",borderTop:N}})}},{["".concat(n,"-dropdown ").concat(A,", ").concat(A,"-submenu")]:{["".concat(n,"-checkbox-wrapper + span")]:{paddingInlineStart:l,color:c},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},c_=e=>{const{componentCls:t,lineWidth:n,colorSplit:r,motionDurationSlow:o,zIndexTableFixed:a,tableBg:i,zIndexTableSticky:l,calc:c}=e,s=r;return{["".concat(t,"-wrapper")]:{["\n        ".concat(t,"-cell-fix-left,\n        ").concat(t,"-cell-fix-right\n      ")]:{position:"sticky !important",zIndex:a,background:i},["\n        ".concat(t,"-cell-fix-left-first::after,\n        ").concat(t,"-cell-fix-left-last::after\n      ")]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:c(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},["".concat(t,"-cell-fix-left-all::after")]:{display:"none"},["\n        ".concat(t,"-cell-fix-right-first::after,\n        ").concat(t,"-cell-fix-right-last::after\n      ")]:{position:"absolute",top:0,bottom:c(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},["".concat(t,"-container")]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:c(l).add(1).equal({unit:!1}),width:30,transition:"box-shadow ".concat(o),content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},["".concat(t,"-ping-left")]:{["&:not(".concat(t,"-has-fix-left) ").concat(t,"-container::before")]:{boxShadow:"inset 10px 0 8px -8px ".concat(s)},["\n          ".concat(t,"-cell-fix-left-first::after,\n          ").concat(t,"-cell-fix-left-last::after\n        ")]:{boxShadow:"inset 10px 0 8px -8px ".concat(s)},["".concat(t,"-cell-fix-left-last::before")]:{backgroundColor:"transparent !important"}},["".concat(t,"-ping-right")]:{["&:not(".concat(t,"-has-fix-right) ").concat(t,"-container::after")]:{boxShadow:"inset -10px 0 8px -8px ".concat(s)},["\n          ".concat(t,"-cell-fix-right-first::after,\n          ").concat(t,"-cell-fix-right-last::after\n        ")]:{boxShadow:"inset -10px 0 8px -8px ".concat(s)}},["".concat(t,"-fixed-column-gapped")]:{["\n        ".concat(t,"-cell-fix-left-first::after,\n        ").concat(t,"-cell-fix-left-last::after,\n        ").concat(t,"-cell-fix-right-first::after,\n        ").concat(t,"-cell-fix-right-last::after\n      ")]:{boxShadow:"none"}}}}},s_=e=>{const{componentCls:t,antCls:n,margin:r}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-pagination").concat(n,"-pagination")]:{margin:"".concat(rn(r)," 0")},["".concat(t,"-pagination")]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},d_=e=>{const{componentCls:t,tableRadius:n}=e;return{["".concat(t,"-wrapper")]:{[t]:{["".concat(t,"-title, ").concat(t,"-header")]:{borderRadius:"".concat(rn(n)," ").concat(rn(n)," 0 0")},["".concat(t,"-title + ").concat(t,"-container")]:{borderStartStartRadius:0,borderStartEndRadius:0,["".concat(t,"-header, table")]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:"0 0 ".concat(rn(n)," ").concat(rn(n))}}}}},u_=e=>{const{componentCls:t}=e;return{["".concat(t,"-wrapper-rtl")]:{direction:"rtl",table:{direction:"rtl"},["".concat(t,"-pagination-left")]:{justifyContent:"flex-end"},["".concat(t,"-pagination-right")]:{justifyContent:"flex-start"},["".concat(t,"-row-expand-icon")]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},["".concat(t,"-container")]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},["".concat(t,"-row-indent")]:{float:"right"}}}}},f_=e=>{const{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:o,padding:a,paddingXS:i,headerIconColor:l,headerIconHoverColor:c,tableSelectionColumnWidth:s,tableSelectedRowBg:d,tableSelectedRowHoverBg:u,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:h}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-selection-col")]:{width:s,["&".concat(t,"-selection-col-with-dropdown")]:{width:h(s).add(o).add(h(a).div(4)).equal()}},["".concat(t,"-bordered ").concat(t,"-selection-col")]:{width:h(s).add(h(i).mul(2)).equal(),["&".concat(t,"-selection-col-with-dropdown")]:{width:h(s).add(o).add(h(a).div(4)).add(h(i).mul(2)).equal()}},["\n        table tr th".concat(t,"-selection-column,\n        table tr td").concat(t,"-selection-column,\n        ").concat(t,"-selection-column\n      ")]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",["".concat(n,"-radio-wrapper")]:{marginInlineEnd:0}},["table tr th".concat(t,"-selection-column").concat(t,"-cell-fix-left")]:{zIndex:e.zIndexTableFixed+1},["table tr th".concat(t,"-selection-column::after")]:{backgroundColor:"transparent !important"},["".concat(t,"-selection")]:{position:"relative",display:"inline-flex",flexDirection:"column"},["".concat(t,"-selection-extra")]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),marginInlineStart:"100%",paddingInlineStart:rn(h(p).div(4).equal()),[r]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:c}}},["".concat(t,"-tbody")]:{["".concat(t,"-row")]:{["&".concat(t,"-row-selected")]:{["> ".concat(t,"-cell")]:{background:d,"&-row-hover":{background:u}}},["> ".concat(t,"-cell-row-hover")]:{background:f}}}}}},p_=e=>{const{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,o=(e,o,a,i)=>({["".concat(t).concat(t,"-").concat(e)]:{fontSize:i,["\n        ".concat(t,"-title,\n        ").concat(t,"-footer,\n        ").concat(t,"-cell,\n        ").concat(t,"-thead > tr > th,\n        ").concat(t,"-tbody > tr > th,\n        ").concat(t,"-tbody > tr > td,\n        tfoot > tr > th,\n        tfoot > tr > td\n      ")]:{padding:"".concat(rn(o)," ").concat(rn(a))},["".concat(t,"-filter-trigger")]:{marginInlineEnd:rn(r(a).div(2).mul(-1).equal())},["".concat(t,"-expanded-row-fixed")]:{margin:"".concat(rn(r(o).mul(-1).equal())," ").concat(rn(r(a).mul(-1).equal()))},["".concat(t,"-tbody")]:{["".concat(t,"-wrapper:only-child ").concat(t)]:{marginBlock:rn(r(o).mul(-1).equal()),marginInline:"".concat(rn(r(n).sub(a).equal())," ").concat(rn(r(a).mul(-1).equal()))}},["".concat(t,"-selection-extra")]:{paddingInlineStart:rn(r(a).div(4).equal())}}});return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},h_=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:o,headerIconHoverColor:a}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-thead th").concat(t,"-column-has-sorters")]:{outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},["\n          &".concat(t,"-cell-fix-left:hover,\n          &").concat(t,"-cell-fix-right:hover\n        ")]:{background:e.tableFixedHeaderSortActiveBg}},["".concat(t,"-thead th").concat(t,"-column-sort")]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},["td".concat(t,"-column-sort")]:{background:e.tableBodySortBg},["".concat(t,"-column-title")]:{position:"relative",zIndex:1,flex:1},["".concat(t,"-column-sorters")]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},["".concat(t,"-column-sorter")]:{marginInlineStart:n,color:o,fontSize:0,transition:"color ".concat(e.motionDurationSlow),"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},["".concat(t,"-column-sorter-up + ").concat(t,"-column-sorter-down")]:{marginTop:"-0.3em"}},["".concat(t,"-column-sorters:hover ").concat(t,"-column-sorter")]:{color:a}}}},m_=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:i,zIndexTableSticky:l,stickyScrollBarBorderRadius:c,lineWidth:s,lineType:d,tableBorderColor:u}=e,f="".concat(rn(s)," ").concat(d," ").concat(u);return{["".concat(t,"-wrapper")]:{["".concat(t,"-sticky")]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:"".concat(rn(a)," !important"),zIndex:l,display:"flex",alignItems:"center",background:i,borderTop:f,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:r,borderRadius:c,transition:"all ".concat(e.motionDurationSlow,", transform none"),position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},g_=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:r,calc:o}=e,a="".concat(rn(n)," ").concat(e.lineType," ").concat(r);return{["".concat(t,"-wrapper")]:{["".concat(t,"-summary")]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},["div".concat(t,"-summary")]:{boxShadow:"0 ".concat(rn(o(n).mul(-1).equal())," 0 ").concat(r)}}}},v_=e=>{const{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:o,tableBorderColor:a,calc:i}=e,l="".concat(rn(r)," ").concat(o," ").concat(a),c="".concat(t,"-expanded-row-cell");return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody-virtual")]:{["".concat(t,"-row:not(tr)")]:{display:"flex",boxSizing:"border-box",width:"100%"},["".concat(t,"-cell")]:{borderBottom:l,transition:"background ".concat(n)},["".concat(t,"-expanded-row")]:{["".concat(c).concat(c,"-fixed")]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:"calc(var(--virtual-width) - ".concat(rn(r),")"),borderInlineEnd:"none"}}},["".concat(t,"-bordered")]:{["".concat(t,"-tbody-virtual")]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},["".concat(t,"-cell")]:{borderInlineEnd:l,["&".concat(t,"-cell-fix-right-first:before")]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:i(r).mul(-1).equal(),borderInlineStart:l}}},["&".concat(t,"-virtual")]:{["".concat(t,"-placeholder ").concat(t,"-cell")]:{borderInlineEnd:l,borderBottom:l}}}}}},b_=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:i,lineType:l,tableBorderColor:c,tableFontSize:s,tableBg:d,tableRadius:u,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:h,tableHeaderCellSplitColor:m,tableFooterTextColor:g,tableFooterBg:v,calc:b}=e,y="".concat(rn(i)," ").concat(l," ").concat(c);return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{[t]:Object.assign(Object.assign({},$r(e)),{fontSize:s,background:d,borderRadius:"".concat(rn(u)," ").concat(rn(u)," 0 0"),scrollbarColor:"".concat(e.tableScrollThumbBg," ").concat(e.tableScrollBg)}),table:{width:"100%",textAlign:"start",borderRadius:"".concat(rn(u)," ").concat(rn(u)," 0 0"),borderCollapse:"separate",borderSpacing:0},["\n          ".concat(t,"-cell,\n          ").concat(t,"-thead > tr > th,\n          ").concat(t,"-tbody > tr > th,\n          ").concat(t,"-tbody > tr > td,\n          tfoot > tr > th,\n          tfoot > tr > td\n        ")]:{position:"relative",padding:"".concat(rn(r)," ").concat(rn(o)),overflowWrap:"break-word"},["".concat(t,"-title")]:{padding:"".concat(rn(r)," ").concat(rn(o))},["".concat(t,"-thead")]:{"\n          > tr > th,\n          > tr > td\n        ":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:y,transition:"background ".concat(p," ease"),"&[colspan]:not([colspan='1'])":{textAlign:"center"},["&:not(:last-child):not(".concat(t,"-selection-column):not(").concat(t,"-row-expand-icon-cell):not([colspan])::before")]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:m,transform:"translateY(-50%)",transition:"background-color ".concat(p),content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},["".concat(t,"-tbody")]:{"> tr":{"> th, > td":{transition:"background ".concat(p,", border-color ").concat(p),borderBottom:y,["\n              > ".concat(t,"-wrapper:only-child,\n              > ").concat(t,"-expanded-row-fixed > ").concat(t,"-wrapper:only-child\n            ")]:{[t]:{marginBlock:rn(b(r).mul(-1).equal()),marginInline:"".concat(rn(b(a).sub(o).equal()),"\n                ").concat(rn(b(o).mul(-1).equal())),["".concat(t,"-tbody > tr:last-child > td")]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:y,transition:"background ".concat(p," ease")}}},["".concat(t,"-footer")]:{padding:"".concat(rn(r)," ").concat(rn(o)),color:g,background:v}})}},y_=$o("Table",(e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:o,headerBg:a,headerColor:i,headerSortActiveBg:l,headerSortHoverBg:c,bodySortBg:s,rowHoverBg:d,rowSelectedBg:u,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:h,cellPaddingInline:m,cellPaddingBlockMD:g,cellPaddingInlineMD:v,cellPaddingBlockSM:b,cellPaddingInlineSM:y,borderColor:x,footerBg:w,footerColor:C,headerBorderRadius:S,cellFontSize:E,cellFontSizeMD:k,cellFontSizeSM:j,headerSplitColor:I,fixedHeaderSortActiveBg:T,headerFilterHoverBg:A,filterDropdownBg:O,expandIconBg:N,selectionColumnWidth:R,stickyScrollBarBg:P,calc:M}=e,D=Ho(e,{tableFontSize:E,tableBg:r,tableRadius:S,tablePaddingVertical:h,tablePaddingHorizontal:m,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:v,tablePaddingVerticalSmall:b,tablePaddingHorizontalSmall:y,tableBorderColor:x,tableHeaderTextColor:i,tableHeaderBg:a,tableFooterTextColor:C,tableFooterBg:w,tableHeaderCellSplitColor:I,tableHeaderSortBg:l,tableHeaderSortHoverBg:c,tableBodySortBg:s,tableFixedHeaderSortActiveBg:T,tableHeaderFilterActiveBg:A,tableFilterDropdownBg:O,tableRowHoverBg:d,tableSelectedRowBg:u,tableSelectedRowHoverBg:f,zIndexTableFixed:2,zIndexTableSticky:3,tableFontSizeMiddle:k,tableFontSizeSmall:j,tableSelectionColumnWidth:R,tableExpandIconBg:N,tableExpandColumnWidth:M(o).add(M(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:P,tableScrollThumbBgHover:t,tableScrollBg:n});return[b_(D),s_(D),g_(D),h_(D),l_(D),n_(D),d_(D),i_(D),g_(D),o_(D),f_(D),c_(D),m_(D),r_(D),p_(D),u_(D),v_(D)]}),(e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:i,controlItemBgActiveHover:l,padding:c,paddingSM:s,paddingXS:d,colorBorderSecondary:u,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:h,fontSize:m,fontSizeSM:g,lineHeight:v,lineWidth:b,colorIcon:y,colorIconHover:x,opacityLoading:w,controlInteractiveSize:C}=e,S=new ao(o).onBackground(n).toHexShortString(),E=new ao(a).onBackground(n).toHexShortString(),k=new ao(t).onBackground(n).toHexShortString(),j=new ao(y),I=new ao(x),T=C/2-b,A=2*T+3*b;return{headerBg:k,headerColor:r,headerSortActiveBg:S,headerSortHoverBg:E,bodySortBg:k,rowHoverBg:k,rowSelectedBg:i,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:s,cellPaddingInlineMD:d,cellPaddingBlockSM:d,cellPaddingInlineSM:d,borderColor:u,headerBorderRadius:f,footerBg:k,footerColor:r,cellFontSize:m,cellFontSizeMD:m,cellFontSizeSM:m,headerSplitColor:u,fixedHeaderSortActiveBg:S,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:h,stickyScrollBarBorderRadius:100,expandIconMarginTop:(m*v-3*b)/2-Math.ceil((1.4*g-3*b)/2),headerIconColor:j.clone().setAlpha(j.getAlpha()*w).toRgbString(),headerIconHoverColor:I.clone().setAlpha(I.getAlpha()*w).toRgbString(),expandIconHalfInner:T,expandIconSize:A,expandIconScale:C/A}}),{unitless:{expandIconScale:!0}}),x_=[],w_=(e,n)=>{var r,o;const{prefixCls:a,className:i,rootClassName:l,style:c,size:s,bordered:d,dropdownPrefixCls:u,dataSource:f,pagination:p,rowSelection:h,rowKey:m="key",rowClassName:g,columns:b,children:y,childrenColumnName:x,onChange:w,getPopupContainer:C,loading:S,expandIcon:E,expandable:k,expandedRowRender:j,expandIconColumnIndex:I,indentSize:T,scroll:A,sortDirections:O,locale:N,showSorterTooltip:R=!0,virtual:P}=e;ud("Table");const M=t.useMemo((()=>b||RR(y)),[b,y]),D=t.useMemo((()=>M.some((e=>e.responsive))),[M]),L=_h(D),_=t.useMemo((()=>{const e=new Set(Object.keys(L).filter((e=>L[e])));return M.filter((t=>!t.responsive||t.responsive.some((t=>e.has(t)))))}),[M,L]),z=rt(e,["className","style","columns"]),{locale:B=au,direction:F,table:H,renderEmpty:W,getPrefixCls:V,getPopupContainer:U}=t.useContext(at),K=Yi(s),G=Object.assign(Object.assign({},B.Table),N),q=f||x_,X=V("table",a),Y=V("dropdown",u),[,$]=jo(),J=lh(X),[Q,Z,ee]=y_(X,J),te=Object.assign(Object.assign({childrenColumnName:x,expandIconColumnIndex:I},k),{expandIcon:null!==(r=null===k||void 0===k?void 0:k.expandIcon)&&void 0!==r?r:null===(o=null===H||void 0===H?void 0:H.expandable)||void 0===o?void 0:o.expandIcon}),{childrenColumnName:ne="children"}=te,re=t.useMemo((()=>q.some((e=>null===e||void 0===e?void 0:e[ne]))?"nest":j||k&&k.expandedRowRender?"row":null),[q]),oe={body:t.useRef()},ae=function(e){return(t,n)=>{const r=t.querySelector(".".concat(e,"-container"));let o=n;if(r){const e=getComputedStyle(r);o=n-parseInt(e.borderLeftWidth,10)-parseInt(e.borderRightWidth,10)}return o}}(X),ie=t.useRef(null),le=t.useRef(null);pM(n,(()=>Object.assign(Object.assign({},le.current),{nativeElement:ie.current})));const ce=t.useMemo((()=>"function"===typeof m?m:e=>null===e||void 0===e?void 0:e[m]),[m]),[se]=function(e,n,r){const o=t.useRef({});return[function(t){if(!o.current||o.current.data!==e||o.current.childrenColumnName!==n||o.current.getRowKey!==r){const a=new Map;function i(e){e.forEach(((e,t)=>{const o=r(e,t);a.set(o,e),e&&"object"===typeof e&&n in e&&i(e[n]||[])}))}i(e),o.current={data:e,childrenColumnName:n,kvMap:a,getRowKey:r}}return o.current.kvMap.get(t)}]}(q,ne,ce),de={},ue=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var r,o,a;const i=Object.assign(Object.assign({},de),e);n&&(null===(r=de.resetPagination)||void 0===r||r.call(de),(null===(o=i.pagination)||void 0===o?void 0:o.current)&&(i.pagination.current=1),p&&p.onChange&&p.onChange(1,null===(a=i.pagination)||void 0===a?void 0:a.pageSize)),A&&!1!==A.scrollToFirstRowOnChange&&oe.body.current&&gM(0,{getContainer:()=>oe.body.current}),null===w||void 0===w||w(i.pagination,i.filters,i.sorter,{currentDataSource:OL(JL(q,i.sorterStates,ne),i.filterStates,ne),action:t})},[fe,pe,he,me]=function(e){let{prefixCls:n,mergedColumns:r,onSorterChange:o,sortDirections:a,tableLocale:i,showSorterTooltip:l}=e;const[c,s]=t.useState(qL(r,!0)),d=t.useMemo((()=>{let e=!0;const t=qL(r,!1);if(!t.length)return c;const n=[];function o(t){e?n.push(t):n.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let a=null;return t.forEach((t=>{null===a?(o(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:a=!0)):(a&&!1!==t.multiplePriority||(e=!1),o(t))})),n}),[r,c]),u=t.useMemo((()=>{const e=d.map((e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n}}));return{sortColumns:e,sortColumn:e[0]&&e[0].column,sortOrder:e[0]&&e[0].order}}),[d]);function f(e){let t;t=!1!==e.multiplePriority&&d.length&&!1!==d[0].multiplePriority?[].concat(nt(d.filter((t=>{let{key:n}=t;return n!==e.key}))),[e]):[e],s(t),o($L(t),t)}return[e=>XL(n,e,d,f,a,i,l),d,u,()=>$L(d)]}({prefixCls:X,mergedColumns:_,onSorterChange:(e,t)=>{ue({sorter:e,sorterStates:t},"sort",!1)},sortDirections:O||["ascend","descend"],tableLocale:G,showSorterTooltip:R}),ge=t.useMemo((()=>JL(q,pe,ne)),[q,pe]);de.sorter=me(),de.sorterStates=pe;const[ve,be,ye]=RL({prefixCls:X,locale:G,dropdownPrefixCls:Y,mergedColumns:_,onFilterChange:(e,t)=>{ue({filters:e,filterStates:t},"filter",!0)},getPopupContainer:C||U,rootClassName:v()(l,J)}),xe=OL(ge,be,ne);de.filters=ye,de.filterStates=be;const we=t.useMemo((()=>{const e={};return Object.keys(ye).forEach((t=>{null!==ye[t]&&(e[t]=ye[t])})),Object.assign(Object.assign({},he),{filters:e})}),[he,ye]),[Ce]=ZL(we),[Se,Ee]=LL(xe.length,((e,t)=>{ue({pagination:Object.assign(Object.assign({},de.pagination),{current:e,pageSize:t})},"paginate")}),p);de.pagination=!1===p?{}:function(e,t){const n={current:e.current,pageSize:e.pageSize},r=t&&"object"===typeof t?t:{};return Object.keys(r).forEach((t=>{const r=e[t];"function"!==typeof r&&(n[t]=r)})),n}(Se,p),de.resetPagination=Ee;const ke=t.useMemo((()=>{if(!1===p||!Se.pageSize)return xe;const{current:e=1,total:t,pageSize:n=DL}=Se;return xe.length<t?xe.length>n?xe.slice((e-1)*n,e*n):xe:xe.slice((e-1)*n,e*n)}),[!!p,xe,Se&&Se.current,Se&&Se.pageSize,Se&&Se.total]),[je,Ie]=fM({prefixCls:X,data:xe,pageData:ke,getRowKey:ce,getRecordByKey:se,expandType:re,childrenColumnName:ne,locale:G,getPopupContainer:C||U},h);te.__PARENT_RENDER_ICON__=te.expandIcon,te.expandIcon=te.expandIcon||E||oD(G),"nest"===re&&void 0===te.expandIconColumnIndex?te.expandIconColumnIndex=h?1:0:te.expandIconColumnIndex>0&&h&&(te.expandIconColumnIndex-=1),"number"!==typeof te.indentSize&&(te.indentSize="number"===typeof T?T:15);const Te=t.useCallback((e=>Ce(je(ve(fe(e))))),[fe,ve,je]);let Ae,Oe,Ne;if(!1!==p&&(null===Se||void 0===Se?void 0:Se.total)){let e;e=Se.size?Se.size:"small"===K||"middle"===K?"small":void 0;const n=n=>t.createElement(XM,Object.assign({},Se,{className:v()("".concat(X,"-pagination ").concat(X,"-pagination-").concat(n),Se.className),size:e})),r="rtl"===F?"left":"right",{position:o}=Se;if(null!==o&&Array.isArray(o)){const e=o.find((e=>e.includes("top"))),t=o.find((e=>e.includes("bottom"))),a=o.every((e=>"none"==="".concat(e)));e||t||a||(Oe=n(r)),e&&(Ae=n(e.toLowerCase().replace("top",""))),t&&(Oe=n(t.toLowerCase().replace("bottom","")))}else Oe=n(r)}"boolean"===typeof S?Ne={spinning:S}:"object"===typeof S&&(Ne=Object.assign({spinning:!0},S));const Re=v()(ee,J,"".concat(X,"-wrapper"),null===H||void 0===H?void 0:H.className,{["".concat(X,"-wrapper-rtl")]:"rtl"===F},i,l,Z),Pe=Object.assign(Object.assign({},null===H||void 0===H?void 0:H.style),c),Me=N&&N.emptyText||(null===W||void 0===W?void 0:W("Table"))||t.createElement(lO,{componentName:"Table"}),De=P?t_:e_,Le={},_e=t.useMemo((()=>{const{fontSize:e,lineHeight:t,padding:n,paddingXS:r,paddingSM:o}=$,a=Math.floor(e*t);switch(K){case"large":return 2*n+a;case"small":return 2*r+a;default:return 2*o+a}}),[$,K]);return P&&(Le.listItemHeight=_e),Q(t.createElement("div",{ref:ie,className:Re,style:Pe},t.createElement(rD,Object.assign({spinning:!1},Ne),Ae,t.createElement(De,Object.assign({},Le,z,{ref:le,columns:_,direction:F,expandable:te,prefixCls:X,className:v()({["".concat(X,"-middle")]:"middle"===K,["".concat(X,"-small")]:"small"===K,["".concat(X,"-bordered")]:d,["".concat(X,"-empty")]:0===q.length},ee,J,Z),data:ke,rowKey:ce,rowClassName:(e,t,n)=>{let r;return r="function"===typeof g?v()(g(e,t,n)):v()(g),v()({["".concat(X,"-row-selected")]:Ie.has(ce(e,t))},r)},emptyText:Me,internalHooks:BN,internalRefs:oe,transformColumns:Te,getContainerWidth:ae})),Oe)))},C_=t.forwardRef(w_),S_=(e,n)=>{const r=t.useRef(0);return r.current+=1,t.createElement(C_,Object.assign({},e,{ref:n,_renderTimes:r.current}))},E_=t.forwardRef(S_);E_.SELECTION_COLUMN=iM,E_.EXPAND_COLUMN=zN,E_.SELECTION_ALL=lM,E_.SELECTION_INVERT=cM,E_.SELECTION_NONE=sM,E_.Column=mP,E_.ColumnGroup=gP,E_.Summary=cR;const k_=E_;const j_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};var I_=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:j_}))};const T_=t.forwardRef(I_),A_=t.createContext(void 0),{Provider:O_}=A_,N_=A_,R_=new Rr("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),P_=new Rr("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),M_=new Rr("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),D_=new Rr("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),L_=new Rr("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),__=new Rr("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),z_=e=>{const{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e;return Ho(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:e.colorBgContainer,badgeColor:e.colorError,badgeColorHover:e.colorErrorHover,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},B_=e=>{const{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},F_=$o("Badge",(e=>(e=>{const{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,motionDurationSlow:a,textFontSize:i,textFontSizeSM:l,statusSize:c,dotSize:s,textFontWeight:d,indicatorHeight:u,indicatorHeightSM:f,marginXS:p,calc:h}=e,m="".concat(r,"-scroll-number"),g=Od(e,((e,n)=>{let{darkColor:r}=n;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:r,["&:not(".concat(t,"-count)")]:{color:r}}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{zIndex:e.indicatorZIndex,minWidth:u,height:u,color:e.badgeTextColor,fontWeight:d,fontSize:i,lineHeight:rn(u),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:h(u).div(2).equal(),boxShadow:"0 0 0 ".concat(rn(o)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:f,height:f,fontSize:l,lineHeight:rn(f),borderRadius:h(f).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat(rn(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:s,minWidth:s,height:s,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat(rn(o)," ").concat(e.badgeShadowColor)},["".concat(t,"-dot").concat(m)]:{transition:"background ".concat(a)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(m,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(n,"-spin")]:{animationName:__,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:R_,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:p,color:e.colorText,fontSize:e.fontSize}}}),g),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:P_,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:M_,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:D_,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:L_,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(m,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(m,"-custom-component, ").concat(m)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},["".concat(m)]:{overflow:"hidden",["".concat(m,"-only")]:{position:"relative",display:"inline-block",height:u,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(m,"-only-unit")]:{height:u,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(m,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(m,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}})(z_(e))),B_),H_=$o(["Badge","Ribbon"],(e=>(e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:a}=e,i="".concat(t,"-ribbon"),l="".concat(t,"-ribbon-wrapper"),c=Od(e,((e,t)=>{let{darkColor:n}=t;return{["&".concat(i,"-color-").concat(e)]:{background:n,color:n}}}));return{["".concat(l)]:{position:"relative"},["".concat(i)]:Object.assign(Object.assign(Object.assign(Object.assign({},$r(e)),{position:"absolute",top:r,padding:"0 ".concat(rn(e.paddingXS)),color:e.colorPrimary,lineHeight:rn(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(i,"-text")]:{color:e.colorTextLightSolid},["".concat(i,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat(rn(a(o).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),c),{["&".concat(i,"-placement-end")]:{insetInlineEnd:a(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(i,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(i,"-placement-start")]:{insetInlineStart:a(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(i,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(z_(e))),B_);const W_=e=>{const{className:n,prefixCls:r,style:o,color:a,children:i,text:l,placement:c="end",rootClassName:s}=e,{getPrefixCls:d,direction:u}=t.useContext(at),f=d("ribbon",r),p="".concat(f,"-wrapper"),[h,m,g]=H_(f,p),b=Ld(a,!1),y=v()(f,"".concat(f,"-placement-").concat(c),{["".concat(f,"-rtl")]:"rtl"===u,["".concat(f,"-color-").concat(a)]:b},n),x={},w={};return a&&!b&&(x.background=a,w.color=a),h(t.createElement("div",{className:v()(p,s,m,g)},i,t.createElement("div",{className:v()(y,m),style:Object.assign(Object.assign({},x),o)},t.createElement("span",{className:"".concat(f,"-text")},l),t.createElement("div",{className:"".concat(f,"-corner"),style:w}))))};function V_(e){let n,{prefixCls:r,value:o,current:a,offset:i=0}=e;return i&&(n={position:"absolute",top:"".concat(i,"00%"),left:0}),t.createElement("span",{style:n,className:v()("".concat(r,"-only-unit"),{current:a})},o)}function U_(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}function K_(e){const{prefixCls:n,count:r,value:o}=e,a=Number(o),i=Math.abs(r),[l,c]=t.useState(a),[s,d]=t.useState(i),u=()=>{c(a),d(i)};let f,p;if(t.useEffect((()=>{const e=setTimeout((()=>{u()}),1e3);return()=>{clearTimeout(e)}}),[a]),l===a||Number.isNaN(a)||Number.isNaN(l))f=[t.createElement(V_,Object.assign({},e,{key:a,current:!0}))],p={transition:"none"};else{f=[];const n=a+10,r=[];for(let e=a;e<=n;e+=1)r.push(e);const o=r.findIndex((e=>e%10===l));f=r.map(((n,r)=>{const a=n%10;return t.createElement(V_,Object.assign({},e,{key:n,value:a,offset:r-o,current:r===o}))}));p={transform:"translateY(".concat(-U_(l,a,s<i?1:-1),"00%)")}}return t.createElement("span",{className:"".concat(n,"-only"),style:p,onTransitionEnd:u},f)}var G_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const q_=t.forwardRef(((e,n)=>{const{prefixCls:r,count:o,className:a,motionClassName:i,style:l,title:c,show:s,component:d="sup",children:u}=e,f=G_(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=t.useContext(at),h=p("scroll-number",r),m=Object.assign(Object.assign({},f),{"data-show":s,style:l,className:v()(h,a,i),title:c});let g=o;if(o&&Number(o)%1===0){const e=String(o).split("");g=t.createElement("bdi",null,e.map(((n,r)=>t.createElement(K_,{prefixCls:h,count:Number(o),value:n,key:e.length-r}))))}return l&&l.borderColor&&(m.style=Object.assign(Object.assign({},l),{boxShadow:"0 0 0 1px ".concat(l.borderColor," inset")})),u?ha(u,(e=>({className:v()("".concat(h,"-custom-component"),null===e||void 0===e?void 0:e.className,i)}))):t.createElement(d,Object.assign({},m,{ref:n}),g)})),X_=q_;var Y_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const $_=(e,n)=>{var r,o,a,i,l;const{prefixCls:c,scrollNumberPrefixCls:s,children:d,status:u,text:f,color:p,count:h=null,overflowCount:m=99,dot:g=!1,size:b="default",title:y,offset:x,style:w,className:C,rootClassName:S,classNames:E,styles:k,showZero:j=!1}=e,I=Y_(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:T,direction:A,badge:O}=t.useContext(at),N=T("badge",c),[R,P,M]=F_(N),D=h>m?"".concat(m,"+"):h,L="0"===D||0===D,_=(null!==u&&void 0!==u||null!==p&&void 0!==p)&&(null===h||L&&!j),z=g&&!L,B=z?"":D,F=(0,t.useMemo)((()=>(null===B||void 0===B||""===B||L&&!j)&&!z),[B,L,j,z]),H=(0,t.useRef)(h);F||(H.current=h);const W=H.current,V=(0,t.useRef)(B);F||(V.current=B);const U=V.current,K=(0,t.useRef)(z);F||(K.current=z);const G=(0,t.useMemo)((()=>{if(!x)return Object.assign(Object.assign({},null===O||void 0===O?void 0:O.style),w);const e={marginTop:x[1]};return"rtl"===A?e.left=parseInt(x[0],10):e.right=-parseInt(x[0],10),Object.assign(Object.assign(Object.assign({},e),null===O||void 0===O?void 0:O.style),w)}),[A,x,w,null===O||void 0===O?void 0:O.style]),q=null!==y&&void 0!==y?y:"string"===typeof W||"number"===typeof W?W:void 0,X=F||!f?null:t.createElement("span",{className:"".concat(N,"-status-text")},f),Y=W&&"object"===typeof W?ha(W,(e=>({style:Object.assign(Object.assign({},G),e.style)}))):void 0,$=Ld(p,!1),J=v()(null===E||void 0===E?void 0:E.indicator,null===(r=null===O||void 0===O?void 0:O.classNames)||void 0===r?void 0:r.indicator,{["".concat(N,"-status-dot")]:_,["".concat(N,"-status-").concat(u)]:!!u,["".concat(N,"-color-").concat(p)]:$}),Q={};p&&!$&&(Q.color=p,Q.background=p);const Z=v()(N,{["".concat(N,"-status")]:_,["".concat(N,"-not-a-wrapper")]:!d,["".concat(N,"-rtl")]:"rtl"===A},C,S,null===O||void 0===O?void 0:O.className,null===(o=null===O||void 0===O?void 0:O.classNames)||void 0===o?void 0:o.root,null===E||void 0===E?void 0:E.root,P,M);if(!d&&_){const e=G.color;return R(t.createElement("span",Object.assign({},I,{className:Z,style:Object.assign(Object.assign(Object.assign({},null===k||void 0===k?void 0:k.root),null===(a=null===O||void 0===O?void 0:O.styles)||void 0===a?void 0:a.root),G)}),t.createElement("span",{className:J,style:Object.assign(Object.assign(Object.assign({},null===k||void 0===k?void 0:k.indicator),null===(i=null===O||void 0===O?void 0:O.styles)||void 0===i?void 0:i.indicator),Q)}),f&&t.createElement("span",{style:{color:e},className:"".concat(N,"-status-text")},f)))}return R(t.createElement("span",Object.assign({ref:n},I,{className:Z,style:Object.assign(Object.assign({},null===(l=null===O||void 0===O?void 0:O.styles)||void 0===l?void 0:l.root),null===k||void 0===k?void 0:k.root)}),d,t.createElement(xi,{visible:!F,motionName:"".concat(N,"-zoom"),motionAppear:!1,motionDeadline:1e3},(e=>{let{className:n,ref:r}=e;var o,a;const i=T("scroll-number",s),l=K.current,c=v()(null===E||void 0===E?void 0:E.indicator,null===(o=null===O||void 0===O?void 0:O.classNames)||void 0===o?void 0:o.indicator,{["".concat(N,"-dot")]:l,["".concat(N,"-count")]:!l,["".concat(N,"-count-sm")]:"small"===b,["".concat(N,"-multiple-words")]:!l&&U&&U.toString().length>1,["".concat(N,"-status-").concat(u)]:!!u,["".concat(N,"-color-").concat(p)]:$});let d=Object.assign(Object.assign(Object.assign({},null===k||void 0===k?void 0:k.indicator),null===(a=null===O||void 0===O?void 0:O.styles)||void 0===a?void 0:a.indicator),G);return p&&!$&&(d=d||{},d.background=p),t.createElement(X_,{prefixCls:i,show:!F,motionClassName:n,className:c,count:U,title:q,style:d,key:"scrollNumber",ref:r},Y)})),X))},J_=t.forwardRef($_);J_.Ribbon=W_;const Q_=J_;const Z_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};var ez=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Z_}))};const tz=t.forwardRef(ez),nz=e=>{const{icon:n,description:r,prefixCls:o,className:a}=e,i=t.createElement("div",{className:"".concat(o,"-icon")},t.createElement(tz,null));return t.createElement("div",{onClick:e.onClick,onFocus:e.onFocus,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,className:v()(a,"".concat(o,"-content"))},n||r?t.createElement(t.Fragment,null,n&&t.createElement("div",{className:"".concat(o,"-icon")},n),r&&t.createElement("div",{className:"".concat(o,"-description")},r)):i)},rz=(0,t.memo)(nz),oz=e=>0===e?0:e-Math.sqrt(Math.pow(e,2)/2),az=e=>{const{componentCls:t,floatButtonSize:n,motionDurationSlow:r,motionEaseInOutCirc:o}=e,a="".concat(t,"-group"),i=new Rr("antFloatButtonMoveDownIn",{"0%":{transform:"translate3d(0, ".concat(rn(n),", 0)"),transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),l=new Rr("antFloatButtonMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, ".concat(rn(n),", 0)"),transformOrigin:"0 0",opacity:0}});return[{["".concat(a,"-wrap")]:Object.assign({},hd("".concat(a,"-wrap"),i,l,r,!0))},{["".concat(a,"-wrap")]:{["\n          &".concat(a,"-wrap-enter,\n          &").concat(a,"-wrap-appear\n        ")]:{opacity:0,animationTimingFunction:o},["&".concat(a,"-wrap-leave")]:{animationTimingFunction:o}}}]},iz=e=>{const{antCls:t,componentCls:n,floatButtonSize:r,margin:o,borderRadiusLG:a,borderRadiusSM:i,badgeOffset:l,floatButtonBodyPadding:c,calc:s}=e,d="".concat(n,"-group");return{[d]:Object.assign(Object.assign({},$r(e)),{zIndex:99,display:"block",border:"none",position:"fixed",width:r,height:"auto",boxShadow:"none",minHeight:r,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,borderRadius:a,["".concat(d,"-wrap")]:{zIndex:-1,display:"block",position:"relative",marginBottom:o},["&".concat(d,"-rtl")]:{direction:"rtl"},[n]:{position:"static"}}),["".concat(d,"-circle")]:{["".concat(n,"-circle:not(:last-child)")]:{marginBottom:e.margin,["".concat(n,"-body")]:{width:r,height:r,borderRadius:"50%"}}},["".concat(d,"-square")]:{["".concat(n,"-square")]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:a,borderStartEndRadius:a},"&:last-child":{borderEndStartRadius:a,borderEndEndRadius:a},"&:not(:last-child)":{borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(t,"-badge")]:{["".concat(t,"-badge-count")]:{top:s(s(c).add(l)).mul(-1).equal(),insetInlineEnd:s(s(c).add(l)).mul(-1).equal()}}},["".concat(d,"-wrap")]:{display:"block",borderRadius:a,boxShadow:e.boxShadowSecondary,["".concat(n,"-square")]:{boxShadow:"none",marginTop:0,borderRadius:0,padding:c,"&:first-child":{borderStartStartRadius:a,borderStartEndRadius:a},"&:last-child":{borderEndStartRadius:a,borderEndEndRadius:a},"&:not(:last-child)":{borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(n,"-body")]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize}}}},["".concat(d,"-circle-shadow")]:{boxShadow:"none"},["".concat(d,"-square-shadow")]:{boxShadow:e.boxShadowSecondary,["".concat(n,"-square")]:{boxShadow:"none",padding:c,["".concat(n,"-body")]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize,borderRadius:i}}}}},lz=e=>{const{antCls:t,componentCls:n,floatButtonBodyPadding:r,floatButtonIconSize:o,floatButtonSize:a,borderRadiusLG:i,badgeOffset:l,dotOffsetInSquare:c,dotOffsetInCircle:s,calc:d}=e;return{[n]:Object.assign(Object.assign({},$r(e)),{border:"none",position:"fixed",cursor:"pointer",zIndex:99,display:"block",width:a,height:a,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary,"&-pure":{position:"relative",inset:"auto"},"&:empty":{display:"none"},["".concat(t,"-badge")]:{width:"100%",height:"100%",["".concat(t,"-badge-count")]:{transform:"translate(0, 0)",transformOrigin:"center",top:d(l).mul(-1).equal(),insetInlineEnd:d(l).mul(-1).equal()}},["".concat(n,"-body")]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",transition:"all ".concat(e.motionDurationMid),["".concat(n,"-content")]:{overflow:"hidden",textAlign:"center",minHeight:a,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"".concat(rn(d(r).div(2).equal())," ").concat(rn(r)),["".concat(n,"-icon")]:{textAlign:"center",margin:"auto",width:o,fontSize:o,lineHeight:1}}}}),["".concat(n,"-rtl")]:{direction:"rtl"},["".concat(n,"-circle")]:{height:a,borderRadius:"50%",["".concat(t,"-badge")]:{["".concat(t,"-badge-dot")]:{top:s,insetInlineEnd:s}},["".concat(n,"-body")]:{borderRadius:"50%"}},["".concat(n,"-square")]:{height:"auto",minHeight:a,borderRadius:i,["".concat(t,"-badge")]:{["".concat(t,"-badge-dot")]:{top:c,insetInlineEnd:c}},["".concat(n,"-body")]:{height:"auto",borderRadius:i}},["".concat(n,"-default")]:{backgroundColor:e.floatButtonBackgroundColor,transition:"background-color ".concat(e.motionDurationMid),["".concat(n,"-body")]:{backgroundColor:e.floatButtonBackgroundColor,transition:"background-color ".concat(e.motionDurationMid),"&:hover":{backgroundColor:e.colorFillContent},["".concat(n,"-content")]:{["".concat(n,"-icon")]:{color:e.colorText},["".concat(n,"-description")]:{display:"flex",alignItems:"center",lineHeight:rn(e.fontSizeLG),color:e.colorText,fontSize:e.fontSizeSM}}}},["".concat(n,"-primary")]:{backgroundColor:e.colorPrimary,["".concat(n,"-body")]:{backgroundColor:e.colorPrimary,transition:"background-color ".concat(e.motionDurationMid),"&:hover":{backgroundColor:e.colorPrimaryHover},["".concat(n,"-content")]:{["".concat(n,"-icon")]:{color:e.colorTextLightSolid},["".concat(n,"-description")]:{display:"flex",alignItems:"center",lineHeight:rn(e.fontSizeLG),color:e.colorTextLightSolid,fontSize:e.fontSizeSM}}}}}},cz=$o("FloatButton",(e=>{const{colorTextLightSolid:t,colorBgElevated:n,controlHeightLG:r,marginXXL:o,marginLG:a,fontSize:i,fontSizeIcon:l,controlItemBgHover:c,paddingXXS:s,calc:d}=e,u=Ho(e,{floatButtonBackgroundColor:n,floatButtonColor:t,floatButtonHoverBackgroundColor:c,floatButtonFontSize:i,floatButtonIconSize:d(l).mul(1.5).equal(),floatButtonSize:r,floatButtonInsetBlockEnd:o,floatButtonInsetInlineEnd:a,floatButtonBodySize:d(r).sub(d(s).mul(2)).equal(),floatButtonBodyPadding:s,badgeOffset:d(s).mul(1.5).equal()});return[iz(u),lz(u),iC(e),az(u)]}),(e=>({dotOffsetInCircle:oz(e.controlHeightLG/2),dotOffsetInSquare:oz(e.borderRadiusLG)})));var sz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const dz="float-btn",uz=t.forwardRef(((e,n)=>{const{prefixCls:r,className:o,rootClassName:a,type:i="default",shape:l="circle",icon:c,description:s,tooltip:d,badge:u={}}=e,f=sz(e,["prefixCls","className","rootClassName","type","shape","icon","description","tooltip","badge"]),{getPrefixCls:p,direction:h}=(0,t.useContext)(at),m=(0,t.useContext)(N_),g=p(dz,r),b=lh(g),[y,x,w]=cz(g,b),C=m||l,S=v()(x,w,b,g,o,a,"".concat(g,"-").concat(i),"".concat(g,"-").concat(C),{["".concat(g,"-rtl")]:"rtl"===h}),E=(0,t.useMemo)((()=>rt(u,["title","children","status","text"])),[u]),k=(0,t.useMemo)((()=>({prefixCls:g,description:s,icon:c,type:i})),[g,s,c,i]);let j=t.createElement("div",{className:"".concat(g,"-body")},t.createElement(rz,Object.assign({},k)));return"badge"in e&&(j=t.createElement(Q_,Object.assign({},E),j)),"tooltip"in e&&(j=t.createElement(Hd,{title:d,placement:"rtl"===h?"right":"left"},j)),y(e.href?t.createElement("a",Object.assign({ref:n},f,{className:S}),j):t.createElement("button",Object.assign({ref:n},f,{className:S,type:"button"}),j))}));const fz=uz;var pz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const hz=t.forwardRef(((e,n)=>{const{prefixCls:r,className:o,type:a="default",shape:i="circle",visibilityHeight:l=400,icon:c=t.createElement(T_,null),target:s,onClick:d,duration:u=450}=e,f=pz(e,["prefixCls","className","type","shape","visibilityHeight","icon","target","onClick","duration"]),[p,h]=(0,t.useState)(0===l),m=t.useRef(null);t.useImperativeHandle(n,(()=>({nativeElement:m.current})));const g=()=>m.current&&m.current.ownerDocument?m.current.ownerDocument:window,b=TN((e=>{const t=mM(e.target,!0);h(t>=l)}));(0,t.useEffect)((()=>{const e=(s||g)();return b({target:e}),null===e||void 0===e||e.addEventListener("scroll",b),()=>{b.cancel(),null===e||void 0===e||e.removeEventListener("scroll",b)}}),[s]);const y=e=>{gM(0,{getContainer:s||g,duration:u}),null===d||void 0===d||d(e)},{getPrefixCls:x}=(0,t.useContext)(at),w=x(dz,r),C=x(),S=(0,t.useContext)(N_)||i,E=Object.assign({prefixCls:w,icon:c,type:a,shape:S},f);return t.createElement(xi,{visible:p,motionName:"".concat(C,"-fade")},(e=>{let{className:n}=e;return t.createElement(fz,Object.assign({ref:m},E,{onClick:y,className:v()(o,n)}))}))}));const mz=hz;var gz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const vz=e=>{const{prefixCls:n,className:r,style:o,shape:a="circle",type:i="default",icon:l=t.createElement(tz,null),closeIcon:c=t.createElement(zg,null),description:s,trigger:d,children:u,onOpenChange:f,open:p}=e,h=gz(e,["prefixCls","className","style","shape","type","icon","closeIcon","description","trigger","children","onOpenChange","open"]),{direction:m,getPrefixCls:g}=(0,t.useContext)(at),b=g(dz,n),y=lh(b),[x,w,C]=cz(b,y),S="".concat(b,"-group"),E=v()(S,w,C,y,r,{["".concat(S,"-rtl")]:"rtl"===m,["".concat(S,"-").concat(a)]:a,["".concat(S,"-").concat(a,"-shadow")]:!d}),k=v()(w,"".concat(S,"-wrap")),[j,I]=_r(!1,{value:p}),T=t.useRef(null),A=t.useRef(null),O=t.useMemo((()=>"hover"===d?{onMouseEnter(){I(!0),null===f||void 0===f||f(!0)},onMouseLeave(){I(!1),null===f||void 0===f||f(!1)}}:{}),[d]),N=(0,t.useCallback)((e=>{var t,n;(null===(t=T.current)||void 0===t?void 0:t.contains(e.target))?(null===(n=A.current)||void 0===n?void 0:n.contains(e.target))&&I((e=>(null===f||void 0===f||f(!e),!e))):(I(!1),null===f||void 0===f||f(!1))}),[d]);return(0,t.useEffect)((()=>{if("click"===d)return document.addEventListener("click",N),()=>{document.removeEventListener("click",N)}}),[d]),x(t.createElement(O_,{value:a},t.createElement("div",Object.assign({ref:T,className:E,style:o},O),d&&["click","hover"].includes(d)?t.createElement(t.Fragment,null,t.createElement(xi,{visible:j,motionName:"".concat(S,"-wrap")},(e=>{let{className:n}=e;return t.createElement("div",{className:v()(n,k)},u)})),t.createElement(fz,Object.assign({ref:A,type:i,shape:a,icon:j?c:l,description:s,"aria-label":e["aria-label"]},h))):u)))},bz=(0,t.memo)(vz);var yz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const xz=e=>{var{backTop:n}=e,r=yz(e,["backTop"]);return n?t.createElement(mz,Object.assign({},r,{visibilityHeight:0})):t.createElement(fz,Object.assign({},r))},wz=e=>{var{className:n,items:r}=e,o=yz(e,["className","items"]);const{prefixCls:a}=o,{getPrefixCls:i}=t.useContext(at),l=i(dz,a),c="".concat(l,"-pure");return r?t.createElement(bz,Object.assign({className:v()(n,c)},o),r.map(((e,n)=>t.createElement(xz,Object.assign({key:n},e))))):t.createElement(xz,Object.assign({className:v()(n,c)},o))};fz.BackTop=mz,fz.Group=bz,fz._InternalPanelDoNotUseOrYouWillBeFired=wz;const Cz=fz;const Sz={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var Ez=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Sz}))};const kz=t.forwardRef(Ez);const jz={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};var Iz=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:jz}))};const Tz=t.forwardRef(Iz);var Az,Oz=new Uint8Array(16);function Nz(){if(!Az&&!(Az="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Az(Oz)}const Rz=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Pz=function(e){return"string"===typeof e&&Rz.test(e)};for(var Mz=[],Dz=0;Dz<256;++Dz)Mz.push((Dz+256).toString(16).substr(1));const Lz=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Mz[e[t+0]]+Mz[e[t+1]]+Mz[e[t+2]]+Mz[e[t+3]]+"-"+Mz[e[t+4]]+Mz[e[t+5]]+"-"+Mz[e[t+6]]+Mz[e[t+7]]+"-"+Mz[e[t+8]]+Mz[e[t+9]]+"-"+Mz[e[t+10]]+Mz[e[t+11]]+Mz[e[t+12]]+Mz[e[t+13]]+Mz[e[t+14]]+Mz[e[t+15]]).toLowerCase();if(!Pz(n))throw TypeError("Stringified UUID is invalid");return n};const _z=function(e,t,n){var r=(e=e||{}).random||(e.rng||Nz)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Lz(r)},zz=(0,t.createContext)({}),Bz=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},Fz=(e,t)=>((e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:o}=e,a={};for(let i=o;i>=0;i--)0===i?(a["".concat(r).concat(t,"-").concat(i)]={display:"none"},a["".concat(r,"-push-").concat(i)]={insetInlineStart:"auto"},a["".concat(r,"-pull-").concat(i)]={insetInlineEnd:"auto"},a["".concat(r).concat(t,"-push-").concat(i)]={insetInlineStart:"auto"},a["".concat(r).concat(t,"-pull-").concat(i)]={insetInlineEnd:"auto"},a["".concat(r).concat(t,"-offset-").concat(i)]={marginInlineStart:0},a["".concat(r).concat(t,"-order-").concat(i)]={order:0}):(a["".concat(r).concat(t,"-").concat(i)]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:"0 0 ".concat(i/o*100,"%"),maxWidth:"".concat(i/o*100,"%")}],a["".concat(r).concat(t,"-push-").concat(i)]={insetInlineStart:"".concat(i/o*100,"%")},a["".concat(r).concat(t,"-pull-").concat(i)]={insetInlineEnd:"".concat(i/o*100,"%")},a["".concat(r).concat(t,"-offset-").concat(i)]={marginInlineStart:"".concat(i/o*100,"%")},a["".concat(r).concat(t,"-order-").concat(i)]={order:i});return a["".concat(r).concat(t,"-flex")]={flex:"var(--".concat(n).concat(t,"-flex)")},a})(e,t),Hz=$o("Grid",(e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}}),(()=>({}))),Wz=$o("Grid",(e=>{const t=Ho(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[Bz(t),Fz(t,""),Fz(t,"-xs"),Object.keys(n).map((e=>((e,t,n)=>({["@media (min-width: ".concat(rn(t),")")]:Object.assign({},Fz(e,n))}))(t,n[e],e))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})]}),(()=>({})));var Vz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Uz(e,n){const[r,o]=t.useState("string"===typeof e?e:"");return t.useEffect((()=>{(()=>{if("string"===typeof e&&o(e),"object"===typeof e)for(let t=0;t<Rh.length;t++){const r=Rh[t];if(!n[r])continue;const a=e[r];if(void 0!==a)return void o(a)}})()}),[JSON.stringify(e),n]),r}const Kz=t.forwardRef(((e,n)=>{const{prefixCls:r,justify:o,align:a,className:i,style:l,children:c,gutter:s=0,wrap:d}=e,u=Vz(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:f,direction:p}=t.useContext(at),[h,m]=t.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),[g,b]=t.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),y=Uz(a,g),x=Uz(o,g),w=t.useRef(s),C=Dh();t.useEffect((()=>{const e=C.subscribe((e=>{b(e);const t=w.current||0;(!Array.isArray(t)&&"object"===typeof t||Array.isArray(t)&&("object"===typeof t[0]||"object"===typeof t[1]))&&m(e)}));return()=>C.unsubscribe(e)}),[]);const S=f("row",r),[E,k,j]=Hz(S),I=(()=>{const e=[void 0,void 0];return(Array.isArray(s)?s:[s,void 0]).forEach(((t,n)=>{if("object"===typeof t)for(let r=0;r<Rh.length;r++){const o=Rh[r];if(h[o]&&void 0!==t[o]){e[n]=t[o];break}}else e[n]=t})),e})(),T=v()(S,{["".concat(S,"-no-wrap")]:!1===d,["".concat(S,"-").concat(x)]:x,["".concat(S,"-").concat(y)]:y,["".concat(S,"-rtl")]:"rtl"===p},i,k,j),A={},O=null!=I[0]&&I[0]>0?I[0]/-2:void 0;O&&(A.marginLeft=O,A.marginRight=O);const[N,R]=I;A.rowGap=R;const P=t.useMemo((()=>({gutter:[N,R],wrap:d})),[N,R,d]);return E(t.createElement(zz.Provider,{value:P},t.createElement("div",Object.assign({},u,{className:T,style:Object.assign(Object.assign({},A),l),ref:n}),c)))}));const Gz=Kz,qz=Gz;var Xz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Yz(e){return"number"===typeof e?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}const $z=["xs","sm","md","lg","xl","xxl"],Jz=t.forwardRef(((e,n)=>{const{getPrefixCls:r,direction:o}=t.useContext(at),{gutter:a,wrap:i}=t.useContext(zz),{prefixCls:l,span:c,order:s,offset:d,push:u,pull:f,className:p,children:h,flex:m,style:g}=e,b=Xz(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),y=r("col",l),[x,w,C]=Wz(y),S={};let E={};$z.forEach((t=>{let n={};const r=e[t];"number"===typeof r?n.span=r:"object"===typeof r&&(n=r||{}),delete b[t],E=Object.assign(Object.assign({},E),{["".concat(y,"-").concat(t,"-").concat(n.span)]:void 0!==n.span,["".concat(y,"-").concat(t,"-order-").concat(n.order)]:n.order||0===n.order,["".concat(y,"-").concat(t,"-offset-").concat(n.offset)]:n.offset||0===n.offset,["".concat(y,"-").concat(t,"-push-").concat(n.push)]:n.push||0===n.push,["".concat(y,"-").concat(t,"-pull-").concat(n.pull)]:n.pull||0===n.pull,["".concat(y,"-rtl")]:"rtl"===o}),n.flex&&(E["".concat(y,"-").concat(t,"-flex")]=!0,S["--".concat(y,"-").concat(t,"-flex")]=Yz(n.flex))}));const k=v()(y,{["".concat(y,"-").concat(c)]:void 0!==c,["".concat(y,"-order-").concat(s)]:s,["".concat(y,"-offset-").concat(d)]:d,["".concat(y,"-push-").concat(u)]:u,["".concat(y,"-pull-").concat(f)]:f},p,E,w,C),j={};if(a&&a[0]>0){const e=a[0]/2;j.paddingLeft=e,j.paddingRight=e}return m&&(j.flex=Yz(m),!1!==i||j.minWidth||(j.minWidth=0)),x(t.createElement("div",Object.assign({},b,{style:Object.assign(Object.assign(Object.assign({},j),g),S),className:k,ref:n}),h))}));const Qz=Jz,Zz=Qz,eB=e=>{let{setVibile:t,visible:n,params:r,setParams:o,doGetParams:a}=e;const{translate:i}=og();return(0,ng.jsx)(UC,{open:n,onOk:async()=>{try{await dE(PS,JSON.stringify(r),GC()),ak.success(i("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(i(e.message))}t(!1)},onCancel:()=>{t(!1)},afterClose:()=>a(PS,GC()),cancelText:i("cancel"),okText:i("ok"),children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:18,children:i("protocol")}),(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)(HO,{style:{width:150},value:r.protocol,options:[{value:"modbus_rtu",label:"ModBus RTU"},{value:"modbus_tcp",label:"ModBus TCP"}],onChange:e=>o({...r,protocol:e})})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:18,children:i("dataExchange")}),(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)(yI,{checked:r.enableDataExchange,onChange:e=>o({...r,enableDataExchange:e})})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:18,children:i("readAlarm")}),(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)(yI,{checked:r.enableAlarms,onChange:e=>{o(e?{...r,enableAlarms:e}:{...r,enableAlarms:e,sendAlarms:!1})}})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:18,children:i("sendAlarms")}),(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)(yI,{checked:r.sendAlarms,onChange:e=>{r.enableAlarms&&o({...r,sendAlarms:e})}})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:18,children:"Timeout"}),(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)(HO,{style:{width:150},value:r.commTimeout,options:[{value:"std",label:QC("std")},{value:"medium",label:QC("medium")},{value:"high",label:QC("high")}],onChange:e=>o({...r,commTimeout:e})})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:18,children:i("retroCompYHC")}),(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)(yI,{checked:r.yhcCompatibility,onChange:e=>{o({...r,yhcCompatibility:e})}})})]})]})})},tB=(0,t.memo)(eB),{Option:nB}=HO,rB=/^(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)$/,oB="connection",aB="address",iB="description",lB="ip",cB={id:"",enabled:!0,connection:"eth0",address:1,ip:"",port:"1470",description:"",enableDatalogger:!1},sB=()=>{const[e,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)([]),[a,i]=(0,t.useState)(),[l,c]=(0,t.useState)([]),[s,d]=(0,t.useState)(),[u,f]=mE(((e,t)=>cE(e,t)),[]),[p,h]=mE(((e,t)=>cE(e,t)),[]),[m,g]=mE(((e,t)=>cE(e,t)),[]),{translate:v}=og(),[b,y]=t.useState(100),[x,w]=(0,t.useState)(!1),[C,S]=(0,t.useState)([]),[E,k]=(0,t.useState)([]),[j,I]=(0,t.useState)([]),[T,A]=(0,t.useState)(!1),[O,N]=(0,t.useState)(!1);(0,t.useEffect)((()=>{f(wS,GC()),h(PS,GC()),g(CS,GC())}),[]),(0,t.useEffect)((()=>{u.value&&o([...u.value])}),[u]),(0,t.useEffect)((()=>{p.value&&i(p.value),p.value&&d(p.value)}),[p]),(0,t.useEffect)((()=>{if(m.value){const e=[...m.value].filter((e=>e.service.includes("modbus_transparent")||e.service.includes("ylc")));c([...e])}}),[m]);const R=(e,t,n)=>{console.log(n);const a={...r[e]};if(t===lB){const e=n.split(":")[0],t=n.split(":")[1];if(isNaN(+t)||t.length>4)return;a.ip=e,a.port=t}else a[t]=n;r[e]={...a},o([...r]),C.includes(a.id)||S((e=>[...e,a.id])),w(!0),function(){for(const e of r)r.filter((t=>t.connection===e.connection)).filter((t=>t.ip+t.port===e.ip+e.port)).filter((t=>t.address===e.address)).length>1?A(!0):A(!1)}(),N(!0)},P=[{title:v(iB),dataIndex:iB,key:iB,className:"col-center",width:250,render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:v(iB)}),(0,ng.jsx)(Aj,{placeholder:v(iB),defaultValue:e,value:e,onChange:e=>{R(n,iB,e.target.value)}})]})},{title:v(oB),dataIndex:oB,key:oB,width:70,render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:v(oB)}),(0,ng.jsxs)(HO,{value:ZC(e),defaultValue:ZC(e),style:{width:120},onChange:e=>{R(n,oB,e)},children:[null===l||void 0===l?void 0:l.map((e=>(0,ng.jsx)(nB,{value:e.id,children:ZC(e.id)}))),(0,ng.jsx)(nB,{value:"eth0",children:ZC("eth0")}),(0,ng.jsx)(nB,{value:"eth1",children:ZC("eth1")})]})]})},{title:v("slaveAddress"),dataIndex:aB,key:aB,width:70,render:(e,t,n)=>(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsx)(xN,{min:1,max:249,value:e,defaultValue:e,onChange:e=>{null!=e&&R(n,aB,e)},status:r.filter((e=>e.connection===t.connection)).filter((e=>e.connection.includes("eth")?e.ip+e.port===t.ip+t.port:e)).filter((e=>e.address===t.address)).length>1?"error":""})})},{title:v("ipAddress"),dataIndex:lB,key:lB,width:130,render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:v("ipAddress")}),(0,ng.jsx)(Aj,{value:t.connection.includes("eth")?e+":"+t.port:"",defaultValue:t.connection.includes("eth")?e+":"+t.port:"",disabled:!t.connection.includes("eth"),onChange:e=>{const t=e.target.value;R(n,lB,t)},status:rB.test(e.split(":")[0])&&0!==+t.port&&4===t.port.toString().length?"":"error"})]})},{title:"",width:50,className:"col-center",render:(e,t)=>(0,ng.jsx)(IN,{title:v("titleAreYouSure"),onConfirm:()=>{var e;e=t.id,o([...r.filter((t=>t.id!==e))]),C.includes(e)&&S(C.filter((t=>t!==e))),E.includes(e)&&k(E.filter((t=>t!==e))),I((t=>[...t,e])),N(!0)},cancelText:v("cancel"),okText:v("ok"),children:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})}];return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(jI,{showDialog:x}),(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:v("ylcConfig")})}),(0,ng.jsx)(Qv,{bordered:!1,children:(0,ng.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between",alignItems:"center"},children:[(0,ng.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between",alignItems:"center",gap:"30px",textTransform:"capitalize"},children:[(0,ng.jsxs)("span",{children:[v("protocol"),": ",(0,ng.jsx)("b",{children:QC(null===s||void 0===s?void 0:s.protocol)})]}),(0,ng.jsxs)("span",{children:[v("dataExchange"),":"," ",(0,ng.jsx)("b",{children:QC(String(null===s||void 0===s?void 0:s.enableDataExchange))})]}),(0,ng.jsxs)("span",{children:[v("readAlarm"),":"," ",(0,ng.jsx)("b",{children:QC(String(null===s||void 0===s?void 0:s.enableAlarms))})]}),(0,ng.jsxs)("span",{children:[v("sendAlarms"),":"," ",(0,ng.jsx)("b",{children:QC(String(null===s||void 0===s?void 0:s.sendAlarms))})]}),(0,ng.jsxs)("span",{children:["Timeout: ",(0,ng.jsx)("b",{children:QC(String(null===s||void 0===s?void 0:s.commTimeout))})]}),(0,ng.jsxs)("span",{children:[(0,ng.jsxs)(Hd,{placement:"left",title:v("infoYhcCompatibility"),children:[(0,ng.jsx)(Tz,{})," "]}),v("retroCompYHC"),":"," ",(0,ng.jsx)("b",{children:QC(String(null===s||void 0===s?void 0:s.yhcCompatibility))})]})]}),(0,ng.jsx)(ac,{icon:(0,ng.jsx)(bE,{}),onClick:()=>{n(!0)}})]})}),(0,ng.jsxs)(Qv,{bordered:!1,className:"overflow-auto",children:[(0,ng.jsx)(_N,{offsetTop:b,children:(0,ng.jsx)("div",{style:{padding:0,marginBottom:16},children:(0,ng.jsx)(ac,{className:"btnLeft",icon:(0,ng.jsx)(Hg,{}),disabled:r.length>=20,onClick:()=>{const e={...cB,id:_z()};o((t=>[...t,{...e}])),k((t=>[...t,e.id])),N(!0)}})})}),(0,ng.jsx)(k_,{columns:P,dataSource:r,pagination:!1,rowKey:"id"}),(0,ng.jsx)(Cz.BackTop,{}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(hc,{children:(0,ng.jsx)(ac,{type:"primary",onClick:async()=>{if(!T)try{if(E.length>0){for(const e of E){const t=r.find((t=>t.id===e));await sE(wS,JSON.stringify({...t,port:+t.port}),GC()),C.includes(e)&&S(C.filter((t=>t!==e)))}k([])}if(j.length>0){const e=await cE(wS,GC());for(const t of j)e.find((e=>e.id===t))&&await uE(wS,t,"",GC());I([])}if(C.length>0){for(const e of C){const t=r.find((t=>t.id===e));await dE(wS,JSON.stringify({...t,port:+t.port}),GC(),e)}S([])}ak.success(v("ok")),w(!1),N(!1)}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(v(e.message))}},disabled:!O||T||r.filter((e=>e.connection.includes("eth"))).some((e=>!rB.test(e.ip)||0===+e.port||e.port.length<4)),children:v("save")})})})]}),a&&(0,ng.jsx)(tB,{setVibile:n,visible:e,params:a,setParams:i,doGetParams:h})]})]})},dB=(0,t.memo)(sB),uB=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:a,orientationMargin:i,verticalMarginInline:l}=e;return{[t]:Object.assign(Object.assign({},$r(e)),{borderBlockStart:"".concat(rn(o)," solid ").concat(r),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat(rn(o)," solid ").concat(r)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat(rn(e.dividerHorizontalGutterMargin)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat(rn(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(r),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat(rn(o)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-left")]:{"&::before":{width:"calc(".concat(i," * 100%)")},"&::after":{width:"calc(100% - ".concat(i," * 100%)")}},["&-horizontal".concat(t,"-with-text-right")]:{"&::before":{width:"calc(100% - ".concat(i," * 100%)")},"&::after":{width:"calc(".concat(i," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:"".concat(rn(o)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-left").concat(t,"-no-default-orientation-margin-left")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:n}},["&-horizontal".concat(t,"-with-text-right").concat(t,"-no-default-orientation-margin-right")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:n}}})}},fB=$o("Divider",(e=>{const t=Ho(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[uB(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS})),{unitless:{orientationMargin:!0}});var pB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const hB=e=>{const{getPrefixCls:n,direction:r,divider:o}=t.useContext(at),{prefixCls:a,type:i="horizontal",orientation:l="center",orientationMargin:c,className:s,rootClassName:d,children:u,dashed:f,plain:p,style:h}=e,m=pB(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),g=n("divider",a),[b,y,x]=fB(g),w=l.length>0?"-".concat(l):l,C=!!u,S="left"===l&&null!=c,E="right"===l&&null!=c,k=v()(g,null===o||void 0===o?void 0:o.className,y,x,"".concat(g,"-").concat(i),{["".concat(g,"-with-text")]:C,["".concat(g,"-with-text").concat(w)]:C,["".concat(g,"-dashed")]:!!f,["".concat(g,"-plain")]:!!p,["".concat(g,"-rtl")]:"rtl"===r,["".concat(g,"-no-default-orientation-margin-left")]:S,["".concat(g,"-no-default-orientation-margin-right")]:E},s,d),j=t.useMemo((()=>"number"===typeof c?c:/^\d+$/.test(c)?Number(c):c),[c]),I=Object.assign(Object.assign({},S&&{marginLeft:j}),E&&{marginRight:j});return b(t.createElement("div",Object.assign({className:k,style:Object.assign(Object.assign({},null===o||void 0===o?void 0:o.style),h)},m,{role:"separator"}),u&&"vertical"!==i&&t.createElement("span",{className:"".concat(g,"-inner-text"),style:I},u)))};const mB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var gB=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:mB}))};const vB=t.forwardRef(gB),bB=e=>{var n,r;let{setShowDialog:o,showDialog:a}=e;const{changeLanguage:i,translate:l}=og(),[c,s]=mE(((e,t)=>cE(e,t)),[]),[d,u]=(0,t.useState)({language:"it-IT",timezone:"GMT+1",notifications:!0});(0,t.useEffect)((()=>{!a&&s(hS,GC())}),[a]),(0,t.useEffect)((()=>{c.value&&u(c.value),c.value&&i(c.value.language)}),[c]);const f=[{value:"it-IT",label:"Italiano"},{value:"en-UK",label:"English (UK)"},{value:"en-US",label:"English (US)"},{value:"de-DE",label:"Deutsch"}];return(0,ng.jsx)(ng.Fragment,{children:c.value&&(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)("i",{className:"anticon",children:(0,ng.jsxs)("svg",{viewBox:"0 0 24 24",focusable:"false",width:"1.8em",height:"1.8em",fill:"currentColor","aria-hidden":"true",children:[(0,ng.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ng.jsx)("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z ",className:"css-c4d79v"})]})})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:l("languageSettings")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:null===(n=f.find((e=>e.value===c.value.language)))||void 0===n?void 0:n.label})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(qz,{gutter:16,children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{children:l("language")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(HO,{style:{width:220},onChange:e=>{u({...d,language:e}),o(!0)},value:d.language,options:f})})]})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:50},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(vB,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:l("timezoneSettings")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:null===(r=Nj.find((e=>e.utc.includes(c.value.timezone))))||void 0===r?void 0:r.text})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(qz,{gutter:16,children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{children:l("timeZone")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("select",{className:"custom_select",style:{width:490},onChange:e=>{u({...d,timezone:e.target.value}),o(!0)},children:Nj.map(((e,t)=>(0,ng.jsx)("option",{value:e.utc[0],selected:e.utc.includes(d.timezone),children:e.text},t)))})})]})})]}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(II,{justEdit:a,onClick:async()=>{try{await dE(hS,JSON.stringify(d),GC()),await s(hS,GC()),localStorage.setItem("device_lang",d.language),o(!1),ak.success(l("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(l(e.message))}}})})]})})},yB=(0,t.memo)(bB),xB=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",a=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){var n=r.toLowerCase(),i=t.toLowerCase(),l=[i];return".jpg"!==i&&".jpeg"!==i||(l=[".jpg",".jpeg"]),l.some((function(e){return n.endsWith(e)}))}return/\/\*$/.test(t)?a===t.replace(/\/.*$/,""):o===t||!!/^\w+$/.test(t)&&(Ie(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)}))}return!0};function wB(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(r5){return t}}function CB(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append("".concat(t,"[]"),e)})):n.append(t,r)})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),wB(t)):e.onSuccess(wB(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}const SB=function(e,t,n){var r=function e(r,o){r&&(r.path=o||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var o=Array.prototype.slice.apply(n);r=r.concat(o),o.length?e():t(r)}))}()}(r,(function(t){t.forEach((function(t){e(t,"".concat(o).concat(r.name,"/"))}))})))};e.forEach((function(e){r(e.webkitGetAsEntry())}))};var EB=+new Date,kB=0;function jB(){return"rc-upload-".concat(EB,"-").concat(++kB)}var IB=["component","prefixCls","className","classNames","disabled","id","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],TB=function(e){Ro(r,e);var n=Na(r);function r(){var e;At(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return h(Io(e=n.call.apply(n,[this].concat(o))),"state",{uid:jB()}),h(Io(e),"reqs",{}),h(Io(e),"fileInput",void 0),h(Io(e),"_isMounted",void 0),h(Io(e),"onChange",(function(t){var n=e.props,r=n.accept,o=n.directory,a=nt(t.target.files).filter((function(e){return!o||xB(e,r)}));e.uploadFiles(a),e.reset()})),h(Io(e),"onClick",(function(t){var n=e.fileInput;if(n){var r=t.target,o=e.props.onClick;if(r&&"BUTTON"===r.tagName)n.parentNode.focus(),r.blur();n.click(),o&&o(t)}})),h(Io(e),"onKeyDown",(function(t){"Enter"===t.key&&e.onClick(t)})),h(Io(e),"onFileDrop",(function(t){var n=e.props.multiple;if(t.preventDefault(),"dragover"!==t.type)if(e.props.directory)SB(Array.prototype.slice.call(t.dataTransfer.items),e.uploadFiles,(function(t){return xB(t,e.props.accept)}));else{var r=nt(t.dataTransfer.files).filter((function(t){return xB(t,e.props.accept)}));!1===n&&(r=r.slice(0,1)),e.uploadFiles(r)}})),h(Io(e),"uploadFiles",(function(t){var n=nt(t),r=n.map((function(t){return t.uid=jB(),e.processFile(t,n)}));Promise.all(r).then((function(t){var n=e.props.onBatchStart;null===n||void 0===n||n(t.map((function(e){return{file:e.origin,parsedFile:e.parsedFile}}))),t.filter((function(e){return null!==e.parsedFile})).forEach((function(t){e.post(t)}))}))})),h(Io(e),"processFile",function(){var t=Si(wi().mark((function t(n,r){var o,a,i,l,c,s,d,u,p;return wi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.props.beforeUpload,a=n,!o){t.next=14;break}return t.prev=3,t.next=6,o(n,r);case 6:a=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),a=!1;case 12:if(!1!==a){t.next=14;break}return t.abrupt("return",{origin:n,parsedFile:null,action:null,data:null});case 14:if("function"!==typeof(i=e.props.action)){t.next=21;break}return t.next=18,i(n);case 18:l=t.sent,t.next=22;break;case 21:l=i;case 22:if("function"!==typeof(c=e.props.data)){t.next=29;break}return t.next=26,c(n);case 26:s=t.sent,t.next=30;break;case 29:s=c;case 30:return d="object"!==f(a)&&"string"!==typeof a||!a?n:a,u=d instanceof File?d:new File([d],n.name,{type:n.type}),(p=u).uid=n.uid,t.abrupt("return",{origin:n,data:s,parsedFile:p,action:l});case 35:case"end":return t.stop()}}),t,null,[[3,9]])})));return function(e,n){return t.apply(this,arguments)}}()),h(Io(e),"saveFileInput",(function(t){e.fileInput=t})),e}return Nt(r,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(e){var t=this,n=e.data,r=e.origin,o=e.action,a=e.parsedFile;if(this._isMounted){var i=this.props,l=i.onStart,c=i.customRequest,s=i.name,d=i.headers,u=i.withCredentials,f=i.method,p=r.uid,h=c||CB,m={action:o,filename:s,data:n,file:a,headers:d,withCredentials:u,method:f||"post",onProgress:function(e){var n=t.props.onProgress;null===n||void 0===n||n(e,a)},onSuccess:function(e,n){var r=t.props.onSuccess;null===r||void 0===r||r(e,a,n),delete t.reqs[p]},onError:function(e,n){var r=t.props.onError;null===r||void 0===r||r(e,n,a),delete t.reqs[p]}};l(r),this.reqs[p]=h(m)}}},{key:"reset",value:function(){this.setState({uid:jB()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach((function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]}))}},{key:"render",value:function(){var e,n=this.props,r=n.component,o=n.prefixCls,i=n.className,l=n.classNames,c=void 0===l?{}:l,s=n.disabled,d=n.id,u=n.style,f=n.styles,p=void 0===f?{}:f,g=n.multiple,b=n.accept,y=n.capture,x=n.children,w=n.directory,C=n.openFileDialogOnClick,S=n.onMouseEnter,E=n.onMouseLeave,k=n.hasControlInside,j=m(n,IB),I=v()((h(e={},o,!0),h(e,"".concat(o,"-disabled"),s),h(e,i,i),e)),T=w?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},A=s?{}:{onClick:C?this.onClick:function(){},onKeyDown:C?this.onKeyDown:function(){},onMouseEnter:S,onMouseLeave:E,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:k?void 0:"0"};return t.createElement(r,a({},A,{className:I,role:k?void 0:"button",style:u}),t.createElement("input",a({},hx(j,{aria:!0,data:!0}),{id:d,disabled:s,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:oe({display:"none"},p.input),className:c.input,accept:b},T,{multiple:g,onChange:this.onChange},null!=y?{capture:y}:{})),x)}}]),r}(t.Component);const AB=TB;function OB(){}var NB=function(e){Ro(r,e);var n=Na(r);function r(){var e;At(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return h(Io(e=n.call.apply(n,[this].concat(o))),"uploader",void 0),h(Io(e),"saveUploader",(function(t){e.uploader=t})),e}return Nt(r,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return t.createElement(AB,a({},this.props,{ref:this.saveUploader}))}}]),r}(t.Component);h(NB,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:OB,onError:OB,onSuccess:OB,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});const RB=NB,PB=e=>{const{componentCls:t,iconCls:n}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-drag")]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:"".concat(rn(e.lineWidth)," dashed ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(e.motionDurationSlow),[t]:{padding:e.padding},["".concat(t,"-btn")]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:"".concat(rn(e.lineWidthFocus)," solid ").concat(e.colorPrimaryBorder)}},["".concat(t,"-drag-container")]:{display:"table-cell",verticalAlign:"middle"},["\n          &:not(".concat(t,"-disabled):hover,\n          &-hover:not(").concat(t,"-disabled)\n        ")]:{borderColor:e.colorPrimaryHover},["p".concat(t,"-drag-icon")]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},["p".concat(t,"-text")]:{margin:"0 0 ".concat(rn(e.marginXXS)),color:e.colorTextHeading,fontSize:e.fontSizeLG},["p".concat(t,"-hint")]:{color:e.colorTextDescription,fontSize:e.fontSize},["&".concat(t,"-disabled")]:{["p".concat(t,"-drag-icon ").concat(n,",\n            p").concat(t,"-text,\n            p").concat(t,"-hint\n          ")]:{color:e.colorTextDisabled}}}}}},MB=e=>{const{componentCls:t,antCls:n,iconCls:r,fontSize:o,lineHeight:a,calc:i}=e,l="".concat(t,"-list-item"),c="".concat(l,"-actions"),s="".concat(l,"-action"),d=e.fontHeightSM;return{["".concat(t,"-wrapper")]:{["".concat(t,"-list")]:Object.assign(Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{lineHeight:e.lineHeight,[l]:{position:"relative",height:i(e.lineHeight).mul(o).equal(),marginTop:e.marginXS,fontSize:o,display:"flex",alignItems:"center",transition:"background-color ".concat(e.motionDurationSlow),"&:hover":{backgroundColor:e.controlItemBgHover},["".concat(l,"-name")]:Object.assign(Object.assign({},Yr),{padding:"0 ".concat(rn(e.paddingXS)),lineHeight:a,flex:"auto",transition:"all ".concat(e.motionDurationSlow)}),[c]:{[s]:{opacity:0},[r]:{color:e.actionsColor,transition:"all ".concat(e.motionDurationSlow)},["\n              ".concat(s,":focus-visible,\n              &.picture ").concat(s,"\n            ")]:{opacity:1},["".concat(s).concat(n,"-btn")]:{height:d,border:0,lineHeight:1}},["".concat(t,"-icon ").concat(r)]:{color:e.colorTextDescription,fontSize:o},["".concat(l,"-progress")]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:i(o).add(e.paddingXS).equal(),fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},["".concat(l,":hover ").concat(s)]:{opacity:1},["".concat(l,"-error")]:{color:e.colorError,["".concat(l,"-name, ").concat(t,"-icon ").concat(r)]:{color:e.colorError},[c]:{["".concat(r,", ").concat(r,":hover")]:{color:e.colorError},[s]:{opacity:1}}},["".concat(t,"-list-item-container")]:{transition:"opacity ".concat(e.motionDurationSlow,", height ").concat(e.motionDurationSlow),"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},DB=new Rr("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),LB=new Rr("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),_B=e=>{const{componentCls:t}=e,n="".concat(t,"-animate-inline");return[{["".concat(t,"-wrapper")]:{["".concat(n,"-appear, ").concat(n,"-enter, ").concat(n,"-leave")]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},["".concat(n,"-appear, ").concat(n,"-enter")]:{animationName:DB},["".concat(n,"-leave")]:{animationName:LB}}},{["".concat(t,"-wrapper")]:iC(e)},DB,LB]},zB=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:o,calc:a}=e,i="".concat(t,"-list"),l="".concat(i,"-item");return{["".concat(t,"-wrapper")]:{["\n        ".concat(i).concat(i,"-picture,\n        ").concat(i).concat(i,"-picture-card,\n        ").concat(i).concat(i,"-picture-circle\n      ")]:{[l]:{position:"relative",height:a(r).add(a(e.lineWidth).mul(2)).add(a(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},["".concat(l,"-thumbnail")]:Object.assign(Object.assign({},Yr),{width:r,height:r,lineHeight:rn(a(r).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),["".concat(l,"-progress")]:{bottom:o,width:"calc(100% - ".concat(rn(a(e.paddingSM).mul(2).equal()),")"),marginTop:0,paddingInlineStart:a(r).add(e.paddingXS).equal()}},["".concat(l,"-error")]:{borderColor:e.colorError,["".concat(l,"-thumbnail ").concat(n)]:{["svg path[fill='".concat(te[0],"']")]:{fill:e.colorErrorBg},["svg path[fill='".concat(te.primary,"']")]:{fill:e.colorError}}},["".concat(l,"-uploading")]:{borderStyle:"dashed",["".concat(l,"-name")]:{marginBottom:o}}},["".concat(i).concat(i,"-picture-circle ").concat(l)]:{["&, &::before, ".concat(l,"-thumbnail")]:{borderRadius:"50%"}}}}},BB=e=>{const{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:o,calc:a}=e,i="".concat(t,"-list"),l="".concat(i,"-item"),c=e.uploadPicCardSize;return{["\n      ".concat(t,"-wrapper").concat(t,"-picture-card-wrapper,\n      ").concat(t,"-wrapper").concat(t,"-picture-circle-wrapper\n    ")]:Object.assign(Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{display:"inline-block",width:"100%",["".concat(t).concat(t,"-select")]:{width:c,height:c,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:"".concat(rn(e.lineWidth)," dashed ").concat(e.colorBorder),borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color ".concat(e.motionDurationSlow),["> ".concat(t)]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},["&:not(".concat(t,"-disabled):hover")]:{borderColor:e.colorPrimary}},["".concat(i).concat(i,"-picture-card, ").concat(i).concat(i,"-picture-circle")]:{["".concat(i,"-item-container")]:{display:"inline-block",width:c,height:c,marginBlock:"0 ".concat(rn(e.marginXS)),marginInline:"0 ".concat(rn(e.marginXS)),verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:"calc(100% - ".concat(rn(a(e.paddingXS).mul(2).equal()),")"),height:"calc(100% - ".concat(rn(a(e.paddingXS).mul(2).equal()),")"),backgroundColor:e.colorBgMask,opacity:0,transition:"all ".concat(e.motionDurationSlow),content:'" "'}},["".concat(l,":hover")]:{["&::before, ".concat(l,"-actions")]:{opacity:1}},["".concat(l,"-actions")]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:"all ".concat(e.motionDurationSlow),["\n            ".concat(n,"-eye,\n            ").concat(n,"-download,\n            ").concat(n,"-delete\n          ")]:{zIndex:10,width:r,margin:"0 ".concat(rn(e.marginXXS)),fontSize:r,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),color:o,"&:hover":{color:o},svg:{verticalAlign:"baseline"}}},["".concat(l,"-thumbnail, ").concat(l,"-thumbnail img")]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},["".concat(l,"-name")]:{display:"none",textAlign:"center"},["".concat(l,"-file + ").concat(l,"-name")]:{position:"absolute",bottom:e.margin,display:"block",width:"calc(100% - ".concat(rn(a(e.paddingXS).mul(2).equal()),")")},["".concat(l,"-uploading")]:{["&".concat(l)]:{backgroundColor:e.colorFillAlter},["&::before, ".concat(n,"-eye, ").concat(n,"-download, ").concat(n,"-delete")]:{display:"none"}},["".concat(l,"-progress")]:{bottom:e.marginXL,width:"calc(100% - ".concat(rn(a(e.paddingXS).mul(2).equal()),")"),paddingInlineStart:0}}}),["".concat(t,"-wrapper").concat(t,"-picture-circle-wrapper")]:{["".concat(t).concat(t,"-select")]:{borderRadius:"50%"}}}},FB=e=>{const{componentCls:t}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"}}},HB=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},$r(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},["".concat(t,"-select")]:{display:"inline-block"},["".concat(t,"-disabled")]:{color:n,cursor:"not-allowed"}})}},WB=$o("Upload",(e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:r,controlHeightLG:o,calc:a}=e,i=Ho(e,{uploadThumbnailSize:a(t).mul(2).equal(),uploadProgressOffset:a(a(n).div(2)).add(r).equal(),uploadPicCardSize:a(o).mul(2.55).equal()});return[HB(i),PB(i),zB(i),BB(i),MB(i),_B(i),FB(i),Bp(i)]}),(e=>({actionsColor:e.colorTextDescription})));const VB={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"};var UB=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:VB}))};const KB=t.forwardRef(UB);const GB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};var qB=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:GB}))};const XB=t.forwardRef(qB);const YB={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"};var $B=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:YB}))};const JB=t.forwardRef($B);function QB(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function ZB(e,t){const n=nt(t),r=n.findIndex((t=>{let{uid:n}=t;return n===e.uid}));return-1===r?n.push(e):n[r]=e,n}function eF(e,t){const n=void 0!==e.uid?"uid":"name";return t.filter((t=>t[n]===e[n]))[0]}const tF=e=>0===e.indexOf("image/"),nF=e=>{if(e.type&&!e.thumbUrl)return tF(e.type);const t=e.thumbUrl||e.url||"",n=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/"),t=e[e.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(t)||[""])[0]}(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n))||!/^data:/.test(t)&&!n},rF=200;function oF(e){return new Promise((t=>{if(!e.type||!tF(e.type))return void t("");const n=document.createElement("canvas");n.width=rF,n.height=rF,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(rF,"px; height: ").concat(rF,"px; z-index: 9999; display: none;"),document.body.appendChild(n);const r=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:e,height:a}=o;let i=rF,l=rF,c=0,s=0;e>a?(l=a*(rF/e),s=-(l-i)/2):(i=e*(rF/a),c=-(i-l)/2),r.drawImage(o,c,s,i,l);const d=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(d)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const t=new FileReader;t.onload=()=>{t.result&&"string"===typeof t.result&&(o.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)}))}const aF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};var iF=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:aF}))};const lF=t.forwardRef(iF);var cF={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},sF=function(){var e=(0,t.useRef)([]),n=(0,t.useRef)(null);return(0,t.useEffect)((function(){var t=Date.now(),r=!1;e.current.forEach((function(e){if(e){r=!0;var o=e.style;o.transitionDuration=".3s, .3s, .3s, .06s",n.current&&t-n.current<100&&(o.transitionDuration="0s, 0s")}})),r&&(n.current=Date.now())})),e.current};var dF=0,uF=ae();const fF=function(e){var n=u(t.useState(),2),r=n[0],o=n[1];return t.useEffect((function(){o("rc_progress_".concat(function(){var e;return uF?(e=dF,dF+=1):e="TEST_OR_SSR",e}()))}),[]),e||r};var pF=function(e){var n=e.bg,r=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:n}},r)};function hF(e,t){return Object.keys(e).map((function(n){var r=parseFloat(n),o="".concat(Math.floor(r*t),"%");return"".concat(e[n]," ").concat(o)}))}var mF=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.color,a=e.gradientId,i=e.radius,l=e.style,c=e.ptg,s=e.strokeLinecap,d=e.strokeWidth,u=e.size,p=e.gapDegree,h=o&&"object"===f(o),m=h?"#FFF":void 0,g=u/2,v=t.createElement("circle",{className:"".concat(r,"-circle-path"),r:i,cx:g,cy:g,stroke:m,strokeLinecap:s,strokeWidth:d,opacity:0===c?0:1,style:l,ref:n});if(!h)return v;var b="".concat(a,"-conic"),y=p?"".concat(180+p/2,"deg"):"0deg",x=hF(o,(360-p)/360),w=hF(o,1),C="conic-gradient(from ".concat(y,", ").concat(x.join(", "),")"),S="linear-gradient(to ".concat(p?"bottom":"top",", ").concat(w.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:b},v),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(b,")")},t.createElement(pF,{bg:S},t.createElement(pF,{bg:C}))))}));const gF=mF;var vF=100,bF=function(e,t,n,r,o,a,i,l,c,s){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=n/100*360*((360-a)/360),f=0===a?0:{bottom:0,top:180,left:90,right:-90}[i],p=(100-r)/100*t;"round"===c&&100!==r&&(p+=s/2)>=t&&(p=t-.01);return{stroke:"string"===typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:p+d,transform:"rotate(".concat(o+u+f,"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},yF=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function xF(e){var t=null!==e&&void 0!==e?e:[];return Array.isArray(t)?t:[t]}const wF=function(e){var n=oe(oe({},cF),e),r=n.id,o=n.prefixCls,i=n.steps,l=n.strokeWidth,c=n.trailWidth,s=n.gapDegree,d=void 0===s?0:s,u=n.gapPosition,p=n.trailColor,h=n.strokeLinecap,g=n.style,b=n.className,y=n.strokeColor,x=n.percent,w=m(n,yF),C=fF(r),S="".concat(C,"-gradient"),E=50-l/2,k=2*Math.PI*E,j=d>0?90+d/2:-90,I=k*((360-d)/360),T="object"===f(i)?i:{count:i,space:2},A=T.count,O=T.space,N=xF(x),R=xF(y),P=R.find((function(e){return e&&"object"===f(e)})),M=P&&"object"===f(P)?"butt":h,D=bF(k,I,0,100,j,d,u,p,M,l),L=sF();return t.createElement("svg",a({className:v()("".concat(o,"-circle"),b),viewBox:"0 0 ".concat(vF," ").concat(vF),style:g,id:r,role:"presentation"},w),!A&&t.createElement("circle",{className:"".concat(o,"-circle-trail"),r:E,cx:50,cy:50,stroke:p,strokeLinecap:M,strokeWidth:c||l,style:D}),A?function(){var e=Math.round(A*(N[0]/100)),n=100/A,r=0;return new Array(A).fill(null).map((function(a,i){var c=i<=e-1?R[0]:p,s=c&&"object"===f(c)?"url(#".concat(S,")"):void 0,h=bF(k,I,r,n,j,d,u,c,"butt",l,O);return r+=100*(I-h.strokeDashoffset+O)/I,t.createElement("circle",{key:i,className:"".concat(o,"-circle-path"),r:E,cx:50,cy:50,stroke:s,strokeWidth:l,opacity:1,style:h,ref:function(e){L[i]=e}})}))}():function(){var e=0;return N.map((function(n,r){var a=R[r]||R[R.length-1],i=bF(k,I,e,n,j,d,u,a,M,l);return e+=n,t.createElement(gF,{key:r,color:a,ptg:n,radius:E,prefixCls:o,gradientId:S,style:i,strokeLinecap:M,strokeWidth:l,gapDegree:d,ref:function(e){L[r]=e},size:vF})})).reverse()}())};function CF(e){return!e||e<0?0:e>100?100:e}function SF(e){let{success:t,successPercent:n}=e,r=n;return t&&"progress"in t&&(r=t.progress),t&&"percent"in t&&(r=t.percent),r}const EF=e=>{let{percent:t,success:n,successPercent:r}=e;const o=CF(SF({success:n,successPercent:r}));return[o,CF(CF(t)-o)]},kF=(e,t,n)=>{var r,o,a,i;let l=-1,c=-1;if("step"===t){const t=n.steps,r=n.strokeWidth;"string"===typeof e||"undefined"===typeof e?(l="small"===e?2:14,c=null!==r&&void 0!==r?r:8):"number"===typeof e?[l,c]=[e,e]:[l=14,c=8]=e,l*=t}else if("line"===t){const t=null===n||void 0===n?void 0:n.strokeWidth;"string"===typeof e||"undefined"===typeof e?c=t||("small"===e?6:8):"number"===typeof e?[l,c]=[e,e]:[l=-1,c=8]=e}else"circle"!==t&&"dashboard"!==t||("string"===typeof e||"undefined"===typeof e?[l,c]="small"===e?[60,60]:[120,120]:"number"===typeof e?[l,c]=[e,e]:(l=null!==(o=null!==(r=e[0])&&void 0!==r?r:e[1])&&void 0!==o?o:120,c=null!==(i=null!==(a=e[0])&&void 0!==a?a:e[1])&&void 0!==i?i:120));return[l,c]},jF=e=>{const{prefixCls:n,trailColor:r=null,strokeLinecap:o="round",gapPosition:a,gapDegree:i,width:l=120,type:c,children:s,success:d,size:u=l}=e,[f,p]=kF(u,"circle");let{strokeWidth:h}=e;void 0===h&&(h=Math.max((e=>3/e*100)(f),6));const m={width:f,height:p,fontSize:.15*f+6},g=t.useMemo((()=>i||0===i?i:"dashboard"===c?75:void 0),[i,c]),b=a||"dashboard"===c&&"bottom"||void 0,y="[object Object]"===Object.prototype.toString.call(e.strokeColor),x=(e=>{let{success:t={},strokeColor:n}=e;const{strokeColor:r}=t;return[r||Q.green,n||null]})({success:d,strokeColor:e.strokeColor}),w=v()("".concat(n,"-inner"),{["".concat(n,"-circle-gradient")]:y}),C=t.createElement(wF,{percent:EF(e),strokeWidth:h,trailWidth:h,strokeColor:x,strokeLinecap:o,trailColor:r,prefixCls:n,gapDegree:g,gapPosition:b});return t.createElement("div",{className:w,style:m},f<=20?t.createElement(Hd,{title:s},t.createElement("span",null,C)):t.createElement(t.Fragment,null,C,s))},IF="--progress-line-stroke-color",TF="--progress-percent",AF=e=>{const t=e?"100%":"-100%";return new Rr("antProgress".concat(e?"RTL":"LTR","Active"),{"0%":{transform:"translateX(".concat(t,") scaleX(0)"),opacity:.1},"20%":{transform:"translateX(".concat(t,") scaleX(0)"),opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},OF=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},$r(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},["".concat(t,"-outer")]:{display:"inline-block",width:"100%"},["&".concat(t,"-show-info")]:{["".concat(t,"-outer")]:{marginInlineEnd:"calc(-2em - ".concat(rn(e.marginXS),")"),paddingInlineEnd:"calc(2em + ".concat(rn(e.paddingXS),")")}},["".concat(t,"-inner")]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},["".concat(t,"-inner:not(").concat(t,"-circle-gradient)")]:{["".concat(t,"-circle-path")]:{stroke:e.defaultColor}},["".concat(t,"-success-bg, ").concat(t,"-bg")]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOutCirc)},["".concat(t,"-bg")]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit","var(".concat(IF,")")]},height:"100%",width:"calc(1 / var(".concat(TF,") * 100%)"),display:"block"}},["".concat(t,"-success-bg")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},["".concat(t,"-text")]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},["&".concat(t,"-status-active")]:{["".concat(t,"-bg::before")]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:AF(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},["&".concat(t,"-rtl").concat(t,"-status-active")]:{["".concat(t,"-bg::before")]:{animationName:AF(!0)}},["&".concat(t,"-status-exception")]:{["".concat(t,"-bg")]:{backgroundColor:e.colorError},["".concat(t,"-text")]:{color:e.colorError}},["&".concat(t,"-status-exception ").concat(t,"-inner:not(").concat(t,"-circle-gradient)")]:{["".concat(t,"-circle-path")]:{stroke:e.colorError}},["&".concat(t,"-status-success")]:{["".concat(t,"-bg")]:{backgroundColor:e.colorSuccess},["".concat(t,"-text")]:{color:e.colorSuccess}},["&".concat(t,"-status-success ").concat(t,"-inner:not(").concat(t,"-circle-gradient)")]:{["".concat(t,"-circle-path")]:{stroke:e.colorSuccess}}})}},NF=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{["".concat(t,"-circle-trail")]:{stroke:e.remainingColor},["&".concat(t,"-circle ").concat(t,"-inner")]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},["&".concat(t,"-circle ").concat(t,"-text")]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},["".concat(t,"-circle&-status-exception")]:{["".concat(t,"-text")]:{color:e.colorError}},["".concat(t,"-circle&-status-success")]:{["".concat(t,"-text")]:{color:e.colorSuccess}}},["".concat(t,"-inline-circle")]:{lineHeight:1,["".concat(t,"-inner")]:{verticalAlign:"bottom"}}}},RF=e=>{const{componentCls:t}=e;return{[t]:{["".concat(t,"-steps")]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:"all ".concat(e.motionDurationSlow),"&-active":{backgroundColor:e.defaultColor}}}}}},PF=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{["".concat(t,"-small&-line, ").concat(t,"-small&-line ").concat(t,"-text ").concat(n)]:{fontSize:e.fontSizeSM}}}},MF=$o("Progress",(e=>{const t=e.calc(e.marginXXS).div(2).equal(),n=Ho(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[OF(n),NF(n),RF(n),PF(n)]}),(e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:"".concat(e.fontSize/e.fontSizeSM,"em")})));var DF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const LF=(e,t)=>{const{from:n=Q.blue,to:r=Q.blue,direction:o=("rtl"===t?"to left":"to right")}=e,a=DF(e,["from","to","direction"]);if(0!==Object.keys(a).length){const e=(e=>{let t=[];return Object.keys(e).forEach((n=>{const r=parseFloat(n.replace(/%/g,""));isNaN(r)||t.push({key:r,value:e[n]})})),t=t.sort(((e,t)=>e.key-t.key)),t.map((e=>{let{key:t,value:n}=e;return"".concat(n," ").concat(t,"%")})).join(", ")})(a),t="linear-gradient(".concat(o,", ").concat(e,")");return{background:t,[IF]:t}}const i="linear-gradient(".concat(o,", ").concat(n,", ").concat(r,")");return{background:i,[IF]:i}},_F=e=>{const{prefixCls:n,direction:r,percent:o,size:a,strokeWidth:i,strokeColor:l,strokeLinecap:c="round",children:s,trailColor:d=null,success:u}=e,f=l&&"string"!==typeof l?LF(l,r):{[IF]:l,background:l},p="square"===c||"butt"===c?0:void 0,h=null!==a&&void 0!==a?a:[-1,i||("small"===a?6:8)],[m,g]=kF(h,"line",{strokeWidth:i});const v={backgroundColor:d||void 0,borderRadius:p},b=Object.assign(Object.assign({width:"".concat(CF(o),"%"),height:g,borderRadius:p},f),{[TF]:CF(o)/100}),y=SF(e),x={width:"".concat(CF(y),"%"),height:g,borderRadius:p,backgroundColor:null===u||void 0===u?void 0:u.strokeColor},w={width:m<0?"100%":m,height:g};return t.createElement(t.Fragment,null,t.createElement("div",{className:"".concat(n,"-outer"),style:w},t.createElement("div",{className:"".concat(n,"-inner"),style:v},t.createElement("div",{className:"".concat(n,"-bg"),style:b}),void 0!==y?t.createElement("div",{className:"".concat(n,"-success-bg"),style:x}):null)),s)},zF=e=>{const{size:n,steps:r,percent:o=0,strokeWidth:a=8,strokeColor:i,trailColor:l=null,prefixCls:c,children:s}=e,d=Math.round(r*(o/100)),u=null!==n&&void 0!==n?n:["small"===n?2:14,a],[f,p]=kF(u,"step",{steps:r,strokeWidth:a}),h=f/r,m=new Array(r);for(let g=0;g<r;g++){const e=Array.isArray(i)?i[g]:i;m[g]=t.createElement("div",{key:g,className:v()("".concat(c,"-steps-item"),{["".concat(c,"-steps-item-active")]:g<=d-1}),style:{backgroundColor:g<=d-1?e:l,width:h,height:p}})}return t.createElement("div",{className:"".concat(c,"-steps-outer")},m,s)};var BF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const FF=["normal","exception","active","success"],HF=t.forwardRef(((e,n)=>{const{prefixCls:r,className:o,rootClassName:a,steps:i,strokeColor:l,percent:c=0,size:s="default",showInfo:d=!0,type:u="line",status:f,format:p,style:h}=e,m=BF(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),g=t.useMemo((()=>{var t,n;const r=SF(e);return parseInt(void 0!==r?null===(t=null!==r&&void 0!==r?r:0)||void 0===t?void 0:t.toString():null===(n=null!==c&&void 0!==c?c:0)||void 0===n?void 0:n.toString(),10)}),[c,e.success,e.successPercent]),b=t.useMemo((()=>!FF.includes(f)&&g>=100?"success":f||"normal"),[f,g]),{getPrefixCls:y,direction:x,progress:w}=t.useContext(at),C=y("progress",r),[S,E,k]=MF(C),j=t.useMemo((()=>{if(!d)return null;const n=SF(e);let r;const o=p||(e=>"".concat(e,"%")),a="line"===u;return p||"exception"!==b&&"success"!==b?r=o(CF(c),CF(n)):"exception"===b?r=a?t.createElement(Yy,null):t.createElement(zg,null):"success"===b&&(r=a?t.createElement(Gy,null):t.createElement(NO,null)),t.createElement("span",{className:"".concat(C,"-text"),title:"string"===typeof r?r:void 0},r)}),[d,c,g,b,u,C,p]);const I=Array.isArray(l)?l[0]:l,T="string"===typeof l||Array.isArray(l)?l:void 0;let A;"line"===u?A=i?t.createElement(zF,Object.assign({},e,{strokeColor:T,prefixCls:C,steps:i}),j):t.createElement(_F,Object.assign({},e,{strokeColor:I,prefixCls:C,direction:x}),j):"circle"!==u&&"dashboard"!==u||(A=t.createElement(jF,Object.assign({},e,{strokeColor:I,prefixCls:C,progressStatus:b}),j));const O=v()(C,"".concat(C,"-status-").concat(b),"".concat(C,"-").concat(("dashboard"===u?"circle":i&&"steps")||u),{["".concat(C,"-inline-circle")]:"circle"===u&&kF(s,"circle")[0]<=20,["".concat(C,"-show-info")]:d,["".concat(C,"-").concat(s)]:"string"===typeof s,["".concat(C,"-rtl")]:"rtl"===x},null===w||void 0===w?void 0:w.className,o,a,E,k);return S(t.createElement("div",Object.assign({ref:n,style:Object.assign(Object.assign({},null===w||void 0===w?void 0:w.style),h),className:O,role:"progressbar","aria-valuenow":g},rt(m,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),A))}));const WF=HF,VF=t.forwardRef(((e,n)=>{let{prefixCls:r,className:o,style:a,locale:i,listType:l,file:c,items:s,progress:d,iconRender:u,actionIconRender:f,itemRender:p,isImgUrl:h,showPreviewIcon:m,showRemoveIcon:g,showDownloadIcon:b,previewIcon:y,removeIcon:x,downloadIcon:w,onPreview:C,onDownload:S,onClose:E}=e;var k,j;const{status:I}=c,[T,A]=t.useState(I);t.useEffect((()=>{"removed"!==I&&A(I)}),[I]);const[O,N]=t.useState(!1);t.useEffect((()=>{const e=setTimeout((()=>{N(!0)}),300);return()=>{clearTimeout(e)}}),[]);const R=u(c);let P=t.createElement("div",{className:"".concat(r,"-icon")},R);if("picture"===l||"picture-card"===l||"picture-circle"===l)if("uploading"===T||!c.thumbUrl&&!c.url){const e=v()("".concat(r,"-list-item-thumbnail"),{["".concat(r,"-list-item-file")]:"uploading"!==T});P=t.createElement("div",{className:e},R)}else{const e=(null===h||void 0===h?void 0:h(c))?t.createElement("img",{src:c.thumbUrl||c.url,alt:c.name,className:"".concat(r,"-list-item-image"),crossOrigin:c.crossOrigin}):R,n=v()("".concat(r,"-list-item-thumbnail"),{["".concat(r,"-list-item-file")]:h&&!h(c)});P=t.createElement("a",{className:n,onClick:e=>C(c,e),href:c.url||c.thumbUrl,target:"_blank",rel:"noopener noreferrer"},e)}const M=v()("".concat(r,"-list-item"),"".concat(r,"-list-item-").concat(T)),D="string"===typeof c.linkProps?JSON.parse(c.linkProps):c.linkProps,L=g?f(("function"===typeof x?x(c):x)||t.createElement(kz,null),(()=>E(c)),r,i.removeFile,!0):null,_=b&&"done"===T?f(("function"===typeof w?w(c):w)||t.createElement(lF,null),(()=>S(c)),r,i.downloadFile):null,z="picture-card"!==l&&"picture-circle"!==l&&t.createElement("span",{key:"download-delete",className:v()("".concat(r,"-list-item-actions"),{picture:"picture"===l})},_,L),B=v()("".concat(r,"-list-item-name")),F=c.url?[t.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:B,title:c.name},D,{href:c.url,onClick:e=>C(c,e)}),c.name),z]:[t.createElement("span",{key:"view",className:B,onClick:e=>C(c,e),title:c.name},c.name),z],H=m&&(c.url||c.thumbUrl)?t.createElement("a",{href:c.url||c.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>C(c,e),title:i.previewFile},"function"===typeof y?y(c):y||t.createElement(rj,null)):null,W=("picture-card"===l||"picture-circle"===l)&&"uploading"!==T&&t.createElement("span",{className:"".concat(r,"-list-item-actions")},H,"done"===T&&_,L),{getPrefixCls:V}=t.useContext(at),U=V(),K=t.createElement("div",{className:M},P,F,W,O&&t.createElement(xi,{motionName:"".concat(U,"-fade"),visible:"uploading"===T,motionDeadline:2e3},(e=>{let{className:n}=e;const o="percent"in c?t.createElement(WF,Object.assign({},d,{type:"line",percent:c.percent,"aria-label":c["aria-label"],"aria-labelledby":c["aria-labelledby"]})):null;return t.createElement("div",{className:v()("".concat(r,"-list-item-progress"),n)},o)}))),G=c.response&&"string"===typeof c.response?c.response:(null===(k=c.error)||void 0===k?void 0:k.statusText)||(null===(j=c.error)||void 0===j?void 0:j.message)||i.uploadError,q="error"===T?t.createElement(Hd,{title:G,getPopupContainer:e=>e.parentNode},K):K;return t.createElement("div",{className:v()("".concat(r,"-list-item-container"),o),style:a,ref:n},p?p(q,c,s,{download:S.bind(null,c),preview:C.bind(null,c),remove:E.bind(null,c)}):q)})),UF=VF,KF=(e,n)=>{const{listType:r="text",previewFile:o=oF,onPreview:a,onDownload:i,onRemove:l,locale:c,iconRender:s,isImageUrl:d=nF,prefixCls:u,items:f=[],showPreviewIcon:p=!0,showRemoveIcon:h=!0,showDownloadIcon:m=!1,removeIcon:g,previewIcon:b,downloadIcon:y,progress:x={size:[-1,2],showInfo:!1},appendAction:w,appendActionVisible:C=!0,itemRender:S,disabled:E}=e,k=Lh(),[j,I]=t.useState(!1);t.useEffect((()=>{"picture"!==r&&"picture-card"!==r&&"picture-circle"!==r||(f||[]).forEach((e=>{"undefined"!==typeof document&&"undefined"!==typeof window&&window.FileReader&&window.File&&(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl="",o&&o(e.originFileObj).then((t=>{e.thumbUrl=t||"",k()})))}))}),[r,f,o]),t.useEffect((()=>{I(!0)}),[]);const T=(e,t)=>{if(a)return null===t||void 0===t||t.preventDefault(),a(e)},A=e=>{"function"===typeof i?i(e):e.url&&window.open(e.url)},O=e=>{null===l||void 0===l||l(e)},N=e=>{if(s)return s(e,r);const n="uploading"===e.status,o=d&&d(e)?t.createElement(JB,null):t.createElement(KB,null);let a=n?t.createElement(yl,null):t.createElement(XB,null);return"picture"===r?a=n?t.createElement(yl,null):o:"picture-card"!==r&&"picture-circle"!==r||(a=n?c.uploading:o),a},R=(e,n,r,o,a)=>{const i={type:"text",size:"small",title:o,onClick:t=>{n(),ua(e)&&e.props.onClick&&e.props.onClick(t)},className:"".concat(r,"-list-item-action")};if(a&&(i.disabled=E),ua(e)){const n=ha(e,Object.assign(Object.assign({},e.props),{onClick:()=>{}}));return t.createElement(ac,Object.assign({},i,{icon:n}))}return t.createElement(ac,Object.assign({},i),t.createElement("span",null,e))};t.useImperativeHandle(n,(()=>({handlePreview:T,handleDownload:A})));const{getPrefixCls:P}=t.useContext(at),M=P("upload",u),D=P(),L=v()("".concat(M,"-list"),"".concat(M,"-list-").concat(r)),_=nt(f.map((e=>({key:e.uid,file:e})))),z="picture-card"===r||"picture-circle"===r?"animate-inline":"animate";let B={motionDeadline:2e3,motionName:"".concat(M,"-").concat(z),keys:_,motionAppear:j};const F=t.useMemo((()=>{const e=Object.assign({},Qs(D));return delete e.onAppearEnd,delete e.onEnterEnd,delete e.onLeaveEnd,e}),[D]);return"picture-card"!==r&&"picture-circle"!==r&&(B=Object.assign(Object.assign({},F),B)),t.createElement("div",{className:L},t.createElement(yi,Object.assign({},B,{component:!1}),(e=>{let{key:n,file:o,className:a,style:i}=e;return t.createElement(UF,{key:n,locale:c,prefixCls:M,className:a,style:i,file:o,items:f,progress:x,listType:r,isImgUrl:d,showPreviewIcon:p,showRemoveIcon:h,showDownloadIcon:m,removeIcon:g,previewIcon:b,downloadIcon:y,iconRender:N,actionIconRender:R,itemRender:S,onPreview:T,onDownload:A,onClose:O})})),w&&t.createElement(xi,Object.assign({},B,{visible:C,forceRender:!0}),(e=>{let{className:t,style:n}=e;return ha(w,(e=>({className:v()(e.className,t),style:Object.assign(Object.assign(Object.assign({},n),{pointerEvents:t?"none":void 0}),e.style)})))})))};const GF=t.forwardRef(KF);var qF=function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(r5){a(r5)}}function l(e){try{c(r.throw(e))}catch(r5){a(r5)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}c((r=r.apply(e,t||[])).next())}))};const XF="__LIST_IGNORE_".concat(Date.now(),"__"),YF=(e,n)=>{const{fileList:r,defaultFileList:o,onRemove:a,showUploadList:i=!0,listType:l="text",onPreview:c,onDownload:s,onChange:d,onDrop:u,previewFile:f,disabled:p,locale:h,iconRender:m,isImageUrl:g,progress:b,prefixCls:y,className:x,type:w="select",children:C,style:S,itemRender:E,maxCount:k,data:j={},multiple:I=!1,hasControlInside:T=!0,action:A="",accept:O="",supportServerRender:N=!0,rootClassName:R}=e,P=t.useContext(Ki),M=null!==p&&void 0!==p?p:P,[D,L]=_r(o||[],{value:r,postState:e=>null!==e&&void 0!==e?e:[]}),[_,z]=t.useState("drop"),B=t.useRef(null);t.useMemo((()=>{const e=Date.now();(r||[]).forEach(((t,n)=>{t.uid||Object.isFrozen(t)||(t.uid="__AUTO__".concat(e,"_").concat(n,"__"))}))}),[r]);const F=(e,t,n)=>{let r=nt(t),o=!1;1===k?r=r.slice(-1):k&&(o=r.length>k,r=r.slice(0,k)),(0,Ea.flushSync)((()=>{L(r)}));const a={file:e,fileList:r};n&&(a.event=n),o&&!r.some((t=>t.uid===e.uid))||(0,Ea.flushSync)((()=>{null===d||void 0===d||d(a)}))},H=e=>{const t=e.filter((e=>!e.file[XF]));if(!t.length)return;const n=t.map((e=>QB(e.file)));let r=nt(D);n.forEach((e=>{r=ZB(e,r)})),n.forEach(((e,n)=>{let o=e;if(t[n].parsedFile)e.status="uploading";else{const{originFileObj:t}=e;let n;try{n=new File([t],t.name,{type:t.type})}catch(r5){n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=(new Date).getTime()}n.uid=e.uid,o=n}F(o,r)}))},W=(e,t,n)=>{try{"string"===typeof e&&(e=JSON.parse(e))}catch(r5){}if(!eF(t,D))return;const r=QB(t);r.status="done",r.percent=100,r.response=e,r.xhr=n;const o=ZB(r,D);F(r,o)},V=(e,t)=>{if(!eF(t,D))return;const n=QB(t);n.status="uploading",n.percent=e.percent;const r=ZB(n,D);F(n,r,e)},U=(e,t,n)=>{if(!eF(n,D))return;const r=QB(n);r.error=e,r.response=t,r.status="error";const o=ZB(r,D);F(r,o)},K=e=>{let t;Promise.resolve("function"===typeof a?a(e):a).then((n=>{var r;if(!1===n)return;const o=function(e,t){const n=void 0!==e.uid?"uid":"name",r=t.filter((t=>t[n]!==e[n]));return r.length===t.length?null:r}(e,D);o&&(t=Object.assign(Object.assign({},e),{status:"removed"}),null===D||void 0===D||D.forEach((e=>{const n=void 0!==t.uid?"uid":"name";e[n]!==t[n]||Object.isFrozen(e)||(e.status="removed")})),null===(r=B.current)||void 0===r||r.abort(t),F(t,o))}))},G=e=>{z(e.type),"drop"===e.type&&(null===u||void 0===u||u(e))};t.useImperativeHandle(n,(()=>({onBatchStart:H,onSuccess:W,onProgress:V,onError:U,fileList:D,upload:B.current})));const{getPrefixCls:q,direction:X,upload:Y}=t.useContext(at),$=q("upload",y),J=Object.assign(Object.assign({onBatchStart:H,onError:U,onProgress:V,onSuccess:W},e),{data:j,multiple:I,action:A,accept:O,supportServerRender:N,prefixCls:$,disabled:M,beforeUpload:(t,n)=>qF(void 0,void 0,void 0,(function*(){const{beforeUpload:r,transformFile:o}=e;let a=t;if(r){const e=yield r(t,n);if(!1===e)return!1;if(delete t[XF],e===XF)return Object.defineProperty(t,XF,{value:!0,configurable:!0}),!1;"object"===typeof e&&e&&(a=e)}return o&&(a=yield o(a)),a})),onChange:void 0,hasControlInside:T});delete J.className,delete J.style,C&&!M||delete J.id;const Q="".concat($,"-wrapper"),[Z,ee,te]=WB($,Q),[ne]=nx("Upload",au.Upload),{showRemoveIcon:re,showPreviewIcon:oe,showDownloadIcon:ae,removeIcon:ie,previewIcon:le,downloadIcon:ce}="boolean"===typeof i?{}:i,se="undefined"===typeof re?!M:!!re,de=(e,n)=>i?t.createElement(GF,{prefixCls:$,listType:l,items:D,previewFile:f,onPreview:c,onDownload:s,onRemove:K,showRemoveIcon:se,showPreviewIcon:oe,showDownloadIcon:ae,removeIcon:ie,previewIcon:le,downloadIcon:ce,iconRender:m,locale:Object.assign(Object.assign({},ne),h),isImageUrl:g,progress:b,appendAction:e,appendActionVisible:n,itemRender:E,disabled:M}):e,ue=v()(Q,x,R,ee,te,null===Y||void 0===Y?void 0:Y.className,{["".concat($,"-rtl")]:"rtl"===X,["".concat($,"-picture-card-wrapper")]:"picture-card"===l,["".concat($,"-picture-circle-wrapper")]:"picture-circle"===l}),fe=Object.assign(Object.assign({},null===Y||void 0===Y?void 0:Y.style),S);if("drag"===w){const e=v()(ee,$,"".concat($,"-drag"),{["".concat($,"-drag-uploading")]:D.some((e=>"uploading"===e.status)),["".concat($,"-drag-hover")]:"dragover"===_,["".concat($,"-disabled")]:M,["".concat($,"-rtl")]:"rtl"===X});return Z(t.createElement("span",{className:ue},t.createElement("div",{className:e,style:fe,onDrop:G,onDragOver:G,onDragLeave:G},t.createElement(RB,Object.assign({},J,{ref:B,className:"".concat($,"-btn")}),t.createElement("div",{className:"".concat($,"-drag-container")},C))),de()))}const pe=v()($,"".concat($,"-select"),{["".concat($,"-disabled")]:M}),he=t.createElement("div",{className:pe,style:C?void 0:{display:"none"}},t.createElement(RB,Object.assign({},J,{ref:B})));return Z("picture-card"===l||"picture-circle"===l?t.createElement("span",{className:ue},de(he,!!C)):t.createElement("span",{className:ue},he,de()))};const $F=t.forwardRef(YF);var JF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const QF=t.forwardRef(((e,n)=>{var{style:r,height:o,hasControlInside:a=!1}=e,i=JF(e,["style","height","hasControlInside"]);return t.createElement($F,Object.assign({ref:n,hasControlInside:a},i,{type:"drag",style:Object.assign(Object.assign({},r),{height:o})}))}));const ZF=QF,eH=$F;eH.Dragger=ZF,eH.LIST_IGNORE=XF;const tH=eH;const nH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var rH=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:nH}))};const oH=t.forwardRef(rH);const aH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var iH=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:aH}))};const lH=t.forwardRef(iH);const cH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z"}}]},name:"rocket",theme:"outlined"};var sH=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:cH}))};const dH=t.forwardRef(sH),uH=e=>{const{translate:n}=og(),[r,o]=(0,t.useState)(),[a,i]=UC.useModal();return(0,ng.jsxs)(ng.Fragment,{children:[i,(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(oH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("restartDevice")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("restartDevice")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(IN,{title:n("titleAreYouSure"),onConfirm:()=>{sE(yS,JSON.stringify({delay:0}),GC()).then((t=>{MI(1),XC(),JC(),e.restartDevice(),e.clearToken()})).catch((e=>{null!==e&&void 0!==e&&e.globalHandled||console.error(e.message)}))},cancelText:n("cancel"),okText:n("ok"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(oH,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(lF,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("backup")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("backup")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(lF,{style:{color:"gray",fontSize:"18px"}},"setting"),onClick:async()=>{try{await pE("/site/config/backup","",GC())}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;console.error(e.message)}}})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(lH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("restore")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("restore")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(tH,{showUploadList:!1,customRequest:async e=>{const{file:t}=e;try{await fE({request:"/site/config/restore",file:t,token:GC(),loader:!1}),ak.success(n("ok"))}catch(r){if(null!==r&&void 0!==r&&r.globalHandled)return;ak.error(n(r.message)?n(r.message):r.message)}},maxCount:1,accept:".ehcbck",children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(lH,{style:{color:"gray",fontSize:"18px"}},"setting"),children:n("selectFile")})})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(dH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("maintenancePkgs")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("installMaintenancePkgs")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(tH,{showUploadList:!1,customRequest:async e=>{const{file:t}=e;try{await fE({request:"/package/upload",file:t,token:GC(),loader:!0}).then((e=>{var t;"ok"===e.result?(t=e,a.confirm({title:n("confirmPkgInstall"),icon:(0,ng.jsx)(OI,{}),content:(0,ng.jsxs)("div",{children:[(0,ng.jsx)("h3",{children:n("details")}),(0,ng.jsxs)("div",{children:[(0,ng.jsx)("b",{children:"ID:"})," ",t.id]}),(0,ng.jsxs)("div",{children:[(0,ng.jsxs)("b",{children:[n("version"),":"]})," ",t.version]}),(0,ng.jsxs)("div",{children:[(0,ng.jsxs)("b",{children:[n("date"),":"]})," ",t.date]}),(0,ng.jsxs)("div",{children:[(0,ng.jsxs)("b",{children:[n("descr"),":"]})," ",t.description]})]}),okText:n("install"),cancelText:n("cancel"),onOk:async()=>{await sE("/package/install",{id:t.id},GC(),!0).then((e=>{"ok"===e.reasult&&ak.success(n("pkgInstalled"))}))},onCancel:async()=>{await sE("/package/abort",{id:t.id},GC(),!0),ak.info(n("installationAborted"))}})):ak.error(n("pkgNotValid"))}))}catch(r){if(null!==r&&void 0!==r&&r.globalHandled)return;ak.error(n(r.message)?n(r.message):r.message)}},maxCount:1,accept:".pkg",children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(lH,{style:{color:"gray",fontSize:"18px"}},"setting"),children:n("selectFile")})})})})})]})]})]})},fH=(0,t.memo)(uH);var pH=function(e){return e[e.READY=0]="READY",e[e.CHECK_START=1]="CHECK_START",e[e.UPDATE_READY=2]="UPDATE_READY",e[e.UPDATE_CHECK_ERROR=3]="UPDATE_CHECK_ERROR",e[e.DOWNLOAD_START=4]="DOWNLOAD_START",e[e.DOWNLOAD_OK=5]="DOWNLOAD_OK",e[e.DOWNLOAD_FAILED=6]="DOWNLOAD_FAILED",e[e.APPLY_UPDATE=7]="APPLY_UPDATE",e[e.UPDATE_OK=8]="UPDATE_OK",e[e.UPDATE_FAILED=9]="UPDATE_FAILED",e[e.TERMINATE=10]="TERMINATE",e[e.RESTARTING=11]="RESTARTING",e}(pH||{});const hH=e=>{const{translate:n}=og(),[r,o]=(0,t.useState)(),[a,i]=mE(((e,t)=>cE(e,t)),[]),[l,c]=(0,t.useState)(!1),[s,d]=(0,t.useState)(!1),[u,f]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),[m,g]=(0,t.useState)(),[v,b]=(0,t.useState)(!1),y=(0,t.useRef)(),[x,w]=(0,t.useState)(!1),[C,S]=(0,t.useState)(!1),[E,k]=(0,t.useState)(-1),[j,I]=t.useState(!1),[T,A]=t.useState(!1);(0,t.useEffect)((()=>{i(gS,GC())}),[]),(0,t.useEffect)((()=>{a.value&&o(a.value)}),[a]);const O=()=>{cE(gS,GC(),!1).then((e=>{e.status===pH.UPDATE_READY?(clearInterval(y.current),N()):e.status===pH.UPDATE_CHECK_ERROR?(clearInterval(y.current),f(!1),k(-1),o({status:e.status,percentage:0}),B(pH.UPDATE_CHECK_ERROR)):o({status:e.status,percentage:0})})).catch((e=>{console.log(e)}))},N=()=>{sE("/swupdate/download",JSON.stringify({}),GC(),!1).then((e=>{y.current=setInterval((()=>{R()}),1e3)})).catch((e=>{console.log(e)}))},R=()=>{cE(gS,GC(),!1).then((e=>{e.status===pH.DOWNLOAD_OK?(clearInterval(y.current),cE("/swupdate/getupdfiles",GC(),!1).then((e=>{f(!0),I(!1),A(!1),g(e)})).catch((e=>{I(!1),A(!1),console.log(e)})),k(-1),o({status:e.status,percentage:0})):e.status===pH.DOWNLOAD_FAILED?(clearInterval(y.current),f(!1),k(-1),o({status:e.status,percentage:0}),B(pH.UPDATE_CHECK_ERROR)):o({status:e.status,percentage:0})})).catch((e=>{console.log(e)}))},P=()=>{cE(gS,GC(),!1).then((e=>{e.status===pH.UPDATE_OK?(clearInterval(y.current),o({status:e.status,percentage:e.percentage}),k(-1),M()):e.status===pH.UPDATE_FAILED?(clearInterval(y.current),f(!1),k(-1),o({status:e.status,percentage:e.percentage}),B(pH.UPDATE_CHECK_ERROR)):o({status:e.status,percentage:e.percentage})})).catch((e=>{console.log(e)}))},M=()=>{sE("/swupdate/restart",JSON.stringify({}),GC()).then((e=>{y.current=setInterval((()=>{D()}),1e3)})).catch((e=>{console.log(e)}))},D=()=>{cE(gS,GC(),!1).then((e=>{e.status===pH.RESTARTING?(clearInterval(y.current),y.current=setInterval((()=>{L()}),1e3)):e.status===pH.UPDATE_FAILED?(o({status:e.status,percentage:e.percentage}),B(pH.UPDATE_CHECK_ERROR)):o({status:e.status,percentage:e.percentage})})).catch((e=>{console.log(e)}))},L=()=>{MI(2),XC(),JC(),k(-1),S(!0),o({status:pH.RESTARTING,percentage:(null===r||void 0===r?void 0:r.percentage)||100}),e.restartDevice(),e.clearToken()},_=()=>{sE("/swupdate/cancel",JSON.stringify({}),GC()).then((e=>{y.current=setInterval((()=>{z()}),2e3)})).catch((e=>{console.log(e)}))},z=()=>{cE(gS,GC(),!1).then((e=>{e.status===pH.READY?(clearInterval(y.current),o({status:e.status,percentage:e.percentage}),k(-1),c(!1),d(!1),f(!1),h(!1),b(!1),w(!1),S(!1),I(!1),A(!1)):o({status:e.status,percentage:e.percentage})})).catch((e=>{console.log(e)}))},B=e=>{k(-1),UC.error({title:n("swUpdate"),content:3===e?n("updateNotAvailable"):6===e?n("downloadFailed"):9===e?n("updateFailed"):null,onOk(){_()}})};return(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(vB,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("webUpdate")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("updFromWeb")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsx)(IN,{title:n("titleAreYouSure"),onConfirm:async()=>{(async()=>{const e={mode:"0",url:""};o({status:pH.CHECK_START,percentage:0});try{h(!0),f(!1),await sE("/swupdate/urlcheck",JSON.stringify(e),GC(),!1).then((e=>{0===e.code?(d(!0),A(!0),y.current=setInterval((()=>{O()}),2e3)):console.log("data.code",e.code)})).catch((e=>{console.log(e)}))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(n(t.message))}})()},cancelText:n("cancel"),children:(0,ng.jsx)(ac,{disabled:p,icon:(0,ng.jsx)(vB,{style:{color:"gray",fontSize:"18px"}},"setting")})}),(0,ng.jsx)(rD,{spinning:T,indicator:(0,ng.jsx)(yl,{style:{fontSize:24},spin:!0})}),(0,ng.jsxs)("span",{style:{visibility:s?"visible":"hidden"},children:[n("fileVersion"),": ",null===m||void 0===m?void 0:m.version]})]})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(lH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("fileUpdate")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("updFromFile")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsx)(tH,{showUploadList:!1,customRequest:async e=>{const{file:t}=e;o({status:pH.CHECK_START,percentage:0});try{h(!0),await fE({request:"/swupdate/filecheck",file:t,token:GC(),loader:!1}).then((e=>{0===e.code?(c(!0),I(!0),y.current=setInterval((()=>{O()}),2e3)):console.log("data.code",e.code)})).catch((e=>{console.log(e)}))}catch(r){if(null!==r&&void 0!==r&&r.globalHandled)return;ak.error(n(r.message))}},maxCount:1,accept:".zip",children:(0,ng.jsx)(ac,{disabled:p,icon:(0,ng.jsx)(lH,{style:{color:"gray",fontSize:"18px"}},"setting"),children:n("selectFile")})}),(0,ng.jsx)(rD,{spinning:j,indicator:(0,ng.jsx)(yl,{style:{fontSize:24},spin:!0})}),(0,ng.jsxs)("span",{style:{visibility:l?"visible":"hidden"},children:[n("fileVersion"),": ",null===m||void 0===m?void 0:m.version]})]})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsx)("span",{children:n("restartWarning")}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(ac,{type:"primary",onClick:()=>{f(!1),sE("/swupdate/apply",JSON.stringify({}),GC()).then((e=>{w(!0),y.current=setInterval((()=>{uS(),P()}),1e3)})).catch((e=>{console.log(e)}))},disabled:!u,loading:v,style:{marginTop:16},children:n("installUpd")}),(0,ng.jsx)(ac,{type:"primary",danger:!0,onClick:_,disabled:!u,style:{marginTop:16,marginLeft:16},children:n("cancel")})]}),(0,ng.jsx)(WF,{style:{visibility:x?"visible":"hidden"},percent:null===r||void 0===r?void 0:r.percentage,status:"active"})]})})})})]})]})})},mH=(0,t.memo)(hH);const gH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var vH=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:gH}))};const bH=t.forwardRef(vH),yH=["wrap","nowrap","wrap-reverse"],xH=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],wH=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"];const CH=function(e,t){return v()(Object.assign(Object.assign(Object.assign({},((e,t)=>{const n={};return yH.forEach((r=>{n["".concat(e,"-wrap-").concat(r)]=t.wrap===r})),n})(e,t)),((e,t)=>{const n={};return wH.forEach((r=>{n["".concat(e,"-align-").concat(r)]=t.align===r})),n["".concat(e,"-align-stretch")]=!t.align&&!!t.vertical,n})(e,t)),((e,t)=>{const n={};return xH.forEach((r=>{n["".concat(e,"-justify-").concat(r)]=t.justify===r})),n})(e,t)))},SH=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},EH=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},kH=e=>{const{componentCls:t}=e,n={};return yH.forEach((e=>{n["".concat(t,"-wrap-").concat(e)]={flexWrap:e}})),n},jH=e=>{const{componentCls:t}=e,n={};return wH.forEach((e=>{n["".concat(t,"-align-").concat(e)]={alignItems:e}})),n},IH=e=>{const{componentCls:t}=e,n={};return xH.forEach((e=>{n["".concat(t,"-justify-").concat(e)]={justifyContent:e}})),n},TH=$o("Flex",(e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=Ho(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[SH(o),EH(o),kH(o),jH(o),IH(o)]}),(()=>({})),{resetStyle:!1});var AH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const OH=t.forwardRef(((e,n)=>{const{prefixCls:r,rootClassName:o,className:a,style:i,flex:l,gap:c,children:s,vertical:d=!1,component:u="div"}=e,f=AH(e,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:p,direction:h,getPrefixCls:m}=t.useContext(at),g=m("flex",r),[b,y,x]=TH(g),w=null!==d&&void 0!==d?d:null===p||void 0===p?void 0:p.vertical,C=v()(a,o,null===p||void 0===p?void 0:p.className,g,y,x,CH(g,e),{["".concat(g,"-rtl")]:"rtl"===h,["".concat(g,"-gap-").concat(c)]:ic(c),["".concat(g,"-vertical")]:w}),S=Object.assign(Object.assign({},null===p||void 0===p?void 0:p.style),i);return l&&(S.flex=l),c&&!ic(c)&&(S.gap=c),b(t.createElement(u,Object.assign({ref:n,className:C,style:S},rt(f,["justify","wrap","align"])),s))}));const NH=OH,RH=e=>{let{children:t,title:n,subtitle:r,direction:o="vertical"}=e;return(0,ng.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"left",alignItems:"center",gap:"20px"},children:[n&&(0,ng.jsx)("h2",{children:n}),r&&(0,ng.jsx)("h4",{children:r}),"vertical"===o&&(0,ng.jsx)("table",{style:{width:"100%"},children:(0,ng.jsx)("tbody",{children:t.map(((e,t)=>(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:e.label})}),(0,ng.jsx)("td",{children:e.input})]},t)))})}),"horizontal"===o&&(0,ng.jsx)(NH,{gap:50,style:{flexWrap:"wrap"},children:t.map(((e,t)=>(0,ng.jsxs)(hc,{children:[(0,ng.jsx)("span",{children:e.label}),e.input]},t)))})]})},PH=e=>{let{open:n,setOpen:r,checkMail:o,translate:a}=e;const[i,l]=(0,t.useState)(!1),[c,s]=(0,t.useState)({destMail:"",subject:a("testMail")}),[d,u]=(0,t.useState)();return(0,ng.jsx)(UC,{title:a("testMail"),open:n,onCancel:()=>r(!1),onOk:async function(){if(o(c.destMail))try{l(!0);const e=await sE("/mail/send",JSON.stringify(c),GC());"ok"===e.result&&ak.success(a("ok")),"error"===e.result&&ak.error(a("errorMail")),u(e)}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(a(e.message))}l(!1)},confirmLoading:i,okButtonProps:{disabled:!o(c.destMail)},cancelText:a("cancel"),okText:a("ok"),children:(0,ng.jsx)(RH,{children:[{label:a("emailAddress"),input:(0,ng.jsx)(Aj,{style:{width:"250px"},value:c.destMail,status:o(c.destMail)?"":"error",onChange:e=>{s({...c,destMail:e.target.value})}})},{label:a("result"),input:(0,ng.jsx)("span",{children:null===d||void 0===d?void 0:d.result})}]})})},MH=(0,t.createContext)(void 0),DH=()=>{const e=(0,t.useContext)(MH);if(!e)throw new Error("useMail must be used inside MailProvider");return e},LH=e=>{let{children:n}=e;const[r,o]=(0,t.useState)(!1),[a,i]=mE(((e,t)=>cE(e,t)),[]),l=async()=>{i(BS,GC())};return(0,t.useEffect)((()=>{if(a.value){const e=a.value.enabled,t=a.value.to.some((e=>e.sendPasswordRecovery));o(t&&e)}}),[a]),(0,t.useEffect)((()=>{l()}),[]),(0,ng.jsx)(MH.Provider,{value:{hasPasswordRecovery:r,refetchMail:l},children:n})},_H={enabled:!1,fromDescr:"",smtp:{host:"",service:"",mail:"",password:"",port:0},to:[{mail:"",sendAlarms:!0,sendPasswordRecovery:!0,sendCsvData:!0}]},zH=e=>{let{setShowDialog:n,showDialog:r}=e;const{translate:o}=og(),{refetchMail:a}=DH(),i={label:o("climatelCloud"),value:"climatelcloud",defaultPort:0,parameterService:{pass:!1,port:!1,host:!1}},l={label:o("smtpSsl"),value:"smtpSSL",defaultPort:465,parameterService:{pass:!0,port:!0,host:!0}},c={label:o("smtpSTARTTLS"),value:"smtpSTARTTLS",defaultPort:587,parameterService:{pass:!0,port:!0,host:!0}},s={label:o("smtpNoAuth"),value:"smtpNoAuth",defaultPort:25,parameterService:{pass:!1,port:!0,host:!0}},[d,u]=(0,t.useState)(!1),[f,p]=(0,t.useState)(_H),[h,m]=(0,t.useState)({pass:!1,host:!1,port:!1}),[g,v]=mE(((e,t)=>cE(e,t)),[]);function b(e,t){const r={...f};r[e]=t,p({...r}),n(!0)}function y(e,t){const n={...f.smtp};n[e]=t,b("smtp",n)}function x(e,t,n){const r=[...f.to],o={...f.to[e]};o[t]=n,r[e]=o,b("to",[...r])}function w(e){switch(e){case i.value:m(i.parameterService);break;case c.value:m(c.parameterService);break;case s.value:m(s.parameterService);break;case l.value:m(l.parameterService)}}function C(e){return!!e.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}(0,t.useEffect)((()=>{!r&&v(BS,GC())}),[r]),(0,t.useEffect)((()=>{g.value&&p(g.value),g.value&&w(g.value.smtp.service)}),[g]);const S=[{title:o("emailAddress"),dataIndex:"mail",key:"mail",render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("emailAddress")}),(0,ng.jsx)(Aj,{style:{width:220},status:C(e)?"":"error",value:e,onChange:e=>{x(n,"mail",e.target.value)}})]})},{title:o("titleRecoveryPassword"),dataIndex:"sendPasswordRecovery",key:"sendPasswordRecovery",align:"center",render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("titleRecoveryPassword")}),(0,ng.jsx)(aM,{checked:e,onChange:e=>{x(n,"sendPasswordRecovery",e.target.checked)}})]})},{title:o("alarms"),dataIndex:"sendAlarms",key:"sendAlarms",align:"center",render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("alarms")}),(0,ng.jsx)(aM,{checked:e,onChange:e=>{x(n,"sendAlarms",e.target.checked)}})]})},{title:o("csv"),dataIndex:"sendCsvData",key:"sendCsvData",align:"center",render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("csv")}),(0,ng.jsx)(aM,{checked:e,onChange:e=>{x(n,"sendCsvData",e.target.checked)}})]})},{title:o("delete"),dataIndex:"mail",key:"mail",align:"center",render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("delete")}),(0,ng.jsx)(ac,{disabled:f.to.length<2,onClick:()=>{b("to",[...f.to.filter(((e,t)=>t!==n))])},children:(0,ng.jsx)(kz,{})})]})}];return(0,ng.jsxs)(ng.Fragment,{children:[d&&(0,ng.jsx)(PH,{open:d,setOpen:u,checkMail:C,translate:o}),(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(bH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:o("configEmail")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(qz,{gutter:16,children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{children:o("enable")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(yI,{checked:f.enabled,onChange:e=>{b("enabled",e)}})})]})})]}),f.enabled&&(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsxs)(Zz,{children:[(0,ng.jsxs)(qz,{gutter:16,children:[(0,ng.jsx)(hB,{orientation:"left",orientationMargin:0,children:(0,ng.jsx)("b",{children:o("sender")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("table",{style:{width:"30vw"},children:(0,ng.jsxs)("tbody",{children:[(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:o("name")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(Aj,{style:{width:220},value:f.fromDescr,onChange:e=>{b("fromDescr",e.target.value)}})})]}),(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:o("emailAddress")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(Aj,{style:{width:220},status:C(f.smtp.mail)?"":"error",value:f.smtp.mail,onChange:e=>{y("mail",e.target.value)}})})]}),(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:o("service")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(HO,{style:{width:220},value:f.smtp.service,options:[{label:i.label,value:i.value},{label:l.label,value:l.value},{label:s.label,value:s.value},{label:c.label,value:c.value}],onSelect:e=>{switch(w(e),e){case i.value:b("smtp",{...f.smtp,service:e,port:i.defaultPort,password:"",host:""});break;case c.value:b("smtp",{...f.smtp,port:c.defaultPort,service:e,password:"",host:""});break;case s.value:b("smtp",{...f.smtp,port:s.defaultPort,service:e,password:"",host:""});break;case l.value:b("smtp",{...f.smtp,port:l.defaultPort,service:e,password:"",host:""})}}})})]}),h.host&&(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:o("host")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(Aj,{style:{width:220},status:(E=f.smtp.host,E.toLowerCase().match(/(\S+)(:\d+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/)?"":"error"),value:f.smtp.host,onChange:e=>{y("host",e.target.value)}})})]}),h.pass&&(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:o("password")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(Aj.Password,{style:{width:220},status:f.smtp.password.length?"":"error",value:f.smtp.password,onChange:e=>{y("password",e.target.value)}})})]}),h.port&&(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:o("port")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(xN,{value:f.smtp.port,min:0,onChange:e=>{null!=e&&y("port",e)}})})]})]})})})]}),(0,ng.jsxs)(qz,{gutter:16,children:[(0,ng.jsx)(hB,{orientation:"left",orientationMargin:0,children:(0,ng.jsx)("b",{children:f.to.length>1?o("addressees"):o("addressee")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsx)(ac,{onClick:()=>{b("to",[...f.to,{..._H.to[0]}])},children:o("add")}),(0,ng.jsx)(k_,{dataSource:f.to,columns:S,pagination:!1,rowKey:"name"})]})})]})]})]}),!f.enabled&&(0,ng.jsx)(iO,{description:o("disabled")}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(II,{disabled:!C(f.smtp.mail)||f.to.some((e=>!C(e.mail))),onClick:async function(){try{await dE(BS,JSON.stringify(f),GC()),n(!1),a(),ak.success(o("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(o(e.message))}},justEdit:r}),f.enabled&&(0,ng.jsx)(ac,{disabled:!C(f.smtp.mail),onClick:()=>u(!0),children:o("test")})]})})]})]});var E},BH=(0,t.memo)(zH);var FH=n(446),HH=n.n(FH),WH=n(223),VH=n.n(WH),UH=n(199),KH=n.n(UH),GH=n(865),qH=n.n(GH),XH=n(556),YH=n.n(XH),$H=n(76),JH=n.n($H),QH=n(988),ZH=n.n(QH);HH().extend(ZH()),HH().extend(JH()),HH().extend(VH()),HH().extend(KH()),HH().extend(qH()),HH().extend(YH()),HH().extend((function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||"").replace("Wo","wo");return r.bind(this)(t)}}));var eW={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},tW=function(e){return eW[e]||e.split("_")[0]},nW=function(){je(!1,"Not match any format. Please help to fire a issue about this.")},rW={getNow:function(){return HH()()},getFixedDate:function(e){return HH()(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},getMillisecond:function(e){return e.millisecond()},addYear:function(e,t){return e.add(t,"year")},addMonth:function(e,t){return e.add(t,"month")},addDate:function(e,t){return e.add(t,"day")},setYear:function(e,t){return e.year(t)},setMonth:function(e,t){return e.month(t)},setDate:function(e,t){return e.date(t)},setHour:function(e,t){return e.hour(t)},setMinute:function(e,t){return e.minute(t)},setSecond:function(e,t){return e.second(t)},setMillisecond:function(e,t){return e.millisecond(t)},isAfter:function(e,t){return e.isAfter(t)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return HH()().locale(tW(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return t.locale(tW(e)).weekday(0)},getWeek:function(e,t){return t.locale(tW(e)).week()},getShortWeekDays:function(e){return HH()().locale(tW(e)).localeData().weekdaysMin()},getShortMonths:function(e){return HH()().locale(tW(e)).localeData().monthsShort()},format:function(e,t,n){return t.locale(tW(e)).format(n)},parse:function(e,t,n){for(var r=tW(e),o=0;o<n.length;o+=1){var a=n[o],i=t;if(a.includes("wo")||a.includes("Wo")){for(var l=i.split("-")[0],c=i.split("-")[1],s=HH()(l,"YYYY").startOf("year").locale(r),d=0;d<=52;d+=1){var u=s.add(d,"week");if(u.format("Wo")===c)return u}return nW(),null}var f=HH()(i,a,!0).locale(r);if(f.isValid())return f}return t&&nW(),null}}};const oW=rW;const aW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var iW=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:aW}))};const lW=t.forwardRef(iW);const cW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var sW=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:cW}))};const dW=t.forwardRef(sW);const uW={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};var fW=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:uW}))};const pW=t.forwardRef(fW);const hW=t.createContext(null);var mW={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};const gW=function(e){var n=e.popupElement,r=e.popupStyle,o=e.popupClassName,a=e.popupAlign,i=e.transitionName,l=e.getPopupContainer,c=e.children,s=e.range,d=e.placement,u=e.builtinPlacements,f=void 0===u?mW:u,p=e.direction,m=e.visible,g=e.onClose,b=t.useContext(hW).prefixCls,y="".concat(b,"-dropdown"),x=t.useMemo((function(){return void 0!==d?d:"rtl"===p?"bottomRight":"bottomLeft"}),[d,p]);return t.createElement(Ps,{showAction:[],hideAction:["click"],popupPlacement:x,builtinPlacements:f,prefixCls:y,popupTransitionName:i,popup:n,popupAlign:a,popupVisible:m,popupClassName:v()(o,h(h({},"".concat(y,"-range"),s),"".concat(y,"-rtl"),"rtl"===p)),popupStyle:r,stretch:"minWidth",getPopupContainer:l,onPopupVisibleChange:function(e){e||g()}},c)};function vW(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",r=String(e);r.length<t;)r="".concat(n).concat(r);return r}function bW(e){return null===e||void 0===e?[]:Array.isArray(e)?e:[e]}function yW(e,t,n){var r=nt(e);return r[t]=n,r}function xW(e,t){var n={};return(t||Object.keys(e)).forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),n}function wW(e,t,n){if(n)return n;switch(e){case"time":return t.fieldTimeFormat;case"datetime":return t.fieldDateTimeFormat;case"month":return t.fieldMonthFormat;case"year":return t.fieldYearFormat;case"quarter":return t.fieldQuarterFormat;case"week":return t.fieldWeekFormat;default:return t.fieldDateFormat}}function CW(e){return xW(e,["placement","builtinPlacements","popupAlign","getPopupContainer","transitionName","direction"])}function SW(e,n,r,o){var a=t.useMemo((function(){return e||function(e,t){var o=e;return n&&"date"===t.type?n(o,t.today):r&&"month"===t.type?r(o,t.locale):t.originNode}}),[e,r,n]),i=t.useCallback((function(e,t){return a(e,oe(oe({},t),{},{range:o}))}),[a,o]);return i}function EW(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=u(t.useState([!1,!1]),2),a=o[0],i=o[1],l=t.useMemo((function(){return a.map((function(t,o){if(t)return!0;var a=e[o];return!!a&&(!r[o]&&!a||!(!a||!n(a,{activeIndex:o})))}))}),[e,a,n,r]);return[l,function(e,t){i((function(n){return yW(n,t,e)}))}]}function kW(e,t,n,r,o){var a="",i=[];return e&&i.push(o?"hh":"HH"),t&&i.push("mm"),n&&i.push("ss"),a=i.join(":"),r&&(a+=".SSS"),o&&(a+=" A"),a}function jW(e,n){var r=n.showHour,o=n.showMinute,a=n.showSecond,i=n.showMillisecond,l=n.use12Hours;return t.useMemo((function(){return function(e,t,n,r,o,a){var i=e.fieldDateTimeFormat,l=e.fieldDateFormat,c=e.fieldTimeFormat,s=e.fieldMonthFormat,d=e.fieldYearFormat,u=e.fieldWeekFormat,f=e.fieldQuarterFormat,p=e.yearFormat,h=e.cellYearFormat,m=e.cellQuarterFormat,g=e.dayFormat,v=e.cellDateFormat,b=kW(t,n,r,o,a);return oe(oe({},e),{},{fieldDateTimeFormat:i||"YYYY-MM-DD ".concat(b),fieldDateFormat:l||"YYYY-MM-DD",fieldTimeFormat:c||b,fieldMonthFormat:s||"YYYY-MM",fieldYearFormat:d||"YYYY",fieldWeekFormat:u||"gggg-wo",fieldQuarterFormat:f||"YYYY-[Q]Q",yearFormat:p||"YYYY",cellYearFormat:h||"YYYY",cellQuarterFormat:m||"[Q]Q",cellDateFormat:v||g||"D"})}(e,r,o,a,i,l)}),[e,r,o,a,i,l])}function IW(e,t,n){return null!==n&&void 0!==n?n:t.some((function(t){return e.includes(t)}))}var TW=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function AW(e){return e&&"string"===typeof e}function OW(e){var t=e.showTime,n=function(e){var t=xW(e,TW),n=e.format,r=e.picker,o=null;return n&&(o=n,Array.isArray(o)&&(o=o[0]),o="object"===f(o)?o.format:o),"time"===r&&(t.format=o),[t,o]}(e),r=u(n,2),o=r[0],a=r[1],i=t&&"object"===f(t)?t:{},l=oe(oe({defaultOpenValue:i.defaultOpenValue||i.defaultValue},o),i),c=l.showMillisecond,s=l.showHour,d=l.showMinute,p=l.showSecond;return s||d||p||c||(s=!0,d=!0,p=!0),[l,oe(oe({},l),{},{showHour:s,showMinute:d,showSecond:p,showMillisecond:c}),l.format,a]}function NW(e,t,n,r,o){if("datetime"===e||"time"===e){for(var a=r,i=wW(e,o,null),l=[t,n],c=0;c<l.length;c+=1){var s=bW(l[c])[0];if(AW(s)){i=s;break}}var d=a.showHour,u=a.showMinute,f=a.showSecond,p=a.showMillisecond,h=IW(i,["a","A","LT","LLL","LTS"],a.use12Hours),m=[d,u,f,p].some((function(e){return void 0!==e}));m||(d=IW(i,["H","h","k","LT","LLL"]),u=IW(i,["m","LT","LLL"]),f=IW(i,["s","LTS"]),p=IW(i,["SSS"])),m||d||u||f||p||(d=!0,u=!0,f=!0);var g=t||kW(d,u,f,p,h);return oe(oe({},a),{},{format:g,showHour:d,showMinute:u,showSecond:f,showMillisecond:p,use12Hours:h})}return null}function RW(e,n,r){return!1===n?null:(n&&"object"===f(n)?n:{}).clearIcon||r||t.createElement("span",{className:"".concat(e,"-clear-btn")})}var PW=7;function MW(e,t,n){return!e&&!t||e===t||!(!e||!t)&&n()}function DW(e,t,n){return MW(t,n,(function(){return Math.floor(e.getYear(t)/10)===Math.floor(e.getYear(n)/10)}))}function LW(e,t,n){return MW(t,n,(function(){return e.getYear(t)===e.getYear(n)}))}function _W(e,t){return Math.floor(e.getMonth(t)/3)+1}function zW(e,t,n){return MW(t,n,(function(){return LW(e,t,n)&&e.getMonth(t)===e.getMonth(n)}))}function BW(e,t,n){return MW(t,n,(function(){return LW(e,t,n)&&zW(e,t,n)&&e.getDate(t)===e.getDate(n)}))}function FW(e,t,n){return MW(t,n,(function(){return e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)}))}function HW(e,t,n){return MW(t,n,(function(){return BW(e,t,n)&&FW(e,t,n)&&e.getMillisecond(t)===e.getMillisecond(n)}))}function WW(e,t,n,r){return MW(n,r,(function(){var o=e.locale.getWeekFirstDate(t,n),a=e.locale.getWeekFirstDate(t,r);return LW(e,o,a)&&e.locale.getWeek(t,n)===e.locale.getWeek(t,r)}))}function VW(e,t,n,r,o){switch(o){case"date":return BW(e,n,r);case"week":return WW(e,t.locale,n,r);case"month":return zW(e,n,r);case"quarter":return function(e,t,n){return MW(t,n,(function(){return LW(e,t,n)&&_W(e,t)===_W(e,n)}))}(e,n,r);case"year":return LW(e,n,r);case"decade":return DW(e,n,r);case"time":return FW(e,n,r);default:return HW(e,n,r)}}function UW(e,t,n,r){return!!(t&&n&&r)&&(e.isAfter(r,t)&&e.isAfter(n,r))}function KW(e,t,n,r,o){return!!VW(e,t,n,r,o)||e.isAfter(n,r)}function GW(e,t){var n=t.generateConfig,r=t.locale,o=t.format;return e?"function"===typeof o?o(e):n.locale.format(r.locale,e,o):""}function qW(e,t,n){var r=t,o=["getHour","getMinute","getSecond","getMillisecond"];return["setHour","setMinute","setSecond","setMillisecond"].forEach((function(t,a){r=n?e[t](r,e[o[a]](n)):e[t](r,0)})),r}function XW(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.useMemo((function(){var t=e?bW(e):e;return n&&t&&(t[1]=t[1]||t[0]),t}),[e,n]);return r}function YW(e,n){var r=e.generateConfig,o=e.locale,a=e.picker,i=void 0===a?"date":a,l=e.prefixCls,c=void 0===l?"rc-picker":l,s=e.styles,d=void 0===s?{}:s,p=e.classNames,h=void 0===p?{}:p,m=e.order,g=void 0===m||m,v=e.components,b=void 0===v?{}:v,y=e.inputRender,x=e.allowClear,w=e.clearIcon,C=e.needConfirm,S=e.multiple,E=e.format,k=e.inputReadOnly,j=e.disabledDate,I=e.minDate,T=e.maxDate,A=e.showTime,O=e.value,N=e.defaultValue,R=e.pickerValue,P=e.defaultPickerValue,M=XW(O),D=XW(N),L=XW(R),_=XW(P),z="date"===i&&A?"datetime":i,B="time"===z||"datetime"===z,F=B||S,H=null!==C&&void 0!==C?C:B,W=u(OW(e),4),V=W[0],U=W[1],K=W[2],G=W[3],q=jW(o,U),X=t.useMemo((function(){return NW(z,K,G,V,q)}),[z,K,G,V,q]);var Y=t.useMemo((function(){return oe(oe({},e),{},{prefixCls:c,locale:q,picker:i,styles:d,classNames:h,order:g,components:oe({input:y},b),clearIcon:RW(c,x,w),showTime:X,value:M,defaultValue:D,pickerValue:L,defaultPickerValue:_},null===n||void 0===n?void 0:n())}),[e]),$=function(e,n,r){return t.useMemo((function(){var t=bW(wW(e,n,r)),o=t[0],a="object"===f(o)&&"mask"===o.type?o.format:null;return[t.map((function(e){return"string"===typeof e||"function"===typeof e?e:e.format})),a]}),[e,n,r])}(z,q,E),J=u($,2),Q=J[0],Z=J[1],ee=function(e,t,n){return!("function"!==typeof e[0]&&!n)||t}(Q,k,S),te=function(e,t,n,r,o){var a=Mr((function(a,i){return!(!n||!n(a,i))||!(!r||!e.isAfter(r,a)||VW(e,t,r,a,i.type))||!(!o||!e.isAfter(a,o)||VW(e,t,o,a,i.type))}));return a}(r,o,j,I,T),ne=function(e,t,n,r){var o=Mr((function(o,a){var i=oe({type:t},a);if(delete i.activeIndex,!e.isValidate(o)||n&&n(o,i))return!0;if(("date"===t||"time"===t)&&r){var l,c=(null===(l=r.disabledTime)||void 0===l?void 0:l.call(r,o,a&&1===a.activeIndex?"end":"start"))||{},s=c.disabledHours,d=c.disabledMinutes,u=c.disabledSeconds,f=c.disabledMilliseconds,p=r.disabledHours,h=r.disabledMinutes,m=r.disabledSeconds,g=s||p,v=d||h,b=u||m,y=e.getHour(o),x=e.getMinute(o),w=e.getSecond(o),C=e.getMillisecond(o);if(g&&g().includes(y))return!0;if(v&&v(y).includes(x))return!0;if(b&&b(y,x).includes(w))return!0;if(f&&f(y,x,w).includes(C))return!0}return!1}));return o}(r,i,j,X);return[t.useMemo((function(){return oe(oe({},Y),{},{needConfirm:H,inputReadOnly:ee,disabledDate:te})}),[Y,H,ee,te]),z,F,Q,Z,ne]}function $W(e,n){var r=arguments.length>3?arguments[3]:void 0,o=function(e,n,r){var o=u(_r(n,{value:e}),2),a=o[0],i=o[1],l=t.useRef(e),c=t.useRef(),s=function(){Sa.cancel(c.current)},d=Mr((function(){i(l.current),r&&a!==l.current&&r(l.current)})),f=Mr((function(e,t){s(),l.current=e,e||t?d():c.current=Sa(d)}));return t.useEffect((function(){return s}),[]),[a,f]}(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).every((function(e){return e}))&&e,n||!1,r),a=u(o,2),i=a[0],l=a[1];return[i,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.inherit&&!i||l(e,t.force)}]}function JW(e){var n=t.useRef();return t.useImperativeHandle(e,(function(){var e;return{nativeElement:null===(e=n.current)||void 0===e?void 0:e.nativeElement,focus:function(){var e;null===(e=n.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=n.current)||void 0===e||e.blur()}}})),n}function QW(e,n){return t.useMemo((function(){return e||(n?(Ie(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(n).map((function(e){var t=u(e,2);return{label:t[0],value:t[1]}}))):[])}),[e,n])}function ZW(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=t.useRef(n);o.current=n,un((function(){if(!e){var t=Sa((function(){o.current(e)}),r);return function(){Sa.cancel(t)}}o.current(e)}),[e])}function eV(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=u(t.useState(0),2),o=r[0],a=r[1],i=u(t.useState(!1),2),l=i[0],c=i[1],s=t.useRef([]),d=t.useRef(null);return ZW(l,(function(){l||(s.current=[])})),t.useEffect((function(){l&&s.current.push(o)}),[l,o]),[l,function(e){c(e)},function(e){return e&&(d.current=e),d.current},o,a,function(t){var r=s.current,o=new Set(r.filter((function(e){return t[e]||n[e]}))),a=0===r[r.length-1]?1:0;return o.size>=2||e[a]?null:a},s.current]}function tV(e,t,n,r){switch(t){case"date":case"week":return e.addMonth(n,r);case"month":case"quarter":return e.addYear(n,r);case"year":return e.addYear(n,10*r);case"decade":return e.addYear(n,100*r);default:return n}}var nV=[];function rV(e,n,r,o,a,i,l,c){var s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:nV,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:nV,f=arguments.length>11?arguments[11]:void 0,p=arguments.length>12?arguments[12]:void 0,h=arguments.length>13?arguments[13]:void 0,m="time"===l,g=i||0,v=function(t){var n=e.getNow();return m&&(n=qW(e,n)),s[t]||r[t]||n},b=u(arguments.length>9&&void 0!==arguments[9]?arguments[9]:nV,2),y=b[0],x=b[1],w=u(_r((function(){return v(0)}),{value:y}),2),C=w[0],S=w[1],E=u(_r((function(){return v(1)}),{value:x}),2),k=E[0],j=E[1],I=t.useMemo((function(){var t=[C,k][g];return m?t:qW(e,t,d[g])}),[m,C,k,g,e,d]),T=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"panel";(0,[S,j][g])(t);var a=[C,k];a[g]=t,!f||VW(e,n,C,a[0],l)&&VW(e,n,k,a[1],l)||f(a,{source:r,range:1===g?"end":"start",mode:o})},A=t.useRef(null);return fn((function(){if(a&&!s[g]){var t=m?null:e.getNow();if(null!==A.current&&A.current!==g?t=[C,k][1^g]:r[g]?t=0===g?r[0]:function(t,r){if(c){var o={date:"month",week:"month",month:"year",quarter:"year"}[l];if(o&&!VW(e,n,t,r,o))return tV(e,l,r,-1);if("year"===l&&Math.floor(e.getYear(t)/10)!==Math.floor(e.getYear(r)/10))return tV(e,l,r,-1)}return r}(r[0],r[1]):r[1^g]&&(t=r[1^g]),t){p&&e.isAfter(p,t)&&(t=p);var o=c?tV(e,l,t,1):t;h&&e.isAfter(o,h)&&(t=c?tV(e,l,h,-1):h),T(t,"reset")}}}),[a,g,r[g]]),t.useEffect((function(){A.current=a?g:null}),[a,g]),fn((function(){a&&s&&s[g]&&T(s[g],"reset")}),[a,g]),[I,T]}function oV(e,n){var r=t.useRef(e),o=u(t.useState({}),2)[1],a=function(e){return e&&void 0!==n?n:r.current};return[a,function(e){r.current=e,o({})},a(!0)]}var aV=[];function iV(e,t,n){return[function(r){return r.map((function(r){return GW(r,{generateConfig:e,locale:t,format:n[0]})}))},function(t,n){for(var r=Math.max(t.length,n.length),o=-1,a=0;a<r;a+=1){var i=t[a]||null,l=n[a]||null;if(i!==l&&!HW(e,i,l)){o=a;break}}return[o<0,0!==o]}]}function lV(e,t){return nt(e).sort((function(e,n){return t.isAfter(e,n)?1:-1}))}function cV(e,n,r,o,a,i,l,c,s){var d=u(_r(i,{value:l}),2),f=d[0],p=d[1],h=f||aV,m=function(e){var n=u(oV(e),2),r=n[0],o=n[1],a=Mr((function(){o(e)}));return t.useEffect((function(){a()}),[e]),[r,o]}(h),g=u(m,2),v=g[0],b=g[1],y=u(iV(e,n,r),2),x=y[0],w=y[1],C=Mr((function(t){var n=nt(t);if(o)for(var r=0;r<2;r+=1)n[r]=n[r]||null;else a&&(n=lV(n.filter((function(e){return e})),e));var i=u(w(v(),n),2),l=i[0],s=i[1];if(!l&&(b(n),c)){var d=x(n);c(n,d,{range:s?"end":"start"})}}));return[h,p,v,C,function(){s&&s(v())}]}function sV(e,n,r,o,a,i,l,c,s,d){var f=e.generateConfig,p=e.locale,h=e.picker,m=e.onChange,g=e.allowEmpty,v=e.order,b=!i.some((function(e){return e}))&&v,y=u(iV(f,p,l),2),x=y[0],w=y[1],C=u(oV(n),2),S=C[0],E=C[1],k=Mr((function(){E(n)}));t.useEffect((function(){k()}),[n]);var j=Mr((function(e){var t=null===e,o=nt(e||S());if(t)for(var l=Math.max(i.length,o.length),c=0;c<l;c+=1)i[c]||(o[c]=null);b&&o[0]&&o[1]&&(o=lV(o,f)),a(o);var s=u(o,2),y=s[0],C=s[1],E=!y,k=!C,j=!g||(!E||g[0])&&(!k||g[1]),I=!v||E||k||VW(f,p,y,C,h)||f.isAfter(C,y),T=(!y||!d(y,{activeIndex:0}))&&(!C||!d(C,{from:y,activeIndex:1})),A=t||j&&I&&T;if(A){r(o);var O=u(w(o,n),1)[0];m&&!O&&m(t&&o.every((function(e){return!e}))?null:o,x(o))}return A})),I=Mr((function(e,t){var n=yW(S(),e,o()[e]);E(n),t&&j()})),T=!c&&!s;return ZW(!T,(function(){T&&(j(),a(n),k())}),2),[I,j]}function dV(e,t,n,r,o){return("date"===t||"time"===t)&&(void 0!==n?n:void 0!==r?r:!o&&("date"===e||"time"===e))}function uV(){return[]}function fV(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,i=[],l=n>=1?0|n:1,c=e;c<=t;c+=l){var s=o.includes(c);s&&r||i.push({label:vW(c,a),value:c,disabled:s})}return i}function pV(e){var n=arguments.length>2?arguments[2]:void 0,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})||{},o=r.use12Hours,a=r.hourStep,i=void 0===a?1:a,l=r.minuteStep,c=void 0===l?1:l,s=r.secondStep,d=void 0===s?1:s,f=r.millisecondStep,p=void 0===f?100:f,h=r.hideDisabledOptions,m=r.disabledTime,g=r.disabledHours,v=r.disabledMinutes,b=r.disabledSeconds,y=t.useMemo((function(){return n||e.getNow()}),[n,e]),x=t.useCallback((function(e){var t=(null===m||void 0===m?void 0:m(e))||{};return[t.disabledHours||g||uV,t.disabledMinutes||v||uV,t.disabledSeconds||b||uV,t.disabledMilliseconds||uV]}),[m,g,v,b]),w=u(t.useMemo((function(){return x(y)}),[y,x]),4),C=w[0],S=w[1],E=w[2],k=w[3],j=t.useCallback((function(e,t,n,r){var a=fV(0,23,i,h,e()),l=o?a.map((function(e){return oe(oe({},e),{},{label:vW(e.value%12||12,2)})})):a;return[l,function(e){return fV(0,59,c,h,t(e))},function(e,t){return fV(0,59,d,h,n(e,t))},function(e,t,n){return fV(0,999,p,h,r(e,t,n),3)}]}),[h,i,o,p,c,d]),I=u(t.useMemo((function(){return j(C,S,E,k)}),[j,C,S,E,k]),4),T=I[0],A=I[1],O=I[2],N=I[3];return[function(t,n){var r=function(){return T},o=A,a=O,i=N;if(n){var l=u(x(n),4),c=l[0],s=l[1],d=l[2],f=l[3],p=u(j(c,s,d,f),4),h=p[0];r=function(){return h},o=p[1],a=p[2],i=p[3]}var m=function(e,t,n,r,o,a){var i=e;function l(e,t,n){var r=a[e](i),o=n.find((function(e){return e.value===r}));if(!o||o.disabled){var l=n.filter((function(e){return!e.disabled})),c=nt(l).reverse().find((function(e){return e.value<=r}))||l[0];c&&(r=c.value,i=a[t](i,r))}return r}var c=l("getHour","setHour",t()),s=l("getMinute","setMinute",n(c)),d=l("getSecond","setSecond",r(c,s));return l("getMillisecond","setMillisecond",o(c,s,d)),i}(t,r,o,a,i,e);return m},T,A,O,N]}function hV(e){var n=e.mode,r=e.internalMode,o=e.renderExtraFooter,a=e.showNow,i=e.showTime,l=e.onSubmit,c=e.onNow,s=e.invalid,d=e.needConfirm,f=e.generateConfig,p=e.disabledDate,h=t.useContext(hW),m=h.prefixCls,g=h.locale,b=h.button,y=void 0===b?"button":b,x=f.getNow(),w=u(pV(f,i,x),1)[0],C=null===o||void 0===o?void 0:o(n),S=p(x,{type:n}),E="".concat(m,"-now"),k="".concat(E,"-btn"),j=a&&t.createElement("li",{className:E},t.createElement("a",{className:v()(k,S&&"".concat(k,"-disabled")),"aria-disabled":S,onClick:function(){if(!S){var e=w(x);c(e)}}},"date"===r?g.today:g.now)),I=d&&t.createElement("li",{className:"".concat(m,"-ok")},t.createElement(y,{disabled:s,onClick:l},g.ok)),T=(j||I)&&t.createElement("ul",{className:"".concat(m,"-ranges")},j,I);return C||T?t.createElement("div",{className:"".concat(m,"-footer")},C&&t.createElement("div",{className:"".concat(m,"-footer-extra")},C),T):null}function mV(e,t,n){return function(r,o){var a=r.findIndex((function(r){return VW(e,t,r,o,n)}));if(-1===a)return[].concat(nt(r),[o]);var i=nt(r);return i.splice(a,1),i}}var gV=t.createContext(null);function vV(){return t.useContext(gV)}function bV(e,t){var n=e.prefixCls,r=e.generateConfig,o=e.locale,a=e.disabledDate,i=e.minDate,l=e.maxDate,c=e.cellRender,s=e.hoverValue,d=e.hoverRangeValue,u=e.onHover,f=e.values,p=e.pickerValue,h=e.onSelect,m=e.prevIcon,g=e.nextIcon,v=e.superPrevIcon,b=e.superNextIcon,y=r.getNow();return[{now:y,values:f,pickerValue:p,prefixCls:n,disabledDate:a,minDate:i,maxDate:l,cellRender:c,hoverValue:s,hoverRangeValue:d,onHover:u,locale:o,generateConfig:r,onSelect:h,panelType:t,prevIcon:m,nextIcon:g,superPrevIcon:v,superNextIcon:b},y]}var yV=t.createContext({});function xV(e){for(var n=e.rowNum,r=e.colNum,o=e.baseDate,a=e.getCellDate,i=e.prefixColumn,l=e.rowClassName,c=e.titleFormat,s=e.getCellText,d=e.getCellClassName,f=e.headerCells,p=e.cellSelection,m=void 0===p||p,g=e.disabledDate,b=vV(),y=b.prefixCls,x=b.panelType,w=b.now,C=b.disabledDate,S=b.cellRender,E=b.onHover,k=b.hoverValue,j=b.hoverRangeValue,I=b.generateConfig,T=b.values,A=b.locale,O=b.onSelect,N=g||C,R="".concat(y,"-cell"),P=t.useContext(yV).onCellDblClick,M=function(e){return T.some((function(t){return t&&VW(I,A,e,t,x)}))},D=[],L=0;L<n;L+=1){for(var _=[],z=void 0,B=function(){var e=a(o,L*r+F),n=null===N||void 0===N?void 0:N(e,{type:x});0===F&&(z=e,i&&_.push(i(z)));var l=!1,f=!1,p=!1;if(m&&j){var g=u(j,2),b=g[0],C=g[1];l=UW(I,b,C,e),f=VW(I,A,e,b,x),p=VW(I,A,e,C,x)}var T=c?GW(e,{locale:A,format:c,generateConfig:I}):void 0,D=t.createElement("div",{className:"".concat(R,"-inner")},s(e));_.push(t.createElement("td",{key:F,title:T,className:v()(R,oe(h(h(h(h(h(h({},"".concat(R,"-disabled"),n),"".concat(R,"-hover"),(k||[]).some((function(t){return VW(I,A,e,t,x)}))),"".concat(R,"-in-range"),l&&!f&&!p),"".concat(R,"-range-start"),f),"".concat(R,"-range-end"),p),"".concat(y,"-cell-selected"),!j&&"week"!==x&&M(e)),d(e))),onClick:function(){n||O(e)},onDoubleClick:function(){!n&&P&&P()},onMouseEnter:function(){n||null===E||void 0===E||E(e)},onMouseLeave:function(){n||null===E||void 0===E||E(null)}},S?S(e,{prefixCls:y,originNode:D,today:w,type:x,locale:A}):D))},F=0;F<r;F+=1)B();D.push(t.createElement("tr",{key:L,className:null===l||void 0===l?void 0:l(z)},_))}return t.createElement("div",{className:"".concat(y,"-body")},t.createElement("table",{className:"".concat(y,"-content")},f&&t.createElement("thead",null,t.createElement("tr",null,f)),t.createElement("tbody",null,D)))}var wV={visibility:"hidden"};const CV=function(e){var n=e.offset,r=e.superOffset,o=e.onChange,a=e.getStart,i=e.getEnd,l=e.children,c=vV(),s=c.prefixCls,d=c.prevIcon,u=void 0===d?"\u2039":d,f=c.nextIcon,p=void 0===f?"\u203a":f,h=c.superPrevIcon,m=void 0===h?"\xab":h,g=c.superNextIcon,b=void 0===g?"\xbb":g,y=c.minDate,x=c.maxDate,w=c.generateConfig,C=c.locale,S=c.pickerValue,E=c.panelType,k="".concat(s,"-header"),j=t.useContext(yV),I=j.hidePrev,T=j.hideNext,A=j.hideHeader,O=t.useMemo((function(){if(!y||!n||!i)return!1;var e=i(n(-1,S));return!KW(w,C,e,y,E)}),[y,n,S,i,w,C,E]),N=t.useMemo((function(){if(!y||!r||!i)return!1;var e=i(r(-1,S));return!KW(w,C,e,y,E)}),[y,r,S,i,w,C,E]),R=t.useMemo((function(){if(!x||!n||!a)return!1;var e=a(n(1,S));return!KW(w,C,x,e,E)}),[x,n,S,a,w,C,E]),P=t.useMemo((function(){if(!x||!r||!a)return!1;var e=a(r(1,S));return!KW(w,C,x,e,E)}),[x,r,S,a,w,C,E]),M=function(e){n&&o(n(e,S))},D=function(e){r&&o(r(e,S))};if(A)return null;var L="".concat(k,"-prev-btn"),_="".concat(k,"-next-btn"),z="".concat(k,"-super-prev-btn"),B="".concat(k,"-super-next-btn");return t.createElement("div",{className:k},r&&t.createElement("button",{type:"button",onClick:function(){return D(-1)},tabIndex:-1,className:v()(z,N&&"".concat(z,"-disabled")),disabled:N,style:I?wV:{}},m),n&&t.createElement("button",{type:"button",onClick:function(){return M(-1)},tabIndex:-1,className:v()(L,O&&"".concat(L,"-disabled")),disabled:O,style:I?wV:{}},u),t.createElement("div",{className:"".concat(k,"-view")},l),n&&t.createElement("button",{type:"button",onClick:function(){return M(1)},tabIndex:-1,className:v()(_,R&&"".concat(_,"-disabled")),disabled:R,style:T?wV:{}},p),r&&t.createElement("button",{type:"button",onClick:function(){return D(1)},tabIndex:-1,className:v()(B,P&&"".concat(B,"-disabled")),disabled:P,style:T?wV:{}},b))};function SV(e){var n=e.prefixCls,r=e.panelName,o=void 0===r?"date":r,i=e.locale,l=e.generateConfig,c=e.pickerValue,s=e.onPickerValueChange,d=e.onModeChange,f=e.mode,p=void 0===f?"date":f,m=e.disabledDate,g=e.onSelect,b=e.onHover,y=e.showWeek,x="".concat(n,"-").concat(o,"-panel"),w="".concat(n,"-cell"),C="week"===p,S=u(bV(e,p),2),E=S[0],k=S[1],j=l.locale.getWeekFirstDay(i.locale),I=l.setDate(c,1),T=function(e,t,n){var r=t.locale.getWeekFirstDay(e),o=t.setDate(n,1),a=t.getWeekDay(o),i=t.addDate(o,r-a);return t.getMonth(i)===t.getMonth(n)&&t.getDate(i)>1&&(i=t.addDate(i,-7)),i}(i.locale,l,I),A=l.getMonth(c),O=C||y?function(e){var n=null===m||void 0===m?void 0:m(e,{type:"week"});return t.createElement("td",{key:"week",className:v()(w,"".concat(w,"-week"),h({},"".concat(w,"-disabled"),n)),onClick:function(){n||g(e)},onMouseEnter:function(){n||null===b||void 0===b||b(e)},onMouseLeave:function(){n||null===b||void 0===b||b(null)}},t.createElement("div",{className:"".concat(w,"-inner")},l.locale.getWeek(i.locale,e)))}:null,N=[],R=i.shortWeekDays||(l.locale.getShortWeekDays?l.locale.getShortWeekDays(i.locale):[]);O&&N.push(t.createElement("th",{key:"empty","aria-label":"empty cell"}));for(var P=0;P<PW;P+=1)N.push(t.createElement("th",{key:P},R[(P+j)%PW]));var M=i.shortMonths||(l.locale.getShortMonths?l.locale.getShortMonths(i.locale):[]),D=t.createElement("button",{type:"button",key:"year",onClick:function(){d("year",c)},tabIndex:-1,className:"".concat(n,"-year-btn")},GW(c,{locale:i,format:i.yearFormat,generateConfig:l})),L=t.createElement("button",{type:"button",key:"month",onClick:function(){d("month",c)},tabIndex:-1,className:"".concat(n,"-month-btn")},i.monthFormat?GW(c,{locale:i,format:i.monthFormat,generateConfig:l}):M[A]),_=i.monthBeforeYear?[L,D]:[D,L];return t.createElement(gV.Provider,{value:E},t.createElement("div",{className:v()(x,y&&"".concat(x,"-show-week"))},t.createElement(CV,{offset:function(e){return l.addMonth(c,e)},superOffset:function(e){return l.addYear(c,e)},onChange:s,getStart:function(e){return l.setDate(e,1)},getEnd:function(e){var t=l.setDate(e,1);return t=l.addMonth(t,1),l.addDate(t,-1)}},_),t.createElement(xV,a({titleFormat:i.fieldDateFormat},e,{colNum:PW,rowNum:6,baseDate:T,headerCells:N,getCellDate:function(e,t){return l.addDate(e,t)},getCellText:function(e){return GW(e,{locale:i,format:i.cellDateFormat,generateConfig:l})},getCellClassName:function(e){return h(h({},"".concat(n,"-cell-in-view"),zW(l,e,c)),"".concat(n,"-cell-today"),BW(l,e,k))},prefixColumn:O,cellSelection:!C}))))}var EV=1/3;var kV=300;function jV(e){var n=e.units,r=e.value,o=e.optionalValue,a=e.type,i=e.onChange,l=e.onDblClick,c=e.changeOnScroll,s=vV(),d=s.prefixCls,f=s.cellRender,p=s.now,m=s.locale,g="".concat(d,"-time-panel"),b="".concat(d,"-time-panel-cell"),y=t.useRef(null),x=t.useRef(),w=function(){clearTimeout(x.current)},C=function(e,n){var r=t.useRef(!1),o=t.useRef(null),a=t.useRef(null),i=function(){Sa.cancel(o.current),r.current=!1},l=t.useRef();return[Mr((function(){var t=e.current;if(a.current=null,l.current=0,t){var c=t.querySelector('[data-value="'.concat(n,'"]')),s=t.querySelector("li");c&&s&&function e(){i(),r.current=!0,l.current+=1;var n=t.scrollTop,d=s.offsetTop,u=c.offsetTop,f=u-d;if(0===u&&c!==s||!da(t))l.current<=5&&(o.current=Sa(e));else{var p=n+(f-n)*EV,h=Math.abs(f-p);if(null!==a.current&&a.current<h)i();else{if(a.current=h,h<=1)return t.scrollTop=f,void i();t.scrollTop=p,o.current=Sa(e)}}}()}})),i,function(){return r.current}]}(y,null!==r&&void 0!==r?r:o),S=u(C,3),E=S[0],k=S[1],j=S[2];fn((function(){return E(),w(),function(){k(),w()}}),[r,o,n]);var I="".concat(g,"-column");return t.createElement("ul",{className:I,ref:y,"data-type":a,onScroll:function(e){w();var t=e.target;!j()&&c&&(x.current=setTimeout((function(){var e=y.current,r=e.querySelector("li").offsetTop,o=Array.from(e.querySelectorAll("li")).map((function(e){return e.offsetTop-r})).map((function(e,r){return n[r].disabled?Number.MAX_SAFE_INTEGER:Math.abs(e-t.scrollTop)})),a=Math.min.apply(Math,nt(o)),l=o.findIndex((function(e){return e===a})),c=n[l];c&&!c.disabled&&i(c.value)}),kV))}},n.map((function(e){var n=e.label,o=e.value,c=e.disabled,s=t.createElement("div",{className:"".concat(b,"-inner")},n);return t.createElement("li",{key:o,className:v()(b,h(h({},"".concat(b,"-selected"),r===o),"".concat(b,"-disabled"),c)),onClick:function(){c||i(o)},onDoubleClick:function(){!c&&l&&l()},"data-value":o},f?f(o,{prefixCls:d,originNode:s,today:p,type:"time",subType:a,locale:m}):s)})))}function IV(e){return e<12}function TV(e){var n=e.showHour,r=e.showMinute,o=e.showSecond,i=e.showMillisecond,l=e.use12Hours,c=e.changeOnScroll,s=vV(),d=s.prefixCls,f=s.values,p=s.generateConfig,h=s.locale,m=s.onSelect,g=s.pickerValue,v=(null===f||void 0===f?void 0:f[0])||null,b=t.useContext(yV).onCellDblClick,y=u(pV(p,e,v),5),x=y[0],w=y[1],C=y[2],S=y[3],E=y[4],k=function(e){return[v&&p[e](v),g&&p[e](g)]},j=u(k("getHour"),2),I=j[0],T=j[1],A=u(k("getMinute"),2),O=A[0],N=A[1],R=u(k("getSecond"),2),P=R[0],M=R[1],D=u(k("getMillisecond"),2),L=D[0],_=D[1],z=null===I?null:IV(I)?"am":"pm",B=t.useMemo((function(){return l?IV(I)?w.filter((function(e){return IV(e.value)})):w.filter((function(e){return!IV(e.value)})):w}),[I,w,l]),F=function(e,t){var n,r=e.filter((function(e){return!e.disabled}));return null!==t&&void 0!==t?t:null===r||void 0===r||null===(n=r[0])||void 0===n?void 0:n.value},H=F(w,I),W=t.useMemo((function(){return C(H)}),[C,H]),V=F(W,O),U=t.useMemo((function(){return S(H,V)}),[S,H,V]),K=F(U,P),G=t.useMemo((function(){return E(H,V,K)}),[E,H,V,K]),q=F(G,L),X=t.useMemo((function(){if(!l)return[];var e=p.getNow(),t=p.setHour(e,6),n=p.setHour(e,18),r=function(e,t){var n=h.cellMeridiemFormat;return n?GW(e,{generateConfig:p,locale:h,format:n}):t};return[{label:r(t,"AM"),value:"am",disabled:w.every((function(e){return e.disabled||!IV(e.value)}))},{label:r(n,"PM"),value:"pm",disabled:w.every((function(e){return e.disabled||IV(e.value)}))}]}),[w,l,p,h]),Y=function(e){var t=x(e);m(t)},$=t.useMemo((function(){var e=g||p.getNow(),t=function(e){return null!==e&&void 0!==e};return t(I)?(e=p.setHour(e,I),e=p.setMinute(e,O),e=p.setSecond(e,P),e=p.setMillisecond(e,L)):t(T)?(e=p.setHour(e,T),e=p.setMinute(e,N),e=p.setSecond(e,M),e=p.setMillisecond(e,_)):t(H)&&(e=p.setHour(e,H),e=p.setMinute(e,V),e=p.setSecond(e,K),e=p.setMillisecond(e,q)),e}),[g,I,O,P,L,H,V,K,q,T,N,M,_,p]),J={onDblClick:b,changeOnScroll:c};return t.createElement("div",{className:"".concat(d,"-content")},n&&t.createElement(jV,a({units:B,value:I,optionalValue:T,type:"hour",onChange:function(e){Y(p.setHour($,e))}},J)),r&&t.createElement(jV,a({units:W,value:O,optionalValue:N,type:"minute",onChange:function(e){Y(p.setMinute($,e))}},J)),o&&t.createElement(jV,a({units:U,value:P,optionalValue:M,type:"second",onChange:function(e){Y(p.setSecond($,e))}},J)),i&&t.createElement(jV,a({units:G,value:L,optionalValue:_,type:"millisecond",onChange:function(e){Y(p.setMillisecond($,e))}},J)),l&&t.createElement(jV,a({units:X,value:z,type:"meridiem",onChange:function(e){"am"!==e||IV(I)?"pm"===e&&IV(I)&&Y(p.setHour($,I+12)):Y(p.setHour($,I-12))}},J)))}function AV(e){var n=e.prefixCls,r=e.value,o=e.locale,a=e.generateConfig,i=e.showTime,l=(i||{}).format,c="".concat(n,"-time-panel"),s=u(bV(e,"time"),1)[0];return t.createElement(gV.Provider,{value:s},t.createElement("div",{className:v()(c)},t.createElement(CV,null,r?GW(r,{locale:o,format:l,generateConfig:a}):"\xa0"),t.createElement(TV,i)))}var OV={date:SV,datetime:function(e){var n=e.prefixCls,r=e.generateConfig,o=e.showTime,i=e.onSelect,l=e.value,c=e.pickerValue,s=e.onHover,d="".concat(n,"-datetime-panel"),f=u(pV(r,o),1)[0],p=function(e){return qW(r,e,l||c)};return t.createElement("div",{className:d},t.createElement(SV,a({},e,{onSelect:function(e){var t=p(e);i(f(t,t))},onHover:function(e){s(e?p(e):e)}})),t.createElement(AV,e))},week:function(e){var n=e.prefixCls,r=e.generateConfig,o=e.locale,i=e.value,l=e.hoverValue,c=e.hoverRangeValue,s=o.locale,d="".concat(n,"-week-panel-row");return t.createElement(SV,a({},e,{mode:"week",panelName:"week",rowClassName:function(e){var t={};if(c){var n=u(c,2),o=n[0],a=n[1],f=WW(r,s,o,e),p=WW(r,s,a,e);t["".concat(d,"-range-start")]=f,t["".concat(d,"-range-end")]=p,t["".concat(d,"-range-hover")]=!f&&!p&&UW(r,o,a,e)}return l&&(t["".concat(d,"-hover")]=l.some((function(t){return WW(r,s,e,t)}))),v()(d,h({},"".concat(d,"-selected"),!c&&WW(r,s,i,e)),t)}}))},month:function(e){var n=e.prefixCls,r=e.locale,o=e.generateConfig,i=e.pickerValue,l=e.disabledDate,c=e.onPickerValueChange,s=e.onModeChange,d="".concat(n,"-month-panel"),f=u(bV(e,"month"),1)[0],p=o.setMonth(i,0),m=r.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(r.locale):[]),g=l?function(e,t){var n=o.setDate(e,1),r=o.setMonth(n,o.getMonth(n)+1),a=o.addDate(r,-1);return l(n,t)&&l(a,t)}:null,v=t.createElement("button",{type:"button",key:"year",onClick:function(){s("year")},tabIndex:-1,className:"".concat(n,"-year-btn")},GW(i,{locale:r,format:r.yearFormat,generateConfig:o}));return t.createElement(gV.Provider,{value:f},t.createElement("div",{className:d},t.createElement(CV,{superOffset:function(e){return o.addYear(i,e)},onChange:c,getStart:function(e){return o.setMonth(e,0)},getEnd:function(e){return o.setMonth(e,11)}},v),t.createElement(xV,a({},e,{disabledDate:g,titleFormat:r.fieldMonthFormat,colNum:3,rowNum:4,baseDate:p,getCellDate:function(e,t){return o.addMonth(e,t)},getCellText:function(e){var t=o.getMonth(e);return r.monthFormat?GW(e,{locale:r,format:r.monthFormat,generateConfig:o}):m[t]},getCellClassName:function(){return h({},"".concat(n,"-cell-in-view"),!0)}}))))},quarter:function(e){var n=e.prefixCls,r=e.locale,o=e.generateConfig,i=e.pickerValue,l=e.onPickerValueChange,c=e.onModeChange,s="".concat(n,"-quarter-panel"),d=u(bV(e,"quarter"),1)[0],f=o.setMonth(i,0),p=t.createElement("button",{type:"button",key:"year",onClick:function(){c("year")},tabIndex:-1,className:"".concat(n,"-year-btn")},GW(i,{locale:r,format:r.yearFormat,generateConfig:o}));return t.createElement(gV.Provider,{value:d},t.createElement("div",{className:s},t.createElement(CV,{superOffset:function(e){return o.addYear(i,e)},onChange:l,getStart:function(e){return o.setMonth(e,0)},getEnd:function(e){return o.setMonth(e,11)}},p),t.createElement(xV,a({},e,{titleFormat:r.fieldQuarterFormat,colNum:4,rowNum:1,baseDate:f,getCellDate:function(e,t){return o.addMonth(e,3*t)},getCellText:function(e){return GW(e,{locale:r,format:r.cellQuarterFormat,generateConfig:o})},getCellClassName:function(){return h({},"".concat(n,"-cell-in-view"),!0)}}))))},year:function(e){var n=e.prefixCls,r=e.locale,o=e.generateConfig,i=e.pickerValue,l=e.disabledDate,c=e.onPickerValueChange,s=e.onModeChange,d="".concat(n,"-year-panel"),f=u(bV(e,"year"),1)[0],p=function(e){var t=10*Math.floor(o.getYear(i)/10);return o.setYear(e,t)},m=function(e){var t=p(e);return o.addYear(t,9)},g=p(i),v=m(i),b=o.addYear(g,-1),y=l?function(e,t){var n=o.setMonth(e,0),r=o.setDate(n,1),a=o.setMonth(e,o.getMonth(e)+1),i=o.addDate(a,-1);return l(r,t)&&l(i,t)}:null,x=t.createElement("button",{type:"button",key:"year",onClick:function(){s("decade")},tabIndex:-1,className:"".concat(n,"-decade-btn")},GW(g,{locale:r,format:r.yearFormat,generateConfig:o}),"-",GW(v,{locale:r,format:r.yearFormat,generateConfig:o}));return t.createElement(gV.Provider,{value:f},t.createElement("div",{className:d},t.createElement(CV,{superOffset:function(e){return o.addYear(i,10*e)},onChange:c,getStart:p,getEnd:m},x),t.createElement(xV,a({},e,{disabledDate:y,titleFormat:r.fieldYearFormat,colNum:3,rowNum:4,baseDate:b,getCellDate:function(e,t){return o.addYear(e,t)},getCellText:function(e){return GW(e,{locale:r,format:r.cellYearFormat,generateConfig:o})},getCellClassName:function(e){return h({},"".concat(n,"-cell-in-view"),LW(o,e,g)||LW(o,e,v)||UW(o,g,v,e))}}))))},decade:function(e){var n=e.prefixCls,r=e.locale,o=e.generateConfig,i=e.pickerValue,l=e.disabledDate,c=e.onPickerValueChange,s="".concat(n,"-decade-panel"),d=u(bV(e,"decade"),1)[0],f=function(e){var t=100*Math.floor(o.getYear(i)/100);return o.setYear(e,t)},p=function(e){var t=f(e);return o.addYear(t,99)},m=f(i),g=p(i),v=o.addYear(m,-10),b=l?function(e,t){var n=o.setDate(e,1),r=o.setMonth(n,0),a=o.setYear(r,10*Math.floor(o.getYear(r)/10)),i=o.addYear(a,10),c=o.addDate(i,-1);return l(a,t)&&l(c,t)}:null,y="".concat(GW(m,{locale:r,format:r.yearFormat,generateConfig:o}),"-").concat(GW(g,{locale:r,format:r.yearFormat,generateConfig:o}));return t.createElement(gV.Provider,{value:d},t.createElement("div",{className:s},t.createElement(CV,{superOffset:function(e){return o.addYear(i,100*e)},onChange:c,getStart:f,getEnd:p},y),t.createElement(xV,a({},e,{disabledDate:b,colNum:3,rowNum:4,baseDate:v,getCellDate:function(e,t){return o.addYear(e,10*t)},getCellText:function(e){var t=r.cellYearFormat,n=GW(e,{locale:r,format:t,generateConfig:o}),a=GW(o.addYear(e,9),{locale:r,format:t,generateConfig:o});return"".concat(n,"-").concat(a)},getCellClassName:function(e){return h({},"".concat(n,"-cell-in-view"),DW(o,e,m)||DW(o,e,g)||UW(o,m,g,e))}}))))},time:AV};function NV(e,n){var r,o=e.locale,i=e.generateConfig,l=e.direction,c=e.prefixCls,s=e.tabIndex,d=void 0===s?0:s,f=e.multiple,p=e.defaultValue,m=e.value,g=e.onChange,b=e.onSelect,y=e.defaultPickerValue,x=e.pickerValue,w=e.onPickerValueChange,C=e.mode,S=e.onPanelChange,E=e.picker,k=void 0===E?"date":E,j=e.showTime,I=e.hoverValue,T=e.hoverRangeValue,A=e.cellRender,O=e.dateRender,N=e.monthCellRender,R=e.components,P=void 0===R?{}:R,M=e.hideHeader,D=(null===(r=t.useContext(hW))||void 0===r?void 0:r.prefixCls)||c||"rc-picker",L=t.useRef();t.useImperativeHandle(n,(function(){return{nativeElement:L.current}}));var _=u(OW(e),4),z=_[0],B=_[1],F=_[2],H=_[3],W=jW(o,B),V="date"===k&&j?"datetime":k,U=t.useMemo((function(){return NW(V,F,H,z,W)}),[V,F,H,z,W]),K=i.getNow(),G=u(_r(k,{value:C,postState:function(e){return e||"date"}}),2),q=G[0],X=G[1],Y="date"===q&&U?"datetime":q,$=mV(i,o,V),J=u(_r(p,{value:m}),2),Q=J[0],Z=J[1],ee=t.useMemo((function(){var e=bW(Q).filter((function(e){return e}));return f?e:e.slice(0,1)}),[Q,f]),te=Mr((function(e){Z(e),g&&(null===e||ee.length!==e.length||ee.some((function(t,n){return!VW(i,o,t,e[n],V)})))&&(null===g||void 0===g||g(f?e:e[0]))})),ne=Mr((function(e){if(null===b||void 0===b||b(e),q===k){var t=f?$(ee,e):[e];te(t)}})),re=u(_r(y||ee[0]||K,{value:x}),2),ae=re[0],ie=re[1];t.useEffect((function(){ee[0]&&!x&&ie(ee[0])}),[ee[0]]);var le=function(e,t){null===S||void 0===S||S(e||x,t||q)},ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];ie(e),null===w||void 0===w||w(e),t&&le(e)},se=function(e,t){X(e),t&&ce(t),le(t,e)},de=t.useMemo((function(){var e,t;if(Array.isArray(T)){var n=u(T,2);e=n[0],t=n[1]}else e=T;return e||t?(e=e||t,t=t||e,i.isAfter(e,t)?[t,e]:[e,t]):null}),[T,i]),ue=SW(A,O,N),fe=P[Y]||OV[Y]||SV,pe=t.useContext(yV),he=t.useMemo((function(){return oe(oe({},pe),{},{hideHeader:M})}),[pe,M]);var me="".concat(D,"-panel"),ge=xW(e,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return t.createElement(yV.Provider,{value:he},t.createElement("div",{ref:L,tabIndex:d,className:v()(me,h({},"".concat(me,"-rtl"),"rtl"===l))},t.createElement(fe,a({},ge,{showTime:U,prefixCls:D,locale:W,generateConfig:i,onModeChange:se,pickerValue:ae,onPickerValueChange:function(e){ce(e,!0)},value:ee[0],onSelect:function(e){if(ne(e),ce(e),q!==k){var t=["decade","year"],n=[].concat(t,["month"]),r={quarter:[].concat(t,["quarter"]),week:[].concat(nt(n),["week"]),date:[].concat(nt(n),["date"])}[k]||n,o=r.indexOf(q),a=r[o+1];a&&se(a,e)}},values:ee,cellRender:ue,hoverRangeValue:de,hoverValue:I}))))}const RV=t.memo(t.forwardRef(NV));function PV(e){var n=e.picker,r=e.multiplePanel,o=e.pickerValue,i=e.onPickerValueChange,l=e.needConfirm,c=e.onSubmit,s=e.range,d=e.hoverValue,u=t.useContext(hW),f=u.prefixCls,p=u.generateConfig,h=t.useCallback((function(e,t){return tV(p,n,e,t)}),[p,n]),m=t.useMemo((function(){return h(o,1)}),[o,h]),g={onCellDblClick:function(){l&&c()}},v="time"===n,b=oe(oe({},e),{},{hoverValue:null,hoverRangeValue:null,hideHeader:v});return s?b.hoverRangeValue=d:b.hoverValue=d,r?t.createElement("div",{className:"".concat(f,"-panels")},t.createElement(yV.Provider,{value:oe(oe({},g),{},{hideNext:!0})},t.createElement(RV,b)),t.createElement(yV.Provider,{value:oe(oe({},g),{},{hidePrev:!0})},t.createElement(RV,a({},b,{pickerValue:m,onPickerValueChange:function(e){i(h(e,-1))}})))):t.createElement(yV.Provider,{value:oe({},g)},t.createElement(RV,b))}function MV(e){return"function"===typeof e?e():e}function DV(e){var n=e.prefixCls,r=e.presets,o=e.onClick,a=e.onHover;return r.length?t.createElement("div",{className:"".concat(n,"-presets")},t.createElement("ul",null,r.map((function(e,n){var r=e.label,i=e.value;return t.createElement("li",{key:n,onClick:function(){o(MV(i))},onMouseEnter:function(){a(MV(i))},onMouseLeave:function(){a(null)}},r)})))):null}function LV(e){var n=e.panelRender,r=e.internalMode,o=e.picker,i=e.showNow,l=e.range,c=e.multiple,s=e.activeOffset,d=void 0===s?0:s,f=e.presets,p=e.onPresetHover,m=e.onPresetSubmit,g=e.onFocus,b=e.onBlur,y=e.direction,x=e.value,w=e.onSelect,C=e.isInvalid,S=e.defaultOpenValue,E=e.onOk,k=e.onSubmit,j=t.useContext(hW).prefixCls,I="".concat(j,"-panel"),T="rtl"===y,A=t.useRef(null),O=t.useRef(null),N=u(t.useState(0),2),R=N[0],P=N[1],M=u(t.useState(0),2),D=M[0],L=M[1];function _(e){return e.filter((function(e){return e}))}t.useEffect((function(){if(l){var e,t=(null===(e=A.current)||void 0===e?void 0:e.offsetWidth)||0;L(d<=R-t?0:d+t-R)}}),[R,d,l]);var z=t.useMemo((function(){return _(bW(x))}),[x]),B="time"===o&&!z.length,F=t.useMemo((function(){return B?_([S]):z}),[B,z,S]),H=B?S:z,W=t.useMemo((function(){return!F.length||F.some((function(e){return C(e)}))}),[F,C]),V=t.createElement("div",{className:"".concat(j,"-panel-layout")},t.createElement(DV,{prefixCls:j,presets:f,onClick:m,onHover:p}),t.createElement("div",null,t.createElement(PV,a({},e,{value:H})),t.createElement(hV,a({},e,{showNow:!c&&i,invalid:W,onSubmit:function(){B&&w(S),E(),k()}}))));n&&(V=n(V));var U="".concat(I,"-container"),K="marginLeft",G="marginRight",q=t.createElement("div",{tabIndex:-1,className:v()(U,"".concat(j,"-").concat(r,"-panel-container")),style:h(h({},T?G:K,D),T?K:G,"auto"),onFocus:g,onBlur:b},V);return l&&(q=t.createElement("div",{ref:O,className:v()("".concat(j,"-range-wrapper"),"".concat(j,"-").concat(o,"-range-wrapper"))},t.createElement("div",{ref:A,className:"".concat(j,"-range-arrow"),style:h({},T?"right":"left",d)}),t.createElement(as,{onResize:function(e){e.offsetWidth&&P(e.offsetWidth)}},q))),q}function _V(e,n){var r=e.format,o=e.maskFormat,a=e.generateConfig,i=e.locale,l=e.preserveInvalidOnBlur,c=e.inputReadOnly,s=e.required,d=e["aria-required"],u=e.onSubmit,f=e.onFocus,p=e.onBlur,h=e.onInputChange,m=e.onInvalid,g=e.open,v=e.onOpenChange,b=e.onKeyDown,y=e.onChange,x=e.activeHelp,w=e.name,C=e.autoComplete,S=e.id,E=e.value,k=e.invalid,j=e.placeholder,I=e.disabled,T=e.activeIndex,A=e.allHelp,O=e.picker,N=function(e,t){var n=a.locale.parse(i.locale,e,[t]);return n&&a.isValidate(n)?n:null},R=r[0],P=t.useCallback((function(e){return GW(e,{locale:i,format:R,generateConfig:a})}),[i,a,R]),M=t.useMemo((function(){return E.map(P)}),[E,P]),D=t.useMemo((function(){var e="time"===O?8:10,t="function"===typeof R?R(a.getNow()).length:R.length;return Math.max(e,t)+2}),[R,O,a]),L=function(e){for(var t=0;t<r.length;t+=1){var n=r[t];if("string"===typeof n){var o=N(e,n);if(o)return o}}return!1};return[function(t){function r(e){return void 0!==t?e[t]:e}var a=oe(oe({},hx(e,{aria:!0,data:!0})),{},{format:o,validateFormat:function(e){return!!L(e)},preserveInvalidOnBlur:l,readOnly:c,required:s,"aria-required":d,name:w,autoComplete:C,size:D,id:r(S),value:r(M)||"",invalid:r(k),placeholder:r(j),active:T===t,helped:A||x&&T===t,disabled:r(I),onFocus:function(e){f(e,t)},onBlur:function(e){p(e,t)},onSubmit:u,onChange:function(e){h();var n=L(e);if(n)return m(!1,t),void y(n,t);m(!!e,t)},onHelp:function(){v(!0,{index:t})},onKeyDown:function(e){var n=!1;if(null===b||void 0===b||b(e,(function(){n=!0})),!e.defaultPrevented&&!n)switch(e.key){case"Escape":v(!1,{index:t});break;case"Enter":g||v(!0)}}},null===n||void 0===n?void 0:n({valueTexts:M}));return Object.keys(a).forEach((function(e){void 0===a[e]&&delete a[e]})),a},P]}var zV=["onMouseEnter","onMouseLeave"];function BV(e){return t.useMemo((function(){return xW(e,zV)}),[e])}var FV=["icon","type"],HV=["onClear"];function WV(e){var n=e.icon,r=e.type,o=m(e,FV),i=t.useContext(hW).prefixCls;return n?t.createElement("span",a({className:"".concat(i,"-").concat(r)},o),n):null}function VV(e){var n=e.onClear,r=m(e,HV);return t.createElement(WV,a({},r,{type:"clear",role:"button",onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),n()}}))}var UV=["YYYY","MM","DD","HH","mm","ss","SSS"],KV=function(){function e(t){At(this,e),h(this,"format",void 0),h(this,"maskFormat",void 0),h(this,"cells",void 0),h(this,"maskCells",void 0),this.format=t;var n=UV.map((function(e){return"(".concat(e,")")})).join("|"),r=new RegExp(n,"g");this.maskFormat=t.replace(r,(function(e){return"\u9867".repeat(e.length)}));var o=new RegExp("(".concat(UV.join("|"),")")),a=(t.split(o)||[]).filter((function(e){return e})),i=0;this.cells=a.map((function(e){var t=UV.includes(e),n=i,r=i+e.length;return i=r,{text:e,mask:t,start:n,end:r}})),this.maskCells=this.cells.filter((function(e){return e.mask}))}return Nt(e,[{key:"getSelection",value:function(e){var t=this.maskCells[e]||{};return[t.start||0,t.end||0]}},{key:"match",value:function(e){for(var t=0;t<this.maskFormat.length;t+=1){var n=this.maskFormat[t],r=e[t];if(!r||"\u9867"!==n&&n!==r)return!1}return!0}},{key:"size",value:function(){return this.maskCells.length}},{key:"getMaskCellIndex",value:function(e){for(var t=Number.MAX_SAFE_INTEGER,n=0,r=0;r<this.maskCells.length;r+=1){var o=this.maskCells[r],a=o.start,i=o.end;if(e>=a&&e<=i)return r;var l=Math.min(Math.abs(e-a),Math.abs(e-i));l<t&&(t=l,n=r)}return n}}]),e}();var GV=["active","showActiveCls","suffixIcon","format","validateFormat","onChange","onInput","helped","onHelp","onSubmit","onKeyDown","preserveInvalidOnBlur","invalid","clearIcon"],qV=t.forwardRef((function(e,n){var r=e.active,o=e.showActiveCls,i=void 0===o||o,l=e.suffixIcon,c=e.format,s=e.validateFormat,d=e.onChange,f=(e.onInput,e.helped),p=e.onHelp,g=e.onSubmit,b=e.onKeyDown,y=e.preserveInvalidOnBlur,x=void 0!==y&&y,w=e.invalid,C=e.clearIcon,S=m(e,GV),E=e.value,k=e.onFocus,j=e.onBlur,I=e.onMouseUp,T=t.useContext(hW),A=T.prefixCls,O=T.input,N=void 0===O?"input":O,R="".concat(A,"-input"),P=u(t.useState(!1),2),M=P[0],D=P[1],L=u(t.useState(E),2),_=L[0],z=L[1],B=u(t.useState(""),2),F=B[0],H=B[1],W=u(t.useState(null),2),V=W[0],U=W[1],K=u(t.useState(null),2),G=K[0],q=K[1],X=_||"";t.useEffect((function(){z(E)}),[E]);var Y=t.useRef(),$=t.useRef();t.useImperativeHandle(n,(function(){return{nativeElement:Y.current,inputElement:$.current,focus:function(){$.current.focus()},blur:function(){$.current.blur()}}}));var J=t.useMemo((function(){return new KV(c||"")}),[c]),Q=u(t.useMemo((function(){return f?[0,0]:J.getSelection(V)}),[J,V,f]),2),Z=Q[0],ee=Q[1],te=function(e){e&&e!==c&&e!==E&&p()},ne=Mr((function(e){s(e)&&d(e),z(e),te(e)})),re=t.useRef(!1),oe=function(e){j(e)};ZW(r,(function(){r||x||z(E)}));var ae=function(e){"Enter"===e.key&&s(X)&&g(),null===b||void 0===b||b(e)},ie=t.useRef();fn((function(){if(M&&c&&!re.current){if(J.match(X))return $.current.setSelectionRange(Z,ee),ie.current=Sa((function(){$.current.setSelectionRange(Z,ee)})),function(){Sa.cancel(ie.current)};ne(c)}}),[J,c,M,X,V,Z,ee,G,ne]);var le=c?{onFocus:function(e){D(!0),U(0),H(""),k(e)},onBlur:function(e){D(!1),oe(e)},onKeyDown:function(e){ae(e);var t=e.key,n=null,r=null,o=ee-Z,a=c.slice(Z,ee),i=function(e){U((function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,J.size()-1)}))},l=function(e){var t=function(e){return{YYYY:[0,9999,(new Date).getFullYear()],MM:[1,12],DD:[1,31],HH:[0,23],mm:[0,59],ss:[0,59],SSS:[0,999]}[e]}(a),n=u(t,3),r=n[0],o=n[1],i=n[2],l=X.slice(Z,ee),c=Number(l);if(isNaN(c))return String(i||(e>0?r:o));var s=o-r+1;return String(r+(s+(c+e)-r)%s)};switch(t){case"Backspace":case"Delete":n="",r=a;break;case"ArrowLeft":n="",i(-1);break;case"ArrowRight":n="",i(1);break;case"ArrowUp":n="",r=l(1);break;case"ArrowDown":n="",r=l(-1);break;default:isNaN(Number(t))||(r=n=F+t)}if(null!==n&&(H(n),n.length>=o&&(i(1),H(""))),null!==r){var s=X.slice(0,Z)+vW(r,o)+X.slice(ee);ne(s.slice(0,c.length))}q({})},onMouseDown:function(){re.current=!0},onMouseUp:function(e){var t=e.target.selectionStart,n=J.getMaskCellIndex(t);U(n),q({}),null===I||void 0===I||I(e),re.current=!1},onPaste:function(e){var t=e.clipboardData.getData("text");s(t)&&ne(t)}}:{};return t.createElement("div",{ref:Y,className:v()(R,h(h({},"".concat(R,"-active"),r&&i),"".concat(R,"-placeholder"),f))},t.createElement(N,a({ref:$,"aria-invalid":w,autoComplete:"off"},S,{onKeyDown:ae,onBlur:oe},le,{value:X,onChange:function(e){if(!c){var t=e.target.value;te(t),z(t),d(t)}}})),t.createElement(WV,{type:"suffix",icon:l}),C)}));const XV=qV;var YV=["id","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveOffset","onMouseDown","required","aria-required","autoFocus"];function $V(e,n){var r=e.id,o=e.clearIcon,i=e.suffixIcon,l=e.separator,c=void 0===l?"~":l,s=e.activeIndex,d=(e.activeHelp,e.allHelp,e.focused),f=(e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig,e.placeholder),p=e.className,g=e.style,b=e.onClick,y=e.onClear,x=e.value,w=(e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid,e.disabled),C=e.invalid,S=(e.inputReadOnly,e.direction),E=(e.onOpenChange,e.onActiveOffset),k=e.onMouseDown,j=(e.required,e["aria-required"],e.autoFocus),I=m(e,YV),T="rtl"===S,A=t.useContext(hW).prefixCls,O=t.useMemo((function(){if("string"===typeof r)return[r];var e=r||{};return[e.start,e.end]}),[r]),N=t.useRef(),R=t.useRef(),P=t.useRef(),M=function(e){var t;return null===(t=[R,P][e])||void 0===t?void 0:t.current};t.useImperativeHandle(n,(function(){return{nativeElement:N.current,focus:function(){var e;null===(e=M(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0))||void 0===e||e.focus()},blur:function(){var e,t;null===(e=M(0))||void 0===e||e.blur(),null===(t=M(1))||void 0===t||t.blur()}}}));var D=BV(I),L=t.useMemo((function(){return Array.isArray(f)?f:[f,f]}),[f]),_=u(_V(oe(oe({},e),{},{id:O,placeholder:L})),1)[0],z=T?"right":"left",B=u(t.useState(h({position:"absolute",width:0},z,0)),2),F=B[0],H=B[1],W=Mr((function(){var e=M(s);if(e){var t=e.nativeElement,n=t.offsetWidth,r=t.offsetLeft,o=t.offsetParent,a=r;if(T){var i=o,l=getComputedStyle(i);a=i.offsetWidth-parseFloat(l.borderRightWidth)-parseFloat(l.borderLeftWidth)-r-n}H((function(e){return oe(oe({},e),{},h({width:n},z,a))})),E(0===s?0:a)}}));t.useEffect((function(){W()}),[s]);var V=o&&(x[0]&&!w[0]||x[1]&&!w[1]),U=j&&!w[0],K=j&&!U&&!w[1];return t.createElement(as,{onResize:W},t.createElement("div",a({},D,{className:v()(A,"".concat(A,"-range"),h(h(h(h({},"".concat(A,"-focused"),d),"".concat(A,"-disabled"),w.every((function(e){return e}))),"".concat(A,"-invalid"),C.some((function(e){return e}))),"".concat(A,"-rtl"),T),p),style:g,ref:N,onClick:b,onMouseDown:function(e){var t=e.target;t!==R.current.inputElement&&t!==P.current.inputElement&&e.preventDefault(),null===k||void 0===k||k(e)}}),t.createElement(XV,a({ref:R},_(0),{autoFocus:U,"date-range":"start"})),t.createElement("div",{className:"".concat(A,"-range-separator")},c),t.createElement(XV,a({ref:P},_(1),{autoFocus:K,"date-range":"end"})),t.createElement("div",{className:"".concat(A,"-active-bar"),style:F}),t.createElement(WV,{type:"suffix",icon:i}),V&&t.createElement(VV,{icon:o,onClear:y})))}const JV=t.forwardRef($V);function QV(e,t){var n=null!==e&&void 0!==e?e:t;return Array.isArray(n)?n:[n,n]}function ZV(e){return 1===e?"end":"start"}function eU(e,n){var r=YW(e,(function(){var t=e.disabled,n=e.allowEmpty;return{disabled:QV(t,!1),allowEmpty:QV(n,!1)}})),o=u(r,6),i=o[0],l=o[1],c=o[2],s=o[3],d=o[4],f=o[5],p=i.prefixCls,h=i.styles,m=i.classNames,g=i.defaultValue,v=i.value,b=i.needConfirm,y=i.onKeyDown,x=i.disabled,w=i.allowEmpty,C=i.disabledDate,S=i.minDate,E=i.maxDate,k=i.defaultOpen,j=i.open,I=i.onOpenChange,T=i.locale,A=i.generateConfig,O=i.picker,N=i.showNow,R=i.showToday,P=i.showTime,M=i.mode,D=i.onPanelChange,L=i.onCalendarChange,_=i.onOk,z=i.defaultPickerValue,B=i.pickerValue,F=i.onPickerValueChange,H=i.inputReadOnly,W=i.suffixIcon,V=i.onFocus,U=i.onBlur,K=i.presets,G=i.ranges,q=i.components,X=i.cellRender,Y=i.dateRender,$=i.monthCellRender,J=i.onClick,Q=JW(n),Z=u($W(j,k,x,I),2),ee=Z[0],te=Z[1],ne=function(e,t){!x.some((function(e){return!e}))&&e||te(e,t)},re=u(cV(A,T,s,!0,!1,g,v,L,_),5),ae=re[0],ie=re[1],le=re[2],ce=re[3],se=re[4],de=le(),ue=u(eV(x,w),7),fe=ue[0],pe=ue[1],he=ue[2],me=ue[3],ge=ue[4],ve=ue[5],be=ue[6],ye=function(e,t){pe(!0),null===V||void 0===V||V(e,{range:ZV(null!==t&&void 0!==t?t:me)})},xe=function(e,t){pe(!1),null===U||void 0===U||U(e,{range:ZV(null!==t&&void 0!==t?t:me)})},we=t.useMemo((function(){if(!P)return null;var e=P.disabledTime,t=e?function(t){var n=ZV(me);return e(t,n)}:void 0;return oe(oe({},P),{},{disabledTime:t})}),[P,me]),Ce=u(_r([O,O],{value:M}),2),Se=Ce[0],Ee=Ce[1],ke=Se[me]||O,je="date"===ke&&we?"datetime":ke,Ie=je===O&&"time"!==je,Te=dV(O,ke,N,R,!0),Ae=u(sV(i,ae,ie,le,ce,x,s,fe,ee,f),2),Oe=Ae[0],Ne=Ae[1],Re=function(e,t,n,r,o,a){var i=n[n.length-1],l=n.find((function(t){return e[t]}));return function(n,c){var s=u(e,2),d=s[0],f=s[1],p=oe(oe({},c),{},{from:i!==l?e[l]:void 0});return!(1!==i||!t[0]||!d||VW(r,o,d,n,p.type)||!r.isAfter(d,n))||!(0!==i||!t[1]||!f||VW(r,o,f,n,p.type)||!r.isAfter(n,f))||(null===a||void 0===a?void 0:a(n,p))}}(de,x,be,A,T,C),Pe=u(EW(de,f,w),2),Me=Pe[0],De=Pe[1],Le=u(rV(A,T,de,Se,ee,me,l,Ie,z,B,null===we||void 0===we?void 0:we.defaultOpenValue,F,S,E),2),_e=Le[0],ze=Le[1],Be=Mr((function(e,t,n){var r=yW(Se,me,t);if(r[0]===Se[0]&&r[1]===Se[1]||Ee(r),D&&!1!==n){var o=nt(de);e&&(o[me]=e),D(o,r)}})),Fe=function(e,t){return yW(de,t,e)},He=function(e,t){var n=de;e&&(n=Fe(e,me));var r=ve(n);ce(n),Oe(me,null===r),null===r?ne(!1,{force:!0}):t||Q.current.focus(r)},We=u(t.useState(null),2),Ve=We[0],Ue=We[1],Ke=u(t.useState(null),2),Ge=Ke[0],qe=Ke[1],Xe=t.useMemo((function(){return Ge||de}),[de,Ge]);t.useEffect((function(){ee||qe(null)}),[ee]);var Ye=u(t.useState(0),2),$e=Ye[0],Je=Ye[1],Qe=QW(K,G),Ze=SW(X,Y,$,ZV(me)),et=de[me]||null,tt=Mr((function(e){return f(e,{activeIndex:me})})),ot=t.useMemo((function(){var e=hx(i,!1);return rt(i,[].concat(nt(Object.keys(e)),["onChange","onCalendarChange","style","className","onPanelChange"]))}),[i]),at=t.createElement(LV,a({},ot,{showNow:Te,showTime:we,range:!0,multiplePanel:Ie,activeOffset:$e,disabledDate:Re,onFocus:function(e){ne(!0),ye(e)},onBlur:xe,picker:O,mode:ke,internalMode:je,onPanelChange:Be,format:d,value:et,isInvalid:tt,onChange:null,onSelect:function(e){he("panel");var t=yW(de,me,e);ce(t),b||c||l!==je||He(e)},pickerValue:_e,defaultOpenValue:bW(null===P||void 0===P?void 0:P.defaultOpenValue)[me],onPickerValueChange:ze,hoverValue:Xe,onHover:function(e){qe(e?Fe(e,me):null),Ue("cell")},needConfirm:b,onSubmit:He,onOk:se,presets:Qe,onPresetHover:function(e){qe(e),Ue("preset")},onPresetSubmit:function(e){Ne(e)&&ne(!1,{force:!0})},onNow:function(e){He(e)},cellRender:Ze})),it=t.useMemo((function(){return{prefixCls:p,locale:T,generateConfig:A,button:q.button,input:q.input}}),[p,T,A,q.button,q.input]);return fn((function(){ee&&void 0!==me&&Be(null,O,!1)}),[ee,me,O]),fn((function(){var e=he();ee||"input"!==e||(ne(!1),He(null,!0)),ee||!c||b||"panel"!==e||(ne(!0),He())}),[ee]),t.createElement(hW.Provider,{value:it},t.createElement(gW,a({},CW(i),{popupElement:at,popupStyle:h.popup,popupClassName:m.popup,visible:ee,onClose:function(){ne(!1)},range:!0}),t.createElement(JV,a({},i,{ref:Q,suffixIcon:W,activeIndex:fe||ee?me:null,activeHelp:!!Ge,allHelp:!!Ge&&"preset"===Ve,focused:fe,onFocus:function(e,t){he("input"),ne(!0,{inherit:!0}),ge(t),ye(e,t)},onBlur:function(e,t){ne(!1),xe(e,t)},onKeyDown:function(e,t){"Tab"===e.key&&He(null,!0),null===y||void 0===y||y(e,t)},onSubmit:He,value:Xe,maskFormat:d,onChange:function(e,t){var n=Fe(e,t);ce(n)},onInputChange:function(){he("input")},format:s,inputReadOnly:H,disabled:x,open:ee,onOpenChange:ne,onClick:function(e){if(!Q.current.nativeElement.contains(document.activeElement)){var t=x.findIndex((function(e){return!e}));t>=0&&Q.current.focus(t)}ne(!0),null===J||void 0===J||J(e)},onClear:function(){Ne(null),ne(!1,{force:!0})},invalid:Me,onInvalid:De,onActiveOffset:Je}))))}const tU=t.forwardRef(eU);function nU(e){var n=e.prefixCls,r=e.value,o=e.onRemove,a=e.removeIcon,i=void 0===a?"\xd7":a,l=e.formatDate,c=e.disabled,s=e.maxTagCount,d="".concat(n,"-selector"),u="".concat(n,"-selection"),f="".concat(u,"-overflow");function p(e,n){return t.createElement("span",{className:v()("".concat(u,"-item")),title:"string"===typeof e?e:null},t.createElement("span",{className:"".concat(u,"-item-content")},e),!c&&n&&t.createElement("span",{onMouseDown:function(e){e.preventDefault()},onClick:n,className:"".concat(u,"-item-remove")},i))}return t.createElement("div",{className:d},t.createElement(ef,{prefixCls:f,data:r,renderItem:function(e){return p(l(e),(function(t){t&&t.stopPropagation(),o(e)}))},renderRest:function(e){return p("+ ".concat(e.length," ..."))},itemKey:function(e){return l(e)},maxCount:s}))}var rU=["id","open","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","removeIcon"];function oU(e,n){e.id;var r=e.open,o=e.clearIcon,i=e.suffixIcon,l=(e.activeHelp,e.allHelp,e.focused),c=(e.onFocus,e.onBlur,e.onKeyDown,e.locale),s=e.generateConfig,d=(e.placeholder,e.className),f=e.style,p=e.onClick,g=e.onClear,b=e.internalPicker,y=e.value,x=e.onChange,w=e.onSubmit,C=(e.onInputChange,e.multiple),S=e.maxTagCount,E=(e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid,e.disabled),k=e.invalid,j=(e.inputReadOnly,e.direction),I=(e.onOpenChange,e.onMouseDown),T=(e.required,e["aria-required"],e.autoFocus),A=e.removeIcon,O=m(e,rU),N="rtl"===j,R=t.useContext(hW).prefixCls,P=t.useRef(),M=t.useRef();t.useImperativeHandle(n,(function(){return{nativeElement:P.current,focus:function(){var e;null===(e=M.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=M.current)||void 0===e||e.blur()}}}));var D=BV(O),L=_V(oe(oe({},e),{},{onChange:function(e){x([e])}}),(function(e){return{value:e.valueTexts[0]||"",active:l}})),_=u(L,2),z=_[0],B=_[1],F=!(!o||!y.length||E),H=C?t.createElement(t.Fragment,null,t.createElement(nU,{prefixCls:R,value:y,onRemove:function(e){var t=y.filter((function(t){return t&&!VW(s,c,t,e,b)}));x(t),r||w()},formatDate:B,maxTagCount:S,disabled:E,removeIcon:A}),t.createElement("input",{className:"".concat(R,"-multiple-input"),value:y.map(B).join(","),ref:M,readOnly:!0,autoFocus:T}),t.createElement(WV,{type:"suffix",icon:i}),F&&t.createElement(VV,{icon:o,onClear:g})):t.createElement(XV,a({ref:M},z(),{autoFocus:T,suffixIcon:i,clearIcon:F&&t.createElement(VV,{icon:o,onClear:g}),showActiveCls:!1}));return t.createElement("div",a({},D,{className:v()(R,h(h(h(h(h({},"".concat(R,"-multiple"),C),"".concat(R,"-focused"),l),"".concat(R,"-disabled"),E),"".concat(R,"-invalid"),k),"".concat(R,"-rtl"),N),d),style:f,ref:P,onClick:p,onMouseDown:function(e){var t;e.target!==(null===(t=M.current)||void 0===t?void 0:t.inputElement)&&e.preventDefault(),null===I||void 0===I||I(e)}}),H)}const aU=t.forwardRef(oU);function iU(e,n){var r=u(YW(e),6),o=r[0],i=r[1],l=r[2],c=r[3],s=r[4],d=r[5],f=o,p=f.prefixCls,h=f.styles,m=f.classNames,g=f.order,v=f.defaultValue,b=f.value,y=f.needConfirm,x=f.onChange,w=f.onKeyDown,C=f.disabled,S=f.disabledDate,E=f.minDate,k=f.maxDate,j=f.defaultOpen,I=f.open,T=f.onOpenChange,A=f.locale,O=f.generateConfig,N=f.picker,R=f.showNow,P=f.showToday,M=f.showTime,D=f.mode,L=f.onPanelChange,_=f.onCalendarChange,z=f.onOk,B=f.multiple,F=f.defaultPickerValue,H=f.pickerValue,W=f.onPickerValueChange,V=f.inputReadOnly,U=f.suffixIcon,K=f.removeIcon,G=f.onFocus,q=f.onBlur,X=f.presets,Y=f.components,$=f.cellRender,J=f.dateRender,Q=f.monthCellRender,Z=f.onClick,ee=JW(n);function te(e){return null===e?null:B?e:e[0]}var ne=mV(O,A,i),re=u($W(I,j,[C],T),2),ae=re[0],ie=re[1],le=u(cV(O,A,c,!1,g,v,b,(function(e,t,n){if(_){var r=oe({},n);delete r.range,_(te(e),te(t),r)}}),(function(e){null===z||void 0===z||z(te(e))})),5),ce=le[0],se=le[1],de=le[2],ue=le[3],fe=le[4],pe=de(),he=u(eV([C]),4),me=he[0],ge=he[1],ve=he[2],be=he[3],ye=function(e){ge(!0),null===G||void 0===G||G(e,{})},xe=function(e){ge(!1),null===q||void 0===q||q(e,{})},we=u(_r(N,{value:D}),2),Ce=we[0],Se=we[1],Ee="date"===Ce&&M?"datetime":Ce,ke=dV(N,Ce,R,P),je=x&&function(e,t){x(te(e),te(t))},Ie=u(sV(oe(oe({},o),{},{onChange:je}),ce,se,de,ue,[],c,me,ae,d),2)[1],Te=u(EW(pe,d),2),Ae=Te[0],Oe=Te[1],Ne=t.useMemo((function(){return Ae.some((function(e){return e}))}),[Ae]),Re=u(rV(O,A,pe,[Ce],ae,be,i,!1,F,H,bW(null===M||void 0===M?void 0:M.defaultOpenValue),(function(e,t){if(W){var n=oe(oe({},t),{},{mode:t.mode[0]});delete n.range,W(e[0],n)}}),E,k),2),Pe=Re[0],Me=Re[1],De=Mr((function(e,t,n){if(Se(t),L&&!1!==n){var r=e||pe[pe.length-1];L(r,t)}})),Le=function(){Ie(de()),ie(!1,{force:!0})},_e=u(t.useState(null),2),ze=_e[0],Be=_e[1],Fe=u(t.useState(null),2),He=Fe[0],We=Fe[1],Ve=t.useMemo((function(){var e=[He].concat(nt(pe)).filter((function(e){return e}));return B?e:e.slice(0,1)}),[pe,He,B]),Ue=t.useMemo((function(){return!B&&He?[He]:pe.filter((function(e){return e}))}),[pe,He,B]);t.useEffect((function(){ae||We(null)}),[ae]);var Ke=QW(X),Ge=function(e){var t=B?ne(de(),e):[e];Ie(t)&&!B&&ie(!1,{force:!0})},qe=SW($,J,Q),Xe=t.useMemo((function(){var e=hx(o,!1);return oe(oe({},rt(o,[].concat(nt(Object.keys(e)),["onChange","onCalendarChange","style","className","onPanelChange"]))),{},{multiple:o.multiple})}),[o]),Ye=t.createElement(LV,a({},Xe,{showNow:ke,showTime:M,disabledDate:S,onFocus:function(e){ie(!0),ye(e)},onBlur:xe,picker:N,mode:Ce,internalMode:Ee,onPanelChange:De,format:s,value:pe,isInvalid:d,onChange:null,onSelect:function(e){ve("panel");var t=B?ne(de(),e):[e];ue(t),y||l||i!==Ee||Le()},pickerValue:Pe,defaultOpenValue:null===M||void 0===M?void 0:M.defaultOpenValue,onPickerValueChange:Me,hoverValue:Ve,onHover:function(e){We(e),Be("cell")},needConfirm:y,onSubmit:Le,onOk:fe,presets:Ke,onPresetHover:function(e){We(e),Be("preset")},onPresetSubmit:Ge,onNow:function(e){Ge(e)},cellRender:qe})),$e=t.useMemo((function(){return{prefixCls:p,locale:A,generateConfig:O,button:Y.button,input:Y.input}}),[p,A,O,Y.button,Y.input]);return fn((function(){ae&&void 0!==be&&De(null,N,!1)}),[ae,be,N]),fn((function(){var e=ve();ae||"input"!==e||(ie(!1),Le()),ae||!l||y||"panel"!==e||(ie(!0),Le())}),[ae]),t.createElement(hW.Provider,{value:$e},t.createElement(gW,a({},CW(o),{popupElement:Ye,popupStyle:h.popup,popupClassName:m.popup,visible:ae,onClose:function(){ie(!1)}}),t.createElement(aU,a({},o,{ref:ee,suffixIcon:U,removeIcon:K,activeHelp:!!He,allHelp:!!He&&"preset"===ze,focused:me,onFocus:function(e){ve("input"),ie(!0,{inherit:!0}),ye(e)},onBlur:function(e){ie(!1),xe(e)},onKeyDown:function(e,t){"Tab"===e.key&&Le(),null===w||void 0===w||w(e,t)},onSubmit:Le,value:Ue,maskFormat:s,onChange:function(e){ue(e)},onInputChange:function(){ve("input")},internalPicker:i,format:c,inputReadOnly:V,disabled:C,open:ae,onOpenChange:ie,onClick:function(e){C||ee.current.nativeElement.contains(document.activeElement)||ee.current.focus(),ie(!0),null===Z||void 0===Z||Z(e)},onClear:function(){Ie(null),ie(!1,{force:!0})},invalid:Ne,onInvalid:function(e){Oe(e,0)}}))))}const lU=t.forwardRef(iU),cU=(e,t)=>{const{componentCls:n,selectHeight:r,fontHeight:o,lineWidth:a,calc:i}=e,l=t?"".concat(n,"-").concat(t):"",c=e.calc(o).add(2).equal(),s=()=>i(r).sub(c).sub(i(a).mul(2)),d=e.max(s().div(2).equal(),0),u=e.max(s().sub(d).equal(),0);return[uO(e,t),{["".concat(n,"-multiple").concat(l)]:{paddingTop:d,paddingBottom:u,paddingInlineStart:d}}]},sU=e=>{const{componentCls:t,calc:n,lineWidth:r}=e,o=Ho(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),a=Ho(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[cU(o,"small"),cU(e),cU(a,"large"),uO(e),{["".concat(t).concat(t,"-multiple")]:{width:"100%",["".concat(t,"-selector")]:{flex:"auto",padding:0,"&:after":{margin:0}},["".concat(t,"-selection-item")]:{marginBlock:0},["".concat(t,"-multiple-input")]:{width:0,height:0,border:0,visibility:"hidden",position:"absolute",zIndex:-1}}}]},dU=e=>{const{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:o,motionDurationMid:a,cellHoverBg:i,lineWidth:l,lineType:c,colorPrimary:s,cellActiveWithRangeBg:d,colorTextLightSolid:u,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:h}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:"translateY(-50%)",content:'""'},[n]:{position:"relative",zIndex:2,display:"inline-block",minWidth:r,height:r,lineHeight:rn(r),borderRadius:o,transition:"background ".concat(a)},["&:hover:not(".concat(t,"-in-view),\n    &:hover:not(").concat(t,"-selected):not(").concat(t,"-range-start):not(").concat(t,"-range-end)")]:{[n]:{background:i}},["&-in-view".concat(t,"-today ").concat(n)]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:"".concat(rn(l)," ").concat(c," ").concat(s),borderRadius:o,content:'""'}},["&-in-view".concat(t,"-in-range,\n      &-in-view").concat(t,"-range-start,\n      &-in-view").concat(t,"-range-end")]:{position:"relative",["&:not(".concat(t,"-disabled):before")]:{background:d}},["&-in-view".concat(t,"-selected,\n      &-in-view").concat(t,"-range-start,\n      &-in-view").concat(t,"-range-end")]:{["&:not(".concat(t,"-disabled) ").concat(n)]:{color:u,background:s},["&".concat(t,"-disabled ").concat(n)]:{background:h}},["&-in-view".concat(t,"-range-start:not(").concat(t,"-disabled):before")]:{insetInlineStart:"50%"},["&-in-view".concat(t,"-range-end:not(").concat(t,"-disabled):before")]:{insetInlineEnd:"50%"},["&-in-view".concat(t,"-range-start:not(").concat(t,"-range-end) ").concat(n)]:{borderStartStartRadius:o,borderEndStartRadius:o,borderStartEndRadius:0,borderEndEndRadius:0},["&-in-view".concat(t,"-range-end:not(").concat(t,"-range-start) ").concat(n)]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o},"&-disabled":{color:f,pointerEvents:"none",[n]:{background:"transparent"},"&::before":{background:p}},["&-disabled".concat(t,"-today ").concat(n,"::before")]:{borderColor:f}}},uU=e=>{const{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:o,pickerControlIconSize:a,cellWidth:i,paddingSM:l,paddingXS:c,paddingXXS:s,colorBgContainer:d,lineWidth:u,lineType:f,borderRadiusLG:p,colorPrimary:h,colorTextHeading:m,colorSplit:g,pickerControlIconBorderWidth:v,colorIcon:b,textHeight:y,motionDurationMid:x,colorIconHover:w,fontWeightStrong:C,cellHeight:S,pickerCellPaddingVertical:E,colorTextDisabled:k,colorText:j,fontSize:I,motionDurationSlow:T,withoutTimeCellHeight:A,pickerQuarterPanelContentHeight:O,borderRadiusSM:N,colorTextLightSolid:R,cellHoverBg:P,timeColumnHeight:M,timeColumnWidth:D,timeCellHeight:L,controlItemBgActive:_,marginXXS:z,pickerDatePanelPaddingHorizontal:B,pickerControlIconMargin:F}=e,H=e.calc(i).mul(7).add(e.calc(B).mul(2)).equal();return{[t]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:d,borderRadius:p,outline:"none","&-focused":{borderColor:h},"&-rtl":{direction:"rtl",["".concat(t,"-prev-icon,\n              ").concat(t,"-super-prev-icon")]:{transform:"rotate(45deg)"},["".concat(t,"-next-icon,\n              ").concat(t,"-super-next-icon")]:{transform:"rotate(-135deg)"}}},"&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel,\n        &-week-panel,\n        &-date-panel,\n        &-time-panel":{display:"flex",flexDirection:"column",width:H},"&-header":{display:"flex",padding:"0 ".concat(rn(c)),color:m,borderBottom:"".concat(rn(u)," ").concat(f," ").concat(g),"> *":{flex:"none"},button:{padding:0,color:b,lineHeight:rn(y),background:"transparent",border:0,cursor:"pointer",transition:"color ".concat(x),fontSize:"inherit"},"> button":{minWidth:"1.6em",fontSize:I,"&:hover":{color:w},"&:disabled":{opacity:.25,pointerEvents:"none"}},"&-view":{flex:"auto",fontWeight:C,lineHeight:rn(y),button:{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:h}}}},"&-prev-icon,\n        &-next-icon,\n        &-super-prev-icon,\n        &-super-next-icon":{position:"relative",display:"inline-block",width:a,height:a,"&::before":{position:"absolute",top:0,insetInlineStart:0,display:"inline-block",width:a,height:a,border:"0 solid currentcolor",borderBlockStartWidth:v,borderBlockEndWidth:0,borderInlineStartWidth:v,borderInlineEndWidth:0,content:'""'}},"&-super-prev-icon,\n        &-super-next-icon":{"&::after":{position:"absolute",top:F,insetInlineStart:F,display:"inline-block",width:a,height:a,border:"0 solid currentcolor",borderBlockStartWidth:v,borderBlockEndWidth:0,borderInlineStartWidth:v,borderInlineEndWidth:0,content:'""'}},"&-prev-icon,\n        &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon,\n        &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:S,fontWeight:"normal"},th:{height:e.calc(S).add(e.calc(E).mul(2)).equal(),color:j,verticalAlign:"middle"}},"&-cell":Object.assign({padding:"".concat(rn(E)," 0"),color:k,cursor:"pointer","&-in-view":{color:j}},dU(e)),"&-decade-panel,\n        &-year-panel,\n        &-quarter-panel,\n        &-month-panel":{["".concat(t,"-content")]:{height:e.calc(A).mul(4).equal()},[r]:{padding:"0 ".concat(rn(c))}},"&-quarter-panel":{["".concat(t,"-content")]:{height:O}},"&-decade-panel":{[r]:{padding:"0 ".concat(rn(e.calc(c).div(2).equal()))},["".concat(t,"-cell::before")]:{display:"none"}},"&-year-panel,\n        &-quarter-panel,\n        &-month-panel":{["".concat(t,"-body")]:{padding:"0 ".concat(rn(c))},[r]:{width:o}},"&-date-panel":{["".concat(t,"-body")]:{padding:"".concat(rn(c)," ").concat(rn(B))},["".concat(t,"-content th")]:{boxSizing:"border-box",padding:0}},"&-week-panel":{["".concat(t,"-cell")]:{["&:hover ".concat(r,",\n            &-selected ").concat(r,",\n            ").concat(r)]:{background:"transparent !important"}},"&-row":{td:{"&:before":{transition:"background ".concat(x)},"&:first-child:before":{borderStartStartRadius:N,borderEndStartRadius:N},"&:last-child:before":{borderStartEndRadius:N,borderEndEndRadius:N}},"&:hover td":{"&:before":{background:P}},"&-range-start td,\n            &-range-end td,\n            &-selected td":{["&".concat(n)]:{"&:before":{background:h},["&".concat(t,"-cell-week")]:{color:new ao(R).setAlpha(.5).toHexString()},[r]:{color:R}}},"&-range-hover td:before":{background:_}}},"&-week-panel, &-date-panel-show-week":{["".concat(t,"-body")]:{padding:"".concat(rn(c)," ").concat(rn(l))},["".concat(t,"-content th")]:{width:"auto"}},"&-datetime-panel":{display:"flex",["".concat(t,"-time-panel")]:{borderInlineStart:"".concat(rn(u)," ").concat(f," ").concat(g)},["".concat(t,"-date-panel,\n          ").concat(t,"-time-panel")]:{transition:"opacity ".concat(T)},"&-active":{["".concat(t,"-date-panel,\n            ").concat(t,"-time-panel")]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",["".concat(t,"-content")]:{display:"flex",flex:"auto",height:M},"&-column":{flex:"1 0 auto",width:D,margin:"".concat(rn(s)," 0"),padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:"background ".concat(x),overflowX:"hidden","&::-webkit-scrollbar":{width:8,backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:4},"&":{scrollbarWidth:"thin",scrollbarColor:"".concat(e.colorTextTertiary," transparent")},"&::after":{display:"block",height:e.calc("100%").sub(L).equal(),content:'""'},"&:not(:first-child)":{borderInlineStart:"".concat(rn(u)," ").concat(f," ").concat(g)},"&-active":{background:new ao(_).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,["&".concat(t,"-time-panel-cell")]:{marginInline:z,["".concat(t,"-time-panel-cell-inner")]:{display:"block",width:e.calc(D).sub(e.calc(z).mul(2)).equal(),height:L,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(D).sub(L).div(2).equal(),color:j,lineHeight:rn(L),borderRadius:N,cursor:"pointer",transition:"background ".concat(x),"&:hover":{background:P}},"&-selected":{["".concat(t,"-time-panel-cell-inner")]:{background:_}},"&-disabled":{["".concat(t,"-time-panel-cell-inner")]:{color:k,background:"transparent",cursor:"not-allowed"}}}}}}}}},fU=e=>{const{componentCls:t,textHeight:n,lineWidth:r,paddingSM:o,antCls:a,colorPrimary:i,cellActiveWithRangeBg:l,colorPrimaryBorder:c,lineType:s,colorSplit:d}=e;return{["".concat(t,"-dropdown")]:{["".concat(t,"-footer")]:{borderTop:"".concat(rn(r)," ").concat(s," ").concat(d),"&-extra":{padding:"0 ".concat(rn(o)),lineHeight:rn(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:"start","&:not(:last-child)":{borderBottom:"".concat(rn(r)," ").concat(s," ").concat(d)}}},["".concat(t,"-panels + ").concat(t,"-footer ").concat(t,"-ranges")]:{justifyContent:"space-between"},["".concat(t,"-ranges")]:{marginBlock:0,paddingInline:rn(o),overflow:"hidden",textAlign:"start",listStyle:"none",display:"flex",justifyContent:"center",alignItems:"center","> li":{lineHeight:rn(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:"inline-block"},["".concat(t,"-now-btn-disabled")]:{pointerEvents:"none",color:e.colorTextDisabled},["".concat(t,"-preset > ").concat(a,"-tag-blue")]:{color:i,background:l,borderColor:c,cursor:"pointer"},["".concat(t,"-ok")]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:"auto"}}}}},pU=e=>{const{componentCls:t}=e;return{[t]:[Object.assign(Object.assign(Object.assign({},fk(e)),bk(e)),mk(e)),{"&-outlined":{["&".concat(t,"-multiple ").concat(t,"-selection-item")]:{background:e.multipleItemBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}},"&-filled":{["&".concat(t,"-multiple ").concat(t,"-selection-item")]:{background:e.colorBgContainer,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}},"&-borderless":{["&".concat(t,"-multiple ").concat(t,"-selection-item")]:{background:e.multipleItemBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}}}]}},hU=(e,t,n,r)=>{const o=e.calc(n).add(2).equal(),a=e.max(e.calc(t).sub(o).div(2).equal(),0),i=e.max(e.calc(t).sub(o).sub(a).equal(),0);return{padding:"".concat(rn(a)," ").concat(rn(r)," ").concat(rn(i))}},mU=e=>{const{componentCls:t,colorError:n,colorWarning:r}=e;return{["".concat(t,":not(").concat(t,"-disabled):not([disabled])")]:{["&".concat(t,"-status-error")]:{["".concat(t,"-active-bar")]:{background:n}},["&".concat(t,"-status-warning")]:{["".concat(t,"-active-bar")]:{background:r}}}}},gU=e=>{const{componentCls:t,antCls:n,controlHeight:r,paddingInline:o,lineWidth:a,lineType:i,colorBorder:l,borderRadius:c,motionDurationMid:s,colorTextDisabled:d,colorTextPlaceholder:u,controlHeightLG:f,fontSizeLG:p,controlHeightSM:h,paddingInlineSM:m,paddingXS:g,marginXS:v,colorTextDescription:b,lineWidthBold:y,colorPrimary:x,motionDurationSlow:w,zIndexPopup:C,paddingXXS:S,sizePopupArrow:E,colorBgElevated:k,borderRadiusLG:j,boxShadowSecondary:I,borderRadiusSM:T,colorSplit:A,cellHoverBg:O,presetsWidth:N,presetsMaxWidth:R,boxShadowPopoverArrow:P,fontHeight:M,fontHeightLG:D,lineHeightLG:L}=e;return[{[t]:Object.assign(Object.assign(Object.assign({},$r(e)),hU(e,r,M,o)),{position:"relative",display:"inline-flex",alignItems:"center",lineHeight:1,borderRadius:c,transition:"border ".concat(s,", box-shadow ").concat(s,", background ").concat(s),["".concat(t,"-input")]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",color:"inherit",fontSize:e.fontSize,lineHeight:e.lineHeight,transition:"all ".concat(s)},wk(u)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,fontFamily:"inherit","&:focus":{boxShadow:"none",outline:0},"&[disabled]":{background:"transparent",color:d,cursor:"not-allowed"}}),"&-placeholder":{"> input":{color:u}}},"&-large":Object.assign(Object.assign({},hU(e,f,D,o)),{["".concat(t,"-input > input")]:{fontSize:p,lineHeight:L}}),"&-small":Object.assign({},hU(e,h,M,m)),["".concat(t,"-suffix")]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:e.calc(g).div(2).equal(),color:d,lineHeight:1,pointerEvents:"none",transition:"opacity ".concat(s,", color ").concat(s),"> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:v}}},["".concat(t,"-clear")]:{position:"absolute",top:"50%",insetInlineEnd:0,color:d,lineHeight:1,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:"opacity ".concat(s,", color ").concat(s),"> *":{verticalAlign:"top"},"&:hover":{color:b}},"&:hover":{["".concat(t,"-clear")]:{opacity:1},["".concat(t,"-suffix:not(:last-child)")]:{opacity:0}},["".concat(t,"-separator")]:{position:"relative",display:"inline-block",width:"1em",height:p,color:d,fontSize:p,verticalAlign:"top",cursor:"default",["".concat(t,"-focused &")]:{color:b},["".concat(t,"-range-separator &")]:{["".concat(t,"-disabled &")]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",["".concat(t,"-active-bar")]:{bottom:e.calc(a).mul(-1).equal(),height:y,background:x,opacity:0,transition:"all ".concat(w," ease-out"),pointerEvents:"none"},["&".concat(t,"-focused")]:{["".concat(t,"-active-bar")]:{opacity:1}},["".concat(t,"-range-separator")]:{alignItems:"center",padding:"0 ".concat(rn(g)),lineHeight:1}},"&-range, &-multiple":{["".concat(t,"-clear")]:{insetInlineEnd:o},["&".concat(t,"-small")]:{["".concat(t,"-clear")]:{insetInlineEnd:m}}},"&-dropdown":Object.assign(Object.assign(Object.assign({},$r(e)),uU(e)),{pointerEvents:"none",position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:C,["&".concat(t,"-dropdown-hidden")]:{display:"none"},["&".concat(t,"-dropdown-placement-bottomLeft")]:{["".concat(t,"-range-arrow")]:{top:0,display:"block",transform:"translateY(-100%)"}},["&".concat(t,"-dropdown-placement-topLeft")]:{["".concat(t,"-range-arrow")]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},["&".concat(n,"-slide-up-enter").concat(n,"-slide-up-enter-active").concat(t,"-dropdown-placement-topLeft,\n          &").concat(n,"-slide-up-enter").concat(n,"-slide-up-enter-active").concat(t,"-dropdown-placement-topRight,\n          &").concat(n,"-slide-up-appear").concat(n,"-slide-up-appear-active").concat(t,"-dropdown-placement-topLeft,\n          &").concat(n,"-slide-up-appear").concat(n,"-slide-up-appear-active").concat(t,"-dropdown-placement-topRight")]:{animationName:Wp},["&".concat(n,"-slide-up-enter").concat(n,"-slide-up-enter-active").concat(t,"-dropdown-placement-bottomLeft,\n          &").concat(n,"-slide-up-enter").concat(n,"-slide-up-enter-active").concat(t,"-dropdown-placement-bottomRight,\n          &").concat(n,"-slide-up-appear").concat(n,"-slide-up-appear-active").concat(t,"-dropdown-placement-bottomLeft,\n          &").concat(n,"-slide-up-appear").concat(n,"-slide-up-appear-active").concat(t,"-dropdown-placement-bottomRight")]:{animationName:Fp},["&".concat(n,"-slide-up-leave").concat(n,"-slide-up-leave-active").concat(t,"-dropdown-placement-topLeft,\n          &").concat(n,"-slide-up-leave").concat(n,"-slide-up-leave-active").concat(t,"-dropdown-placement-topRight")]:{animationName:Vp},["&".concat(n,"-slide-up-leave").concat(n,"-slide-up-leave-active").concat(t,"-dropdown-placement-bottomLeft,\n          &").concat(n,"-slide-up-leave").concat(n,"-slide-up-leave-active").concat(t,"-dropdown-placement-bottomRight")]:{animationName:Hp},["".concat(t,"-panel > ").concat(t,"-time-panel")]:{paddingTop:S},["".concat(t,"-range-wrapper")]:{display:"flex",position:"relative"},["".concat(t,"-range-arrow")]:Object.assign(Object.assign({position:"absolute",zIndex:1,display:"none",paddingInline:e.calc(o).mul(1.5).equal(),boxSizing:"content-box",transition:"left ".concat(w," ease-out")},ed(e,k,P)),{"&:before":{insetInlineStart:e.calc(o).mul(1.5).equal()}}),["".concat(t,"-panel-container")]:{overflow:"hidden",verticalAlign:"top",background:k,borderRadius:j,boxShadow:I,transition:"margin ".concat(w),display:"inline-block",pointerEvents:"auto",["".concat(t,"-panel-layout")]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},["".concat(t,"-presets")]:{display:"flex",flexDirection:"column",minWidth:N,maxWidth:R,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:g,borderInlineEnd:"".concat(rn(a)," ").concat(i," ").concat(A),li:Object.assign(Object.assign({},Yr),{borderRadius:T,paddingInline:g,paddingBlock:e.calc(h).sub(M).div(2).equal(),cursor:"pointer",transition:"all ".concat(w),"+ li":{marginTop:v},"&:hover":{background:O}})}},["".concat(t,"-panels")]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr","&:last-child":{["".concat(t,"-panel")]:{borderWidth:0}}},["".concat(t,"-panel")]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,["".concat(t,"-content,\n            table")]:{textAlign:"center"},"&-focused":{borderColor:l}}}}),"&-dropdown-range":{padding:"".concat(rn(e.calc(E).mul(2).div(3).equal())," 0"),"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",["".concat(t,"-separator")]:{transform:"rotate(180deg)"},["".concat(t,"-footer")]:{"&-extra":{direction:"rtl"}}}})},Yp(e,"slide-up"),Yp(e,"slide-down"),xh(e,"move-up"),xh(e,"move-down")]},vU=$o("DatePicker",(e=>{const t=Ho(ik(e),(e=>{const{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:o}=e;return{pickerCellCls:"".concat(t,"-cell"),pickerCellInnerCls:"".concat(t,"-cell-inner"),pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(o).add(e.calc(r).div(2)).equal()}})(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[fU(t),gU(t),pU(t),mU(t),sU(t),Jl(e,{focusElCls:"".concat(e.componentCls,"-focused")})]}),(e=>Object.assign(Object.assign(Object.assign(Object.assign({},lk(e)),(e=>{const{colorBgContainerDisabled:t,controlHeightSM:n,controlHeightLG:r}=e;return{cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new ao(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new ao(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:1.4*r,timeColumnHeight:224,timeCellHeight:28,cellWidth:1.5*n,cellHeight:n,textHeight:r,withoutTimeCellHeight:1.65*r,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:"transparent",multipleItemHeight:n,multipleItemHeightLG:e.controlHeight,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:"transparent"}})(e)),Zs(e)),{presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50})));function bU(e,t,n){return void 0!==n?n:"year"===t&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:"quarter"===t&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:"month"===t&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:"week"===t&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:"time"===t&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder}function yU(e,t,n){return void 0!==n?n:"year"===t&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:"quarter"===t&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:"month"===t&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:"week"===t&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:"time"===t&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder}function xU(e,t){const n={adjustX:1,adjustY:1};switch(t){case"bottomLeft":return{points:["tl","bl"],offset:[0,4],overflow:n};case"bottomRight":return{points:["tr","br"],offset:[0,4],overflow:n};case"topLeft":return{points:["bl","tl"],offset:[0,-4],overflow:n};case"topRight":return{points:["br","tr"],offset:[0,-4],overflow:n};default:return{points:"rtl"===e?["tr","br"]:["tl","bl"],offset:[0,4],overflow:n}}}function wU(e,n){const{allowClear:r=!0}=e,{clearIcon:o,removeIcon:a}=DO(Object.assign(Object.assign({},e),{prefixCls:n,componentName:"DatePicker"}));return[t.useMemo((()=>{if(!1===r)return!1;const e=!0===r?{}:r;return Object.assign({clearIcon:o},e)}),[r,o]),a]}function CU(e){return t.createElement(ac,Object.assign({size:"small",type:"primary"},e))}function SU(e){return(0,t.useMemo)((()=>Object.assign({button:CU},e)),[e])}var EU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var kU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const jU=function(e){const{DatePicker:n,WeekPicker:r,MonthPicker:o,YearPicker:a,TimePicker:i,QuarterPicker:l}=function(e){function n(n,r){const o="TimePicker"===r?"timePicker":"datePicker",a=(0,t.forwardRef)(((r,a)=>{var i;const{prefixCls:l,getPopupContainer:c,components:s,style:d,className:u,rootClassName:f,size:p,bordered:h,placement:m,placeholder:g,popupClassName:b,dropdownClassName:y,disabled:x,status:w,variant:C}=r,S=kU(r,["prefixCls","getPopupContainer","components","style","className","rootClassName","size","bordered","placement","placeholder","popupClassName","dropdownClassName","disabled","status","variant"]),{getPrefixCls:E,direction:k,getPopupContainer:j,[o]:I}=(0,t.useContext)(at),T=E("picker",l),{compactSize:A,compactItemClassnames:O}=nl(T,k),N=t.useRef(null),[R,P]=qk(C,h),M=lh(T),[D,L,_]=vU(T,M);(0,t.useImperativeHandle)(a,(()=>N.current));const z=n||r.picker,B=E(),[F,H]=wU(r,T),W=SU(s),V=Yi((e=>{var t;return null!==(t=null!==p&&void 0!==p?p:A)&&void 0!==t?t:e})),U=t.useContext(Ki),K=null!==x&&void 0!==x?x:U,G=(0,t.useContext)(Xw),{hasFeedback:q,status:X,feedbackIcon:Y}=G,$=t.createElement(t.Fragment,null,"time"===z?t.createElement(dW,null):t.createElement(lW,null),q&&Y),[J]=nx("DatePicker",ru),Q=Object.assign(Object.assign({},J),r.locale),[Z]=Gs("DatePicker",null===(i=r.popupStyle)||void 0===i?void 0:i.zIndex);return D(t.createElement(rl,null,t.createElement(lU,Object.assign({ref:N,placeholder:bU(Q,z,g),suffixIcon:$,dropdownAlign:xU(k,m),prevIcon:t.createElement("span",{className:"".concat(T,"-prev-icon")}),nextIcon:t.createElement("span",{className:"".concat(T,"-next-icon")}),superPrevIcon:t.createElement("span",{className:"".concat(T,"-super-prev-icon")}),superNextIcon:t.createElement("span",{className:"".concat(T,"-super-next-icon")}),transitionName:"".concat(B,"-slide-up"),picker:n},{showToday:!0},S,{locale:Q.lang,className:v()({["".concat(T,"-").concat(V)]:V,["".concat(T,"-").concat(R)]:P},Vk(T,Uk(X,w),q),L,O,null===I||void 0===I?void 0:I.className,u,_,M,f),style:Object.assign(Object.assign({},null===I||void 0===I?void 0:I.style),d),prefixCls:T,getPopupContainer:c||j,generateConfig:e,components:W,direction:k,disabled:K,classNames:{popup:v()(L,_,M,f,b||y)},styles:{popup:Object.assign(Object.assign({},r.popupStyle),{zIndex:Z})},allowClear:F,removeIcon:H}))))}));return a}return{DatePicker:n(),WeekPicker:n("week","WeekPicker"),MonthPicker:n("month","MonthPicker"),YearPicker:n("year","YearPicker"),TimePicker:n("time","TimePicker"),QuarterPicker:n("quarter","QuarterPicker")}}(e),c=function(e){const n=(0,t.forwardRef)(((n,r)=>{var o;const{prefixCls:a,getPopupContainer:i,components:l,className:c,style:s,placement:d,size:u,disabled:f,bordered:p=!0,placeholder:h,popupClassName:m,dropdownClassName:g,status:b,rootClassName:y,variant:x}=n,w=EU(n,["prefixCls","getPopupContainer","components","className","style","placement","size","disabled","bordered","placeholder","popupClassName","dropdownClassName","status","rootClassName","variant"]),C=t.useRef(null),{getPrefixCls:S,direction:E,getPopupContainer:k,rangePicker:j}=(0,t.useContext)(at),I=S("picker",a),{compactSize:T,compactItemClassnames:A}=nl(I,E),{picker:O}=n,N=S(),[R,P]=qk(x,p),M=lh(I),[D,L,_]=vU(I,M),[z]=wU(n,I),B=SU(l),F=Yi((e=>{var t;return null!==(t=null!==u&&void 0!==u?u:T)&&void 0!==t?t:e})),H=t.useContext(Ki),W=null!==f&&void 0!==f?f:H,V=(0,t.useContext)(Xw),{hasFeedback:U,status:K,feedbackIcon:G}=V,q=t.createElement(t.Fragment,null,"time"===O?t.createElement(dW,null):t.createElement(lW,null),U&&G);(0,t.useImperativeHandle)(r,(()=>C.current));const[X]=nx("Calendar",ru),Y=Object.assign(Object.assign({},X),n.locale),[$]=Gs("DatePicker",null===(o=n.popupStyle)||void 0===o?void 0:o.zIndex);return D(t.createElement(rl,null,t.createElement(tU,Object.assign({separator:t.createElement("span",{"aria-label":"to",className:"".concat(I,"-separator")},t.createElement(pW,null)),disabled:W,ref:C,popupAlign:xU(E,d),placeholder:yU(Y,O,h),suffixIcon:q,prevIcon:t.createElement("span",{className:"".concat(I,"-prev-icon")}),nextIcon:t.createElement("span",{className:"".concat(I,"-next-icon")}),superPrevIcon:t.createElement("span",{className:"".concat(I,"-super-prev-icon")}),superNextIcon:t.createElement("span",{className:"".concat(I,"-super-next-icon")}),transitionName:"".concat(N,"-slide-up")},w,{className:v()({["".concat(I,"-").concat(F)]:F,["".concat(I,"-").concat(R)]:P},Vk(I,Uk(K,b),U),L,A,c,null===j||void 0===j?void 0:j.className,_,M,y),style:Object.assign(Object.assign({},null===j||void 0===j?void 0:j.style),s),locale:Y.lang,prefixCls:I,getPopupContainer:i||k,generateConfig:e,components:B,direction:E,classNames:{popup:v()(L,m||g,_,M,y)},styles:{popup:Object.assign(Object.assign({},n.popupStyle),{zIndex:$})},allowClear:z}))))}));return n}(e),s=n;return s.WeekPicker=r,s.MonthPicker=o,s.YearPicker=a,s.RangePicker=c,s.TimePicker=i,s.QuarterPicker=l,s},IU=jU(oW);function TU(e){const t=xU(e.direction,e.placement);return t.overflow.adjustY=!1,t.overflow.adjustX=!1,Object.assign(Object.assign({},e),{dropdownAlign:t})}const AU=Pu(IU,"picker",null,TU);IU._InternalPanelDoNotUseOrYouWillBeFired=AU;const OU=Pu(IU.RangePicker,"picker",null,TU);IU._InternalRangePanelDoNotUseOrYouWillBeFired=OU,IU.generatePicker=jU;const NU=IU;var RU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const{TimePicker:PU,RangePicker:MU}=NU,DU=t.forwardRef(((e,n)=>t.createElement(MU,Object.assign({},e,{picker:"time",mode:void 0,ref:n})))),LU=t.forwardRef(((e,n)=>{var{addon:r,renderExtraFooter:o}=e,a=RU(e,["addon","renderExtraFooter"]);const i=t.useMemo((()=>o||(r||void 0)),[r,o]);return t.createElement(PU,Object.assign({},a,{mode:void 0,ref:n,renderExtraFooter:i}))}));const _U=Pu(LU,"picker");LU._InternalPanelDoNotUseOrYouWillBeFired=_U,LU.RangePicker=DU,LU._InternalPanelDoNotUseOrYouWillBeFired=_U;const zU=LU;const BU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var FU=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:BU}))};const HU=t.forwardRef(FU);HH().extend(ZH());const WU=e=>{let{clearToken:n,restartDevice:r,setShowDialog:o,showDialog:a}=e;const{translate:i}=og(),[l,c]=(0,t.useState)({mode:"",servers:[""]}),[s,d]=(0,t.useState)(""),[u,f]=(0,t.useState)(""),[p,h]=(0,t.useState)(!1),[m,g]=(0,t.useState)({hour:"",date:""}),[v,b]=(0,t.useState)({lang:"it",tz:"GMT+1"}),[y,x]=mE(((e,t)=>cE(e,t)),[]),[w,C]=mE(((e,t)=>cE(e,t)),[]),[S,E]=mE(((e,t)=>cE(e,t)),[]),[k,j]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{E(pS,GC()),j(hS,GC())}),[]),(0,t.useEffect)((()=>{if(k.value&&b({lang:k.value.language,tz:k.value.timezone}),S.value&&k.value){let e=new Date(S.value.now);g({date:e.toLocaleDateString(k.value.language),hour:e.toLocaleTimeString(k.value.language)})}}),[S,k]),(0,t.useEffect)((()=>{!a&&x(VS,GC())}),[a]),(0,t.useEffect)((()=>{!a&&"manual"===l.mode&&A()}),[l.mode,a]),(0,t.useEffect)((()=>{y.value&&c({...y.value,servers:y.value.servers.length?[...y.value.servers]:[""]})}),[y]),(0,t.useEffect)((()=>{w.value&&d(O(w.value.datetime.split("T")[0])),w.value&&f(w.value.datetime.split("T")[1].split("Z")[0])}),[w]);const I=(e,t)=>{o(!0);const n={...l};n[e]=t,c({...n})},T=(e,t)=>{if(null===t)I("servers",[...l.servers.filter(((t,n)=>n!==e))]);else{const n=[...l.servers];n[e]=t,I("servers",[...n])}};function A(){C(US,GC())}function O(e){if(e.includes("-")){const[t,n,r]=e.split("-");return"".concat(r,"/").concat(n,"/").concat(t)}const[t,n,r]=e.split("/");return"".concat(r,"-").concat(n,"-").concat(t)}function N(){MI(1),XC(),JC(),r(),n()}return(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(HU,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:i("updateDateHour")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsxs)("span",{children:[m.hour," ",m.date]})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(qz,{gutter:16,children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{children:i("mode")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(HO,{style:{width:140},value:null===l||void 0===l?void 0:l.mode,options:[{value:"ntp",label:i("auto")},{value:"customntp",label:i("ntpServer")},{value:"manual",label:i("man")}],onChange:e=>{I("mode",e),h(!0),"manual"===e&&A()}})})]})})]}),"customntp"===l.mode&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1,xs:2}),(0,ng.jsx)(Zz,{span:18,children:(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:"Server NTP"})})})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsx)(ac,{onClick:()=>{T(l.servers.length,""),h(!0)},children:i("add")}),l.servers.map(((e,t)=>(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(Aj,{value:e,onChange:e=>{T(t,e.target.value)}},t),(0,ng.jsx)(ac,{disabled:l.servers.length<2,onClick:()=>{T(t,null),h(!0)},children:(0,ng.jsx)(kz,{})})]})))]})})]})]}),"manual"===l.mode&&(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1,xs:2}),(0,ng.jsx)(Zz,{span:18,children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsx)(NU,{value:HH()(s,"DD/MM/YYYY"),format:"DD/MM/YYYY",onChange:(e,t)=>{t&&(o(!0),d(t))},allowClear:!1}),(0,ng.jsx)(zU,{format:"HH:mm",value:HH()(u,"HH:mm"),onChange:(e,t)=>{t&&(f(t),o(!0))},allowClear:!1})]})})]})}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(hc,{children:"manual"===l.mode||p?(0,ng.jsx)(NI,{contentWarning:i("alertUpdateDateTime"),confirmSave:async()=>{try{if(await dE(VS,JSON.stringify(l),GC()),"manual"===l.mode){const e={datetime:"".concat(O(s),"T").concat(u,"Z")};"ok"===(await dE(US,JSON.stringify(e),GC())).result?(ak.success(i("ok")),o(!1),N()):(ak.error(i("error")),A())}else ak.success(i("ok")),N(),o(!1)}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(i(e.message))}},disabled:"customntp"===l.mode&&l.servers.some((e=>e.length<=0)),justEdit:a}):(0,ng.jsx)(II,{onClick:async()=>{try{await dE(VS,JSON.stringify(l),GC()),o(!1),ak.success(i("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(i(e.message))}},justEdit:a,disabled:"customntp"===l.mode&&l.servers.some((e=>e.length<=0))})})})]})})},VU=(0,t.memo)(WU);const UU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M723 620.5C666.8 571.6 593.4 542 513 542s-153.8 29.6-210.1 78.6a8.1 8.1 0 00-.8 11.2l36 42.9c2.9 3.4 8 3.8 11.4.9C393.1 637.2 450.3 614 513 614s119.9 23.2 163.5 61.5c3.4 2.9 8.5 2.5 11.4-.9l36-42.9c2.8-3.3 2.4-8.3-.9-11.2zm117.4-140.1C751.7 406.5 637.6 362 513 362s-238.7 44.5-327.5 118.4a8.05 8.05 0 00-1 11.3l36 42.9c2.8 3.4 7.9 3.8 11.2 1C308 472.2 406.1 434 513 434s205 38.2 281.2 101.6c3.4 2.8 8.4 2.4 11.2-1l36-42.9c2.8-3.4 2.4-8.5-1-11.3zm116.7-139C835.7 241.8 680.3 182 511 182c-168.2 0-322.6 59-443.7 157.4a8 8 0 00-1.1 11.4l36 42.9c2.8 3.3 7.8 3.8 11.1 1.1C222 306.7 360.3 254 511 254c151.8 0 291 53.5 400 142.7 3.4 2.8 8.4 2.3 11.2-1.1l36-42.9c2.9-3.4 2.4-8.5-1.1-11.3zM448 778a64 64 0 10128 0 64 64 0 10-128 0z"}}]},name:"wifi",theme:"outlined"};var KU=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:UU}))};const GU=t.forwardRef(KU),qU=e=>{let{value:t,manageOnChange:n,status:r}=e;const{translate:o}=og();return(0,ng.jsx)(Hd,{title:o("infoPassword"),children:(0,ng.jsx)(Aj.Password,{placeholder:"Password",value:t,onChange:n,status:r?"":"error"})})},XU=e=>{let{setShowDialog:n,showDialog:r}=e;const{translate:o}=og(),[a,i]=(0,t.useState)(!1),[l,c]=(0,t.useState)(!1),[s,d]=(0,t.useState)({keepaliveTime:"1",password:"",ssid:""}),[u,f]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),m=(0,t.useRef)(),[g,v]=(0,t.useState)({pass:"",passRepeat:""}),[b,y]=(0,t.useState)(null),[x,w]=mE(((e,t,n)=>cE(e,t,n)),[]),[C,S]=mE(((e,t,n)=>cE(e,t,n)),[]);(0,t.useEffect)((()=>(I(),m.current=setInterval((()=>{I()}),5e3),()=>{clearInterval(m.current)})),[]),(0,t.useEffect)((()=>{x.value&&c(x.value.active)}),[x]),(0,t.useEffect)((()=>{C.value&&d(C.value)}),[C]),(0,t.useEffect)((()=>{!r&&T(),!r&&f(!1),!r&&h(!1)}),[r]);const E=[{label:o("forever"),value:"forever"},...Array.from({length:1440},((e,t)=>t+1)).map((e=>({label:e+" min",value:e.toString()})))],k=(e,t)=>{const r={...s};r[e]=t,d({...r}),n(!0)},j=e=>{if(e){c(e);try{dE(KS,JSON.stringify({active:e}),GC()),ak.success(o(e?"wiFiActived":"wiFiDisabled"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(o(t.message))}}else y(!1)};function I(){w(KS,GC(),!1)}function T(){S("/network/wifi/settings",GC())}async function A(){if(g.pass!==g.passRepeat)ak.error(o("messagePasswordNotMatch"));else try{"ok"===(await dE("/network/wifi/password",JSON.stringify({password:g.pass}),GC())).result?ak.success(o("messageChangePasswordOk")):ak.error(o("messageChangePasswordFailed"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(o("messageChangePasswordFailed"))}v({...g,pass:"",passRepeat:""}),T(),i(!1)}return(0,ng.jsxs)(ng.Fragment,{children:[a&&(0,ng.jsx)(UC,{title:o("wifiPasswordReset"),open:a,onOk:A,onCancel:()=>{v({...g,pass:"",passRepeat:""}),i(!1)},cancelText:o("cancel"),okText:o("save"),destroyOnClose:!0,footer:(e,t)=>{let{CancelBtn:n}=t;return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(n,{}),(0,ng.jsx)(ac,{type:"primary",onClick:A,disabled:!lS(g.pass)&&!lS(g.passRepeat)||g.pass!==g.passRepeat,children:o("passwordChange")})]})},children:(0,ng.jsx)("div",{children:(0,ng.jsxs)(NH,{vertical:!0,gap:"middle",children:[(0,ng.jsxs)(hc,{direction:"vertical",children:[o("oldPassword"),(0,ng.jsx)(Aj.Password,{onChange:e=>e.preventDefault,value:s.password})]}),(0,ng.jsxs)(hc,{direction:"vertical",children:[o("newPassword"),(0,ng.jsx)(qU,{value:g.pass,manageOnChange:function(e){v({...g,pass:e.target.value})},status:lS(g.pass)})]}),(0,ng.jsxs)(hc,{direction:"vertical",children:[o("passwordRepeat"),(0,ng.jsx)(qU,{value:g.passRepeat,manageOnChange:function(e){v({...g,passRepeat:e.target.value})},status:lS(g.passRepeat)})]})]})})}),(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,children:(0,ng.jsx)(GU,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:o("wifi")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)("span",{className:"home__card-text",children:o("ssid")}),(0,ng.jsx)("span",{className:"home__card-text",style:{color:"grey"},children:s.ssid})]})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{span:18,children:(0,ng.jsxs)(hc,{direction:"vertical",size:"large",style:{display:"flex"},children:[(0,ng.jsxs)(qz,{children:[(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:o("currentStatus")})}),(0,ng.jsx)(Zz,{span:14,children:l?(0,ng.jsx)(IN,{title:o("wifiDisconnectMsg"),onConfirm:async()=>{if(null!==b){c(b);try{await dE(KS,JSON.stringify({active:b}),GC()),ak.success(o(b?"wiFiActived":"wiFiDisabled"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(o(e.message))}y(null)}},onCancel:()=>{y(null)},okText:o("continue"),cancelText:o("cancel"),children:(0,ng.jsx)(yI,{checked:l,checkedChildren:o("actived"),onChange:j,unCheckedChildren:o("inactive"),style:{width:"200px"}})}):(0,ng.jsx)(yI,{checked:l,checkedChildren:o("actived"),onChange:j,unCheckedChildren:o("inactive"),style:{width:"200px"}})})]}),(0,ng.jsxs)(qz,{children:[(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:o("timerInactiveWifi")})}),(0,ng.jsx)(Zz,{span:14,children:(0,ng.jsxs)(hc.Compact,{block:!0,children:[(0,ng.jsx)(HO,{style:{width:210},value:s.keepaliveTime,options:E,onChange:e=>{k("keepaliveTime",e),f(!0)}}),(0,ng.jsx)(II,{justEdit:u,onClick:async()=>{try{await dE("/network/wifi/keepalive",JSON.stringify({keepaliveTime:s.keepaliveTime}),GC()),n(!1),ak.success(o("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(o(e.message))}}})]})})]}),(0,ng.jsxs)(qz,{children:[(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:o("ssid")})}),(0,ng.jsx)(Zz,{span:18,children:(0,ng.jsxs)(hc.Compact,{block:!0,children:[(0,ng.jsx)(Aj,{style:{width:210},value:s.ssid,onChange:e=>{null!=e.target.value&&(k("ssid",e.target.value),h(!0))}}),(0,ng.jsx)(II,{justEdit:p,onClick:async function(){try{"ok"===(await dE("/network/wifi/ssid",JSON.stringify({ssid:s.ssid}),GC())).result?ak.success(o("messageChangeSSIDOk")):ak.error(o("messageChangeSSIDFailed"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(o(e.message))}n(!1),T()}})]})})]}),(0,ng.jsxs)(qz,{children:[(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:o("password")})}),(0,ng.jsx)(Zz,{span:14,children:(0,ng.jsx)(hc.Compact,{block:!0,children:(0,ng.jsx)(ac,{style:{width:90},onClick:()=>i(!0),children:o("edit")})})})]}),(0,ng.jsx)("div",{style:{visibility:l&&p?"visible":"hidden"},children:(0,ng.jsxs)("p",{children:[o("alertWiFiActiveTitle")," ",o("alertWiFiActiveMessage")]})})]})})]})]})]})},YU=(0,t.memo)(XU),$U=e=>{let{showDialogTab:t,copyActiveKey:n,setActiveKey:r,setShowDialog:o,setShowDialogTab:a}=e;const{translate:i}=og();return(0,ng.jsxs)(UC,{open:t,title:i("attenzione")+"!",onOk:()=>{r(n),o(!1),a(!1)},onCancel:()=>{a(!1)},cancelText:i("cancel"),okText:i("ok"),children:[(0,ng.jsx)("p",{children:i("alertEditNotSave")}),(0,ng.jsx)("p",{children:i("alertEditNotSaveQuestion")})]})};const JU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var QU=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:JU}))};const ZU=t.forwardRef(QU),eK=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)(!1),o=(0,t.useRef)(),[a,i]=(0,t.useState)(null),[l,c]=mE(((e,t,n)=>cE(e,t,n)),[]);function s(){c(JS,GC(),!1)}(0,t.useEffect)((()=>{l.value&&r(l.value.httpsEnabled)}),[l]),(0,t.useEffect)((()=>(s(),o.current=setInterval(s,5e3),()=>{clearInterval(o.current)})),[]);const d=null!==a?a:n,u=e(n?"httpsDisconnectMsg":"httpsConnectMsg");return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,children:(0,ng.jsx)(ZU,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:"HTTPS/SSL"})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:e("activateHttps")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{span:18,children:(0,ng.jsx)(hc,{direction:"vertical",size:"large",style:{display:"flex"},children:(0,ng.jsxs)(qz,{children:[(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:e("currentStatus")})}),(0,ng.jsx)(Zz,{span:14,children:(0,ng.jsx)(IN,{title:u,onConfirm:async()=>{if(null!==a){r(a);try{await dE(JS,JSON.stringify({httpsEnabled:a}),GC()),ak.success(e(a?"httpsActived":"httpsDisabled"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}i(null)}},onCancel:()=>{i(null)},okText:e("continue"),cancelText:e("cancel"),children:(0,ng.jsx)(yI,{checked:d,checkedChildren:e("actived"),unCheckedChildren:e("inactive"),onChange:e=>{i(e)},style:{width:"200px"}})})})]})})})]})]})},tK=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)({pass:"",pass1:""}),[o,a]=(0,t.useState)(!1);return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1,children:(0,ng.jsx)(et,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:e("password")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:e("passwordChange")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{span:18,children:(0,ng.jsxs)(hc,{direction:"vertical",children:[e("newPassword"),(0,ng.jsx)(qU,{value:n.pass,manageOnChange:e=>{r({...n,pass:e.target.value})},status:lS(n.pass)}),e("passwordRepeat"),(0,ng.jsx)(qU,{value:n.pass1,manageOnChange:e=>{r({...n,pass1:e.target.value})},status:lS(n.pass1)&&n.pass===n.pass1}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(ac,{style:{minWidth:150},type:"primary",onClick:async()=>{if(n.pass!==n.pass1&&ak.error(e("messagePasswordNotMatch")),lS(n.pass))try{"ok"===(await sE(mS,JSON.stringify({username:$C(),password:"",newPassword:n.pass}),GC())).result?(ak.success(e("messageChangePasswordOk")),r({pass:"",pass1:""})):ak.error(e("messageChangePasswordFailed"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e("messageChangePasswordFailed"))}},disabled:!lS(n.pass)&&!lS(n.pass1)||n.pass!==n.pass1,children:e("passwordChange")})})]})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:e("passwordReset")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:e("factoryDefault")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:1}),(0,ng.jsx)(Zz,{span:18,children:(0,ng.jsx)(hc,{direction:"vertical",children:(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(IN,{title:e("titleAreYouSurePasswordReset"),onConfirm:async()=>{(async()=>{try{"ok"===(await sE("/account/resetpassword",JSON.stringify({username:"service",resetType:"fabric"}),GC())).result?ak.success(e("resetPasswordOk")):ak.error(e("resetPasswordFailed"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e("resetPasswordFailed"))}})()},cancelText:e("cancel"),children:(0,ng.jsx)(ac,{style:{minWidth:150},type:"primary",children:"Reset"})})})})})]})]})},nK=(0,t.memo)(tK),rK=e=>{let{setShowDialog:t,showDialog:n}=e;return(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsx)(eK,{}),(0,ng.jsx)(hB,{}),(0,ng.jsx)(nK,{})]})},oK=e=>{let{clearToken:n,restartDevice:r}=e;const{translate:o}=og(),[a,i]=(0,t.useState)(!1),[l,c]=(0,t.useState)(!1),[s,d]=(0,t.useState)("1"),[u,f]=(0,t.useState)(""),p=[{key:"1",label:(0,ng.jsx)("span",{children:o("configEmail")}),children:(0,ng.jsx)(BH,{setShowDialog:i,showDialog:a})},{key:"2",label:o("fwUpdate"),children:(0,ng.jsx)(mH,{clearToken:n,restartDevice:r})},{key:"3",label:o("utility"),children:(0,ng.jsx)(fH,{clearToken:n,restartDevice:r})},{key:"4",label:(0,ng.jsx)("span",{children:o("localization")}),children:(0,ng.jsx)(yB,{setShowDialog:i,showDialog:a})},{key:"5",label:o("updateDateHour"),children:(0,ng.jsx)(VU,{clearToken:n,restartDevice:r,setShowDialog:i,showDialog:a})},{key:"7",label:o("wifi"),children:(0,ng.jsx)(YU,{setShowDialog:i,showDialog:a})},{key:"8",label:o("security"),children:(0,ng.jsx)(rK,{setShowDialog:i,showDialog:a})}];return(0,ng.jsxs)("div",{children:[(0,ng.jsx)(jI,{showDialog:a}),(0,ng.jsx)($U,{showDialogTab:l,copyActiveKey:u,setActiveKey:d,setShowDialog:i,setShowDialogTab:c}),(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:o("generalSettings")})}),(0,ng.jsx)(Qv,{children:(0,ng.jsx)(Mv,{activeKey:s,items:p,destroyInactiveTabPane:!0,onTabClick:e=>{c(a),a?f(e):d(e)}})})]})]})},aK=e=>{let{lengthComputable:t,loaded:n=0,total:r,height:o=14,showLabel:a=!0}=e;const i=t&&r>0?Math.round(n/r*100):0;return(0,ng.jsx)("div",{className:"progress-container",style:{height:o},children:(0,ng.jsx)("div",{className:"progress-fill",style:{width:"".concat(i,"%")},children:a&&i>5&&(0,ng.jsxs)("span",{className:"progress-label",children:[i,"%"]})})})};var iK=function(e){return e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.END_OK=2]="END_OK",e[e.END_KO=3]="END_KO",e}(iK||{});const lK=()=>{const{translate:e}=og(),n=(0,t.useRef)(),[r,o]=(0,t.useState)(),[a,i]=(0,t.useState)(-1),[l,c]=(0,t.useState)(!1),[s,d]=(0,t.useState)(!1),[u,f]=(0,t.useState)([]),[p,h]=(0,t.useState)({lengthComputable:!1,loaded:0,total:0}),[m,g]=(0,t.useState)({lengthComputable:!1,loaded:0,total:0}),v=(0,t.useRef)(null),b=(0,t.useRef)(null),[y,x]=mE(((e,t)=>cE(e,t)),[]),[w,C]=(0,t.useState)([]);(0,t.useEffect)((()=>{x(kS,GC())}),[]),(0,t.useEffect)((()=>{y.value&&C([...y.value])}),[y]);const S=[{title:e("id"),dataIndex:"id",key:"id",width:50,render:t=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("id")}),(0,ng.jsx)("span",{children:t})]})},{title:e("projects"),dataIndex:"name",key:"name",width:150,render:t=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("project")}),(0,ng.jsx)("span",{children:t})]})},{title:e("action"),width:50,className:"col-center",render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("action")}),(0,ng.jsx)(hc,{children:(0,ng.jsx)(Hd,{title:e("delProj"),children:(0,ng.jsx)(IN,{title:e("titleAreYouSure"),onConfirm:async()=>{try{await uE("/container/projects/delete",n.id,"",GC()),await x(kS,GC()),ak.success(e("ok"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}},cancelText:e("cancel"),okText:e("ok"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})]})}],E=async()=>{cE("/container/projects/backup/status",GC(),!1).then((e=>{e.code===iK.END_OK?(clearInterval(n.current),o({status:e.code,message:e.message}),i(-1),k()):e.code===iK.END_KO?(clearInterval(n.current),i(-1),o({status:e.code,message:e.message})):o({status:e.code,message:e.message})})).catch((e=>{console.log(e),o({status:iK.READY,message:""})}))},k=async()=>{try{c(!1),g({lengthComputable:!1,loaded:0,total:0});const e=new AbortController;b.current=e;await pE("/container/projects/backup/download",void 0,GC(),!1,!1,(e=>{const t=e.loaded,n=e.total||0,r=!!e.total;g({lengthComputable:r,loaded:t,total:n})}),e.signal);c(!1),setTimeout((()=>{g({lengthComputable:!1,loaded:0,total:0})}),700)}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message)),o({status:iK.READY,message:""}),c(!1)}finally{b.current=null}},j=async()=>{cE("/container/projects/restore/status",GC(),!1).then((e=>{e.code===iK.END_OK?(clearInterval(n.current),o({status:e.code,message:e.message}),I()):e.code===iK.END_KO?(clearInterval(n.current),i(-1),o({status:e.code,message:e.message}),c(!1)):(o({status:e.code,message:e.message}),c(!1))})).catch((e=>{console.log(e),clearInterval(n.current),c(!1)}))},I=async()=>{clearInterval(n.current),i(-1),c(!1),x(kS,GC())};return(0,ng.jsxs)("div",{children:[(0,ng.jsx)(UC,{closable:!1,open:s,title:e("titleAreYouSure"),onOk:()=>{d(!1);const t={};try{sE("/container/projects/restore/start",t,GC()).then((e=>{n.current=setInterval((()=>{j()}),2e3)}))}catch(r){if(null!==r&&void 0!==r&&r.globalHandled)return;ak.error(e(r.message))}},onCancel:()=>{d(!1),c(!1);sE("/container/projects/restore/cancel",JSON.stringify({}),GC())},footer:(e,t)=>{let{OkBtn:n,CancelBtn:r}=t;return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(r,{}),(0,ng.jsx)(n,{})]})},cancelText:e("cancel"),okText:e("ok"),children:(0,ng.jsx)("div",{children:(0,ng.jsx)("ul",{children:u.map(((t,n)=>(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:6,children:t.name}),"yes"===t.overwrite?(0,ng.jsx)(Zz,{span:18,style:{color:"red"},children:e("overvwriteProject")}):(0,ng.jsx)(Zz,{span:18,style:{color:"green"},children:e("newProject")})]},n)))})})}),(0,ng.jsxs)("div",{style:{padding:0,marginBottom:16},children:[(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsxs)(hc.Compact,{block:!0,children:[(0,ng.jsx)(Hd,{title:e("bkAllProj"),children:(0,ng.jsx)(IN,{title:e("titleAreYouSure"),onConfirm:async()=>{(async()=>{o({status:iK.READY,message:""});try{c(!0);const e=[];w.map((t=>{e.push(t.id)}));const t={projectsId:[e]};await sE("/container/projects/backup/start",JSON.stringify(t),GC(),!1).then((e=>{n.current=setInterval((()=>{E()}),2e3)})).catch((e=>{console.log(e),c(!1)}))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message)),c(!1)}})()},cancelText:e("cancel"),okText:e("ok"),children:(0,ng.jsx)(ac,{disabled:0===w.length,className:"btnLeft",icon:(0,ng.jsx)(lF,{style:{color:"gray",fontSize:"18px"}},"setting")})})}),(0,ng.jsx)(Hd,{title:e("restoreProj"),children:(0,ng.jsx)(tH,{customRequest:async t=>{const{file:n,onSuccess:r,onError:a,onProgress:i}=t;o({status:iK.READY,message:""});try{c(!0);const e=new AbortController;v.current=e;const t=await fE({request:"/container/projects/restore/upload",file:n,token:GC(),loader:!1,onProgress:e=>{const t=e.loaded,n=e.total||0;if(h({lengthComputable:!!e.total,loaded:t,total:n}),i){const t=e.progress?Math.round(100*e.progress):0;i({percent:t})}},signal:e.signal});f(t),d(!0),r&&r(t),setTimeout((()=>{h({lengthComputable:!1,loaded:0,total:0})}),700)}catch(l){if(null!==l&&void 0!==l&&l.globalHandled)return;ak.error(e(l.message)),o({status:iK.READY,message:""}),c(!1)}finally{v.current=null}},showUploadList:!1,accept:".wgebck",children:(0,ng.jsx)(ac,{className:"btnRight",icon:(0,ng.jsx)(lH,{style:{color:"gray",fontSize:"18px"}},"setting")})})})]}),(0,ng.jsxs)("div",{style:{width:800,height:50},children:[p.loaded>0&&(0,ng.jsx)(aK,{lengthComputable:p.lengthComputable,loaded:p.loaded,total:p.total,height:20,showLabel:!0}),m.loaded>0&&(0,ng.jsx)(aK,{lengthComputable:m.lengthComputable,loaded:m.loaded,total:m.total,height:20,showLabel:!0})]})]}),(0,ng.jsx)("br",{}),(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.message})]}),(0,ng.jsx)(k_,{style:{width:"70%"},rowKey:e=>e.id,columns:S,dataSource:w,size:"small"})]})},cK=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,o=e.fontSizeSM;return Ho(e,{tagFontSize:o,tagLineHeight:rn(r(e.lineHeightSM).mul(o).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},sK=e=>({defaultBg:new ao(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),dK=$o("Tag",(e=>(e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o,calc:a}=e,i=a(r).sub(n).equal(),l=a(t).sub(n).equal();return{[o]:Object.assign(Object.assign({},$r(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(o,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(o,"-close-icon")]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(o,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(o,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:i}}),["".concat(o,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(cK(e))),sK);var uK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const fK=t.forwardRef(((e,n)=>{const{prefixCls:r,style:o,className:a,checked:i,onChange:l,onClick:c}=e,s=uK(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:d,tag:u}=t.useContext(at),f=d("tag",r),[p,h,m]=dK(f),g=v()(f,"".concat(f,"-checkable"),{["".concat(f,"-checkable-checked")]:i},null===u||void 0===u?void 0:u.className,a,h,m);return p(t.createElement("span",Object.assign({},s,{ref:n,style:Object.assign(Object.assign({},o),null===u||void 0===u?void 0:u.style),className:g,onClick:e=>{null===l||void 0===l||l(!i),null===c||void 0===c||c(e)}})))})),pK=fK,hK=Yo(["Tag","preset"],(e=>(e=>Od(e,((t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}})))(cK(e))),sK);const mK=(e,t,n)=>{const r="string"!==typeof(o=n)?o:o.charAt(0).toUpperCase()+o.slice(1);var o;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(n)],background:e["color".concat(r,"Bg")],borderColor:e["color".concat(r,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}},gK=Yo(["Tag","status"],(e=>{const t=cK(e);return[mK(t,"success","Success"),mK(t,"processing","Info"),mK(t,"error","Error"),mK(t,"warning","Warning")]}),sK);var vK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const bK=(e,n)=>{const{prefixCls:r,className:o,rootClassName:a,style:i,children:l,icon:c,color:s,onClose:d,closeIcon:u,closable:f,bordered:p=!0}=e,h=vK(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:m,direction:g,tag:b}=t.useContext(at),[y,x]=t.useState(!0);t.useEffect((()=>{"visible"in h&&x(h.visible)}),[h.visible]);const w=Ld(s),C=function(e){return Dd.includes(e)}(s),S=w||C,E=Object.assign(Object.assign({backgroundColor:s&&!S?s:void 0},null===b||void 0===b?void 0:b.style),i),k=m("tag",r),[j,I,T]=dK(k),A=v()(k,null===b||void 0===b?void 0:b.className,{["".concat(k,"-").concat(s)]:S,["".concat(k,"-has-color")]:s&&!S,["".concat(k,"-hidden")]:!y,["".concat(k,"-rtl")]:"rtl"===g,["".concat(k,"-borderless")]:!p},o,a,I,T),O=e=>{e.stopPropagation(),null===d||void 0===d||d(e),e.defaultPrevented||x(!1)},[,N]=Ix(f,null!==u&&void 0!==u?u:null===b||void 0===b?void 0:b.closeIcon,(e=>null===e?t.createElement(zg,{className:"".concat(k,"-close-icon"),onClick:O}):t.createElement("span",{className:"".concat(k,"-close-icon"),onClick:O},e)),null,!1),R="function"===typeof h.onClick||l&&"a"===l.type,P=c||null,M=P?t.createElement(t.Fragment,null,P,l&&t.createElement("span",null,l)):l,D=t.createElement("span",Object.assign({},h,{ref:n,className:A,style:E}),M,N,w&&t.createElement(hK,{key:"preset",prefixCls:k}),C&&t.createElement(gK,{key:"status",prefixCls:k}));return j(R?t.createElement(Wi,{component:"Tag"},D):D)},yK=t.forwardRef(bK);yK.CheckableTag=pK;const xK=yK;var wK=t.forwardRef((function(e,n){var r,o=e.prefixCls,a=e.forceRender,i=e.className,l=e.style,c=e.children,s=e.isActive,d=e.role,f=u(t.useState(s||a),2),p=f[0],m=f[1];return t.useEffect((function(){(a||s)&&m(!0)}),[a,s]),p?t.createElement("div",{ref:n,className:v()("".concat(o,"-content"),(r={},h(r,"".concat(o,"-content-active"),s),h(r,"".concat(o,"-content-inactive"),!s),r),i),style:l,role:d},t.createElement("div",{className:"".concat(o,"-content-box")},c)):null}));wK.displayName="PanelContent";const CK=wK;var SK=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],EK=t.forwardRef((function(e,n){var r,o,i=e.showArrow,l=void 0===i||i,c=e.headerClass,s=e.isActive,d=e.onItemClick,u=e.forceRender,f=e.className,p=e.prefixCls,g=e.collapsible,b=e.accordion,y=e.panelKey,x=e.extra,w=e.header,C=e.expandIcon,S=e.openMotion,E=e.destroyInactivePanel,k=e.children,j=m(e,SK),I="disabled"===g,T="header"===g,A="icon"===g,O=null!==x&&void 0!==x&&"boolean"!==typeof x,N=function(){null===d||void 0===d||d(y)},R="function"===typeof C?C(e):t.createElement("i",{className:"arrow"});R&&(R=t.createElement("div",{className:"".concat(p,"-expand-icon"),onClick:["header","icon"].includes(g)?N:void 0},R));var P=v()((h(r={},"".concat(p,"-item"),!0),h(r,"".concat(p,"-item-active"),s),h(r,"".concat(p,"-item-disabled"),I),r),f),M={className:v()(c,(h(o={},"".concat(p,"-header"),!0),h(o,"".concat(p,"-header-collapsible-only"),T),h(o,"".concat(p,"-icon-collapsible-only"),A),o)),"aria-expanded":s,"aria-disabled":I,onKeyDown:function(e){"Enter"!==e.key&&e.keyCode!==Vd.ENTER&&e.which!==Vd.ENTER||N()}};return T||A||(M.onClick=N,M.role=b?"tab":"button",M.tabIndex=I?-1:0),t.createElement("div",a({},j,{ref:n,className:P}),t.createElement("div",M,l&&R,t.createElement("span",{className:"".concat(p,"-header-text"),onClick:"header"===g?N:void 0},w),O&&t.createElement("div",{className:"".concat(p,"-extra")},x)),t.createElement(xi,a({visible:s,leavedClassName:"".concat(p,"-content-hidden")},S,{forceRender:u,removeOnLeave:E}),(function(e,n){var r=e.className,o=e.style;return t.createElement(CK,{ref:n,prefixCls:p,className:r,style:o,isActive:s,forceRender:u,role:b?"tabpanel":void 0},k)})))}));const kK=EK;var jK=["children","label","key","collapsible","onItemClick","destroyInactivePanel"];const IK=function(e,n,r){return Array.isArray(e)?function(e,n){var r=n.prefixCls,o=n.accordion,i=n.collapsible,l=n.destroyInactivePanel,c=n.onItemClick,s=n.activeKey,d=n.openMotion,u=n.expandIcon;return e.map((function(e,n){var f=e.children,p=e.label,h=e.key,g=e.collapsible,v=e.onItemClick,b=e.destroyInactivePanel,y=m(e,jK),x=String(null!==h&&void 0!==h?h:n),w=null!==g&&void 0!==g?g:i,C=null!==b&&void 0!==b?b:l,S=!1;return S=o?s[0]===x:s.indexOf(x)>-1,t.createElement(kK,a({},y,{prefixCls:r,key:x,panelKey:x,isActive:S,accordion:o,openMotion:d,expandIcon:u,header:p,collapsible:w,onItemClick:function(e){"disabled"!==w&&(c(e),null===v||void 0===v||v(e))},destroyInactivePanel:C}),f)}))}(e,r):st(n).map((function(e,n){return function(e,n,r){if(!e)return null;var o=r.prefixCls,a=r.accordion,i=r.collapsible,l=r.destroyInactivePanel,c=r.onItemClick,s=r.activeKey,d=r.openMotion,u=r.expandIcon,f=e.key||String(n),p=e.props,h=p.header,m=p.headerClass,g=p.destroyInactivePanel,v=p.collapsible,b=p.onItemClick,y=!1;y=a?s[0]===f:s.indexOf(f)>-1;var x=null!==v&&void 0!==v?v:i,w={key:f,panelKey:f,header:h,headerClass:m,isActive:y,prefixCls:o,destroyInactivePanel:null!==g&&void 0!==g?g:l,openMotion:d,accordion:a,children:e.props.children,onItemClick:function(e){"disabled"!==x&&(c(e),null===b||void 0===b||b(e))},expandIcon:u,collapsible:x};return"string"===typeof e.type?e:(Object.keys(w).forEach((function(e){"undefined"===typeof w[e]&&delete w[e]})),t.cloneElement(e,w))}(e,n,r)}))};function TK(e){var t=e;if(!Array.isArray(t)){var n=f(t);t="number"===n||"string"===n?[t]:[]}return t.map((function(e){return String(e)}))}var AK=t.forwardRef((function(e,n){var r=e.prefixCls,o=void 0===r?"rc-collapse":r,a=e.destroyInactivePanel,i=void 0!==a&&a,l=e.style,c=e.accordion,s=e.className,d=e.children,f=e.collapsible,p=e.openMotion,h=e.expandIcon,m=e.activeKey,g=e.defaultActiveKey,b=e.onChange,y=e.items,x=v()(o,s),w=u(_r([],{value:m,onChange:function(e){return null===b||void 0===b?void 0:b(e)},defaultValue:g,postState:TK}),2),C=w[0],S=w[1];Ie(!d,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var E=IK(y,d,{prefixCls:o,accordion:c,openMotion:p,expandIcon:h,collapsible:f,destroyInactivePanel:i,onItemClick:function(e){return S((function(){return c?C[0]===e?[]:[e]:C.indexOf(e)>-1?C.filter((function(t){return t!==e})):[].concat(nt(C),[e])}))},activeKey:C});return t.createElement("div",{ref:n,className:x,style:l,role:c?"tablist":void 0},E)}));const OK=Object.assign(AK,{Panel:kK}),NK=OK;OK.Panel;const RK=t.forwardRef(((e,n)=>{const{getPrefixCls:r}=t.useContext(at),{prefixCls:o,className:a,showArrow:i=!0}=e,l=r("collapse",o),c=v()({["".concat(l,"-no-arrow")]:!i},a);return t.createElement(NK.Panel,Object.assign({ref:n},e,{prefixCls:l,className:c}))})),PK=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:o,headerPadding:a,collapseHeaderPaddingSM:i,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:c,lineWidth:s,lineType:d,colorBorder:u,colorText:f,colorTextHeading:p,colorTextDisabled:h,fontSizeLG:m,lineHeight:g,lineHeightLG:v,marginSM:b,paddingSM:y,paddingLG:x,paddingXS:w,motionDurationSlow:C,fontSizeIcon:S,contentPadding:E,fontHeight:k,fontHeightLG:j}=e,I="".concat(rn(s)," ").concat(d," ").concat(u);return{[t]:Object.assign(Object.assign({},$r(e)),{backgroundColor:o,border:I,borderBottom:0,borderRadius:c,"&-rtl":{direction:"rtl"},["& > ".concat(t,"-item")]:{borderBottom:I,"&:last-child":{["\n            &,\n            & > ".concat(t,"-header")]:{borderRadius:"0 0 ".concat(rn(c)," ").concat(rn(c))}},["> ".concat(t,"-header")]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:a,color:p,lineHeight:g,cursor:"pointer",transition:"all ".concat(C,", visibility 0s"),["> ".concat(t,"-header-text")]:{flex:"auto"},"&:focus":{outline:"none"},["".concat(t,"-expand-icon")]:{height:k,display:"flex",alignItems:"center",paddingInlineEnd:b},["".concat(t,"-arrow")]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{fontSize:S,svg:{transition:"transform ".concat(C)}}),["".concat(t,"-header-text")]:{marginInlineEnd:"auto"}},["".concat(t,"-icon-collapsible-only")]:{cursor:"unset",["".concat(t,"-expand-icon")]:{cursor:"pointer"}}},["".concat(t,"-content")]:{color:f,backgroundColor:n,borderTop:I,["& > ".concat(t,"-content-box")]:{padding:E},"&-hidden":{display:"none"}},"&-small":{["> ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{padding:i,paddingInlineStart:w,["> ".concat(t,"-expand-icon")]:{marginInlineStart:e.calc(y).sub(w).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:y}}},"&-large":{["> ".concat(t,"-item")]:{fontSize:m,lineHeight:v,["> ".concat(t,"-header")]:{padding:l,paddingInlineStart:r,["> ".concat(t,"-expand-icon")]:{height:j,marginInlineStart:e.calc(x).sub(r).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:x}}},["".concat(t,"-item:last-child")]:{["> ".concat(t,"-content")]:{borderRadius:"0 0 ".concat(rn(c)," ").concat(rn(c))}},["& ".concat(t,"-item-disabled > ").concat(t,"-header")]:{"\n          &,\n          & > .arrow\n        ":{color:h,cursor:"not-allowed"}},["&".concat(t,"-icon-position-end")]:{["& > ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{["".concat(t,"-expand-icon")]:{order:1,paddingInlineEnd:0,paddingInlineStart:b}}}}})}},MK=e=>{const{componentCls:t}=e,n="> ".concat(t,"-item > ").concat(t,"-header ").concat(t,"-arrow svg");return{["".concat(t,"-rtl")]:{[n]:{transform:"rotate(180deg)"}}}},DK=e=>{const{componentCls:t,headerBg:n,paddingXXS:r,colorBorder:o}=e;return{["".concat(t,"-borderless")]:{backgroundColor:n,border:0,["> ".concat(t,"-item")]:{borderBottom:"1px solid ".concat(o)},["\n        > ".concat(t,"-item:last-child,\n        > ").concat(t,"-item:last-child ").concat(t,"-header\n      ")]:{borderRadius:0},["> ".concat(t,"-item:last-child")]:{borderBottom:0},["> ".concat(t,"-item > ").concat(t,"-content")]:{backgroundColor:"transparent",borderTop:0},["> ".concat(t,"-item > ").concat(t,"-content > ").concat(t,"-content-box")]:{paddingTop:r}}}},LK=e=>{const{componentCls:t,paddingSM:n}=e;return{["".concat(t,"-ghost")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-item")]:{borderBottom:0,["> ".concat(t,"-content")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-content-box")]:{paddingBlock:n}}}}}},_K=$o("Collapse",(e=>{const t=Ho(e,{collapseHeaderPaddingSM:"".concat(rn(e.paddingXS)," ").concat(rn(e.paddingSM)),collapseHeaderPaddingLG:"".concat(rn(e.padding)," ").concat(rn(e.paddingLG)),collapsePanelBorderRadius:e.borderRadiusLG});return[PK(t),DK(t),LK(t),MK(t),Bp(t)]}),(e=>({headerPadding:"".concat(e.paddingSM,"px ").concat(e.padding,"px"),headerBg:e.colorFillAlter,contentPadding:"".concat(e.padding,"px 16px"),contentBg:e.colorBgContainer}))),zK=t.forwardRef(((e,n)=>{const{getPrefixCls:r,direction:o,collapse:a}=t.useContext(at),{prefixCls:i,className:l,rootClassName:c,style:s,bordered:d=!0,ghost:u,size:f,expandIconPosition:p="start",children:h,expandIcon:m}=e,g=Yi((e=>{var t;return null!==(t=null!==f&&void 0!==f?f:e)&&void 0!==t?t:"middle"})),b=r("collapse",i),y=r(),[x,w,C]=_K(b);const S=t.useMemo((()=>"left"===p?"start":"right"===p?"end":p),[p]),E=v()("".concat(b,"-icon-position-").concat(S),{["".concat(b,"-borderless")]:!d,["".concat(b,"-rtl")]:"rtl"===o,["".concat(b,"-ghost")]:!!u,["".concat(b,"-").concat(g)]:"middle"!==g},null===a||void 0===a?void 0:a.className,l,c,w,C),k=Object.assign(Object.assign({},Qs(y)),{motionAppear:!1,leavedClassName:"".concat(b,"-content-hidden")}),j=t.useMemo((()=>h?st(h).map(((e,t)=>{var n,r;if(null===(n=e.props)||void 0===n?void 0:n.disabled){const n=null!==(r=e.key)&&void 0!==r?r:String(t),{disabled:o,collapsible:a}=e.props;return ha(e,Object.assign(Object.assign({},rt(e.props,["disabled"])),{key:n,collapsible:null!==a&&void 0!==a?a:o?"disabled":void 0}))}return e})):null),[h]);return x(t.createElement(NK,Object.assign({ref:n,openMotion:k},rt(e,["rootClassName"]),{expandIcon:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=m?m(e):t.createElement(bt,{rotate:e.isActive?90:void 0});return ha(n,(()=>({className:v()(n.props.className,"".concat(b,"-arrow"))})))},prefixCls:b,className:E,style:Object.assign(Object.assign({},null===a||void 0===a?void 0:a.style),s)}),j))}));const BK=Object.assign(zK,{Panel:RK});const FK={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M555.88 488.24h-92.62v-82.79h92.62zm0-286.24h-92.62v85.59h92.62zm109.45 203.45H572.7v82.79h92.62zm-218.9-101.02h-92.61v84.18h92.6zm109.45 0h-92.61v84.18h92.6zm388.69 140.3c-19.65-14.02-67.36-18.23-102.44-11.22-4.2-33.67-23.85-63.14-57.53-89.8l-19.65-12.62-12.62 19.64c-25.26 39.29-32.28 103.83-5.62 145.92-12.63 7.02-36.48 15.44-67.35 15.44H67.56c-12.63 71.56 8.42 164.16 61.74 227.3C181.22 801.13 259.8 832 360.83 832c220.3 0 384.48-101.02 460.25-286.24 29.47 0 95.42 0 127.7-63.14 1.4-2.8 9.82-18.24 11.22-23.85zm-717.04-39.28h-92.61v82.79h92.6zm109.45 0h-92.61v82.79h92.6zm109.45 0h-92.61v82.79h92.6zM336.98 304.43h-92.61v84.19h92.6z"}}]},name:"docker",theme:"outlined"};var HK=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:FK}))};const WK=t.forwardRef(HK);const VK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};var UK=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:VK}))};const KK=t.forwardRef(UK);const GK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-upload",theme:"outlined"};var qK=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:GK}))};const XK=t.forwardRef(qK),YK=e=>{switch(e){case"success":return(0,ng.jsx)(KK,{style:{color:"#52c41a"}});case"error":return(0,ng.jsx)(OI,{style:{color:"#ff4d4f"}});case"uploading":return(0,ng.jsx)(XK,{});default:return(0,ng.jsx)(yl,{spin:!0})}},$K=e=>{let{tasks:t,onDismiss:n}=e;return(0,ng.jsx)(ng.Fragment,{children:t.length>0&&(0,ng.jsx)("div",{style:{position:"fixed",right:20,bottom:20,zIndex:2e3,display:"flex",flexDirection:"column",gap:12,maxWidth:"90vw"},children:t.map((e=>{return(0,ng.jsxs)(Qv,{size:"small",style:{width:320,maxWidth:"100%",boxShadow:"0 4px 16px rgba(0,0,0,0.18)"},children:[(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,fontWeight:"bold"},children:[YK(e.phase),(0,ng.jsx)("span",{children:e.title})]}),("success"===e.phase||"error"===e.phase)&&(0,ng.jsx)(zg,{style:{cursor:"pointer",color:"rgba(0,0,0,0.45)"},onClick:()=>n(e.id)})]}),(0,ng.jsx)(WF,{percent:e.percent,status:(t=e.phase,"success"===t?"success":"error"===t?"exception":"active")}),e.label&&(0,ng.jsx)("div",{style:{fontSize:12,color:"rgba(0,0,0,0.65)",marginTop:4},children:e.label})]},e.id);var t}))})})},JK="transferProgressTasks",QK=(0,t.createContext)(void 0);const ZK=e=>{let{children:n}=e;const[r,o]=(0,t.useState)((()=>function(){try{const e=localStorage.getItem(JK);return e?JSON.parse(e):{}}catch{return{}}}())),a=(0,t.useRef)({});(0,t.useEffect)((()=>{!function(e){try{localStorage.setItem(JK,JSON.stringify(e))}catch(t){console.error(t)}}(r)}),[r]),(0,t.useEffect)((()=>{const e=a.current;return()=>{Object.values(e).forEach(clearInterval)}}),[]);const i=(0,t.useCallback)((e=>{a.current[e]&&(clearInterval(a.current[e]),delete a.current[e])}),[]),l=(0,t.useCallback)(((e,t)=>{o((n=>{const r=n[e];return r?{...n,[e]:{...r,...t}}:n}))}),[]),c=(0,t.useCallback)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5;return i(e),o((r=>({...r,[e]:{id:e,title:t,label:"",percent:0,phase:"uploading",uploadWeight:n}}))),t=>{l(e,{percent:Math.round(t*n)})}}),[i,l]),s=(0,t.useCallback)(((e,t)=>{var n;i(e),o((t=>{var n;const r=t[e],o=null!==(n=null===r||void 0===r?void 0:r.uploadWeight)&&void 0!==n?n:0,a=Math.round(100*o),i=null!==r&&void 0!==r?r:{id:e,title:e,label:"",percent:a,phase:"installing",uploadWeight:o};return{...t,[e]:{...i,percent:Math.max(i.percent,a),phase:"installing"}}}));const r=()=>{t.fetchStatus().then((n=>{const r=t.mapStatus(n);o((t=>{const n=t[e];if(!n)return t;const o=n.uploadWeight;let a;if("number"===typeof r.percent)a=Math.round(100*o+(1-o)*r.percent);else if("success"===r.phase)a=100;else if("installing"===r.phase){const e=Math.round(100*o+90*(1-o));a=Math.min(n.percent+2,e)}else a=n.percent;return{...t,[e]:{...n,phase:r.phase,label:r.label,percent:a}}})),"success"!==r.phase&&"error"!==r.phase||i(e)})).catch((e=>{console.error(e)}))};r(),a.current[e]=setInterval(r,null!==(n=t.intervalMs)&&void 0!==n?n:2e3)}),[i]),d=(0,t.useCallback)((e=>r[e]),[r]),u=(0,t.useCallback)((e=>{i(e),o((t=>{if(!(e in t))return t;const n={...t};return delete n[e],n}))}),[i]),f=Object.values(r);return(0,ng.jsxs)(QK.Provider,{value:{tasks:f,startUpload:c,beginMonitor:s,getSnapshot:d,dismiss:u},children:[n,(0,ng.jsx)($K,{tasks:f,onDismiss:u})]})};var eG=function(e){return e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.END_OK=2]="END_OK",e[e.END_KO=3]="END_KO",e}(eG||{});const tG="wg-update",nG=()=>{var e;const{translate:n}=og(),{startUpload:r,beginMonitor:o,getSnapshot:a,dismiss:i}=(()=>{const e=(0,t.useContext)(QK);if(!e)throw new Error("useTransferProgress must be used within a TransferProgressProvider");return e})(),[l,c]=(0,t.useState)(),[s,d]=mE(((e,t)=>cE(e,t)),[]),[u,f]=mE(((e,t)=>cE(e,t)),[]),[p,h]=(0,t.useState)([]),[m,g]=mE(((e,t)=>cE(e,t)),[]),[v,b]=mE(((e,t)=>cE(e,t)),[]),[y,x]=(0,t.useState)(),[w,C]=(0,t.useState)(),S=()=>({fetchStatus:()=>cE(SS,GC(),!1),mapStatus:e=>(c({status:e.code,message:e.message}),e.code===eG.END_OK?(d(qS,GC()),{phase:"success",label:e.message}):e.code===eG.END_KO?{phase:"error",label:e.message}:{phase:"installing",label:e.message})});(0,t.useEffect)((()=>{d(qS,GC()),f(SS,GC()),g(rE,GC()),b("/container/onlinever",GC())}),[]),(0,t.useEffect)((()=>{if(!u.value)return;const e=u.value,t=a(tG);e.code===eG.RUNNING?(c({status:e.code,message:e.message}),o(tG,S())):"uploading"===(null===t||void 0===t?void 0:t.phase)?c({status:eG.RUNNING,message:t.label}):(c({status:e.code,message:e.message}),t&&"success"!==t.phase&&"error"!==t.phase&&i(tG))}),[u]),(0,t.useEffect)((()=>{s.value&&h([...s.value])}),[s]),(0,t.useEffect)((()=>{m.value&&x(m.value)}),[m]),(0,t.useEffect)((()=>{v.value&&C(v.value)}),[v]);const E=n("wgUpdateTitle","Web Garage"),k=null===w||void 0===w?void 0:w.error,j=null!==y&&void 0!==y&&y.error||null===y||void 0===y?void 0:y.version,I=!k&&!!w&&((e,t)=>{if(!e)return!1;if(!t)return!0;const n=e.split(".").map((e=>parseInt(e,10)||0)),r=t.split(".").map((e=>parseInt(e,10)||0));for(let i=0;i<Math.max(n.length,r.length);i++){var o,a;const e=null!==(o=n[i])&&void 0!==o?o:0,t=null!==(a=r[i])&&void 0!==a?a:0;if(e!==t)return e>t}return!1})(w.version,j),T=[{title:n("id"),dataIndex:"id",key:"id",width:150,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:n("id")}),(0,ng.jsx)("span",{children:e})]})},{title:"Repository",dataIndex:"repository",key:"repository",width:250,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"Repository"}),(0,ng.jsx)("span",{children:e})]})},{title:"Tag",dataIndex:"tag",key:"tag",width:150,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(xK,{color:"blue",className:"xs-column-title",children:"Tag"}),(0,ng.jsx)(xK,{color:"blue",children:e})]})},{title:n("version"),dataIndex:"version",key:"version",width:150,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"Size"}),(0,ng.jsx)("span",{children:e})]})},{title:n("finVersion"),dataIndex:"finVersion",key:"finVersion",width:150,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"Size"}),(0,ng.jsx)("span",{children:e})]})},{title:"Size",dataIndex:"size",key:"size",width:150,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"Size"}),(0,ng.jsx)("span",{children:e})]})},{title:n("action"),width:50,className:"col-center",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:n("action")}),(0,ng.jsx)(Hd,{title:t.defaultImage?n("deleteDockerNotAllowed"):"",children:(0,ng.jsx)(hc,{children:(0,ng.jsx)(Hd,{title:t.defaultImage?"":n("deleteDocker"),children:(0,ng.jsx)(IN,{title:n("titleAreYouSure"),onConfirm:async()=>{try{await uE("/container/image",t.id,JSON.stringify({repository:t.repository,tag:t.tag}),GC()),await d(qS,GC()),ak.success(n("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(n(e.message))}},cancelText:n("cancel"),okText:n("ok"),children:(0,ng.jsx)(ac,{disabled:t.defaultImage,icon:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})})]})}],A=[{key:"1",label:n("advanced"),children:(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:50},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(WK,{style:{fontWeight:"bold",fontSize:"28px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("dockerImages")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("dockerManage")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(k_,{bordered:!0,rowKey:e=>e.id,columns:T,dataSource:p,size:"small"})})})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(Hd,{title:n("deleteDockerDetail"),children:(0,ng.jsx)(IN,{title:n("titleAreYouSure"),onConfirm:async()=>{try{await uE(qS,"","",GC()),await d(qS,GC()),ak.success(n("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(n(e.message))}},cancelText:n("cancel"),okText:n("ok"),children:(0,ng.jsxs)(hc,{children:[n("deleteDockerDetail"),(0,ng.jsx)(ac,{icon:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})]})})})})})})]})]})}];return(0,ng.jsx)("div",{children:(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(vB,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("webUpdate")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("updFromWeb")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(IN,{title:k?n("serverUnable"):I?(0,ng.jsxs)(ng.Fragment,{children:[n("newVersionAvailable"),(0,ng.jsx)("br",{}),n("localVersion"),": ",j||n("notAvailable"),(0,ng.jsx)("br",{}),n("finVersion"),": ",(null===w||void 0===w?void 0:w.finVersion)||n("notAvailable"),(0,ng.jsx)("br",{}),n("wgVersion",null!==(e="Web Garage")?e:""),": ",(null===w||void 0===w?void 0:w.version)||n("notAvailable")]}):n("noUpdAvailable"),showCancel:I,onConfirm:async()=>{I&&(async()=>{const e={};c({status:eG.READY,message:""});try{r(tG,E,0),await sE("/container/update/web",JSON.stringify(e),GC(),!1).then((()=>{o(tG,S())})).catch((e=>{console.log(e),i(tG)}))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(n(t.message)),i(tG)}})()},cancelText:n("cancel"),okText:n(I?"update":"ok"),children:(0,ng.jsx)(ac,{disabled:(null===l||void 0===l?void 0:l.status)===eG.RUNNING,icon:(0,ng.jsx)(vB,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(lH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("fileUpdate")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("updFromFile")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(IN,{title:(0,ng.jsxs)(ng.Fragment,{children:[n("checkMaintence"),(0,ng.jsx)("br",{}),n("titleAreYouSure")]}),okText:(0,ng.jsx)(tH,{customRequest:async e=>{const{file:t}=e;c({status:eG.READY,message:""});try{const e=r(tG,E,.5);await fE({request:"/container/update/file",file:t,token:GC(),loader:!1,onProgress:t=>{const n=t.total?Math.round(t.loaded/t.total*100):0;e(n)}}).then((()=>{o(tG,S())})).catch((e=>{console.log(e),i(tG)}))}catch(a){if(null!==a&&void 0!==a&&a.globalHandled)return;ak.error(n(a.message)),i(tG)}},showUploadList:!1,children:(0,ng.jsx)("span",{style:{color:"white"},children:n("ok")})}),cancelText:n("cancel"),children:(0,ng.jsx)(ac,{disabled:(null===l||void 0===l?void 0:l.status)===eG.RUNNING,icon:(0,ng.jsx)(lH,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsx)(BK,{ghost:!0,items:A,style:{marginTop:20}})]})})};const rG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"};var oG=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:rG}))};const aG=t.forwardRef(oG);const iG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 418.7C765.6 297.9 648.9 212 512.2 212S258.8 297.8 213 418.6C127.3 441.1 64 519.1 64 612c0 110.5 89.5 200 199.9 200h496.2C870.5 812 960 722.5 960 612c0-92.7-63.1-170.7-148.6-193.3zm36.3 281a123.07 123.07 0 01-87.6 36.3H263.9c-33.1 0-64.2-12.9-87.6-36.3A123.3 123.3 0 01140 612c0-28 9.1-54.3 26.2-76.3a125.7 125.7 0 0166.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10c54.3 14.5 92.1 63.8 92.1 120 0 33.1-12.9 64.3-36.3 87.7z"}}]},name:"cloud",theme:"outlined"};var lG=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:iG}))};const cG=t.forwardRef(lG),sG=()=>{var e;const{translate:n}=og(),[r,o]=(0,t.useState)(),[a,i]=(0,t.useState)({hostId:""}),l=(0,t.useRef)(),[c,s]=(0,t.useState)(),[d,u]=mE(((e,t,n)=>cE(e,t,n)),[]),[f,p]=mE(((e,t,n)=>cE(e,t,n)),[]),[h,m]=mE(((e,t)=>cE(e,t)),[]);return(0,t.useEffect)((()=>{d.value&&o(d.value)}),[d]),(0,t.useEffect)((()=>{f.value&&i(f.value)}),[f]),(0,t.useEffect)((()=>{h.value&&s(h.value)}),[h]),(0,t.useEffect)((()=>(p(WS,GC(),!1),m(rE,GC()),l.current=setInterval((()=>{u(HS,GC(),!1)}),5e3),()=>{clearInterval(l.current)})),[]),(0,ng.jsx)("div",{children:(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)("div",{className:"fin-prod-icon"})}),(0,ng.jsxs)(Zz,{span:22,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("containerStatus")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("containerInfo")})})]})]}),"{}"!==JSON.stringify(r)?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:2,style:{display:"flex",justifyContent:"end",alignItems:"center",paddingRight:"5px",paddingTop:"16px"},children:(0,ng.jsx)(tm,{arrow:!1,content:(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{gutter:24,style:{marginTop:5},children:[(0,ng.jsx)(Zz,{span:8,style:{fontWeight:"bold"},children:(0,ng.jsxs)("span",{children:[n("containerId"),":"]})}),(0,ng.jsx)(Zz,{span:6,children:r?(0,ng.jsxs)("span",{children:[null===r||void 0===r?void 0:r.containerId," "]}):(0,ng.jsx)(jg,{active:!0,size:"small",style:{width:"8vw"}})})]}),(0,ng.jsxs)(qz,{gutter:24,style:{marginTop:5},children:[(0,ng.jsx)(Zz,{span:8,style:{fontWeight:"bold"},children:(0,ng.jsxs)("span",{children:[n("containerName"),":"]})}),(0,ng.jsx)(Zz,{span:6,children:r?(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.containerName}):(0,ng.jsx)(jg,{active:!0,size:"small",style:{width:"8vw"}})})]}),(0,ng.jsxs)(qz,{gutter:24,style:{marginTop:5},children:[(0,ng.jsx)(Zz,{span:8,style:{fontWeight:"bold"},children:(0,ng.jsxs)("span",{children:[n("image"),":"]})}),(0,ng.jsx)(Zz,{span:6,children:r?(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.image}):(0,ng.jsx)(jg,{active:!0,size:"small",style:{width:"8vw"}})})]})]}),trigger:"hover",children:(0,ng.jsx)(Tz,{style:{cursor:"pointer"}})})}),(0,ng.jsx)(Zz,{span:20,children:(0,ng.jsxs)(qz,{gutter:24,style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:4,style:{fontWeight:"bold"},children:(0,ng.jsxs)("span",{children:[n("hostId"),":"]})}),(0,ng.jsx)(Zz,{span:18,children:a.hostId?(0,ng.jsx)("span",{children:null!==r&&void 0!==r&&r.status.toLowerCase().startsWith("up")?a.hostId:n("serviceNotRun")}):(0,ng.jsx)(Dg.Input,{active:!0,size:"small",style:{width:"15vw"}})})]})})]}),(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:2,style:{display:"flex",justifyContent:"end",alignItems:"center",paddingRight:"5px",paddingTop:"16px"}}),(0,ng.jsx)(Zz,{span:20,children:(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:4,style:{fontWeight:"bold"},children:(0,ng.jsxs)("span",{children:[n("wgVersion",null!==(e="Web Garage")?e:""),":"]})}),(0,ng.jsx)(Zz,{span:18,children:a.hostId?(0,ng.jsx)("span",{children:null!==c&&void 0!==c&&c.error?"".concat(n("error"),": ").concat(c.error):(null===c||void 0===c?void 0:c.version)||n("notAvailable")}):(0,ng.jsx)(Dg.Input,{active:!0,size:"small",style:{width:"15vw"}})})]})})]}),(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:2,style:{display:"flex",justifyContent:"end",alignItems:"center",paddingRight:"5px",paddingTop:"16px"}}),(0,ng.jsx)(Zz,{span:20,children:(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:4,style:{fontWeight:"bold"},children:(0,ng.jsxs)("span",{children:[n("finVersion"),":"]})}),(0,ng.jsx)(Zz,{span:18,children:a.hostId?(0,ng.jsx)("span",{children:null!==c&&void 0!==c&&c.error?"".concat(n("error"),": ").concat(c.error):(null===c||void 0===c?void 0:c.finVersion)||n("notAvailable")}):(0,ng.jsx)(Dg.Input,{active:!0,size:"small",style:{width:"15vw"}})})]})})]}),(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsxs)(Zz,{span:20,children:[(0,ng.jsxs)(qz,{gutter:24,style:{marginTop:40,fontWeight:"bold"},children:[(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)("span",{children:n("created")})}),(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:n("status")})}),(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:n("cpuUsage")})}),(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:n("ramUsage")})}),(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:n("memUsage")})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:6,children:r?(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.created}):(0,ng.jsx)(Eg,{active:!0,size:"small",style:{width:"8vw"}})}),(0,ng.jsx)(Zz,{span:4,children:r?(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.status}):(0,ng.jsx)(Eg,{active:!0,size:"small",style:{width:"8vw"}})}),(0,ng.jsx)(Zz,{span:4,children:r?(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.cpu}):(0,ng.jsx)(Eg,{active:!0,size:"small",style:{width:"8vw"}})}),(0,ng.jsx)(Zz,{span:4,children:r?(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.mem}):(0,ng.jsx)(Eg,{active:!0,size:"small",style:{width:"8vw"}})}),(0,ng.jsx)(Zz,{span:4,children:r?(0,ng.jsx)("span",{children:null===r||void 0===r?void 0:r.memUsage}):(0,ng.jsx)(Eg,{active:!0,size:"small",style:{width:"8vw"}})})]})]})]})]}):(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{span:20,children:(0,ng.jsx)("span",{children:n("service")+" ".concat("Web Garage"," ")+n("notFound")})})]})}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(oH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:22,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("restartDocker")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("restartDocker")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(IN,{title:n("titleAreYouSure"),onConfirm:async()=>{try{await sE(ES,JSON.stringify({delay:0}),GC()),ak.success(n("ok")),await p(WS,GC(),!1)}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(n(e.message))}},cancelText:n("cancel"),okText:n("ok"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(oH,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:50},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(aG,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("stopDocker")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("stopDocker")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(IN,{title:n("titleAreYouSure"),onConfirm:async()=>{try{await sE("/container/shutdown",JSON.stringify({delay:0}),GC()),ak.success(n("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(n(e.message))}},cancelText:n("cancel"),okText:n("ok"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(aG,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})})]}),(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:50},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(cG,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:n("cloudSuscribe")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:n("unsuscribeCloud")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(IN,{title:n("titleAreYouSure"),onConfirm:async()=>{try{await uE("/container/cloudregistration","","",GC()),ak.success(n("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(n(e.message))}},cancelText:n("cancel"),okText:n("ok"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})})]})]})})},dG=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)(""),[o,a]=(0,t.useState)(100),[i,l]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{l(FS,GC())}),[]),(0,t.useEffect)((()=>{i.value&&r(i.value)}),[i]);return(0,ng.jsx)("div",{children:(0,ng.jsx)("div",{className:"custom-panel",children:(0,ng.jsx)(qz,{align:"middle",children:(0,ng.jsxs)(Zz,{span:1,xs:24,children:[(0,ng.jsx)(Ij,{rows:10,placeholder:"Log",value:n,style:{fontFamily:"monospace"}}),(0,ng.jsxs)(hc.Compact,{style:{width:"350px",marginTop:"20px"},children:[(0,ng.jsx)(xN,{addonBefore:e("rowNumber"),defaultValue:100,onChange:e=>{a(Number(e))}}),(0,ng.jsx)(ac,{type:"primary",onClick:async()=>{(async()=>{try{await cE(FS,GC(),!1,o.toString()).then((e=>{r(e)})).catch((e=>{console.log(e)}))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}})()},children:e("ok")})]})]})})})})};var uG=function(e){return e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.END_OK=2]="END_OK",e[e.END_KO=3]="END_KO",e}(uG||{});const fG=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(!1),[c,s]=(0,t.useState)(!1),[d,u]=(0,t.useState)(),[f,p]=(0,t.useState)({hostId:""}),[h,m]=mE(((e,t)=>cE(e,t)),[]),[g,v]=mE(((e,t,n)=>cE(e,t,n)),[]);(0,t.useEffect)((()=>{b(),v(WS,GC(),!1)}),[]),(0,t.useEffect)((()=>{h.value&&u(h.value)}),[h]),(0,t.useEffect)((()=>{g.value&&p(g.value)}),[g]);const b=()=>{m("/container/license/info",GC())},y=t=>{const n=t.find((e=>e.startsWith("expires="))),r=t.find((e=>e.startsWith("maintDue=")));if(n||r){const t=null===n||void 0===n?void 0:n.split("=")[1],o=null===r||void 0===r?void 0:r.split("=")[1];if(t){const n=new Date(t);return new Date((new Date).toISOString().split("T")[0])<=n?(ak.success(e("validLic")),!0):(ak.warning(e("licExpired")+n.toString().split(" 02:00:00 GMT")[0]),!0)}if(o){const t=new Date(o);return new Date((new Date).toISOString().split("T")[0])<=t?(ak.success(e("validLic")),!0):(ak.warning(e("licExpired")+t.toString().split(" 02:00:00 GMT")[0]),!0)}}return ak.warning("Err: expires/maintDue"),!0};return(0,ng.jsx)("div",{children:(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(tz,{style:{fontWeight:"bold",fontSize:"22px"}})}),d&&"ok"===d.status?(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:e("license")})}),(0,ng.jsxs)(qz,{style:{borderBottom:"1px dashed #dcdcdc"},children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:e("hostId")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",style:{width:"15px"},children:":"})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:null===d||void 0===d?void 0:d.hostId})})]}),(0,ng.jsxs)(qz,{style:{borderBottom:"1px dashed #dcdcdc"},children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:e("hisPoints")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",style:{width:"15px"},children:":"})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:null===d||void 0===d?void 0:d.points})})]}),(0,ng.jsxs)(qz,{style:{borderBottom:"1px dashed #dcdcdc"},children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:e("pointAux")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",style:{width:"15px"},children:":"})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:null===d||void 0===d?void 0:d.auxPoints})})]}),(0,ng.jsxs)(qz,{style:{borderBottom:"1px solid #d0d0d0"},children:[(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:e("maintDue")})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",style:{width:"15px"},children:":"})}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:null===d||void 0===d?void 0:d.maintDue})})]})]}):(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:e("license")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #d0d0d0"},children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)("span",{className:"label-lic",children:e("noLicIntalled")})})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsxs)(Zz,{children:[(0,ng.jsx)(IN,{title:e("titleAreYouSure"),onConfirm:async()=>{(async()=>{try{a(!0),await uE("/container/license/remove","","",GC()),a(!1),b()}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message)),a(!1)}})()},cancelText:e("cancel"),okText:e("ok"),children:(0,ng.jsx)(ac,{disabled:"ok"!==(null===d||void 0===d?void 0:d.status),icon:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})}),(0,ng.jsx)(rD,{spinning:o,indicator:(0,ng.jsx)(yl,{style:{fontSize:24},spin:!0})})]})})})]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(lH,{style:{fontWeight:"bold",fontSize:"22px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:e("install")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:e("uploadLic")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsxs)(Zz,{children:[(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsxs)(Zz,{children:[(0,ng.jsx)(tH,{customRequest:async t=>{const{file:n}=t;r({status:uG.READY,message:""});try{l(!0),s(!0),await fE({request:"/container/license/upload",file:n,token:GC(),loader:!1}),l(!1),b()}catch(o){if(null!==o&&void 0!==o&&o.globalHandled)return;ak.error(e(o.message)),l(!1)}},showUploadList:!1,accept:".props",beforeUpload:t=>{var n;return null!==(n=t.name)&&void 0!==n&&n.includes(".props")?new Promise((n=>{const r=new FileReader;r.onload=t=>{var r;if(null!==(r=t.target)&&void 0!==r&&r.result){const r=t.target.result.split(/\r?\n/),o=r.find((e=>e.startsWith("licensee=")));if(o){if(o.split("=")[1].includes("training"))return void n(y(r));{const t=r.find((e=>e.startsWith("hostId=")));if(t){const o=null===t||void 0===t?void 0:t.split("=")[1];return o===f.hostId?void n(y(r)):(ak.error((0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(ng.Fragment,{children:e("diffHostId")}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)("div",{style:{textAlign:"left"},children:[(0,ng.jsxs)(ng.Fragment,{children:[e("hostId"),": ",f.hostId]}),(0,ng.jsx)("br",{}),(0,ng.jsxs)(ng.Fragment,{children:[e("hostIdFound"),o]})]})]})),void n(!1))}}}}ak.error(e("notValidLic")),n(!1)},r.readAsText(t)})):(ak.error(e("invalidFile")),!1)},maxCount:1,children:(0,ng.jsx)(ac,{disabled:"ok"===(null===d||void 0===d?void 0:d.status),icon:(0,ng.jsx)(lH,{style:{color:"gray",fontSize:"18px"}},"setting")})}),(0,ng.jsx)(rD,{spinning:i,indicator:(0,ng.jsx)(yl,{style:{fontSize:24},spin:!0})})]})}),(0,ng.jsx)(qz,{children:(0,ng.jsx)(Zz,{children:c&&(0,ng.jsx)("span",{children:null===n||void 0===n?void 0:n.message})})})]})]})]})})},pG=()=>{const{translate:e}=og(),[n,r]=UC.useModal(),o="Web Garage";(0,t.useEffect)((()=>{cE("/container/repo/config",GC(),!1).then((t=>{console.log("data",t),"error"===t.status&&"awsNotInstalled"===t.errDescr&&n.warning({title:e("attenzione"),content:e("warningAWSCLI",o)})})).catch((e=>{console.log(e)}))}),[]);const a=[{key:"1",label:(0,ng.jsx)("span",{children:e("status")}),children:(0,ng.jsx)(sG,{})},{key:"2",label:(0,ng.jsx)("span",{children:e("swUpdate")}),children:(0,ng.jsx)(nG,{})},{key:"3",label:(0,ng.jsx)("span",{children:e("licenseSett")}),children:(0,ng.jsx)(fG,{})},{key:"4",label:(0,ng.jsx)("span",{children:e("projects")}),children:(0,ng.jsx)(lK,{})},{key:"5",label:(0,ng.jsx)("span",{children:e("log")}),children:(0,ng.jsx)(dG,{})}];return(0,ng.jsxs)("div",{className:"card-container",children:[r,(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("webGarageSettings").replace("container",o.toString())})}),(0,ng.jsx)(Qv,{children:(0,ng.jsx)(Mv,{defaultActiveKey:"1",items:a,destroyInactiveTabPane:!0})})]})},hG=e=>{let{clearToken:n,setIsVisible:r,isVisible:o}=e;const[a,i]=(0,t.useState)(!1),{translate:l}=og(),c=Wm();return(0,t.useEffect)((()=>{a&&r(!1),a&&n()}),[a,n]),(0,ng.jsx)(ng.Fragment,{children:a&&c("/")||(0,ng.jsx)(UC,{title:"logout",open:o,onOk:async function(){try{await sE("/account/logout",JSON.stringify({username:$C()}),GC()),XC(),JC(),i(!0)}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(l(e.message))}},onCancel:()=>r(!1),cancelText:l("cancel"),okText:l("ok"),children:l("confirmLogout")})})},mG=e=>{let{dataSource:n,setBipConf:r,port:o,onRefresh:a}=e;const{translate:i}=og(),[l,c]=(0,t.useState)([]),[s,d]=(0,t.useState)([]),[u,f]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),[m,g]=(0,t.useState)(!1),[v,b]=mE(((e,t,n)=>cE(e,t,n)),[]),y=(0,t.useRef)(!1),x=(0,t.useRef)(!1),w=(0,t.useRef)(null);(0,t.useEffect)((()=>{const e=document.createElement("div");e.setAttribute("id","loader"),e.classList.add("loader","loader--hide");let t=document.getElementById("bbdm_".concat(o));return t.appendChild(e),w.current=e,()=>{w.current&&t.removeChild(w.current)}}),[]),(0,t.useEffect)((()=>{b("".concat(RS,"/").concat(o,"/bbmd"),GC(),!1)}),[o,b]),(0,t.useEffect)((()=>{if(y.current=!!v.loading,v.value){const e="enabled"===v.value.default;p?m?e===u&&g(!1):f(e):(f(e),h(!0),g(!1))}}),[v,p,m,u,i]),(0,t.useEffect)((()=>{const e=n.map(((e,t)=>({...e,key:t})));c(e)}),[n]),(0,t.useEffect)((()=>{d(p?u?l:l.filter((e=>!1===e.default)):l)}),[l,u,p]);const C=e=>{c(e);const t=e.map((e=>{let{key:t,...n}=e;return n}));r("bbmd",t)},S=(e,t,n)=>{const r=l.map((r=>r.key===e?{...r,[t]:n}:r));C(r)},E=[{title:i("ipAddress"),dataIndex:"ip_addr",key:"ip_addr",width:200,render:(e,t)=>(0,ng.jsx)(Aj,{disabled:t.default,defaultValue:e,onChange:e=>S(t.key,"ip_addr",e.target.value)})},{title:"subnet mask",dataIndex:"ip_mask",key:"ip_mask",width:200,render:(e,t)=>(0,ng.jsx)(Aj,{disabled:t.default,defaultValue:e,onChange:e=>S(t.key,"ip_mask",e.target.value)})},{title:i("port"),dataIndex:"port",key:"port",width:150,render:(e,t)=>(0,ng.jsx)(xN,{disabled:t.default,defaultValue:e,min:0,onChange:e=>S(t.key,"port",null!==e&&void 0!==e?e:0)})},{title:i("actions"),key:"actions",width:100,render:(e,t)=>(0,ng.jsx)(IN,{title:i("titleAreYouSure"),onConfirm:()=>(e=>{const t=l.filter((t=>t.key!==e));C(t),ak.success(i("ok"))})(t.key),children:(0,ng.jsx)(ac,{disabled:t.default,icon:(0,ng.jsx)(kz,{})})})}];return(0,ng.jsxs)("div",{children:[(0,ng.jsxs)(hc,{style:{marginBottom:20},size:"large",children:[(0,ng.jsxs)(ac,{type:"dashed",icon:(0,ng.jsx)(Hg,{}),onClick:()=>{const e={key:n.length+1,ip_addr:"",ip_mask:"",port:0,valid:!0,default:!1};C([...l,e])},children:[i("add")," BBMD"]}),(0,ng.jsx)("div",{className:"custom-switch",children:(0,ng.jsx)(yI,{checked:u,onChange:async e=>{f(e),g(!0);try{const t={default:e?"enabled":"disabled"};await dE("".concat(RS,"/").concat(o,"/bbmd"),JSON.stringify(t),GC()),(()=>{if(x.current)return;x.current=!0,w.current?w.current.classList.remove("loader--hide"):uS();let e=0;const t=async()=>{if(e>=4)return x.current=!1,w.current?w.current.classList.add("loader--hide"):fS(),void ak.success(i("ok"));if(!y.current){e+=1;try{await b("".concat(RS,"/").concat(o,"/bbmd"),GC(),!1),await a()}catch(n){console.error("Errore polling BBMD:",n)}}setTimeout(t,5e3)};t()})()}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(i(t.message)),f((e=>!e)),g(!1)}},checkedChildren:i("bbmdDefaultActive"),unCheckedChildren:i("bbmdDefaultDeActive")})})]}),(0,ng.jsx)(k_,{id:"bbdm_".concat(o),size:"small",style:{width:"50vw"},columns:E,dataSource:s,pagination:!1,rowKey:"key"})]})},gG=e=>{var t,n,r;let{data:o,setData:a,setShowDialog:i,networkInfo:l,setJustEdit:c,port:s,onRefresh:d}=e;const{translate:u}=og(),f=null===l||void 0===l||null===(t=l.interfaces.find((e=>e.id===o.bacnet_conf.bip_conf.iface_name)))||void 0===t?void 0:t.name,p=null===l||void 0===l||null===(n=l.interfaces.find((e=>e.id===o.bacnet_conf.bip_conf.iface_name)))||void 0===n?void 0:n.ip,h=(e,t,n)=>{if(o){const r={...o};r[e][t]=n,a({...r}),i(!0),c(!0)}},m=(e,t)=>{if(o){const n={...o.bacnet_conf.mstp_conf};n[e]=t,h("bacnet_conf","mstp_conf",{...n})}},g=(e,t)=>{if(o){const n={...o.bacnet_conf.bip_conf};n[e]=t,h("bacnet_conf","bip_conf",{...n})}},v=()=>o.bacnet_conf.bip_conf.ip_net===o.bacnet_conf.mstp_conf.mstp_net?"error":"",b=[{key:"1",label:(0,ng.jsx)("b",{children:u("bacnetBMDSettings")}),children:(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px",justifyContent:"left"},children:(0,ng.jsx)(mG,{dataSource:o.bacnet_conf.bip_conf.bbmd.map((e=>({...e}))),setBipConf:g,port:s,onRefresh:d})})})}];return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(RH,{direction:"horizontal",children:[{label:u("name"),input:(0,ng.jsx)(Aj,{style:{width:"200px"},value:o.bacnet_conf.device_name,onChange:e=>{h("bacnet_conf","device_name",e.target.value)}})},{label:u("deviceInstance"),input:(0,ng.jsx)(xN,{style:{width:"150px"},value:o.bacnet_conf.device_instance,min:0,onChange:e=>{null!=e&&h("bacnet_conf","device_instance",+e.toString().replaceAll(".",""))}})}]}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)("div",{style:{display:"flex",gap:"20px",justifyContent:"left",flexWrap:"wrap",flexDirection:"column"},children:[(0,ng.jsx)(RH,{subtitle:u("settingBACnetMSTP"),children:[{label:u("macAddress"),input:(0,ng.jsx)(xN,{style:{width:"150px"},value:o.bacnet_conf.mstp_conf.mstp_bac_mac,min:0,onChange:e=>{null!=e&&m("mstp_bac_mac",+e.toString().replaceAll(".",""))}})},{label:u("baudRate"),input:(0,ng.jsx)(HO,{style:{width:"150px"},value:o.bacnet_conf.mstp_conf.mstp_uart_baud,options:[{label:9600,value:9600},{label:19200,value:19200},{label:38400,value:38400},{label:57600,value:57600},{label:76800,value:76800},{label:115200,value:115200}],onSelect:e=>{m("mstp_uart_baud",e)}})},{label:u("maxInfoFrames"),input:(0,ng.jsx)(xN,{style:{width:"150px"},value:o.bacnet_conf.mstp_conf.mstp_max_info_frames,min:0,onChange:e=>{null!=e&&m("mstp_max_info_frames",+e.toString().replaceAll(".",""))}})},{label:u("maxMasters"),input:(0,ng.jsx)(xN,{style:{width:"150px"},value:o.bacnet_conf.mstp_conf.mstp_max_masters,min:0,onChange:e=>{null!=e&&m("mstp_max_masters",+e.toString().replaceAll(".",""))}})},{label:u("bacnetMSTPNetwork"),input:(0,ng.jsx)(xN,{style:{width:"150px"},value:o.bacnet_conf.mstp_conf.mstp_net,min:0,status:v(),onChange:e=>{null!=e&&m("mstp_net",+e.toString().replaceAll(".",""))}})}]}),(0,ng.jsx)(hB,{}),(0,ng.jsx)("h4",{children:u("bacnetIpsetting")}),(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"flex-start",alignItems:"center"},children:[(0,ng.jsx)("div",{style:{textAlign:"center",padding:"10px"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center"},children:[(0,ng.jsx)(wE,{style:{fontSize:"20px"}}),(0,ng.jsx)("span",{style:{fontSize:"10px"},children:"br0"===o.bacnet_conf.bip_conf.iface_name?u("all"):f})]})}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",color:"gray",fontSize:"12px"},children:[(0,ng.jsxs)("span",{children:[(0,ng.jsx)("strong",{children:u("ipAddress")}),": ","br0"===o.bacnet_conf.bip_conf.iface_name?null===l||void 0===l||null===(r=l.interfaces.find((e=>"eth0"===e.id)))||void 0===r?void 0:r.ip:p]}),(0,ng.jsxs)("span",{children:[(0,ng.jsx)("strong",{children:u("udpPort")}),": ",o.bacnet_conf.bip_conf.bacnet_port]})]})})]}),(0,ng.jsx)(RH,{children:[{label:u("bacnetIPNetwork"),input:(0,ng.jsx)(xN,{style:{width:"150px"},value:o.bacnet_conf.bip_conf.ip_net,status:v(),min:0,step:1,onChange:e=>{null!=e&&g("ip_net",+e.toString().replaceAll(".",""))}})},{label:u("natEnable"),input:(0,ng.jsx)(yI,{checked:1===o.bacnet_conf.bip_conf.nat_forward_enable,onClick:e=>{g("nat_forward_enable",e?1:0)}})},{label:u("natIp"),input:(0,ng.jsx)(Aj,{style:{width:"150px"},value:o.bacnet_conf.bip_conf.nat_forward_site,disabled:0===o.bacnet_conf.bip_conf.nat_forward_enable,onChange:e=>{g("nat_forward_site",e.target.value)}})},{label:u("natPort"),input:(0,ng.jsx)(xN,{style:{width:"150px"},value:o.bacnet_conf.bip_conf.nat_forward_port,disabled:0===o.bacnet_conf.bip_conf.nat_forward_enable,onChange:e=>{null!=e&&g("nat_forward_port",+e.toString().replaceAll(".",""))}})}]})]}),(0,ng.jsx)(hB,{}),(0,ng.jsx)(BK,{ghost:!0,items:b,style:{marginTop:20}})]})},vG=(0,t.memo)(gG);function bG(e){let{data:t,setData:n,setShowDialog:r,networkInfo:o,title:a,onSave:i,justEdit:l,setJustEdit:c,port:s,onRefresh:d}=e;return(0,ng.jsxs)(Qv,{bordered:!1,title:a,className:"modbusCard",children:[(0,ng.jsx)(vG,{data:t,setData:n,setShowDialog:r,networkInfo:o,setJustEdit:c,port:s,onRefresh:d}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(II,{justEdit:l,disabled:t.bacnet_conf.bip_conf.ip_net===t.bacnet_conf.mstp_conf.mstp_net,onClick:i})})]})}const yG=(0,t.memo)(bG),xG=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)(!1),[o,a]=(0,t.useState)(100),[i,l]=(0,t.useState)(),[c,s]=(0,t.useState)(),[d,u]=(0,t.useState)([]),[f,p]=(0,t.useState)(),h=i&&!!Object.keys(i).length,m=c&&!!Object.keys(c).length,[g,v]=(0,t.useState)(!1),[b,y]=(0,t.useState)(!1),[x,w]=(0,t.useState)(""),[C,S]=(0,t.useState)(""),[E,k]=mE(((e,t)=>cE(e,t)),[]),[j,I]=mE(((e,t,n)=>cE(e,t,n)),[]),[T,A]=mE(((e,t,n)=>cE(e,t,n)),[]),[O,N]=mE(((e,t,n)=>cE(e,t,n)),[]);(0,t.useEffect)((()=>{k(CS,GC()),I(bS,GC(),!1)}),[]),(0,t.useEffect)((()=>{E.value&&u(E.value.filter((e=>e.service.includes("bacnet"))))}),[E]),(0,t.useEffect)((()=>{j.value&&p(j.value)}),[j]);const R=(0,t.useCallback)((async()=>{d.map((e=>{e.id.includes("rs485_1")&&(A(OS,GC(),!1),w("RS485-1")),e.id.includes("rs485_2")&&(N(NS,GC(),!1),S("RS485-2"))}))}),[d]);return(0,t.useEffect)((()=>{R()}),[R]),(0,t.useEffect)((()=>{T.value&&l({...T.value})}),[T]),(0,t.useEffect)((()=>{O.value&&s({...O.value})}),[O]),(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(jI,{showDialog:n}),(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("bacnetConfig")})}),h&&(0,ng.jsx)(yG,{title:e("port")+" 1 - "+x,data:{...i},setData:l,networkInfo:f,setShowDialog:r,onSave:async function(){try{await dE(OS,JSON.stringify(i),GC()),ak.success(e("ok")),r(!1),v(!1)}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}},justEdit:g,setJustEdit:v,port:"rs485_1",onRefresh:R}),m&&(0,ng.jsx)(yG,{title:e("port")+" 2 - "+C,data:{...c},setData:s,networkInfo:f,setShowDialog:r,onSave:async function(){try{await dE(NS,JSON.stringify(c),GC()),ak.success(e("ok")),r(!1),y(!1)}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}},justEdit:b,setJustEdit:y,port:"rs485_2",onRefresh:R})]})]})},wG=e=>{let{baudrate:t,parity:n,bits:r,stopBits:o,port:a,protocol:i,timeout:l,setPortSettingsValue:c,isCbus:s,serverPort:d,serverUrl:u,serverEnabled:f,baudrateOptions:p}=e;const{translate:h}=og();return(0,ng.jsx)("div",{children:(0,ng.jsx)("table",{width:"100%",children:(0,ng.jsxs)("tbody",{children:[i?(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsxs)("span",{children:[h("protocol")," \u2192 ",h("ethernet")]})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(HO,{style:{width:180},value:i,options:[{label:h("modbusRTUTCP"),value:"modbus_rtu"},{label:h("modbusTcp"),value:"modbus_tcp"}],onChange:e=>c("protocol",e)})})]}):(0,ng.jsx)("td",{}),(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:h("baudRate")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(HO,{style:{width:180},value:t,options:p,onChange:e=>c("baudrate",e)})})]}),(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:h("numBits")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(HO,{style:{width:180},value:r,options:[{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"}],onChange:e=>c("bits",e)})})]}),(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:h("parity")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(HO,{style:{width:180},value:n,options:[{label:h("none"),value:"none"},{label:h("even"),value:"even"},{label:h("odd"),value:"odd"}],onChange:e=>c("parity",e)})})]}),(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:h("stopBit")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(HO,{style:{width:180},value:o,options:[{value:"1",label:"1"},{value:"1.5",label:"1.5"},{value:"2",label:"2"}],onChange:e=>c("stopBits",e)})})]}),(0,ng.jsx)("tr",{style:{height:"40px"},children:l?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("td",{children:(0,ng.jsxs)("span",{children:[h("timeout")," ",(0,ng.jsx)("small",{style:{textTransform:"lowercase"},children:"(ms)"})]})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(xN,{value:l,min:500,max:5e3,step:500,onChange:e=>c("timeout",null!==e&&void 0!==e?e:2e3),style:{width:180}})})]}):(0,ng.jsx)("td",{})}),s&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(hB,{orientation:"left",orientationMargin:0,style:{width:"200%"},children:(0,ng.jsx)("b",{children:h("alarmReceptionServer")})}),(0,ng.jsx)("tr",{style:{height:"40px"},children:(0,ng.jsx)("td",{children:(0,ng.jsxs)(hc,{children:[h("serverEnable"),(0,ng.jsx)(yI,{checked:f,onChange:e=>c("serverEnabled",e)})]})})}),f&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("tr",{style:{height:"40px"},children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:h("server")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(Aj,{style:{width:180},value:u,onChange:e=>c("serverUrl",e.target.value)})})]}),(0,ng.jsxs)("tr",{children:[(0,ng.jsx)("td",{children:(0,ng.jsx)("span",{children:h("port")})}),(0,ng.jsx)("td",{children:(0,ng.jsx)(xN,{style:{width:180},value:d,min:1,onChange:e=>e&&c("serverPort",e)})})]})]})]})]})})})},CG={baudrate:9600,parity:"none",bits:8,stopBits:1},SG=()=>{const[e,n]=(0,t.useState)(CG),[r,o]=mE(((e,t)=>cE(e,t)),[]),[a,i]=(0,t.useState)(!1),{translate:l}=og();(0,t.useEffect)((()=>{o(IS,GC())}),[]),(0,t.useEffect)((()=>{r.value&&n(r.value)}),[r]);return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(jI,{showDialog:a}),(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:l("cbusConfig")})}),(0,ng.jsxs)(Qv,{bordered:!1,className:"ylcSummaryCard",children:[(0,ng.jsx)(wG,{baudrate:e.baudrate,parity:e.parity,bits:e.bits,stopBits:e.stopBits,setPortSettingsValue:(t,r)=>{e[t]=r,n({...e}),i(!0)},timeout:e.timeout,isCbus:!0,serverPort:e.serverPort,serverUrl:e.serverUrl,serverEnabled:e.serverEnabled,baudrateOptions:[{value:1200,label:"1200"},{value:2400,label:"2400"},{value:4800,label:"4800"},{value:9600,label:"9600"}]}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(II,{justEdit:a,onClick:async()=>{try{const t={protocol:e.protocol,baudrate:e.baudrate,bits:e.bits,parity:e.parity,stopBits:e.stopBits,timeout:e.timeout,serverUrl:e.serverUrl,serverPort:e.serverPort,serverEnabled:e.serverEnabled};await dE(IS,JSON.stringify(t),GC()),ak.success(l("ok"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(l(t.message))}i(!1)}})})]})]})]})},EG=(0,t.memo)(SG),kG=()=>{const[e,n]=(0,t.useState)(),[r,o]=(0,t.useState)(),[a,i]=mE(((e,t)=>cE(e,t)),[]),[l,c]=mE(((e,t)=>cE(e,t)),[]),[s,d]=mE(((e,t)=>cE(e,t)),[]),[u,f]=(0,t.useState)(!1),{translate:p}=og(),[h,m]=(0,t.useState)(),g=e&&!!Object.keys(e).length,v=r&&!!Object.keys(r).length,[b,y]=(0,t.useState)(!1),[x,w]=(0,t.useState)(!1);(0,t.useEffect)((()=>{i(CS,GC())}),[]),(0,t.useEffect)((()=>{a.value&&m(a.value.filter((e=>e.service.includes("modbus"))).map((e=>e.id)))}),[a]),(0,t.useEffect)((()=>{if(h)for(const e of h)"rs485_1"===e&&c(TS,GC()),"rs485_2"===e&&d(AS,GC())}),[h]),(0,t.useEffect)((()=>{l.value&&n({...l.value})}),[l]),(0,t.useEffect)((()=>{s.value&&o({...s.value})}),[s]);const C=[{value:1200,label:"1200"},{value:2400,label:"2400"},{value:4800,label:"4800"},{value:9600,label:"9600"},{value:14400,label:"14400"},{value:19200,label:"19200"},{value:28800,label:"28800"},{value:38400,label:"38400"},{value:57600,label:"57600"},{value:76800,label:"76800"},{value:115200,label:"115200"}];return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(jI,{showDialog:u}),(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:p("modbusConfig")})}),g&&(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)(Qv,{title:"Porta "+ZC(e.port),bordered:!1,className:"modbusCard",children:[(0,ng.jsx)(wG,{baudrate:e.baudrate,parity:e.parity,bits:e.bits,stopBits:e.stopBits,timeout:e.timeout,protocol:e.protocol,port:e.port,setPortSettingsValue:(t,r)=>{if(e){const o={...e};o[t]=r,n({...o}),f(!0),y(!0)}},baudrateOptions:C}),(0,ng.jsx)("div",{style:{marginTop:"40px",textAlign:"end"},children:(0,ng.jsx)(II,{onClick:async()=>{try{await dE(TS,JSON.stringify(e),GC()),ak.success(p("ok")),f(!1),y(!1)}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(p(t.message))}},justEdit:b})})]})}),v&&(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)(Qv,{title:"Porta "+ZC(r.port),bordered:!1,className:"modbusCard",children:[(0,ng.jsx)(wG,{baudrate:r.baudrate,parity:r.parity,bits:r.bits,stopBits:r.stopBits,timeout:r.timeout,protocol:r.protocol,port:r.port,setPortSettingsValue:(e,t)=>{if(r){const n={...r};n[e]=t,o({...n}),f(!0),w(!0)}},baudrateOptions:C}),(0,ng.jsx)("div",{style:{marginTop:"40px",textAlign:"end"},children:(0,ng.jsx)(II,{justEdit:x,onClick:async()=>{try{await dE(AS,JSON.stringify(r),GC()),ak.success(p("ok")),f(!1),w(!1)}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(p(e.message))}}})})]})})]})]})};const jG=n.p+"static/media/bacnet-logo.012135733b16ffcfec4562b6fa7f9e5e.svg";const IG=n.p+"static/media/modbus-logo.86b034fb19658d6b9761014319253367.svg",TG=n.p+"static/media/ylc880.400d1ec9d0dcd5149c1a.png",AG=n.p+"static/media/c-bus.3fb26a54500e8f7c0ed7.jpg",OG=n.p+"static/media/virtual.a78b338b7631a1f51ccf.png",NG=n.p+"static/media/uiLogo.e07c993d1f196e950370.png";n.p;n.p,n.p,n.p;n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p,n.p;const RG=n.p+"static/media/wifi-icon.75ccecf0eb4db7b5738f.png",PG=()=>{const{translate:e}=og(),n=(0,t.useRef)();let r=null;const[o,a]=mE(((e,t)=>cE(e,t)),[]),[i,l]=mE(((e,t)=>cE(e,t)),[]),[c,s]=mE(((e,t)=>cE(e,t)),[]),[d,u]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{a(CS,GC()),l(jS,GC()),s(bS,GC()),u(vS,GC())}),[]);const f="#2A5195";return(0,t.useEffect)((()=>{if(o.value&&i.value&&c.value&&d.value){var e,t,a,l,s,u,p,h;let m=n.current;r=m.getContext("2d");let g=(e,t)=>{let{x:n,y:o,w:a,h:i}=e;r.beginPath(),r.moveTo(n,o),r.lineTo(a,i),r.lineWidth=4,r.strokeStyle=t,r.stroke()},v=(e,t,n,o)=>{let{x:a,y:i,w:l,h:c}=e,s=a+l,d=i+c;r.beginPath(),r.fillStyle=o,r.strokeStyle=n,r.moveTo(a+t.tl,i),r.lineTo(s-t.tr,i),r.quadraticCurveTo(s,i,s,i+t.tr),r.lineTo(s,i+c-t.br),r.quadraticCurveTo(s,d,s-t.br,d),r.lineTo(a+t.bl,d),r.quadraticCurveTo(a,d,a,d-t.bl),r.lineTo(a,i+t.tl),r.quadraticCurveTo(a,i,a+t.tl,i),r.lineWidth=1,r.stroke(),r.fill(),r.closePath()},b=(e,t)=>{let{x:n,y:o,w:a,h:i}=e;const l=new Image;l.src=t,l.onload=()=>{r.drawImage(l,n,o,a,i)}},y=(e,t,n,o)=>{let{x:a,y:i,r:l}=e;r.beginPath(),r.arc(a,i,l,0,2*Math.PI),r.fillStyle="on"===n?t:"black",r.fill(),r.lineWidth=1,r.strokeStyle="black",r.stroke(),r.font="14px Avenir",r.fillStyle="white",r.fillText(o,a+12,i+6)},x=(e,t,n,o)=>{let{x:a,y:i,w:l,h:c}=e;r.shadowColor="rgba(0, 0, 0, 0.3)",r.shadowBlur=8,r.shadowOffsetX=4,r.shadowOffsetY=4;v({x:a,y:i,w:200,h:150},{tr:20,br:20,bl:20,tl:20},"silver","white"),r.shadowOffsetX=0,r.shadowOffsetY=0,r.shadowColor="transparent",r.moveTo(a,i+70),r.lineTo(a+200,i+70),r.lineWidth=2,r.stroke();const s=new Image;s.src=t,s.onload=()=>{r.drawImage(s,a+10,i+10,l,c)};let d={x:a+55,y:i+90,w:120,h:35};if("eth0"===o){v({x:a+14,y:i+91,w:33,h:13},{tr:1,br:1,bl:1,tl:1},"#AEBAFF","#AEBAFF"),r.font="12px Avenir Black",r.fillStyle="#000",r.fillText("ETH1",a+15,i+102)}else if("eth1"===o){v({x:a+14,y:i+91,w:33,h:13},{tr:1,br:1,bl:1,tl:1},"#0085fc","#0085fc"),r.font="12px Avenir Black",r.fillStyle="#fff",r.fillText("ETH2",a+15,i+102)}else{v({x:a+14,y:i+91,w:33,h:13},{tr:1,br:1,bl:1,tl:1},"#AEBAFF","#AEBAFF"),r.font="12px Avenir Black",r.fillStyle="#000",r.fillText("ETH1",a+15,i+102),v({x:a+14,y:i+109,w:33,h:13},{tr:1,br:1,bl:1,tl:1},"#0085fc","#0085fc"),r.font="12px Avenir Black",r.fillStyle="#fff",r.fillText("ETH2",a+15,i+120)}v(d,{tr:8,br:8,bl:8,tl:8},"#000","#fff"),r.font="20px Avenir Black",r.fillStyle="#000",r.fillText(":"+n,a+60,i+113)},w=(e,t,n)=>{let{x:o,y:a,w:i,h:l}=e;if(r.beginPath(),r.rect(o,a,i,l),r.fillStyle=t,r.fill(),r.beginPath(),r.moveTo(o,a),r.lineTo(o+i,a),r.lineWidth=2,r.strokeStyle="#006400",r.stroke(),r.beginPath(),r.moveTo(o,a+l),r.lineTo(o+i,a+l),r.lineWidth=2,r.strokeStyle="#006400",r.stroke(),C({x:o+10,y:a+16,r:7.5}),C({x:o+33,y:a+16,r:7.5}),3===n){C({x:o+56,y:a+16,r:7.5})}},C=e=>{let{x:t,y:n,r:o}=e;r.beginPath();const a=r.createLinearGradient(t,n,t+2,n+2);a.addColorStop(0,"darkgray"),a.addColorStop(.05,"darkgray"),a.addColorStop(.1,"rgb(70, 70, 70)"),a.addColorStop(.58,"rgb(70, 70, 70)"),a.addColorStop(.58,"darkgray"),r.arc(t,n,o,0,2*Math.PI),r.fillStyle=a,r.fill(),r.arc(t,n,o-1,0,2*Math.PI),r.lineWidth=2,r.strokeStyle="rgba(0, 0, 0, 0.4)",r.stroke()},S=e=>{let{x:t,y:n,w:o,h:a}=e;r.beginPath(),r.rect(t,n,o,a),r.fillStyle="darkgray",r.fill(),r.lineWidth=1,r.strokeStyle="black",r.stroke()},E=(e,t,n,o)=>{let{x:a,y:i,w:l,h:c}=e;r.beginPath(),r.shadowColor="rgba(0, 0, 0, 0.3)",r.shadowBlur=8,r.shadowOffsetX=4,r.shadowOffsetY=4,r.rect(a,i,l,c),r.fillStyle=t,r.fill(),r.lineWidth=o,r.strokeStyle=n,r.stroke()};E({x:400,y:250,w:440,h:380},"silver","black",1);E({x:400,y:300,w:440,h:284},"silver","black",1);E({x:400,y:350,w:438,h:180},f,"black",1),v({x:640,y:350,w:198,h:180},{tr:0,br:0,bl:160,tl:0},"transparent","silver");r.shadowOffsetX=0,r.shadowOffsetY=0,r.shadowColor="transparent",y({x:445,y:400,r:6},"red","on","RUN"),y({x:445,y:425,r:6},"red","undefined"!==o.value[0].service?"on":"off","RS 485-1"),y({x:445,y:450,r:6},"red","undefined"!==o.value[1].service?"on":"off","RS 485-2");y({x:445,y:475,r:6},"red","undefined"!==o.value[3].service?"on":"off","C-BUS");y({x:445,y:500,r:6},"red","undefined"!==o.value[2].service?"on":"off","M-BUS"),y({x:545,y:425,r:6},"orange","off",""),y({x:570,y:425,r:6},"green","off","ETH-1"),y({x:545,y:450,r:6},"orange","off",""),y({x:570,y:450,r:6},"green","off","ETH-2"),y({x:570,y:475,r:6},"red","off",""),w({x:410,y:219,w:45,h:30},"#039417",2),r.font="14px Avenir Black",r.fillStyle="black",r.fillText("12..24V",405,270),w({x:465,y:219,w:45,h:30},"#039417",2),r.font="14px Avenir Black",r.fillStyle="black",r.fillText("M-BUS",465,270),w({x:410,y:631,w:65,h:30},"#039417",3),r.font="14px Avenir Black",r.fillStyle="black",r.fillText("RS485-1",410,600),w({x:485,y:631,w:65,h:30},"#039417",3),r.font="14px Avenir Black",r.fillStyle="black",r.fillText("RS485-2",485,600);w({x:560,y:631,w:45,h:30},"#039417",2),r.font="14px Avenir Black",r.fillStyle="black",r.fillText("C-BUS",560,600);S({x:640,y:630,w:70,h:7}),r.font="14px Avenir Black",r.fillStyle="black",r.fillText("ETH-1",655,610),S({x:720,y:630,w:70,h:7}),r.font="14px Avenir Black",r.fillStyle="black",r.fillText("ETH-2",735,610);b({x:720,y:370,w:100,h:15.27},NG),b({x:410,y:360,w:27.5,h:30},"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAwCAYAAABqkJjhAAAAxnpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMgDPxnio4AtgEzDmkSqRt0/B6xqZIohziMbZ0fYft+9vAaoCRBctXSSomANGnUYWg09INTlIMP0Ntj6eoP7P5IcI2PO7R4/vSnv4A9HVY+CalXSMs10MT19SbkhXh0RDBWF2ouxGSB5ALdxoqlaT2PsGzxCrUbBu1zJ9We+18qtrdm1GGijRNHMLNYAzyuBO4wBExIQsM4HUmDM89RsZCnPU2EH19EWa3j2UJFAAABhGlDQ1BJQ0MgcHJvZmlsZQAAeJx9kT1Iw0AcxV8/pCoVB4uIdMhQnSyCijiWKhbBQmkrtOpgcukXNGlIUlwcBdeCgx+LVQcXZ10dXAVB8APE2cFJ0UVK/F9SaBHjwXE/3t173L0DvM0qUwx/DFBUU08n4kIuvyoEXuHHMPoQxqTIDC2ZWczCdXzdw8PXuyjPcj/35xiQCwYDPAJxjGm6SbxBPLtpapz3iUOsLMrE58QTOl2Q+JHrksNvnEs2e3lmSM+m54lDxEKpi6UuZmVdIZ4hjsiKSvnenMMy5y3OSrXO2vfkLwwW1JUM12mGkcASkkhBgIQ6KqjCRJRWlRQDadqPu/hHbX+KXBK5KmDkWEANCkTbD/4Hv7s1itNTTlIwDvS8WNbHGBDYBVoNy/o+tqzWCeB7Bq7Ujr/WBOY+SW90tMgRMLgNXFx3NGkPuNwBRp40URdtyUfTWywC72f0TXlg6BboX3N6a+/j9AHIUlfLN8DBITBeoux1l3f3dvf275l2fz/QcnLMp+h1EAAADXZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDQuNC4wLUV4aXYyIj4KIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgIHhtbG5zOkdJTVA9Imh0dHA6Ly93d3cuZ2ltcC5vcmcveG1wLyIKICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIgogICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICB4bXBNTTpEb2N1bWVudElEPSJnaW1wOmRvY2lkOmdpbXA6NmI3ZTZkYWUtZGY2ZC00NTE0LWE4NGItMzk4Mzk2OWQ1MGM2IgogICB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjZmZjdmMjkxLTRmMTAtNDExYy04OGU2LTRmZTgxMDQ1NWNkNiIKICAgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjFjMGIyODY4LWQxYjMtNDNjZS1iZTgyLTAyODU3OTM4MTZhNyIKICAgZGM6Rm9ybWF0PSJpbWFnZS9wbmciCiAgIEdJTVA6QVBJPSIyLjAiCiAgIEdJTVA6UGxhdGZvcm09IldpbmRvd3MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNzEzNzc4MzE1ODg1MTQ1IgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIHRpZmY6T3JpZW50YXRpb249IjEiCiAgIHhtcDpDcmVhdG9yVG9vbD0iR0lNUCAyLjEwIgogICB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0OjA0OjIyVDExOjMxOjU1KzAyOjAwIgogICB4bXA6TW9kaWZ5RGF0ZT0iMjAyNDowNDoyMlQxMTozMTo1NSswMjowMCI+CiAgIDx4bXBNTTpIaXN0b3J5PgogICAgPHJkZjpTZXE+CiAgICAgPHJkZjpsaQogICAgICBzdEV2dDphY3Rpb249InNhdmVkIgogICAgICBzdEV2dDpjaGFuZ2VkPSIvIgogICAgICBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmFiYWM3MTgwLTUzMzgtNDNiYS1hMjJlLTQ2YjlhMjVjMDFlZiIKICAgICAgc3RFdnQ6c29mdHdhcmVBZ2VudD0iR2ltcCAyLjEwIChXaW5kb3dzKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyNC0wNC0yMlQxMTozMTo1NSIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz6qKWmrAAAABmJLR0QA8QDyAPiJMR8CAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH6AQWCR83zAcN0gAABalJREFUaN7VmmtsFFUUgL97d9uyLeXR8lSkyCMIxfIqKRhod9plECUxSKI/0KCxvxA0UUhKCimBAiEQQYmCCRrEGH5oVFARxnZnayOk8rRQpIIEkKeEkrb0Ad3O+KPTMt1uH3S3uJxfe8+cu/vN3XvPOXPOCEIVTXcBScBoYBIwERgJPAH0BhxANXAL+As4DRwHzgEXUZWah/k50W3Qg/pABAuBBRbsAMDZxdmNwB3gAvAjsAtV+adngDV9JPA6sMSCDIfcBT4DdiKMMmZnmaEDaz4XmO8B2cCIdlbtCnAEKAUuA5XWtXhgGDAeSLPmRwX5jpvAHkxzLXMyK7oH7PUK/CIZ2AJkBcypAcqA/cB3IM6guv2dbCUHgpHAPGA+8CzQL8DqJLAUOISqGA8HrOnzgQ+Bp2xaA/gB2AqcQFUqu3lgYy3gbOCNgDNQAaxCmtvxZJqdA2u6E1gEfAzE2K6UAqtxxn5PZpoZlh1cUCww/DOB9cBzgLSumJhmPkKsR1XqOwPOtlYwztL4gR3ABlTlGj0hmp4AvA2sAFyW9j7wAU4jl8wsoy2wVxf4mQ/sAaJtp3gDprmJOZkN9KRoxRL8i4BNQKJtC+YAW0SQu0wBfrJOdTPsUhr9u5k72+BRiabPA3bZoKuAV1oDH/TGIcReyxsANAB5IDeiZjw62NYH3mPTXBABBqubAFvkIyTL8CgNRIgIG+wYoNDmvk4AL6AqN4ggkbbPi2ywBrAy0mAfAGv6UGCxTf8NDsfPRKA0r/BrQH+bV9hGVroZmcCaLw54uXUkEyeJUHGCmWQl3M2yD9V9t6NJGYWpUpoi2UrW40PKq5tDMFSZJsdMKcuLskrMDoAZa3PODcC+9owVbapEyixM8qyY321Qh4xleu90ZvWdwKCYftT66zladc44XPOHnvFL3Zoo4Sou8LQFd1qPNQ5rfBGD8qCwBVMlyGXASmtVuy2xjsFsfSaP4QOSiXa6WvRpRoN8tfpq1pbyT6f8Xl2YqxRM26F7jpiBh26KbVzC80o7EU26gdxwwH4yYSOjh6S2gm1a9SgG9x1Bbsry/uPiZqw1zPtpwbzEGNv4dNDVLUyVFmyfUA/NwoEvMSxxbIc28b0SWD4qOzHakfB+hi9VBAIPtY0vB/0GQw4H3OE45elDZyKFo1O7QX2SGBc7+UXpFwmBwHG2cW3wAG6mBETFbmcCifHDumQZE+VisCPBBWJ0e6E5IkVgttkS9kJGbHAnKUqt/CJkd3u7+kqXLO811HGzsaLOKri0Ar5uGw9v5y4vA75wrFjx9d8wzMZO7W5VXeJs7cn9jU6zIhDYfgcTgk3WPUcMYJ2V9YckX93ay9WK8o6rKvV32Pz3ztv3Gm9vLnIfbeOHj9vGaWi+oPtaSnwWdHUowDWNN1h8KofzN49x31/fuhJj+Pm38hLrTm26U1ZzeFWUiC5p+283PYZ8bUW7BmAiqvJn8Gg3TVqPLHnAjFBCs1PGMSN+FrP6pDCwV1/q/PUcrTxvHKot9V2rO75GiphfA6NcM/B4QAcGWbocVGVjRz+W6Z0iTUMmg5gUauSzSRWCY4YpzxZ5SjqorWm+ODALgOmW7hAwB1W5G5n5sOquAb616VKshIjIBAYQ4kurlgVNReh3OOAVkQs8230D2G7TL0CKuZH8TAfwhS35kUA+mj4kcoFV5Rzwue3aZGAFmi8qsnKLx7pU1VExULIbj/K/FwPbhmHTPAW8S1NdttlrbMMgh4Pent8eWrFE098MgDWAfKDw8SloS0cunnQj0loGG6wcRdrqFflAF1oGrTf+Y9CUaZZwt70KihwYRlfaXkuAww/f9mpZjZbG4lvA00EswtdYRKxFdXezsdj2b+zZ1q3BmfaLOaEU8TR9AE1l2ghvjgfKAa8LKZKAUVY4n2htmSd58PpBFQ9ePygjhNcP/gNm8AVyrvFPmQAAAABJRU5ErkJggg==");r.font="16px Avenir Black",r.fillStyle=f,r.fillText("EHC 602",760,510);b({x:585,y:462,w:32,h:30},RG);let k={x:673,y:680,w:1002,h:680},j={x:1e3,y:680,w:1e3,h:450},I={x:998,y:450,w:1050,h:450};if(g({x:675,y:640,w:675,h:680},"#AEBAFF"),g(k,"#AEBAFF"),g(j,"#AEBAFF"),g(I,"#AEBAFF"),v({x:1050,y:432,w:200,h:35},{tr:20,br:20,bl:20,tl:20},"#AEBAFF","#AEBAFF"),r.font="20px Avenir Black",r.fillStyle="#000",r.fillText(d.value[0].ip,1070,456),"dual"===c.value.mode){let e={x:753,y:660,w:960,h:660},t={x:958,y:660,w:958,h:380},n={x:958,y:380,w:1050,h:380};g({x:755,y:640,w:755,h:660},"#0085fc"),g(e,"#0085fc"),g(t,"#0085fc"),g(n,"#0085fc"),v({x:1050,y:362,w:200,h:35},{tr:20,br:20,bl:20,tl:20},"#0085fc","#0085fc"),r.font="20px Avenir Black",r.fillStyle="#fff",r.fillText(d.value[1].ip,1070,386)}else{let e={x:753,y:660,w:960,h:660},t={x:958,y:660,w:958,h:450},n={x:958,y:450,w:1050,h:450};g({x:755,y:640,w:755,h:660},"#AEBAFF"),g(e,"#AEBAFF"),g(t,"#AEBAFF"),g(n,"#AEBAFF")}const T=null===(e=i.value)||void 0===e?void 0:e.find((e=>e.id===o.value[0].service.concat("_",o.value[0].id))).from.ipport,A=null===(t=i.value)||void 0===t?void 0:t.find((e=>e.id===o.value[1].service.concat("_",o.value[1].id))).from.ipport,O=null===(a=i.value)||void 0===a?void 0:a.find((e=>e.id===o.value[2].service.concat("_",o.value[2].id))).from.ipport,N=null===(l=i.value)||void 0===l?void 0:l.find((e=>e.id===o.value[3].service.concat("_",o.value[3].id))).from.ipport,R=null===(s=i.value)||void 0===s?void 0:s.find((e=>e.id===o.value[0].service.concat("_",o.value[0].id))).from.port,P=null===(u=i.value)||void 0===u?void 0:u.find((e=>e.id===o.value[1].service.concat("_",o.value[1].id))).from.port,M=null===(p=i.value)||void 0===p?void 0:p.find((e=>e.id===o.value[2].service.concat("_",o.value[2].id))).from.port,D=null===(h=i.value)||void 0===h?void 0:h.find((e=>e.id===o.value[3].service.concat("_",o.value[3].id))).from.port;if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"!==o.value[2].service&&"virtual_device"!==o.value[3].service||"ylc"===o.value[0].service&&"ylc"===o.value[1].service){let e={x:520,y:662,w:520,h:725};if(g({x:443,y:662,w:443,h:725},"black"),g(e,"black"),"undefined"!==o.value[3].service){let e={x:582,y:700,w:780,h:700},t={x:778,y:725,w:778,h:700};g({x:584,y:662,w:584,h:700},"black"),g(e,"black"),g(t,"black")}}else if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"===o.value[2].service&&"virtual_device"!==o.value[3].service){let e={x:218,y:700,w:445,h:700},t={x:220,y:425,w:220,h:700},n={x:520,y:662,w:520,h:725},r={x:178,y:725,w:522,h:725},a={x:180,y:425,w:180,h:725},i={x:486,y:150,w:486,h:218},l={x:178,y:150,w:488,h:150},c={x:178,y:425,w:178,h:148};g({x:443,y:662,w:443,h:700},"black"),g(e,"black"),g(t,"black"),g(n,"black"),g(r,"black"),g(a,"black"),g(i,"black"),g(l,"black"),g(c,"black");let s={x:584,y:662,w:584,h:700},d={x:582,y:700,w:780,h:700},u={x:778,y:725,w:778,h:700};"undefined"!==o.value[3].service&&(g(s,"black"),g(d,"black"),g(u,"black"))}else if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"!==o.value[2].service&&"virtual_device"===o.value[3].service){let e={x:443,y:662,w:443,h:725},t={x:520,y:662,w:520,h:725};g({x:584,y:665,w:584,h:725},"black");g(e,"black"),g(t,"black")}else if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"===o.value[2].service&&"virtual_device"===o.value[3].service){let e={x:218,y:700,w:445,h:700},t={x:220,y:425,w:220,h:700},n={x:520,y:662,w:520,h:725},r={x:178,y:725,w:522,h:725},o={x:180,y:425,w:180,h:725},a={x:486,y:150,w:486,h:218},i={x:178,y:150,w:488,h:150},l={x:178,y:425,w:178,h:148};g({x:443,y:662,w:443,h:700},"black"),g(e,"black"),g(t,"black"),g(n,"black"),g(r,"black"),g(o,"black");{let e={x:138,y:750,w:586,h:750},t={x:140,y:425,w:140,h:750};g({x:584,y:662,w:584,h:750},"black"),g(e,"black"),g(t,"black")}g(a,"black"),g(i,"black"),g(l,"black")}else{let e={x:443,y:662,w:443,h:700},t={x:280,y:700,w:445,h:700},n={x:282,y:725,w:282,h:700},r={x:520,y:662,w:520,h:725},a={x:584,y:662,w:584,h:700},i={x:582,y:700,w:780,h:700},l={x:778,y:725,w:778,h:700},c={x:486,y:85,w:486,h:218},s={x:484,y:85,w:524,h:85};"undefined"!==o.value[0].service&&(g(e,"black"),g(t,"black"),g(n,"black")),"undefined"!==o.value[1].service&&g(r,"black"),"undefined"!==o.value[3].service&&(g(a,"black"),g(i,"black"),g(l,"black")),"undefined"!==o.value[2].service&&(g(c,"black"),g(s,"black"))}if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"!==o.value[2].service&&"virtual_device"!==o.value[3].service){if(x({x:380,y:725,w:80,h:55},OG,T,R),"cbus_transparent"===o.value[3].service){x({x:680,y:725,w:100,h:25.5},AG,N,D)}}else if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"!==o.value[2].service&&"virtual_device"===o.value[3].service){x({x:410,y:725,w:80,h:55},OG,T,R)}else if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"===o.value[2].service&&"virtual_device"!==o.value[3].service){if(x({x:80,y:360,w:80,h:55},OG,T,R),"cbus_transparent"===o.value[3].service){x({x:680,y:725,w:100,h:25.5},AG,N,D)}}else if("ylc"===o.value[0].service&&"ylc"===o.value[1].service){x({x:380,y:725,w:80,h:55},TG,T,R)}else if("virtual_device"===o.value[0].service&&"virtual_device"===o.value[1].service&&"virtual_device"===o.value[2].service&&"virtual_device"===o.value[3].service){x({x:80,y:360,w:80,h:55},OG,T,R)}else{if("bacnet_transparent"===o.value[0].service){x({x:180,y:725,w:150,h:35},jG,T,R)}else if("modbus_transparent"===o.value[0].service){x({x:180,y:725,w:150,h:50},IG,T,R)}else if("ylc"===o.value[0].service){x({x:180,y:725,w:80,h:55},TG,T,R)}else if("virtual_device"===o.value[0].service){x({x:180,y:725,w:80,h:55},OG,T,R)}if("bacnet_transparent"===o.value[1].service){x({x:430,y:725,w:150,h:35},jG,A,P)}else if("modbus_transparent"===o.value[1].service){x({x:430,y:725,w:150,h:50},IG,A,P)}else if("ylc"===o.value[1].service){x({x:430,y:725,w:80,h:55},TG,A,P)}else if("virtual_device"===o.value[1].service){x({x:430,y:725,w:80,h:55},OG,A,P)}if("cbus_transparent"===o.value[3].service){x({x:680,y:725,w:100,h:25.5},AG,N,D)}else if("virtual_device"===o.value[3].service){x({x:680,y:725,w:80,h:55},OG,N,D)}if("virtual_device"===o.value[2].service){x({x:525,y:20,w:80,h:55},OG,O,M)}}}}),[o,i,c,d]),(0,ng.jsx)("canvas",{className:"canvas-device",ref:n,width:"1600",height:"1200"})},MG=()=>{const{translate:e}=og();return(0,ng.jsxs)("div",{className:"home__card__container",children:[(0,ng.jsx)(Qv,{className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("statusSettDiag")})}),(0,ng.jsx)(Qv,{className:"title-card",children:(0,ng.jsx)(PG,{})})]})};const DG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var LG=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:DG}))};const _G=t.forwardRef(LG),zG=e=>{let{casoIndex:t,color:n}=e;return 0===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"260px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):1===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"195px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):2===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"130px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px",borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"195px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):3===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"260px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):4===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"195px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n),display:"flex"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):5===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"260px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):6===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"180px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):7===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"180px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"130px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px",borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):8===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"260px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):9===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"215px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):10===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"260px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):11===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):12===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n),display:"flex"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):13===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n),display:"flex"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):14===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):15===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):16===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):17===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"215px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):18===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"215px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):19===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"390px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):20===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"250px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):21===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):22===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"326px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):23===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"390px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):24===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"450px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"65px",borderRight:"1px solid ".concat(n)}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):25===t?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",height:"520px",position:"absolute",top:"88px"},children:[(0,ng.jsxs)("div",{children:[(0,ng.jsx)("div",{style:{width:"20px",height:"65px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderTop:"1px solid ".concat(n),borderTopRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px",borderRight:"1px solid ".concat(n),borderBottom:"1px solid ".concat(n),borderBottomRightRadius:"15px"}}),(0,ng.jsx)("div",{style:{width:"20px",height:"32.5px"}})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",margin:"10px",fontSize:"20px"},children:(0,ng.jsx)(_G,{style:{color:"".concat(n)}})})]}):(0,ng.jsx)(ng.Fragment,{})};var BG=function(e){return e[e.YLC=0]="YLC",e[e.Virtual=1]="Virtual",e}(BG||{});const FG=()=>{const{translate:e}=og(),{menuItems:n,updateMenuService:r}=OT(),[o,a]=(0,t.useState)({}),[i,l]=(0,t.useState)([]),[c,s]=(0,t.useState)([]),[d,u]=(0,t.useState)([]),[f,p]=(0,t.useState)(!1),[h,m]=(0,t.useState)(),[g,v]=(0,t.useState)([]),[b,y]=(0,t.useState)([]),[x,w]=(0,t.useState)([]),[C,S]=(0,t.useState)([]),[E,k]=(0,t.useState)([]),[j,I]=(0,t.useState)([]),T=(0,t.useRef)(),[A,O]=mE(((e,t,n)=>cE(e,t,n)),[]),[N,R]=(0,t.useState)([]),P=[{value:"undefined",label:e("portDisabled"),port:["rs485_1","rs485_2","mbus","cbus","eth"]},{value:"ylc",label:e("ylc"),port:["rs485_1","rs485_2"]},{value:"virtual_device",label:e("virtual_device"),port:["rs485_1","rs485_2","mbus","cbus","eth"]},{value:"modbus_transparent",label:e("modbus_transparent"),port:["rs485_1","rs485_2"]},{value:"bacnet_transparent",label:e("bacnet_transparent"),port:["rs485_1","rs485_2"]},{value:"cbus_transparent",label:e("cbus_transparent"),port:["cbus"]}].filter((e=>!0)),[M,D]=mE(((e,t)=>cE(e,t)),[]),[L,_]=mE(((e,t)=>cE(e,t)),[]),[z,B]=mE(((e,t)=>cE(e,t)),[]);function F(t){const r={...n},o=t.map((e=>{let{service:t}=e;return t})),i=t.filter(((e,t)=>{let{service:n}=e;return!o.includes(n,t+1)})),l=t.some((e=>("rs485_1"===e.id||"rs485_2"===e.id)&&("ylc"===e.service||"virtual_device"===e.service||"modbus_transparent"===e.service))),c=i.map((t=>"undefined"!==t.service?{key:t.service,label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service),children:e("".concat(t.service))})}:null));r.serviceMenu=c;const s=i.map((t=>"bacnet_transparent"===t.service?{key:"'".concat(t.service.replace("_transparent","Diagnostic"),"'"),label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service.replace("_transparent","Diagnostic")),children:e("".concat(t.service))})}:"ylc"===t.service?{key:"'".concat(t.service,"Diagnostic'"),label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service,"Diagnostic"),children:e("".concat(t.service))})}:"virtual_device"===t.service?{key:"'".concat(t.service.replace("_",""),"Diagnostic'"),label:(0,ng.jsx)(IT,{className:"Link",to:"/".concat(t.service.replace("_",""),"Diagnostic"),children:e("".concat(t.service))})}:null));s.push(l?{key:"modbusTerminal",label:(0,ng.jsx)(IT,{className:"Link",to:"/modbusTerminal",children:e("modbusTerminal")})}:null),s.push({key:"sub3-4",label:(0,ng.jsx)(IT,{className:"Link",to:"/settingStatus",children:e("settStatus")})},{key:"sub3-5",label:(0,ng.jsx)(IT,{className:"Link",to:"/systemDiagnostic",children:e("device")})}),r.diagnosticSubMenu=s,a(r)}(0,t.useEffect)((()=>(D(CS,GC()),_(jS,GC()),B(bS,GC()),G(),T.current=setInterval((()=>{G()}),5e3),()=>{clearInterval(T.current)})),[]),(0,t.useEffect)((()=>{M.value&&l([...M.value]),L.value&&(s([...L.value]),0===E.length&&k(L.value)),z.value&&m(z.value),M.value&&L.value&&(!function(e){const t=[],n=[];e.forEach(((e,r)=>{t.push({isVirtual:"virtual_device"===e.service?1:0,index:r}),n.push({isYLC:"ylc"===e.service?1:0,index:r})})),y(t),w(n)}(M.value),F(M.value))}),[M,L,z]),(0,t.useEffect)((()=>{A.value&&R(A.value.filter((e=>!1===e.servicePort)))}),[A]);const H=(e,t,n,r)=>{s((e=>e.map((e=>e.id===t?{...e,from:{...e.from,ipport:r}}:e)))),p(!0);const o=E.find((e=>e.id===t));o&&o.from.ipport===r?S((t=>t.filter((t=>t!==e)))):S((t=>t.includes(e)?t:[...t,e])),I((t=>{const n=[...t];return n[e]=!0,n})),u((e=>[...e,t])),function(e,t){const n=e,r=[];if("virtual_device"===t||"ylc"===t){i.filter((e=>e.service===t)).map((e=>{const t=e.service.concat("_",e.id),n=c.find((e=>e.id===t));n&&(u((e=>[...e,t])),r.push(n))})),r.length>0&&r.map((e=>e.service.includes(t)?e.from.ipport=n:n))}}(r,n)},W=(e,t,n)=>{const r=[...i];r[e][t]=n,l(r),v((t=>[...t,e])),p(!0);const o=[],a=[];M.value.forEach(((e,t)=>{o.push({isVirtual:"virtual_device"===e.service?1:0,index:t}),a.push({isYLC:"ylc"===e.service?1:0,index:t})})),y(o),w(a),F(r)};const V=(e,t,n)=>{const r=[[1,1,1,1,0],[1,1,1,0,0],[1,1,0,0,0],[1,0,0,1,0],[1,0,1,0,0],[1,1,0,1,0],[0,1,1,1,0],[0,1,0,1,0],[0,1,1,0,0],[0,0,1,1,0],[1,0,1,1,0],[1,1,1,1,1],[1,1,1,0,1],[1,1,0,0,1],[1,0,0,1,1],[1,0,1,0,1],[1,1,0,1,1],[0,1,1,1,1],[0,1,0,1,1],[0,1,1,0,1],[0,0,1,1,1],[1,0,1,1,1],[1,0,0,0,1],[0,1,0,0,1],[0,0,1,0,1],[0,0,0,1,1]];for(let o=0;o<r.length;o++){if(n===BG.YLC&&U(e,t,r[o]))return o;if(n===BG.Virtual&&U(e,t,r[o]))return o}return-1};function U(e,t,n){for(let r=0;r<e.length;r++)if(e[r][t]!==n[r])return!1;return!0}const K=e=>{var t;if("undefined"!==(null===(t=i[e])||void 0===t?void 0:t.service)){const e=[];i.forEach(((t,n)=>{var r,o;"undefined"!==t.service&&e.push({port:t.id,service:t.service,networkAdapter:(null===(r=c.find((e=>"".concat(t.service,"_").concat(t.id)===e.id)))||void 0===r?void 0:r.from.port)||"",ipPort:(null===(o=c.find((e=>"".concat(t.service,"_").concat(t.id)===e.id)))||void 0===o?void 0:o.from.ipport)||0})}));const t=function(e){const t=[],n=e.map(((e,t)=>({row:e,index:t}))).filter((e=>{let{row:t}=e;return"virtual_device"===t.service})),r=e.map(((e,t)=>({row:e,index:t}))).filter((e=>{let{row:t}=e;return"ylc"===t.service})),o=e.map(((e,t)=>({row:e,index:t}))).filter((e=>{let{row:t}=e;return"virtual_device"!==t.service&&"ylc"!==t.service}));if(n.length>1){const e=n[0].row.ipPort;n.every((t=>{let{row:n}=t;return n.ipPort===e}))||t.push(...n.map((e=>{let{index:t}=e;return t})))}if(r.length>1){const e=r[0].row.ipPort;r.every((t=>{let{row:n}=t;return n.ipPort===e}))||t.push(...r.map((e=>{let{index:t}=e;return t})))}n.length>0&&r.length>0&&n[0].row.ipPort===r[0].row.ipPort&&(t.push(...n.map((e=>{let{index:t}=e;return t}))),t.push(...r.map((e=>{let{index:t}=e;return t}))));o.length>0&&r.length>0&&o[0].row.ipPort===r[0].row.ipPort&&(t.push(...o.map((e=>{let{index:t}=e;return t}))),t.push(...r.map((e=>{let{index:t}=e;return t}))));const a=new Map;for(const{row:l,index:c}of o)a.has(l.service)?a.get(l.service)===l.ipPort&&t.push(c):a.set(l.service,l.ipPort);const i=new Set;for(const{row:l,index:c}of o)i.has(l.ipPort)&&t.push(c),i.add(l.ipPort);if(n.length>0){const e=n[0].row.ipPort;i.has(e)&&t.push(...n.map((e=>{let{index:t}=e;return t})))}if(r.length>0){const e=r[0].row.ipPort;i.has(e)&&t.push(...r.map((e=>{let{index:t}=e;return t})))}return{isValid:0===t.length,invalidIndices:t}}(e);return{isValid:!t.isValid,invalidIndices:t.invalidIndices}}return{isValid:!1,invalidIndices:[-1]}};function G(){O(GS,GC(),!1)}function q(e,t,n){return void 0!==e&&void 0!==t&&void 0!==n&&N.filter((r=>(r.port===t||"all"===r.port)&&r.ipport===e&&r.protocol===n)).map((e=>e.ipport)).includes(e)}const X=i.findIndex((e=>"virtual_device"===e.service)),Y=i.findIndex((e=>"ylc"===e.service));return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(jI,{showDialog:f}),(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("serialPortSett")})}),(0,ng.jsxs)(Qv,{bordered:!1,children:[(0,ng.jsxs)("table",{style:{width:"100%"},children:[(0,ng.jsx)("thead",{children:(0,ng.jsxs)("tr",{style:{height:"65px",borderBottom:"0.5px solid #ddd"},children:[(0,ng.jsx)("th",{style:{padding:"8px 24px"},children:e("description")}),(0,ng.jsx)("th",{style:{padding:"8px 24px"},children:e("terminator")}),(0,ng.jsx)("th",{style:{padding:"8px 24px"},children:e("service")}),(0,ng.jsx)("th",{style:{padding:"8px 24px"},children:e("networkCard")}),(0,ng.jsx)("th",{children:"IP Port"})]})}),(0,ng.jsx)("tbody",{children:i.map(((t,n)=>{var r,o,a,i;const l="virtual_device"===t.service&&n===X||"ylc"===t.service&&n===Y,d=c.find((e=>e.id==="".concat(t.service,"_").concat(t.id))),f=null===d||void 0===d?void 0:d.from.ipport,m=null===d||void 0===d?void 0:d.from.port,g=null===d||void 0===d?void 0:d.from.ipprotocol,v=C.includes(n),y=E.find((e=>e.id==="".concat(t.service,"_").concat(t.id))),w=null===y||void 0===y?void 0:y.from.ipport,S=j[n]&&v&&f!==w&&q(f,m,g);j[n]&&v&&K(n).invalidIndices.includes(n);return(0,ng.jsxs)("tr",{style:{height:"65px",borderBottom:"0.5px solid #ddd"},children:[(0,ng.jsx)("td",{style:{padding:"8px 24px"},children:ZC(t.id)}),(0,ng.jsx)("td",{style:{padding:"8px 24px"},children:"not_used"!==t.terminator?(0,ng.jsx)(yI,{defaultValue:"enabled"===t.terminator,onChange:e=>{W(n,"terminator",!0===e?"enabled":"disabled")}}):(0,ng.jsx)(ng.Fragment,{})}),(0,ng.jsx)("td",{style:{padding:"8px 24px"},children:(0,ng.jsx)(HO,{onChange:e=>W(n,"service",e),style:{width:"180px"},defaultValue:t.service,options:P.filter((e=>e.port.includes(t.id)))})}),"undefined"!==t.service?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("td",{style:{padding:"8px 24px"},children:(0,ng.jsx)(HO,{style:{width:"180px"},value:null===(r=c.find((e=>"".concat(t.service,"_").concat(t.id)===e.id)))||void 0===r?void 0:r.from.port,onChange:e=>{((e,t)=>{s((n=>n.map((n=>n.id===e?{...n,from:{...n.from,port:t}}:n)))),u((t=>[...t,e])),p(!0)})("".concat(t.service,"_").concat(t.id),e)},options:"bridge"===(null===h||void 0===h?void 0:h.mode)?[{label:"LOCAL",value:"local"},{label:e("all").toUpperCase(),value:"all"}]:[{label:"LOCAL",value:"local"},{label:e("all").toUpperCase(),value:"all"},{label:"ETH-1",value:"eth0"},{label:"ETH-2",value:"eth1"}]})}),(0,ng.jsxs)("td",{children:[(0,ng.jsx)("td",{children:(0,ng.jsx)(xN,{style:{width:"80px",borderColor:K(n).invalidIndices.includes(n)||q(null===(o=c.find((e=>"".concat(t.service,"_").concat(t.id)===e.id)))||void 0===o?void 0:o.from.ipport,null===(a=c.find((e=>"".concat(t.service,"_").concat(t.id)===e.id)))||void 0===a?void 0:a.from.port)?"red":"virtual_device"===t.service?"#1677ff":"ylc"===t.service?"#8cba37":"#d9d9d9"},min:1,value:null===(i=c.find((e=>"".concat(t.service,"_").concat(t.id)===e.id)))||void 0===i?void 0:i.from.ipport,onChange:e=>{null!=e&&H(n,"".concat(t.service,"_").concat(t.id),t.service,e)}})}),(0,ng.jsx)("td",{children:l?(0,ng.jsx)(zG,{casoIndex:"virtual_device"===t.service?V(b,"isVirtual",BG.Virtual):V(x,"isYLC",BG.YLC),color:"virtual_device"===t.service?"#1677ff":"#8cba37"}):null})]})]}):(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("td",{}),(0,ng.jsx)("td",{})]})]},t.id)}))})]}),(0,ng.jsx)("div",{style:{marginTop:"40px"},children:(0,ng.jsx)(II,{justEdit:f,disabled:C.some((e=>{const t=i[e],n=c.find((e=>e.id==="".concat(t.service,"_").concat(t.id)));return K(e).invalidIndices.includes(e)||q(null===n||void 0===n?void 0:n.from.ipport,null===n||void 0===n?void 0:n.from.port,null===n||void 0===n?void 0:n.from.ipprotocol)})),onClick:async()=>{r(o);try{for(const e of g){const t=i[e];t&&(await dE(CS,JSON.stringify(t),GC(),t.id),v([]))}const t=d.filter(((e,t)=>d.indexOf(e)===t));for(const e of t){const t=c.find((t=>t.id===e));t&&(await dE(jS,JSON.stringify(t),GC(),e),u([]))}I([]),p(!1),ak.success(e("ok"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}}})})]})]})]})},HG=()=>{const[e,n]=(0,t.useState)([]),[,r]=(0,t.useState)([]),{translate:o}=og(),a=(0,t.useRef)(),[,i]=mE(((e,t)=>cE(e,t)),[]),[l,c]=mE(((e,t)=>cE(e,t)),[]);async function s(e,t){try{if(1===e){const e=await cE(xS+"/".concat(t.id),GC(),!1);e&&(n([e]),r(e.routers))}else if(2===e){const[e,t]=await Promise.all([i(xS+"/rs485_1",GC()),i(xS+"/rs485_2",GC())]);n([e,t]),r(e.routers.concat(t.routers))}}catch(o){n([{port:"",packets:{ip:{rx:0,tx:0,errors:0,repeat:0},mstp:{rx:0,tx:0,errors:0,repeat:0}},routers:[]}]),r([])}}(0,t.useEffect)((()=>{c(CS,GC())}),[]),(0,t.useEffect)((()=>{if(l.value)try{const n=l.value.find((e=>e.service.includes("bacnet_transparent")));n&&(e=[...l.value].filter((e=>e.service.includes("bacnet_transparent"))).length,s(e,t=n),a.current=setInterval((()=>{s(e,t)}),5e3))}catch(n){console.error(n)}var e,t;return()=>{clearInterval(a.current)}}),[l]);const d=[{title:o("port"),key:"port",width:100,render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("port")}),(0,ng.jsx)("span",{children:ZC(t.port)})]})},{title:o("type"),key:"sentPackets",width:150,render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("type")}),(0,ng.jsx)("span",{children:"IP"}),(0,ng.jsx)("br",{}),(0,ng.jsx)("span",{children:"MSTP"})]})},{title:o("sentPackets"),key:"sentPackets",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("sentPackets")}),(0,ng.jsx)("span",{children:t.packets.ip.tx}),(0,ng.jsx)("br",{}),(0,ng.jsx)("span",{children:t.packets.mstp.tx})]})},{title:o("recvPackets"),key:"recvPackets",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("recvPackets")}),(0,ng.jsx)("span",{children:t.packets.ip.rx}),(0,ng.jsx)("br",{}),(0,ng.jsx)("span",{children:t.packets.mstp.rx})]})},{title:o("errPackets"),key:"errPackets",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("errPackets")}),(0,ng.jsx)("span",{children:t.packets.ip.errors}),(0,ng.jsx)("br",{}),(0,ng.jsx)("span",{children:t.packets.mstp.errors})]})},{title:o("repeatPackets"),key:"repeatPackets",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("repeatPackets")}),(0,ng.jsx)("span",{children:t.packets.ip.repeat}),(0,ng.jsx)("br",{}),(0,ng.jsx)("span",{children:t.packets.mstp.repeat})]})}],u=[];e.map(((e,t)=>e.routers.map(((t,n)=>u.push({port:ZC(e.port),ipAddress:t.ip,lastSeen:t.last_seen,nets:t.nets})))));const f=[{title:o("port"),dataIndex:"port",key:"port",render:(e,t,n)=>0===n||2===n?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("ipAddress")}),(0,ng.jsx)("span",{children:t.port})]}):null,onCell:(e,t)=>0===t||2===t?{rowSpan:2}:{colSpan:0}},{title:o("ipAddress"),dataIndex:"ipAddress",key:"ipAddress",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("ipAddress")}),(0,ng.jsx)("span",{children:t.ipAddress})]})},{title:o("lastSeen"),dataIndex:"lastSeen",key:"lastSeen",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("lastSeen")}),(0,ng.jsx)("span",{children:t.lastSeen})]})},{title:o("nets"),dataIndex:"nets",key:"nets",render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:o("nets")}),t.nets.map(((e,t)=>(0,ng.jsx)(xK,{children:e},t)))]})}];return(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,children:(0,ng.jsx)(k_,{dataSource:e,columns:d,pagination:!1,rowKey:e=>e.packets.ip.rx})}),(0,ng.jsx)(Qv,{bordered:!1,title:o("routerBacnetRilevati"),children:(0,ng.jsx)(k_,{dataSource:u,columns:f,pagination:!1,rowKey:e=>e.ipAddress})})]})},WG=()=>{const[e,n]=(0,t.useState)([]),[r,o]=(0,t.useState)([]),[a,i]=(0,t.useState)(""),l=(0,t.useRef)(),{translate:c}=og(),[s,d]=(0,t.useState)(!1),[u,f]=mE(((e,t)=>cE(e,t)),[]);function p(e){m(e),l.current=setInterval((()=>{m(e)}),5e3)}function h(){clearInterval(l.current)}(0,t.useEffect)((()=>{if(u.value)try{const e=u.value.find((e=>e.service.includes("bacnet_transparent")));if(e){i(e.id),p(e.id);const t=[...u.value].filter((e=>e.service.includes("bacnet_transparent")));o([...t])}else d(!0)}catch(e){console.error(e),d(!0)}return()=>{h()}}),[u]),(0,t.useEffect)((()=>(f(CS,GC()),()=>h())),[]);async function m(e){try{const t=await cE("/diagnostic/bacnet/log"+"/".concat(e),GC(),!1);t&&n(t)}catch(t){n([])}}const g=[{title:"#",width:100,render:(e,t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"#"}),(0,ng.jsx)("span",{children:n+1})]})},{title:c("timestamp"),key:"timestamp",dataIndex:"timestamp",width:200,render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:c("sentPackets")}),(0,ng.jsx)("span",{children:t.timestamp})]})},{title:c("level"),key:"level",dataIndex:"level",width:100,render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:c("sentPackets")}),(0,ng.jsx)("span",{children:t.level})]})},{title:c("description"),key:"text",dataIndex:"text",render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:c("sentPackets")}),(0,ng.jsx)("span",{children:t.text})]})}];return(0,ng.jsx)("div",{className:"card-container",children:(0,ng.jsx)(Qv,{bordered:!1,children:s?(0,ng.jsx)(iO,{image:iO.PRESENTED_IMAGE_SIMPLE}):(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsxs)(hc,{children:[(0,ng.jsx)("span",{children:c("port")}),(0,ng.jsx)(HO,{value:a,style:{width:"200px"},options:(r||[]).map((e=>({value:e.id,label:ZC(e.id)}))),onChange:e=>(e=>{const t=e;i(t),h(),p(t)})(e)})]}),(0,ng.jsx)(k_,{dataSource:e,columns:g,pagination:!1,rowKey:"timestamp"})]})})})},VG=()=>{const{translate:e}=og(),n=(0,t.useRef)(),r=Array.from({length:128},((e,t)=>t)).map((e=>({mac:e,last_seen:"unknown"}))),[o,a]=mE(((e,t)=>cE(e,t)),[]),[i,l]=(0,t.useState)(""),[c,s]=(0,t.useState)([]),[d,u]=mE(((e,t,n)=>cE(e,t,n)),[]),[f,p]=mE(((e,t,n)=>cE(e,t,n)),[]),[h,m]=mE(((e,t,n)=>cE(e,t,n)),[]),[g,v]=(0,t.useState)([...r]),[b,y]=(0,t.useState)(),[x,w]=(0,t.useState)("");function C(){E(),n.current=setInterval((()=>{E()}),5e3)}function S(){clearInterval(n.current)}async function E(){m(pS,GC(),!1),u("".concat(xS,"/").concat(i),GC(),!1)}function k(t){const n=2592e3,r=31536e3;if(t<60)return"".concat(t," ").concat(e("secondi"));if(t<3600){const n=Math.floor(t/60);return"".concat(n," ").concat(e(1===n?"minuto":"minuti"))}if(t<86400){const n=Math.floor(t/3600);return"".concat(n," ").concat(e(1===n?"ore":"ora"))}if(t<n){const n=Math.floor(t/86400);return"".concat(n," ").concat(e(1===n?"giorno":"giorni"))}if(t<r){const r=Math.floor(t/n);return"".concat(r," ").concat(e(1===r?"mese":"mesi"))}{const n=Math.floor(t/r);return"".concat(n," ").concat(e(1===n?"anno":"anni"))}}(0,t.useEffect)((()=>{a(CS,GC())}),[]),(0,t.useEffect)((()=>{i&&(!async function(){const e=OS.replace("rs485_1",i);p(e,GC(),!1)}(),S(),C())}),[i]),(0,t.useEffect)((()=>{f.value&&y(f.value)}),[f]),(0,t.useEffect)((()=>{if(o.value){const e=o.value.find((e=>e.service.includes("bacnet_transparent")));if(e){l(e.id);const t=[...o.value].filter((e=>e.service.includes("bacnet_transparent")));s([...t])}}return()=>{S()}}),[o]),(0,t.useEffect)((()=>{h.value&&w(h.value.now)}),[h]),(0,t.useEffect)((()=>{if(d.value){var t;const e=structuredClone(r),n=null!==(t=d.value.mstp_nodes)&&void 0!==t?t:[];null===n||void 0===n||n.map((t=>{e[t.mac].last_seen=t.last_seen})),v([...e])}d.error&&ak.error(e(d.error.message))}),[d]);return(0,ng.jsx)("div",{className:"card-container",style:{gap:10},children:(0,ng.jsxs)(Qv,{children:[(0,ng.jsxs)(hc,{children:[(0,ng.jsx)("span",{children:e("port")}),(0,ng.jsx)(HO,{value:i,style:{width:"200px"},options:c.map((e=>({value:e.id,label:ZC(e.id)}))),onChange:e=>function(e){l(e)}(e)}),(0,ng.jsx)(IN,{title:e("deleteBacnetStats"),onConfirm:async()=>{try{const t=await uE(xS,i,"",GC());if("ok"===t.result)ak.success(e("ok")),v([...r]),S(),C();else if("error"===t.result)throw new Error("error")}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}},okText:e("yes"),cancelText:e("no"),children:(0,ng.jsx)(ac,{children:"Reset"})})]}),(0,ng.jsx)("div",{style:{containerType:"inline-size"},children:(0,ng.jsx)("div",{className:"tableBacnetRegister",children:null===g||void 0===g?void 0:g.map((t=>{const n=function(t){if(null!=(null===b||void 0===b?void 0:b.bacnet_conf.mstp_conf.mstp_bac_mac)&&(null===b||void 0===b?void 0:b.bacnet_conf.mstp_conf.mstp_bac_mac)===t.mac)return{status:e("currentDevice"),className:"bacnetRegisterBlue"};if(null!=(null===b||void 0===b?void 0:b.bacnet_conf.mstp_conf.mstp_max_masters)&&t.mac>(null===b||void 0===b?void 0:b.bacnet_conf.mstp_conf.mstp_max_masters))return{status:e("overMaxMaster"),className:"bacnetRegisterDarkGray"};const n=t.last_seen;if("unknown"!==n){const t=new Date(x),r=new Date(n),o=Math.abs((r.getTime()-t.getTime())/1e3);return o<=15?{status:"",className:"bacnetRegisterGreen"}:{status:"".concat(e("deviceNotRespondingFor")," ").concat(k(o)),className:"bacnetRegisterRed"}}return{status:e("deviceNotAvaible"),className:"bacnetRegisterGrey"}}(t);return(0,ng.jsx)("div",{children:(0,ng.jsx)(Hd,{title:n.status,children:(0,ng.jsx)("div",{className:"bacnetRegister ".concat(n.className),children:t.mac})})},t.mac)}))})})]})})},UG=()=>{const{translate:e}=og(),t=[{key:"1",label:(0,ng.jsx)("span",{children:e("mstpNodes")}),children:(0,ng.jsx)(VG,{})},{key:"2",label:(0,ng.jsx)("span",{children:e("statistic")}),children:(0,ng.jsx)(HG,{})},{key:"3",label:(0,ng.jsx)("span",{children:e("log")}),children:(0,ng.jsx)(WG,{})}];return(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("bacnetDiag")})}),(0,ng.jsx)(Qv,{children:(0,ng.jsx)(Mv,{defaultActiveKey:"1",items:t,destroyInactiveTabPane:!0})})]})},KG=()=>{const{translate:e}=og(),n=(0,t.useRef)(null),r=(e,t)=>{t()};return t=>({filterDropdown:t=>{let{setSelectedKeys:o,selectedKeys:a,confirm:i,clearFilters:l}=t;return(0,ng.jsxs)("div",{style:{padding:8},children:[(0,ng.jsx)(Aj,{ref:n,placeholder:e("search"),value:a[0],onChange:e=>o(e.target.value?[e.target.value]:[]),onPressEnter:()=>r(0,i),style:{width:188,marginBottom:8,display:"block"}}),(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(ac,{type:"primary",onClick:()=>r(0,i),icon:(0,ng.jsx)(uj,{}),size:"small",style:{width:90},children:e("search")}),(0,ng.jsx)(ac,{onClick:()=>((e,t)=>{e(),t()})(l,i),size:"small",style:{width:90},children:"Reset"})]})]})},filterIcon:e=>(0,ng.jsx)(uj,{style:{color:e?"#1890ff":void 0}}),onFilterDropdownOpenChange:e=>{e&&setTimeout((()=>{var e;return null===(e=n.current)||void 0===e?void 0:e.select()}),100)},onFilter:(e,n)=>Array.isArray(t)?null!=n[t[0]]&&null!=n[t[0]][t[1]]&&n[t[0]][t[1]].toString().toLowerCase().includes(e.toLowerCase()):null!=n[t]&&n[t].toString().toLowerCase().includes(e.toLowerCase())})},GG=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)({lang:"it",tz:"GMT+1"}),[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[c,s]=mE(((e,t,n)=>cE(e,t,n)),[]),[d,u]=mE(((e,t,n)=>cE(e,t,n)),[]),[f,p]=mE(((e,t,n)=>cE(e,t,n)),[]),h=(0,t.useRef)(),m=KG();function g(){s("/ylc/diag/ext",GC(),!1),u("/ylc/diag/comm",GC(),!1)}(0,t.useEffect)((()=>(g(),h.current=setInterval((()=>{g()}),5e3),p(hS,GC(),!1),()=>{clearInterval(h.current)})),[]),(0,t.useEffect)((()=>{c.value&&a(c.value)}),[c]),(0,t.useEffect)((()=>{d.value&&l(function(e){return e.map((e=>"invalid"===e.status?{...e,fwVersion:"---",lastComm:"---",baudrate:"---"}:{...e}))}(d.value))}),[d]),(0,t.useEffect)((()=>{f.value&&r({lang:f.value.language,tz:f.value.timezone})}),[f]);const v=[{title:e("name"),key:"name",dataIndex:"name",width:50,render:e=>(0,ng.jsx)("span",{children:e}),sorter:(e,t)=>e.name.localeCompare(t.name),...m("name")},{title:e("ipAddress"),dataIndex:"ip",key:"ip",width:50,render:e=>(0,ng.jsx)("span",{children:e}),sorter:(e,t)=>e.ip.localeCompare(t.ip)},{title:e("address"),dataIndex:"address",key:"address",width:50,render:e=>(0,ng.jsx)("span",{children:e}),sorter:(e,t)=>e.address-t.address},{title:e("lastRead"),dataIndex:"lastRead",key:"lastRead",width:50,render:t=>(0,ng.jsx)("span",{children:oS(t,e)}),sorter:(e,t)=>e.lastRead-t.lastRead},{title:e("maxValidity"),dataIndex:"maxValidity",key:"maxValidity",width:50,render:t=>(0,ng.jsx)("span",{children:oS(t,e)}),sorter:(e,t)=>e.maxValidity-t.maxValidity},{title:e("value"),dataIndex:"value",key:"value",width:50,render:t=>(0,ng.jsx)("span",{children:3270===t?e("invalid"):t}),sorter:(e,t)=>e.value-t.value}],b=[{title:e("description"),dataIndex:"description",key:"description",width:50,render:(t,r)=>{const o=new Date(r.dateTime),a=o.toLocaleDateString(n.lang),i=o.toLocaleTimeString(n.lang);return(0,ng.jsx)("span",{children:(0,ng.jsxs)(hc,{size:"large",children:[(0,ng.jsx)(Hd,{title:(0,ng.jsxs)(hc,{align:"start",direction:"vertical",children:["invalid"!==r.status&&r.fwVersion?e("fwVersion")+": "+r.fwVersion:"","invalid"!==r.status&&r.baudrate?e("baudRate")+": "+r.baudrate+" bps":"",r.model?e("model")+": "+r.model:"",r.dateTime?a+" "+i:""]}),children:(0,ng.jsx)(Tz,{})}),t]})})},sorter:(e,t)=>e.description.localeCompare(t.description),...m("description")},{title:e("connection"),dataIndex:"ip",key:"ip",width:50,render:(e,t)=>(0,ng.jsxs)(hc,{children:[ZC(t.port),(0,ng.jsx)(hB,{type:"vertical",style:{backgroundColor:"black"}}),e,(0,ng.jsx)(hB,{type:"vertical",style:{backgroundColor:"black"}}),"Slave: "+t.address]}),sorter:(e,t)=>(e.port+e.ip+e.address).localeCompare(t.port+t.ip+t.address)},{title:e("status"),dataIndex:"status",key:"status",width:50,align:"center",render:t=>{var n;return(0,ng.jsx)(Hd,{title:null!==(n=e(t))&&void 0!==n?n:t,children:(0,ng.jsx)("div",{style:{borderRadius:"3px",backgroundColor:"ok"===t?"green":"error"===t?"red":"gray"},children:(0,ng.jsx)("span",{children:"ok"===t?(0,ng.jsx)(NO,{style:{color:"white"}}):(0,ng.jsx)(zg,{style:{color:"white"}})})})})},sorter:(e,t)=>e.status.localeCompare(t.status)},{title:e("successPackets"),dataIndex:"successPackets",key:"successPackets",width:50,align:"center",render:(e,t)=>(0,ng.jsx)("span",{children:0!==t.totalPackets?(e/t.totalPackets*100).toFixed(1)+"%":""}),sorter:(e,t)=>e.successPackets-t.successPackets},{title:e("lastComm"),dataIndex:"lastComm",key:"lastComm",width:50,render:t=>(0,ng.jsx)("span",{children:"---"===t?t:oS(+t,e)}),sorter:(e,t)=>e.lastComm.toString().localeCompare(t.lastComm.toString())}];return(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("ylcDiag")})}),(0,ng.jsx)(Qv,{bordered:!1,title:(0,ng.jsx)("span",{children:e("commStatusDiag")}),children:(0,ng.jsx)(k_,{dataSource:i,columns:b,pagination:!1,rowKey:"id"})}),(0,ng.jsx)(Qv,{bordered:!1,title:(0,ng.jsx)("span",{children:e("DiagExtVar")}),children:(0,ng.jsx)(k_,{dataSource:o,columns:v,pagination:!1,rowKey:"name"})})]})},qG=(0,t.memo)(GG),XG=(e,n,r,o,a,i,l,c,s,d)=>{const[u,f]=(0,t.useState)([]),[p,h]=(0,t.useState)([]);return(0,t.useEffect)((()=>{var t;let u=e.filter((e=>e.parentCategories.includes(r)&&e.protocol===o));a&&(u=u.filter((e=>e.category===a))),f(u),c((null===(t=u.find((e=>e.id===i)))||void 0===t?void 0:t.tip)||""),1===u.length?l(u[0].id):i&&!u.some((e=>e.id===i))&&l(i);const p=u.map((e=>e.category));let m=n.filter((e=>p.includes(e.id)));h(m),1===m.length?(s(m[0].id),d(m[0].isExposed)):a&&!m.some((e=>e.id===a))&&s("")}),[e,n,r,o,a,i]),{filteredModels:u,filteredCategories:p}},YG=e=>{let{options:t,setValue:n,code:r}=e;const{translate:o}=og(),a={},i={};Object.keys(t).forEach((e=>{const n=e.match(/(\D+)(\d+)$/);if(n){const[r,o,i]=n;a[i]||(a[i]={}),a[i][e]=t[e]}else i[e]=t[e]}));const l=Object.keys(a).map((e=>parseInt(e,10))).sort(((e,t)=>e-t)).map((e=>e.toString())),c=e=>{const t=["paramEnable","offset","mult","angCoeff","descr","uom"];return e.sort(((e,n)=>t.findIndex((t=>e.includes(t)))-t.findIndex((e=>n.includes(e)))))};return(0,ng.jsxs)(ng.Fragment,{children:[Object.keys(i).map((e=>{const t=i[e];return"uomEnergy"===e&&"iem277"===r?(0,ng.jsxs)(qz,{gutter:24,style:{padding:"2px 0px"},children:[(0,ng.jsx)(Zz,{span:18,children:o("uom")}),(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsxs)(HO,{style:{width:200},value:t,onChange:e=>{n("uom",e)},children:[(0,ng.jsx)("option",{value:"0",children:o("dontForce")}),(0,ng.jsx)("option",{value:"6",children:o("forceMwh")}),(0,ng.jsx)("option",{value:"7",children:o("forceKwh")})]})})]}):null})),(0,ng.jsx)(Mv,{defaultActiveKey:"1",children:l.map((e=>(0,ng.jsx)(Nv,{tab:"".concat(o("input")," ").concat(e),children:c(Object.keys(a[e])).map((t=>{const r=a[e][t],i="paramEnable".concat(e),l=a[e][i],c="true"===l||!0===l;return t.includes("offset")||t.includes("mult")||t.includes("angCoeff")?(0,ng.jsxs)(qz,{style:{padding:"2px 0px"},children:[(0,ng.jsx)(Zz,{span:14,children:o(t.slice(0,-1))}),(0,ng.jsx)(Zz,{span:8,children:(0,ng.jsx)(xN,{id:t,style:{width:200},value:r,onChange:e=>{n(t,e)},disabled:(t.includes("offset")||t.includes("angCoeff"))&&!c})})]}):t.includes("descr")||t.includes("uom")?(0,ng.jsxs)(qz,{style:{padding:"2px 0px"},children:[(0,ng.jsx)(Zz,{span:14,children:o(t.slice(0,-1))}),(0,ng.jsx)(Zz,{span:8,children:(0,ng.jsx)(Aj,{id:t,style:{width:200},value:o(r),onChange:e=>{n(t,e.target.value)}})})]}):t.includes("paramEnable")?(0,ng.jsxs)(qz,{style:{padding:"2px 0px",height:35.6,alignItems:"center",justifyContent:"space-around"},children:[(0,ng.jsx)(Zz,{span:14,children:o(t.slice(0,-1))}),(0,ng.jsx)(Zz,{span:8,children:(0,ng.jsx)(yI,{id:t,checked:JSON.parse(r),onChange:e=>{n(t,e.toString())}})})]},t):null}))},e)))})]})},{Option:$G}=HO,JG=e=>{let{setIsModalOpen:n,isModalOpen:r,parentId:o,protocol:a,parentCategory:i}=e;const{translate:l}=og(),[c,s]=(0,t.useState)(),[d,u]=(0,t.useState)([]),[f,p]=(0,t.useState)([]),[h,m]=(0,t.useState)(a),[g,v]=(0,t.useState)(""),[b,y]=(0,t.useState)({}),[x,w]=(0,t.useState)(""),[C,S]=(0,t.useState)(0),[E,k]=(0,t.useState)(999),[j,I]=(0,t.useState)(1),[T,A]=(0,t.useState)("no"),[O,N]=(0,t.useState)(!1),[R,P]=(0,t.useState)(!1),[M,D]=(0,t.useState)(""),[L,_]=(0,t.useState)(""),[z,B]=(0,t.useState)(""),[F,H]=(0,t.useState)([]),[W,V]=(0,t.useState)(""),[U,K]=(0,t.useState)(""),[G,q]=(0,t.useState)([]),[X,Y]=(0,t.useState)([]),[$,J]=(0,t.useState)("automatic"),[Q,Z]=(0,t.useState)(1),[ee,te]=(0,t.useState)(1),[ne,re]=(0,t.useState)(1),[oe,ae]=(0,t.useState)(!1),[ie,le]=(0,t.useState)(!1),[ce,se]=(0,t.useState)(0),[de,ue]=(0,t.useState)("m"),[fe,pe]=(0,t.useState)(!0),[he,me]=(0,t.useState)("http"),[ge,ve]=(0,t.useState)(""),[be,ye]=(0,t.useState)(""),[xe,we]=mE(((e,t)=>cE(e,t)),[]),[Ce,Se]=mE(((e,t)=>cE(e,t)),[]),[Ee,ke]=mE(((e,t)=>cE(e,t)),[]);function je(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new Set(e);for(let r=t;r<=247;r++)if(!n.has(r))return r;return 248}(0,t.useEffect)((()=>{ke(MS,GC()),we(DS,GC()),Se(LS,GC())}),[]),(0,t.useEffect)((()=>{Ce.value&&p(Ce.value),xe.value&&u(xe.value),Ee.value&&H(Ee.value)}),[Ee,xe,Ce]);const Ie=(e,t)=>!!F.filter((e=>e.connection===t)).find((t=>t.address===e));(0,t.useEffect)((()=>{if(F.length>0){const e=F.filter((e=>e.connection===String(o))).map((e=>e.address)),t=F.map((e=>e.virtualAddress));e.length>0&&te(je(e)),re(je(t));const n=F.find((e=>e.id===o));n&&le("bridge"===n.category)}}),[F,o]),(0,t.useEffect)((()=>{var e,t;V(null===(e=d.find((e=>e.id===i)))||void 0===e?void 0:e.addChildrenMode),K(null===(t=F.find((e=>e.id===o)))||void 0===t?void 0:t.model)}),[d,f]);const{filteredModels:Te,filteredCategories:Ae}=XG(f,d,i,a,z,M,D,_,B,A);(0,t.useEffect)((()=>{"gsp485"===M||"iem277"===M||"pcp868"===M||"esp442"===M||"est482"===M?(w(M),y(Ne[M])):"hmr"===z?(w(z),y(Ne[z])):w(""),Pe(rS(f,M),o,eS(f,M),tS(f,M))}),[Te]);const Oe=async e=>{const t=G.map((e=>e.id));if("ok"===e)try{await dE("/vdev/auto/confirm",JSON.stringify(t),GC(),o),ak.success(l("ok"))}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return}else try{await dE("/vdev/auto/cancel",JSON.stringify(t),GC(),o),ak.success(l("ok"))}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return}},Ne={gsp485:{descr1:l("pulseCount1"),offset1:0,mult1:1,uom1:"",descr2:l("pulseCount2"),offset2:0,mult2:1,uom2:""},hmr:{descr1:l("pulseCount1"),offset1:0,multIn1:1,uomIn1:"",descr2:l("pulseCount2"),offset2:0,multIn2:1,uomIn2:"",descr3:l("pulseCount3"),offset3:0,multIn3:1,uomIn3:""},esp442:{paramEnable1:"false",angCoeff1:1,descr1:l("computedInput1"),offset1:0,uom1:"",paramEnable2:"false",angCoeff2:1,descr2:l("computedInput2"),offset2:0,uom2:"",paramEnable3:"false",angCoeff3:1,descr3:l("computedInput3"),offset3:0,uom3:"",paramEnable4:"false",angCoeff4:1,descr4:l("computedInput4"),offset4:0,uom4:""},est482:{paramEnable1:"false",angCoeff1:1,descr1:l("computedInput1"),offset1:0,uom1:"",paramEnable2:"false",angCoeff2:1,descr2:l("computedInput2"),offset2:0,uom2:"",paramEnable3:"false",angCoeff3:1,descr3:l("computedInput3"),offset3:0,uom3:"",paramEnable4:"false",angCoeff4:1,descr4:l("computedInput4"),offset4:0,uom4:"",paramEnable5:"false",angCoeff5:1,descr5:l("computedInput5"),offset5:0,uom5:"",paramEnable6:"false",angCoeff6:1,descr6:l("computedInput6"),offset6:0,uom6:"",paramEnable7:"false",angCoeff7:1,descr7:l("computedInput7"),offset7:0,uom7:"",paramEnable8:"false",angCoeff8:1,descr8:l("computedInput8"),offset8:0,uom8:""},cmc42x:{numMeters:0},pcp868:{descr1:l("pulseCount1"),offset1:"0",mult1:"1",uom1:"",descr2:l("pulseCount2"),offset2:"0",mult2:"1",uom2:""},iem277:{uom:"0",descr1:l("pulseCount1"),offset1:0,multIn1:1,uomIn1:"",descr2:l("pulseCount2"),offset2:0,multIn2:1,uomIn2:"",descr3:l("pulseCount3"),offset3:0,multIn3:1,uomIn3:""}},Re=[];d.map((e=>(Re.push({value:e.id,label:l(e.id)}),Re)));function Pe(e,t,n,r){function o(e){return!F.filter((e=>e.connection===t)).find((t=>t.address===e))}for(let a=e;a<=r;a++)if(o(a))return void te(a);for(let a=n;a<e;a++)if(o(a))return void te(a);console.log("No available address found")}const Me=()=>{if(ae(!0),"cmc42x"===U){const e={id:o,numMeters:Q};cE("/vdev/auto/add",GC(),!1,void 0,e).then((e=>{q(e),ae(!1)})).catch((e=>{console.log(e)}))}else cE("/vdev/auto/search",GC(),!1,o).then((e=>{q(e),ae(!1)})).catch((e=>{console.log(e)}))},De=()=>{pe("h"!==de||!(ce>24||ce<1))},Le=(0,ng.jsxs)(HO,{defaultValue:"m",style:{width:100},onChange:e=>{ue(e),De()},children:[(0,ng.jsx)($G,{value:"m",children:l("minutes")}),(0,ng.jsx)($G,{value:"h",children:l("hour")})]});return(0,ng.jsx)(UC,{title:l("addNewVD"),okButtonProps:{disabled:"all"===W&&"automatic"===$||"automatic"===W?"csw"===i||"brgc"===i||"mbusgtw"===i?0===G.length:"cmc42x"!==U&&0===X.length:("all"===W&&"manual"===$||"manual"===W)&&(!z||!M||O||R||"http"===a&&""===ge)},open:r,onOk:async()=>{if("all"===W&&"automatic"===$||"automatic"===W||("all"!==W||"manual"!==$)&&"manual"!==W&&null)Oe("ok");else{const t={id:_z(),enabled:!0,category:z,model:M,address:ee,virtualAddress:"yes"===T?ne:0,protocol:h,connection:o,description:g,options:b,isExposed:T,automaticallyAdded:"no",radioPollingPeriod:ce,url:ge,apiKey:be};try{s(t),await sE(MS,JSON.stringify(t),GC()),ak.success("".concat(t.description," aggiunto correttamente!"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(l(e.message))}}n(!1)},onCancel:()=>{("all"===W&&"automatic"===$||"automatic"===W||("all"!==W||"manual"!==$)&&"manual"!==W&&null)&&Oe("cancel"),setTimeout((()=>{n(!1)}),500)},afterClose:()=>ke(MS,GC()),width:800,cancelText:l("cancel"),okText:l("ok"),maskClosable:!1,children:(0,ng.jsxs)("div",{className:"modal-body",children:["all"===W&&(0,ng.jsxs)(hc,{direction:"horizontal",children:[(0,ng.jsx)("span",{children:l("devCreationMode")}),(0,ng.jsxs)(HO,{style:{width:150},onChange:e=>{J(e),"automatic"===e&&(G.length=0)},defaultValue:$,children:[(0,ng.jsx)("option",{value:"automatic",children:l("auto")}),(0,ng.jsx)("option",{value:"manual",children:l("man")})]})]}),(0,ng.jsx)(hB,{}),"all"===W&&"automatic"===$||"automatic"===W?"csw"===i||"brgc"===i||"mbusgtw"===i?(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsxs)(hc,{direction:"horizontal",children:[l("scan"),(0,ng.jsx)(Hd,{title:"Scan",children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(uj,{}),onClick:Me})})]}),(0,ng.jsxs)("div",{children:[(0,ng.jsx)(rD,{spinning:oe,indicator:(0,ng.jsx)(yl,{style:{fontSize:24},spin:!0})}),G.length>0?(0,ng.jsx)("h4",{children:l("devDetected")}):null,(0,ng.jsx)("ul",{style:{padding:20},children:G.map((e=>{var t;return(0,ng.jsx)("li",{children:(0,ng.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[(0,ng.jsx)("span",{style:{width:"250px"},children:null===(t=f.find((t=>t.id===e.model)))||void 0===t?void 0:t.description}),(0,ng.jsx)("span",{children:e.description})]})},e.id)}))})]})]}):"cmc42x"===U?(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsxs)(hc,{direction:"horizontal",children:[l("numOfMetersToConnect"),":",(0,ng.jsx)(xN,{min:1,max:5,defaultValue:1,onChange:e=>{null!=e&&Z(e)}}),(0,ng.jsx)(Hd,{title:"Scan",children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(uj,{}),onClick:Me})})]}),(0,ng.jsxs)("div",{children:[(0,ng.jsx)(rD,{spinning:oe,indicator:(0,ng.jsx)(yl,{style:{fontSize:24},spin:!0})}),G.length>0?(0,ng.jsx)("h4",{children:l("devDetected")}):null,(0,ng.jsx)("ul",{style:{padding:20},children:G.map((e=>{var t;return(0,ng.jsx)("li",{children:(0,ng.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[(0,ng.jsx)("span",{style:{width:"250px"},children:null===(t=f.find((t=>t.id===e.model)))||void 0===t?void 0:t.description}),(0,ng.jsx)("span",{children:e.description})]})},e.id)}))})]})]}):(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsxs)(hc,{direction:"horizontal",children:[l("loadFile"),(0,ng.jsx)(tH,{showUploadList:!1,customRequest:async e=>{const{file:t}=e;ae(!0);try{await fE({request:"/vdev/auto/loadfile",file:t,token:GC(),loader:!1,id:o}).then((e=>{Y(e),ae(!1)})).catch((e=>{console.log(e)}))}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return;ak.error(l(n.message))}},maxCount:1,accept:".csv",children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(lH,{style:{color:"gray",fontSize:"18px"}},"setting"),children:l("selectFile")})})]}),(0,ng.jsxs)("div",{children:[(0,ng.jsx)(rD,{spinning:oe,indicator:(0,ng.jsx)(yl,{style:{fontSize:24},spin:!0})}),X.length>0?(0,ng.jsx)("h4",{children:l("devFound")}):null,(0,ng.jsx)("ul",{style:{padding:20},children:X.map((e=>{var t;return(0,ng.jsx)("li",{children:(0,ng.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[(0,ng.jsx)("span",{style:{width:"250px"},children:null===(t=f.find((t=>t.id===e.model)))||void 0===t?void 0:t.description}),(0,ng.jsx)("span",{children:e.description})]})},e.id)}))})]})]}):null,"all"===W&&"manual"===$||"manual"===W?(0,ng.jsxs)(hc,{direction:"vertical",style:{width:"100%"},children:[(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:l("category")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(HO,{style:{width:400},value:z,allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:(e,t)=>{var n;return(null!==(n=null===t||void 0===t?void 0:t.label)&&void 0!==n?n:"").toLowerCase().includes(e)},options:Ae.map((e=>({label:l(e.id),value:e.id}))),onChange:e=>{B(e),D("");const t=d.find((t=>t.id===e));t&&A(t.isExposed)}})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:l("model")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(HO,{style:{width:400},value:M,allowClear:!0,showSearch:!0,filterOption:(e,t)=>{var n;return(null!==(n=null===t||void 0===t?void 0:t.label)&&void 0!==n?n:"").toLowerCase().includes(e)},options:Te.map((e=>({label:e.description,value:e.id}))),onChange:e=>{var t,n,r;D(e),_((null===(t=f.find((t=>t.id===e)))||void 0===t?void 0:t.tip)||"");const a=(null===(n=f.find((t=>t.id===e)))||void 0===n?void 0:n.category)||"";B(a);const i=d.find((e=>e.id===a));i&&A(i.isExposed),m((null===(r=f.find((t=>t.id===e)))||void 0===r?void 0:r.protocol)||""),S(eS(f,e)),k(tS(f,e)),I(nS(f,e)),Pe(rS(f,e),o,eS(f,e),tS(f,e))}}),L&&(0,ng.jsx)(Hd,{title:(0,ng.jsx)("span",{style:{whiteSpace:"pre-line"},children:L}),children:(0,ng.jsx)(Tz,{})})]})})]}),"http"===a?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:"URL"}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsxs)(hc.Compact,{style:{width:400},children:[(0,ng.jsx)(HO,{defaultValue:"http",onChange:e=>me(e),options:[{value:"http",label:"http"},{value:"https",label:"https"}],style:{width:100}}),(0,ng.jsx)(Aj,{placeholder:"".concat(l("address"),":").concat(l("port")),onChange:e=>{ve("".concat(he,"://").concat(e.target.value))}})]})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:"API Key"}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(Aj,{style:{width:400},placeholder:"API Key",onChange:e=>ye(e.target.value)})})]})]}):(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:l("fisicalAddress")}),(0,ng.jsxs)(Zz,{span:16,children:[(0,ng.jsx)(xN,{style:{borderColor:O?"red":"#d9d9d9"},value:ee,min:C,max:E,step:j,onChange:e=>{null!==e&&void 0!==e&&(e=>{Ie(e,o),N(Ie(e,o)),te(e)})(e)}}),O&&(0,ng.jsx)("span",{style:{color:"red"},children:(0,ng.jsxs)("small",{children:[" ",l("addressAlreadyUsed")]})})]})]}),"yes"===T?(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:l("virtualAddress")}),(0,ng.jsxs)(Zz,{span:16,children:[(0,ng.jsx)(xN,{style:{borderColor:R?"red":"#d9d9d9"},value:ne,min:1,max:247,onChange:e=>{null!=e&&(e=>{const t=F.find((t=>t.virtualAddress===e));P(!!t),re(e)})(e)}}),R&&(0,ng.jsx)("span",{style:{color:"red"},children:(0,ng.jsxs)("small",{children:[" ",l("addressAlreadyUsed")]})})]})]}):null,ie?(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:l("pollingTime")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(xN,{style:{width:200},min:"h"===de?1:2,max:"h"===de?24:1440,defaultValue:"h"===de?1:15,onChange:e=>{e&&(De(),se("h"===de?60*e:e))},addonAfter:Le})})]}):null,(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:l("description")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(Aj,{style:{width:400},placeholder:l("description"),onChange:e=>{v(e.target.value)}})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:l("protocol")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(Aj,{value:h,disabled:!0,style:{width:400}})})]}),""!==x?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(hB,{orientation:"left",style:{marginTop:"40px"},children:l("specificParams")}),(0,ng.jsx)(YG,{options:b,setValue:(e,t)=>{y((n=>({...n,[e]:t})))},code:x})]}):null]}):null]})})},QG=e=>{let{setIsModalCloneOpen:n,isModalCloneOpen:r,doGetVirtualDevice:o,vdevice:a}=e;const{translate:i}=og(),[l,c]=(0,t.useState)(),[s,d]=(0,t.useState)(1);(0,t.useEffect)((()=>{o(MS,GC())}),[]);return(0,ng.jsx)(UC,{title:i("cloneDevice")+" "+a.description,open:r,onOk:async()=>{for(let t=1;t<s+1;t++){const n=/(\d+)$/,r=a.description.match(n);if(r){const e=r[1],t=parseInt(e,10)+1;a.description=a.description.replace(n,t.toString())}else a.description=a.description+" "+Number(t+1);const o={id:_z(),enabled:!0,category:a.category,model:a.model,address:a.address+t,virtualAddress:a.virtualAddress+t,protocol:a.protocol,connection:a.connection,description:a.description,options:a.options,isExposed:a.isExposed,automaticallyAdded:a.automaticallyAdded,radioPollingPeriod:a.radioPollingPeriod};try{c(o),await sE(MS,JSON.stringify(o),GC()),ak.success("".concat(o.description," ").concat(i("addSuccessfully"),"!"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(i(e.message))}}n(!1)},onCancel:()=>{n(!1)},afterClose:()=>o(MS,GC()),width:800,cancelText:i("cancel"),okText:i("ok"),children:(0,ng.jsxs)("div",{className:"modal-body",children:[(0,ng.jsx)("span",{children:i("numOfCopy")}),(0,ng.jsx)(xN,{min:1,max:10,defaultValue:1,onChange:e=>{d(Number(e))}})]})})},ZG={id:"",enabled:!0,category:"emr",model:"256",address:1,isExposed:"yes",virtualAddress:1,protocol:"modbus",connection:"rs485_1",description:"Misuratore elettrico",automaticallyAdded:"no",radioPollingPeriod:0,options:{}},eq=e=>{var n,r,o,a;let{setIsModalEditOpen:i,isModalEditOpen:l,modelId:c,device:s}=e;const{translate:d}=og(),[u,f]=(0,t.useState)([]),[p,h]=(0,t.useState)([]),[m,g]=(0,t.useState)({}),[v,b]=(0,t.useState)(!1),[y,x]=(0,t.useState)(!1),[w,C]=(0,t.useState)(!1),[S,E]=(0,t.useState)(!1),[k,j]=(0,t.useState)(!1),[I,T]=(0,t.useState)([]),[A,O]=(0,t.useState)(s),[N,R]=(0,t.useState)(ZG),[P,M]=(0,t.useState)(s.model),[D,L]=(0,t.useState)(""),[_,z]=(0,t.useState)(s.category),[B,F]=(0,t.useState)(!1),[H,W]=(0,t.useState)(!1),[V,U]=(0,t.useState)(0),[K,G]=(0,t.useState)(999),[q,X]=(0,t.useState)(1),[Y,$]=(0,t.useState)("no"),[J,Q]=(0,t.useState)(s.radioPollingPeriod),[Z,ee]=(0,t.useState)("m"),{Option:te}=HO,[ne,re]=(0,t.useState)(null===(n=s.url)||void 0===n?void 0:n.split("://")[0]),[oe,ae]=(0,t.useState)(null===(r=s.url)||void 0===r?void 0:r.split("://")[1]),[ie,le]=mE(((e,t)=>cE(e,t)),[]),[ce,se]=mE(((e,t)=>cE(e,t)),[]),[de,ue]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{ue(MS,GC()),le(DS,GC()),se(LS,GC())}),[]),(0,t.useEffect)((()=>{ce.value&&h(ce.value),ie.value&&f(ie.value),de.value&&(T(de.value),R(de.value.find((e=>e.id===s.connection))),U(eS(p,s.model)),G(tS(p,s.model)),X(nS(p,s.model)),g(s.options))}),[de,ie,ce]),(0,t.useEffect)((()=>{if(N){const e=null===N||void 0===N?void 0:N.category,t=null===N||void 0===N?void 0:N.model,n=!I.find((e=>e.connection===s.id));"yes"===s.automaticallyAdded?"csw"===e?("stt868"===s.model||"stu868"===s.model||"cop868"===s.model||"thp868"===s.model||"atr868"===s.model||"pcp868"===s.model)&&(x(!0),E(!0)):"brgc"===e?"bridge"===s.category&&"brg868"===s.model&&(x(!0),E(!0)):"mbusgtw"===e&&("cdpv1"===t||"cdpv2"===t?"hmr"===s.category&&("ief176"!==s.model&&"ief276"!==s.model&&"pollustat"!==s.model&&"uhf"!==s.model&&"mhf"!==s.model&&"kam403mbus"!==s.model&&"isofluxm4"!==s.model||(x(!0),E(!0),j(!0))):"cmc42x"===t?"hmr"===s.category&&"cmcmeter"===s.model&&(x(!0),E(!0)):(x(!0),E(!0))):n?(b(!0),j(!0),E(!0),x(!0),C(!0)):(E(!0),b(!1),j(!1))}}),[N]);const fe=(e,t)=>{if("address"===e){const e=(n=t,r=N.id,!!I.filter((e=>e.connection===r)).find((e=>e.address===n&&e.address!==s.address)));F(!!e)}else if("virtualAddress"===e){const e=I.find((e=>e.virtualAddress===t));W(!!e)}var n,r;O((n=>({...n,[e]:t})))},{filteredModels:pe,filteredCategories:he}=XG(p,u,N.category,N.protocol,_||s.category,P||s.model,M,L,z,$),me=(0,ng.jsxs)(HO,{defaultValue:"m",style:{width:100},onChange:e=>ee(e),children:[(0,ng.jsx)(te,{value:"m",children:d("minutes")}),(0,ng.jsx)(te,{value:"h",children:d("hour")})]});return(0,ng.jsx)(UC,{title:d("editDevice"),okButtonProps:{disabled:B||H||"http"===s.protocol&&""===(null===oe||void 0===oe?void 0:oe.split("://")[1])},open:l,onOk:async()=>{try{await dE(MS,JSON.stringify(A),GC(),s.id),ak.success("".concat(s.description," ").concat(d("editSuccessfully"),"!"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(d(e.message))}i(!1)},onCancel:()=>{i(!1)},afterClose:()=>ue(MS,GC()),width:800,cancelText:d("cancel"),okText:d("ok"),maskClosable:!1,children:(0,ng.jsx)("div",{className:"modal-body",children:(0,ng.jsxs)(hc,{direction:"vertical",style:{width:"100%"},children:[(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:d("category")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(HO,{disabled:!v,style:{width:400},value:_,allowClear:!0,showSearch:!0,optionFilterProp:"children",options:he.map((e=>({label:d(e.id),value:e.id}))),onChange:e=>{z(e),fe("category",e),M("");const t=u.find((t=>t.id===e));t&&fe("isExposed",t.isExposed)}})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:d("model")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(HO,{disabled:!k,style:{width:400},value:P,allowClear:!0,showSearch:!0,optionFilterProp:"children",options:pe.map((e=>({label:e.description,value:e.id}))),onChange:e=>{var t,n,r;M(e),fe("model",e),L((null===(t=p.find((t=>t.id===e)))||void 0===t?void 0:t.tip)||"");const o=(null===(n=p.find((t=>t.id===e)))||void 0===n?void 0:n.category)||"";z(o);const a=u.find((t=>t.id===e));a&&fe("isExposed",a.isExposed),fe("protocol",null===(r=p.find((t=>t.id===e)))||void 0===r?void 0:r.protocol),U(eS(p,e)),G(tS(p,e)),X(nS(p,e))}}),D&&(0,ng.jsx)(Hd,{title:(0,ng.jsx)("span",{style:{whiteSpace:"pre-line"},children:D}),children:(0,ng.jsx)(Tz,{})})]})})]}),"http"===s.protocol?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:"URL"}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsxs)(hc.Compact,{style:{width:400},children:[(0,ng.jsx)(HO,{defaultValue:null===(o=s.url)||void 0===o?void 0:o.split("://")[0],onChange:e=>{re(e),fe("url",s.url.replace(s.url.split("://")[0],e))},options:[{value:"http",label:"http"},{value:"https",label:"https"}],style:{width:100}}),(0,ng.jsx)(Aj,{placeholder:"".concat(d("address"),":").concat(d("port")),defaultValue:null===(a=s.url)||void 0===a?void 0:a.split("://")[1],onChange:e=>{e&&fe("url","".concat(ne,"://").concat(e.target.value))}})]})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:"API Key"}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(Aj,{style:{width:400},placeholder:"API Key",defaultValue:s.apiKey,onChange:e=>fe("apiKey",e.target.value)})})]})]}):(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:d("fisicalAddress")}),(0,ng.jsxs)(Zz,{span:16,children:[(0,ng.jsx)(xN,{defaultValue:s.address,disabled:!w,style:{borderColor:B?"red":"#d9d9d9"},min:V,max:K,step:q,onChange:e=>{fe("address",null!==e&&void 0!==e?e:null)}}),B&&(0,ng.jsx)("span",{style:{color:"red"},children:(0,ng.jsxs)("small",{children:[" ",d("addressAlreadyUsed")]})})]})]}),"yes"===s.isExposed?(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:d("virtualAddress")}),(0,ng.jsxs)(Zz,{span:16,children:[(0,ng.jsx)(xN,{defaultValue:s.virtualAddress,disabled:!y,style:{borderColor:H?"red":"#d9d9d9"},min:1,max:247,onChange:e=>{e&&fe("virtualAddress",e)}}),H&&(0,ng.jsx)("span",{style:{color:"red"},children:(0,ng.jsxs)("small",{children:[" ",d("addressAlreadyUsed")]})})]})]}):null,"bridge"===(null===N||void 0===N?void 0:N.category)?(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:d("pollingTime")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(xN,{style:{width:200},min:"h"===Z?1:2,max:"h"===Z?24:1440,defaultValue:s.radioPollingPeriod,onChange:e=>{e&&(Q("h"===Z?60*e:e),fe("radioPollingPeriod",e))},addonAfter:me})})]}):null,(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:d("description")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(Aj,{disabled:!S,defaultValue:s.description,style:{width:400},placeholder:d("description"),onChange:e=>{fe("description",e.target.value)}})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:8,children:d("protocol")}),(0,ng.jsx)(Zz,{span:16,children:(0,ng.jsx)(Aj,{value:s.protocol,disabled:!0,style:{width:400}})})]}),Object.keys(s.options).length>0?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(hB,{orientation:"left",style:{marginTop:"40px"},children:d("specificParams")}),(0,ng.jsx)(YG,{options:m,setValue:(e,t)=>{g((n=>({...n,[e]:t}))),O((n=>({...n,options:{...n.options,[e]:t}})))},code:"gsp485"===s.model||"iem277"===s.model||"cmc42x"===s.model||"pcp868"===s.model||"esp442"===s.model||"est482"===s.model?s.model:"hmr"===s.category?s.category:""})]}):null]})})})},{confirm:tq}=UC,nq=(e,t,n,r)=>{const{translate:o}=og(),a=async e=>{if(e.length>0)try{for(const n of e)await uE(MS,n,"",t());await r(MS,t()),n(),ak.success(o("ok"))}catch(a){if(null!==a&&void 0!==a&&a.globalHandled)return;ak.error(o(a.message))}},i=(e,t)=>{let n=[];return function t(r){const o=e.filter((e=>e.connection===r));n=n.concat(o.map((e=>e.id))),o.forEach((e=>t(e.id)))}(t),n};return{handleDeleteConfirm:a,findChildren:i,showConfirm:n=>{let r="",l="";const c=i(e,n);c.push(n),c.length>1&&(r=o("warningDelDevice")),(async()=>{(await cE(nE,t(),!1)).vars.length>0&&(l=o("warningDelDeviceVVar")),tq({title:o("delDeviceQuestion"),icon:(0,ng.jsx)(Qy,{}),content:"".concat(r,"\n").concat(l),onOk(){a(c)},onCancel(){console.log("Cancel")},cancelText:o("cancel"),okText:o("ok")})})()}}},rq=e=>{let{options:t}=e;const{translate:n}=og(),r=Object.entries(t).filter((e=>{let[t]=e;return!/\d+$/.test(t)})),o=Object.entries(t).filter((e=>{let[t]=e;return/\d+$/.test(t)})).reduce(((e,t)=>{var n;let[r,o]=t;const a=null===(n=r.match(/\d+$/))||void 0===n?void 0:n[0],i=parseInt(a||"0");return e[i]||(e[i]=[]),e[i].push([r,o]),e}),[]),a=o.length,i=(0,ng.jsxs)(ng.Fragment,{children:[r.length>0&&(0,ng.jsx)("div",{children:r.map((e=>{let[t,r]=e;return(0,ng.jsx)("div",{children:(0,ng.jsxs)("span",{children:[n(t),": ",r]})},t)}))}),Array.from({length:a},((e,t)=>{const r=t.toString(),a=o[t]||[];return(0,ng.jsx)("div",{children:a.length>0&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{children:(0,ng.jsx)("b",{children:n("input")+" "+r})}),a.map((e=>{let[t,r]=e;return(0,ng.jsx)("div",{children:(0,ng.jsxs)("span",{children:[n(t.slice(0,-1)),": ",n("false"===r?"false":"true"===r?"true":r)]})},t)}))]})},t)}))]});return(0,ng.jsx)(ng.Fragment,{children:i})},oq="00000000-0000-0000-0000-000000000000",aq=e=>e.reduce(((e,t)=>e+1+aq(t.children||[])),0),iq=(e,t)=>!!t.includes(e.id)||!!(e.children&&e.children.length>0)&&e.children.some((e=>iq(e,t))),lq=e=>{var n,r;let{device:o,modelMap:a,diagnosticMap:i,selectedIds:l,strategy:c}=e;const[s,d]=(0,t.useState)(!0),u=l.includes(o.id),f=a[o.model],p=i?i[o.id]:void 0,h=o.children&&o.children.length>0,m=o.children&&1===o.children.length,g=o.id===oq,v="radio"===(null===f||void 0===f?void 0:f.physicalConnectionType),b=c.hasBattery?c.hasBattery(p):"no",y=c.getStatusClass?c.getStatusClass(p):"",x=c.getBatteryClass?c.getBatteryClass(p):"",w=c.getSignalClass?c.getSignalClass(p):"",C=c.getBatteryCharge?c.getBatteryCharge(p):"",{translate:S}=og(),E=!s&&h?aq(o.children):0;return(0,t.useEffect)((()=>{if(l.length>0){iq(o,l)&&d(!0)}}),[l,o]),(0,ng.jsxs)("div",{className:"tree-branch",children:[(0,ng.jsxs)("div",{className:"node-container",children:[(0,ng.jsx)("div",{className:"device-card ".concat(g?"master-card":""," ").concat(u?"selected-node":""," ").concat("diagnostic"!==c.mode||g?"":y),onClick:e=>{e.stopPropagation(),g||o.connection===oq||c.onSelect(o,e.ctrlKey||e.metaKey)},children:g?(0,ng.jsx)("div",{className:"root-content",children:(0,ng.jsx)("span",{className:"root-name",children:o.description})}):(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("div",{className:"device-content",children:[v&&(0,ng.jsx)("div",{style:{position:"absolute",width:18},children:(0,ng.jsxs)("svg",{version:"1.1",className:"signal ".concat(w),xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"15px",height:"15px",viewBox:"0 0 11.26 8",enableBackground:"new 0 0 11.26 8",children:[(0,ng.jsx)("path",{className:"signal-base",stroke:"35678a",d:"M6.337,7.247c-0.391-0.391-1.023-0.391-1.414,0l0.708,0.708L6.337,7.247z"}),(0,ng.jsxs)("g",{className:"signal-wave",children:[(0,ng.jsx)("path",{className:"signal-wave-inner",fill:"none",stroke:"#35678a",strokeMiterlimit:"10",d:"M7.62,5.966c-1.098-1.098-2.88-1.098-3.977,0"}),(0,ng.jsx)("path",{className:"signal-wave-middle",fill:"none",stroke:"#35678a",strokeMiterlimit:"10",d:"M9.31,4.275C7.278,2.244,3.984,2.245,1.952,4.276"}),(0,ng.jsx)("path",{className:"signal-wave-outer",fill:"none",stroke:"#35678a",strokeMiterlimit:"10",d:"M10.9,2.684c-2.911-2.911-7.629-2.911-10.54,0"})]})]})}),(0,ng.jsx)("p",{className:"device-name truncate",children:f?f.description:null}),(0,ng.jsx)("p",{className:"device-model truncate",children:o.description}),o.connection!==oq&&(0,ng.jsxs)("div",{className:"device-address",children:["http"===o.protocol?(0,ng.jsxs)("p",{title:"".concat(o.url),children:[(0,ng.jsx)("b",{children:"URL"}),": ",aS(o.url,20,!0)]}):(0,ng.jsxs)("p",{children:[(0,ng.jsx)("b",{children:S("fisicalAddress")}),": ",o.address]}),(0,ng.jsxs)("p",{children:[(0,ng.jsx)("b",{children:S("virtualAddress")}),": ",o.virtualAddress]})]})]}),c.showActions&&!g&&(0,ng.jsxs)("div",{className:"action-content",children:[c.canRemove(o)&&(0,ng.jsx)("button",{className:"rem-button",onClick:e=>{var t;e.stopPropagation(),null===(t=c.onRemove)||void 0===t||t.call(c,o)},children:(0,ng.jsx)(zg,{style:{color:"#ffffff"}})}),c.canAdd(o,f)&&(0,ng.jsx)("button",{className:"add-button",onClick:e=>{var t;e.stopPropagation(),null===(t=c.onAdd)||void 0===t||t.call(c,o)},children:(0,ng.jsx)(Hg,{style:{color:"#ffffff"}})})]}),"diagnostic"===c.mode&&"yes"===b&&(0,ng.jsx)("div",{className:"battery-container",children:(0,ng.jsx)("div",{className:"battery",children:(0,ng.jsx)("div",{className:"battery-body",children:(0,ng.jsx)("div",{className:"battery-charge ".concat(x),style:{width:"".concat(C,"%")}})})})})]})}),h&&(0,ng.jsxs)("div",{className:"line-out-container",children:[(0,ng.jsx)("div",{className:"line-out ".concat("radio"===(null===(n=a[o.children[0].model])||void 0===n?void 0:n.physicalConnectionType)?"border-dashed":"border-solid"),style:{width:s?35:0}}),o.id!==oq&&(0,ng.jsxs)("div",{className:"toggle-wrapper",children:[(0,ng.jsx)("button",{className:"expand-toggle",onClick:()=>d(!s),children:s?(0,ng.jsx)(MO,{}):(0,ng.jsx)(bt,{})}),!s&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"child-count-badge",onClick:()=>d(!s),children:E}),(0,ng.jsx)("div",{className:"arrow-right"})]})]})]})]}),h&&s&&(0,ng.jsx)("div",{className:"children-wrapper ".concat(m?"is-single-child":""," ").concat("radio"===(null===(r=a[o.children[0].model])||void 0===r?void 0:r.physicalConnectionType)?"border-left-dashed":"border-left-solid"),children:o.children.map((e=>{const t=a[e.model],n=t&&"radio"===t.physicalConnectionType;return(0,ng.jsxs)("div",{className:"child-row",children:[(0,ng.jsx)("div",{className:"line-in ".concat(n?"border-dashed":"border-solid")}),(0,ng.jsx)(lq,{device:e,modelMap:a,diagnosticMap:i,selectedIds:l,strategy:c})]},e.id)}))})]})},cq=lq,sq="00000000-0000-0000-0000-000000000000",dq=()=>{var e;const[n,r]=(0,t.useState)([]),[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),{translate:c}=og(),[s,d]=(0,t.useState)(!1),[u,f]=(0,t.useState)([]),[p,h]=(0,t.useState)(""),[m,g]=(0,t.useState)(null),[v,b]=(0,t.useState)(),[y,x]=(0,t.useState)(!1),[w,C]=(0,t.useState)(!1),[S,E]=(0,t.useState)(!1),[k,j]=(0,t.useState)(""),[,I]=(0,t.useState)(0),[,T]=(0,t.useState)(0),[,A]=(0,t.useState)(null),[O,N]=(0,t.useState)(""),[,R]=(0,t.useState)(""),[P,M]=(0,t.useState)(window.innerHeight+"px"),[D,L]=(0,t.useState)([]),[_,z]=(0,t.useState)(""),[B,F]=(0,t.useState)(null),[H,W]=mE(((e,t)=>cE(e,t)),[]),[V,U]=mE(((e,t)=>cE(e,t)),[]),[K,G]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{sessionStorage.removeItem("selectedNodes"),W(MS,GC()),U(DS,GC()),G(LS,GC())}),[y,S,w]),(0,t.useEffect)((()=>{H.value&&r([...H.value]),V.value&&a([...V.value]),K.value&&l([...K.value])}),[H,V,K]);const{showConfirm:q}=nq(n,GC,(()=>{W(MS,GC()).then((e=>{r(e)}))}),W),X={};i.forEach((e=>{X[e.id]={id:e.id,category:e.category,description:e.description,protocol:e.protocol,driver:e.driver,defaultAddress:e.defaultAddress,addressRange:{min:e.addressRange.min,max:e.addressRange.max,step:e.addressRange.step},maxChilds:e.maxChilds,physicalConnectionType:e.physicalConnectionType,parentCategories:e.parentCategories,tip:e.tip}}));const Y={};function $(e){const t=new Map,n={id:sq,description:"EHC 602",connection:"",enabled:!0,category:"",model:"",address:0,protocol:"",isExposed:"",virtualAddress:1,automaticallyAdded:"yes",radioPollingPeriod:0,url:void 0,apiKey:void 0,options:{},children:[]};return e.forEach((e=>{t.set(e.id,{...e,children:[]})})),t.forEach((e=>{if(e.connection===sq)n.children.push(e);else{const n=t.get(e.connection);n&&n.children.push(e)}})),n.children.sort(((e,t)=>e.id<t.id?-1:e.id>t.id?1:0)),[n]}o.forEach((e=>{Y[e.id]={id:e.id,base:e.base,isExposed:e.isExposed,addChildrenMode:e.addChildrenMode,protocols:e.protocols}})),(0,t.useEffect)((()=>{const e={virtualdevice:$(n)};L(e.virtualdevice)}),[n]);(0,t.useEffect)((()=>{const e=()=>{M(window.innerHeight+550+"px")};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const J={mode:"config",showActions:!0,canAdd:(e,t)=>!!t&&t.maxChilds>0,canRemove:e=>e.connection!==sq,onSelect:(e,t)=>((e,t)=>{f(t?t=>t.includes(e.id)?t.filter((t=>t!==e.id)):[...t,e.id]:[e.id]);const r=n.find((t=>t.id===e.id));h(e.id),g(e.description),b(r),j(e.protocol),d(!0)})(e,t),onAdd:e=>{return h((t=e).id),j(t.protocol),N(t.category),void x(!0);var t},onRemove:e=>q(e.id)},Q=e=>{if(z(e),!e.trim())return F(null),void f([]);const t=e.toLowerCase(),r=n.filter((e=>e.description&&e.description.toLowerCase().includes(t)||e.model&&e.model.toLowerCase().includes(t))),o=r.map((e=>e.id));F(r.length),f(o)};return(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsxs)(Qv,{bordered:!1,style:{overflowX:"auto",overflowY:"hidden",height:"100%",minHeight:"1000px"},onClick:e=>e.stopPropagation(),children:[(0,ng.jsx)(wT,{title:aS(m,20)||"Dettaglio",placement:"right",closable:!1,onClose:()=>{b(void 0),d(!1)},open:s,getContainer:!1,style:{userSelect:"none"},extra:"00000000-0000-0000-0000-000000000000"!==(null===v||void 0===v?void 0:v.connection)?(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(Hd,{title:c("edit"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(bE,{}),onClick:()=>{d(!1),C(!0)}})}),"none"===(null===(e=o.find((e=>e.id===(null===v||void 0===v?void 0:v.category))))||void 0===e?void 0:e.addChildrenMode)?(0,ng.jsx)(Hd,{title:c("clone"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)("i",{className:"anticon",children:(0,ng.jsx)("svg",{x:"0px",y:"0px",viewBox:"0 0 1792 1792",width:"1.8em",height:"1.5em",xmlns:"http://www.w3.org/2000/svg",children:(0,ng.jsx)("path",{d:"M1664 1632v-1088q0-13-9.5-22.5t-22.5-9.5h-1088q-13 0-22.5 9.5t-9.5 22.5v1088q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5-9.5t9.5-22.5zm128-1088v1088q0 66-47 113t-113 47h-1088q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1088q66 0 113 47t47 113zm-384-384v160h-128v-160q0-13-9.5-22.5t-22.5-9.5h-1088q-13 0-22.5 9.5t-9.5 22.5v1088q0 13 9.5 22.5t22.5 9.5h160v128h-160q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1088q66 0 113 47t47 113z"})})}),onClick:()=>{d(!1),E(!0)}})}):null]}):null,children:v?(0,ng.jsxs)("div",{className:"node-details-container",children:[(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:c("category")}),(0,ng.jsx)("span",{children:c(v.category)})]}),(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:c("model")}),(0,ng.jsx)("span",{children:X[v.model].description})]}),"http"===v.protocol?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:"URL"}),(0,ng.jsx)("span",{children:v.url})]}),(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:"API Key"}),(0,ng.jsx)("span",{children:v.apiKey})]})]}):(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:c("fisicalAddress")}),(0,ng.jsx)("span",{children:v.address})]}),"yes"===v.isExposed&&(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:c("virtualAddress")}),(0,ng.jsx)("span",{children:v.virtualAddress})]}),(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:c("description")}),(0,ng.jsx)("span",{children:aS(v.description,20)})]}),(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:c("protocol")}),(0,ng.jsx)("span",{children:v.protocol})]}),"{}"!==JSON.stringify(v.options)&&(0,ng.jsxs)("div",{className:"node-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:c("specificParams")}),(0,ng.jsx)(rq,{options:v.options})]})]}):null}),(0,ng.jsxs)("div",{style:{display:"flex",gap:"130px",alignItems:"center",position:"absolute"},children:[(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:15},children:[(0,ng.jsx)(hj,{placeholder:c("search")||"Cerca per descrizione o modello...",allowClear:!0,onSearch:Q,onChange:e=>Q(e.target.value),style:{width:400},enterButton:!0}),null!==B&&(0,ng.jsxs)("span",{style:{fontWeight:"bold",color:"#35678a"},children:["Trovati: ",B]})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:15},children:[(0,ng.jsxs)("label",{children:[c("downloadCsvWg"),":"]}),(0,ng.jsx)(ac,{type:"primary",icon:(0,ng.jsx)(lF,{}),onClick:async()=>{try{await pE("/vdev/datapoint/downloadcsv","",GC())}catch(e){console.error(e.message)}}})]})]}),(0,ng.jsx)("div",{className:"tree-container",onClick:()=>{f([]),d(!1)},children:(0,ng.jsx)("ul",{children:D.map((e=>(0,ng.jsx)(cq,{device:e,modelMap:X,selectedIds:u,strategy:J},e.id)))})})]}),y&&(0,ng.jsx)(JG,{setIsModalOpen:x,isModalOpen:y,parentId:p,protocol:k,parentCategory:O}),w&&(0,ng.jsx)(eq,{setIsModalEditOpen:C,isModalEditOpen:w,modelId:p,device:v}),S&&(0,ng.jsx)(QG,{setIsModalCloneOpen:E,isModalCloneOpen:S,doGetVirtualDevice:W,vdevice:v})]})};var uq=function(e,t,n){var r=Object.keys(e[0]),o=null!==t&&void 0!==t?t:r,a=e.map((function(e){return function(e,t,n){return t.map((function(t){return"number"===typeof e[t]?e[t]:'"'.concat(String(e[t]).replace(/"/g,'""'),'"')})).join(n)}(e,r,n)}));return a.unshift(o.join(n)),a.join("\r\n")},fq=function(e,t){var n=new Blob(["\ufeff",e],{type:"text/csv;charset=utf-8;"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=t,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)},pq=function(e){return/csv$/i.test(e)?e:"".concat(e,".csv")};const hq=function(e){var t=e.data,n=e.filename,r=void 0===n?"export.csv":n,o=e.delimiter,a=void 0===o?";":o,i=e.headers,l=pq(r);if(0!==t.length){var c=uq(t,i,a);fq(c,l)}else fq(i?i.join(a):"",l)};var mq=n(450),gq={version:"0.18.5"},vq=1200,bq=1252,yq=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],xq={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},wq=function(e){-1!=yq.indexOf(e)&&(bq=xq[0]=e)};var Cq=function(e){vq=e,wq(e)};function Sq(){Cq(1200),wq(1252)}function Eq(e){for(var t=[],n=0;n<e.length>>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n+1)+(e.charCodeAt(2*n)<<8));return t.join("")}var kq,jq=function(e){return String.fromCharCode(e)},Iq=function(e){return String.fromCharCode(e)};var Tq=null,Aq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Oq(e){for(var t="",n=0,r=0,o=0,a=0,i=0,l=0,c=0,s=0;s<e.length;)a=(n=e.charCodeAt(s++))>>2,i=(3&n)<<4|(r=e.charCodeAt(s++))>>4,l=(15&r)<<2|(o=e.charCodeAt(s++))>>6,c=63&o,isNaN(r)?l=c=64:isNaN(o)&&(c=64),t+=Aq.charAt(a)+Aq.charAt(i)+Aq.charAt(l)+Aq.charAt(c);return t}function Nq(e){var t="",n=0,r=0,o=0,a=0,i=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;)n=Aq.indexOf(e.charAt(c++))<<2|(a=Aq.indexOf(e.charAt(c++)))>>4,t+=String.fromCharCode(n),r=(15&a)<<4|(i=Aq.indexOf(e.charAt(c++)))>>2,64!==i&&(t+=String.fromCharCode(r)),o=(3&i)<<6|(l=Aq.indexOf(e.charAt(c++))),64!==l&&(t+=String.fromCharCode(o));return t}var Rq=function(){return"undefined"!==typeof Buffer&&"undefined"!==typeof process&&"undefined"!==typeof process.versions&&!!process.versions.node}(),Pq=function(){if("undefined"!==typeof Buffer){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch(r5){e=!0}return e?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();function Mq(e){return Rq?Buffer.alloc?Buffer.alloc(e):new Buffer(e):"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}function Dq(e){return Rq?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}var Lq=function(e){return Rq?Pq(e,"binary"):e.split("").map((function(e){return 255&e.charCodeAt(0)}))};function _q(e){if("undefined"===typeof ArrayBuffer)return Lq(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}function zq(e){if(Array.isArray(e))return e.map((function(e){return String.fromCharCode(e)})).join("");for(var t=[],n=0;n<e.length;++n)t[n]=String.fromCharCode(e[n]);return t.join("")}var Bq=Rq?function(e){return Buffer.concat(e.map((function(e){return Buffer.isBuffer(e)?e:Pq(e)})))}:function(e){if("undefined"!==typeof Uint8Array){var t=0,n=0;for(t=0;t<e.length;++t)n+=e[t].length;var r=new Uint8Array(n),o=0;for(t=0,n=0;t<e.length;n+=o,++t)if(o=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],n);else{if("string"==typeof e[t])throw"wtf";r.set(new Uint8Array(e[t]),n)}return r}return[].concat.apply([],e.map((function(e){return Array.isArray(e)?e:[].slice.call(e)})))};var Fq=/\u0000/g,Hq=/[\u0001-\u0006]/g;function Wq(e){for(var t="",n=e.length-1;n>=0;)t+=e.charAt(n--);return t}function Vq(e,t){var n=""+e;return n.length>=t?n:tY("0",t-n.length)+n}function Uq(e,t){var n=""+e;return n.length>=t?n:tY(" ",t-n.length)+n}function Kq(e,t){var n=""+e;return n.length>=t?n:n+tY(" ",t-n.length)}var Gq=Math.pow(2,32);function qq(e,t){return e>Gq||e<-Gq?function(e,t){var n=""+Math.round(e);return n.length>=t?n:tY("0",t-n.length)+n}(e,t):function(e,t){var n=""+e;return n.length>=t?n:tY("0",t-n.length)+n}(Math.round(e),t)}function Xq(e,t){return t=t||0,e.length>=7+t&&103===(32|e.charCodeAt(t))&&101===(32|e.charCodeAt(t+1))&&110===(32|e.charCodeAt(t+2))&&101===(32|e.charCodeAt(t+3))&&114===(32|e.charCodeAt(t+4))&&97===(32|e.charCodeAt(t+5))&&108===(32|e.charCodeAt(t+6))}var Yq=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],$q=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];var Jq={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "'},Qq={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},Zq={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function eX(e,t,n){for(var r=e<0?-1:1,o=e*r,a=0,i=1,l=0,c=1,s=0,d=0,u=Math.floor(o);s<t&&(l=(u=Math.floor(o))*i+a,d=u*s+c,!(o-u<5e-8));)o=1/(o-u),a=i,i=l,c=s,s=d;if(d>t&&(s>t?(d=c,l=a):(d=s,l=i)),!n)return[0,r*l,d];var f=Math.floor(r*l/d);return[f,r*l-f*d,d]}function tX(e,t,n){if(e>2958465||e<0)return null;var r=0|e,o=Math.floor(86400*(e-r)),a=0,i=[],l={D:r,T:o,u:86400*(e-r)-o,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),t&&t.date1904&&(r+=1462),l.u>.9999&&(l.u=0,86400==++o&&(l.T=o=0,++r,++l.D)),60===r)i=n?[1317,10,29]:[1900,2,29],a=3;else if(0===r)i=n?[1317,8,29]:[1900,1,0],a=6;else{r>60&&--r;var c=new Date(1900,0,1);c.setDate(c.getDate()+r-1),i=[c.getFullYear(),c.getMonth()+1,c.getDate()],a=c.getDay(),r<60&&(a=(a+6)%7),n&&(a=function(e,t){t[0]-=581;var n=e.getDay();e<60&&(n=(n+6)%7);return n}(c,i))}return l.y=i[0],l.m=i[1],l.d=i[2],l.S=o%60,o=Math.floor(o/60),l.M=o%60,o=Math.floor(o/60),l.H=o,l.q=a,l}var nX=new Date(1899,11,31,0,0,0),rX=nX.getTime(),oX=new Date(1900,2,1,0,0,0);function aX(e,t){var n=e.getTime();return t?n-=1262304e5:e>=oX&&(n+=864e5),(n-(rX+6e4*(e.getTimezoneOffset()-nX.getTimezoneOffset())))/864e5}function iX(e){return-1==e.indexOf(".")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function lX(e){var t,n=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return t=n>=-4&&n<=-1?e.toPrecision(10+n):Math.abs(n)<=9?function(e){var t=e<0?12:11,n=iX(e.toFixed(12));return n.length<=t||(n=e.toPrecision(10)).length<=t?n:e.toExponential(5)}(e):10===n?e.toFixed(10).substr(0,12):function(e){var t=iX(e.toFixed(11));return t.length>(e<0?12:11)||"0"===t||"-0"===t?e.toPrecision(6):t}(e),iX(function(e){return-1==e.indexOf("E")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(t.toUpperCase()))}function cX(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):lX(e);case"undefined":return"";case"object":if(null==e)return"";if(e instanceof Date)return AX(14,aX(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function sX(e,t,n,r){var o,a="",i=0,l=0,c=n.y,s=0;switch(e){case 98:c=n.y+543;case 121:switch(t.length){case 1:case 2:o=c%100,s=2;break;default:o=c%1e4,s=4}break;case 109:switch(t.length){case 1:case 2:o=n.m,s=t.length;break;case 3:return $q[n.m-1][1];case 5:return $q[n.m-1][0];default:return $q[n.m-1][2]}break;case 100:switch(t.length){case 1:case 2:o=n.d,s=t.length;break;case 3:return Yq[n.q][0];default:return Yq[n.q][1]}break;case 104:switch(t.length){case 1:case 2:o=1+(n.H+11)%12,s=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:o=n.H,s=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:o=n.M,s=t.length;break;default:throw"bad minute format: "+t}break;case 115:if("s"!=t&&"ss"!=t&&".0"!=t&&".00"!=t&&".000"!=t)throw"bad second format: "+t;return 0!==n.u||"s"!=t&&"ss"!=t?(l=r>=2?3===r?1e3:100:1===r?10:1,(i=Math.round(l*(n.S+n.u)))>=60*l&&(i=0),"s"===t?0===i?"0":""+i/l:(a=Vq(i,2+r),"ss"===t?a.substr(0,2):"."+a.substr(2,t.length-1))):Vq(n.S,t.length);case 90:switch(t){case"[h]":case"[hh]":o=24*n.D+n.H;break;case"[m]":case"[mm]":o=60*(24*n.D+n.H)+n.M;break;case"[s]":case"[ss]":o=60*(60*(24*n.D+n.H)+n.M)+Math.round(n.S+n.u);break;default:throw"bad abstime format: "+t}s=3===t.length?1:2;break;case 101:o=c,s=1}return s>0?Vq(o,s):""}function dX(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(n.length>0?",":"")+e.substr(t,3);return n}var uX=/%/g;function fX(e,t){var n,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+fX(e,-t);var o=e.indexOf(".");-1===o&&(o=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%o;if(a<0&&(a+=o),-1===(n=(t/Math.pow(10,a)).toPrecision(r+1+(o+a)%o)).indexOf("e")){var i=Math.floor(Math.log(t)*Math.LOG10E);for(-1===n.indexOf(".")?n=n.charAt(0)+"."+n.substr(1)+"E+"+(i-n.length+a):n+="E+"+(i-a);"0."===n.substr(0,2);)n=(n=n.charAt(0)+n.substr(2,o)+"."+n.substr(2+o)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,(function(e,t,n,r){return t+n+r.substr(0,(o+a)%o)+"."+r.substr(a)+"E"}))}else n=t.toExponential(r);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}var pX=/# (\?+)( ?)\/( ?)(\d+)/;var hX=/^#*0*\.([0#]+)/,mX=/\).*[0#]/,gX=/\(###\) ###\\?-####/;function vX(e){for(var t,n="",r=0;r!=e.length;++r)switch(t=e.charCodeAt(r)){case 35:break;case 63:n+=" ";break;case 48:n+="0";break;default:n+=String.fromCharCode(t)}return n}function bX(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n}function yX(e,t){var n=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(n*r)).length?0:Math.round(n*r)}function xX(e,t,n){if(40===e.charCodeAt(0)&&!t.match(mX)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?xX("n",r,n):"("+xX("n",r,-n)+")"}if(44===t.charCodeAt(t.length-1))return function(e,t,n){for(var r=t.length-1;44===t.charCodeAt(r-1);)--r;return SX(e,t.substr(0,r),n/Math.pow(10,3*(t.length-r)))}(e,t,n);if(-1!==t.indexOf("%"))return function(e,t,n){var r=t.replace(uX,""),o=t.length-r.length;return SX(e,r,n*Math.pow(10,2*o))+tY("%",o)}(e,t,n);if(-1!==t.indexOf("E"))return fX(t,n);if(36===t.charCodeAt(0))return"$"+xX(e,t.substr(" "==t.charAt(1)?2:1),n);var o,a,i,l,c=Math.abs(n),s=n<0?"-":"";if(t.match(/^00+$/))return s+qq(c,t.length);if(t.match(/^[#?]+$/))return"0"===(o=qq(n,0))&&(o=""),o.length>t.length?o:vX(t.substr(0,t.length-o.length))+o;if(a=t.match(pX))return function(e,t,n){var r=parseInt(e[4],10),o=Math.round(t*r),a=Math.floor(o/r),i=o-a*r,l=r;return n+(0===a?"":""+a)+" "+(0===i?tY(" ",e[1].length+1+e[4].length):Uq(i,e[1].length)+e[2]+"/"+e[3]+Vq(l,e[4].length))}(a,c,s);if(t.match(/^#+0+$/))return s+qq(c,t.length-t.indexOf("0"));if(a=t.match(hX))return o=bX(n,a[1].length).replace(/^([^\.]+)$/,"$1."+vX(a[1])).replace(/\.$/,"."+vX(a[1])).replace(/\.(\d*)$/,(function(e,t){return"."+t+tY("0",vX(a[1]).length-t.length)})),-1!==t.indexOf("0.")?o:o.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return s+bX(c,a[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return s+dX(qq(c,0));if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+xX(e,t,-n):dX(""+(Math.floor(n)+function(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}(n,a[1].length)))+"."+Vq(yX(n,a[1].length),a[1].length);if(a=t.match(/^#,#*,#0/))return xX(e,t.replace(/^#,#*,/,""),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return o=Wq(xX(e,t.replace(/[\\-]/g,""),n)),i=0,Wq(Wq(t.replace(/\\/g,"")).replace(/[0#]/g,(function(e){return i<o.length?o.charAt(i++):"0"===e?"0":""})));if(t.match(gX))return"("+(o=xX(e,"##########",n)).substr(0,3)+") "+o.substr(3,3)+"-"+o.substr(6);var d="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(a[4].length,7),l=eX(c,Math.pow(10,i)-1,!1),o=""+s," "==(d=SX("n",a[1],l[1])).charAt(d.length-1)&&(d=d.substr(0,d.length-1)+"0"),o+=d+a[2]+"/"+a[3],(d=Kq(l[2],i)).length<a[4].length&&(d=vX(a[4].substr(a[4].length-d.length))+d),o+=d;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(a[1].length,a[4].length),7),s+((l=eX(c,Math.pow(10,i)-1,!0))[0]||(l[1]?"":"0"))+" "+(l[1]?Uq(l[1],i)+a[2]+"/"+a[3]+Kq(l[2],i):tY(" ",2*i+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return o=qq(n,0),t.length<=o.length?o:vX(t.substr(0,t.length-o.length))+o;if(a=t.match(/^([#0?]+)\.([#0]+)$/)){o=""+n.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),i=o.indexOf(".");var u=t.indexOf(".")-i,f=t.length-o.length-u;return vX(t.substr(0,u)+o+t.substr(t.length-f))}if(a=t.match(/^00,000\.([#0]*0)$/))return i=yX(n,a[1].length),n<0?"-"+xX(e,t,-n):dX(function(e){return e<2147483647&&e>-2147483648?""+(e>=0?0|e:e-1|0):""+Math.floor(e)}(n)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,(function(e){return"00,"+(e.length<3?Vq(0,3-e.length):"")+e}))+"."+Vq(i,a[1].length);switch(t){case"###,##0.00":return xX(e,"#,##0.00",n);case"###,###":case"##,###":case"#,###":var p=dX(qq(c,0));return"0"!==p?s+p:"";case"###,###.00":return xX(e,"###,##0.00",n).replace(/^0\./,".");case"#,###.00":return xX(e,"#,##0.00",n).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function wX(e,t){var n,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+wX(e,-t);var o=e.indexOf(".");-1===o&&(o=e.indexOf("E"));var a=Math.floor(Math.log(t)*Math.LOG10E)%o;if(a<0&&(a+=o),!(n=(t/Math.pow(10,a)).toPrecision(r+1+(o+a)%o)).match(/[Ee]/)){var i=Math.floor(Math.log(t)*Math.LOG10E);-1===n.indexOf(".")?n=n.charAt(0)+"."+n.substr(1)+"E+"+(i-n.length+a):n+="E+"+(i-a),n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,(function(e,t,n,r){return t+n+r.substr(0,(o+a)%o)+"."+r.substr(a)+"E"}))}else n=t.toExponential(r);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}function CX(e,t,n){if(40===e.charCodeAt(0)&&!t.match(mX)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?CX("n",r,n):"("+CX("n",r,-n)+")"}if(44===t.charCodeAt(t.length-1))return function(e,t,n){for(var r=t.length-1;44===t.charCodeAt(r-1);)--r;return SX(e,t.substr(0,r),n/Math.pow(10,3*(t.length-r)))}(e,t,n);if(-1!==t.indexOf("%"))return function(e,t,n){var r=t.replace(uX,""),o=t.length-r.length;return SX(e,r,n*Math.pow(10,2*o))+tY("%",o)}(e,t,n);if(-1!==t.indexOf("E"))return wX(t,n);if(36===t.charCodeAt(0))return"$"+CX(e,t.substr(" "==t.charAt(1)?2:1),n);var o,a,i,l,c=Math.abs(n),s=n<0?"-":"";if(t.match(/^00+$/))return s+Vq(c,t.length);if(t.match(/^[#?]+$/))return o=""+n,0===n&&(o=""),o.length>t.length?o:vX(t.substr(0,t.length-o.length))+o;if(a=t.match(pX))return function(e,t,n){return n+(0===t?"":""+t)+tY(" ",e[1].length+2+e[4].length)}(a,c,s);if(t.match(/^#+0+$/))return s+Vq(c,t.length-t.indexOf("0"));if(a=t.match(hX))return o=(o=(""+n).replace(/^([^\.]+)$/,"$1."+vX(a[1])).replace(/\.$/,"."+vX(a[1]))).replace(/\.(\d*)$/,(function(e,t){return"."+t+tY("0",vX(a[1]).length-t.length)})),-1!==t.indexOf("0.")?o:o.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),a=t.match(/^(0*)\.(#*)$/))return s+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,a[1].length?"0.":".");if(a=t.match(/^#{1,3},##0(\.?)$/))return s+dX(""+c);if(a=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+CX(e,t,-n):dX(""+n)+"."+tY("0",a[1].length);if(a=t.match(/^#,#*,#0/))return CX(e,t.replace(/^#,#*,/,""),n);if(a=t.match(/^([0#]+)(\\?-([0#]+))+$/))return o=Wq(CX(e,t.replace(/[\\-]/g,""),n)),i=0,Wq(Wq(t.replace(/\\/g,"")).replace(/[0#]/g,(function(e){return i<o.length?o.charAt(i++):"0"===e?"0":""})));if(t.match(gX))return"("+(o=CX(e,"##########",n)).substr(0,3)+") "+o.substr(3,3)+"-"+o.substr(6);var d="";if(a=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(a[4].length,7),l=eX(c,Math.pow(10,i)-1,!1),o=""+s," "==(d=SX("n",a[1],l[1])).charAt(d.length-1)&&(d=d.substr(0,d.length-1)+"0"),o+=d+a[2]+"/"+a[3],(d=Kq(l[2],i)).length<a[4].length&&(d=vX(a[4].substr(a[4].length-d.length))+d),o+=d;if(a=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(a[1].length,a[4].length),7),s+((l=eX(c,Math.pow(10,i)-1,!0))[0]||(l[1]?"":"0"))+" "+(l[1]?Uq(l[1],i)+a[2]+"/"+a[3]+Kq(l[2],i):tY(" ",2*i+1+a[2].length+a[3].length));if(a=t.match(/^[#0?]+$/))return o=""+n,t.length<=o.length?o:vX(t.substr(0,t.length-o.length))+o;if(a=t.match(/^([#0]+)\.([#0]+)$/)){o=""+n.toFixed(Math.min(a[2].length,10)).replace(/([^0])0+$/,"$1"),i=o.indexOf(".");var u=t.indexOf(".")-i,f=t.length-o.length-u;return vX(t.substr(0,u)+o+t.substr(t.length-f))}if(a=t.match(/^00,000\.([#0]*0)$/))return n<0?"-"+CX(e,t,-n):dX(""+n).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,(function(e){return"00,"+(e.length<3?Vq(0,3-e.length):"")+e}))+"."+Vq(0,a[1].length);switch(t){case"###,###":case"##,###":case"#,###":var p=dX(""+c);return"0"!==p?s+p:"";default:if(t.match(/\.[0#?]*$/))return CX(e,t.slice(0,t.lastIndexOf(".")),n)+vX(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function SX(e,t,n){return(0|n)===n?CX(e,t,n):xX(e,t,n)}var EX=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function kX(e){for(var t=0,n="",r="";t<e.length;)switch(n=e.charAt(t)){case"G":Xq(e,t)&&(t+=6),t++;break;case'"':for(;34!==e.charCodeAt(++t)&&t<e.length;);++t;break;case"\\":case"_":t+=2;break;case"@":++t;break;case"B":case"b":if("1"===e.charAt(t+1)||"2"===e.charAt(t+1))return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"\u4e0a":if("A/P"===e.substr(t,3).toUpperCase())return!0;if("AM/PM"===e.substr(t,5).toUpperCase())return!0;if("\u4e0a\u5348/\u4e0b\u5348"===e.substr(t,5).toUpperCase())return!0;++t;break;case"[":for(r=n;"]"!==e.charAt(t++)&&t<e.length;)r+=e.charAt(t);if(r.match(EX))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(n=e.charAt(++t))>-1||"\\"==n&&"-"==e.charAt(t+1)&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===n;);break;case"*":++t," "!=e.charAt(t)&&"*"!=e.charAt(t)||++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;default:++t}return!1}var jX=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function IX(e,t){if(null==t)return!1;var n=parseFloat(t[2]);switch(t[1]){case"=":if(e==n)return!0;break;case">":if(e>n)return!0;break;case"<":if(e<n)return!0;break;case"<>":if(e!=n)return!0;break;case">=":if(e>=n)return!0;break;case"<=":if(e<=n)return!0}return!1}function TX(e,t){var n=function(e){for(var t=[],n=!1,r=0,o=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:n=!n;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(o,r-o),o=r+1}if(t[t.length]=e.substr(o),!0===n)throw new Error("Format |"+e+"| unterminated string ");return t}(e),r=n.length,o=n[r-1].indexOf("@");if(r<4&&o>-1&&--r,n.length>4)throw new Error("cannot find right format for |"+n.join("|")+"|");if("number"!==typeof t)return[4,4===n.length||o>-1?n[n.length-1]:"@"];switch(n.length){case 1:n=o>-1?["General","General","General",n[0]]:[n[0],n[0],n[0],"@"];break;case 2:n=o>-1?[n[0],n[0],n[0],n[1]]:[n[0],n[1],n[0],"@"];break;case 3:n=o>-1?[n[0],n[1],n[0],n[2]]:[n[0],n[1],n[2],"@"]}var a=t>0?n[0]:t<0?n[1]:n[2];if(-1===n[0].indexOf("[")&&-1===n[1].indexOf("["))return[r,a];if(null!=n[0].match(/\[[=<>]/)||null!=n[1].match(/\[[=<>]/)){var i=n[0].match(jX),l=n[1].match(jX);return IX(t,i)?[r,n[0]]:IX(t,l)?[r,n[1]]:[r,n[null!=i&&null!=l?2:1]]}return[r,a]}function AX(e,t,n){null==n&&(n={});var r="";switch(typeof e){case"string":r="m/d/yy"==e&&n.dateNF?n.dateNF:e;break;case"number":null==(r=14==e&&n.dateNF?n.dateNF:(null!=n.table?n.table:Jq)[e])&&(r=n.table&&n.table[Qq[e]]||Jq[Qq[e]]),null==r&&(r=Zq[e]||"General")}if(Xq(r,0))return cX(t,n);t instanceof Date&&(t=aX(t,n.date1904));var o=TX(r,t);if(Xq(o[1]))return cX(t,n);if(!0===t)t="TRUE";else if(!1===t)t="FALSE";else if(""===t||null==t)return"";return function(e,t,n,r){for(var o,a,i,l=[],c="",s=0,d="",u="t",f="H";s<e.length;)switch(d=e.charAt(s)){case"G":if(!Xq(e,s))throw new Error("unrecognized character "+d+" in "+e);l[l.length]={t:"G",v:"General"},s+=7;break;case'"':for(c="";34!==(i=e.charCodeAt(++s))&&s<e.length;)c+=String.fromCharCode(i);l[l.length]={t:"t",v:c},++s;break;case"\\":var p=e.charAt(++s),h="("===p||")"===p?p:"t";l[l.length]={t:h,v:p},++s;break;case"_":l[l.length]={t:"t",v:" "},s+=2;break;case"@":l[l.length]={t:"T",v:t},++s;break;case"B":case"b":if("1"===e.charAt(s+1)||"2"===e.charAt(s+1)){if(null==o&&null==(o=tX(t,n,"2"===e.charAt(s+1))))return"";l[l.length]={t:"X",v:e.substr(s,2)},u=d,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":d=d.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0)return"";if(null==o&&null==(o=tX(t,n)))return"";for(c=d;++s<e.length&&e.charAt(s).toLowerCase()===d;)c+=d;"m"===d&&"h"===u.toLowerCase()&&(d="M"),"h"===d&&(d=f),l[l.length]={t:d,v:c},u=d;break;case"A":case"a":case"\u4e0a":var m={t:d,v:d};if(null==o&&(o=tX(t,n)),"A/P"===e.substr(s,3).toUpperCase()?(null!=o&&(m.v=o.H>=12?"P":"A"),m.t="T",f="h",s+=3):"AM/PM"===e.substr(s,5).toUpperCase()?(null!=o&&(m.v=o.H>=12?"PM":"AM"),m.t="T",s+=5,f="h"):"\u4e0a\u5348/\u4e0b\u5348"===e.substr(s,5).toUpperCase()?(null!=o&&(m.v=o.H>=12?"\u4e0b\u5348":"\u4e0a\u5348"),m.t="T",s+=5,f="h"):(m.t="t",++s),null==o&&"T"===m.t)return"";l[l.length]=m,u=d;break;case"[":for(c=d;"]"!==e.charAt(s++)&&s<e.length;)c+=e.charAt(s);if("]"!==c.slice(-1))throw'unterminated "[" block: |'+c+"|";if(c.match(EX)){if(null==o&&null==(o=tX(t,n)))return"";l[l.length]={t:"Z",v:c.toLowerCase()},u=c.charAt(1)}else c.indexOf("$")>-1&&(c=(c.match(/\$([^-\[\]]*)/)||[])[1]||"$",kX(e)||(l[l.length]={t:"t",v:c}));break;case".":if(null!=o){for(c=d;++s<e.length&&"0"===(d=e.charAt(s));)c+=d;l[l.length]={t:"s",v:c};break}case"0":case"#":for(c=d;++s<e.length&&"0#?.,E+-%".indexOf(d=e.charAt(s))>-1;)c+=d;l[l.length]={t:"n",v:c};break;case"?":for(c=d;e.charAt(++s)===d;)c+=d;l[l.length]={t:d,v:c},u=d;break;case"*":++s," "!=e.charAt(s)&&"*"!=e.charAt(s)||++s;break;case"(":case")":l[l.length]={t:1===r?"t":d,v:d},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(c=d;s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1;)c+=e.charAt(s);l[l.length]={t:"D",v:c};break;case" ":l[l.length]={t:d,v:d},++s;break;case"$":l[l.length]={t:"t",v:"$"},++s;break;default:if(-1===",$-+/():!^&'~{}<>=\u20acacfijklopqrtuvwxzP".indexOf(d))throw new Error("unrecognized character "+d+" in "+e);l[l.length]={t:"t",v:d},++s}var g,v=0,b=0;for(s=l.length-1,u="t";s>=0;--s)switch(l[s].t){case"h":case"H":l[s].t=f,u="h",v<1&&(v=1);break;case"s":(g=l[s].v.match(/\.0+$/))&&(b=Math.max(b,g[0].length-1)),v<3&&(v=3);case"d":case"y":case"M":case"e":u=l[s].t;break;case"m":"s"===u&&(l[s].t="M",v<2&&(v=2));break;case"X":break;case"Z":v<1&&l[s].v.match(/[Hh]/)&&(v=1),v<2&&l[s].v.match(/[Mm]/)&&(v=2),v<3&&l[s].v.match(/[Ss]/)&&(v=3)}switch(v){case 0:break;case 1:o.u>=.5&&(o.u=0,++o.S),o.S>=60&&(o.S=0,++o.M),o.M>=60&&(o.M=0,++o.H);break;case 2:o.u>=.5&&(o.u=0,++o.S),o.S>=60&&(o.S=0,++o.M)}var y,x="";for(s=0;s<l.length;++s)switch(l[s].t){case"t":case"T":case" ":case"D":break;case"X":l[s].v="",l[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":l[s].v=sX(l[s].t.charCodeAt(0),l[s].v,o,b),l[s].t="t";break;case"n":case"?":for(y=s+1;null!=l[y]&&("?"===(d=l[y].t)||"D"===d||(" "===d||"t"===d)&&null!=l[y+1]&&("?"===l[y+1].t||"t"===l[y+1].t&&"/"===l[y+1].v)||"("===l[s].t&&(" "===d||"n"===d||")"===d)||"t"===d&&("/"===l[y].v||" "===l[y].v&&null!=l[y+1]&&"?"==l[y+1].t));)l[s].v+=l[y].v,l[y]={v:"",t:";"},++y;x+=l[s].v,s=y-1;break;case"G":l[s].t="t",l[s].v=cX(t,n)}var w,C,S="";if(x.length>0){40==x.charCodeAt(0)?(w=t<0&&45===x.charCodeAt(0)?-t:t,C=SX("n",x,w)):(C=SX("n",x,w=t<0&&r>1?-t:t),w<0&&l[0]&&"t"==l[0].t&&(C=C.substr(1),l[0].v="-"+l[0].v)),y=C.length-1;var E=l.length;for(s=0;s<l.length;++s)if(null!=l[s]&&"t"!=l[s].t&&l[s].v.indexOf(".")>-1){E=s;break}var k=l.length;if(E===l.length&&-1===C.indexOf("E")){for(s=l.length-1;s>=0;--s)null!=l[s]&&-1!=="n?".indexOf(l[s].t)&&(y>=l[s].v.length-1?(y-=l[s].v.length,l[s].v=C.substr(y+1,l[s].v.length)):y<0?l[s].v="":(l[s].v=C.substr(0,y+1),y=-1),l[s].t="t",k=s);y>=0&&k<l.length&&(l[k].v=C.substr(0,y+1)+l[k].v)}else if(E!==l.length&&-1===C.indexOf("E")){for(y=C.indexOf(".")-1,s=E;s>=0;--s)if(null!=l[s]&&-1!=="n?".indexOf(l[s].t)){for(a=l[s].v.indexOf(".")>-1&&s===E?l[s].v.indexOf(".")-1:l[s].v.length-1,S=l[s].v.substr(a+1);a>=0;--a)y>=0&&("0"===l[s].v.charAt(a)||"#"===l[s].v.charAt(a))&&(S=C.charAt(y--)+S);l[s].v=S,l[s].t="t",k=s}for(y>=0&&k<l.length&&(l[k].v=C.substr(0,y+1)+l[k].v),y=C.indexOf(".")+1,s=E;s<l.length;++s)if(null!=l[s]&&(-1!=="n?(".indexOf(l[s].t)||s===E)){for(a=l[s].v.indexOf(".")>-1&&s===E?l[s].v.indexOf(".")+1:0,S=l[s].v.substr(0,a);a<l[s].v.length;++a)y<C.length&&(S+=C.charAt(y++));l[s].v=S,l[s].t="t",k=s}}}for(s=0;s<l.length;++s)null!=l[s]&&"n?".indexOf(l[s].t)>-1&&(w=r>1&&t<0&&s>0&&"-"===l[s-1].v?-t:t,l[s].v=SX(l[s].t,l[s].v,w),l[s].t="t");var j="";for(s=0;s!==l.length;++s)null!=l[s]&&(j+=l[s].v);return j}(o[1],t,n,o[0])}function OX(e,t){if("number"!=typeof t){t=+t||-1;for(var n=0;n<392;++n)if(void 0!=Jq[n]){if(Jq[n]==e){t=n;break}}else t<0&&(t=n);t<0&&(t=391)}return Jq[t]=e,t}function NX(e){for(var t=0;392!=t;++t)void 0!==e[t]&&OX(e[t],t)}function RX(){Jq=function(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "',e}()}var PX=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;var MX=function(){var e={};e.version="1.2.0";var t=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!==typeof Int32Array?new Int32Array(t):t}();var n=function(e){var t=0,n=0,r=0,o="undefined"!==typeof Int32Array?new Int32Array(4096):new Array(4096);for(r=0;256!=r;++r)o[r]=e[r];for(r=0;256!=r;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=o[t]=n>>>8^e[255&n];var a=[];for(r=1;16!=r;++r)a[r-1]="undefined"!==typeof Int32Array?o.subarray(256*r,256*r+256):o.slice(256*r,256*r+256);return a}(t),r=n[0],o=n[1],a=n[2],i=n[3],l=n[4],c=n[5],s=n[6],d=n[7],u=n[8],f=n[9],p=n[10],h=n[11],m=n[12],g=n[13],v=n[14];return e.table=t,e.bstr=function(e,n){for(var r=-1^n,o=0,a=e.length;o<a;)r=r>>>8^t[255&(r^e.charCodeAt(o++))];return~r},e.buf=function(e,n){for(var b=-1^n,y=e.length-15,x=0;x<y;)b=v[e[x++]^255&b]^g[e[x++]^b>>8&255]^m[e[x++]^b>>16&255]^h[e[x++]^b>>>24]^p[e[x++]]^f[e[x++]]^u[e[x++]]^d[e[x++]]^s[e[x++]]^c[e[x++]]^l[e[x++]]^i[e[x++]]^a[e[x++]]^o[e[x++]]^r[e[x++]]^t[e[x++]];for(y+=15;x<y;)b=b>>>8^t[255&(b^e[x++])];return~b},e.str=function(e,n){for(var r=-1^n,o=0,a=e.length,i=0,l=0;o<a;)(i=e.charCodeAt(o++))<128?r=r>>>8^t[255&(r^i)]:i<2048?r=(r=r>>>8^t[255&(r^(192|i>>6&31))])>>>8^t[255&(r^(128|63&i))]:i>=55296&&i<57344?(i=64+(1023&i),l=1023&e.charCodeAt(o++),r=(r=(r=(r=r>>>8^t[255&(r^(240|i>>8&7))])>>>8^t[255&(r^(128|i>>2&63))])>>>8^t[255&(r^(128|l>>6&15|(3&i)<<4))])>>>8^t[255&(r^(128|63&l))]):r=(r=(r=r>>>8^t[255&(r^(224|i>>12&15))])>>>8^t[255&(r^(128|i>>6&63))])>>>8^t[255&(r^(128|63&i))];return~r},e}(),DX=function(){var e,t={};function n(e){if("/"==e.charAt(e.length-1))return-1===e.slice(0,-1).indexOf("/")?e:n(e.slice(0,-1));var t=e.lastIndexOf("/");return-1===t?e:e.slice(0,t+1)}function r(e){if("/"==e.charAt(e.length-1))return r(e.slice(0,-1));var t=e.lastIndexOf("/");return-1===t?e:e.slice(t+1)}function o(e,t){"string"===typeof t&&(t=new Date(t));var n=t.getHours();n=(n=n<<6|t.getMinutes())<<5|t.getSeconds()>>>1,e.write_shift(2,n);var r=t.getFullYear()-1980;r=(r=r<<4|t.getMonth()+1)<<5|t.getDate(),e.write_shift(2,r)}function a(e){f$(e,0);for(var t={},n=0;e.l<=e.length-4;){var r=e.read_shift(2),o=e.read_shift(2),a=e.l+o,i={};if(21589===r)1&(n=e.read_shift(1))&&(i.mtime=e.read_shift(4)),o>5&&(2&n&&(i.atime=e.read_shift(4)),4&n&&(i.ctime=e.read_shift(4))),i.mtime&&(i.mt=new Date(1e3*i.mtime));e.l=a,t[r]=i}return t}function i(){return e||(e={})}function l(e,t){if(80==e[0]&&75==e[1])return re(e,t);if(109==(32|e[0])&&105==(32|e[1]))return function(e,t){if("mime-version:"!=C(e.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var n=t&&t.root||"",r=(Rq&&Buffer.isBuffer(e)?e.toString("binary"):C(e)).split("\r\n"),o=0,a="";for(o=0;o<r.length;++o)if(a=r[o],/^Content-Location:/i.test(a)&&(a=a.slice(a.indexOf("file")),n||(n=a.slice(0,a.lastIndexOf("/")+1)),a.slice(0,n.length)!=n))for(;n.length>0&&(n=(n=n.slice(0,n.length-1)).slice(0,n.lastIndexOf("/")+1),a.slice(0,n.length)!=n););var i=(r[1]||"").match(/boundary="(.*?)"/);if(!i)throw new Error("MAD cannot find boundary");var l="--"+(i[1]||""),c=[],s=[],d={FileIndex:c,FullPaths:s};f(d);var u,p=0;for(o=0;o<r.length;++o){var h=r[o];h!==l&&h!==l+"--"||(p++&&se(d,r.slice(u,o),n),u=o)}return d}(e,t);if(e.length<512)throw new Error("CFB file size "+e.length+" < 512");var n,r,o,a,i,l,p=512,h=[],m=e.slice(0,512);f$(m,0);var g=function(e){if(80==e[e.l]&&75==e[e.l+1])return[0,0];e.chk(b,"Header Signature: "),e.l+=16;var t=e.read_shift(2,"u");return[e.read_shift(2,"u"),t]}(m);switch(n=g[0]){case 3:p=512;break;case 4:p=4096;break;case 0:if(0==g[1])return re(e,t);default:throw new Error("Major Version: Expected 3 or 4 saw "+n)}512!==p&&f$(m=e.slice(0,p),28);var y=e.slice(0,p);!function(e,t){var n=9;switch(e.l+=2,n=e.read_shift(2)){case 9:if(3!=t)throw new Error("Sector Shift: Expected 9 saw "+n);break;case 12:if(4!=t)throw new Error("Sector Shift: Expected 12 saw "+n);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+n)}e.chk("0600","Mini Sector Shift: "),e.chk("000000000000","Reserved: ")}(m,n);var x=m.read_shift(4,"i");if(3===n&&0!==x)throw new Error("# Directory Sectors: Expected 0 saw "+x);m.l+=4,a=m.read_shift(4,"i"),m.l+=4,m.chk("00100000","Mini Stream Cutoff Size: "),i=m.read_shift(4,"i"),r=m.read_shift(4,"i"),l=m.read_shift(4,"i"),o=m.read_shift(4,"i");for(var w=-1,S=0;S<109&&!((w=m.read_shift(4,"i"))<0);++S)h[S]=w;var E=function(e,t){for(var n=Math.ceil(e.length/t)-1,r=[],o=1;o<n;++o)r[o-1]=e.slice(o*t,(o+1)*t);return r[n-1]=e.slice(n*t),r}(e,p);s(l,o,E,p,h);var k=function(e,t,n,r){var o=e.length,a=[],i=[],l=[],c=[],s=r-1,d=0,u=0,f=0,p=0;for(d=0;d<o;++d)if(l=[],(f=d+t)>=o&&(f-=o),!i[f]){c=[];var h=[];for(u=f;u>=0;){h[u]=!0,i[u]=!0,l[l.length]=u,c.push(e[u]);var m=n[Math.floor(4*u/r)];if(r<4+(p=4*u&s))throw new Error("FAT boundary crossed: "+u+" 4 "+r);if(!e[m])break;if(h[u=o$(e[m],p)])break}a[f]={nodes:l,data:PY([c])}}return a}(E,a,h,p);k[a].name="!Directory",r>0&&i!==v&&(k[i].name="!MiniFAT"),k[h[0]].name="!FAT",k.fat_addrs=h,k.ssz=p;var j=[],I=[],T=[];!function(e,t,n,r,o,a,i,l){for(var s,f=0,p=r.length?2:0,h=t[e].data,m=0,g=0;m<h.length;m+=128){var b=h.slice(m,m+128);f$(b,64),g=b.read_shift(2),s=DY(b,0,g-p),r.push(s);var y={name:s,type:b.read_shift(1),color:b.read_shift(1),L:b.read_shift(4,"i"),R:b.read_shift(4,"i"),C:b.read_shift(4,"i"),clsid:b.read_shift(16),state:b.read_shift(4,"i"),start:0,size:0};0!==b.read_shift(2)+b.read_shift(2)+b.read_shift(2)+b.read_shift(2)&&(y.ct=u(b,b.l-8)),0!==b.read_shift(2)+b.read_shift(2)+b.read_shift(2)+b.read_shift(2)&&(y.mt=u(b,b.l-8)),y.start=b.read_shift(4,"i"),y.size=b.read_shift(4,"i"),y.size<0&&y.start<0&&(y.size=y.type=0,y.start=v,y.name=""),5===y.type?(f=y.start,o>0&&f!==v&&(t[f].name="!StreamData")):y.size>=4096?(y.storage="fat",void 0===t[y.start]&&(t[y.start]=d(n,y.start,t.fat_addrs,t.ssz)),t[y.start].name=y.name,y.content=t[y.start].data.slice(0,y.size)):(y.storage="minifat",y.size<0?y.size=0:f!==v&&y.start!==v&&t[f]&&(y.content=c(y,t[f].data,(t[l]||{}).data))),y.content&&f$(y.content,0),a[s]=y,i.push(y)}}(a,k,E,j,r,{},I,i),function(e,t,n){for(var r=0,o=0,a=0,i=0,l=0,c=n.length,s=[],d=[];r<c;++r)s[r]=d[r]=r,t[r]=n[r];for(;l<d.length;++l)o=e[r=d[l]].L,a=e[r].R,i=e[r].C,s[r]===r&&(-1!==o&&s[o]!==o&&(s[r]=s[o]),-1!==a&&s[a]!==a&&(s[r]=s[a])),-1!==i&&(s[i]=r),-1!==o&&r!=s[r]&&(s[o]=s[r],d.lastIndexOf(o)<l&&d.push(o)),-1!==a&&r!=s[r]&&(s[a]=s[r],d.lastIndexOf(a)<l&&d.push(a));for(r=1;r<c;++r)s[r]===r&&(-1!==a&&s[a]!==a?s[r]=s[a]:-1!==o&&s[o]!==o&&(s[r]=s[o]));for(r=1;r<c;++r)if(0!==e[r].type){if((l=r)!=s[l])do{l=s[l],t[r]=t[l]+"/"+t[r]}while(0!==l&&-1!==s[l]&&l!=s[l]);s[r]=-1}for(t[0]+="/",r=1;r<c;++r)2!==e[r].type&&(t[r]+="/")}(I,T,j),j.shift();var A={FileIndex:I,FullPaths:T};return t&&t.raw&&(A.raw={header:y,sectors:E}),A}function c(e,t,n){for(var r=e.start,o=e.size,a=[],i=r;n&&o>0&&i>=0;)a.push(t.slice(i*g,i*g+g)),o-=g,i=o$(n,4*i);return 0===a.length?h$(0):Bq(a).slice(0,e.size)}function s(e,t,n,r,o){var a=v;if(e===v){if(0!==t)throw new Error("DIFAT chain shorter than expected")}else if(-1!==e){var i=n[e],l=(r>>>2)-1;if(!i)return;for(var c=0;c<l&&(a=o$(i,4*c))!==v;++c)o.push(a);s(o$(i,r-4),t-1,n,r,o)}}function d(e,t,n,r,o){var a=[],i=[];o||(o=[]);var l=r-1,c=0,s=0;for(c=t;c>=0;){o[c]=!0,a[a.length]=c,i.push(e[c]);var d=n[Math.floor(4*c/r)];if(r<4+(s=4*c&l))throw new Error("FAT boundary crossed: "+c+" 4 "+r);if(!e[d])break;c=o$(e[d],s)}return{nodes:a,data:PY([i])}}function u(e,t){return new Date(1e3*(r$(e,t+4)/1e7*Math.pow(2,32)+r$(e,t)/1e7-11644473600))}function f(e,t){var n=t||{},r=n.root||"Root Entry";if(e.FullPaths||(e.FullPaths=[]),e.FileIndex||(e.FileIndex=[]),e.FullPaths.length!==e.FileIndex.length)throw new Error("inconsistent CFB structure");0===e.FullPaths.length&&(e.FullPaths[0]=r+"/",e.FileIndex[0]={name:r,type:5}),n.CLSID&&(e.FileIndex[0].clsid=n.CLSID),function(e){var t="\x01Sh33tJ5";if(DX.find(e,"/"+t))return;var n=h$(4);n[0]=55,n[1]=n[3]=50,n[2]=54,e.FileIndex.push({name:t,type:2,content:n,size:4,L:69,R:69,C:69}),e.FullPaths.push(e.FullPaths[0]+t),p(e)}(e)}function p(e,t){f(e);for(var o=!1,a=!1,i=e.FullPaths.length-1;i>=0;--i){var l=e.FileIndex[i];switch(l.type){case 0:a?o=!0:(e.FileIndex.pop(),e.FullPaths.pop());break;case 1:case 2:case 5:a=!0,isNaN(l.R*l.L*l.C)&&(o=!0),l.R>-1&&l.L>-1&&l.R==l.L&&(o=!0);break;default:o=!0}}if(o||t){var c=new Date(1987,1,19),s=0,d=Object.create?Object.create(null):{},u=[];for(i=0;i<e.FullPaths.length;++i)d[e.FullPaths[i]]=!0,0!==e.FileIndex[i].type&&u.push([e.FullPaths[i],e.FileIndex[i]]);for(i=0;i<u.length;++i){var p=n(u[i][0]);(a=d[p])||(u.push([p,{name:r(p).replace("/",""),type:1,clsid:x,ct:c,mt:c,content:null}]),d[p]=!0)}for(u.sort((function(e,t){return function(e,t){for(var n=e.split("/"),r=t.split("/"),o=0,a=0,i=Math.min(n.length,r.length);o<i;++o){if(a=n[o].length-r[o].length)return a;if(n[o]!=r[o])return n[o]<r[o]?-1:1}return n.length-r.length}(e[0],t[0])})),e.FullPaths=[],e.FileIndex=[],i=0;i<u.length;++i)e.FullPaths[i]=u[i][0],e.FileIndex[i]=u[i][1];for(i=0;i<u.length;++i){var h=e.FileIndex[i],m=e.FullPaths[i];if(h.name=r(m).replace("/",""),h.L=h.R=h.C=-(h.color=1),h.size=h.content?h.content.length:0,h.start=0,h.clsid=h.clsid||x,0===i)h.C=u.length>1?1:-1,h.size=0,h.type=5;else if("/"==m.slice(-1)){for(s=i+1;s<u.length&&n(e.FullPaths[s])!=m;++s);for(h.C=s>=u.length?-1:s,s=i+1;s<u.length&&n(e.FullPaths[s])!=n(m);++s);h.R=s>=u.length?-1:s,h.type=1}else n(e.FullPaths[i+1]||"")==n(m)&&(h.R=i+1),h.type=2}}}function h(e,t){var n=t||{};if("mad"==n.fileType)return function(e,t){for(var n=t||{},r=n.boundary||"SheetJS",o=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(r="------="+r).slice(2)+'"',"","",""],a=e.FullPaths[0],i=a,l=e.FileIndex[0],c=1;c<e.FullPaths.length;++c)if(i=e.FullPaths[c].slice(a.length),(l=e.FileIndex[c]).size&&l.content&&"\x01Sh33tJ5"!=i){i=i.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,(function(e){return"_x"+e.charCodeAt(0).toString(16)+"_"})).replace(/[\u0080-\uFFFF]/g,(function(e){return"_u"+e.charCodeAt(0).toString(16)+"_"}));for(var s=l.content,d=Rq&&Buffer.isBuffer(s)?s.toString("binary"):C(s),u=0,f=Math.min(1024,d.length),p=0,h=0;h<=f;++h)(p=d.charCodeAt(h))>=32&&p<128&&++u;var m=u>=4*f/5;o.push(r),o.push("Content-Location: "+(n.root||"file:///C:/SheetJS/")+i),o.push("Content-Transfer-Encoding: "+(m?"quoted-printable":"base64")),o.push("Content-Type: "+ie(l,i)),o.push(""),o.push(m?ce(d):le(d))}return o.push(r+"--\r\n"),o.join("\r\n")}(e,n);if(p(e),"zip"===n.fileType)return function(e,t){var n=t||{},r=[],a=[],i=h$(1),l=n.compression?8:0,c=0;0;var s=0,d=0,u=0,f=0,p=e.FullPaths[0],h=p,m=e.FileIndex[0],g=[],v=0;for(s=1;s<e.FullPaths.length;++s)if(h=e.FullPaths[s].slice(p.length),(m=e.FileIndex[s]).size&&m.content&&"\x01Sh33tJ5"!=h){var b=u,y=h$(h.length);for(d=0;d<h.length;++d)y.write_shift(1,127&h.charCodeAt(d));y=y.slice(0,y.l),g[f]=MX.buf(m.content,0);var x=m.content;8==l&&(x=S(x)),(i=h$(30)).write_shift(4,67324752),i.write_shift(2,20),i.write_shift(2,c),i.write_shift(2,l),m.mt?o(i,m.mt):i.write_shift(4,0),i.write_shift(-4,8&c?0:g[f]),i.write_shift(4,8&c?0:x.length),i.write_shift(4,8&c?0:m.content.length),i.write_shift(2,y.length),i.write_shift(2,0),u+=i.length,r.push(i),u+=y.length,r.push(y),u+=x.length,r.push(x),8&c&&((i=h$(12)).write_shift(-4,g[f]),i.write_shift(4,x.length),i.write_shift(4,m.content.length),u+=i.l,r.push(i)),(i=h$(46)).write_shift(4,33639248),i.write_shift(2,0),i.write_shift(2,20),i.write_shift(2,c),i.write_shift(2,l),i.write_shift(4,0),i.write_shift(-4,g[f]),i.write_shift(4,x.length),i.write_shift(4,m.content.length),i.write_shift(2,y.length),i.write_shift(2,0),i.write_shift(2,0),i.write_shift(2,0),i.write_shift(2,0),i.write_shift(4,0),i.write_shift(4,b),v+=i.l,a.push(i),v+=y.length,a.push(y),++f}return i=h$(22),i.write_shift(4,101010256),i.write_shift(2,0),i.write_shift(2,0),i.write_shift(2,f),i.write_shift(2,f),i.write_shift(4,v),i.write_shift(4,u),i.write_shift(2,0),Bq([Bq(r),Bq(a),i])}(e,n);var r=function(e){for(var t=0,n=0,r=0;r<e.FileIndex.length;++r){var o=e.FileIndex[r];if(o.content){var a=o.content.length;a>0&&(a<4096?t+=a+63>>6:n+=a+511>>9)}}for(var i=e.FullPaths.length+3>>2,l=t+127>>7,c=(t+7>>3)+n+i+l,s=c+127>>7,d=s<=109?0:Math.ceil((s-109)/127);c+s+d+127>>7>s;)d=++s<=109?0:Math.ceil((s-109)/127);var u=[1,d,s,l,i,n,t,0];return e.FileIndex[0].size=t<<6,u[7]=(e.FileIndex[0].start=u[0]+u[1]+u[2]+u[3]+u[4]+u[5])+(u[6]+7>>3),u}(e),a=h$(r[7]<<9),i=0,l=0;for(i=0;i<8;++i)a.write_shift(1,y[i]);for(i=0;i<8;++i)a.write_shift(2,0);for(a.write_shift(2,62),a.write_shift(2,3),a.write_shift(2,65534),a.write_shift(2,9),a.write_shift(2,6),i=0;i<3;++i)a.write_shift(2,0);for(a.write_shift(4,0),a.write_shift(4,r[2]),a.write_shift(4,r[0]+r[1]+r[2]+r[3]-1),a.write_shift(4,0),a.write_shift(4,4096),a.write_shift(4,r[3]?r[0]+r[1]+r[2]-1:v),a.write_shift(4,r[3]),a.write_shift(-4,r[1]?r[0]-1:v),a.write_shift(4,r[1]),i=0;i<109;++i)a.write_shift(-4,i<r[2]?r[1]+i:-1);if(r[1])for(l=0;l<r[1];++l){for(;i<236+127*l;++i)a.write_shift(-4,i<r[2]?r[1]+i:-1);a.write_shift(-4,l===r[1]-1?v:l+1)}var c=function(e){for(l+=e;i<l-1;++i)a.write_shift(-4,i+1);e&&(++i,a.write_shift(-4,v))};for(l=i=0,l+=r[1];i<l;++i)a.write_shift(-4,w.DIFSECT);for(l+=r[2];i<l;++i)a.write_shift(-4,w.FATSECT);c(r[3]),c(r[4]);for(var s=0,d=0,u=e.FileIndex[0];s<e.FileIndex.length;++s)(u=e.FileIndex[s]).content&&((d=u.content.length)<4096||(u.start=l,c(d+511>>9)));for(c(r[6]+7>>3);511&a.l;)a.write_shift(-4,w.ENDOFCHAIN);for(l=i=0,s=0;s<e.FileIndex.length;++s)(u=e.FileIndex[s]).content&&(!(d=u.content.length)||d>=4096||(u.start=l,c(d+63>>6)));for(;511&a.l;)a.write_shift(-4,w.ENDOFCHAIN);for(i=0;i<r[4]<<2;++i){var f=e.FullPaths[i];if(f&&0!==f.length){u=e.FileIndex[i],0===i&&(u.start=u.size?u.start-1:v);var h=0===i&&n.root||u.name;if(d=2*(h.length+1),a.write_shift(64,h,"utf16le"),a.write_shift(2,d),a.write_shift(1,u.type),a.write_shift(1,u.color),a.write_shift(-4,u.L),a.write_shift(-4,u.R),a.write_shift(-4,u.C),u.clsid)a.write_shift(16,u.clsid,"hex");else for(s=0;s<4;++s)a.write_shift(4,0);a.write_shift(4,u.state||0),a.write_shift(4,0),a.write_shift(4,0),a.write_shift(4,0),a.write_shift(4,0),a.write_shift(4,u.start),a.write_shift(4,u.size),a.write_shift(4,0)}else{for(s=0;s<17;++s)a.write_shift(4,0);for(s=0;s<3;++s)a.write_shift(4,-1);for(s=0;s<12;++s)a.write_shift(4,0)}}for(i=1;i<e.FileIndex.length;++i)if((u=e.FileIndex[i]).size>=4096)if(a.l=u.start+1<<9,Rq&&Buffer.isBuffer(u.content))u.content.copy(a,a.l,0,u.size),a.l+=u.size+511&-512;else{for(s=0;s<u.size;++s)a.write_shift(1,u.content[s]);for(;511&s;++s)a.write_shift(1,0)}for(i=1;i<e.FileIndex.length;++i)if((u=e.FileIndex[i]).size>0&&u.size<4096)if(Rq&&Buffer.isBuffer(u.content))u.content.copy(a,a.l,0,u.size),a.l+=u.size+63&-64;else{for(s=0;s<u.size;++s)a.write_shift(1,u.content[s]);for(;63&s;++s)a.write_shift(1,0)}if(Rq)a.l=a.length;else for(;a.l<a.length;)a.write_shift(1,0);return a}t.version="1.2.1";var m,g=64,v=-2,b="d0cf11e0a1b11ae1",y=[208,207,17,224,161,177,26,225],x="00000000000000000000000000000000",w={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:v,FREESECT:-1,HEADER_SIGNATURE:b,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:x,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function C(e){for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=String.fromCharCode(e[n]);return t.join("")}function S(e){return m?m.deflateRawSync(e):X(e)}var E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],j=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function I(e){var t=139536&(e<<1|e<<11)|558144&(e<<5|e<<15);return 255&(t>>16|t>>8|t)}for(var T="undefined"!==typeof Uint8Array,A=T?new Uint8Array(256):[],O=0;O<256;++O)A[O]=I(O);function N(e,t){var n=A[255&e];return t<=8?n>>>8-t:(n=n<<8|A[e>>8&255],t<=16?n>>>16-t:(n=n<<8|A[e>>16&255])>>>24-t)}function R(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=6?0:e[r+1]<<8))>>>n&3}function P(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=5?0:e[r+1]<<8))>>>n&7}function M(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=3?0:e[r+1]<<8))>>>n&31}function D(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=1?0:e[r+1]<<8))>>>n&127}function L(e,t,n){var r=7&t,o=t>>>3,a=(1<<n)-1,i=e[o]>>>r;return n<8-r?i&a:(i|=e[o+1]<<8-r,n<16-r?i&a:(i|=e[o+2]<<16-r,n<24-r?i&a:(i|=e[o+3]<<24-r)&a))}function _(e,t,n){var r=7&t,o=t>>>3;return r<=5?e[o]|=(7&n)<<r:(e[o]|=n<<r&255,e[o+1]=(7&n)>>8-r),t+3}function z(e,t,n){return n=(1&n)<<(7&t),e[t>>>3]|=n,t+1}function B(e,t,n){var r=t>>>3;return n<<=7&t,e[r]|=255&n,n>>>=8,e[r+1]=n,t+8}function F(e,t,n){var r=t>>>3;return n<<=7&t,e[r]|=255&n,n>>>=8,e[r+1]=255&n,e[r+2]=n>>>8,t+16}function H(e,t){var n=e.length,r=2*n>t?2*n:t+5,o=0;if(n>=t)return e;if(Rq){var a=Dq(r);if(e.copy)e.copy(a);else for(;o<e.length;++o)a[o]=e[o];return a}if(T){var i=new Uint8Array(r);if(i.set)i.set(e);else for(;o<n;++o)i[o]=e[o];return i}return e.length=r,e}function W(e){for(var t=new Array(e),n=0;n<e;++n)t[n]=0;return t}function V(e,t,n){var r=1,o=0,a=0,i=0,l=0,c=e.length,s=T?new Uint16Array(32):W(32);for(a=0;a<32;++a)s[a]=0;for(a=c;a<n;++a)e[a]=0;c=e.length;var d=T?new Uint16Array(c):W(c);for(a=0;a<c;++a)s[o=e[a]]++,r<o&&(r=o),d[a]=0;for(s[0]=0,a=1;a<=r;++a)s[a+16]=l=l+s[a-1]<<1;for(a=0;a<c;++a)0!=(l=e[a])&&(d[a]=s[l+16]++);var u=0;for(a=0;a<c;++a)if(0!=(u=e[a]))for(l=N(d[a],r)>>r-u,i=(1<<r+4-u)-1;i>=0;--i)t[l|i<<u]=15&u|a<<4;return r}var U=T?new Uint16Array(512):W(512),K=T?new Uint16Array(32):W(32);if(!T){for(var G=0;G<512;++G)U[G]=0;for(G=0;G<32;++G)K[G]=0}!function(){for(var e=[],t=0;t<32;t++)e.push(5);V(e,K,32);var n=[];for(t=0;t<=143;t++)n.push(8);for(;t<=255;t++)n.push(9);for(;t<=279;t++)n.push(7);for(;t<=287;t++)n.push(8);V(n,U,288)}();var q=function(){for(var e=T?new Uint8Array(32768):[],t=0,n=0;t<j.length-1;++t)for(;n<j[t+1];++n)e[n]=t;for(;n<32768;++n)e[n]=29;var r=T?new Uint8Array(259):[];for(t=0,n=0;t<k.length-1;++t)for(;n<k[t+1];++n)r[n]=t;return function(t,n){return t.length<8?function(e,t){for(var n=0;n<e.length;){var r=Math.min(65535,e.length-n),o=n+r==e.length;for(t.write_shift(1,+o),t.write_shift(2,r),t.write_shift(2,65535&~r);r-- >0;)t[t.l++]=e[n++]}return t.l}(t,n):function(t,n){for(var o=0,a=0,i=T?new Uint16Array(32768):[];a<t.length;){var l=Math.min(65535,t.length-a);if(l<10){for(7&(o=_(n,o,+!(a+l!=t.length)))&&(o+=8-(7&o)),n.l=o/8|0,n.write_shift(2,l),n.write_shift(2,65535&~l);l-- >0;)n[n.l++]=t[a++];o=8*n.l}else{o=_(n,o,+!(a+l!=t.length)+2);for(var c=0;l-- >0;){var s=t[a],d=-1,u=0;if((d=i[c=32767&(c<<5^s)])&&((d|=-32768&a)>a&&(d-=32768),d<a))for(;t[d+u]==t[a+u]&&u<250;)++u;if(u>2){(s=r[u])<=22?o=B(n,o,A[s+1]>>1)-1:(B(n,o,3),B(n,o+=5,A[s-23]>>5),o+=3);var f=s<8?0:s-4>>2;f>0&&(F(n,o,u-k[s]),o+=f),s=e[a-d],o=B(n,o,A[s]>>3),o-=3;var p=s<4?0:s-2>>1;p>0&&(F(n,o,a-d-j[s]),o+=p);for(var h=0;h<u;++h)i[c]=32767&a,c=32767&(c<<5^t[a]),++a;l-=u-1}else s<=143?s+=48:o=z(n,o,1),o=B(n,o,A[s]),i[c]=32767&a,++a}o=B(n,o,0)-1}}return n.l=(o+7)/8|0,n.l}(t,n)}}();function X(e){var t=h$(50+Math.floor(1.1*e.length)),n=q(e,t);return t.slice(0,n)}var Y=T?new Uint16Array(32768):W(32768),$=T?new Uint16Array(32768):W(32768),J=T?new Uint16Array(128):W(128),Q=1,Z=1;function ee(e,t){var n=M(e,t)+257,r=M(e,t+=5)+1,o=function(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=4?0:e[r+1]<<8))>>>n&15}(e,t+=5)+4;t+=4;for(var a=0,i=T?new Uint8Array(19):W(19),l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=1,s=T?new Uint8Array(8):W(8),d=T?new Uint8Array(8):W(8),u=i.length,f=0;f<o;++f)i[E[f]]=a=P(e,t),c<a&&(c=a),s[a]++,t+=3;var p=0;for(s[0]=0,f=1;f<=c;++f)d[f]=p=p+s[f-1]<<1;for(f=0;f<u;++f)0!=(p=i[f])&&(l[f]=d[p]++);var h=0;for(f=0;f<u;++f)if(0!=(h=i[f])){p=A[l[f]]>>8-h;for(var m=(1<<7-h)-1;m>=0;--m)J[p|m<<h]=7&h|f<<3}var g=[];for(c=1;g.length<n+r;)switch(t+=7&(p=J[D(e,t)]),p>>>=3){case 16:for(a=3+R(e,t),t+=2,p=g[g.length-1];a-- >0;)g.push(p);break;case 17:for(a=3+P(e,t),t+=3;a-- >0;)g.push(0);break;case 18:for(a=11+D(e,t),t+=7;a-- >0;)g.push(0);break;default:g.push(p),c<p&&(c=p)}var v=g.slice(0,n),b=g.slice(n);for(f=n;f<286;++f)v[f]=0;for(f=r;f<30;++f)b[f]=0;return Q=V(v,Y,286),Z=V(b,$,30),t}function te(e,t){var n=function(e,t){if(3==e[0]&&!(3&e[1]))return[Mq(t),2];for(var n=0,r=0,o=Dq(t||1<<18),a=0,i=o.length>>>0,l=0,c=0;0==(1&r);)if(r=P(e,n),n+=3,r>>>1!=0)for(r>>1==1?(l=9,c=5):(n=ee(e,n),l=Q,c=Z);;){!t&&i<a+32767&&(i=(o=H(o,a+32767)).length);var s=L(e,n,l),d=r>>>1==1?U[s]:Y[s];if(n+=15&d,0===((d>>>=4)>>>8&255))o[a++]=d;else{if(256==d)break;var u=(d-=257)<8?0:d-4>>2;u>5&&(u=0);var f=a+k[d];u>0&&(f+=L(e,n,u),n+=u),s=L(e,n,c),n+=15&(d=r>>>1==1?K[s]:$[s]);var p=(d>>>=4)<4?0:d-2>>1,h=j[d];for(p>0&&(h+=L(e,n,p),n+=p),!t&&i<f&&(i=(o=H(o,f+100)).length);a<f;)o[a]=o[a-h],++a}}else{7&n&&(n+=8-(7&n));var m=e[n>>>3]|e[1+(n>>>3)]<<8;if(n+=32,m>0)for(!t&&i<a+m&&(i=(o=H(o,a+m)).length);m-- >0;)o[a++]=e[n>>>3],n+=8}return t?[o,n+7>>>3]:[o.slice(0,a),n+7>>>3]}(e.slice(e.l||0),t);return e.l+=n[1],n[0]}function ne(e,t){if(!e)throw new Error(t);"undefined"!==typeof console&&console.error(t)}function re(e,t){var n=e;f$(n,0);var r={FileIndex:[],FullPaths:[]};f(r,{root:t.root});for(var o=n.length-4;(80!=n[o]||75!=n[o+1]||5!=n[o+2]||6!=n[o+3])&&o>=0;)--o;n.l=o+4,n.l+=4;var i=n.read_shift(2);n.l+=6;var l=n.read_shift(4);for(n.l=l,o=0;o<i;++o){n.l+=20;var c=n.read_shift(4),s=n.read_shift(4),d=n.read_shift(2),u=n.read_shift(2),p=n.read_shift(2);n.l+=8;var h=n.read_shift(4),m=a(n.slice(n.l+d,n.l+d+u));n.l+=d+u+p;var g=n.l;n.l=h+4,oe(n,c,s,r,m),n.l=g}return r}function oe(e,t,n,r,o){e.l+=2;var i=e.read_shift(2),l=e.read_shift(2),c=function(e){var t=65535&e.read_shift(2),n=65535&e.read_shift(2),r=new Date,o=31&n,a=15&(n>>>=5);n>>>=4,r.setMilliseconds(0),r.setFullYear(n+1980),r.setMonth(a-1),r.setDate(o);var i=31&t,l=63&(t>>>=5);return t>>>=6,r.setHours(t),r.setMinutes(l),r.setSeconds(i<<1),r}(e);if(8257&i)throw new Error("Unsupported ZIP encryption");e.read_shift(4);for(var s=e.read_shift(4),d=e.read_shift(4),u=e.read_shift(2),f=e.read_shift(2),p="",h=0;h<u;++h)p+=String.fromCharCode(e[e.l++]);if(f){var g=a(e.slice(e.l,e.l+f));(g[21589]||{}).mt&&(c=g[21589].mt),((o||{})[21589]||{}).mt&&(c=o[21589].mt)}e.l+=f;var v=e.slice(e.l,e.l+s);switch(l){case 8:v=function(e,t){if(!m)return te(e,t);var n=new(0,m.InflateRaw),r=n._processChunk(e.slice(e.l),n._finishFlushFlag);return e.l+=n.bytesRead,r}(e,d);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+l)}var b=!1;8&i&&(134695760==e.read_shift(4)&&(e.read_shift(4),b=!0),s=e.read_shift(4),d=e.read_shift(4)),s!=t&&ne(b,"Bad compressed size: "+t+" != "+s),d!=n&&ne(b,"Bad uncompressed size: "+n+" != "+d),de(r,p,v,{unsafe:!0,mt:c})}var ae={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function ie(e,t){if(e.ctype)return e.ctype;var n=e.name||"",r=n.match(/\.([^\.]+)$/);return r&&ae[r[1]]||t&&(r=(n=t).match(/[\.\\]([^\.\\])+$/))&&ae[r[1]]?ae[r[1]]:"application/octet-stream"}function le(e){for(var t=Oq(e),n=[],r=0;r<t.length;r+=76)n.push(t.slice(r,r+76));return n.join("\r\n")+"\r\n"}function ce(e){var t=e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,(function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"="+(1==t.length?"0"+t:t)}));"\n"==(t=t.replace(/ $/gm,"=20").replace(/\t$/gm,"=09")).charAt(0)&&(t="=0D"+t.slice(1));for(var n=[],r=(t=t.replace(/\r(?!\n)/gm,"=0D").replace(/\n\n/gm,"\n=0A").replace(/([^\r\n])\n/gm,"$1=0A")).split("\r\n"),o=0;o<r.length;++o){var a=r[o];if(0!=a.length)for(var i=0;i<a.length;){var l=76,c=a.slice(i,i+l);"="==c.charAt(l-1)?l--:"="==c.charAt(l-2)?l-=2:"="==c.charAt(l-3)&&(l-=3),c=a.slice(i,i+l),(i+=l)<a.length&&(c+="="),n.push(c)}else n.push("")}return n.join("\r\n")}function se(e,t,n){for(var r,o="",a="",i="",l=0;l<10;++l){var c=t[l];if(!c||c.match(/^\s*$/))break;var s=c.match(/^(.*?):\s*([^\s].*)$/);if(s)switch(s[1].toLowerCase()){case"content-location":o=s[2].trim();break;case"content-type":i=s[2].trim();break;case"content-transfer-encoding":a=s[2].trim()}}switch(++l,a.toLowerCase()){case"base64":r=Lq(Nq(t.slice(l).join("")));break;case"quoted-printable":r=function(e){for(var t=[],n=0;n<e.length;++n){for(var r=e[n];n<=e.length&&"="==r.charAt(r.length-1);)r=r.slice(0,r.length-1)+e[++n];t.push(r)}for(var o=0;o<t.length;++o)t[o]=t[o].replace(/[=][0-9A-Fa-f]{2}/g,(function(e){return String.fromCharCode(parseInt(e.slice(1),16))}));return Lq(t.join("\r\n"))}(t.slice(l));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+a)}var d=de(e,o.slice(n.length),r,{unsafe:!0});i&&(d.ctype=i)}function de(e,t,n,o){var a=o&&o.unsafe;a||f(e);var i=!a&&DX.find(e,t);if(!i){var l=e.FullPaths[0];t.slice(0,l.length)==l?l=t:("/"!=l.slice(-1)&&(l+="/"),l=(l+t).replace("//","/")),i={name:r(t),type:2},e.FileIndex.push(i),e.FullPaths.push(l),a||DX.utils.cfb_gc(e)}return i.content=n,i.size=n?n.length:0,o&&(o.CLSID&&(i.clsid=o.CLSID),o.mt&&(i.mt=o.mt),o.ct&&(i.ct=o.ct)),i}return t.find=function(e,t){var n=e.FullPaths.map((function(e){return e.toUpperCase()})),r=n.map((function(e){var t=e.split("/");return t[t.length-("/"==e.slice(-1)?2:1)]})),o=!1;47===t.charCodeAt(0)?(o=!0,t=n[0].slice(0,-1)+t):o=-1!==t.indexOf("/");var a=t.toUpperCase(),i=!0===o?n.indexOf(a):r.indexOf(a);if(-1!==i)return e.FileIndex[i];var l=!a.match(Hq);for(a=a.replace(Fq,""),l&&(a=a.replace(Hq,"!")),i=0;i<n.length;++i){if((l?n[i].replace(Hq,"!"):n[i]).replace(Fq,"")==a)return e.FileIndex[i];if((l?r[i].replace(Hq,"!"):r[i]).replace(Fq,"")==a)return e.FileIndex[i]}return null},t.read=function(t,n){var r=n&&n.type;switch(r||Rq&&Buffer.isBuffer(t)&&(r="buffer"),r||"base64"){case"file":return function(t,n){return i(),l(e.readFileSync(t),n)}(t,n);case"base64":return l(Lq(Nq(t)),n);case"binary":return l(Lq(t),n)}return l(t,n)},t.parse=l,t.write=function(t,n){var r=h(t,n);switch(n&&n.type||"buffer"){case"file":return i(),e.writeFileSync(n.filename,r),r;case"binary":return"string"==typeof r?r:C(r);case"base64":return Oq("string"==typeof r?r:C(r));case"buffer":if(Rq)return Buffer.isBuffer(r)?r:Pq(r);case"array":return"string"==typeof r?Lq(r):r}return r},t.writeFile=function(t,n,r){i();var o=h(t,r);e.writeFileSync(n,o)},t.utils={cfb_new:function(e){var t={};return f(t,e),t},cfb_add:de,cfb_del:function(e,t){f(e);var n=DX.find(e,t);if(n)for(var r=0;r<e.FileIndex.length;++r)if(e.FileIndex[r]==n)return e.FileIndex.splice(r,1),e.FullPaths.splice(r,1),!0;return!1},cfb_mov:function(e,t,n){f(e);var o=DX.find(e,t);if(o)for(var a=0;a<e.FileIndex.length;++a)if(e.FileIndex[a]==o)return e.FileIndex[a].name=r(n),e.FullPaths[a]=n,!0;return!1},cfb_gc:function(e){p(e,!0)},ReadShift:i$,CheckField:u$,prep_blob:f$,bconcat:Bq,use_zlib:function(e){try{var t=new(0,e.InflateRaw);if(t._processChunk(new Uint8Array([3,0]),t._finishFlushFlag),!t.bytesRead)throw new Error("zlib does not expose bytesRead");m=e}catch(r5){console.error("cannot use native zlib: "+(r5.message||r5))}},_deflateRaw:X,_inflateRaw:te,consts:w},t}();let LX;function _X(e){return"string"===typeof e?_q(e):Array.isArray(e)?function(e){if("undefined"===typeof Uint8Array)throw new Error("Unsupported");return new Uint8Array(e)}(e):e}function zX(e,t,n){if("undefined"!==typeof LX&&LX.writeFileSync)return n?LX.writeFileSync(e,t,n):LX.writeFileSync(e,t);if("undefined"!==typeof Deno){if(n&&"string"==typeof t)switch(n){case"utf8":t=new TextEncoder(n).encode(t);break;case"binary":t=_q(t);break;default:throw new Error("Unsupported encoding "+n)}return Deno.writeFileSync(e,t)}var r="utf8"==n?CY(t):t;if("undefined"!==typeof IE_SaveFile)return IE_SaveFile(r,e);if("undefined"!==typeof Blob){var o=new Blob([_X(r)],{type:"application/octet-stream"});if("undefined"!==typeof navigator&&navigator.msSaveBlob)return navigator.msSaveBlob(o,e);if("undefined"!==typeof saveAs)return saveAs(o,e);if("undefined"!==typeof URL&&"undefined"!==typeof document&&document.createElement&&URL.createObjectURL){var a=URL.createObjectURL(o);if("object"===typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&"undefined"!==typeof setTimeout&&setTimeout((function(){URL.revokeObjectURL(a)}),6e4),chrome.downloads.download({url:a,filename:e,saveAs:!0});var i=document.createElement("a");if(null!=i.download)return i.download=e,i.href=a,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL&&"undefined"!==typeof setTimeout&&setTimeout((function(){URL.revokeObjectURL(a)}),6e4),a}}if("undefined"!==typeof $&&"undefined"!==typeof File&&"undefined"!==typeof Folder)try{var l=File(e);return l.open("w"),l.encoding="binary",Array.isArray(t)&&(t=zq(t)),l.write(t),l.close(),t}catch(r5){if(!r5.message||!r5.message.match(/onstruct/))throw r5}throw new Error("cannot save file "+e)}function BX(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;++r)Object.prototype.hasOwnProperty.call(e,t[r])&&n.push(t[r]);return n}function FX(e,t){for(var n=[],r=BX(e),o=0;o!==r.length;++o)null==n[e[r[o]][t]]&&(n[e[r[o]][t]]=r[o]);return n}function HX(e){for(var t=[],n=BX(e),r=0;r!==n.length;++r)t[e[n[r]]]=n[r];return t}function WX(e){for(var t=[],n=BX(e),r=0;r!==n.length;++r)t[e[n[r]]]=parseInt(n[r],10);return t}var VX=new Date(1899,11,30,0,0,0);function UX(e,t){var n=e.getTime();return t&&(n-=1263168e5),(n-(VX.getTime()+6e4*(e.getTimezoneOffset()-VX.getTimezoneOffset())))/864e5}var KX=new Date,GX=VX.getTime()+6e4*(KX.getTimezoneOffset()-VX.getTimezoneOffset()),qX=KX.getTimezoneOffset();function XX(e){var t=new Date;return t.setTime(24*e*60*60*1e3+GX),t.getTimezoneOffset()!==qX&&t.setTime(t.getTime()+6e4*(t.getTimezoneOffset()-qX)),t}var YX=new Date("2017-02-19T19:06:09.000Z"),$X=isNaN(YX.getFullYear())?new Date("2/19/17"):YX,JX=2017==$X.getFullYear();function QX(e,t){var n=new Date(e);if(JX)return t>0?n.setTime(n.getTime()+60*n.getTimezoneOffset()*1e3):t<0&&n.setTime(n.getTime()-60*n.getTimezoneOffset()*1e3),n;if(e instanceof Date)return e;if(1917==$X.getFullYear()&&!isNaN(n.getFullYear())){var r=n.getFullYear();return e.indexOf(""+r)>-1||n.setFullYear(n.getFullYear()+100),n}var o=e.match(/\d+/g)||["2017","2","19","0","0","0"],a=new Date(+o[0],+o[1]-1,+o[2],+o[3]||0,+o[4]||0,+o[5]||0);return e.indexOf("Z")>-1&&(a=new Date(a.getTime()-60*a.getTimezoneOffset()*1e3)),a}function ZX(e,t){if(Rq&&Buffer.isBuffer(e)){if(t){if(255==e[0]&&254==e[1])return CY(e.slice(2).toString("utf16le"));if(254==e[1]&&255==e[2])return CY(Eq(e.slice(2).toString("binary")))}return e.toString("binary")}if("undefined"!==typeof TextDecoder)try{if(t){if(255==e[0]&&254==e[1])return CY(new TextDecoder("utf-16le").decode(e.slice(2)));if(254==e[0]&&255==e[1])return CY(new TextDecoder("utf-16be").decode(e.slice(2)))}var n={"\u20ac":"\x80","\u201a":"\x82","\u0192":"\x83","\u201e":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87","\u02c6":"\x88","\u2030":"\x89","\u0160":"\x8a","\u2039":"\x8b","\u0152":"\x8c","\u017d":"\x8e","\u2018":"\x91","\u2019":"\x92","\u201c":"\x93","\u201d":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02dc":"\x98","\u2122":"\x99","\u0161":"\x9a","\u203a":"\x9b","\u0153":"\x9c","\u017e":"\x9e","\u0178":"\x9f"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178]/g,(function(e){return n[e]||e}))}catch(r5){}for(var r=[],o=0;o!=e.length;++o)r.push(String.fromCharCode(e[o]));return r.join("")}function eY(e){if("undefined"!=typeof JSON&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if("object"!=typeof e||null==e)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=eY(e[n]));return t}function tY(e,t){for(var n="";n.length<t;)n+=e;return n}function nY(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var n=1,r=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,(function(){return n*=100,""}));return isNaN(t=Number(r))?(r=r.replace(/[(](.*)[)]/,(function(e,t){return n=-n,t})),isNaN(t=Number(r))?t:t/n):t/n}var rY=["january","february","march","april","may","june","july","august","september","october","november","december"];function oY(e){var t=new Date(e),n=new Date(NaN),r=t.getYear(),o=t.getMonth(),a=t.getDate();if(isNaN(a))return n;var i=e.toLowerCase();if(i.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if((i=i.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"")).length>3&&-1==rY.indexOf(i))return n}else if(i.match(/[a-z]/))return n;return r<0||r>8099?n:(o>0||a>1)&&101!=r?t:e.match(/[^-0-9:,\/\\]/)?n:t}function aY(e,t,n){if(e.FullPaths){var r;if("string"==typeof n)return r=Rq?Pq(n):function(e){for(var t=[],n=0,r=e.length+250,o=Mq(e.length+255),a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i<128)o[n++]=i;else if(i<2048)o[n++]=192|i>>6&31,o[n++]=128|63&i;else if(i>=55296&&i<57344){i=64+(1023&i);var l=1023&e.charCodeAt(++a);o[n++]=240|i>>8&7,o[n++]=128|i>>2&63,o[n++]=128|l>>6&15|(3&i)<<4,o[n++]=128|63&l}else o[n++]=224|i>>12&15,o[n++]=128|i>>6&63,o[n++]=128|63&i;n>r&&(t.push(o.slice(0,n)),n=0,o=Mq(65535),r=65530)}return t.push(o.slice(0,n)),Bq(t)}(n),DX.utils.cfb_add(e,t,r);DX.utils.cfb_add(e,t,n)}else e.file(t,n)}function iY(){return DX.utils.cfb_new()}var lY='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n';var cY={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},sY=HX(cY),dY=/[&<>'"]/g,uY=/[\u0000-\u0008\u000b-\u001f]/g;function fY(e){return(e+"").replace(dY,(function(e){return sY[e]})).replace(uY,(function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"}))}function pY(e){return fY(e).replace(/ /g,"_x0020_")}var hY=/[\u0000-\u001f]/g;function mY(e){return(e+"").replace(dY,(function(e){return sY[e]})).replace(/\n/g,"<br/>").replace(hY,(function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"}))}function gY(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function vY(e){for(var t="",n=0,r=0,o=0,a=0,i=0,l=0;n<e.length;)(r=e.charCodeAt(n++))<128?t+=String.fromCharCode(r):(o=e.charCodeAt(n++),r>191&&r<224?(i=(31&r)<<6,i|=63&o,t+=String.fromCharCode(i)):(a=e.charCodeAt(n++),r<240?t+=String.fromCharCode((15&r)<<12|(63&o)<<6|63&a):(l=((7&r)<<18|(63&o)<<12|(63&a)<<6|63&(i=e.charCodeAt(n++)))-65536,t+=String.fromCharCode(55296+(l>>>10&1023)),t+=String.fromCharCode(56320+(1023&l)))));return t}function bY(e){var t,n,r,o=Mq(2*e.length),a=1,i=0,l=0;for(n=0;n<e.length;n+=a)a=1,(r=e.charCodeAt(n))<128?t=r:r<224?(t=64*(31&r)+(63&e.charCodeAt(n+1)),a=2):r<240?(t=4096*(15&r)+64*(63&e.charCodeAt(n+1))+(63&e.charCodeAt(n+2)),a=3):(a=4,t=262144*(7&r)+4096*(63&e.charCodeAt(n+1))+64*(63&e.charCodeAt(n+2))+(63&e.charCodeAt(n+3)),l=55296+((t-=65536)>>>10&1023),t=56320+(1023&t)),0!==l&&(o[i++]=255&l,o[i++]=l>>>8,l=0),o[i++]=t%256,o[i++]=t>>>8;return o.slice(0,i).toString("ucs2")}function yY(e){return Pq(e,"binary").toString("utf8")}var xY="foo bar baz\xe2\x98\x83\xf0\x9f\x8d\xa3",wY=Rq&&(yY(xY)==vY(xY)&&yY||bY(xY)==vY(xY)&&bY)||vY,CY=Rq?function(e){return Pq(e,"utf8").toString("binary")}:function(e){for(var t=[],n=0,r=0,o=0;n<e.length;)switch(r=e.charCodeAt(n++),!0){case r<128:t.push(String.fromCharCode(r));break;case r<2048:t.push(String.fromCharCode(192+(r>>6))),t.push(String.fromCharCode(128+(63&r)));break;case r>=55296&&r<57344:r-=55296,o=e.charCodeAt(n++)-56320+(r<<10),t.push(String.fromCharCode(240+(o>>18&7))),t.push(String.fromCharCode(144+(o>>12&63))),t.push(String.fromCharCode(128+(o>>6&63))),t.push(String.fromCharCode(128+(63&o)));break;default:t.push(String.fromCharCode(224+(r>>12))),t.push(String.fromCharCode(128+(r>>6&63))),t.push(String.fromCharCode(128+(63&r)))}return t.join("")},SY=function(){var e=[["nbsp"," "],["middot","\xb7"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map((function(e){return[new RegExp("&"+e[0]+";","ig"),e[1]]}));return function(t){for(var n=t.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,"\n").replace(/<[^>]*>/g,""),r=0;r<e.length;++r)n=n.replace(e[r][0],e[r][1]);return n}}();var EY=/(^\s|\s$|\n)/;function kY(e,t){return"<"+e+(t.match(EY)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function jY(e){return BX(e).map((function(t){return" "+t+'="'+e[t]+'"'})).join("")}function IY(e,t,n){return"<"+e+(null!=n?jY(n):"")+(null!=t?(t.match(EY)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function TY(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(r5){if(t)throw r5}return""}var AY={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},OY=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],NY={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};var RY=function(e){for(var t=[],n=0;n<e[0].length;++n)if(e[0][n])for(var r=0,o=e[0][n].length;r<o;r+=10240)t.push.apply(t,e[0][n].slice(r,r+10240));return t},PY=Rq?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map((function(e){return Buffer.isBuffer(e)?e:Pq(e)}))):RY(e)}:RY,MY=function(e,t,n){for(var r=[],o=t;o<n;o+=2)r.push(String.fromCharCode(t$(e,o)));return r.join("").replace(Fq,"")},DY=Rq?function(e,t,n){return Buffer.isBuffer(e)?e.toString("utf16le",t,n).replace(Fq,""):MY(e,t,n)}:MY,LY=function(e,t,n){for(var r=[],o=t;o<t+n;++o)r.push(("0"+e[o].toString(16)).slice(-2));return r.join("")},_Y=Rq?function(e,t,n){return Buffer.isBuffer(e)?e.toString("hex",t,t+n):LY(e,t,n)}:LY,zY=function(e,t,n){for(var r=[],o=t;o<n;o++)r.push(String.fromCharCode(e$(e,o)));return r.join("")},BY=Rq?function(e,t,n){return Buffer.isBuffer(e)?e.toString("utf8",t,n):zY(e,t,n)}:zY,FY=function(e,t){var n=r$(e,t);return n>0?BY(e,t+4,t+4+n-1):""},HY=FY,WY=function(e,t){var n=r$(e,t);return n>0?BY(e,t+4,t+4+n-1):""},VY=WY,UY=function(e,t){var n=2*r$(e,t);return n>0?BY(e,t+4,t+4+n-1):""},KY=UY,GY=function(e,t){var n=r$(e,t);return n>0?DY(e,t+4,t+4+n):""},qY=GY,XY=function(e,t){var n=r$(e,t);return n>0?BY(e,t+4,t+4+n):""},YY=XY,$Y=function(e,t){return function(e,t){for(var n=1-2*(e[t+7]>>>7),r=((127&e[t+7])<<4)+(e[t+6]>>>4&15),o=15&e[t+6],a=5;a>=0;--a)o=256*o+e[t+a];return 2047==r?0==o?n*(1/0):NaN:(0==r?r=-1022:(r-=1023,o+=Math.pow(2,52)),n*Math.pow(2,r-52)*o)}(e,t)},JY=$Y,QY=function(e){return Array.isArray(e)||"undefined"!==typeof Uint8Array&&e instanceof Uint8Array};function ZY(){DY=function(e,t,n){return kq.utils.decode(1200,e.slice(t,n)).replace(Fq,"")},BY=function(e,t,n){return kq.utils.decode(65001,e.slice(t,n))},HY=function(e,t){var n=r$(e,t);return n>0?kq.utils.decode(bq,e.slice(t+4,t+4+n-1)):""},VY=function(e,t){var n=r$(e,t);return n>0?kq.utils.decode(vq,e.slice(t+4,t+4+n-1)):""},KY=function(e,t){var n=2*r$(e,t);return n>0?kq.utils.decode(1200,e.slice(t+4,t+4+n-1)):""},qY=function(e,t){var n=r$(e,t);return n>0?kq.utils.decode(1200,e.slice(t+4,t+4+n)):""},YY=function(e,t){var n=r$(e,t);return n>0?kq.utils.decode(65001,e.slice(t+4,t+4+n)):""}}Rq&&(HY=function(e,t){if(!Buffer.isBuffer(e))return FY(e,t);var n=e.readUInt32LE(t);return n>0?e.toString("utf8",t+4,t+4+n-1):""},VY=function(e,t){if(!Buffer.isBuffer(e))return WY(e,t);var n=e.readUInt32LE(t);return n>0?e.toString("utf8",t+4,t+4+n-1):""},KY=function(e,t){if(!Buffer.isBuffer(e))return UY(e,t);var n=2*e.readUInt32LE(t);return e.toString("utf16le",t+4,t+4+n-1)},qY=function(e,t){if(!Buffer.isBuffer(e))return GY(e,t);var n=e.readUInt32LE(t);return e.toString("utf16le",t+4,t+4+n)},YY=function(e,t){if(!Buffer.isBuffer(e))return XY(e,t);var n=e.readUInt32LE(t);return e.toString("utf8",t+4,t+4+n)},JY=function(e,t){return Buffer.isBuffer(e)?e.readDoubleLE(t):$Y(e,t)},QY=function(e){return Buffer.isBuffer(e)||Array.isArray(e)||"undefined"!==typeof Uint8Array&&e instanceof Uint8Array}),"undefined"!==typeof kq&&ZY();var e$=function(e,t){return e[t]},t$=function(e,t){return 256*e[t+1]+e[t]},n$=function(e,t){var n=256*e[t+1]+e[t];return n<32768?n:-1*(65535-n+1)},r$=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},o$=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},a$=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function i$(e,t){var n,r,o,a,i,l,c="",s=[];switch(t){case"dbcs":if(l=this.l,Rq&&Buffer.isBuffer(this))c=this.slice(this.l,this.l+2*e).toString("utf16le");else for(i=0;i<e;++i)c+=String.fromCharCode(t$(this,l)),l+=2;e*=2;break;case"utf8":c=BY(this,this.l,this.l+e);break;case"utf16le":e*=2,c=DY(this,this.l,this.l+e);break;case"wstr":if("undefined"===typeof kq)return i$.call(this,e,"dbcs");c=kq.utils.decode(vq,this.slice(this.l,this.l+2*e)),e*=2;break;case"lpstr-ansi":c=HY(this,this.l),e=4+r$(this,this.l);break;case"lpstr-cp":c=VY(this,this.l),e=4+r$(this,this.l);break;case"lpwstr":c=KY(this,this.l),e=4+2*r$(this,this.l);break;case"lpp4":e=4+r$(this,this.l),c=qY(this,this.l),2&e&&(e+=2);break;case"8lpp4":e=4+r$(this,this.l),c=YY(this,this.l),3&e&&(e+=4-(3&e));break;case"cstr":for(e=0,c="";0!==(o=e$(this,this.l+e++));)s.push(jq(o));c=s.join("");break;case"_wstr":for(e=0,c="";0!==(o=t$(this,this.l+e));)s.push(jq(o)),e+=2;e+=2,c=s.join("");break;case"dbcs-cont":for(c="",l=this.l,i=0;i<e;++i){if(this.lens&&-1!==this.lens.indexOf(l))return o=e$(this,l),this.l=l+1,a=i$.call(this,e-i,o?"dbcs-cont":"sbcs-cont"),s.join("")+a;s.push(jq(t$(this,l))),l+=2}c=s.join(""),e*=2;break;case"cpstr":if("undefined"!==typeof kq){c=kq.utils.decode(vq,this.slice(this.l,this.l+e));break}case"sbcs-cont":for(c="",l=this.l,i=0;i!=e;++i){if(this.lens&&-1!==this.lens.indexOf(l))return o=e$(this,l),this.l=l+1,a=i$.call(this,e-i,o?"dbcs-cont":"sbcs-cont"),s.join("")+a;s.push(jq(e$(this,l))),l+=1}c=s.join("");break;default:switch(e){case 1:return n=e$(this,this.l),this.l++,n;case 2:return n=("i"===t?n$:t$)(this,this.l),this.l+=2,n;case 4:case-4:return"i"===t||0===(128&this[this.l+3])?(n=(e>0?o$:a$)(this,this.l),this.l+=4,n):(r=r$(this,this.l),this.l+=4,r);case 8:case-8:if("f"===t)return r=8==e?JY(this,this.l):JY([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,r;e=8;case 16:c=_Y(this,this.l,e)}}return this.l+=e,c}var l$=function(e,t,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24&255},c$=function(e,t,n){e[n]=255&t,e[n+1]=t>>8&255,e[n+2]=t>>16&255,e[n+3]=t>>24&255},s$=function(e,t,n){e[n]=255&t,e[n+1]=t>>>8&255};function d$(e,t,n){var r=0,o=0;if("dbcs"===n){for(o=0;o!=t.length;++o)s$(this,t.charCodeAt(o),this.l+2*o);r=2*t.length}else if("sbcs"===n){if("undefined"!==typeof kq&&874==bq)for(o=0;o!=t.length;++o){var a=kq.utils.encode(bq,t.charAt(o));this[this.l+o]=a[0]}else for(t=t.replace(/[^\x00-\x7F]/g,"_"),o=0;o!=t.length;++o)this[this.l+o]=255&t.charCodeAt(o);r=t.length}else{if("hex"===n){for(;o<e;++o)this[this.l++]=parseInt(t.slice(2*o,2*o+2),16)||0;return this}if("utf16le"===n){var i=Math.min(this.l+e,this.length);for(o=0;o<Math.min(t.length,e);++o){var l=t.charCodeAt(o);this[this.l++]=255&l,this[this.l++]=l>>8}for(;this.l<i;)this[this.l++]=0;return this}switch(e){case 1:r=1,this[this.l]=255&t;break;case 2:r=2,this[this.l]=255&t,t>>>=8,this[this.l+1]=255&t;break;case 3:r=3,this[this.l]=255&t,t>>>=8,this[this.l+1]=255&t,t>>>=8,this[this.l+2]=255&t;break;case 4:r=4,l$(this,t,this.l);break;case 8:if(r=8,"f"===n){!function(e,t,n){var r=(t<0||1/t==-1/0?1:0)<<7,o=0,a=0,i=r?-t:t;isFinite(i)?0==i?o=a=0:(o=Math.floor(Math.log(i)/Math.LN2),a=i*Math.pow(2,52-o),o<=-1023&&(!isFinite(a)||a<Math.pow(2,52))?o=-1022:(a-=Math.pow(2,52),o+=1023)):(o=2047,a=isNaN(t)?26985:0);for(var l=0;l<=5;++l,a/=256)e[n+l]=255&a;e[n+6]=(15&o)<<4|15&a,e[n+7]=o>>4|r}(this,t,this.l);break}case 16:break;case-4:r=4,c$(this,t,this.l)}}return this.l+=r,this}function u$(e,t){var n=_Y(this,this.l,e.length>>1);if(n!==e)throw new Error(t+"Expected "+e+" saw "+n);this.l+=e.length>>1}function f$(e,t){e.l=t,e.read_shift=i$,e.chk=u$,e.write_shift=d$}function p$(e,t){e.l+=t}function h$(e){var t=Mq(e);return f$(t,0),t}function m$(){var e=[],t=Rq?256:2048,n=function(e){var t=h$(e);return f$(t,0),t},r=n(t),o=function(){r&&(r.length>r.l&&((r=r.slice(0,r.l)).l=r.length),r.length>0&&e.push(r),r=null)},a=function(e){return r&&e<r.length-r.l?r:(o(),r=n(Math.max(e+1,t)))};return{next:a,push:function(e){o(),null==(r=e).l&&(r.l=r.length),a(t)},end:function(){return o(),Bq(e)},_bufs:e}}function g$(e,t,n,r){var o,a=+t;if(!isNaN(a)){r||(r=A0[a].p||(n||[]).length||0),o=1+(a>=128?1:0)+1,r>=128&&++o,r>=16384&&++o,r>=2097152&&++o;var i=e.next(o);a<=127?i.write_shift(1,a):(i.write_shift(1,128+(127&a)),i.write_shift(1,a>>7));for(var l=0;4!=l;++l){if(!(r>=128)){i.write_shift(1,r);break}i.write_shift(1,128+(127&r)),r>>=7}r>0&&QY(n)&&e.push(n)}}function v$(e,t,n){var r=eY(e);if(t.s?(r.cRel&&(r.c+=t.s.c),r.rRel&&(r.r+=t.s.r)):(r.cRel&&(r.c+=t.c),r.rRel&&(r.r+=t.r)),!n||n.biff<12){for(;r.c>=256;)r.c-=256;for(;r.r>=65536;)r.r-=65536}return r}function b$(e,t,n){var r=eY(e);return r.s=v$(r.s,t.s,n),r.e=v$(r.e,t.s,n),r}function y$(e,t){if(e.cRel&&e.c<0)for(e=eY(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=eY(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var n=j$(e);return e.cRel||null==e.cRel||(n=n.replace(/^([A-Z])/,"$$$1")),e.rRel||null==e.rRel||(n=function(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(n)),n}function x$(e,t){return 0!=e.s.r||e.s.rRel||e.e.r!=(t.biff>=12?1048575:t.biff>=8?65536:16384)||e.e.rRel?0!=e.s.c||e.s.cRel||e.e.c!=(t.biff>=12?16383:255)||e.e.cRel?y$(e.s,t.biff)+":"+y$(e.e,t.biff):(e.s.rRel?"":"$")+C$(e.s.r)+":"+(e.e.rRel?"":"$")+C$(e.e.r):(e.s.cRel?"":"$")+E$(e.s.c)+":"+(e.e.cRel?"":"$")+E$(e.e.c)}function w$(e){return parseInt(e.replace(/\$(\d+)$/,"$1"),10)-1}function C$(e){return""+(e+1)}function S$(e){for(var t=e.replace(/^\$([A-Z])/,"$1"),n=0,r=0;r!==t.length;++r)n=26*n+t.charCodeAt(r)-64;return n-1}function E$(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function k$(e){for(var t=0,n=0,r=0;r<e.length;++r){var o=e.charCodeAt(r);o>=48&&o<=57?t=10*t+(o-48):o>=65&&o<=90&&(n=26*n+(o-64))}return{c:n-1,r:t-1}}function j$(e){for(var t=e.c+1,n="";t;t=(t-1)/26|0)n=String.fromCharCode((t-1)%26+65)+n;return n+(e.r+1)}function I$(e){var t=e.indexOf(":");return-1==t?{s:k$(e),e:k$(e)}:{s:k$(e.slice(0,t)),e:k$(e.slice(t+1))}}function T$(e,t){return"undefined"===typeof t||"number"===typeof t?T$(e.s,e.e):("string"!==typeof e&&(e=j$(e)),"string"!==typeof t&&(t=j$(t)),e==t?e:e+":"+t)}function A$(e){var t={s:{c:0,r:0},e:{c:0,r:0}},n=0,r=0,o=0,a=e.length;for(n=0;r<a&&!((o=e.charCodeAt(r)-64)<1||o>26);++r)n=26*n+o;for(t.s.c=--n,n=0;r<a&&!((o=e.charCodeAt(r)-48)<0||o>9);++r)n=10*n+o;if(t.s.r=--n,r===a||10!=o)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++r,n=0;r!=a&&!((o=e.charCodeAt(r)-64)<1||o>26);++r)n=26*n+o;for(t.e.c=--n,n=0;r!=a&&!((o=e.charCodeAt(r)-48)<0||o>9);++r)n=10*n+o;return t.e.r=--n,t}function O$(e,t){var n="d"==e.t&&t instanceof Date;if(null!=e.z)try{return e.w=AX(e.z,n?UX(t):t)}catch(r5){}try{return e.w=AX((e.XF||{}).numFmtId||(n?14:0),n?UX(t):t)}catch(r5){return""+t}}function N$(e,t,n){return null==e||null==e.t||"z"==e.t?"":void 0!==e.w?e.w:("d"==e.t&&!e.z&&n&&n.dateNF&&(e.z=n.dateNF),"e"==e.t?hJ[e.v]||e.v:O$(e,void 0==t?e.v:t))}function R$(e,t){var n=t&&t.sheet?t.sheet:"Sheet1",r={};return r[n]=e,{SheetNames:[n],Sheets:r}}function P$(e,t,n){var r=n||{},o=e?Array.isArray(e):r.dense;null!=Tq&&null==o&&(o=Tq);var a=e||(o?[]:{}),i=0,l=0;if(a&&null!=r.origin){if("number"==typeof r.origin)i=r.origin;else{var c="string"==typeof r.origin?k$(r.origin):r.origin;i=c.r,l=c.c}a["!ref"]||(a["!ref"]="A1:A1")}var s={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(a["!ref"]){var d=A$(a["!ref"]);s.s.c=d.s.c,s.s.r=d.s.r,s.e.c=Math.max(s.e.c,d.e.c),s.e.r=Math.max(s.e.r,d.e.r),-1==i&&(s.e.r=i=d.e.r+1)}for(var u=0;u!=t.length;++u)if(t[u]){if(!Array.isArray(t[u]))throw new Error("aoa_to_sheet expects an array of arrays");for(var f=0;f!=t[u].length;++f)if("undefined"!==typeof t[u][f]){var p={v:t[u][f]},h=i+u,m=l+f;if(s.s.r>h&&(s.s.r=h),s.s.c>m&&(s.s.c=m),s.e.r<h&&(s.e.r=h),s.e.c<m&&(s.e.c=m),!t[u][f]||"object"!==typeof t[u][f]||Array.isArray(t[u][f])||t[u][f]instanceof Date)if(Array.isArray(p.v)&&(p.f=t[u][f][1],p.v=p.v[0]),null===p.v)if(p.f)p.t="n";else if(r.nullError)p.t="e",p.v=0;else{if(!r.sheetStubs)continue;p.t="z"}else"number"===typeof p.v?p.t="n":"boolean"===typeof p.v?p.t="b":p.v instanceof Date?(p.z=r.dateNF||Jq[14],r.cellDates?(p.t="d",p.w=AX(p.z,UX(p.v))):(p.t="n",p.v=UX(p.v),p.w=AX(p.z,p.v))):p.t="s";else p=t[u][f];if(o)a[h]||(a[h]=[]),a[h][m]&&a[h][m].z&&(p.z=a[h][m].z),a[h][m]=p;else{var g=j$({c:m,r:h});a[g]&&a[g].z&&(p.z=a[g].z),a[g]=p}}}return s.s.c<1e7&&(a["!ref"]=T$(s)),a}function M$(e,t){return P$(null,e,t)}function D$(e,t){return t||(t=h$(4)),t.write_shift(4,e),t}function L$(e){var t=e.read_shift(4);return 0===t?"":e.read_shift(t,"dbcs")}function _$(e,t){var n=!1;return null==t&&(n=!0,t=h$(4+2*e.length)),t.write_shift(4,e.length),e.length>0&&t.write_shift(0,e,"dbcs"),n?t.slice(0,t.l):t}function z$(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function B$(e,t){var n=e.l,r=e.read_shift(1),o=L$(e),a=[],i={t:o,h:o};if(0!==(1&r)){for(var l=e.read_shift(4),c=0;c!=l;++c)a.push(z$(e));i.r=a}else i.r=[{ich:0,ifnt:0}];return e.l=n+t,i}var F$=B$;function H$(e,t){var n=!1;return null==t&&(n=!0,t=h$(23+4*e.t.length)),t.write_shift(1,1),_$(e.t,t),t.write_shift(4,1),function(e,t){t||(t=h$(4)),t.write_shift(2,e.ich||0),t.write_shift(2,e.ifnt||0)}({ich:0,ifnt:0},t),n?t.slice(0,t.l):t}function W$(e){var t=e.read_shift(4),n=e.read_shift(2);return n+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:n}}function V$(e,t){return null==t&&(t=h$(8)),t.write_shift(-4,e.c),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}function U$(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}function K$(e,t){return null==t&&(t=h$(4)),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}var G$=L$,q$=_$;function X$(e){var t=e.read_shift(4);return 0===t||4294967295===t?"":e.read_shift(t,"dbcs")}function Y$(e,t){var n=!1;return null==t&&(n=!0,t=h$(127)),t.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&t.write_shift(0,e,"dbcs"),n?t.slice(0,t.l):t}var $$=L$,J$=X$,Q$=Y$;function Z$(e){var t=e.slice(e.l,e.l+4),n=1&t[0],r=2&t[0];e.l+=4;var o=0===r?JY([0,0,0,0,252&t[0],t[1],t[2],t[3]],0):o$(t,0)>>2;return n?o/100:o}function eJ(e,t){null==t&&(t=h$(4));var n=0,r=0,o=100*e;if(e==(0|e)&&e>=-(1<<29)&&e<1<<29?r=1:o==(0|o)&&o>=-(1<<29)&&o<1<<29&&(r=1,n=1),!r)throw new Error("unsupported RkNumber "+e);t.write_shift(-4,((n?o:e)<<2)+(n+2))}function tJ(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var nJ=tJ,rJ=function(e,t){return t||(t=h$(16)),t.write_shift(4,e.s.r),t.write_shift(4,e.e.r),t.write_shift(4,e.s.c),t.write_shift(4,e.e.c),t};function oJ(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function aJ(e,t){return(t||h$(8)).write_shift(8,e,"f")}function iJ(e,t){if(t||(t=h$(8)),!e||e.auto)return t.write_shift(4,0),t.write_shift(4,0),t;null!=e.index?(t.write_shift(1,2),t.write_shift(1,e.index)):null!=e.theme?(t.write_shift(1,6),t.write_shift(1,e.theme)):(t.write_shift(1,5),t.write_shift(1,0));var n=e.tint||0;if(n>0?n*=32767:n<0&&(n*=32768),t.write_shift(2,n),e.rgb&&null==e.theme){var r=e.rgb||"FFFFFF";"number"==typeof r&&(r=("000000"+r.toString(16)).slice(-6)),t.write_shift(1,parseInt(r.slice(0,2),16)),t.write_shift(1,parseInt(r.slice(2,4),16)),t.write_shift(1,parseInt(r.slice(4,6),16)),t.write_shift(1,255)}else t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);return t}var lJ=2,cJ=3,sJ=80,dJ={1:{n:"CodePage",t:lJ},2:{n:"Category",t:sJ},3:{n:"PresentationFormat",t:sJ},4:{n:"ByteCount",t:cJ},5:{n:"LineCount",t:cJ},6:{n:"ParagraphCount",t:cJ},7:{n:"SlideCount",t:cJ},8:{n:"NoteCount",t:cJ},9:{n:"HiddenCount",t:cJ},10:{n:"MultimediaClipCount",t:cJ},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:sJ},15:{n:"Company",t:sJ},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:cJ},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:cJ,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:sJ},27:{n:"ContentStatus",t:sJ},28:{n:"Language",t:sJ},29:{n:"Version",t:sJ},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},uJ={1:{n:"CodePage",t:lJ},2:{n:"Title",t:sJ},3:{n:"Subject",t:sJ},4:{n:"Author",t:sJ},5:{n:"Keywords",t:sJ},6:{n:"Comments",t:sJ},7:{n:"Template",t:sJ},8:{n:"LastAuthor",t:sJ},9:{n:"RevNumber",t:sJ},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:cJ},15:{n:"WordCount",t:cJ},16:{n:"CharCount",t:cJ},17:{n:"Thumbnail",t:71},18:{n:"Application",t:sJ},19:{n:"DocSecurity",t:cJ},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}};function fJ(e){return e.map((function(e){return[e>>16&255,e>>8&255,255&e]}))}var pJ=eY(fJ([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),hJ={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},mJ={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},gJ={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function vJ(e,t){var n,r=function(e){for(var t=[],n=BX(e),r=0;r!==n.length;++r)null==t[e[n[r]]]&&(t[e[n[r]]]=[]),t[e[n[r]]].push(n[r]);return t}(mJ),o=[];o[o.length]=lY,o[o.length]=IY("Types",null,{xmlns:AY.CT,"xmlns:xsd":AY.xsd,"xmlns:xsi":AY.xsi}),o=o.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map((function(e){return IY("Default",null,{Extension:e[0],ContentType:e[1]})})));var a=function(r){e[r]&&e[r].length>0&&(n=e[r][0],o[o.length]=IY("Override",null,{PartName:("/"==n[0]?"":"/")+n,ContentType:gJ[r][t.bookType]||gJ[r].xlsx}))},i=function(n){(e[n]||[]).forEach((function(e){o[o.length]=IY("Override",null,{PartName:("/"==e[0]?"":"/")+e,ContentType:gJ[n][t.bookType]||gJ[n].xlsx})}))},l=function(t){(e[t]||[]).forEach((function(e){o[o.length]=IY("Override",null,{PartName:("/"==e[0]?"":"/")+e,ContentType:r[t][0]})}))};return a("workbooks"),i("sheets"),i("charts"),l("themes"),["strs","styles"].forEach(a),["coreprops","extprops","custprops"].forEach(l),l("vba"),l("comments"),l("threadedcomments"),l("drawings"),i("metadata"),l("people"),o.length>2&&(o[o.length]="</Types>",o[1]=o[1].replace("/>",">")),o.join("")}var bJ={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function yJ(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function xJ(e){var t=[lY,IY("Relationships",null,{xmlns:AY.RELS})];return BX(e["!id"]).forEach((function(n){t[t.length]=IY("Relationship",null,e["!id"][n])})),t.length>2&&(t[t.length]="</Relationships>",t[1]=t[1].replace("/>",">")),t.join("")}function wJ(e,t,n,r,o,a){if(o||(o={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),t<0)for(t=e["!idx"];e["!id"]["rId"+t];++t);if(e["!idx"]=t+1,o.Id="rId"+t,o.Type=r,o.Target=n,a?o.TargetMode=a:[bJ.HLINK,bJ.XPATH,bJ.XMISS].indexOf(o.Type)>-1&&(o.TargetMode="External"),e["!id"][o.Id])throw new Error("Cannot rewrite rId "+t);return e["!id"][o.Id]=o,e[("/"+o.Target).replace("//","/")]=o,t}function CJ(e,t,n){return['  <rdf:Description rdf:about="'+e+'">\n','    <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(n||"odf")+"#"+t+'"/>\n',"  </rdf:Description>\n"].join("")}function SJ(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+gq.version+"</meta:generator></office:meta></office:document-meta>"}var EJ=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function kJ(e,t,n,r,o){null==o[e]&&null!=t&&""!==t&&(o[e]=t,t=fY(t),r[r.length]=n?IY(e,t,n):kY(e,t))}function jJ(e,t){var n=t||{},r=[lY,IY("cp:coreProperties",null,{"xmlns:cp":AY.CORE_PROPS,"xmlns:dc":AY.dc,"xmlns:dcterms":AY.dcterms,"xmlns:dcmitype":AY.dcmitype,"xmlns:xsi":AY.xsi})],o={};if(!e&&!n.Props)return r.join("");e&&(null!=e.CreatedDate&&kJ("dcterms:created","string"===typeof e.CreatedDate?e.CreatedDate:TY(e.CreatedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},r,o),null!=e.ModifiedDate&&kJ("dcterms:modified","string"===typeof e.ModifiedDate?e.ModifiedDate:TY(e.ModifiedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},r,o));for(var a=0;a!=EJ.length;++a){var i=EJ[a],l=n.Props&&null!=n.Props[i[1]]?n.Props[i[1]]:e?e[i[1]]:null;!0===l?l="1":!1===l?l="0":"number"==typeof l&&(l=String(l)),null!=l&&kJ(i[0],l,null,r,o)}return r.length>2&&(r[r.length]="</cp:coreProperties>",r[1]=r[1].replace("/>",">")),r.join("")}var IJ=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],TJ=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function AJ(e){var t=[],n=IY;return e||(e={}),e.Application="SheetJS",t[t.length]=lY,t[t.length]=IY("Properties",null,{xmlns:AY.EXT_PROPS,"xmlns:vt":AY.vt}),IJ.forEach((function(r){if(void 0!==e[r[1]]){var o;switch(r[2]){case"string":o=fY(String(e[r[1]]));break;case"bool":o=e[r[1]]?"true":"false"}void 0!==o&&(t[t.length]=n(r[0],o))}})),t[t.length]=n("HeadingPairs",n("vt:vector",n("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+n("vt:variant",n("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=n("TitlesOfParts",n("vt:vector",e.SheetNames.map((function(e){return"<vt:lpstr>"+fY(e)+"</vt:lpstr>"})).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}function OJ(e){var t=[lY,IY("Properties",null,{xmlns:AY.CUST_PROPS,"xmlns:vt":AY.vt})];if(!e)return t.join("");var n=1;return BX(e).forEach((function(r){++n,t[t.length]=IY("property",function(e,t){switch(typeof e){case"string":var n=IY("vt:lpwstr",fY(e));return t&&(n=n.replace(/&quot;/g,"_x0022_")),n;case"number":return IY((0|e)==e?"vt:i4":"vt:r8",fY(String(e)));case"boolean":return IY("vt:bool",e?"true":"false")}if(e instanceof Date)return IY("vt:filetime",TY(e));throw new Error("Unable to serialize "+e)}(e[r],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:n,name:fY(r)})})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var NJ={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function RJ(e,t){var n=h$(4),r=h$(4);switch(n.write_shift(4,80==e?31:e),e){case 3:r.write_shift(-4,t);break;case 5:(r=h$(8)).write_shift(8,t,"f");break;case 11:r.write_shift(4,t?1:0);break;case 64:r=function(e){var t=("string"==typeof e?new Date(Date.parse(e)):e).getTime()/1e3+11644473600,n=t%Math.pow(2,32),r=(t-n)/Math.pow(2,32);r*=1e7;var o=(n*=1e7)/Math.pow(2,32)|0;o>0&&(n%=Math.pow(2,32),r+=o);var a=h$(8);return a.write_shift(4,n),a.write_shift(4,r),a}(t);break;case 31:case 80:for((r=h$(4+2*(t.length+1)+(t.length%2?0:2))).write_shift(4,t.length+1),r.write_shift(0,t,"dbcs");r.l!=r.length;)r.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+t)}return Bq([n,r])}var PJ=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function MJ(e){switch(typeof e){case"boolean":return 11;case"number":return(0|e)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64}return-1}function DJ(e,t,n){var r=h$(8),o=[],a=[],i=8,l=0,c=h$(8),s=h$(8);if(c.write_shift(4,2),c.write_shift(4,1200),s.write_shift(4,1),a.push(c),o.push(s),i+=8+c.length,!t){(s=h$(8)).write_shift(4,0),o.unshift(s);var d=[h$(4)];for(d[0].write_shift(4,e.length),l=0;l<e.length;++l){var u=e[l][0];for((c=h$(8+2*(u.length+1)+(u.length%2?0:2))).write_shift(4,l+2),c.write_shift(4,u.length+1),c.write_shift(0,u,"dbcs");c.l!=c.length;)c.write_shift(1,0);d.push(c)}c=Bq(d),a.unshift(c),i+=8+c.length}for(l=0;l<e.length;++l)if((!t||t[e[l][0]])&&!(PJ.indexOf(e[l][0])>-1||TJ.indexOf(e[l][0])>-1)&&null!=e[l][1]){var f=e[l][1],p=0;if(t){var h=n[p=+t[e[l][0]]];if("version"==h.p&&"string"==typeof f){var m=f.split(".");f=(+m[0]<<16)+(+m[1]||0)}c=RJ(h.t,f)}else{var g=MJ(f);-1==g&&(g=31,f=String(f)),c=RJ(g,f)}a.push(c),(s=h$(8)).write_shift(4,t?p:2+l),o.push(s),i+=8+c.length}var v=8*(a.length+1);for(l=0;l<a.length;++l)o[l].write_shift(4,v),v+=a[l].length;return r.write_shift(4,i),r.write_shift(4,a.length),Bq([r].concat(o).concat(a))}function LJ(e,t,n,r,o,a){var i=h$(o?68:48),l=[i];i.write_shift(2,65534),i.write_shift(2,0),i.write_shift(4,842412599),i.write_shift(16,DX.utils.consts.HEADER_CLSID,"hex"),i.write_shift(4,o?2:1),i.write_shift(16,t,"hex"),i.write_shift(4,o?68:48);var c=DJ(e,n,r);if(l.push(c),o){var s=DJ(o,null,null);i.write_shift(16,a,"hex"),i.write_shift(4,68+c.length),l.push(s)}return Bq(l)}function _J(e,t){return 1===e.read_shift(t)}function zJ(e,t){return t||(t=h$(2)),t.write_shift(2,+!!e),t}function BJ(e){return e.read_shift(2,"u")}function FJ(e,t){return t||(t=h$(2)),t.write_shift(2,e),t}function HJ(e,t,n){return n||(n=h$(2)),n.write_shift(1,"e"==t?+e:+!!e),n.write_shift(1,"e"==t?1:0),n}function WJ(e,t,n){var r=e.read_shift(n&&n.biff>=12?2:1),o="sbcs-cont",a=vq;(n&&n.biff>=8&&(vq=1200),n&&8!=n.biff)?12==n.biff&&(o="wstr"):e.read_shift(1)&&(o="dbcs-cont");n.biff>=2&&n.biff<=5&&(o="cpstr");var i=r?e.read_shift(r,o):"";return vq=a,i}function VJ(e){var t=e.t||"",n=h$(3);n.write_shift(2,t.length),n.write_shift(1,1);var r=h$(2*t.length);return r.write_shift(2*t.length,t,"utf16le"),Bq([n,r])}function UJ(e,t,n){if(n){if(n.biff>=2&&n.biff<=5)return e.read_shift(t,"cpstr");if(n.biff>=12)return e.read_shift(t,"dbcs-cont")}return 0===e.read_shift(1)?e.read_shift(t,"sbcs-cont"):e.read_shift(t,"dbcs-cont")}function KJ(e,t,n){var r=e.read_shift(n&&2==n.biff?1:2);return 0===r?(e.l++,""):UJ(e,r,n)}function GJ(e,t,n){if(n.biff>5)return KJ(e,0,n);var r=e.read_shift(1);return 0===r?(e.l++,""):e.read_shift(r,n.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function qJ(e,t,n){return n||(n=h$(3+2*e.length)),n.write_shift(2,e.length),n.write_shift(1,1),n.write_shift(31,e,"utf16le"),n}function XJ(e,t){t||(t=h$(6+2*e.length)),t.write_shift(4,1+e.length);for(var n=0;n<e.length;++n)t.write_shift(2,e.charCodeAt(n));return t.write_shift(2,0),t}function YJ(e){var t=h$(512),n=0,r=e.Target;"file://"==r.slice(0,7)&&(r=r.slice(7));var o=r.indexOf("#"),a=o>-1?31:23;switch(r.charAt(0)){case"#":a=28;break;case".":a&=-3}t.write_shift(4,2),t.write_shift(4,a);var i=[8,6815827,6619237,4849780,83];for(n=0;n<i.length;++n)t.write_shift(4,i[n]);if(28==a)XJ(r=r.slice(1),t);else if(2&a){for(i="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),n=0;n<i.length;++n)t.write_shift(1,parseInt(i[n],16));var l=o>-1?r.slice(0,o):r;for(t.write_shift(4,2*(l.length+1)),n=0;n<l.length;++n)t.write_shift(2,l.charCodeAt(n));t.write_shift(2,0),8&a&&XJ(o>-1?r.slice(o+1):"",t)}else{for(i="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),n=0;n<i.length;++n)t.write_shift(1,parseInt(i[n],16));for(var c=0;"../"==r.slice(3*c,3*c+3)||"..\\"==r.slice(3*c,3*c+3);)++c;for(t.write_shift(2,c),t.write_shift(4,r.length-3*c+1),n=0;n<r.length-3*c;++n)t.write_shift(1,255&r.charCodeAt(n+3*c));for(t.write_shift(1,0),t.write_shift(2,65535),t.write_shift(2,57005),n=0;n<6;++n)t.write_shift(4,0)}return t.slice(0,t.l)}function $J(e,t,n,r){return r||(r=h$(6)),r.write_shift(2,e),r.write_shift(2,t),r.write_shift(2,n||0),r}function JJ(e,t,n){var r=n.biff>8?4:2;return[e.read_shift(r),e.read_shift(r,"i"),e.read_shift(r,"i")]}function QJ(e){var t=e.read_shift(2),n=e.read_shift(2);return{s:{c:e.read_shift(2),r:t},e:{c:e.read_shift(2),r:n}}}function ZJ(e,t){return t||(t=h$(8)),t.write_shift(2,e.s.r),t.write_shift(2,e.e.r),t.write_shift(2,e.s.c),t.write_shift(2,e.e.c),t}function eQ(e,t,n){var r=1536,o=16;switch(n.bookType){case"biff8":case"xla":break;case"biff5":r=1280,o=8;break;case"biff4":r=4,o=6;break;case"biff3":r=3,o=6;break;case"biff2":r=2,o=4;break;default:throw new Error("unsupported BIFF version")}var a=h$(o);return a.write_shift(2,r),a.write_shift(2,t),o>4&&a.write_shift(2,29282),o>6&&a.write_shift(2,1997),o>8&&(a.write_shift(2,49161),a.write_shift(2,1),a.write_shift(2,1798),a.write_shift(2,0)),a}function tQ(e,t){var n=!t||t.biff>=8?2:1,r=h$(8+n*e.name.length);r.write_shift(4,e.pos),r.write_shift(1,e.hs||0),r.write_shift(1,e.dt),r.write_shift(1,e.name.length),t.biff>=8&&r.write_shift(1,1),r.write_shift(n*e.name.length,e.name,t.biff<8?"sbcs":"utf16le");var o=r.slice(0,r.l);return o.l=r.l,o}function nQ(e,t,n,r){var o=n&&5==n.biff;r||(r=h$(o?3+t.length:5+2*t.length)),r.write_shift(2,e),r.write_shift(o?1:2,t.length),o||r.write_shift(1,1),r.write_shift((o?1:2)*t.length,t,o?"sbcs":"utf16le");var a=r.length>r.l?r.slice(0,r.l):r;return null==a.l&&(a.l=a.length),a}function rQ(e,t,n,r){var o=n&&5==n.biff;r||(r=h$(o?16:20)),r.write_shift(2,0),e.style?(r.write_shift(2,e.numFmtId||0),r.write_shift(2,65524)):(r.write_shift(2,e.numFmtId||0),r.write_shift(2,t<<4));var a=0;return e.numFmtId>0&&o&&(a|=1024),r.write_shift(4,a),r.write_shift(4,0),o||r.write_shift(4,0),r.write_shift(2,0),r}function oQ(e,t,n){if(n.biff<8)return function(e,t,n){3==e[e.l+1]&&e[e.l]++;var r=WJ(e,0,n);return 3==r.charCodeAt(0)?r.slice(1):r}(e,0,n);for(var r=[],o=e.l+t,a=e.read_shift(n.biff>8?4:2);0!==a--;)r.push(JJ(e,n.biff,n));if(e.l!=o)throw new Error("Bad ExternSheet: "+e.l+" != "+o);return r}function aQ(e){var t=h$(24),n=k$(e[0]);t.write_shift(2,n.r),t.write_shift(2,n.r),t.write_shift(2,n.c),t.write_shift(2,n.c);for(var r="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),o=0;o<16;++o)t.write_shift(1,parseInt(r[o],16));return Bq([t,YJ(e[1])])}function iQ(e){var t=e[1].Tooltip,n=h$(10+2*(t.length+1));n.write_shift(2,2048);var r=k$(e[0]);n.write_shift(2,r.r),n.write_shift(2,r.r),n.write_shift(2,r.c),n.write_shift(2,r.c);for(var o=0;o<t.length;++o)n.write_shift(2,t.charCodeAt(o));return n.write_shift(2,0),n}function lQ(e,t,n){if(!n.cellStyles)return p$(e,t);var r=n&&n.biff>=12?4:2,o=e.read_shift(r),a=e.read_shift(r),i=e.read_shift(r),l=e.read_shift(r),c=e.read_shift(2);2==r&&(e.l+=2);var s={s:o,e:a,w:i,ixfe:l,flags:c};return(n.biff>=5||!n.biff)&&(s.level=c>>8&7),s}var cQ=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=HX({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function n(t,n){var r=n||{};r.dateNF||(r.dateNF="yyyymmdd");var o=M$(function(t,n){var r=[],o=Mq(1);switch(n.type){case"base64":o=Lq(Nq(t));break;case"binary":o=Lq(t);break;case"buffer":case"array":o=t}f$(o,0);var a=o.read_shift(1),i=!!(136&a),l=!1,c=!1;switch(a){case 2:case 3:case 131:case 139:case 245:break;case 48:case 49:l=!0,i=!0;break;case 140:c=!0;break;default:throw new Error("DBF Unsupported Version: "+a.toString(16))}var s=0,d=521;2==a&&(s=o.read_shift(2)),o.l+=3,2!=a&&(s=o.read_shift(4)),s>1048576&&(s=1e6),2!=a&&(d=o.read_shift(2));var u=o.read_shift(2),f=n.codepage||1252;2!=a&&(o.l+=16,o.read_shift(1),0!==o[o.l]&&(f=e[o[o.l]]),o.l+=1,o.l+=2),c&&(o.l+=36);for(var p=[],h={},m=Math.min(o.length,2==a?521:d-10-(l?264:0)),g=c?32:11;o.l<m&&13!=o[o.l];)switch((h={}).name=kq.utils.decode(f,o.slice(o.l,o.l+g)).replace(/[\u0000\r\n].*$/g,""),o.l+=g,h.type=String.fromCharCode(o.read_shift(1)),2==a||c||(h.offset=o.read_shift(4)),h.len=o.read_shift(1),2==a&&(h.offset=o.read_shift(2)),h.dec=o.read_shift(1),h.name.length&&p.push(h),2!=a&&(o.l+=c?13:14),h.type){case"B":l&&8==h.len||!n.WTF||console.log("Skipping "+h.name+":"+h.type);break;case"G":case"P":n.WTF&&console.log("Skipping "+h.name+":"+h.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+h.type)}if(13!==o[o.l]&&(o.l=d-1),13!==o.read_shift(1))throw new Error("DBF Terminator not found "+o.l+" "+o[o.l]);o.l=d;var v=0,b=0;for(r[0]=[],b=0;b!=p.length;++b)r[0][b]=p[b].name;for(;s-- >0;)if(42!==o[o.l])for(++o.l,r[++v]=[],b=0,b=0;b!=p.length;++b){var y=o.slice(o.l,o.l+p[b].len);o.l+=p[b].len,f$(y,0);var x=kq.utils.decode(f,y);switch(p[b].type){case"C":x.trim().length&&(r[v][b]=x.replace(/\s+$/,""));break;case"D":8===x.length?r[v][b]=new Date(+x.slice(0,4),+x.slice(4,6)-1,+x.slice(6,8)):r[v][b]=x;break;case"F":r[v][b]=parseFloat(x.trim());break;case"+":case"I":r[v][b]=c?2147483648^y.read_shift(-4,"i"):y.read_shift(4,"i");break;case"L":switch(x.trim().toUpperCase()){case"Y":case"T":r[v][b]=!0;break;case"N":case"F":r[v][b]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+x+"|")}break;case"M":if(!i)throw new Error("DBF Unexpected MEMO for type "+a.toString(16));r[v][b]="##MEMO##"+(c?parseInt(x.trim(),10):y.read_shift(4));break;case"N":(x=x.replace(/\u0000/g,"").trim())&&"."!=x&&(r[v][b]=+x||0);break;case"@":r[v][b]=new Date(y.read_shift(-8,"f")-621356832e5);break;case"T":r[v][b]=new Date(864e5*(y.read_shift(4)-2440588)+y.read_shift(4));break;case"Y":r[v][b]=y.read_shift(4,"i")/1e4+y.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":r[v][b]=-y.read_shift(-8,"f");break;case"B":if(l&&8==p[b].len){r[v][b]=y.read_shift(8,"f");break}case"G":case"P":y.l+=p[b].len;break;case"0":if("_NullFlags"===p[b].name)break;default:throw new Error("DBF Unsupported data type "+p[b].type)}}else o.l+=u;if(2!=a&&o.l<o.length&&26!=o[o.l++])throw new Error("DBF EOF Marker missing "+(o.l-1)+" of "+o.length+" "+o[o.l-1].toString(16));return n&&n.sheetRows&&(r=r.slice(0,n.sheetRows)),n.DBF=p,r}(t,r),r);return o["!cols"]=r.DBF.map((function(e){return{wch:e.len,DBF:e}})),delete r.DBF,o}var r={B:8,C:250,L:1,D:8,"?":0,"":0};return{to_workbook:function(e,t){try{return R$(n(e,t),t)}catch(r5){if(t&&t.WTF)throw r5}return{SheetNames:[],Sheets:{}}},to_sheet:n,from_sheet:function(e,n){var o=n||{};if(+o.codepage>=0&&Cq(+o.codepage),"string"==o.type)throw new Error("Cannot write DBF to JS string");var a=m$(),i=k1(e,{header:1,raw:!0,cellDates:!0}),l=i[0],c=i.slice(1),s=e["!cols"]||[],d=0,u=0,f=0,p=1;for(d=0;d<l.length;++d)if(((s[d]||{}).DBF||{}).name)l[d]=s[d].DBF.name,++f;else if(null!=l[d]){if(++f,"number"===typeof l[d]&&(l[d]=l[d].toString(10)),"string"!==typeof l[d])throw new Error("DBF Invalid column name "+l[d]+" |"+typeof l[d]+"|");if(l.indexOf(l[d])!==d)for(u=0;u<1024;++u)if(-1==l.indexOf(l[d]+"_"+u)){l[d]+="_"+u;break}}var h=A$(e["!ref"]),m=[],g=[],v=[];for(d=0;d<=h.e.c-h.s.c;++d){var b="",y="",x=0,w=[];for(u=0;u<c.length;++u)null!=c[u][d]&&w.push(c[u][d]);if(0!=w.length&&null!=l[d]){for(u=0;u<w.length;++u){switch(typeof w[u]){case"number":y="B";break;case"string":default:y="C";break;case"boolean":y="L";break;case"object":y=w[u]instanceof Date?"D":"C"}x=Math.max(x,String(w[u]).length),b=b&&b!=y?"C":y}x>250&&(x=250),"C"==(y=((s[d]||{}).DBF||{}).type)&&s[d].DBF.len>x&&(x=s[d].DBF.len),"B"==b&&"N"==y&&(b="N",v[d]=s[d].DBF.dec,x=s[d].DBF.len),g[d]="C"==b||"N"==y?x:r[b]||0,p+=g[d],m[d]=b}else m[d]="?"}var C=a.next(32);for(C.write_shift(4,318902576),C.write_shift(4,c.length),C.write_shift(2,296+32*f),C.write_shift(2,p),d=0;d<4;++d)C.write_shift(4,0);for(C.write_shift(4,0|(+t[bq]||3)<<8),d=0,u=0;d<l.length;++d)if(null!=l[d]){var S=a.next(32),E=(l[d].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);S.write_shift(1,E,"sbcs"),S.write_shift(1,"?"==m[d]?"C":m[d],"sbcs"),S.write_shift(4,u),S.write_shift(1,g[d]||r[m[d]]||0),S.write_shift(1,v[d]||0),S.write_shift(1,2),S.write_shift(4,0),S.write_shift(1,0),S.write_shift(4,0),S.write_shift(4,0),u+=g[d]||r[m[d]]||0}var k=a.next(264);for(k.write_shift(4,13),d=0;d<65;++d)k.write_shift(4,0);for(d=0;d<c.length;++d){var j=a.next(p);for(j.write_shift(1,0),u=0;u<l.length;++u)if(null!=l[u])switch(m[u]){case"L":j.write_shift(1,null==c[d][u]?63:c[d][u]?84:70);break;case"B":j.write_shift(8,c[d][u]||0,"f");break;case"N":var I="0";for("number"==typeof c[d][u]&&(I=c[d][u].toFixed(v[u]||0)),f=0;f<g[u]-I.length;++f)j.write_shift(1,32);j.write_shift(1,I,"sbcs");break;case"D":c[d][u]?(j.write_shift(4,("0000"+c[d][u].getFullYear()).slice(-4),"sbcs"),j.write_shift(2,("00"+(c[d][u].getMonth()+1)).slice(-2),"sbcs"),j.write_shift(2,("00"+c[d][u].getDate()).slice(-2),"sbcs")):j.write_shift(8,"00000000","sbcs");break;case"C":var T=String(null!=c[d][u]?c[d][u]:"").slice(0,g[u]);for(j.write_shift(1,T,"sbcs"),f=0;f<g[u]-T.length;++f)j.write_shift(1,32)}}return a.next(1).write_shift(1,26),a.end()}}}(),sQ=function(){var e={AA:"\xc0",BA:"\xc1",CA:"\xc2",DA:195,HA:"\xc4",JA:197,AE:"\xc8",BE:"\xc9",CE:"\xca",HE:"\xcb",AI:"\xcc",BI:"\xcd",CI:"\xce",HI:"\xcf",AO:"\xd2",BO:"\xd3",CO:"\xd4",DO:213,HO:"\xd6",AU:"\xd9",BU:"\xda",CU:"\xdb",HU:"\xdc",Aa:"\xe0",Ba:"\xe1",Ca:"\xe2",Da:227,Ha:"\xe4",Ja:229,Ae:"\xe8",Be:"\xe9",Ce:"\xea",He:"\xeb",Ai:"\xec",Bi:"\xed",Ci:"\xee",Hi:"\xef",Ao:"\xf2",Bo:"\xf3",Co:"\xf4",Do:245,Ho:"\xf6",Au:"\xf9",Bu:"\xfa",Cu:"\xfb",Hu:"\xfc",KC:"\xc7",Kc:"\xe7",q:"\xe6",z:"\u0153",a:"\xc6",j:"\u0152",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1bN("+BX(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),n=function(t,n){var r=e[n];return"number"==typeof r?Iq(r):r},r=function(e,t,n){var r=t.charCodeAt(0)-32<<4|n.charCodeAt(0)-48;return 59==r?e:Iq(r)};function o(e,o){var a,i=e.split(/[\n\r]+/),l=-1,c=-1,s=0,d=0,u=[],f=[],p=null,h={},m=[],g=[],v=[],b=0;for(+o.codepage>=0&&Cq(+o.codepage);s!==i.length;++s){b=0;var y,x=i[s].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,r).replace(t,n),w=x.replace(/;;/g,"\0").split(";").map((function(e){return e.replace(/\u0000/g,";")})),C=w[0];if(x.length>0)switch(C){case"ID":case"E":case"B":case"O":case"W":break;case"P":"P"==w[1].charAt(0)&&f.push(x.slice(3).replace(/;;/g,";"));break;case"C":var S=!1,E=!1,k=!1,j=!1,I=-1,T=-1;for(d=1;d<w.length;++d)switch(w[d].charAt(0)){case"A":case"G":break;case"X":c=parseInt(w[d].slice(1))-1,E=!0;break;case"Y":for(l=parseInt(w[d].slice(1))-1,E||(c=0),a=u.length;a<=l;++a)u[a]=[];break;case"K":'"'===(y=w[d].slice(1)).charAt(0)?y=y.slice(1,y.length-1):"TRUE"===y?y=!0:"FALSE"===y?y=!1:isNaN(nY(y))?isNaN(oY(y).getDate())||(y=QX(y)):(y=nY(y),null!==p&&kX(p)&&(y=XX(y))),"undefined"!==typeof kq&&"string"==typeof y&&"string"!=(o||{}).type&&(o||{}).codepage&&(y=kq.utils.decode(o.codepage,y)),S=!0;break;case"E":j=!0;var A=tZ(w[d].slice(1),{r:l,c:c});u[l][c]=[u[l][c],A];break;case"S":k=!0,u[l][c]=[u[l][c],"S5S"];break;case"R":I=parseInt(w[d].slice(1))-1;break;case"C":T=parseInt(w[d].slice(1))-1;break;default:if(o&&o.WTF)throw new Error("SYLK bad record "+x)}if(S&&(u[l][c]&&2==u[l][c].length?u[l][c][0]=y:u[l][c]=y,p=null),k){if(j)throw new Error("SYLK shared formula cannot have own formula");var O=I>-1&&u[I][T];if(!O||!O[1])throw new Error("SYLK shared formula cannot find base");u[l][c][1]=oZ(O[1],{r:l-I,c:c-T})}break;case"F":var N=0;for(d=1;d<w.length;++d)switch(w[d].charAt(0)){case"X":c=parseInt(w[d].slice(1))-1,++N;break;case"Y":for(l=parseInt(w[d].slice(1))-1,a=u.length;a<=l;++a)u[a]=[];break;case"M":b=parseInt(w[d].slice(1))/20;break;case"F":case"G":case"S":case"D":case"N":break;case"P":p=f[parseInt(w[d].slice(1))];break;case"W":for(v=w[d].slice(1).split(" "),a=parseInt(v[0],10);a<=parseInt(v[1],10);++a)b=parseInt(v[2],10),g[a-1]=0===b?{hidden:!0}:{wch:b},IQ(g[a-1]);break;case"C":g[c=parseInt(w[d].slice(1))-1]||(g[c]={});break;case"R":m[l=parseInt(w[d].slice(1))-1]||(m[l]={}),b>0?(m[l].hpt=b,m[l].hpx=OQ(b)):0===b&&(m[l].hidden=!0);break;default:if(o&&o.WTF)throw new Error("SYLK bad record "+x)}N<1&&(p=null);break;default:if(o&&o.WTF)throw new Error("SYLK bad record "+x)}}return m.length>0&&(h["!rows"]=m),g.length>0&&(h["!cols"]=g),o&&o.sheetRows&&(u=u.slice(0,o.sheetRows)),[u,h]}function a(e,t){var n=function(e,t){switch(t.type){case"base64":return o(Nq(e),t);case"binary":return o(e,t);case"buffer":return o(Rq&&Buffer.isBuffer(e)?e.toString("binary"):zq(e),t);case"array":return o(ZX(e),t)}throw new Error("Unrecognized type "+t.type)}(e,t),r=n[0],a=n[1],i=M$(r,t);return BX(a).forEach((function(e){i[e]=a[e]})),i}function i(e,t,n,r){var o="C;Y"+(n+1)+";X"+(r+1)+";K";switch(e.t){case"n":o+=e.v||0,e.f&&!e.F&&(o+=";E"+rZ(e.f,{r:n,c:r}));break;case"b":o+=e.v?"TRUE":"FALSE";break;case"e":o+=e.w||e.v;break;case"d":o+='"'+(e.w||e.v)+'"';break;case"s":o+='"'+e.v.replace(/"/g,"").replace(/;/g,";;")+'"'}return o}return e["|"]=254,{to_workbook:function(e,t){return R$(a(e,t),t)},to_sheet:a,from_sheet:function(e,t){var n,r,o=["ID;PWXL;N;E"],a=[],l=A$(e["!ref"]),c=Array.isArray(e),s="\r\n";o.push("P;PGeneral"),o.push("F;P0;DG0G8;M255"),e["!cols"]&&(r=o,e["!cols"].forEach((function(e,t){var n="F;W"+(t+1)+" "+(t+1)+" ";e.hidden?n+="0":("number"!=typeof e.width||e.wpx||(e.wpx=EQ(e.width)),"number"!=typeof e.wpx||e.wch||(e.wch=kQ(e.wpx)),"number"==typeof e.wch&&(n+=Math.round(e.wch)))," "!=n.charAt(n.length-1)&&r.push(n)}))),e["!rows"]&&function(e,t){t.forEach((function(t,n){var r="F;";t.hidden?r+="M0;":t.hpt?r+="M"+20*t.hpt+";":t.hpx&&(r+="M"+20*AQ(t.hpx)+";"),r.length>2&&e.push(r+"R"+(n+1))}))}(o,e["!rows"]),o.push("B;Y"+(l.e.r-l.s.r+1)+";X"+(l.e.c-l.s.c+1)+";D"+[l.s.c,l.s.r,l.e.c,l.e.r].join(" "));for(var d=l.s.r;d<=l.e.r;++d)for(var u=l.s.c;u<=l.e.c;++u){var f=j$({r:d,c:u});(n=c?(e[d]||[])[u]:e[f])&&(null!=n.v||n.f&&!n.F)&&a.push(i(n,0,d,u))}return o.join(s)+s+a.join(s)+s+"E"+s}}}(),dQ=function(){function e(e,t){for(var n=e.split("\n"),r=-1,o=-1,a=0,i=[];a!==n.length;++a)if("BOT"!==n[a].trim()){if(!(r<0)){for(var l=n[a].trim().split(","),c=l[0],s=l[1],d=n[++a]||"";1&(d.match(/["]/g)||[]).length&&a<n.length-1;)d+="\n"+n[++a];switch(d=d.trim(),+c){case-1:if("BOT"===d){i[++r]=[],o=0;continue}if("EOD"!==d)throw new Error("Unrecognized DIF special command "+d);break;case 0:"TRUE"===d?i[r][o]=!0:"FALSE"===d?i[r][o]=!1:isNaN(nY(s))?isNaN(oY(s).getDate())?i[r][o]=s:i[r][o]=QX(s):i[r][o]=nY(s),++o;break;case 1:(d=(d=d.slice(1,d.length-1)).replace(/""/g,'"'))&&d.match(/^=".*"$/)&&(d=d.slice(2,-1)),i[r][o++]=""!==d?d:null}if("EOD"===d)break}}else i[++r]=[],o=0;return t&&t.sheetRows&&(i=i.slice(0,t.sheetRows)),i}function t(t,n){return M$(function(t,n){switch(n.type){case"base64":return e(Nq(t),n);case"binary":return e(t,n);case"buffer":return e(Rq&&Buffer.isBuffer(t)?t.toString("binary"):zq(t),n);case"array":return e(ZX(t),n)}throw new Error("Unrecognized type "+n.type)}(t,n),n)}var n=function(){var e=function(e,t,n,r,o){e.push(t),e.push(n+","+r),e.push('"'+o.replace(/"/g,'""')+'"')},t=function(e,t,n,r){e.push(t+","+n),e.push(1==t?'"'+r.replace(/"/g,'""')+'"':r)};return function(n){var r,o=[],a=A$(n["!ref"]),i=Array.isArray(n);e(o,"TABLE",0,1,"sheetjs"),e(o,"VECTORS",0,a.e.r-a.s.r+1,""),e(o,"TUPLES",0,a.e.c-a.s.c+1,""),e(o,"DATA",0,0,"");for(var l=a.s.r;l<=a.e.r;++l){t(o,-1,0,"BOT");for(var c=a.s.c;c<=a.e.c;++c){var s=j$({r:l,c:c});if(r=i?(n[l]||[])[c]:n[s])switch(r.t){case"n":var d=r.w;d||null==r.v||(d=r.v),null==d?r.f&&!r.F?t(o,1,0,"="+r.f):t(o,1,0,""):t(o,0,d,"V");break;case"b":t(o,0,r.v?1:0,r.v?"TRUE":"FALSE");break;case"s":t(o,1,0,isNaN(r.v)?r.v:'="'+r.v+'"');break;case"d":r.w||(r.w=AX(r.z||Jq[14],UX(QX(r.v)))),t(o,0,r.w,"V");break;default:t(o,1,0,"")}else t(o,1,0,"")}}t(o,-1,0,"EOD");return o.join("\r\n")}}();return{to_workbook:function(e,n){return R$(t(e,n),n)},to_sheet:t,from_sheet:n}}(),uQ=function(){function e(e){return e.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function t(e,t){return M$(function(e,t){for(var n=e.split("\n"),r=-1,o=-1,a=0,i=[];a!==n.length;++a){var l=n[a].trim().split(":");if("cell"===l[0]){var c=k$(l[1]);if(i.length<=c.r)for(r=i.length;r<=c.r;++r)i[r]||(i[r]=[]);switch(r=c.r,o=c.c,l[2]){case"t":i[r][o]=l[3].replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,"\n");break;case"v":i[r][o]=+l[3];break;case"vtf":var s=l[l.length-1];case"vtc":"nl"===l[3]?i[r][o]=!!+l[4]:i[r][o]=+l[4],"vtf"==l[2]&&(i[r][o]=[i[r][o],s])}}}return t&&t.sheetRows&&(i=i.slice(0,t.sheetRows)),i}(e,t),t)}var n=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join("\n"),r=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join("\n")+"\n",o=["# SocialCalc Spreadsheet Control Save","part:sheet"].join("\n"),a="--SocialCalcSpreadsheetControlSave--";function i(t){if(!t||!t["!ref"])return"";for(var n,r=[],o=[],a="",i=I$(t["!ref"]),l=Array.isArray(t),c=i.s.r;c<=i.e.r;++c)for(var s=i.s.c;s<=i.e.c;++s)if(a=j$({r:c,c:s}),(n=l?(t[c]||[])[s]:t[a])&&null!=n.v&&"z"!==n.t){switch(o=["cell",a,"t"],n.t){case"s":case"str":o.push(e(n.v));break;case"n":n.f?(o[2]="vtf",o[3]="n",o[4]=n.v,o[5]=e(n.f)):(o[2]="v",o[3]=n.v);break;case"b":o[2]="vt"+(n.f?"f":"c"),o[3]="nl",o[4]=n.v?"1":"0",o[5]=e(n.f||(n.v?"TRUE":"FALSE"));break;case"d":var d=UX(QX(n.v));o[2]="vtc",o[3]="nd",o[4]=""+d,o[5]=n.w||AX(n.z||Jq[14],d);break;case"e":continue}r.push(o.join(":"))}return r.push("sheet:c:"+(i.e.c-i.s.c+1)+":r:"+(i.e.r-i.s.r+1)+":tvf:1"),r.push("valueformat:1:text-wiki"),r.join("\n")}return{to_workbook:function(e,n){return R$(t(e,n),n)},to_sheet:t,from_sheet:function(e){return[n,r,o,r,i(e),a].join("\n")}}}(),fQ=function(){function e(e,t,n,r,o){o.raw?t[n][r]=e:""===e||("TRUE"===e?t[n][r]=!0:"FALSE"===e?t[n][r]=!1:isNaN(nY(e))?isNaN(oY(e).getDate())?t[n][r]=e:t[n][r]=QX(e):t[n][r]=nY(e))}var t={44:",",9:"\t",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function r(e){for(var r={},o=!1,a=0,i=0;a<e.length;++a)34==(i=e.charCodeAt(a))?o=!o:!o&&i in t&&(r[i]=(r[i]||0)+1);for(a in i=[],r)Object.prototype.hasOwnProperty.call(r,a)&&i.push([r[a],a]);if(!i.length)for(a in r=n)Object.prototype.hasOwnProperty.call(r,a)&&i.push([r[a],a]);return i.sort((function(e,t){return e[0]-t[0]||n[e[1]]-n[t[1]]})),t[i.pop()[1]]||44}function o(e,t){var n=t||{},o="";null!=Tq&&null==n.dense&&(n.dense=Tq);var a=n.dense?[]:{},i={s:{c:0,r:0},e:{c:0,r:0}};"sep="==e.slice(0,4)?13==e.charCodeAt(5)&&10==e.charCodeAt(6)?(o=e.charAt(4),e=e.slice(7)):13==e.charCodeAt(5)||10==e.charCodeAt(5)?(o=e.charAt(4),e=e.slice(6)):o=r(e.slice(0,1024)):o=n&&n.FS?n.FS:r(e.slice(0,1024));var l=0,c=0,s=0,d=0,u=0,f=o.charCodeAt(0),p=!1,h=0,m=e.charCodeAt(0);e=e.replace(/\r\n/gm,"\n");var g=null!=n.dateNF?function(e){var t="number"==typeof e?Jq[e]:e;return t=t.replace(PX,"(\\d+)"),new RegExp("^"+t+"$")}(n.dateNF):null;function v(){var t=e.slice(d,u),r={};if('"'==t.charAt(0)&&'"'==t.charAt(t.length-1)&&(t=t.slice(1,-1).replace(/""/g,'"')),0===t.length)r.t="z";else if(n.raw)r.t="s",r.v=t;else if(0===t.trim().length)r.t="s",r.v=t;else if(61==t.charCodeAt(0))34==t.charCodeAt(1)&&34==t.charCodeAt(t.length-1)?(r.t="s",r.v=t.slice(2,-1).replace(/""/g,'"')):1!=t.length?(r.t="n",r.f=t.slice(1)):(r.t="s",r.v=t);else if("TRUE"==t)r.t="b",r.v=!0;else if("FALSE"==t)r.t="b",r.v=!1;else if(isNaN(s=nY(t)))if(!isNaN(oY(t).getDate())||g&&t.match(g)){r.z=n.dateNF||Jq[14];var o=0;g&&t.match(g)&&(t=function(e,t,n){var r=-1,o=-1,a=-1,i=-1,l=-1,c=-1;(t.match(PX)||[]).forEach((function(e,t){var s=parseInt(n[t+1],10);switch(e.toLowerCase().charAt(0)){case"y":r=s;break;case"d":a=s;break;case"h":i=s;break;case"s":c=s;break;case"m":i>=0?l=s:o=s}})),c>=0&&-1==l&&o>=0&&(l=o,o=-1);var s=(""+(r>=0?r:(new Date).getFullYear())).slice(-4)+"-"+("00"+(o>=1?o:1)).slice(-2)+"-"+("00"+(a>=1?a:1)).slice(-2);7==s.length&&(s="0"+s),8==s.length&&(s="20"+s);var d=("00"+(i>=0?i:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return-1==i&&-1==l&&-1==c?s:-1==r&&-1==o&&-1==a?d:s+"T"+d}(0,n.dateNF,t.match(g)||[]),o=1),n.cellDates?(r.t="d",r.v=QX(t,o)):(r.t="n",r.v=UX(QX(t,o))),!1!==n.cellText&&(r.w=AX(r.z,r.v instanceof Date?UX(r.v):r.v)),n.cellNF||delete r.z}else r.t="s",r.v=t;else r.t="n",!1!==n.cellText&&(r.w=t),r.v=s;if("z"==r.t||(n.dense?(a[l]||(a[l]=[]),a[l][c]=r):a[j$({c:c,r:l})]=r),d=u+1,m=e.charCodeAt(d),i.e.c<c&&(i.e.c=c),i.e.r<l&&(i.e.r=l),h==f)++c;else if(c=0,++l,n.sheetRows&&n.sheetRows<=l)return!0}e:for(;u<e.length;++u)switch(h=e.charCodeAt(u)){case 34:34===m&&(p=!p);break;case f:case 10:case 13:if(!p&&v())break e}return u-d>0&&v(),a["!ref"]=T$(i),a}function a(t,n){return n&&n.PRN?n.FS||"sep="==t.slice(0,4)||t.indexOf("\t")>=0||t.indexOf(",")>=0||t.indexOf(";")>=0?o(t,n):M$(function(t,n){var r=n||{},o=[];if(!t||0===t.length)return o;for(var a=t.split(/[\r\n]/),i=a.length-1;i>=0&&0===a[i].length;)--i;for(var l=10,c=0,s=0;s<=i;++s)-1==(c=a[s].indexOf(" "))?c=a[s].length:c++,l=Math.max(l,c);for(s=0;s<=i;++s){o[s]=[];var d=0;for(e(a[s].slice(0,l).trim(),o,s,d,r),d=1;d<=(a[s].length-l)/10+1;++d)e(a[s].slice(l+10*(d-1),l+10*d).trim(),o,s,d,r)}return r.sheetRows&&(o=o.slice(0,r.sheetRows)),o}(t,n),n):o(t,n)}function i(e,t){var n="",r="string"==t.type?[0,0,0,0]:b1(e,t);switch(t.type){case"base64":n=Nq(e);break;case"binary":case"string":n=e;break;case"buffer":n=65001==t.codepage?e.toString("utf8"):t.codepage&&"undefined"!==typeof kq?kq.utils.decode(t.codepage,e):Rq&&Buffer.isBuffer(e)?e.toString("binary"):zq(e);break;case"array":n=ZX(e);break;default:throw new Error("Unrecognized type "+t.type)}return 239==r[0]&&187==r[1]&&191==r[2]?n=wY(n.slice(3)):"string"!=t.type&&"buffer"!=t.type&&65001==t.codepage?n=wY(n):"binary"==t.type&&"undefined"!==typeof kq&&t.codepage&&(n=kq.utils.decode(t.codepage,kq.utils.encode(28591,n))),"socialcalc:version:"==n.slice(0,19)?uQ.to_sheet("string"==t.type?n:wY(n),t):a(n,t)}return{to_workbook:function(e,t){return R$(i(e,t),t)},to_sheet:i,from_sheet:function(e){for(var t,n=[],r=A$(e["!ref"]),o=Array.isArray(e),a=r.s.r;a<=r.e.r;++a){for(var i=[],l=r.s.c;l<=r.e.c;++l){var c=j$({r:a,c:l});if((t=o?(e[a]||[])[l]:e[c])&&null!=t.v){for(var s=(t.w||(N$(t),t.w)||"").slice(0,10);s.length<10;)s+=" ";i.push(s+(0===l?" ":""))}else i.push("          ")}n.push(i.join(""))}return n.join("\n")}}}();var pQ=function(){function e(e,t,n){if(e){f$(e,e.l||0);for(var r=n.Enum||v;e.l<e.length;){var o=e.read_shift(2),a=r[o]||r[65535],i=e.read_shift(2),l=e.l+i,c=a.f&&a.f(e,i,n);if(e.l=l,t(c,a,o))return}}}function t(t,n){if(!t)return t;var r=n||{};null!=Tq&&null==r.dense&&(r.dense=Tq);var o=r.dense?[]:{},a="Sheet1",i="",l=0,c={},s=[],d=[],u={s:{r:0,c:0},e:{r:0,c:0}},f=r.sheetRows||0;if(0==t[2]&&(8==t[3]||9==t[3])&&t.length>=16&&5==t[14]&&108===t[15])throw new Error("Unsupported Works 3 for Mac file");if(2==t[2])r.Enum=v,e(t,(function(e,t,n){switch(n){case 0:r.vers=e,e>=4096&&(r.qpro=!0);break;case 6:u=e;break;case 204:e&&(i=e);break;case 222:i=e;break;case 15:case 51:r.qpro||(e[1].v=e[1].v.slice(1));case 13:case 14:case 16:14==n&&112==(112&e[2])&&(15&e[2])>1&&(15&e[2])<15&&(e[1].z=r.dateNF||Jq[14],r.cellDates&&(e[1].t="d",e[1].v=XX(e[1].v))),r.qpro&&e[3]>l&&(o["!ref"]=T$(u),c[a]=o,s.push(a),o=r.dense?[]:{},u={s:{r:0,c:0},e:{r:0,c:0}},l=e[3],a=i||"Sheet"+(l+1),i="");var d=r.dense?(o[e[0].r]||[])[e[0].c]:o[j$(e[0])];if(d){d.t=e[1].t,d.v=e[1].v,null!=e[1].z&&(d.z=e[1].z),null!=e[1].f&&(d.f=e[1].f);break}r.dense?(o[e[0].r]||(o[e[0].r]=[]),o[e[0].r][e[0].c]=e[1]):o[j$(e[0])]=e[1]}}),r);else{if(26!=t[2]&&14!=t[2])throw new Error("Unrecognized LOTUS BOF "+t[2]);r.Enum=b,14==t[2]&&(r.qpro=!0,t.l=0),e(t,(function(e,t,n){switch(n){case 204:a=e;break;case 22:e[1].v=e[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(e[3]>l&&(o["!ref"]=T$(u),c[a]=o,s.push(a),o=r.dense?[]:{},u={s:{r:0,c:0},e:{r:0,c:0}},l=e[3],a="Sheet"+(l+1)),f>0&&e[0].r>=f)break;r.dense?(o[e[0].r]||(o[e[0].r]=[]),o[e[0].r][e[0].c]=e[1]):o[j$(e[0])]=e[1],u.e.c<e[0].c&&(u.e.c=e[0].c),u.e.r<e[0].r&&(u.e.r=e[0].r);break;case 27:e[14e3]&&(d[e[14e3][0]]=e[14e3][1]);break;case 1537:d[e[0]]=e[1],e[0]==l&&(a=e[1])}}),r)}if(o["!ref"]=T$(u),c[i||a]=o,s.push(i||a),!d.length)return{SheetNames:s,Sheets:c};for(var p={},h=[],m=0;m<d.length;++m)c[s[m]]?(h.push(d[m]||s[m]),p[d[m]]=c[d[m]]||c[s[m]]):(h.push(d[m]),p[d[m]]={"!ref":"A1"});return{SheetNames:h,Sheets:p}}function n(e,t,n){var r=[{c:0,r:0},{t:"n",v:0},0,0];return n.qpro&&20768!=n.vers?(r[0].c=e.read_shift(1),r[3]=e.read_shift(1),r[0].r=e.read_shift(2),e.l+=2):(r[2]=e.read_shift(1),r[0].c=e.read_shift(2),r[0].r=e.read_shift(2)),r}function r(e,t,r){var o=e.l+t,a=n(e,0,r);if(a[1].t="s",20768==r.vers){e.l++;var i=e.read_shift(1);return a[1].v=e.read_shift(i,"utf8"),a}return r.qpro&&e.l++,a[1].v=e.read_shift(o-e.l,"cstr"),a}function o(e,t,n){var r=h$(7+n.length);r.write_shift(1,255),r.write_shift(2,t),r.write_shift(2,e),r.write_shift(1,39);for(var o=0;o<r.length;++o){var a=n.charCodeAt(o);r.write_shift(1,a>=128?95:a)}return r.write_shift(1,0),r}function a(e,t,n){var r=h$(7);return r.write_shift(1,255),r.write_shift(2,t),r.write_shift(2,e),r.write_shift(2,n,"i"),r}function i(e,t,n){var r=h$(13);return r.write_shift(1,255),r.write_shift(2,t),r.write_shift(2,e),r.write_shift(8,n,"f"),r}function l(e,t,n){var r=32768&t;return t=(r?e:0)+((t&=-32769)>=8192?t-16384:t),(r?"":"$")+(n?E$(t):C$(t))}var c={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},s=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function d(e){var t=[{c:0,r:0},{t:"n",v:0},0];return t[0].r=e.read_shift(2),t[3]=e[e.l++],t[0].c=e[e.l++],t}function u(e,t,n,r){var o=h$(6+r.length);o.write_shift(2,e),o.write_shift(1,n),o.write_shift(1,t),o.write_shift(1,39);for(var a=0;a<r.length;++a){var i=r.charCodeAt(a);o.write_shift(1,i>=128?95:i)}return o.write_shift(1,0),o}function f(e,t){var n=d(e),r=e.read_shift(4),o=e.read_shift(4),a=e.read_shift(2);if(65535==a)return 0===r&&3221225472===o?(n[1].t="e",n[1].v=15):0===r&&3489660928===o?(n[1].t="e",n[1].v=42):n[1].v=0,n;var i=32768&a;return a=(32767&a)-16446,n[1].v=(1-2*i)*(o*Math.pow(2,a+32)+r*Math.pow(2,a)),n}function p(e,t,n,r){var o=h$(14);if(o.write_shift(2,e),o.write_shift(1,n),o.write_shift(1,t),0==r)return o.write_shift(4,0),o.write_shift(4,0),o.write_shift(2,65535),o;var a,i=0,l=0,c=0;return r<0&&(i=1,r=-r),l=0|Math.log2(r),0==(2147483648&(c=(r/=Math.pow(2,l-31))>>>0))&&(++l,c=(r/=2)>>>0),r-=c,c|=2147483648,c>>>=0,a=(r*=Math.pow(2,32))>>>0,o.write_shift(4,a),o.write_shift(4,c),l+=16383+(i?32768:0),o.write_shift(2,l),o}function h(e,t){var n=d(e),r=e.read_shift(8,"f");return n[1].v=r,n}function m(e,t){return 0==e[e.l+t-1]?e.read_shift(t,"cstr"):""}function g(e,t){var n=h$(5+e.length);n.write_shift(2,14e3),n.write_shift(2,t);for(var r=0;r<e.length;++r){var o=e.charCodeAt(r);n[n.l++]=o>127?95:o}return n[n.l++]=0,n}var v={0:{n:"BOF",f:BJ},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function(e,t,n){var r={s:{c:0,r:0},e:{c:0,r:0}};return 8==t&&n.qpro?(r.s.c=e.read_shift(1),e.l++,r.s.r=e.read_shift(2),r.e.c=e.read_shift(1),e.l++,r.e.r=e.read_shift(2),r):(r.s.c=e.read_shift(2),r.s.r=e.read_shift(2),12==t&&n.qpro&&(e.l+=2),r.e.c=e.read_shift(2),r.e.r=e.read_shift(2),12==t&&n.qpro&&(e.l+=2),65535==r.s.c&&(r.s.c=r.e.c=r.s.r=r.e.r=0),r)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function(e,t,r){var o=n(e,0,r);return o[1].v=e.read_shift(2,"i"),o}},14:{n:"NUMBER",f:function(e,t,r){var o=n(e,0,r);return o[1].v=e.read_shift(8,"f"),o}},15:{n:"LABEL",f:r},16:{n:"FORMULA",f:function(e,t,r){var o=e.l+t,a=n(e,0,r);if(a[1].v=e.read_shift(8,"f"),r.qpro)e.l=o;else{var i=e.read_shift(2);!function(e,t){f$(e,0);var n=[],r=0,o="",a="",i="",d="";for(;e.l<e.length;){var u=e[e.l++];switch(u){case 0:n.push(e.read_shift(8,"f"));break;case 1:a=l(t[0].c,e.read_shift(2),!0),o=l(t[0].r,e.read_shift(2),!1),n.push(a+o);break;case 2:var f=l(t[0].c,e.read_shift(2),!0),p=l(t[0].r,e.read_shift(2),!1);a=l(t[0].c,e.read_shift(2),!0),o=l(t[0].r,e.read_shift(2),!1),n.push(f+p+":"+a+o);break;case 3:if(e.l<e.length)return void console.error("WK1 premature formula end");break;case 4:n.push("("+n.pop()+")");break;case 5:n.push(e.read_shift(2));break;case 6:for(var h="";u=e[e.l++];)h+=String.fromCharCode(u);n.push('"'+h.replace(/"/g,'""')+'"');break;case 8:n.push("-"+n.pop());break;case 23:n.push("+"+n.pop());break;case 22:n.push("NOT("+n.pop()+")");break;case 20:case 21:d=n.pop(),i=n.pop(),n.push(["AND","OR"][u-20]+"("+i+","+d+")");break;default:if(u<32&&s[u])d=n.pop(),i=n.pop(),n.push(i+s[u]+d);else{if(!c[u])return u<=7?console.error("WK1 invalid opcode "+u.toString(16)):u<=24?console.error("WK1 unsupported op "+u.toString(16)):u<=30?console.error("WK1 invalid opcode "+u.toString(16)):u<=115?console.error("WK1 unsupported function opcode "+u.toString(16)):console.error("WK1 unrecognized opcode "+u.toString(16));if(69==(r=c[u][1])&&(r=e[e.l++]),r>n.length)return void console.error("WK1 bad formula parse 0x"+u.toString(16)+":|"+n.join("|")+"|");var m=n.slice(-r);n.length-=r,n.push(c[u][0]+"("+m.join(",")+")")}}}1==n.length?t[1].f=""+n[0]:console.error("WK1 bad formula parse |"+n.join("|")+"|")}(e.slice(e.l,e.l+i),a),e.l+=i}return a}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:r},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:m},222:{n:"SHEETNAMELP",f:function(e,t){var n=e[e.l++];n>t-1&&(n=t-1);for(var r="";r.length<n;)r+=String.fromCharCode(e[e.l++]);return r}},65535:{n:""}},b={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:function(e,t){var n=d(e);return n[1].t="s",n[1].v=e.read_shift(t-4,"cstr"),n}},23:{n:"NUMBER17",f:f},24:{n:"NUMBER18",f:function(e,t){var n=d(e);n[1].v=e.read_shift(2);var r=n[1].v>>1;if(1&n[1].v)switch(7&r){case 0:r=5e3*(r>>3);break;case 1:r=500*(r>>3);break;case 2:r=(r>>3)/20;break;case 3:r=(r>>3)/200;break;case 4:r=(r>>3)/2e3;break;case 5:r=(r>>3)/2e4;break;case 6:r=(r>>3)/16;break;case 7:r=(r>>3)/64}return n[1].v=r,n}},25:{n:"FORMULA19",f:function(e,t){var n=f(e);return e.l+=t-14,n}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function(e,t){for(var n={},r=e.l+t;e.l<r;){var o=e.read_shift(2);if(14e3==o){for(n[o]=[0,""],n[o][0]=e.read_shift(2);e[e.l];)n[o][1]+=String.fromCharCode(e[e.l]),e.l++;e.l++}}return n}},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:function(e,t){var n=d(e),r=e.read_shift(4);return n[1].v=r>>6,n}},38:{n:"??"},39:{n:"NUMBER27",f:h},40:{n:"FORMULA28",f:function(e,t){var n=h(e);return e.l+=t-10,n}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:m},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function(e,t,n){if(n.qpro&&!(t<21)){var r=e.read_shift(1);return e.l+=17,e.l+=1,e.l+=2,[r,e.read_shift(t-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:function(e,t){var n=t||{};if(+n.codepage>=0&&Cq(+n.codepage),"string"==n.type)throw new Error("Cannot write WK1 to JS string");var r=m$(),l=A$(e["!ref"]),c=Array.isArray(e),s=[];O0(r,0,function(e){var t=h$(2);return t.write_shift(2,e),t}(1030)),O0(r,6,function(e){var t=h$(8);return t.write_shift(2,e.s.c),t.write_shift(2,e.s.r),t.write_shift(2,e.e.c),t.write_shift(2,e.e.r),t}(l));for(var d=Math.min(l.e.r,8191),u=l.s.r;u<=d;++u)for(var f=C$(u),p=l.s.c;p<=l.e.c;++p){u===l.s.r&&(s[p]=E$(p));var h=s[p]+f,m=c?(e[u]||[])[p]:e[h];if(m&&"z"!=m.t)if("n"==m.t)(0|m.v)==m.v&&m.v>=-32768&&m.v<=32767?O0(r,13,a(u,p,m.v)):O0(r,14,i(u,p,m.v));else O0(r,15,o(u,p,N$(m).slice(0,239)))}return O0(r,1),r.end()},book_to_wk3:function(e,t){var n=t||{};if(+n.codepage>=0&&Cq(+n.codepage),"string"==n.type)throw new Error("Cannot write WK3 to JS string");var r=m$();O0(r,0,function(e){var t=h$(26);t.write_shift(2,4096),t.write_shift(2,4),t.write_shift(4,0);for(var n=0,r=0,o=0,a=0;a<e.SheetNames.length;++a){var i=e.SheetNames[a],l=e.Sheets[i];if(l&&l["!ref"]){++o;var c=I$(l["!ref"]);n<c.e.r&&(n=c.e.r),r<c.e.c&&(r=c.e.c)}}n>8191&&(n=8191);return t.write_shift(2,n),t.write_shift(1,o),t.write_shift(1,r),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(1,1),t.write_shift(1,2),t.write_shift(4,0),t.write_shift(4,0),t}(e));for(var o=0,a=0;o<e.SheetNames.length;++o)(e.Sheets[e.SheetNames[o]]||{})["!ref"]&&O0(r,27,g(e.SheetNames[o],a++));var i=0;for(o=0;o<e.SheetNames.length;++o){var l=e.Sheets[e.SheetNames[o]];if(l&&l["!ref"]){for(var c=A$(l["!ref"]),s=Array.isArray(l),d=[],f=Math.min(c.e.r,8191),h=c.s.r;h<=f;++h)for(var m=C$(h),v=c.s.c;v<=c.e.c;++v){h===c.s.r&&(d[v]=E$(v));var b=d[v]+m,y=s?(l[h]||[])[v]:l[b];if(y&&"z"!=y.t)if("n"==y.t)O0(r,23,p(h,v,i,y.v));else O0(r,22,u(h,v,i,N$(y).slice(0,239)))}++i}}return O0(r,1),r.end()},to_workbook:function(e,n){switch(n.type){case"base64":return t(Lq(Nq(e)),n);case"binary":return t(Lq(e),n);case"buffer":case"array":return t(e,n)}throw"Unsupported type "+n.type}}}();var hQ=/^\s|\s$|[\t\n\r]/;function mQ(e,t){if(!t.bookSST)return"";var n=[lY];n[n.length]=IY("sst",null,{xmlns:OY[0],count:e.Count,uniqueCount:e.Unique});for(var r=0;r!=e.length;++r)if(null!=e[r]){var o=e[r],a="<si>";o.r?a+=o.r:(a+="<t",o.t||(o.t=""),o.t.match(hQ)&&(a+=' xml:space="preserve"'),a+=">"+fY(o.t)+"</t>"),a+="</si>",n[n.length]=a}return n.length>2&&(n[n.length]="</sst>",n[1]=n[1].replace("/>",">")),n.join("")}var gQ=function(e,t){var n=!1;return null==t&&(n=!0,t=h$(15+4*e.t.length)),t.write_shift(1,0),_$(e.t,t),n?t.slice(0,t.l):t};function vQ(e){var t=m$();g$(t,159,function(e,t){return t||(t=h$(8)),t.write_shift(4,e.Count),t.write_shift(4,e.Unique),t}(e));for(var n=0;n<e.length;++n)g$(t,19,gQ(e[n]));return g$(t,160),t.end()}function bQ(e){if("undefined"!==typeof kq)return kq.utils.encode(bq,e);for(var t=[],n=e.split(""),r=0;r<n.length;++r)t[r]=n[r].charCodeAt(0);return t}function yQ(e){var t,n,r=0,o=bQ(e),a=o.length+1;for((t=Mq(a))[0]=o.length,n=1;n!=a;++n)t[n]=o[n-1];for(n=a-1;n>=0;--n)r=((0===(16384&r)?0:1)|r<<1&32767)^t[n];return 52811^r}var xQ=function(){function e(e,n){switch(n.type){case"base64":return t(Nq(e),n);case"binary":return t(e,n);case"buffer":return t(Rq&&Buffer.isBuffer(e)?e.toString("binary"):zq(e),n);case"array":return t(ZX(e),n)}throw new Error("Unrecognized type "+n.type)}function t(e,t){var n=(t||{}).dense?[]:{},r=e.match(/\\trowd.*?\\row\b/g);if(!r.length)throw new Error("RTF missing table");var o={s:{c:0,r:0},e:{c:0,r:r.length-1}};return r.forEach((function(e,t){Array.isArray(n)&&(n[t]=[]);for(var r,a=/\\\w+\b/g,i=0,l=-1;r=a.exec(e);){if("\\cell"===r[0]){var c=e.slice(i,a.lastIndex-r[0].length);if(" "==c[0]&&(c=c.slice(1)),++l,c.length){var s={v:c,t:"s"};Array.isArray(n)?n[t][l]=s:n[j$({r:t,c:l})]=s}}i=a.lastIndex}l>o.e.c&&(o.e.c=l)})),n["!ref"]=T$(o),n}return{to_workbook:function(t,n){return R$(e(t,n),n)},to_sheet:e,from_sheet:function(e){for(var t,n=["{\\rtf1\\ansi"],r=A$(e["!ref"]),o=Array.isArray(e),a=r.s.r;a<=r.e.r;++a){n.push("\\trowd\\trautofit1");for(var i=r.s.c;i<=r.e.c;++i)n.push("\\cellx"+(i+1));for(n.push("\\pard\\intbl"),i=r.s.c;i<=r.e.c;++i){var l=j$({r:a,c:i});(t=o?(e[a]||[])[i]:e[l])&&(null!=t.v||t.f&&!t.F)&&(n.push(" "+(t.w||(N$(t),t.w))),n.push("\\cell"))}n.push("\\pard\\intbl\\row")}return n.join("")+"}"}}}();function wQ(e){for(var t=0,n=1;3!=t;++t)n=256*n+(e[t]>255?255:e[t]<0?0:e[t]);return n.toString(16).toUpperCase().slice(1)}var CQ=6,SQ=CQ;function EQ(e){return Math.floor((e+Math.round(128/SQ)/256)*SQ)}function kQ(e){return Math.floor((e-5)/SQ*100+.5)/100}function jQ(e){return Math.round((e*SQ+5)/SQ*256)/256}function IQ(e){e.width?(e.wpx=EQ(e.width),e.wch=kQ(e.wpx),e.MDW=SQ):e.wpx?(e.wch=kQ(e.wpx),e.width=jQ(e.wch),e.MDW=SQ):"number"==typeof e.wch&&(e.width=jQ(e.wch),e.wpx=EQ(e.width),e.MDW=SQ),e.customWidth&&delete e.customWidth}var TQ=96;function AQ(e){return 96*e/TQ}function OQ(e){return e*TQ/96}function NQ(e,t){var n,r=[lY,IY("styleSheet",null,{xmlns:OY[0],"xmlns:vt":AY.vt})];return e.SSF&&null!=(n=function(e){var t=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach((function(n){for(var r=n[0];r<=n[1];++r)null!=e[r]&&(t[t.length]=IY("numFmt",null,{numFmtId:r,formatCode:fY(e[r])}))})),1===t.length?"":(t[t.length]="</numFmts>",t[0]=IY("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(e.SSF))&&(r[r.length]=n),r[r.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',r[r.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',r[r.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',r[r.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(n=function(e){var t=[];return t[t.length]=IY("cellXfs",null),e.forEach((function(e){t[t.length]=IY("xf",null,e)})),t[t.length]="</cellXfs>",2===t.length?"":(t[0]=IY("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(t.cellXfs))&&(r[r.length]=n),r[r.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',r[r.length]='<dxfs count="0"/>',r[r.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',r.length>2&&(r[r.length]="</styleSheet>",r[1]=r[1].replace("/>",">")),r.join("")}function RQ(e,t,n){n||(n=h$(6+4*t.length)),n.write_shift(2,e),_$(t,n);var r=n.length>n.l?n.slice(0,n.l):n;return null==n.l&&(n.l=n.length),r}function PQ(e,t){t||(t=h$(153)),t.write_shift(2,20*e.sz),function(e,t){t||(t=h$(2));var n=(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0);t.write_shift(1,n),t.write_shift(1,0)}(e,t),t.write_shift(2,e.bold?700:400);var n=0;"superscript"==e.vertAlign?n=1:"subscript"==e.vertAlign&&(n=2),t.write_shift(2,n),t.write_shift(1,e.underline||0),t.write_shift(1,e.family||0),t.write_shift(1,e.charset||0),t.write_shift(1,0),iJ(e.color,t);var r=0;return"major"==e.scheme&&(r=1),"minor"==e.scheme&&(r=2),t.write_shift(1,r),_$(e.name,t),t.length>t.l?t.slice(0,t.l):t}var MQ,DQ=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],LQ=p$;function _Q(e,t){t||(t=h$(84)),MQ||(MQ=HX(DQ));var n=MQ[e.patternType];null==n&&(n=40),t.write_shift(4,n);var r=0;if(40!=n)for(iJ({auto:1},t),iJ({auto:1},t);r<12;++r)t.write_shift(4,0);else{for(;r<4;++r)t.write_shift(4,0);for(;r<12;++r)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function zQ(e,t,n){n||(n=h$(16)),n.write_shift(2,t||0),n.write_shift(2,e.numFmtId||0),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(1,0),n.write_shift(1,0);return n.write_shift(1,0),n.write_shift(1,0),n.write_shift(1,0),n.write_shift(1,0),n}function BQ(e,t){return t||(t=h$(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var FQ=p$;function HQ(e){g$(e,613,D$(1)),g$(e,46,function(e,t){return t||(t=h$(51)),t.write_shift(1,0),BQ(0,t),BQ(0,t),BQ(0,t),BQ(0,t),BQ(0,t),t.length>t.l?t.slice(0,t.l):t}()),g$(e,614)}function WQ(e){g$(e,619,D$(1)),g$(e,48,function(e,t){return t||(t=h$(52)),t.write_shift(4,e.xfId),t.write_shift(2,1),t.write_shift(1,+e.builtinId),t.write_shift(1,0),Y$(e.name||"",t),t.length>t.l?t.slice(0,t.l):t}({xfId:0,builtinId:0,name:"Normal"})),g$(e,620)}function VQ(e){g$(e,508,function(e,t,n){var r=h$(2052);return r.write_shift(4,e),Y$(t,r),Y$(n,r),r.length>r.l?r.slice(0,r.l):r}(0,"TableStyleMedium9","PivotStyleMedium4")),g$(e,509)}function UQ(e,t){var n=m$();return g$(n,278),function(e,t){if(t){var n=0;[[5,8],[23,26],[41,44],[50,392]].forEach((function(e){for(var r=e[0];r<=e[1];++r)null!=t[r]&&++n})),0!=n&&(g$(e,615,D$(n)),[[5,8],[23,26],[41,44],[50,392]].forEach((function(n){for(var r=n[0];r<=n[1];++r)null!=t[r]&&g$(e,44,RQ(r,t[r]))})),g$(e,616))}}(n,e.SSF),function(e){g$(e,611,D$(1)),g$(e,43,PQ({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),g$(e,612)}(n),function(e){g$(e,603,D$(2)),g$(e,45,_Q({patternType:"none"})),g$(e,45,_Q({patternType:"gray125"})),g$(e,604)}(n),HQ(n),function(e){g$(e,626,D$(1)),g$(e,47,zQ({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),g$(e,627)}(n),function(e,t){g$(e,617,D$(t.length)),t.forEach((function(t){g$(e,47,zQ(t,0))})),g$(e,618)}(n,t.cellXfs),WQ(n),function(e){g$(e,505,D$(0)),g$(e,506)}(n),VQ(n),g$(n,279),n.end()}function KQ(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&"string"==typeof e.raw)return e.raw;var n=[lY];return n[n.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',n[n.length]="<a:themeElements>",n[n.length]='<a:clrScheme name="Office">',n[n.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',n[n.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',n[n.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',n[n.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',n[n.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',n[n.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',n[n.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',n[n.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',n[n.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',n[n.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',n[n.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',n[n.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',n[n.length]="</a:clrScheme>",n[n.length]='<a:fontScheme name="Office">',n[n.length]="<a:majorFont>",n[n.length]='<a:latin typeface="Cambria"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af"/>',n[n.length]='<a:font script="Hang" typeface="\ub9d1\uc740 \uace0\ub515"/>',n[n.length]='<a:font script="Hans" typeface="\u5b8b\u4f53"/>',n[n.length]='<a:font script="Hant" typeface="\u65b0\u7d30\u660e\u9ad4"/>',n[n.length]='<a:font script="Arab" typeface="Times New Roman"/>',n[n.length]='<a:font script="Hebr" typeface="Times New Roman"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="MoolBoran"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Times New Roman"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:majorFont>",n[n.length]="<a:minorFont>",n[n.length]='<a:latin typeface="Calibri"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af"/>',n[n.length]='<a:font script="Hang" typeface="\ub9d1\uc740 \uace0\ub515"/>',n[n.length]='<a:font script="Hans" typeface="\u5b8b\u4f53"/>',n[n.length]='<a:font script="Hant" typeface="\u65b0\u7d30\u660e\u9ad4"/>',n[n.length]='<a:font script="Arab" typeface="Arial"/>',n[n.length]='<a:font script="Hebr" typeface="Arial"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="DaunPenh"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Arial"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:minorFont>",n[n.length]="</a:fontScheme>",n[n.length]='<a:fmtScheme name="Office">',n[n.length]="<a:fillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:lin ang="16200000" scaled="1"/>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:lin ang="16200000" scaled="0"/>',n[n.length]="</a:gradFill>",n[n.length]="</a:fillStyleLst>",n[n.length]="<a:lnStyleLst>",n[n.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]="</a:lnStyleLst>",n[n.length]="<a:effectStyleLst>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',n[n.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',n[n.length]="</a:effectStyle>",n[n.length]="</a:effectStyleLst>",n[n.length]="<a:bgFillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]="</a:bgFillStyleLst>",n[n.length]="</a:fmtScheme>",n[n.length]="</a:themeElements>",n[n.length]="<a:objectDefaults>",n[n.length]="<a:spDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',n[n.length]="</a:spDef>",n[n.length]="<a:lnDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',n[n.length]="</a:lnDef>",n[n.length]="</a:objectDefaults>",n[n.length]="<a:extraClrSchemeLst/>",n[n.length]="</a:theme>",n.join("")}function GQ(){var e=m$();return g$(e,332),g$(e,334,D$(1)),g$(e,335,function(e){var t=h$(12+2*e.name.length);return t.write_shift(4,e.flags),t.write_shift(4,e.version),_$(e.name,t),t.slice(0,t.l)}({name:"XLDAPR",version:12e4,flags:3496657072})),g$(e,336),g$(e,339,function(e,t){var n=h$(8+2*t.length);return n.write_shift(4,e),_$(t,n),n.slice(0,n.l)}(1,"XLDAPR")),g$(e,52),g$(e,35,D$(514)),g$(e,4096,D$(0)),g$(e,4097,FJ(1)),g$(e,36),g$(e,53),g$(e,340),g$(e,337,function(e,t){var n=h$(8);return n.write_shift(4,e),n.write_shift(4,t?1:0),n}(1,!0)),g$(e,51,function(e){var t=h$(4+8*e.length);t.write_shift(4,e.length);for(var n=0;n<e.length;++n)t.write_shift(4,e[n][0]),t.write_shift(4,e[n][1]);return t}([[1,0]])),g$(e,338),g$(e,333),e.end()}function qQ(){var e=[lY];return e.push('<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">\n  <metadataTypes count="1">\n    <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>\n  </metadataTypes>\n  <futureMetadata name="XLDAPR" count="1">\n    <bk>\n      <extLst>\n        <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">\n          <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>\n        </ext>\n      </extLst>\n    </bk>\n  </futureMetadata>\n  <cellMetadata count="1">\n    <bk>\n      <rc t="1" v="0"/>\n    </bk>\n  </cellMetadata>\n</metadata>'),e.join("")}var XQ=1024;function YQ(e,t){for(var n=[21600,21600],r=["m0,0l0",n[1],n[0],n[1],n[0],"0xe"].join(","),o=[IY("xml",null,{"xmlns:v":NY.v,"xmlns:o":NY.o,"xmlns:x":NY.x,"xmlns:mv":NY.mv}).replace(/\/>/,">"),IY("o:shapelayout",IY("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),IY("v:shapetype",[IY("v:stroke",null,{joinstyle:"miter"}),IY("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:n.join(","),path:r})];XQ<1e3*e;)XQ+=1e3;return t.forEach((function(e){var t=k$(e[0]),n={color2:"#BEFF82",type:"gradient"};"gradient"==n.type&&(n.angle="-180");var r="gradient"==n.type?IY("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,a=IY("v:fill",r,n);++XQ,o=o.concat(["<v:shape"+jY({id:"_x0000_s"+XQ,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(e[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",a,IY("v:shadow",null,{on:"t",obscured:"t"}),IY("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",kY("x:Anchor",[t.c+1,0,t.r+1,0,t.c+3,20,t.r+5,20].join(",")),kY("x:AutoFill","False"),kY("x:Row",String(t.r)),kY("x:Column",String(t.c)),e[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])})),o.push("</xml>"),o.join("")}function $Q(e){var t=[lY,IY("comments",null,{xmlns:OY[0]})],n=[];return t.push("<authors>"),e.forEach((function(e){e[1].forEach((function(e){var r=fY(e.a);-1==n.indexOf(r)&&(n.push(r),t.push("<author>"+r+"</author>")),e.T&&e.ID&&-1==n.indexOf("tc="+e.ID)&&(n.push("tc="+e.ID),t.push("<author>tc="+e.ID+"</author>"))}))})),0==n.length&&(n.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach((function(e){var r=0,o=[];if(e[1][0]&&e[1][0].T&&e[1][0].ID?r=n.indexOf("tc="+e[1][0].ID):e[1].forEach((function(e){e.a&&(r=n.indexOf(fY(e.a))),o.push(e.t||"")})),t.push('<comment ref="'+e[0]+'" authorId="'+r+'"><text>'),o.length<=1)t.push(kY("t",fY(o[0]||"")));else{for(var a="Comment:\n    "+o[0]+"\n",i=1;i<o.length;++i)a+="Reply:\n    "+o[i]+"\n";t.push(kY("t",fY(a)))}t.push("</text></comment>")})),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function JQ(e,t,n){var r=[lY,IY("ThreadedComments",null,{xmlns:AY.TCMNT}).replace(/[\/]>/,">")];return e.forEach((function(e){var o="";(e[1]||[]).forEach((function(a,i){if(a.T){a.a&&-1==t.indexOf(a.a)&&t.push(a.a);var l={ref:e[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+n.tcid++).slice(-12)+"}"};0==i?o=l.id:l.parentId=o,a.ID=l.id,a.a&&(l.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(a.a)).slice(-12)+"}"),r.push(IY("threadedComment",kY("text",a.t||""),l))}else delete a.ID}))})),r.push("</ThreadedComments>"),r.join("")}var QQ=L$;function ZQ(e){var t=m$(),n=[];return g$(t,628),g$(t,630),e.forEach((function(e){e[1].forEach((function(e){n.indexOf(e.a)>-1||(n.push(e.a.slice(0,54)),g$(t,632,function(e){return _$(e.slice(0,54))}(e.a)))}))})),g$(t,631),g$(t,633),e.forEach((function(e){e[1].forEach((function(r){r.iauthor=n.indexOf(r.a);var o={s:k$(e[0]),e:k$(e[0])};g$(t,635,function(e,t){return null==t&&(t=h$(36)),t.write_shift(4,e[1].iauthor),rJ(e[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}([o,r])),r.t&&r.t.length>0&&g$(t,637,H$(r)),g$(t,636),delete r.iauthor}))})),g$(t,634),g$(t,629),t.end()}var eZ=["xlsb","xlsm","xlam","biff8","xla"];var tZ=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function n(e,n,r,o){var a=!1,i=!1;0==r.length?i=!0:"["==r.charAt(0)&&(i=!0,r=r.slice(1,-1)),0==o.length?a=!0:"["==o.charAt(0)&&(a=!0,o=o.slice(1,-1));var l=r.length>0?0|parseInt(r,10):0,c=o.length>0?0|parseInt(o,10):0;return a?c+=t.c:--c,i?l+=t.r:--l,n+(a?"":"$")+E$(c)+(i?"":"$")+C$(l)}return function(r,o){return t=o,r.replace(e,n)}}(),nZ=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,rZ=function(){return function(e,t){return e.replace(nZ,(function(e,n,r,o,a,i){var l=S$(o)-(r?0:t.c),c=w$(i)-(a?0:t.r);return n+"R"+(0==c?"":a?c+1:"["+c+"]")+"C"+(0==l?"":r?l+1:"["+l+"]")}))}}();function oZ(e,t){return e.replace(nZ,(function(e,n,r,o,a,i){return n+("$"==r?r+o:E$(S$(o)+t.c))+("$"==a?a+i:C$(w$(i)+t.r))}))}function aZ(e){e.l+=1}function iZ(e,t){var n=e.read_shift(1==t?1:2);return[16383&n,n>>14&1,n>>15&1]}function lZ(e,t,n){var r=2;if(n){if(n.biff>=2&&n.biff<=5)return cZ(e);12==n.biff&&(r=4)}var o=e.read_shift(r),a=e.read_shift(r),i=iZ(e,2),l=iZ(e,2);return{s:{r:o,c:i[0],cRel:i[1],rRel:i[2]},e:{r:a,c:l[0],cRel:l[1],rRel:l[2]}}}function cZ(e){var t=iZ(e,2),n=iZ(e,2),r=e.read_shift(1),o=e.read_shift(1);return{s:{r:t[0],c:r,cRel:t[1],rRel:t[2]},e:{r:n[0],c:o,cRel:n[1],rRel:n[2]}}}function sZ(e,t,n){if(n&&n.biff>=2&&n.biff<=5)return function(e){var t=iZ(e,2),n=e.read_shift(1);return{r:t[0],c:n,cRel:t[1],rRel:t[2]}}(e);var r=e.read_shift(n&&12==n.biff?4:2),o=iZ(e,2);return{r:r,c:o[0],cRel:o[1],rRel:o[2]}}function dZ(e){var t=e.read_shift(2),n=e.read_shift(2);return{r:t,c:255&n,fQuoted:!!(16384&n),cRel:n>>15,rRel:n>>15}}function uZ(e){var t=1&e[e.l+1];return e.l+=4,[t,1]}function fZ(e){return[e.read_shift(1),e.read_shift(1)]}function pZ(e,t){var n=[e.read_shift(1)];if(12==t)switch(n[0]){case 2:n[0]=4;break;case 4:n[0]=16;break;case 0:n[0]=1;break;case 1:n[0]=2}switch(n[0]){case 4:n[1]=_J(e,1)?"TRUE":"FALSE",12!=t&&(e.l+=7);break;case 37:case 16:n[1]=hJ[e[e.l]],e.l+=12==t?4:8;break;case 0:e.l+=8;break;case 1:n[1]=oJ(e);break;case 2:n[1]=GJ(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+n[0])}return n}function hZ(e,t,n){for(var r=e.read_shift(12==n.biff?4:2),o=[],a=0;a!=r;++a)o.push((12==n.biff?nJ:QJ)(e,8));return o}function mZ(e,t,n){var r=0,o=0;12==n.biff?(r=e.read_shift(4),o=e.read_shift(4)):(o=1+e.read_shift(1),r=1+e.read_shift(2)),n.biff>=2&&n.biff<8&&(--r,0==--o&&(o=256));for(var a=0,i=[];a!=r&&(i[a]=[]);++a)for(var l=0;l!=o;++l)i[a][l]=pZ(e,n.biff);return i}function gZ(e,t,n){return e.l+=2,[dZ(e)]}function vZ(e){return e.l+=6,[]}function bZ(e){return e.l+=2,[BJ(e),1&e.read_shift(2)]}var yZ=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];var xZ={1:{n:"PtgExp",f:function(e,t,n){return e.l++,n&&12==n.biff?[e.read_shift(4,"i"),0]:[e.read_shift(2),e.read_shift(n&&2==n.biff?1:2)]}},2:{n:"PtgTbl",f:p$},3:{n:"PtgAdd",f:aZ},4:{n:"PtgSub",f:aZ},5:{n:"PtgMul",f:aZ},6:{n:"PtgDiv",f:aZ},7:{n:"PtgPower",f:aZ},8:{n:"PtgConcat",f:aZ},9:{n:"PtgLt",f:aZ},10:{n:"PtgLe",f:aZ},11:{n:"PtgEq",f:aZ},12:{n:"PtgGe",f:aZ},13:{n:"PtgGt",f:aZ},14:{n:"PtgNe",f:aZ},15:{n:"PtgIsect",f:aZ},16:{n:"PtgUnion",f:aZ},17:{n:"PtgRange",f:aZ},18:{n:"PtgUplus",f:aZ},19:{n:"PtgUminus",f:aZ},20:{n:"PtgPercent",f:aZ},21:{n:"PtgParen",f:aZ},22:{n:"PtgMissArg",f:aZ},23:{n:"PtgStr",f:function(e,t,n){return e.l++,WJ(e,0,n)}},26:{n:"PtgSheet",f:function(e,t,n){return e.l+=5,e.l+=2,e.l+=2==n.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function(e,t,n){return e.l+=2==n.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function(e){return e.l++,hJ[e.read_shift(1)]}},29:{n:"PtgBool",f:function(e){return e.l++,0!==e.read_shift(1)}},30:{n:"PtgInt",f:function(e){return e.l++,e.read_shift(2)}},31:{n:"PtgNum",f:function(e){return e.l++,oJ(e)}},32:{n:"PtgArray",f:function(e,t,n){var r=(96&e[e.l++])>>5;return e.l+=2==n.biff?6:12==n.biff?14:7,[r]}},33:{n:"PtgFunc",f:function(e,t,n){var r=(96&e[e.l])>>5;e.l+=1;var o=e.read_shift(n&&n.biff<=3?1:2);return[BZ[o],zZ[o],r]}},34:{n:"PtgFuncVar",f:function(e,t,n){var r=e[e.l++],o=e.read_shift(1),a=n&&n.biff<=3?[88==r?-1:0,e.read_shift(1)]:function(e){return[e[e.l+1]>>7,32767&e.read_shift(2)]}(e);return[o,(0===a[0]?zZ:_Z)[a[1]]]}},35:{n:"PtgName",f:function(e,t,n){var r=e.read_shift(1)>>>5&3,o=!n||n.biff>=8?4:2,a=e.read_shift(o);switch(n.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12}return[r,0,a]}},36:{n:"PtgRef",f:function(e,t,n){var r=(96&e[e.l])>>5;return e.l+=1,[r,sZ(e,0,n)]}},37:{n:"PtgArea",f:function(e,t,n){return[(96&e[e.l++])>>5,lZ(e,n.biff>=2&&n.biff,n)]}},38:{n:"PtgMemArea",f:function(e,t,n){var r=e.read_shift(1)>>>5&3;return e.l+=n&&2==n.biff?3:4,[r,e.read_shift(n&&2==n.biff?1:2)]}},39:{n:"PtgMemErr",f:p$},40:{n:"PtgMemNoMem",f:p$},41:{n:"PtgMemFunc",f:function(e,t,n){return[e.read_shift(1)>>>5&3,e.read_shift(n&&2==n.biff?1:2)]}},42:{n:"PtgRefErr",f:function(e,t,n){var r=e.read_shift(1)>>>5&3;return e.l+=4,n.biff<8&&e.l--,12==n.biff&&(e.l+=2),[r]}},43:{n:"PtgAreaErr",f:function(e,t,n){var r=(96&e[e.l++])>>5;return e.l+=n&&n.biff>8?12:n.biff<8?6:8,[r]}},44:{n:"PtgRefN",f:function(e,t,n){var r=(96&e[e.l])>>5;e.l+=1;var o=function(e,t,n){var r=n&&n.biff?n.biff:8;if(r>=2&&r<=5)return function(e){var t=e.read_shift(2),n=e.read_shift(1),r=(32768&t)>>15,o=(16384&t)>>14;return t&=16383,1==r&&t>=8192&&(t-=16384),1==o&&n>=128&&(n-=256),{r:t,c:n,cRel:o,rRel:r}}(e);var o=e.read_shift(r>=12?4:2),a=e.read_shift(2),i=(16384&a)>>14,l=(32768&a)>>15;if(a&=16383,1==l)for(;o>524287;)o-=1048576;if(1==i)for(;a>8191;)a-=16384;return{r:o,c:a,cRel:i,rRel:l}}(e,0,n);return[r,o]}},45:{n:"PtgAreaN",f:function(e,t,n){var r=(96&e[e.l++])>>5,o=function(e,t,n){if(n.biff<8)return cZ(e);var r=e.read_shift(12==n.biff?4:2),o=e.read_shift(12==n.biff?4:2),a=iZ(e,2),i=iZ(e,2);return{s:{r:r,c:a[0],cRel:a[1],rRel:a[2]},e:{r:o,c:i[0],cRel:i[1],rRel:i[2]}}}(e,0,n);return[r,o]}},46:{n:"PtgMemAreaN",f:function(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},57:{n:"PtgNameX",f:function(e,t,n){return 5==n.biff?function(e){var t=e.read_shift(1)>>>5&3,n=e.read_shift(2,"i");e.l+=8;var r=e.read_shift(2);return e.l+=12,[t,n,r]}(e):[e.read_shift(1)>>>5&3,e.read_shift(2),e.read_shift(4)]}},58:{n:"PtgRef3d",f:function(e,t,n){var r=(96&e[e.l])>>5;e.l+=1;var o=e.read_shift(2);return n&&5==n.biff&&(e.l+=12),[r,o,sZ(e,0,n)]}},59:{n:"PtgArea3d",f:function(e,t,n){var r=(96&e[e.l++])>>5,o=e.read_shift(2,"i");if(n)switch(n.biff){case 5:e.l+=12,6;break;case 12:12}return[r,o,lZ(e,0,n)]}},60:{n:"PtgRefErr3d",f:function(e,t,n){var r=(96&e[e.l++])>>5,o=e.read_shift(2),a=4;if(n)switch(n.biff){case 5:a=15;break;case 12:a=6}return e.l+=a,[r,o]}},61:{n:"PtgAreaErr3d",f:function(e,t,n){var r=(96&e[e.l++])>>5,o=e.read_shift(2),a=8;if(n)switch(n.biff){case 5:e.l+=12,a=6;break;case 12:a=12}return e.l+=a,[r,o]}},255:{}},wZ={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},CZ={1:{n:"PtgElfLel",f:bZ},2:{n:"PtgElfRw",f:gZ},3:{n:"PtgElfCol",f:gZ},6:{n:"PtgElfRwV",f:gZ},7:{n:"PtgElfColV",f:gZ},10:{n:"PtgElfRadical",f:gZ},11:{n:"PtgElfRadicalS",f:vZ},13:{n:"PtgElfColS",f:vZ},15:{n:"PtgElfColSV",f:vZ},16:{n:"PtgElfRadicalLel",f:bZ},25:{n:"PtgList",f:function(e){e.l+=2;var t=e.read_shift(2),n=e.read_shift(2),r=e.read_shift(4),o=e.read_shift(2),a=e.read_shift(2);return{ixti:t,coltype:3&n,rt:yZ[n>>2&31],idx:r,c:o,C:a}}},29:{n:"PtgSxName",f:function(e){return e.l+=2,[e.read_shift(4)]}},255:{}},SZ={0:{n:"PtgAttrNoop",f:function(e){return e.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function(e,t,n){var r=255&e[e.l+1]?1:0;return e.l+=n&&2==n.biff?3:4,[r]}},2:{n:"PtgAttrIf",f:function(e,t,n){var r=255&e[e.l+1]?1:0;return e.l+=2,[r,e.read_shift(n&&2==n.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function(e,t,n){e.l+=2;for(var r=e.read_shift(n&&2==n.biff?1:2),o=[],a=0;a<=r;++a)o.push(e.read_shift(n&&2==n.biff?1:2));return o}},8:{n:"PtgAttrGoto",f:function(e,t,n){var r=255&e[e.l+1]?1:0;return e.l+=2,[r,e.read_shift(n&&2==n.biff?1:2)]}},16:{n:"PtgAttrSum",f:function(e,t,n){e.l+=n&&2==n.biff?3:4}},32:{n:"PtgAttrBaxcel",f:uZ},33:{n:"PtgAttrBaxcel",f:uZ},64:{n:"PtgAttrSpace",f:function(e){return e.read_shift(2),fZ(e)}},65:{n:"PtgAttrSpaceSemi",f:function(e){return e.read_shift(2),fZ(e)}},128:{n:"PtgAttrIfError",f:function(e){var t=255&e[e.l+1]?1:0;return e.l+=2,[t,e.read_shift(2)]}},255:{}};function EZ(e,t,n,r){if(r.biff<8)return p$(e,t);for(var o=e.l+t,a=[],i=0;i!==n.length;++i)switch(n[i][0]){case"PtgArray":n[i][1]=mZ(e,0,r),a.push(n[i][1]);break;case"PtgMemArea":n[i][2]=hZ(e,n[i][1],r),a.push(n[i][2]);break;case"PtgExp":r&&12==r.biff&&(n[i][1][1]=e.read_shift(4),a.push(n[i][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+n[i][0]}return 0!==(t=o-e.l)&&a.push(p$(e,t)),a}function kZ(e,t,n){for(var r,o,a=e.l+t,i=[];a!=e.l;)t=a-e.l,o=e[e.l],r=xZ[o]||xZ[wZ[o]],24!==o&&25!==o||(r=(24===o?CZ:SZ)[e[e.l+1]]),r&&r.f?i.push([r.n,r.f(e,t,n)]):p$(e,t);return i}function jZ(e){for(var t=[],n=0;n<e.length;++n){for(var r=e[n],o=[],a=0;a<r.length;++a){var i=r[a];if(i)if(2===i[0])o.push('"'+i[1].replace(/"/g,'""')+'"');else o.push(i[1]);else o.push("")}t.push(o.join(","))}return t.join(";")}var IZ={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function TZ(e,t,n){if(!e)return"SH33TJSERR0";if(n.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var r=e.XTI[t];if(n.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),0==t?"":e.XTI[t-1];if(!r)return"SH33TJSERR1";var o="";if(n.biff>8)switch(e[r[0]][0]){case 357:return o=-1==r[1]?"#REF":e.SheetNames[r[1]],r[1]==r[2]?o:o+":"+e.SheetNames[r[2]];case 358:return null!=n.SID?e.SheetNames[n.SID]:"SH33TJSSAME"+e[r[0]][0];default:return"SH33TJSSRC"+e[r[0]][0]}switch(e[r[0]][0][0]){case 1025:return o=-1==r[1]?"#REF":e.SheetNames[r[1]]||"SH33TJSERR3",r[1]==r[2]?o:o+":"+e.SheetNames[r[2]];case 14849:return e[r[0]].slice(1).map((function(e){return e.Name})).join(";;");default:return e[r[0]][0][3]?(o=-1==r[1]?"#REF":e[r[0]][0][3][r[1]]||"SH33TJSERR4",r[1]==r[2]?o:o+":"+e[r[0]][0][3][r[2]]):"SH33TJSERR2"}}function AZ(e,t,n){var r=TZ(e,t,n);return"#REF"==r?r:function(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}(r,n)}function OZ(e,t,n,r,o){var a,i,l,c,s=o&&o.biff||8,d={s:{c:0,r:0},e:{c:0,r:0}},u=[],f=0,p=0,h="";if(!e[0]||!e[0][0])return"";for(var m=-1,g="",v=0,b=e[0].length;v<b;++v){var y=e[0][v];switch(y[0]){case"PtgUminus":u.push("-"+u.pop());break;case"PtgUplus":u.push("+"+u.pop());break;case"PtgPercent":u.push(u.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(a=u.pop(),i=u.pop(),m>=0){switch(e[0][m][1][0]){case 0:g=tY(" ",e[0][m][1][1]);break;case 1:g=tY("\r",e[0][m][1][1]);break;default:if(g="",o.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][m][1][0])}i+=g,m=-1}u.push(i+IZ[y[0]]+a);break;case"PtgIsect":a=u.pop(),i=u.pop(),u.push(i+" "+a);break;case"PtgUnion":a=u.pop(),i=u.pop(),u.push(i+","+a);break;case"PtgRange":a=u.pop(),i=u.pop(),u.push(i+":"+a);break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":l=v$(y[1][1],d,o),u.push(y$(l,s));break;case"PtgRefN":l=n?v$(y[1][1],n,o):y[1][1],u.push(y$(l,s));break;case"PtgRef3d":f=y[1][1],l=v$(y[1][2],d,o);h=AZ(r,f,o);u.push(h+"!"+y$(l,s));break;case"PtgFunc":case"PtgFuncVar":var x=y[1][0],w=y[1][1];x||(x=0);var C=0==(x&=127)?[]:u.slice(-x);u.length-=x,"User"===w&&(w=C.shift()),u.push(w+"("+C.join(",")+")");break;case"PtgBool":u.push(y[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":u.push(y[1]);break;case"PtgNum":u.push(String(y[1]));break;case"PtgStr":u.push('"'+y[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":c=b$(y[1][1],n?{s:n}:d,o),u.push(x$(c,o));break;case"PtgArea":c=b$(y[1][1],d,o),u.push(x$(c,o));break;case"PtgArea3d":f=y[1][1],c=y[1][2],h=AZ(r,f,o),u.push(h+"!"+x$(c,o));break;case"PtgAttrSum":u.push("SUM("+u.pop()+")");break;case"PtgName":p=y[1][2];var S=(r.names||[])[p-1]||(r[0]||[])[p],E=S?S.Name:"SH33TJSNAME"+String(p);E&&"_xlfn."==E.slice(0,6)&&!o.xlfn&&(E=E.slice(6)),u.push(E);break;case"PtgNameX":var k,j=y[1][1];if(p=y[1][2],!(o.biff<=5)){var I="";if(14849==((r[j]||[])[0]||[])[0]||(1025==((r[j]||[])[0]||[])[0]?r[j][p]&&r[j][p].itab>0&&(I=r.SheetNames[r[j][p].itab-1]+"!"):I=r.SheetNames[p-1]+"!"),r[j]&&r[j][p])I+=r[j][p].Name;else if(r[0]&&r[0][p])I+=r[0][p].Name;else{var T=(TZ(r,j,o)||"").split(";;");T[p-1]?I=T[p-1]:I+="SH33TJSERRX"}u.push(I);break}j<0&&(j=-j),r[j]&&(k=r[j][p]),k||(k={Name:"SH33TJSERRY"}),u.push(k.Name);break;case"PtgParen":var A="(",O=")";if(m>=0){switch(g="",e[0][m][1][0]){case 2:A=tY(" ",e[0][m][1][1])+A;break;case 3:A=tY("\r",e[0][m][1][1])+A;break;case 4:O=tY(" ",e[0][m][1][1])+O;break;case 5:O=tY("\r",e[0][m][1][1])+O;break;default:if(o.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][m][1][0])}m=-1}u.push(A+u.pop()+O);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":u.push("#REF!");break;case"PtgExp":l={c:y[1][1],r:y[1][0]};var N={c:n.c,r:n.r};if(r.sharedf[j$(l)]){var R=r.sharedf[j$(l)];u.push(OZ(R,d,N,r,o))}else{var P=!1;for(a=0;a!=r.arrayf.length;++a)if(i=r.arrayf[a],!(l.c<i[0].s.c||l.c>i[0].e.c)&&!(l.r<i[0].s.r||l.r>i[0].e.r)){u.push(OZ(i[1],d,N,r,o)),P=!0;break}P||u.push(y[1])}break;case"PtgArray":u.push("{"+jZ(y[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":m=v;break;case"PtgMissArg":u.push("");break;case"PtgList":u.push("Table"+y[1].idx+"[#"+y[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(y))}if(3!=o.biff&&m>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(e[0][v][0])){var M=!0;switch((y=e[0][m])[1][0]){case 4:M=!1;case 0:g=tY(" ",y[1][1]);break;case 5:M=!1;case 1:g=tY("\r",y[1][1]);break;default:if(g="",o.WTF)throw new Error("Unexpected PtgAttrSpaceType "+y[1][0])}u.push((M?g:"")+u.pop()+(M?"":g)),m=-1}}if(u.length>1&&o.WTF)throw new Error("bad formula stack");return u[0]}function NZ(e,t,n,r,o){var a=$J(t,n,o),i=function(e){if(null==e){var t=h$(8);return t.write_shift(1,3),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,65535),t}return aJ("number"==typeof e?e:0)}(e.v),l=h$(6);l.write_shift(2,33),l.write_shift(4,0);for(var c=h$(e.bf.length),s=0;s<e.bf.length;++s)c[s]=e.bf[s];return Bq([a,i,l,c])}function RZ(e,t,n){var r=e.read_shift(4),o=kZ(e,r,n),a=e.read_shift(4);return[o,a>0?EZ(e,a,o,n):null]}var PZ=RZ,MZ=RZ,DZ=RZ,LZ=RZ,_Z={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},zZ={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},BZ={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};var FZ="undefined"!==typeof Map;function HZ(e,t,n){var r=0,o=e.length;if(n){if(FZ?n.has(t):Object.prototype.hasOwnProperty.call(n,t))for(var a=FZ?n.get(t):n[t];r<a.length;++r)if(e[a[r]].t===t)return e.Count++,a[r]}else for(;r<o;++r)if(e[r].t===t)return e.Count++,r;return e[o]={t:t},e.Count++,e.Unique++,n&&(FZ?(n.has(t)||n.set(t,[]),n.get(t).push(o)):(Object.prototype.hasOwnProperty.call(n,t)||(n[t]=[]),n[t].push(o))),o}function WZ(e,t){var n={min:e+1,max:e+1},r=-1;return t.MDW&&(SQ=t.MDW),null!=t.width?n.customWidth=1:null!=t.wpx?r=kQ(t.wpx):null!=t.wch&&(r=t.wch),r>-1?(n.width=jQ(r),n.customWidth=1):null!=t.width&&(n.width=t.width),t.hidden&&(n.hidden=!0),null!=t.level&&(n.outlineLevel=n.level=t.level),n}function VZ(e,t){if(e){var n=[.7,.7,.75,.75,.3,.3];"xlml"==t&&(n=[1,1,1,1,.5,.5]),null==e.left&&(e.left=n[0]),null==e.right&&(e.right=n[1]),null==e.top&&(e.top=n[2]),null==e.bottom&&(e.bottom=n[3]),null==e.header&&(e.header=n[4]),null==e.footer&&(e.footer=n[5])}}function UZ(e,t,n){var r=n.revssf[null!=t.z?t.z:"General"],o=60,a=e.length;if(null==r&&n.ssf)for(;o<392;++o)if(null==n.ssf[o]){OX(t.z,o),n.ssf[o]=t.z,n.revssf[t.z]=r=o;break}for(o=0;o!=a;++o)if(e[o].numFmtId===r)return o;return e[a]={numFmtId:r,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},a}function KZ(e,t,n){if(e&&e["!ref"]){var r=A$(e["!ref"]);if(r.e.c<r.s.c||r.e.r<r.s.r)throw new Error("Bad range ("+n+"): "+e["!ref"])}}var GZ=["objects","scenarios","selectLockedCells","selectUnlockedCells"],qZ=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function XZ(e,t,n,r){if(e.c&&n["!comments"].push([t,e.c]),void 0===e.v&&"string"!==typeof e.f||"z"===e.t&&!e.f)return"";var o="",a=e.t,i=e.v;if("z"!==e.t)switch(e.t){case"b":o=e.v?"1":"0";break;case"n":o=""+e.v;break;case"e":o=hJ[e.v];break;case"d":r&&r.cellDates?o=QX(e.v,-1).toISOString():((e=eY(e)).t="n",o=""+(e.v=UX(QX(e.v)))),"undefined"===typeof e.z&&(e.z=Jq[14]);break;default:o=e.v}var l=kY("v",fY(o)),c={r:t},s=UZ(r.cellXfs,e,r);switch(0!==s&&(c.s=s),e.t){case"n":case"z":break;case"d":c.t="d";break;case"b":c.t="b";break;case"e":c.t="e";break;default:if(null==e.v){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(r&&r.bookSST){l=kY("v",""+HZ(r.Strings,e.v,r.revStrings)),c.t="s";break}c.t="str"}if(e.t!=a&&(e.t=a,e.v=i),"string"==typeof e.f&&e.f){var d=e.F&&e.F.slice(0,t.length)==t?{t:"array",ref:e.F}:null;l=IY("f",fY(e.f),d)+(null!=e.v?l:"")}return e.l&&n["!links"].push([t,e.l]),e.D&&(c.cm=1),IY("c",l,c)}function YZ(e,t,n,r){var o,a=[lY,IY("worksheet",null,{xmlns:OY[0],"xmlns:r":AY.r})],i=n.SheetNames[e],l="",c=n.Sheets[i];null==c&&(c={});var s=c["!ref"]||"A1",d=A$(s);if(d.e.c>16383||d.e.r>1048575){if(t.WTF)throw new Error("Range "+s+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),s=T$(d)}r||(r={}),c["!comments"]=[];var u=[];!function(e,t,n,r,o){var a=!1,i={},l=null;if("xlsx"!==r.bookType&&t.vbaraw){var c=t.SheetNames[n];try{t.Workbook&&(c=t.Workbook.Sheets[n].CodeName||c)}catch(r5){}a=!0,i.codeName=CY(fY(c))}if(e&&e["!outline"]){var s={summaryBelow:1,summaryRight:1};e["!outline"].above&&(s.summaryBelow=0),e["!outline"].left&&(s.summaryRight=0),l=(l||"")+IY("outlinePr",null,s)}(a||l)&&(o[o.length]=IY("sheetPr",l,i))}(c,n,e,t,a),a[a.length]=IY("dimension",null,{ref:s}),a[a.length]=function(e,t,n,r){var o={workbookViewId:"0"};return(((r||{}).Workbook||{}).Views||[])[0]&&(o.rightToLeft=r.Workbook.Views[0].RTL?"1":"0"),IY("sheetViews",IY("sheetView",null,o),{})}(0,0,0,n),t.sheetFormat&&(a[a.length]=IY("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),null!=c["!cols"]&&c["!cols"].length>0&&(a[a.length]=function(e,t){for(var n,r=["<cols>"],o=0;o!=t.length;++o)(n=t[o])&&(r[r.length]=IY("col",null,WZ(o,n)));return r[r.length]="</cols>",r.join("")}(0,c["!cols"])),a[o=a.length]="<sheetData/>",c["!links"]=[],null!=c["!ref"]&&(l=function(e,t,n,r){var o,a,i=[],l=[],c=A$(e["!ref"]),s="",d="",u=[],f=0,p=0,h=e["!rows"],m=Array.isArray(e),g={r:d},v=-1;for(p=c.s.c;p<=c.e.c;++p)u[p]=E$(p);for(f=c.s.r;f<=c.e.r;++f){for(l=[],d=C$(f),p=c.s.c;p<=c.e.c;++p){o=u[p]+d;var b=m?(e[f]||[])[p]:e[o];void 0!==b&&null!=(s=XZ(b,o,e,t))&&l.push(s)}(l.length>0||h&&h[f])&&(g={r:d},h&&h[f]&&((a=h[f]).hidden&&(g.hidden=1),v=-1,a.hpx?v=AQ(a.hpx):a.hpt&&(v=a.hpt),v>-1&&(g.ht=v,g.customHeight=1),a.level&&(g.outlineLevel=a.level)),i[i.length]=IY("row",l.join(""),g))}if(h)for(;f<h.length;++f)h&&h[f]&&(g={r:f+1},(a=h[f]).hidden&&(g.hidden=1),v=-1,a.hpx?v=AQ(a.hpx):a.hpt&&(v=a.hpt),v>-1&&(g.ht=v,g.customHeight=1),a.level&&(g.outlineLevel=a.level),i[i.length]=IY("row","",g));return i.join("")}(c,t,0,0),l.length>0&&(a[a.length]=l)),a.length>o+1&&(a[a.length]="</sheetData>",a[o]=a[o].replace("/>",">")),c["!protect"]&&(a[a.length]=function(e){var t={sheet:1};return GZ.forEach((function(n){null!=e[n]&&e[n]&&(t[n]="1")})),qZ.forEach((function(n){null==e[n]||e[n]||(t[n]="0")})),e.password&&(t.password=yQ(e.password).toString(16).toUpperCase()),IY("sheetProtection",null,t)}(c["!protect"])),null!=c["!autofilter"]&&(a[a.length]=function(e,t,n,r){var o="string"==typeof e.ref?e.ref:T$(e.ref);n.Workbook||(n.Workbook={Sheets:[]}),n.Workbook.Names||(n.Workbook.Names=[]);var a=n.Workbook.Names,i=I$(o);i.s.r==i.e.r&&(i.e.r=I$(t["!ref"]).e.r,o=T$(i));for(var l=0;l<a.length;++l){var c=a[l];if("_xlnm._FilterDatabase"==c.Name&&c.Sheet==r){c.Ref="'"+n.SheetNames[r]+"'!"+o;break}}return l==a.length&&a.push({Name:"_xlnm._FilterDatabase",Sheet:r,Ref:"'"+n.SheetNames[r]+"'!"+o}),IY("autoFilter",null,{ref:o})}(c["!autofilter"],c,n,e)),null!=c["!merges"]&&c["!merges"].length>0&&(a[a.length]=function(e){if(0===e.length)return"";for(var t='<mergeCells count="'+e.length+'">',n=0;n!=e.length;++n)t+='<mergeCell ref="'+T$(e[n])+'"/>';return t+"</mergeCells>"}(c["!merges"]));var f,p,h=-1,m=-1;return c["!links"].length>0&&(a[a.length]="<hyperlinks>",c["!links"].forEach((function(e){e[1].Target&&(f={ref:e[0]},"#"!=e[1].Target.charAt(0)&&(m=wJ(r,-1,fY(e[1].Target).replace(/#.*$/,""),bJ.HLINK),f["r:id"]="rId"+m),(h=e[1].Target.indexOf("#"))>-1&&(f.location=fY(e[1].Target.slice(h+1))),e[1].Tooltip&&(f.tooltip=fY(e[1].Tooltip)),a[a.length]=IY("hyperlink",null,f))})),a[a.length]="</hyperlinks>"),delete c["!links"],null!=c["!margins"]&&(a[a.length]=(VZ(p=c["!margins"]),IY("pageMargins",null,p))),t&&!t.ignoreEC&&void 0!=t.ignoreEC||(a[a.length]=kY("ignoredErrors",IY("ignoredError",null,{numberStoredAsText:1,sqref:s}))),u.length>0&&(m=wJ(r,-1,"../drawings/drawing"+(e+1)+".xml",bJ.DRAW),a[a.length]=IY("drawing",null,{"r:id":"rId"+m}),c["!drawing"]=u),c["!comments"].length>0&&(m=wJ(r,-1,"../drawings/vmlDrawing"+(e+1)+".vml",bJ.VML),a[a.length]=IY("legacyDrawing",null,{"r:id":"rId"+m}),c["!legacy"]=m),a.length>1&&(a[a.length]="</worksheet>",a[1]=a[1].replace("/>",">")),a.join("")}function $Z(e,t,n,r){var o=function(e,t,n){var r=h$(145),o=(n["!rows"]||[])[e]||{};r.write_shift(4,e),r.write_shift(4,0);var a=320;o.hpx?a=20*AQ(o.hpx):o.hpt&&(a=20*o.hpt),r.write_shift(2,a),r.write_shift(1,0);var i=0;o.level&&(i|=o.level),o.hidden&&(i|=16),(o.hpx||o.hpt)&&(i|=32),r.write_shift(1,i),r.write_shift(1,0);var l=0,c=r.l;r.l+=4;for(var s={r:e,c:0},d=0;d<16;++d)if(!(t.s.c>d+1<<10||t.e.c<d<<10)){for(var u=-1,f=-1,p=d<<10;p<d+1<<10;++p)s.c=p,(Array.isArray(n)?(n[s.r]||[])[s.c]:n[j$(s)])&&(u<0&&(u=p),f=p);u<0||(++l,r.write_shift(4,u),r.write_shift(4,f))}var h=r.l;return r.l=c,r.write_shift(4,l),r.l=h,r.length>r.l?r.slice(0,r.l):r}(r,n,t);(o.length>17||(t["!rows"]||[])[r])&&g$(e,0,o)}var JZ=nJ,QZ=rJ;function ZZ(e){return[U$(e),oJ(e),"n"]}var e0=nJ,t0=rJ;var n0=["left","right","top","bottom","header","footer"];function r0(e,t,n,r,o,a,i){if(void 0===t.v)return!1;var l="";switch(t.t){case"b":l=t.v?"1":"0";break;case"d":(t=eY(t)).z=t.z||Jq[14],t.v=UX(QX(t.v)),t.t="n";break;case"n":case"e":l=""+t.v;break;default:l=t.v}var c={r:n,c:r};switch(c.s=UZ(o.cellXfs,t,o),t.l&&a["!links"].push([j$(c),t.l]),t.c&&a["!comments"].push([j$(c),t.c]),t.t){case"s":case"str":return o.bookSST?(l=HZ(o.Strings,t.v,o.revStrings),c.t="s",c.v=l,i?g$(e,18,function(e,t,n){return null==n&&(n=h$(8)),K$(t,n),n.write_shift(4,t.v),n}(0,c)):g$(e,7,function(e,t,n){return null==n&&(n=h$(12)),V$(t,n),n.write_shift(4,t.v),n}(0,c))):(c.t="str",i?g$(e,17,function(e,t,n){return null==n&&(n=h$(8+4*e.v.length)),K$(t,n),_$(e.v,n),n.length>n.l?n.slice(0,n.l):n}(t,c)):g$(e,6,function(e,t,n){return null==n&&(n=h$(12+4*e.v.length)),V$(t,n),_$(e.v,n),n.length>n.l?n.slice(0,n.l):n}(t,c))),!0;case"n":return t.v==(0|t.v)&&t.v>-1e3&&t.v<1e3?i?g$(e,13,function(e,t,n){return null==n&&(n=h$(8)),K$(t,n),eJ(e.v,n),n}(t,c)):g$(e,2,function(e,t,n){return null==n&&(n=h$(12)),V$(t,n),eJ(e.v,n),n}(t,c)):i?g$(e,16,function(e,t,n){return null==n&&(n=h$(12)),K$(t,n),aJ(e.v,n),n}(t,c)):g$(e,5,function(e,t,n){return null==n&&(n=h$(16)),V$(t,n),aJ(e.v,n),n}(t,c)),!0;case"b":return c.t="b",i?g$(e,15,function(e,t,n){return null==n&&(n=h$(5)),K$(t,n),n.write_shift(1,e.v?1:0),n}(t,c)):g$(e,4,function(e,t,n){return null==n&&(n=h$(9)),V$(t,n),n.write_shift(1,e.v?1:0),n}(t,c)),!0;case"e":return c.t="e",i?g$(e,14,function(e,t,n){return null==n&&(n=h$(8)),K$(t,n),n.write_shift(1,e.v),n.write_shift(2,0),n.write_shift(1,0),n}(t,c)):g$(e,3,function(e,t,n){return null==n&&(n=h$(9)),V$(t,n),n.write_shift(1,e.v),n}(t,c)),!0}return i?g$(e,12,function(e,t,n){return null==n&&(n=h$(4)),K$(t,n)}(0,c)):g$(e,1,function(e,t,n){return null==n&&(n=h$(8)),V$(t,n)}(0,c)),!0}function o0(e,t){t&&t["!merges"]&&(g$(e,177,function(e,t){return null==t&&(t=h$(4)),t.write_shift(4,e),t}(t["!merges"].length)),t["!merges"].forEach((function(t){g$(e,176,t0(t))})),g$(e,178))}function a0(e,t){t&&t["!cols"]&&(g$(e,390),t["!cols"].forEach((function(t,n){t&&g$(e,60,function(e,t,n){null==n&&(n=h$(18));var r=WZ(e,t);n.write_shift(-4,e),n.write_shift(-4,e),n.write_shift(4,256*(r.width||10)),n.write_shift(4,0);var o=0;return t.hidden&&(o|=1),"number"==typeof r.width&&(o|=2),t.level&&(o|=t.level<<8),n.write_shift(2,o),n}(n,t))})),g$(e,391))}function i0(e,t){t&&t["!ref"]&&(g$(e,648),g$(e,649,function(e){var t=h$(24);return t.write_shift(4,4),t.write_shift(4,1),rJ(e,t),t}(A$(t["!ref"]))),g$(e,650))}function l0(e,t,n){t["!links"].forEach((function(t){if(t[1].Target){var r=wJ(n,-1,t[1].Target.replace(/#.*$/,""),bJ.HLINK);g$(e,494,function(e,t){var n=h$(50+4*(e[1].Target.length+(e[1].Tooltip||"").length));rJ({s:k$(e[0]),e:k$(e[0])},n),Q$("rId"+t,n);var r=e[1].Target.indexOf("#");return _$((-1==r?"":e[1].Target.slice(r+1))||"",n),_$(e[1].Tooltip||"",n),_$("",n),n.slice(0,n.l)}(t,r))}})),delete t["!links"]}function c0(e,t,n){g$(e,133),g$(e,137,function(e,t,n){null==n&&(n=h$(30));var r=924;return(((t||{}).Views||[])[0]||{}).RTL&&(r|=32),n.write_shift(2,r),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(1,0),n.write_shift(1,0),n.write_shift(2,0),n.write_shift(2,100),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(2,0),n.write_shift(4,0),n}(0,n)),g$(e,138),g$(e,134)}function s0(e,t){t["!protect"]&&g$(e,535,function(e,t){return null==t&&(t=h$(66)),t.write_shift(2,e.password?yQ(e.password):0),t.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach((function(n){n[1]?t.write_shift(4,null==e[n[0]]||e[n[0]]?0:1):t.write_shift(4,null!=e[n[0]]&&e[n[0]]?0:1)})),t}(t["!protect"]))}function d0(e,t,n,r){var o=m$(),a=n.SheetNames[e],i=n.Sheets[a]||{},l=a;try{n&&n.Workbook&&(l=n.Workbook.Sheets[e].CodeName||l)}catch(r5){}var c=A$(i["!ref"]||"A1");if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575)}return i["!links"]=[],i["!comments"]=[],g$(o,129),(n.vbaraw||i["!outline"])&&g$(o,147,function(e,t,n){null==n&&(n=h$(84+4*e.length));var r=192;t&&(t.above&&(r&=-65),t.left&&(r&=-129)),n.write_shift(1,r);for(var o=1;o<3;++o)n.write_shift(1,0);return iJ({auto:1},n),n.write_shift(-4,-1),n.write_shift(-4,-1),q$(e,n),n.slice(0,n.l)}(l,i["!outline"])),g$(o,148,QZ(c)),c0(o,0,n.Workbook),a0(o,i),function(e,t,n,r){var o,a=A$(t["!ref"]||"A1"),i="",l=[];g$(e,145);var c=Array.isArray(t),s=a.e.r;t["!rows"]&&(s=Math.max(a.e.r,t["!rows"].length-1));for(var d=a.s.r;d<=s;++d){i=C$(d),$Z(e,t,a,d);var u=!1;if(d<=a.e.r)for(var f=a.s.c;f<=a.e.c;++f){d===a.s.r&&(l[f]=E$(f)),o=l[f]+i;var p=c?(t[d]||[])[f]:t[o];u=!!p&&r0(e,p,d,f,r,t,u)}}g$(e,146)}(o,i,0,t),s0(o,i),function(e,t,n,r){if(t["!autofilter"]){var o=t["!autofilter"],a="string"===typeof o.ref?o.ref:T$(o.ref);n.Workbook||(n.Workbook={Sheets:[]}),n.Workbook.Names||(n.Workbook.Names=[]);var i=n.Workbook.Names,l=I$(a);l.s.r==l.e.r&&(l.e.r=I$(t["!ref"]).e.r,a=T$(l));for(var c=0;c<i.length;++c){var s=i[c];if("_xlnm._FilterDatabase"==s.Name&&s.Sheet==r){s.Ref="'"+n.SheetNames[r]+"'!"+a;break}}c==i.length&&i.push({Name:"_xlnm._FilterDatabase",Sheet:r,Ref:"'"+n.SheetNames[r]+"'!"+a}),g$(e,161,rJ(A$(a))),g$(e,162)}}(o,i,n,e),o0(o,i),l0(o,i,r),i["!margins"]&&g$(o,476,function(e,t){return null==t&&(t=h$(48)),VZ(e),n0.forEach((function(n){aJ(e[n],t)})),t}(i["!margins"])),t&&!t.ignoreEC&&void 0!=t.ignoreEC||i0(o,i),function(e,t,n,r){if(t["!comments"].length>0){var o=wJ(r,-1,"../drawings/vmlDrawing"+(n+1)+".vml",bJ.VML);g$(e,551,Q$("rId"+o)),t["!legacy"]=o}}(o,i,e,r),g$(o,130),o.end()}var u0=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]];var f0="][*?/\\".split("");function p0(e,t){if(e.length>31){if(t)return!1;throw new Error("Sheet names cannot exceed 31 chars")}var n=!0;return f0.forEach((function(r){if(-1!=e.indexOf(r)){if(!t)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");n=!1}})),n}function h0(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var t,n,r,o=e.Workbook&&e.Workbook.Sheets||[];t=e.SheetNames,n=o,r=!!e.vbaraw,t.forEach((function(e,o){p0(e);for(var a=0;a<o;++a)if(e==t[a])throw new Error("Duplicate Sheet Name: "+e);if(r){var i=n&&n[o]&&n[o].CodeName||e;if(95==i.charCodeAt(0)&&i.length>22)throw new Error("Bad Code Name: Worksheet"+i)}}));for(var a=0;a<e.SheetNames.length;++a)KZ(e.Sheets[e.SheetNames[a]],e.SheetNames[a],a)}function m0(e){var t=[lY];t[t.length]=IY("workbook",null,{xmlns:OY[0],"xmlns:r":AY.r});var n=e.Workbook&&(e.Workbook.Names||[]).length>0,r={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(u0.forEach((function(t){null!=e.Workbook.WBProps[t[0]]&&e.Workbook.WBProps[t[0]]!=t[1]&&(r[t[0]]=e.Workbook.WBProps[t[0]])})),e.Workbook.WBProps.CodeName&&(r.codeName=e.Workbook.WBProps.CodeName,delete r.CodeName)),t[t.length]=IY("workbookPr",null,r);var o=e.Workbook&&e.Workbook.Sheets||[],a=0;if(o&&o[0]&&o[0].Hidden){for(t[t.length]="<bookViews>",a=0;a!=e.SheetNames.length&&o[a]&&o[a].Hidden;++a);a==e.SheetNames.length&&(a=0),t[t.length]='<workbookView firstSheet="'+a+'" activeTab="'+a+'"/>',t[t.length]="</bookViews>"}for(t[t.length]="<sheets>",a=0;a!=e.SheetNames.length;++a){var i={name:fY(e.SheetNames[a].slice(0,31))};if(i.sheetId=""+(a+1),i["r:id"]="rId"+(a+1),o[a])switch(o[a].Hidden){case 1:i.state="hidden";break;case 2:i.state="veryHidden"}t[t.length]=IY("sheet",null,i)}return t[t.length]="</sheets>",n&&(t[t.length]="<definedNames>",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach((function(e){var n={name:e.Name};e.Comment&&(n.comment=e.Comment),null!=e.Sheet&&(n.localSheetId=""+e.Sheet),e.Hidden&&(n.hidden="1"),e.Ref&&(t[t.length]=IY("definedName",fY(e.Ref),n))})),t[t.length]="</definedNames>"),t.length>2&&(t[t.length]="</workbook>",t[1]=t[1].replace("/>",">")),t.join("")}function g0(e,t){return t||(t=h$(127)),t.write_shift(4,e.Hidden),t.write_shift(4,e.iTabID),Q$(e.strRelID,t),_$(e.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function v0(e,t){if(t.Workbook&&t.Workbook.Sheets){for(var n=t.Workbook.Sheets,r=0,o=-1,a=-1;r<n.length;++r)!n[r]||!n[r].Hidden&&-1==o?o=r:1==n[r].Hidden&&-1==a&&(a=r);a>o||(g$(e,135),g$(e,158,function(e,t){return t||(t=h$(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,e),t.write_shift(4,e),t.write_shift(1,120),t.length>t.l?t.slice(0,t.l):t}(o)),g$(e,136))}}function b0(e,t){var n=m$();return g$(n,131),g$(n,128,function(e,t){t||(t=h$(127));for(var n=0;4!=n;++n)t.write_shift(4,0);return _$("SheetJS",t),_$(gq.version,t),_$(gq.version,t),_$("7262",t),t.length>t.l?t.slice(0,t.l):t}()),g$(n,153,function(e,t){t||(t=h$(72));var n=0;return e&&e.filterPrivacy&&(n|=8),t.write_shift(4,n),t.write_shift(4,0),q$(e&&e.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}(e.Workbook&&e.Workbook.WBProps||null)),v0(n,e),function(e,t){g$(e,143);for(var n=0;n!=t.SheetNames.length;++n)g$(e,156,g0({Hidden:t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[n]&&t.Workbook.Sheets[n].Hidden||0,iTabID:n+1,strRelID:"rId"+(n+1),name:t.SheetNames[n]}));g$(e,144)}(n,e),g$(n,132),n.end()}function y0(e,t,n,r,o){return(".bin"===t.slice(-4)?d0:YZ)(e,n,r,o)}function x0(e,t,n){return(".bin"===t.slice(-4)?ZQ:$Q)(e,n)}function w0(e,t){var n=[];return e.Props&&n.push(function(e,t){var n=[];return BX(NJ).map((function(e){for(var t=0;t<EJ.length;++t)if(EJ[t][1]==e)return EJ[t];for(t=0;t<IJ.length;++t)if(IJ[t][1]==e)return IJ[t];throw e})).forEach((function(r){if(null!=e[r[1]]){var o=t&&t.Props&&null!=t.Props[r[1]]?t.Props[r[1]]:e[r[1]];"date"===r[2]&&(o=new Date(o).toISOString().replace(/\.\d*Z/,"Z")),"number"==typeof o?o=String(o):!0===o||!1===o?o=o?"1":"0":o instanceof Date&&(o=new Date(o).toISOString().replace(/\.\d*Z/,"")),n.push(kY(NJ[r[1]]||r[1],o))}})),IY("DocumentProperties",n.join(""),{xmlns:NY.o})}(e.Props,t)),e.Custprops&&n.push(function(e,t){var n=["Worksheets","SheetNames"],r="CustomDocumentProperties",o=[];return e&&BX(e).forEach((function(t){if(Object.prototype.hasOwnProperty.call(e,t)){for(var r=0;r<EJ.length;++r)if(t==EJ[r][1])return;for(r=0;r<IJ.length;++r)if(t==IJ[r][1])return;for(r=0;r<n.length;++r)if(t==n[r])return;var a=e[t],i="string";"number"==typeof a?(i="float",a=String(a)):!0===a||!1===a?(i="boolean",a=a?"1":"0"):a=String(a),o.push(IY(pY(t),a,{"dt:dt":i}))}})),t&&BX(t).forEach((function(n){if(Object.prototype.hasOwnProperty.call(t,n)&&(!e||!Object.prototype.hasOwnProperty.call(e,n))){var r=t[n],a="string";"number"==typeof r?(a="float",r=String(r)):!0===r||!1===r?(a="boolean",r=r?"1":"0"):r instanceof Date?(a="dateTime.tz",r=r.toISOString()):r=String(r),o.push(IY(pY(n),r,{"dt:dt":a}))}})),"<"+r+' xmlns="'+NY.o+'">'+o.join("")+"</"+r+">"}(e.Props,e.Custprops)),n.join("")}function C0(e){return IY("NamedRange",null,{"ss:Name":e.Name,"ss:RefersTo":"="+rZ(e.Ref,{r:0,c:0})})}function S0(e,t,n,r,o,a,i){if(!e||void 0==e.v&&void 0==e.f)return"";var l={};if(e.f&&(l["ss:Formula"]="="+fY(rZ(e.f,i))),e.F&&e.F.slice(0,t.length)==t){var c=k$(e.F.slice(t.length+1));l["ss:ArrayRange"]="RC:R"+(c.r==i.r?"":"["+(c.r-i.r)+"]")+"C"+(c.c==i.c?"":"["+(c.c-i.c)+"]")}if(e.l&&e.l.Target&&(l["ss:HRef"]=fY(e.l.Target),e.l.Tooltip&&(l["x:HRefScreenTip"]=fY(e.l.Tooltip))),n["!merges"])for(var s=n["!merges"],d=0;d!=s.length;++d)s[d].s.c==i.c&&s[d].s.r==i.r&&(s[d].e.c>s[d].s.c&&(l["ss:MergeAcross"]=s[d].e.c-s[d].s.c),s[d].e.r>s[d].s.r&&(l["ss:MergeDown"]=s[d].e.r-s[d].s.r));var u="",f="";switch(e.t){case"z":if(!r.sheetStubs)return"";break;case"n":u="Number",f=String(e.v);break;case"b":u="Boolean",f=e.v?"1":"0";break;case"e":u="Error",f=hJ[e.v];break;case"d":u="DateTime",f=new Date(e.v).toISOString(),null==e.z&&(e.z=e.z||Jq[14]);break;case"s":u="String",f=((e.v||"")+"").replace(dY,(function(e){return sY[e]})).replace(hY,(function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}))}var p=UZ(r.cellXfs,e,r);l["ss:StyleID"]="s"+(21+p),l["ss:Index"]=i.c+1;var h=null!=e.v?f:"",m="z"==e.t?"":'<Data ss:Type="'+u+'">'+h+"</Data>";return(e.c||[]).length>0&&(m+=e.c.map((function(e){var t=IY("ss:Data",(e.t||"").replace(/(\r\n|[\r\n])/g,"&#10;"),{xmlns:"http://www.w3.org/TR/REC-html40"});return IY("Comment",t,{"ss:Author":e.a})})).join("")),IY("Cell",m,l)}function E0(e,t){var n='<Row ss:Index="'+(e+1)+'"';return t&&(t.hpt&&!t.hpx&&(t.hpx=OQ(t.hpt)),t.hpx&&(n+=' ss:AutoFitHeight="0" ss:Height="'+t.hpx+'"'),t.hidden&&(n+=' ss:Hidden="1"')),n+">"}function k0(e,t,n){var r=[],o=n.SheetNames[e],a=n.Sheets[o],i=a?function(e,t,n,r){if(!e)return"";if(!((r||{}).Workbook||{}).Names)return"";for(var o=r.Workbook.Names,a=[],i=0;i<o.length;++i){var l=o[i];l.Sheet==n&&(l.Name.match(/^_xlfn\./)||a.push(C0(l)))}return a.join("")}(a,0,e,n):"";return i.length>0&&r.push("<Names>"+i+"</Names>"),i=a?function(e,t,n,r){if(!e["!ref"])return"";var o=A$(e["!ref"]),a=e["!merges"]||[],i=0,l=[];e["!cols"]&&e["!cols"].forEach((function(e,t){IQ(e);var n=!!e.width,r=WZ(t,e),o={"ss:Index":t+1};n&&(o["ss:Width"]=EQ(r.width)),e.hidden&&(o["ss:Hidden"]="1"),l.push(IY("Column",null,o))}));for(var c=Array.isArray(e),s=o.s.r;s<=o.e.r;++s){for(var d=[E0(s,(e["!rows"]||[])[s])],u=o.s.c;u<=o.e.c;++u){var f=!1;for(i=0;i!=a.length;++i)if(!(a[i].s.c>u)&&!(a[i].s.r>s)&&!(a[i].e.c<u)&&!(a[i].e.r<s)){a[i].s.c==u&&a[i].s.r==s||(f=!0);break}if(!f){var p={r:s,c:u},h=j$(p),m=c?(e[s]||[])[u]:e[h];d.push(S0(m,h,e,t,0,0,p))}}d.push("</Row>"),d.length>2&&l.push(d.join(""))}return l.join("")}(a,t):"",i.length>0&&r.push("<Table>"+i+"</Table>"),r.push(function(e,t,n,r){if(!e)return"";var o=[];if(e["!margins"]&&(o.push("<PageSetup>"),e["!margins"].header&&o.push(IY("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&o.push(IY("Footer",null,{"x:Margin":e["!margins"].footer})),o.push(IY("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),o.push("</PageSetup>")),r&&r.Workbook&&r.Workbook.Sheets&&r.Workbook.Sheets[n])if(r.Workbook.Sheets[n].Hidden)o.push(IY("Visible",1==r.Workbook.Sheets[n].Hidden?"SheetHidden":"SheetVeryHidden",{}));else{for(var a=0;a<n&&(!r.Workbook.Sheets[a]||r.Workbook.Sheets[a].Hidden);++a);a==n&&o.push("<Selected/>")}return((((r||{}).Workbook||{}).Views||[])[0]||{}).RTL&&o.push("<DisplayRightToLeft/>"),e["!protect"]&&(o.push(kY("ProtectContents","True")),e["!protect"].objects&&o.push(kY("ProtectObjects","True")),e["!protect"].scenarios&&o.push(kY("ProtectScenarios","True")),null==e["!protect"].selectLockedCells||e["!protect"].selectLockedCells?null==e["!protect"].selectUnlockedCells||e["!protect"].selectUnlockedCells||o.push(kY("EnableSelection","UnlockedCells")):o.push(kY("EnableSelection","NoSelection")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach((function(t){e["!protect"][t[0]]&&o.push("<"+t[1]+"/>")}))),0==o.length?"":IY("WorksheetOptions",o.join(""),{xmlns:NY.x})}(a,0,e,n)),r.join("")}function j0(e,t){t||(t={}),e.SSF||(e.SSF=eY(Jq)),e.SSF&&(RX(),NX(e.SSF),t.revssf=WX(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF,t.cellXfs=[],UZ(t.cellXfs,{},{revssf:{General:0}}));var n=[];n.push(w0(e,t)),n.push(""),n.push(""),n.push("");for(var r=0;r<e.SheetNames.length;++r)n.push(IY("Worksheet",k0(r,t,e),{"ss:Name":fY(e.SheetNames[r])}));return n[2]=function(e,t){var n=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];return t.cellXfs.forEach((function(e,t){var r=[];r.push(IY("NumberFormat",null,{"ss:Format":fY(Jq[e.numFmtId])}));var o={"ss:ID":"s"+(21+t)};n.push(IY("Style",r.join(""),o))})),IY("Styles",n.join(""))}(0,t),n[3]=function(e){if(!((e||{}).Workbook||{}).Names)return"";for(var t=e.Workbook.Names,n=[],r=0;r<t.length;++r){var o=t[r];null==o.Sheet&&(o.Name.match(/^_xlfn\./)||n.push(C0(o)))}return IY("Names",n.join(""))}(e),lY+IY("Workbook",n.join(""),{xmlns:NY.ss,"xmlns:o":NY.o,"xmlns:x":NY.x,"xmlns:ss":NY.ss,"xmlns:dt":NY.dt,"xmlns:html":NY.html})}var I0={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function T0(e,t){var n=t||{},r=DX.utils.cfb_new({root:"R"}),o="/Workbook";switch(n.bookType||"xls"){case"xls":n.bookType="biff8";case"xla":n.bookType||(n.bookType="xla");case"biff8":o="/Workbook",n.biff=8;break;case"biff5":o="/Book",n.biff=5;break;default:throw new Error("invalid type "+n.bookType+" for XLS CFB")}return DX.utils.cfb_add(r,o,B0(e,n)),8==n.biff&&(e.Props||e.Custprops)&&function(e,t){var n,r=[],o=[],a=[],i=0,l=FX(dJ,"n"),c=FX(uJ,"n");if(e.Props)for(n=BX(e.Props),i=0;i<n.length;++i)(Object.prototype.hasOwnProperty.call(l,n[i])?r:Object.prototype.hasOwnProperty.call(c,n[i])?o:a).push([n[i],e.Props[n[i]]]);if(e.Custprops)for(n=BX(e.Custprops),i=0;i<n.length;++i)Object.prototype.hasOwnProperty.call(e.Props||{},n[i])||(Object.prototype.hasOwnProperty.call(l,n[i])?r:Object.prototype.hasOwnProperty.call(c,n[i])?o:a).push([n[i],e.Custprops[n[i]]]);var s=[];for(i=0;i<a.length;++i)PJ.indexOf(a[i][0])>-1||TJ.indexOf(a[i][0])>-1||null!=a[i][1]&&s.push(a[i]);o.length&&DX.utils.cfb_add(t,"/\x05SummaryInformation",LJ(o,I0.SI,c,uJ)),(r.length||s.length)&&DX.utils.cfb_add(t,"/\x05DocumentSummaryInformation",LJ(r,I0.DSI,l,dJ,s.length?s:null,I0.UDI))}(e,r),8==n.biff&&e.vbaraw&&function(e,t){t.FullPaths.forEach((function(n,r){if(0!=r){var o=n.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");"/"!==o.slice(-1)&&DX.utils.cfb_add(e,o,t.FileIndex[r].content)}}))}(r,DX.read(e.vbaraw,{type:"string"==typeof e.vbaraw?"binary":"buffer"})),r}var A0={0:{f:function(e,t){var n={},r=e.l+t;n.r=e.read_shift(4),e.l+=4;var o=e.read_shift(2);e.l+=1;var a=e.read_shift(1);return e.l=r,7&a&&(n.level=7&a),16&a&&(n.hidden=!0),32&a&&(n.hpt=o/20),n}},1:{f:function(e){return[W$(e)]}},2:{f:function(e){return[W$(e),Z$(e),"n"]}},3:{f:function(e){return[W$(e),e.read_shift(1),"e"]}},4:{f:function(e){return[W$(e),e.read_shift(1),"b"]}},5:{f:function(e){return[W$(e),oJ(e),"n"]}},6:{f:function(e){return[W$(e),L$(e),"str"]}},7:{f:function(e){return[W$(e),e.read_shift(4),"s"]}},8:{f:function(e,t,n){var r=e.l+t,o=W$(e);o.r=n["!row"];var a=[o,L$(e),"str"];if(n.cellFormula){e.l+=2;var i=MZ(e,r-e.l,n);a[3]=OZ(i,0,o,n.supbooks,n)}else e.l=r;return a}},9:{f:function(e,t,n){var r=e.l+t,o=W$(e);o.r=n["!row"];var a=[o,oJ(e),"n"];if(n.cellFormula){e.l+=2;var i=MZ(e,r-e.l,n);a[3]=OZ(i,0,o,n.supbooks,n)}else e.l=r;return a}},10:{f:function(e,t,n){var r=e.l+t,o=W$(e);o.r=n["!row"];var a=[o,e.read_shift(1),"b"];if(n.cellFormula){e.l+=2;var i=MZ(e,r-e.l,n);a[3]=OZ(i,0,o,n.supbooks,n)}else e.l=r;return a}},11:{f:function(e,t,n){var r=e.l+t,o=W$(e);o.r=n["!row"];var a=[o,e.read_shift(1),"e"];if(n.cellFormula){e.l+=2;var i=MZ(e,r-e.l,n);a[3]=OZ(i,0,o,n.supbooks,n)}else e.l=r;return a}},12:{f:function(e){return[U$(e)]}},13:{f:function(e){return[U$(e),Z$(e),"n"]}},14:{f:function(e){return[U$(e),e.read_shift(1),"e"]}},15:{f:function(e){return[U$(e),e.read_shift(1),"b"]}},16:{f:ZZ},17:{f:function(e){return[U$(e),L$(e),"str"]}},18:{f:function(e){return[U$(e),e.read_shift(4),"s"]}},19:{f:B$},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:function(e,t,n){var r=e.l+t;e.l+=4,e.l+=1;var o=e.read_shift(4),a=$$(e),i=DZ(e,0,n),l=X$(e);e.l=r;var c={Name:a,Ptg:i};return o<268435455&&(c.Sheet=o),l&&(c.Comment=l),c}},40:{},42:{},43:{f:function(e,t,n){var r={};r.sz=e.read_shift(2)/20;var o=function(e){var t=e.read_shift(1);return e.l++,{fBold:1&t,fItalic:2&t,fUnderline:4&t,fStrikeout:8&t,fOutline:16&t,fShadow:32&t,fCondense:64&t,fExtend:128&t}}(e);switch(o.fItalic&&(r.italic=1),o.fCondense&&(r.condense=1),o.fExtend&&(r.extend=1),o.fShadow&&(r.shadow=1),o.fOutline&&(r.outline=1),o.fStrikeout&&(r.strike=1),700===e.read_shift(2)&&(r.bold=1),e.read_shift(2)){case 1:r.vertAlign="superscript";break;case 2:r.vertAlign="subscript"}var a=e.read_shift(1);0!=a&&(r.underline=a);var i=e.read_shift(1);i>0&&(r.family=i);var l=e.read_shift(1);switch(l>0&&(r.charset=l),e.l++,r.color=function(e){var t={},n=e.read_shift(1)>>>1,r=e.read_shift(1),o=e.read_shift(2,"i"),a=e.read_shift(1),i=e.read_shift(1),l=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=r;var c=pJ[r];c&&(t.rgb=wQ(c));break;case 2:t.rgb=wQ([a,i,l]);break;case 3:t.theme=r}return 0!=o&&(t.tint=o>0?o/32767:o/32768),t}(e),e.read_shift(1)){case 1:r.scheme="major";break;case 2:r.scheme="minor"}return r.name=L$(e),r}},44:{f:function(e,t){return[e.read_shift(2),L$(e)]}},45:{f:LQ},46:{f:FQ},47:{f:function(e,t){var n=e.l+t,r=e.read_shift(2),o=e.read_shift(2);return e.l=n,{ixfe:r,numFmtId:o}}},48:{},49:{f:function(e){return e.read_shift(4,"i")}},50:{},51:{f:function(e){for(var t=[],n=e.read_shift(4);n-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:lQ},62:{f:function(e){return[W$(e),B$(e),"is"]}},63:{f:function(e){var t={};t.i=e.read_shift(4);var n={};n.r=e.read_shift(4),n.c=e.read_shift(4),t.r=j$(n);var r=e.read_shift(1);return 2&r&&(t.l="1"),8&r&&(t.a="1"),t}},64:{f:function(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:p$,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function(e){var t=e.read_shift(2);return e.l+=28,{RTL:32&t}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function(e,t){var n={},r=e[e.l];return++e.l,n.above=!(64&r),n.left=!(128&r),e.l+=18,n.name=G$(e,t-19),n}},148:{f:JZ,p:16},151:{f:function(){}},152:{},153:{f:function(e,t){var n={},r=e.read_shift(4);n.defaultThemeVersion=e.read_shift(4);var o=t>8?L$(e):"";return o.length>0&&(n.CodeName=o),n.autoCompressPictures=!!(65536&r),n.backupFile=!!(64&r),n.checkCompatibility=!!(4096&r),n.date1904=!!(1&r),n.filterPrivacy=!!(8&r),n.hidePivotFieldList=!!(1024&r),n.promptedSolutions=!!(16&r),n.publishItems=!!(2048&r),n.refreshAllConnections=!!(262144&r),n.saveExternalLinkValues=!!(128&r),n.showBorderUnselectedTables=!!(4&r),n.showInkAnnotation=!!(32&r),n.showObjects=["all","placeholders","none"][r>>13&3],n.showPivotChartFilter=!!(32768&r),n.updateLinks=["userSet","never","always"][r>>8&3],n}},154:{},155:{},156:{f:function(e,t){var n={};return n.Hidden=e.read_shift(4),n.iTabID=e.read_shift(4),n.strRelID=J$(e,t-8),n.name=L$(e),n}},157:{},158:{},159:{T:1,f:function(e){return[e.read_shift(4),e.read_shift(4)]}},160:{T:-1},161:{T:1,f:nJ},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:e0},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:L$(e)}}},336:{T:-1},337:{f:function(e){return e.l+=4,0!=e.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:J$},357:{},358:{},359:{},360:{T:1},361:{},362:{f:oQ},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function(e,t,n){var r=e.l+t,o=tJ(e),a=e.read_shift(1),i=[o];if(i[2]=a,n.cellFormula){var l=PZ(e,r-e.l,n);i[1]=l}else e.l=r;return i}},427:{f:function(e,t,n){var r=e.l+t,o=[nJ(e,16)];if(n.cellFormula){var a=LZ(e,r-e.l,n);o[1]=a,e.l=r}else e.l=r;return o}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function(e){var t={};return n0.forEach((function(n){t[n]=oJ(e)})),t}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function(e,t){var n=e.l+t,r=nJ(e,16),o=X$(e),a=L$(e),i=L$(e),l=L$(e);e.l=n;var c={rfx:r,relId:o,loc:a,display:l};return i&&(c.Tooltip=i),c}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:J$},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:QQ},633:{T:1},634:{T:-1},635:{T:1,f:function(e){var t={};t.iauthor=e.read_shift(4);var n=nJ(e,16);return t.rfx=n.s,t.ref=j$(n.s),e.l+=16,t}},636:{T:-1},637:{f:F$},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function(e,t){return e.l+=10,{name:L$(e)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function O0(e,t,n,r){var o=t;if(!isNaN(o)){var a=r||(n||[]).length||0,i=e.next(4);i.write_shift(2,o),i.write_shift(2,a),a>0&&QY(n)&&e.push(n)}}function N0(e,t,n){return e||(e=h$(7)),e.write_shift(2,t),e.write_shift(2,n),e.write_shift(2,0),e.write_shift(1,0),e}function R0(e,t,n,r){if(null!=t.v)switch(t.t){case"d":case"n":var o="d"==t.t?UX(QX(t.v)):t.v;return void(o==(0|o)&&o>=0&&o<65536?O0(e,2,function(e,t,n){var r=h$(9);return N0(r,e,t),r.write_shift(2,n),r}(n,r,o)):O0(e,3,function(e,t,n){var r=h$(15);return N0(r,e,t),r.write_shift(8,n,"f"),r}(n,r,o)));case"b":case"e":return void O0(e,5,function(e,t,n,r){var o=h$(9);return N0(o,e,t),HJ(n,r||"b",o),o}(n,r,t.v,t.t));case"s":case"str":return void O0(e,4,function(e,t,n){var r=h$(8+2*n.length);return N0(r,e,t),r.write_shift(1,n.length),r.write_shift(n.length,n,"sbcs"),r.l<r.length?r.slice(0,r.l):r}(n,r,(t.v||"").slice(0,255)))}O0(e,1,N0(null,n,r))}function P0(e,t){var n=t||{};null!=Tq&&null==n.dense&&(n.dense=Tq);for(var r=m$(),o=0,a=0;a<e.SheetNames.length;++a)e.SheetNames[a]==n.sheet&&(o=a);if(0==o&&n.sheet&&e.SheetNames[0]!=n.sheet)throw new Error("Sheet not found: "+n.sheet);return O0(r,4==n.biff?1033:3==n.biff?521:9,eQ(0,16,n)),function(e,t,n,r){var o,a=Array.isArray(t),i=A$(t["!ref"]||"A1"),l="",c=[];if(i.e.c>255||i.e.r>16383){if(r.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");i.e.c=Math.min(i.e.c,255),i.e.r=Math.min(i.e.c,16383),o=T$(i)}for(var s=i.s.r;s<=i.e.r;++s){l=C$(s);for(var d=i.s.c;d<=i.e.c;++d){s===i.s.r&&(c[d]=E$(d)),o=c[d]+l;var u=a?(t[s]||[])[d]:t[o];u&&R0(e,u,s,d)}}}(r,e.Sheets[e.SheetNames[o]],0,n),O0(r,10),r.end()}function M0(e,t,n){O0(e,49,function(e,t){var n=e.name||"Arial",r=t&&5==t.biff,o=h$(r?15+n.length:16+2*n.length);return o.write_shift(2,20*(e.sz||12)),o.write_shift(4,0),o.write_shift(2,400),o.write_shift(4,0),o.write_shift(2,0),o.write_shift(1,n.length),r||o.write_shift(1,1),o.write_shift((r?1:2)*n.length,n,r?"sbcs":"utf16le"),o}({sz:12,color:{theme:1},name:"Arial",family:2,scheme:"minor"},n))}function D0(e,t){if(t){var n=0;t.forEach((function(t,r){++n<=256&&t&&O0(e,125,function(e,t){var n=h$(12);n.write_shift(2,t),n.write_shift(2,t),n.write_shift(2,256*e.width),n.write_shift(2,0);var r=0;return e.hidden&&(r|=1),n.write_shift(1,r),r=e.level||0,n.write_shift(1,r),n.write_shift(2,0),n}(WZ(r,t),r))}))}}function L0(e,t,n,r,o){var a=16+UZ(o.cellXfs,t,o);if(null!=t.v||t.bf)if(t.bf)O0(e,6,NZ(t,n,r,0,a));else switch(t.t){case"d":case"n":O0(e,515,function(e,t,n,r){var o=h$(14);return $J(e,t,r,o),aJ(n,o),o}(n,r,"d"==t.t?UX(QX(t.v)):t.v,a));break;case"b":case"e":O0(e,517,function(e,t,n,r,o,a){var i=h$(8);return $J(e,t,r,i),HJ(n,a,i),i}(n,r,t.v,a,0,t.t));break;case"s":case"str":if(o.bookSST)O0(e,253,function(e,t,n,r){var o=h$(10);return $J(e,t,r,o),o.write_shift(4,n),o}(n,r,HZ(o.Strings,t.v,o.revStrings),a));else O0(e,516,function(e,t,n,r,o){var a=!o||8==o.biff,i=h$(+a+8+(1+a)*n.length);return $J(e,t,r,i),i.write_shift(2,n.length),a&&i.write_shift(1,1),i.write_shift((1+a)*n.length,n,a?"utf16le":"sbcs"),i}(n,r,(t.v||"").slice(0,255),a,o));break;default:O0(e,513,$J(n,r,a))}else O0(e,513,$J(n,r,a))}function _0(e,t,n){var r,o=m$(),a=n.SheetNames[e],i=n.Sheets[a]||{},l=(n||{}).Workbook||{},c=(l.Sheets||[])[e]||{},s=Array.isArray(i),d=8==t.biff,u="",f=[],p=A$(i["!ref"]||"A1"),h=d?65536:16384;if(p.e.c>255||p.e.r>=h){if(t.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");p.e.c=Math.min(p.e.c,255),p.e.r=Math.min(p.e.c,h-1)}O0(o,2057,eQ(0,16,t)),O0(o,13,FJ(1)),O0(o,12,FJ(100)),O0(o,15,zJ(!0)),O0(o,17,zJ(!1)),O0(o,16,aJ(.001)),O0(o,95,zJ(!0)),O0(o,42,zJ(!1)),O0(o,43,zJ(!1)),O0(o,130,FJ(1)),O0(o,128,function(e){var t=h$(8);return t.write_shift(4,0),t.write_shift(2,e[0]?e[0]+1:0),t.write_shift(2,e[1]?e[1]+1:0),t}([0,0])),O0(o,131,zJ(!1)),O0(o,132,zJ(!1)),d&&D0(o,i["!cols"]),O0(o,512,function(e,t){var n=8!=t.biff&&t.biff?2:4,r=h$(2*n+6);return r.write_shift(n,e.s.r),r.write_shift(n,e.e.r+1),r.write_shift(2,e.s.c),r.write_shift(2,e.e.c+1),r.write_shift(2,0),r}(p,t)),d&&(i["!links"]=[]);for(var m=p.s.r;m<=p.e.r;++m){u=C$(m);for(var g=p.s.c;g<=p.e.c;++g){m===p.s.r&&(f[g]=E$(g)),r=f[g]+u;var v=s?(i[m]||[])[g]:i[r];v&&(L0(o,v,m,g,t),d&&v.l&&i["!links"].push([r,v.l]))}}var b=c.CodeName||c.name||a;return d&&O0(o,574,function(e){var t=h$(18),n=1718;return e&&e.RTL&&(n|=64),t.write_shift(2,n),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}((l.Views||[])[0])),d&&(i["!merges"]||[]).length&&O0(o,229,function(e){var t=h$(2+8*e.length);t.write_shift(2,e.length);for(var n=0;n<e.length;++n)ZJ(e[n],t);return t}(i["!merges"])),d&&function(e,t){for(var n=0;n<t["!links"].length;++n){var r=t["!links"][n];O0(e,440,aQ(r)),r[1].Tooltip&&O0(e,2048,iQ(r))}delete t["!links"]}(o,i),O0(o,442,qJ(b)),d&&function(e,t){var n=h$(19);n.write_shift(4,2151),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(2,3),n.write_shift(1,1),n.write_shift(4,0),O0(e,2151,n),(n=h$(39)).write_shift(4,2152),n.write_shift(4,0),n.write_shift(4,0),n.write_shift(2,3),n.write_shift(1,0),n.write_shift(4,0),n.write_shift(2,1),n.write_shift(4,4),n.write_shift(2,0),ZJ(A$(t["!ref"]||"A1"),n),n.write_shift(4,4),O0(e,2152,n)}(o,i),O0(o,10),o.end()}function z0(e,t,n){var r=m$(),o=(e||{}).Workbook||{},a=o.Sheets||[],i=o.WBProps||{},l=8==n.biff,c=5==n.biff;(O0(r,2057,eQ(0,5,n)),"xla"==n.bookType&&O0(r,135),O0(r,225,l?FJ(1200):null),O0(r,193,function(e,t){t||(t=h$(e));for(var n=0;n<e;++n)t.write_shift(1,0);return t}(2)),c&&O0(r,191),c&&O0(r,192),O0(r,226),O0(r,92,function(e,t){var n=!t||8==t.biff,r=h$(n?112:54);for(r.write_shift(8==t.biff?2:1,7),n&&r.write_shift(1,0),r.write_shift(4,859007059),r.write_shift(4,5458548|(n?0:536870912));r.l<r.length;)r.write_shift(1,n?0:32);return r}(0,n)),O0(r,66,FJ(l?1200:1252)),l&&O0(r,353,FJ(0)),l&&O0(r,448),O0(r,317,function(e){for(var t=h$(2*e),n=0;n<e;++n)t.write_shift(2,n+1);return t}(e.SheetNames.length)),l&&e.vbaraw&&O0(r,211),l&&e.vbaraw)&&O0(r,442,qJ(i.CodeName||"ThisWorkbook"));O0(r,156,FJ(17)),O0(r,25,zJ(!1)),O0(r,18,zJ(!1)),O0(r,19,FJ(0)),l&&O0(r,431,zJ(!1)),l&&O0(r,444,FJ(0)),O0(r,61,function(){var e=h$(18);return e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,29280),e.write_shift(2,17600),e.write_shift(2,56),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,1),e.write_shift(2,500),e}()),O0(r,64,zJ(!1)),O0(r,141,FJ(0)),O0(r,34,zJ("true"==function(e){return e.Workbook&&e.Workbook.WBProps&&gY(e.Workbook.WBProps.date1904)?"true":"false"}(e))),O0(r,14,zJ(!0)),l&&O0(r,439,zJ(!1)),O0(r,218,FJ(0)),M0(r,0,n),function(e,t,n){t&&[[5,8],[23,26],[41,44],[50,392]].forEach((function(r){for(var o=r[0];o<=r[1];++o)null!=t[o]&&O0(e,1054,nQ(o,t[o],n))}))}(r,e.SSF,n),function(e,t){for(var n=0;n<16;++n)O0(e,224,rQ({numFmtId:0,style:!0},0,t));t.cellXfs.forEach((function(n){O0(e,224,rQ(n,0,t))}))}(r,n),l&&O0(r,352,zJ(!1));var s=r.end(),d=m$();l&&O0(d,140,function(e){return e||(e=h$(4)),e.write_shift(2,1),e.write_shift(2,1),e}()),l&&n.Strings&&function(e,t,n,r){var o=r||(n||[]).length||0;if(o<=8224)return O0(e,t,n,o);var a=t;if(!isNaN(a)){for(var i=n.parts||[],l=0,c=0,s=0;s+(i[l]||8224)<=8224;)s+=i[l]||8224,l++;var d=e.next(4);for(d.write_shift(2,a),d.write_shift(2,s),e.push(n.slice(c,c+s)),c+=s;c<o;){for((d=e.next(4)).write_shift(2,60),s=0;s+(i[l]||8224)<=8224;)s+=i[l]||8224,l++;d.write_shift(2,s),e.push(n.slice(c,c+s)),c+=s}}}(d,252,function(e,t){var n=h$(8);n.write_shift(4,e.Count),n.write_shift(4,e.Unique);for(var r=[],o=0;o<e.length;++o)r[o]=VJ(e[o]);var a=Bq([n].concat(r));return a.parts=[n.length].concat(r.map((function(e){return e.length}))),a}(n.Strings)),O0(d,10);var u=d.end(),f=m$(),p=0,h=0;for(h=0;h<e.SheetNames.length;++h)p+=(l?12:11)+(l?2:1)*e.SheetNames[h].length;var m=s.length+p+u.length;for(h=0;h<e.SheetNames.length;++h){O0(f,133,tQ({pos:m,hs:(a[h]||{}).Hidden||0,dt:0,name:e.SheetNames[h]},n)),m+=t[h].length}var g=f.end();if(p!=g.length)throw new Error("BS8 "+p+" != "+g.length);var v=[];return s.length&&v.push(s),g.length&&v.push(g),u.length&&v.push(u),Bq(v)}function B0(e,t){for(var n=0;n<=e.SheetNames.length;++n){var r=e.Sheets[e.SheetNames[n]];if(r&&r["!ref"])I$(r["!ref"]).e.c>255&&"undefined"!=typeof console&&console.error&&console.error("Worksheet '"+e.SheetNames[n]+"' extends beyond column IV (255).  Data may be lost.")}var o=t||{};switch(o.biff||2){case 8:case 5:return function(e,t){var n=t||{},r=[];e&&!e.SSF&&(e.SSF=eY(Jq)),e&&e.SSF&&(RX(),NX(e.SSF),n.revssf=WX(e.SSF),n.revssf[e.SSF[65535]]=0,n.ssf=e.SSF),n.Strings=[],n.Strings.Count=0,n.Strings.Unique=0,m1(n),n.cellXfs=[],UZ(n.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var o=0;o<e.SheetNames.length;++o)r[r.length]=_0(o,n,e);return r.unshift(z0(e,r,n)),Bq(r)}(e,t);case 4:case 3:case 2:return P0(e,t)}throw new Error("invalid type "+o.bookType+" for BIFF")}function F0(e,t,n,r){for(var o=e["!merges"]||[],a=[],i=t.s.c;i<=t.e.c;++i){for(var l=0,c=0,s=0;s<o.length;++s)if(!(o[s].s.r>n||o[s].s.c>i)&&!(o[s].e.r<n||o[s].e.c<i)){if(o[s].s.r<n||o[s].s.c<i){l=-1;break}l=o[s].e.r-o[s].s.r+1,c=o[s].e.c-o[s].s.c+1;break}if(!(l<0)){var d=j$({r:n,c:i}),u=r.dense?(e[n]||[])[i]:e[d],f=u&&null!=u.v&&(u.h||mY(u.w||(N$(u),u.w)||""))||"",p={};l>1&&(p.rowspan=l),c>1&&(p.colspan=c),r.editable?f='<span contenteditable="true">'+f+"</span>":u&&(p["data-t"]=u&&u.t||"z",null!=u.v&&(p["data-v"]=u.v),null!=u.z&&(p["data-z"]=u.z),u.l&&"#"!=(u.l.Target||"#").charAt(0)&&(f='<a href="'+u.l.Target+'">'+f+"</a>")),p.id=(r.id||"sjs")+"-"+d,a.push(IY("td",f,p))}}return"<tr>"+a.join("")+"</tr>"}var H0='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',W0="</body></html>";function V0(e,t,n){return[].join("")+"<table"+(n&&n.id?' id="'+n.id+'"':"")+">"}function U0(e,t){var n=t||{},r=null!=n.header?n.header:H0,o=null!=n.footer?n.footer:W0,a=[r],i=I$(e["!ref"]);n.dense=Array.isArray(e),a.push(V0(0,0,n));for(var l=i.s.r;l<=i.e.r;++l)a.push(F0(e,i,l,n));return a.push("</table>"+o),a.join("")}function K0(e,t,n){var r=n||{};null!=Tq&&(r.dense=Tq);var o=0,a=0;if(null!=r.origin)if("number"==typeof r.origin)o=r.origin;else{var i="string"==typeof r.origin?k$(r.origin):r.origin;o=i.r,a=i.c}var l=t.getElementsByTagName("tr"),c=Math.min(r.sheetRows||1e7,l.length),s={s:{r:0,c:0},e:{r:o,c:a}};if(e["!ref"]){var d=I$(e["!ref"]);s.s.r=Math.min(s.s.r,d.s.r),s.s.c=Math.min(s.s.c,d.s.c),s.e.r=Math.max(s.e.r,d.e.r),s.e.c=Math.max(s.e.c,d.e.c),-1==o&&(s.e.r=o=d.e.r+1)}var u=[],f=0,p=e["!rows"]||(e["!rows"]=[]),h=0,m=0,g=0,v=0,b=0,y=0;for(e["!cols"]||(e["!cols"]=[]);h<l.length&&m<c;++h){var x=l[h];if(q0(x)){if(r.display)continue;p[m]={hidden:!0}}var w=x.children;for(g=v=0;g<w.length;++g){var C=w[g];if(!r.display||!q0(C)){var S=C.hasAttribute("data-v")?C.getAttribute("data-v"):C.hasAttribute("v")?C.getAttribute("v"):SY(C.innerHTML),E=C.getAttribute("data-z")||C.getAttribute("z");for(f=0;f<u.length;++f){var k=u[f];k.s.c==v+a&&k.s.r<m+o&&m+o<=k.e.r&&(v=k.e.c+1-a,f=-1)}y=+C.getAttribute("colspan")||1,((b=+C.getAttribute("rowspan")||1)>1||y>1)&&u.push({s:{r:m+o,c:v+a},e:{r:m+o+(b||1)-1,c:v+a+(y||1)-1}});var j={t:"s",v:S},I=C.getAttribute("data-t")||C.getAttribute("t")||"";null!=S&&(0==S.length?j.t=I||"z":r.raw||0==S.trim().length||"s"==I||("TRUE"===S?j={t:"b",v:!0}:"FALSE"===S?j={t:"b",v:!1}:isNaN(nY(S))?isNaN(oY(S).getDate())||(j={t:"d",v:QX(S)},r.cellDates||(j={t:"n",v:UX(j.v)}),j.z=r.dateNF||Jq[14]):j={t:"n",v:nY(S)})),void 0===j.z&&null!=E&&(j.z=E);var T="",A=C.getElementsByTagName("A");if(A&&A.length)for(var O=0;O<A.length&&(!A[O].hasAttribute("href")||"#"==(T=A[O].getAttribute("href")).charAt(0));++O);T&&"#"!=T.charAt(0)&&(j.l={Target:T}),r.dense?(e[m+o]||(e[m+o]=[]),e[m+o][v+a]=j):e[j$({c:v+a,r:m+o})]=j,s.e.c<v+a&&(s.e.c=v+a),v+=y}}++m}return u.length&&(e["!merges"]=(e["!merges"]||[]).concat(u)),s.e.r=Math.max(s.e.r,m-1+o),e["!ref"]=T$(s),m>=c&&(e["!fullref"]=T$((s.e.r=l.length-h+m-1+o,s))),e}function G0(e,t){return K0((t||{}).dense?[]:{},e,t)}function q0(e){var t="",n=function(e){return e.ownerDocument.defaultView&&"function"===typeof e.ownerDocument.defaultView.getComputedStyle?e.ownerDocument.defaultView.getComputedStyle:"function"===typeof getComputedStyle?getComputedStyle:null}(e);return n&&(t=n(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),"none"===t}var X0=function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),t="<office:document-styles "+jY({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function(){return lY+t}}(),Y0=function(){var e="          <table:table-cell />\n",t=function(t,n,r){var o=[];o.push('      <table:table table:name="'+fY(n.SheetNames[r])+'" table:style-name="ta1">\n');var a=0,i=0,l=I$(t["!ref"]||"A1"),c=t["!merges"]||[],s=0,d=Array.isArray(t);if(t["!cols"])for(i=0;i<=l.e.c;++i)o.push("        <table:table-column"+(t["!cols"][i]?' table:style-name="co'+t["!cols"][i].ods+'"':"")+"></table:table-column>\n");var u="",f=t["!rows"]||[];for(a=0;a<l.s.r;++a)u=f[a]?' table:style-name="ro'+f[a].ods+'"':"",o.push("        <table:table-row"+u+"></table:table-row>\n");for(;a<=l.e.r;++a){for(u=f[a]?' table:style-name="ro'+f[a].ods+'"':"",o.push("        <table:table-row"+u+">\n"),i=0;i<l.s.c;++i)o.push(e);for(;i<=l.e.c;++i){var p=!1,h={},m="";for(s=0;s!=c.length;++s)if(!(c[s].s.c>i)&&!(c[s].s.r>a)&&!(c[s].e.c<i)&&!(c[s].e.r<a)){c[s].s.c==i&&c[s].s.r==a||(p=!0),h["table:number-columns-spanned"]=c[s].e.c-c[s].s.c+1,h["table:number-rows-spanned"]=c[s].e.r-c[s].s.r+1;break}if(p)o.push("          <table:covered-table-cell/>\n");else{var g=j$({r:a,c:i}),v=d?(t[a]||[])[i]:t[g];if(v&&v.f&&(h["table:formula"]=fY(("of:="+v.f.replace(nZ,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")),v.F&&v.F.slice(0,g.length)==g)){var b=I$(v.F);h["table:number-matrix-columns-spanned"]=b.e.c-b.s.c+1,h["table:number-matrix-rows-spanned"]=b.e.r-b.s.r+1}if(v){switch(v.t){case"b":m=v.v?"TRUE":"FALSE",h["office:value-type"]="boolean",h["office:boolean-value"]=v.v?"true":"false";break;case"n":m=v.w||String(v.v||0),h["office:value-type"]="float",h["office:value"]=v.v||0;break;case"s":case"str":m=null==v.v?"":v.v,h["office:value-type"]="string";break;case"d":m=v.w||QX(v.v).toISOString(),h["office:value-type"]="date",h["office:date-value"]=QX(v.v).toISOString(),h["table:style-name"]="ce1";break;default:o.push(e);continue}var y=fY(m).replace(/  +/g,(function(e){return'<text:s text:c="'+e.length+'"/>'})).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>");if(v.l&&v.l.Target){var x=v.l.Target;"#"==(x="#"==x.charAt(0)?"#"+x.slice(1).replace(/\./,"!"):x).charAt(0)||x.match(/^\w+:/)||(x="../"+x),y=IY("text:a",y,{"xlink:href":x.replace(/&/g,"&amp;")})}o.push("          "+IY("table:table-cell",IY("text:p",y,{}),h)+"\n")}else o.push(e)}}o.push("        </table:table-row>\n")}return o.push("      </table:table>\n"),o.join("")};return function(e,n){var r=[lY],o=jY({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),a=jY({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==n.bookType?(r.push("<office:document"+o+a+">\n"),r.push(SJ().replace(/office:document-meta/g,"office:meta"))):r.push("<office:document-content"+o+">\n"),function(e,t){e.push(" <office:automatic-styles>\n"),e.push('  <number:date-style style:name="N37" number:automatic-order="true">\n'),e.push('   <number:month number:style="long"/>\n'),e.push("   <number:text>/</number:text>\n"),e.push('   <number:day number:style="long"/>\n'),e.push("   <number:text>/</number:text>\n"),e.push("   <number:year/>\n"),e.push("  </number:date-style>\n");var n=0;t.SheetNames.map((function(e){return t.Sheets[e]})).forEach((function(t){if(t&&t["!cols"])for(var r=0;r<t["!cols"].length;++r)if(t["!cols"][r]){var o=t["!cols"][r];if(null==o.width&&null==o.wpx&&null==o.wch)continue;IQ(o),o.ods=n;var a=t["!cols"][r].wpx+"px";e.push('  <style:style style:name="co'+n+'" style:family="table-column">\n'),e.push('   <style:table-column-properties fo:break-before="auto" style:column-width="'+a+'"/>\n'),e.push("  </style:style>\n"),++n}}));var r=0;t.SheetNames.map((function(e){return t.Sheets[e]})).forEach((function(t){if(t&&t["!rows"])for(var n=0;n<t["!rows"].length;++n)if(t["!rows"][n]){t["!rows"][n].ods=r;var o=t["!rows"][n].hpx+"px";e.push('  <style:style style:name="ro'+r+'" style:family="table-row">\n'),e.push('   <style:table-row-properties fo:break-before="auto" style:row-height="'+o+'"/>\n'),e.push("  </style:style>\n"),++r}})),e.push('  <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">\n'),e.push('   <style:table-properties table:display="true" style:writing-mode="lr-tb"/>\n'),e.push("  </style:style>\n"),e.push('  <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>\n'),e.push(" </office:automatic-styles>\n")}(r,e),r.push("  <office:body>\n"),r.push("    <office:spreadsheet>\n");for(var i=0;i!=e.SheetNames.length;++i)r.push(t(e.Sheets[e.SheetNames[i]],e,i));return r.push("    </office:spreadsheet>\n"),r.push("  </office:body>\n"),"fods"==n.bookType?r.push("</office:document>"):r.push("</office:document-content>"),r.join("")}}();function $0(e,t){if("fods"==t.bookType)return Y0(e,t);var n=iY(),r="",o=[],a=[];return aY(n,r="mimetype","application/vnd.oasis.opendocument.spreadsheet"),aY(n,r="content.xml",Y0(e,t)),o.push([r,"text/xml"]),a.push([r,"ContentFile"]),aY(n,r="styles.xml",X0(e,t)),o.push([r,"text/xml"]),a.push([r,"StylesFile"]),aY(n,r="meta.xml",lY+SJ()),o.push([r,"text/xml"]),a.push([r,"MetadataFile"]),aY(n,r="manifest.rdf",function(e){var t,n,r=[lY];r.push('<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n');for(var o=0;o!=e.length;++o)r.push(CJ(e[o][0],e[o][1])),r.push((t="",n=e[o][0],['  <rdf:Description rdf:about="'+t+'">\n','    <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+n+'"/>\n',"  </rdf:Description>\n"].join("")));return r.push(CJ("","Document","pkg")),r.push("</rdf:RDF>"),r.join("")}(a)),o.push([r,"application/rdf+xml"]),aY(n,r="META-INF/manifest.xml",function(e){var t=[lY];t.push('<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">\n'),t.push('  <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>\n');for(var n=0;n<e.length;++n)t.push('  <manifest:file-entry manifest:full-path="'+e[n][0]+'" manifest:media-type="'+e[n][1]+'"/>\n');return t.push("</manifest:manifest>"),t.join("")}(o)),n}function J0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q0(e){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(e):Lq(CY(e))}function Z0(e){var t=e.reduce((function(e,t){return e+t.length}),0),n=new Uint8Array(t),r=0;return e.forEach((function(e){n.set(e,r),r+=e.length})),n}function e1(e,t){var n=t?t[0]:0,r=127&e[n];e:if(e[n++]>=128){if(r|=(127&e[n])<<7,e[n++]<128)break e;if(r|=(127&e[n])<<14,e[n++]<128)break e;if(r|=(127&e[n])<<21,e[n++]<128)break e;if(r+=(127&e[n])*Math.pow(2,28),++n,e[n++]<128)break e;if(r+=(127&e[n])*Math.pow(2,35),++n,e[n++]<128)break e;if(r+=(127&e[n])*Math.pow(2,42),++n,e[n++]<128)break e}return t&&(t[0]=n),r}function t1(e){var t=new Uint8Array(7);t[0]=127&e;var n=1;e:if(e>127){if(t[n-1]|=128,t[n]=e>>7&127,++n,e<=16383)break e;if(t[n-1]|=128,t[n]=e>>14&127,++n,e<=2097151)break e;if(t[n-1]|=128,t[n]=e>>21&127,++n,e<=268435455)break e;if(t[n-1]|=128,t[n]=e/256>>>21&127,++n,e<=34359738367)break e;if(t[n-1]|=128,t[n]=e/65536>>>21&127,++n,e<=4398046511103)break e;t[n-1]|=128,t[n]=e/16777216>>>21&127,++n}return t.slice(0,n)}function n1(e){var t=0,n=127&e[t];e:if(e[t++]>=128){if(n|=(127&e[t])<<7,e[t++]<128)break e;if(n|=(127&e[t])<<14,e[t++]<128)break e;if(n|=(127&e[t])<<21,e[t++]<128)break e;n|=(127&e[t])<<28}return n}function r1(e){for(var t=[],n=[0];n[0]<e.length;){var r,o=n[0],a=e1(e,n),i=7&a,l=0;if(0==(a=Math.floor(a/8)))break;switch(i){case 0:for(var c=n[0];e[n[0]++]>=128;);r=e.slice(c,n[0]);break;case 5:l=4,r=e.slice(n[0],n[0]+l),n[0]+=l;break;case 1:l=8,r=e.slice(n[0],n[0]+l),n[0]+=l;break;case 2:l=e1(e,n),r=e.slice(n[0],n[0]+l),n[0]+=l;break;default:throw new Error("PB Type ".concat(i," for Field ").concat(a," at offset ").concat(o))}var s={data:r,type:i};null==t[a]?t[a]=[s]:t[a].push(s)}return t}function o1(e){var t=[];return e.forEach((function(e,n){e.forEach((function(e){e.data&&(t.push(t1(8*n+e.type)),2==e.type&&t.push(t1(e.data.length)),t.push(e.data))}))})),Z0(t)}function a1(e){for(var t,n=[],r=[0];r[0]<e.length;){var o=e1(e,r),a=r1(e.slice(r[0],r[0]+o));r[0]+=o;var i={id:n1(a[1][0].data),messages:[]};a[2].forEach((function(t){var n=r1(t.data),o=n1(n[3][0].data);i.messages.push({meta:n,data:e.slice(r[0],r[0]+o)}),r[0]+=o})),(null==(t=a[3])?void 0:t[0])&&(i.merge=n1(a[3][0].data)>>>0>0),n.push(i)}return n}function i1(e){var t=[];return e.forEach((function(e){var n=[];n[1]=[{data:t1(e.id),type:0}],n[2]=[],null!=e.merge&&(n[3]=[{data:t1(+!!e.merge),type:0}]);var r=[];e.messages.forEach((function(e){r.push(e.data),e.meta[3]=[{type:0,data:t1(e.data.length)}],n[2].push({data:o1(e.meta),type:2})}));var o=o1(n);t.push(t1(o.length)),t.push(o),r.forEach((function(e){return t.push(e)}))})),Z0(t)}function l1(e,t){if(0!=e)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var n=[0],r=e1(t,n),o=[];n[0]<t.length;){var a=3&t[n[0]];if(0!=a){var i=0,l=0;if(1==a?(l=4+(t[n[0]]>>2&7),i=(224&t[n[0]++])<<3,i|=t[n[0]++]):(l=1+(t[n[0]++]>>2),2==a?(i=t[n[0]]|t[n[0]+1]<<8,n[0]+=2):(i=(t[n[0]]|t[n[0]+1]<<8|t[n[0]+2]<<16|t[n[0]+3]<<24)>>>0,n[0]+=4)),o=[Z0(o)],0==i)throw new Error("Invalid offset 0");if(i>o[0].length)throw new Error("Invalid offset beyond length");if(l>=i)for(o.push(o[0].slice(-i)),l-=i;l>=o[o.length-1].length;)o.push(o[o.length-1]),l-=o[o.length-1].length;o.push(o[0].slice(-i,-i+l))}else{var c=t[n[0]++]>>2;if(c<60)++c;else{var s=c-59;c=t[n[0]],s>1&&(c|=t[n[0]+1]<<8),s>2&&(c|=t[n[0]+2]<<16),s>3&&(c|=t[n[0]+3]<<24),c>>>=0,c++,n[0]+=s}o.push(t.slice(n[0],n[0]+c)),n[0]+=c}}var d=Z0(o);if(d.length!=r)throw new Error("Unexpected length: ".concat(d.length," != ").concat(r));return d}function c1(e){for(var t=[],n=0;n<e.length;){var r=e[n++],o=e[n]|e[n+1]<<8|e[n+2]<<16;n+=3,t.push(l1(r,e.slice(n,n+o))),n+=o}if(n!==e.length)throw new Error("data is not a valid framed stream!");return Z0(t)}function s1(e){for(var t=[],n=0;n<e.length;){var r=Math.min(e.length-n,268435455),o=new Uint8Array(4);t.push(o);var a=t1(r),i=a.length;t.push(a),r<=60?(i++,t.push(new Uint8Array([r-1<<2]))):r<=256?(i+=2,t.push(new Uint8Array([240,r-1&255]))):r<=65536?(i+=3,t.push(new Uint8Array([244,r-1&255,r-1>>8&255]))):r<=16777216?(i+=4,t.push(new Uint8Array([248,r-1&255,r-1>>8&255,r-1>>16&255]))):r<=4294967296&&(i+=5,t.push(new Uint8Array([252,r-1&255,r-1>>8&255,r-1>>16&255,r-1>>>24&255]))),t.push(e.slice(n,n+r)),i+=r,o[0]=0,o[1]=255&i,o[2]=i>>8&255,o[3]=i>>16&255,n+=r}return Z0(t)}function d1(e,t){var n=new Uint8Array(32),r=J0(n),o=12,a=0;switch(n[0]=5,e.t){case"n":n[1]=2,function(e,t,n){var r=Math.floor(0==n?0:Math.LOG10E*Math.log(Math.abs(n)))+6176-20,o=n/Math.pow(10,r-6176);e[t+15]|=r>>7,e[t+14]|=(127&r)<<1;for(var a=0;o>=1;++a,o/=256)e[t+a]=255&o;e[t+15]|=n>=0?0:128}(n,o,e.v),a|=1,o+=16;break;case"b":n[1]=6,r.setFloat64(o,e.v?1:0,!0),a|=2,o+=8;break;case"s":if(-1==t.indexOf(e.v))throw new Error("Value ".concat(e.v," missing from SST!"));n[1]=3,r.setUint32(o,t.indexOf(e.v),!0),a|=8,o+=4;break;default:throw"unsupported cell type "+e.t}return r.setUint32(8,a,!0),n.slice(0,o)}function u1(e,t){var n=new Uint8Array(32),r=J0(n),o=12,a=0;switch(n[0]=3,e.t){case"n":n[2]=2,r.setFloat64(o,e.v,!0),a|=32,o+=8;break;case"b":n[2]=6,r.setFloat64(o,e.v?1:0,!0),a|=32,o+=8;break;case"s":if(-1==t.indexOf(e.v))throw new Error("Value ".concat(e.v," missing from SST!"));n[2]=3,r.setUint32(o,t.indexOf(e.v),!0),a|=16,o+=4;break;default:throw"unsupported cell type "+e.t}return r.setUint32(4,a,!0),n.slice(0,o)}function f1(e){return e1(r1(e)[1][0].data)}function p1(e,t,n){var r,o,a,i;if(!(null==(r=e[6])?void 0:r[0])||!(null==(o=e[7])?void 0:o[0]))throw"Mutation only works on post-BNC storages!";if((null==(i=null==(a=e[8])?void 0:a[0])?void 0:i.data)&&n1(e[8][0].data)>0||!1)throw"Math only works with normal offsets";for(var l=0,c=J0(e[7][0].data),s=0,d=[],u=J0(e[4][0].data),f=0,p=[],h=0;h<t.length;++h)if(null!=t[h]){var m,g;switch(c.setUint16(2*h,s,!0),u.setUint16(2*h,f,!0),typeof t[h]){case"string":m=d1({t:"s",v:t[h]},n),g=u1({t:"s",v:t[h]},n);break;case"number":m=d1({t:"n",v:t[h]},n),g=u1({t:"n",v:t[h]},n);break;case"boolean":m=d1({t:"b",v:t[h]},n),g=u1({t:"b",v:t[h]},n);break;default:throw new Error("Unsupported value "+t[h])}d.push(m),s+=m.length,p.push(g),f+=g.length,++l}else c.setUint16(2*h,65535,!0),u.setUint16(2*h,65535);for(e[2][0].data=t1(l);h<e[7][0].data.length/2;++h)c.setUint16(2*h,65535,!0),u.setUint16(2*h,65535,!0);return e[6][0].data=Z0(d),e[3][0].data=Z0(p),l}function h1(e){return function(t){for(var n=0;n!=e.length;++n){var r=e[n];void 0===t[r[0]]&&(t[r[0]]=r[1]),"n"===r[2]&&(t[r[0]]=Number(t[r[0]]))}}}function m1(e){h1([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function g1(e,t){return"ods"==t.bookType?$0(e,t):"numbers"==t.bookType?function(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var n=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var r=I$(n["!ref"]);r.s.r=r.s.c=0;var o=!1;r.e.c>9&&(o=!0,r.e.c=9),r.e.r>49&&(o=!0,r.e.r=49),o&&console.error("The Numbers writer is currently limited to ".concat(T$(r)));var a=k1(n,{range:r,header:1}),i=["~Sh33tJ5~"];a.forEach((function(e){return e.forEach((function(e){"string"==typeof e&&i.push(e)}))}));var l={},c=[],s=DX.read(t.numbers,{type:"base64"});s.FileIndex.map((function(e,t){return[e,s.FullPaths[t]]})).forEach((function(e){var t=e[0],n=e[1];2==t.type&&t.name.match(/\.iwa/)&&a1(c1(t.content)).forEach((function(e){c.push(e.id),l[e.id]={deps:[],location:n,type:n1(e.messages[0].meta[1][0].data)}}))})),c.sort((function(e,t){return e-t}));var d=c.filter((function(e){return e>1})).map((function(e){return[e,t1(e)]}));s.FileIndex.map((function(e,t){return[e,s.FullPaths[t]]})).forEach((function(e){var t=e[0];e[1],t.name.match(/\.iwa/)&&a1(c1(t.content)).forEach((function(e){e.messages.forEach((function(t){d.forEach((function(t){e.messages.some((function(e){return 11006!=n1(e.meta[1][0].data)&&function(e,t){e:for(var n=0;n<=e.length-t.length;++n){for(var r=0;r<t.length;++r)if(e[n+r]!=t[r])continue e;return!0}return!1}(e.data,t[1])}))&&l[t[0]].deps.push(e.id)}))}))}))}));for(var u,f=DX.find(s,l[1].location),p=a1(c1(f.content)),h=0;h<p.length;++h){var m=p[h];1==m.id&&(u=m)}var g=f1(r1(u.messages[0].data)[1][0].data);for(p=a1(c1((f=DX.find(s,l[g].location)).content)),h=0;h<p.length;++h)(m=p[h]).id==g&&(u=m);for(g=f1(r1(u.messages[0].data)[2][0].data),p=a1(c1((f=DX.find(s,l[g].location)).content)),h=0;h<p.length;++h)(m=p[h]).id==g&&(u=m);for(g=f1(r1(u.messages[0].data)[2][0].data),p=a1(c1((f=DX.find(s,l[g].location)).content)),h=0;h<p.length;++h)(m=p[h]).id==g&&(u=m);var v=r1(u.messages[0].data);v[6][0].data=t1(r.e.r+1),v[7][0].data=t1(r.e.c+1);for(var b=f1(v[46][0].data),y=DX.find(s,l[b].location),x=a1(c1(y.content)),w=0;w<x.length&&x[w].id!=b;++w);if(x[w].id!=b)throw"Bad ColumnRowUIDMapArchive";var C=r1(x[w].messages[0].data);C[1]=[],C[2]=[],C[3]=[];for(var S=0;S<=r.e.c;++S){var E=[];E[1]=E[2]=[{type:0,data:t1(S+420690)}],C[1].push({type:2,data:o1(E)}),C[2].push({type:0,data:t1(S)}),C[3].push({type:0,data:t1(S)})}C[4]=[],C[5]=[],C[6]=[];for(var k=0;k<=r.e.r;++k)(E=[])[1]=E[2]=[{type:0,data:t1(k+726270)}],C[4].push({type:2,data:o1(E)}),C[5].push({type:0,data:t1(k)}),C[6].push({type:0,data:t1(k)});x[w].messages[0].data=o1(C),y.content=s1(i1(x)),y.size=y.content.length,delete v[46];var j=r1(v[4][0].data);j[7][0].data=t1(r.e.r+1);var I=f1(r1(j[1][0].data)[2][0].data);if((x=a1(c1((y=DX.find(s,l[I].location)).content)))[0].id!=I)throw"Bad HeaderStorageBucket";var T=r1(x[0].messages[0].data);for(k=0;k<a.length;++k){var A=r1(T[2][0].data);A[1][0].data=t1(k),A[4][0].data=t1(a[k].length),T[2][k]={type:T[2][0].type,data:o1(A)}}x[0].messages[0].data=o1(T),y.content=s1(i1(x)),y.size=y.content.length;var O=f1(j[2][0].data);if((x=a1(c1((y=DX.find(s,l[O].location)).content)))[0].id!=O)throw"Bad HeaderStorageBucket";for(T=r1(x[0].messages[0].data),S=0;S<=r.e.c;++S)(A=r1(T[2][0].data))[1][0].data=t1(S),A[4][0].data=t1(r.e.r+1),T[2][S]={type:T[2][0].type,data:o1(A)};x[0].messages[0].data=o1(T),y.content=s1(i1(x)),y.size=y.content.length;var N=f1(j[4][0].data);!function(){for(var e,t=DX.find(s,l[N].location),n=a1(c1(t.content)),r=0;r<n.length;++r){var o=n[r];o.id==N&&(e=o)}var a=r1(e.messages[0].data);a[3]=[];var c=[];i.forEach((function(e,t){c[1]=[{type:0,data:t1(t)}],c[2]=[{type:0,data:t1(1)}],c[3]=[{type:2,data:Q0(e)}],a[3].push({type:2,data:o1(c)})})),e.messages[0].data=o1(a);var d=s1(i1(n));t.content=d,t.size=t.content.length}();var R=r1(j[3][0].data),P=R[1][0];delete R[2];var M=r1(P.data),D=f1(M[2][0].data);!function(){for(var e,t=DX.find(s,l[D].location),n=a1(c1(t.content)),o=0;o<n.length;++o){var c=n[o];c.id==D&&(e=c)}var d=r1(e.messages[0].data);delete d[6],delete R[7];var u=new Uint8Array(d[5][0].data);d[5]=[];for(var f=0,p=0;p<=r.e.r;++p){var h=r1(u);f+=p1(h,a[p],i),h[1][0].data=t1(p),d[5].push({data:o1(h),type:2})}d[1]=[{type:0,data:t1(r.e.c+1)}],d[2]=[{type:0,data:t1(r.e.r+1)}],d[3]=[{type:0,data:t1(f)}],d[4]=[{type:0,data:t1(r.e.r+1)}],e.messages[0].data=o1(d);var m=s1(i1(n));t.content=m,t.size=t.content.length}(),P.data=o1(M),j[3][0].data=o1(R),v[4][0].data=o1(j),u.messages[0].data=o1(v);var L=s1(i1(p));return f.content=L,f.size=f.content.length,s}(e,t):"xlsb"==t.bookType?function(e,t){XQ=1024,e&&!e.SSF&&(e.SSF=eY(Jq));e&&e.SSF&&(RX(),NX(e.SSF),t.revssf=WX(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF);t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,FZ?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n="xlsb"==t.bookType?"bin":"xml",r=eZ.indexOf(t.bookType)>-1,o={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};m1(t=t||{});var a=iY(),i="",l=0;t.cellXfs=[],UZ(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});if(aY(a,i="docProps/core.xml",jJ(e.Props,t)),o.coreprops.push(i),wJ(t.rels,2,i,bJ.CORE_PROPS),i="docProps/app.xml",e.Props&&e.Props.SheetNames);else if(e.Workbook&&e.Workbook.Sheets){for(var c=[],s=0;s<e.SheetNames.length;++s)2!=(e.Workbook.Sheets[s]||{}).Hidden&&c.push(e.SheetNames[s]);e.Props.SheetNames=c}else e.Props.SheetNames=e.SheetNames;e.Props.Worksheets=e.Props.SheetNames.length,aY(a,i,AJ(e.Props)),o.extprops.push(i),wJ(t.rels,3,i,bJ.EXT_PROPS),e.Custprops!==e.Props&&BX(e.Custprops||{}).length>0&&(aY(a,i="docProps/custom.xml",OJ(e.Custprops)),o.custprops.push(i),wJ(t.rels,4,i,bJ.CUST_PROPS));for(l=1;l<=e.SheetNames.length;++l){var d={"!id":{}},u=e.Sheets[e.SheetNames[l-1]];(u||{})["!type"];if(aY(a,i="xl/worksheets/sheet"+l+"."+n,y0(l-1,i,t,e,d)),o.sheets.push(i),wJ(t.wbrels,-1,"worksheets/sheet"+l+"."+n,bJ.WS[0]),u){var f=u["!comments"],p=!1,h="";f&&f.length>0&&(aY(a,h="xl/comments"+l+"."+n,x0(f,h,t)),o.comments.push(h),wJ(d,-1,"../comments"+l+"."+n,bJ.CMNT),p=!0),u["!legacy"]&&p&&aY(a,"xl/drawings/vmlDrawing"+l+".vml",YQ(l,u["!comments"])),delete u["!comments"],delete u["!legacy"]}d["!id"].rId1&&aY(a,yJ(i),xJ(d))}null!=t.Strings&&t.Strings.length>0&&(aY(a,i="xl/sharedStrings."+n,function(e,t,n){return(".bin"===t.slice(-4)?vQ:mQ)(e,n)}(t.Strings,i,t)),o.strs.push(i),wJ(t.wbrels,-1,"sharedStrings."+n,bJ.SST));aY(a,i="xl/workbook."+n,function(e,t,n){return(".bin"===t.slice(-4)?b0:m0)(e,n)}(e,i,t)),o.workbooks.push(i),wJ(t.rels,1,i,bJ.WB),aY(a,i="xl/theme/theme1.xml",KQ(e.Themes,t)),o.themes.push(i),wJ(t.wbrels,-1,"theme/theme1.xml",bJ.THEME),aY(a,i="xl/styles."+n,function(e,t,n){return(".bin"===t.slice(-4)?UQ:NQ)(e,n)}(e,i,t)),o.styles.push(i),wJ(t.wbrels,-1,"styles."+n,bJ.STY),e.vbaraw&&r&&(aY(a,i="xl/vbaProject.bin",e.vbaraw),o.vba.push(i),wJ(t.wbrels,-1,"vbaProject.bin",bJ.VBA));return aY(a,i="xl/metadata."+n,function(e){return(".bin"===e.slice(-4)?GQ:qQ)()}(i)),o.metadata.push(i),wJ(t.wbrels,-1,"metadata."+n,bJ.XLMETA),aY(a,"[Content_Types].xml",vJ(o,t)),aY(a,"_rels/.rels",xJ(t.rels)),aY(a,"xl/_rels/workbook."+n+".rels",xJ(t.wbrels)),delete t.revssf,delete t.ssf,a}(e,t):v1(e,t)}function v1(e,t){XQ=1024,e&&!e.SSF&&(e.SSF=eY(Jq)),e&&e.SSF&&(RX(),NX(e.SSF),t.revssf=WX(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,FZ?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n="xml",r=eZ.indexOf(t.bookType)>-1,o={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};m1(t=t||{});var a=iY(),i="",l=0;if(t.cellXfs=[],UZ(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),aY(a,i="docProps/core.xml",jJ(e.Props,t)),o.coreprops.push(i),wJ(t.rels,2,i,bJ.CORE_PROPS),i="docProps/app.xml",e.Props&&e.Props.SheetNames);else if(e.Workbook&&e.Workbook.Sheets){for(var c=[],s=0;s<e.SheetNames.length;++s)2!=(e.Workbook.Sheets[s]||{}).Hidden&&c.push(e.SheetNames[s]);e.Props.SheetNames=c}else e.Props.SheetNames=e.SheetNames;e.Props.Worksheets=e.Props.SheetNames.length,aY(a,i,AJ(e.Props)),o.extprops.push(i),wJ(t.rels,3,i,bJ.EXT_PROPS),e.Custprops!==e.Props&&BX(e.Custprops||{}).length>0&&(aY(a,i="docProps/custom.xml",OJ(e.Custprops)),o.custprops.push(i),wJ(t.rels,4,i,bJ.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,l=1;l<=e.SheetNames.length;++l){var u={"!id":{}},f=e.Sheets[e.SheetNames[l-1]];(f||{})["!type"];if(aY(a,i="xl/worksheets/sheet"+l+"."+n,YZ(l-1,t,e,u)),o.sheets.push(i),wJ(t.wbrels,-1,"worksheets/sheet"+l+"."+n,bJ.WS[0]),f){var p=f["!comments"],h=!1,m="";if(p&&p.length>0){var g=!1;p.forEach((function(e){e[1].forEach((function(e){1==e.T&&(g=!0)}))})),g&&(aY(a,m="xl/threadedComments/threadedComment"+l+"."+n,JQ(p,d,t)),o.threadedcomments.push(m),wJ(u,-1,"../threadedComments/threadedComment"+l+"."+n,bJ.TCMNT)),aY(a,m="xl/comments"+l+"."+n,$Q(p)),o.comments.push(m),wJ(u,-1,"../comments"+l+"."+n,bJ.CMNT),h=!0}f["!legacy"]&&h&&aY(a,"xl/drawings/vmlDrawing"+l+".vml",YQ(l,f["!comments"])),delete f["!comments"],delete f["!legacy"]}u["!id"].rId1&&aY(a,yJ(i),xJ(u))}return null!=t.Strings&&t.Strings.length>0&&(aY(a,i="xl/sharedStrings."+n,mQ(t.Strings,t)),o.strs.push(i),wJ(t.wbrels,-1,"sharedStrings."+n,bJ.SST)),aY(a,i="xl/workbook."+n,m0(e)),o.workbooks.push(i),wJ(t.rels,1,i,bJ.WB),aY(a,i="xl/theme/theme1.xml",KQ(e.Themes,t)),o.themes.push(i),wJ(t.wbrels,-1,"theme/theme1.xml",bJ.THEME),aY(a,i="xl/styles."+n,NQ(e,t)),o.styles.push(i),wJ(t.wbrels,-1,"styles."+n,bJ.STY),e.vbaraw&&r&&(aY(a,i="xl/vbaProject.bin",e.vbaraw),o.vba.push(i),wJ(t.wbrels,-1,"vbaProject.bin",bJ.VBA)),aY(a,i="xl/metadata."+n,qQ()),o.metadata.push(i),wJ(t.wbrels,-1,"metadata."+n,bJ.XLMETA),d.length>1&&(aY(a,i="xl/persons/person.xml",function(e){var t=[lY,IY("personList",null,{xmlns:AY.TCMNT,"xmlns:x":OY[0]}).replace(/[\/]>/,">")];return e.forEach((function(e,n){t.push(IY("person",null,{displayName:e,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:e,providerId:"None"}))})),t.push("</personList>"),t.join("")}(d)),o.people.push(i),wJ(t.wbrels,-1,"persons/person.xml",bJ.PEOPLE)),aY(a,"[Content_Types].xml",vJ(o,t)),aY(a,"_rels/.rels",xJ(t.rels)),aY(a,"xl/_rels/workbook.xml.rels",xJ(t.wbrels)),delete t.revssf,delete t.ssf,a}function b1(e,t){var n="";switch((t||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":n=Nq(e.slice(0,12));break;case"binary":n=e;break;default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function y1(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return zX(t.file,DX.write(e,{type:Rq?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return DX.write(e,t)}function x1(e,t){var n={},r=Rq?"nodebuffer":"undefined"!==typeof Uint8Array?"array":"string";if(t.compression&&(n.compression="DEFLATE"),t.password)n.type=r;else switch(t.type){case"base64":n.type="base64";break;case"binary":n.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":n.type=r;break;default:throw new Error("Unrecognized type "+t.type)}var o=e.FullPaths?DX.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[n.type]||n.type,compression:!!t.compression}):e.generate(n);if("undefined"!==typeof Deno&&"string"==typeof o){if("binary"==t.type||"base64"==t.type)return o;o=new Uint8Array(_q(o))}return t.password&&"undefined"!==typeof encrypt_agile?y1(encrypt_agile(o,t.password),t):"file"===t.type?zX(t.file,o):"string"==t.type?wY(o):o}function w1(e,t,n){n||(n="");var r=n+e;switch(t.type){case"base64":return Oq(CY(r));case"binary":return CY(r);case"string":return e;case"file":return zX(t.file,r,"utf8");case"buffer":return Rq?Pq(r,"utf8"):"undefined"!==typeof TextEncoder?(new TextEncoder).encode(r):w1(r,{type:"binary"}).split("").map((function(e){return e.charCodeAt(0)}))}throw new Error("Unrecognized type "+t.type)}function C1(e,t){switch(t.type){case"string":case"base64":case"binary":for(var n="",r=0;r<e.length;++r)n+=String.fromCharCode(e[r]);return"base64"==t.type?Oq(n):"string"==t.type?wY(n):n;case"file":return zX(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function S1(e,t){Sq(),h0(e);var n=eY(t||{});if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),"array"==n.type){n.type="binary";var r=S1(e,n);return n.type="array",_q(r)}var o=0;if(n.sheet&&(o="number"==typeof n.sheet?n.sheet:e.SheetNames.indexOf(n.sheet),!e.SheetNames[o]))throw new Error("Sheet not found: "+n.sheet+" : "+typeof n.sheet);switch(n.bookType||"xlsb"){case"xml":case"xlml":return w1(j0(e,n),n);case"slk":case"sylk":return w1(sQ.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"htm":case"html":return w1(U0(e.Sheets[e.SheetNames[o]],n),n);case"txt":return function(e,t){switch(t.type){case"base64":return Oq(e);case"binary":case"string":return e;case"file":return zX(t.file,e,"binary");case"buffer":return Rq?Pq(e,"binary"):e.split("").map((function(e){return e.charCodeAt(0)}))}throw new Error("Unrecognized type "+t.type)}(A1(e.Sheets[e.SheetNames[o]],n),n);case"csv":return w1(T1(e.Sheets[e.SheetNames[o]],n),n,"\ufeff");case"dif":return w1(dQ.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"dbf":return C1(cQ.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"prn":return w1(fQ.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"rtf":return w1(xQ.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"eth":return w1(uQ.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"fods":return w1($0(e,n),n);case"wk1":return C1(pQ.sheet_to_wk1(e.Sheets[e.SheetNames[o]],n),n);case"wk3":return C1(pQ.book_to_wk3(e,n),n);case"biff2":n.biff||(n.biff=2);case"biff3":n.biff||(n.biff=3);case"biff4":return n.biff||(n.biff=4),C1(B0(e,n),n);case"biff5":n.biff||(n.biff=5);case"biff8":case"xla":case"xls":return n.biff||(n.biff=8),function(e,t){var n=t||{};return y1(T0(e,n),n)}(e,n);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return function(e,t){var n=eY(t||{});return x1(g1(e,n),n)}(e,n);default:throw new Error("Unrecognized bookType |"+n.bookType+"|")}}function E1(e,t,n,r,o,a,i,l){var c=C$(n),s=l.defval,d=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw"),u=!0,f=1===o?[]:{};if(1!==o)if(Object.defineProperty)try{Object.defineProperty(f,"__rowNum__",{value:n,enumerable:!1})}catch(r5){f.__rowNum__=n}else f.__rowNum__=n;if(!i||e[n])for(var p=t.s.c;p<=t.e.c;++p){var h=i?e[n][p]:e[r[p]+c];if(void 0!==h&&void 0!==h.t){var m=h.v;switch(h.t){case"z":if(null==m)break;continue;case"e":m=0==m?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+h.t)}if(null!=a[p]){if(null==m)if("e"==h.t&&null===m)f[a[p]]=null;else if(void 0!==s)f[a[p]]=s;else{if(!d||null!==m)continue;f[a[p]]=null}else f[a[p]]=d&&("n"!==h.t||"n"===h.t&&!1!==l.rawNumbers)?m:N$(h,m,l);null!=m&&(u=!1)}}else{if(void 0===s)continue;null!=a[p]&&(f[a[p]]=s)}}return{row:f,isempty:u}}function k1(e,t){if(null==e||null==e["!ref"])return[];var n={t:"n",v:0},r=0,o=1,a=[],i=0,l="",c={s:{r:0,c:0},e:{r:0,c:0}},s=t||{},d=null!=s.range?s.range:e["!ref"];switch(1===s.header?r=1:"A"===s.header?r=2:Array.isArray(s.header)?r=3:null==s.header&&(r=0),typeof d){case"string":c=A$(d);break;case"number":(c=A$(e["!ref"])).s.r=d;break;default:c=d}r>0&&(o=0);var u=C$(c.s.r),f=[],p=[],h=0,m=0,g=Array.isArray(e),v=c.s.r,b=0,y={};g&&!e[v]&&(e[v]=[]);var x=s.skipHidden&&e["!cols"]||[],w=s.skipHidden&&e["!rows"]||[];for(b=c.s.c;b<=c.e.c;++b)if(!(x[b]||{}).hidden)switch(f[b]=E$(b),n=g?e[v][b]:e[f[b]+u],r){case 1:a[b]=b-c.s.c;break;case 2:a[b]=f[b];break;case 3:a[b]=s.header[b-c.s.c];break;default:if(null==n&&(n={w:"__EMPTY",t:"s"}),l=i=N$(n,null,s),m=y[i]||0){do{l=i+"_"+m++}while(y[l]);y[i]=m,y[l]=1}else y[i]=1;a[b]=l}for(v=c.s.r+o;v<=c.e.r;++v)if(!(w[v]||{}).hidden){var C=E1(e,c,v,f,r,a,g,s);(!1===C.isempty||(1===r?!1!==s.blankrows:s.blankrows))&&(p[h++]=C.row)}return p.length=h,p}var j1=/"/g;function I1(e,t,n,r,o,a,i,l){for(var c=!0,s=[],d="",u=C$(n),f=t.s.c;f<=t.e.c;++f)if(r[f]){var p=l.dense?(e[n]||[])[f]:e[r[f]+u];if(null==p)d="";else if(null!=p.v){c=!1,d=""+(l.rawNumbers&&"n"==p.t?p.v:N$(p,null,l));for(var h=0,m=0;h!==d.length;++h)if((m=d.charCodeAt(h))===o||m===a||34===m||l.forceQuotes){d='"'+d.replace(j1,'""')+'"';break}"ID"==d&&(d='"ID"')}else null==p.f||p.F?d="":(c=!1,(d="="+p.f).indexOf(",")>=0&&(d='"'+d.replace(j1,'""')+'"'));s.push(d)}return!1===l.blankrows&&c?null:s.join(i)}function T1(e,t){var n=[],r=null==t?{}:t;if(null==e||null==e["!ref"])return"";var o=A$(e["!ref"]),a=void 0!==r.FS?r.FS:",",i=a.charCodeAt(0),l=void 0!==r.RS?r.RS:"\n",c=l.charCodeAt(0),s=new RegExp(("|"==a?"\\|":a)+"+$"),d="",u=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e["!cols"]||[],p=r.skipHidden&&e["!rows"]||[],h=o.s.c;h<=o.e.c;++h)(f[h]||{}).hidden||(u[h]=E$(h));for(var m=0,g=o.s.r;g<=o.e.r;++g)(p[g]||{}).hidden||null!=(d=I1(e,o,g,u,i,c,a,r))&&(r.strip&&(d=d.replace(s,"")),(d||!1!==r.blankrows)&&n.push((m++?l:"")+d));return delete r.dense,n.join("")}function A1(e,t){t||(t={}),t.FS="\t",t.RS="\n";var n=T1(e,t);if("undefined"==typeof kq||"string"==t.type)return n;var r=kq.utils.encode(1200,n,"str");return String.fromCharCode(255)+String.fromCharCode(254)+r}function O1(e,t,n){var r,o=n||{},a=+!o.skipHeader,i=e||{},l=0,c=0;if(i&&null!=o.origin)if("number"==typeof o.origin)l=o.origin;else{var s="string"==typeof o.origin?k$(o.origin):o.origin;l=s.r,c=s.c}var d={s:{c:0,r:0},e:{c:c,r:l+t.length-1+a}};if(i["!ref"]){var u=A$(i["!ref"]);d.e.c=Math.max(d.e.c,u.e.c),d.e.r=Math.max(d.e.r,u.e.r),-1==l&&(l=u.e.r+1,d.e.r=l+t.length-1+a)}else-1==l&&(l=0,d.e.r=t.length-1+a);var f=o.header||[],p=0;t.forEach((function(e,t){BX(e).forEach((function(n){-1==(p=f.indexOf(n))&&(f[p=f.length]=n);var s=e[n],d="z",u="",h=j$({c:c+p,r:l+t+a});r=N1(i,h),!s||"object"!==typeof s||s instanceof Date?("number"==typeof s?d="n":"boolean"==typeof s?d="b":"string"==typeof s?d="s":s instanceof Date?(d="d",o.cellDates||(d="n",s=UX(s)),u=o.dateNF||Jq[14]):null===s&&o.nullError&&(d="e",s=0),r?(r.t=d,r.v=s,delete r.w,delete r.R,u&&(r.z=u)):i[h]=r={t:d,v:s},u&&(r.z=u)):i[h]=s}))})),d.e.c=Math.max(d.e.c,c+f.length-1);var h=C$(l);if(a)for(p=0;p<f.length;++p)i[E$(p+c)+h]={t:"s",v:f[p]};return i["!ref"]=T$(d),i}function N1(e,t,n){if("string"==typeof t){if(Array.isArray(e)){var r=k$(t);return e[r.r]||(e[r.r]=[]),e[r.r][r.c]||(e[r.r][r.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return N1(e,j$("number"!=typeof t?t:{r:t,c:n||0}))}function R1(){return{SheetNames:[],Sheets:{}}}function P1(e,t,n,r){var o=1;if(!n)for(;o<=65535&&-1!=e.SheetNames.indexOf(n="Sheet"+o);++o,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(r&&e.SheetNames.indexOf(n)>=0){var a=n.match(/(^.*?)(\d+)$/);o=a&&+a[2]||0;var i=a&&a[1]||n;for(++o;o<=65535&&-1!=e.SheetNames.indexOf(n=i+o);++o);}if(p0(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n}function M1(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}var D1={encode_col:E$,encode_row:C$,encode_cell:j$,encode_range:T$,decode_col:S$,decode_row:w$,split_cell:function(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")},decode_cell:k$,decode_range:I$,format_cell:N$,sheet_add_aoa:P$,sheet_add_json:O1,sheet_add_dom:K0,aoa_to_sheet:M$,json_to_sheet:function(e,t){return O1(null,e,t)},table_to_sheet:G0,table_to_book:function(e,t){return R$(G0(e,t),t)},sheet_to_csv:T1,sheet_to_txt:A1,sheet_to_json:k1,sheet_to_html:U0,sheet_to_formulae:function(e){var t,n="",r="";if(null==e||null==e["!ref"])return[];var o,a=A$(e["!ref"]),i="",l=[],c=[],s=Array.isArray(e);for(o=a.s.c;o<=a.e.c;++o)l[o]=E$(o);for(var d=a.s.r;d<=a.e.r;++d)for(i=C$(d),o=a.s.c;o<=a.e.c;++o)if(n=l[o]+i,r="",void 0!==(t=s?(e[d]||[])[o]:e[n])){if(null!=t.F){if(n=t.F,!t.f)continue;r=t.f,-1==n.indexOf(":")&&(n=n+":"+n)}if(null!=t.f)r=t.f;else{if("z"==t.t)continue;if("n"==t.t&&null!=t.v)r=""+t.v;else if("b"==t.t)r=t.v?"TRUE":"FALSE";else if(void 0!==t.w)r="'"+t.w;else{if(void 0===t.v)continue;r="s"==t.t?"'"+t.v:""+t.v}}c[c.length]=n+"="+r}return c},sheet_to_row_object_array:k1,sheet_get_cell:N1,book_new:R1,book_append_sheet:P1,book_set_sheet_visibility:function(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var r=function(e,t){if("number"==typeof t){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}if("string"==typeof t){var n=e.SheetNames.indexOf(t);if(n>-1)return n;throw new Error("Cannot find sheet name |"+t+"|")}throw new Error("Cannot find sheet |"+t+"|")}(e,t);switch(e.Workbook.Sheets[r]||(e.Workbook.Sheets[r]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[r].Hidden=n},cell_set_number_format:function(e,t){return e.z=t,e},cell_set_hyperlink:M1,cell_set_internal_link:function(e,t,n){return M1(e,"#"+t,n)},cell_add_comment:function(e,t,n){e.c||(e.c=[]),e.c.push({t:t,a:n||"SheetJS"})},sheet_set_array_formula:function(e,t,n,r){for(var o="string"!=typeof t?t:A$(t),a="string"==typeof t?t:T$(t),i=o.s.r;i<=o.e.r;++i)for(var l=o.s.c;l<=o.e.c;++l){var c=N1(e,i,l);c.t="n",c.F=a,delete c.v,i==o.s.r&&l==o.s.c&&(c.f=n,r&&(c.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};gq.version;const L1="connection",_1="category",z1="model",B1="address",F1="virtualAddress",H1="description",W1={id:"",enabled:!1,category:"",model:"",address:0,isExposed:"",virtualAddress:0,protocol:"",connection:"",description:"",automaticallyAdded:"",radioPollingPeriod:0,options:{},url:""},V1=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)([]),[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[c,s]=(0,t.useState)([]),[d,u]=(0,t.useState)([]),[f,p]=(0,t.useState)(!1),[h,m]=(0,t.useState)(!1),[g,v]=(0,t.useState)(!1),[b,y]=mE(((e,t)=>cE(e,t)),[]),[x,w]=mE(((e,t)=>cE(e,t)),[]),[C,S]=mE(((e,t)=>cE(e,t)),[]),E=KG(),[k,j]=(0,t.useState)(W1),[I,T]=(0,t.useState)(""),{showConfirm:A}=nq(n,GC,(()=>{y(MS,GC()).then((e=>{r(e)}))}),y);(0,t.useEffect)((()=>{h&&f&&g||(y(MS,GC()),w(LS,GC()),S(DS,GC()))}),[h,f,g]),(0,t.useEffect)((()=>{b.value&&c.length&&d.length&&r([...N(b.value)]),b.value&&c.length&&d.length&&a(b.value)}),[b,c,d]),(0,t.useEffect)((()=>{x.value&&s(x.value)}),[x]),(0,t.useEffect)((()=>{C.value&&u(C.value)}),[C]),(0,t.useEffect)((()=>{n.length&&l(n)}),[n]);const O=[{title:e(L1),key:L1,dataIndex:L1,width:100,sorter:(e,t)=>e.connection.localeCompare(t.connection),render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(L1)}),(0,ng.jsx)(ac,{style:{width:"150px"},onClick:()=>T(n.connection),children:aS(P(t),15)})]})},{title:e(_1),key:_1,dataIndex:_1,width:100,sorter:(e,t)=>e.category.localeCompare(t.category),render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(_1)}),(0,ng.jsx)("div",{children:e(t)})]}),filters:d.filter((e=>n.some((t=>t.category===e.id)))).map((t=>({text:e(t.id),value:t.id}))).sort(((e,t)=>e.text.localeCompare(t.text))),onFilter:(e,t)=>0===t.category.indexOf(e),filterSearch:!0},{title:e(z1),key:z1,dataIndex:z1,width:100,filterSearch:!0,onFilter:(e,t)=>0===t.model.indexOf(e),filters:c.filter((e=>n.some((t=>t.model===e.description)))).map((e=>({text:e.description,value:e.description}))).sort(((e,t)=>e.text.localeCompare(t.text))),sorter:(e,t)=>e.model.localeCompare(t.model),render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(z1)}),(0,ng.jsx)("div",{children:t})]})},{title:e("fisicalAddress"),key:B1,dataIndex:B1,width:50,...E(B1),sorter:(e,t)=>e.address-t.address,render:(t,n)=>{var r;const o=null!==(r=n.url)&&void 0!==r?r:"";return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("fisicalAddress")}),(0,ng.jsx)("div",{children:"http"===n.protocol?aS(o,15):t})]})}},{title:e(F1),key:F1,dataIndex:F1,width:50,sorter:(e,t)=>e.virtualAddress-t.virtualAddress,render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(F1)}),(0,ng.jsx)("div",{children:"no"===n.isExposed?"---":t})]})},{title:e(H1),key:H1,dataIndex:H1,width:100,...E(H1),sorter:(e,t)=>e.description.localeCompare(t.description),render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(H1)}),aS(t,15)]})},{width:100,className:"col-center",render:(t,n)=>{return(0,ng.jsxs)(hc,{children:[!M(n.category)&&(0,ng.jsx)(ac,{style:{width:"58px"},onClick:()=>{const e=o.find((e=>e.id===n.id));j(e),p(!0)},children:(0,ng.jsx)(Hg,{})}),(r=n.id,!b.value.some((e=>e.connection===r))&&M(n.category)&&(0,ng.jsx)(Hd,{title:e("clone"),children:(0,ng.jsx)(ac,{style:{width:"58px"},onClick:()=>{const e=o.find((e=>e.id===n.id));j(e),v(!0)},children:(0,ng.jsx)("i",{className:"anticon",children:(0,ng.jsx)("svg",{x:"0px",y:"0px",viewBox:"0 0 1792 1792",width:"1.8em",height:"1.5em",xmlns:"http://www.w3.org/2000/svg",children:(0,ng.jsx)("path",{d:"M1664 1632v-1088q0-13-9.5-22.5t-22.5-9.5h-1088q-13 0-22.5 9.5t-9.5 22.5v1088q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5-9.5t9.5-22.5zm128-1088v1088q0 66-47 113t-113 47h-1088q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1088q66 0 113 47t47 113zm-384-384v160h-128v-160q0-13-9.5-22.5t-22.5-9.5h-1088q-13 0-22.5 9.5t-9.5 22.5v1088q0 13 9.5 22.5t22.5 9.5h160v128h-160q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1088q66 0 113 47t47 113z"})})})})})),(0,ng.jsx)(ac,{style:{width:"58px",visibility:"bus"===n.category?"hidden":"visible"},onClick:()=>{const e=o.find((e=>e.id===n.id));j(e),m(!0)},children:(0,ng.jsx)(bE,{})}),(0,ng.jsx)(ac,{style:{width:"58px",visibility:"bus"!==n.category?"visible":"hidden"},onClick:()=>{A(n.id)},children:(0,ng.jsx)(kz,{})})]});var r}}];function N(e){return e.map((e=>({...e,model:R(e.model),virtualAddress:"no"===e.isExposed?0:e.virtualAddress})))}function R(e){var t,n;return null!==(t=null===(n=c.find((t=>t.id===e)))||void 0===n?void 0:n.description)&&void 0!==t?t:""}function P(e){var t;if("00000000-0000-0000-0000-000000000000"===e)return"---";const n=b.value.find((t=>t.id===e)),r=null!==(t=null===n||void 0===n?void 0:n.description)&&void 0!==t?t:"";var o;return""===r?R(null!==(o=null===n||void 0===n?void 0:n.model)&&void 0!==o?o:"")+" "+(null===n||void 0===n?void 0:n.address):r}function M(e){var t;return"none"===(null===(t=d.find((t=>t.id===e)))||void 0===t?void 0:t.addChildrenMode)}const D=[{key:"1",label:e("csv")},{key:"2",label:e("xlsx")}];return(0,ng.jsx)("div",{className:"card-container",children:(0,ng.jsxs)(Qv,{children:[f&&(0,ng.jsx)(JG,{setIsModalOpen:p,isModalOpen:f,parentId:k.id,protocol:k.protocol,parentCategory:k.category}),h&&(0,ng.jsx)(eq,{isModalEditOpen:h,setIsModalEditOpen:m,device:k,modelId:k.model}),g&&(0,ng.jsx)(QG,{isModalCloneOpen:g,setIsModalCloneOpen:v,doGetVirtualDevice:y,vdevice:k}),(0,ng.jsx)(hc,{style:{marginBottom:16},children:(0,ng.jsx)(Nh,{menu:{items:D,onClick:t=>{let{key:n}=t;"1"===n&&(()=>{const t=i.map((t=>({CONNECTION:P(t.connection),CATEGORY:e(t.category),MODEL:t.model,ADDRESS:t.address,VIRTUAL_ADDRESS:"no"===t.isExposed?"---":t.virtualAddress,DESCRIPTION:t.description}))),n={data:t,filename:"virtual device table",delimiter:",",headers:[e(L1),e(_1),e(z1),e("fisicalAddress"),e(F1),e(H1)]};try{hq(n)}catch{ak.error(e("errorDownloadCSV"))}})(),"2"===n&&(()=>{const t=i.map(((t,n)=>({CONNECTION:P(t.connection),CATEGORY:e(t.category),MODEL:t.model,ADDRESS:t.address,VIRTUAL_ADDRESS:"no"===t.isExposed?"---":t.virtualAddress,DESCRIPTION:t.description}))),n=[[e(L1),e(_1),e(z1),e("fisicalAddress"),e(F1),e(H1)]];try{const e=D1.book_new(),r=D1.json_to_sheet([]);D1.sheet_add_aoa(r,n),D1.sheet_add_json(r,t,{origin:"A2",skipHeader:!0}),D1.book_append_sheet(e,r,"Sheet1");const o=S1(e,{bookType:"xlsx",type:"array"}),a=new Blob([o],{type:"application/octet-stream"});(0,mq.saveAs)(a,"virtual device table.xlsx")}catch{ak.error(e("errorDownloadExcel"))}})()}},trigger:["click"],children:(0,ng.jsx)(ac,{children:e("download")})})}),(0,ng.jsx)(NH,{justify:"center",children:(0,ng.jsx)(k_,{style:{width:"75vw"},columns:O,dataSource:n,pagination:!1,onChange:(e,t,n,r)=>{l(r.currentDataSource)},rowClassName:e=>e.id===I?"selectedParent":""})})]})})},U1=()=>{const{translate:e}=og(),t=[{key:"1",label:e("graphic"),children:(0,ng.jsx)(dq,{})},{key:"2",label:e("table"),children:(0,ng.jsx)(V1,{})}];return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("virtualDeviceConfig")})}),(0,ng.jsx)(Mv,{defaultActiveKey:"1",items:t,destroyInactiveTabPane:!0})]})},K1=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)(""),[o,a]=(0,t.useState)(100),i=(0,t.useRef)(),l=(0,t.useRef)(null),[c,s]=mE(((e,t,n)=>cE(e,t,n)),[]),[d,u]=(0,t.useState)(!1),f=(0,t.useRef)(o);function p(){u(!1),i.current=setInterval((()=>{m()}),5e3)}function h(){u(!0),clearInterval(i.current)}(0,t.useEffect)((()=>{s($S,GC())}),[]),(0,t.useEffect)((()=>{f.current=o}),[o]),(0,t.useEffect)((()=>{if(c.value&&(r(c.value.result),l.current&&l.current.resizableTextArea)){const e=l.current.resizableTextArea.textArea;e.scrollTop=e.scrollHeight}}),[c]),(0,t.useEffect)((()=>(s($S,GC(),!1),p(),()=>{h()})),[]);const m=async()=>{try{await cE($S,GC(),!1,f.current.toString()).then((e=>{if(r(e),l.current&&l.current.resizableTextArea){const e=l.current.resizableTextArea.textArea;e.scrollTop=e.scrollHeight}})).catch((e=>{console.log(e)}))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}};return(0,ng.jsx)("div",{children:(0,ng.jsx)("div",{className:"custom-panel",style:{padding:15},children:(0,ng.jsx)(qz,{align:"middle",children:(0,ng.jsx)(Zz,{span:1,xs:24,children:(0,ng.jsxs)(hc,{direction:"vertical",style:{width:"100%"},children:[(0,ng.jsx)(ac,{type:"primary",danger:!d,onClick:async()=>{(async()=>{d?p():h()})()},children:d?"Start":"Stop"}),(0,ng.jsx)(Ij,{ref:l,rows:10,placeholder:"Log",value:n,style:{fontFamily:"monospace",fontSize:13}}),(0,ng.jsx)(hc.Compact,{style:{width:"350px"},children:(0,ng.jsx)(xN,{addonBefore:e("rowNumber"),defaultValue:100,onChange:e=>a(Number(e))})})]})})})})})};const G1={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm-32 156c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z",fill:t}},{tag:"path",attrs:{d:"M488 576h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8zm-24 112a48 48 0 1096 0 48 48 0 10-96 0z",fill:e}}]}},name:"exclamation-circle",theme:"twotone"};var q1=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:G1}))};const X1=t.forwardRef(q1);const Y1={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm171.8 527.1c1.2 1.5 1.9 3.3 1.9 5.2 0 4.5-3.6 8-8 8l-66-.3-99.3-118.4-99.3 118.5-66.1.3c-4.4 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.2L471 512.3l-130.1-155a8.32 8.32 0 01-1.9-5.2c0-4.5 3.6-8 8-8l66.1.3 99.3 118.4 99.4-118.5 66-.3c4.4 0 8 3.6 8 8 0 1.9-.6 3.8-1.8 5.2l-130.1 155 129.9 154.9z",fill:t}},{tag:"path",attrs:{d:"M685.8 352c0-4.4-3.6-8-8-8l-66 .3-99.4 118.5-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155-130.1 154.9a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3 99.3-118.5L611.7 680l66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.9 512.2l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z",fill:e}}]}},name:"close-circle",theme:"twotone"};var $1=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Y1}))};const J1=t.forwardRef($1);const Q1={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z",fill:e}},{tag:"path",attrs:{d:"M172.2 828.1h679.6L512 239.9 172.2 828.1zM560 720a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm-16-304v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8z",fill:t}},{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8z",fill:e}}]}},name:"warning",theme:"twotone"};var Z1=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Q1}))};const e2=t.forwardRef(Z1);const t2={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm32 588c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z",fill:t}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z",fill:e}}]}},name:"info-circle",theme:"twotone"};var n2=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:t2}))};const r2=t.forwardRef(n2);const o2={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm164.1 378.2L457.7 677.1a8.02 8.02 0 01-12.7-6.5V353a8 8 0 0112.7-6.5l218.4 158.8a7.9 7.9 0 010 12.9z",fill:t}},{tag:"path",attrs:{d:"M676.1 505.3L457.7 346.5A8 8 0 00445 353v317.6a8.02 8.02 0 0012.7 6.5l218.4-158.9a7.9 7.9 0 000-12.9z",fill:e}}]}},name:"play-circle",theme:"twotone"};var a2=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:o2}))};const i2=t.forwardRef(a2),l2=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)({lang:"it",tz:"GMT+1"}),o=(0,t.useRef)(),[a,i]=mE(((e,t,n)=>cE(e,t,n)),[]),[l,c]=mE(((e,t,n)=>cE(e,t,n)),[]),[s,d]=mE(((e,t)=>cE(e,t)),[]),[u,f]=(0,t.useState)({enabled:!1,level:"info"}),[p,h]=(0,t.useState)([]);(0,t.useEffect)((()=>(i(XS,GC()),d(hS,GC()),c(YS,GC(),!1),o.current=setInterval((()=>{c(YS,GC(),!1)}),15e3),()=>{clearInterval(o.current)})),[]),(0,t.useEffect)((()=>{s.value&&r({lang:s.value.language,tz:s.value.timezone})}),[s]),(0,t.useEffect)((()=>{a.value&&f(a.value)}),[a]),(0,t.useEffect)((()=>{l.value&&h([...l.value])}),[l]);const m=e=>{let t=new Date(e);return"".concat(t.toLocaleDateString(n.lang)," ").concat(t.toLocaleTimeString(n.lang))},g=[{title:e("name"),dataIndex:"file",key:"file",width:150,render:t=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("name")}),(0,ng.jsx)("span",{children:t})]})},{title:e("timestamp"),dataIndex:"dateTime",key:"dateTime",width:250,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"Repository"}),(0,ng.jsx)("span",{children:m(e)})]})},{title:(0,ng.jsxs)("span",{children:[e("size")," ",(0,ng.jsx)("small",{children:"(Kb)"})]}),dataIndex:"sizeKb",key:"sizeKb",width:150,render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"Size"}),(0,ng.jsx)("span",{children:e})]})},{title:e("action"),width:50,align:"center",render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("action")}),(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(Hd,{title:n.canDelete?"":e("deleteLogFileNotAllowed"),children:(0,ng.jsx)(hc,{children:(0,ng.jsx)(Hd,{title:n.canDelete?e("deleteLogFile"):"",children:(0,ng.jsx)(IN,{title:e("titleAreYouSure"),onConfirm:async()=>{try{await uE(YS,n.file,"",GC()),await c(YS,GC()),ak.success(e("ok"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}},cancelText:e("cancel"),okText:e("ok"),children:(0,ng.jsx)(ac,{disabled:!n.canDelete,icon:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})})})})}),(0,ng.jsx)(Hd,{title:e("downloadLogFile"),children:(0,ng.jsx)(ac,{icon:(0,ng.jsx)(lF,{style:{color:"gray",fontSize:"18px"}},"setting"),onClick:async()=>{try{await pE(YS,n.file,GC()),ak.success(e("ok"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}}})})]})]})}],v=[{label:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(X1,{twoToneColor:"#52c41a"}),(0,ng.jsx)("span",{children:"EXCEPTION"}),(0,ng.jsxs)("small",{children:["(",e("lessDetrails"),")"]})]}),value:"exception"},{label:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(J1,{twoToneColor:"#ff4d4e"}),(0,ng.jsx)("span",{children:"ERROR"})]}),value:"error"},{label:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(e2,{twoToneColor:"#f7aa1c"}),(0,ng.jsx)("span",{children:"WARNING"})]}),value:"warning"},{label:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(r2,{}),(0,ng.jsx)("span",{children:"INFO"})]}),value:"info"},{label:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(i2,{twoToneColor:"#2A5195"}),(0,ng.jsx)("span",{children:"TRACE"}),(0,ng.jsxs)("small",{children:["(",e("modeDetrails"),")"]})]}),value:"trace"}];return(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)($I,{style:{fontWeight:"bold",fontSize:"28px"}})}),(0,ng.jsxs)(Zz,{span:22,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:e("logStatus")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:e("logInfo")})})]})]}),"{}"!==JSON.stringify(u)?(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsxs)(Zz,{span:20,children:[(0,ng.jsxs)(qz,{gutter:24,style:{marginTop:40,fontWeight:"bold"},children:[(0,ng.jsx)(Zz,{span:6,children:(0,ng.jsx)("span",{children:e("status")})}),(0,ng.jsx)(Zz,{span:4,children:(0,ng.jsx)("span",{children:e("level")})})]}),(0,ng.jsxs)(qz,{gutter:24,children:[(0,ng.jsx)(Zz,{span:6,children:u?(0,ng.jsx)("span",{style:{color:null!==u&&void 0!==u&&u.enabled?"green":"red"},children:(0,ng.jsx)(yI,{checkedChildren:e("active"),unCheckedChildren:e("noActive"),onChange:async t=>{f({enabled:t,level:u.enabled?u.level:"info"});try{await dE(XS,JSON.stringify({enabled:t,level:u.enabled?u.level:"info"}),GC()),c(YS,GC(),!1),ak.success(e(t?"logActived":"logDisabled"))}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return;ak.error(e(n.message))}},checked:u.enabled})}):(0,ng.jsx)(Eg,{active:!0,size:"small",style:{width:"8vw"}})}),(0,ng.jsx)(Zz,{span:4,children:u?(0,ng.jsx)(HO,{style:{width:250},onChange:async t=>{f({enabled:u.enabled,level:t});try{await dE(XS,JSON.stringify({enabled:u.enabled,level:t}),GC()),ak.success(e("ok"))}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return;ak.error(e(n.message))}},disabled:!u.enabled,value:u.level,options:v}):(0,ng.jsx)(Eg,{active:!0,size:"small",style:{width:"8vw"}})})]})]})]})}):(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{span:20,children:(0,ng.jsx)("span",{children:e("service")+" ".concat("Web Garage"," ")+e("notFound")})})]})}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)(qz,{align:"middle",style:{marginTop:50},children:[(0,ng.jsx)(Zz,{span:1,xs:2,children:(0,ng.jsx)(tz,{style:{fontWeight:"bold",fontSize:"28px"}})}),(0,ng.jsxs)(Zz,{span:18,children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:e("logFile")})}),(0,ng.jsx)(qz,{style:{borderBottom:"1px solid #f0f0f0"},children:(0,ng.jsx)("span",{children:e("logFileManage")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(k_,{bordered:!0,rowKey:e=>e.file,columns:g,dataSource:p,size:"small"})})})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(Hd,{title:e("deleteAllLogFile"),children:(0,ng.jsx)(IN,{title:e("titleAreYouSure"),onConfirm:async()=>{try{await uE(YS,"all","",GC()),await c(YS,GC()),ak.success(e("ok"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}},cancelText:e("cancel"),okText:e("ok"),children:(0,ng.jsxs)(hc,{children:[e("deleteAllLogFile"),(0,ng.jsx)(ac,{icon:(0,ng.jsx)(kz,{style:{color:"gray",fontSize:"18px"}},"setting")})]})})})})})})]}),(0,ng.jsxs)(qz,{style:{marginTop:20},children:[(0,ng.jsx)(Zz,{span:2}),(0,ng.jsx)(Zz,{children:(0,ng.jsx)(qz,{gutter:18,children:(0,ng.jsx)(Zz,{children:(0,ng.jsx)(Hd,{title:e("downloadAllLogFile"),children:(0,ng.jsxs)(hc,{children:[e("downloadAllLogFile"),(0,ng.jsx)(ac,{icon:(0,ng.jsx)(lF,{style:{color:"gray",fontSize:"18px"}},"setting"),onClick:async()=>{try{await pE(YS,"all",GC()),ak.success(e("ok"))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message))}}})]})})})})})]})]})};function c2(e){return e>=1e6?"".concat((e/1e6).toFixed(2)," GB"):e>=1e3?"".concat(Math.round(e/1e3)," MB"):"".concat(e," kB")}function s2(e){return e>=80?"#dc2626":e>=60?"#d46b08":"var(--ant-color-primary)"}const d2={ok:{background:"var(--ant-color-primary-bg, rgba(42,81,149,.07))",color:"var(--ant-color-primary)",border:"1px solid var(--ant-color-primary-border, rgba(42,81,149,.2))"},warn:{background:"#fffbeb",color:"#b45309",border:"1px solid #fde68a"},crit:{background:"#fef2f2",color:"#dc2626",border:"1px solid #fecaca"}},u2=e=>{var t,n;let{data:r,title:o}=e;const{translate:a}=og(),i=null!==(t=null===r||void 0===r?void 0:r.used)&&void 0!==t?t:0,l=null!==(n=null===r||void 0===r?void 0:r.total)&&void 0!==n?n:0,c=l>0?Math.round(i/l*100):0,s=function(e){return e>=80?"crit":e>=60?"warn":"ok"}(c),d={ok:a("ok"),warn:a("attenzione"),crit:a("critico")},u={...d2[s],fontSize:11,fontWeight:500,padding:"1px 8px",borderRadius:99,display:"inline-block"};return(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:5},children:[(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,ng.jsx)("span",{style:{fontSize:13,fontWeight:500,color:"rgba(0,0,0,.65)"},children:o}),(0,ng.jsx)("span",{style:u,children:d[s]})]}),(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline"},children:[(0,ng.jsxs)("span",{style:{fontSize:13,color:"rgba(0,0,0,.65)"},children:[c,"%"]}),(0,ng.jsx)("span",{style:{fontFamily:"'SF Mono','Fira Code',Consolas,monospace",fontSize:12},children:c2(i)})]}),(0,ng.jsx)("div",{style:{height:8,background:"#f0f0f0",borderRadius:4,overflow:"hidden"},children:(0,ng.jsx)("div",{style:{width:"".concat(c,"%"),height:"100%",background:s2(c),borderRadius:4,transition:"width .75s cubic-bezier(.4,0,.2,1), background .5s"}})}),(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11,color:"rgba(0,0,0,.45)"},children:[(0,ng.jsx)("span",{children:"0"}),(0,ng.jsxs)("span",{children:[c2(l)," ",a("total")]})]})]})},f2=(e,t,n,r,o)=>({background:e,border:"".concat(rn(r.lineWidth)," ").concat(r.lineType," ").concat(t),["".concat(o,"-icon")]:{color:n}}),p2=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:o,fontSize:a,fontSizeLG:i,lineHeight:l,borderRadiusLG:c,motionEaseInOutCirc:s,withDescriptionIconSize:d,colorText:u,colorTextHeading:f,withDescriptionPadding:p,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},$r(e)),{position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:c,["&".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-content")]:{flex:1,minWidth:0},["".concat(t,"-icon")]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:a,lineHeight:l},"&-message":{color:f},["&".concat(t,"-motion-leave")]:{overflow:"hidden",opacity:1,transition:"max-height ".concat(n," ").concat(s,", opacity ").concat(n," ").concat(s,",\n        padding-top ").concat(n," ").concat(s,", padding-bottom ").concat(n," ").concat(s,",\n        margin-bottom ").concat(n," ").concat(s)},["&".concat(t,"-motion-leave-active")]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),["".concat(t,"-with-description")]:{alignItems:"flex-start",padding:p,["".concat(t,"-icon")]:{marginInlineEnd:o,fontSize:d,lineHeight:0},["".concat(t,"-message")]:{display:"block",marginBottom:r,color:f,fontSize:i},["".concat(t,"-description")]:{display:"block",color:u}},["".concat(t,"-banner")]:{marginBottom:0,border:"0 !important",borderRadius:0}}},h2=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:o,colorWarning:a,colorWarningBorder:i,colorWarningBg:l,colorError:c,colorErrorBorder:s,colorErrorBg:d,colorInfo:u,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":f2(o,r,n,e,t),"&-info":f2(p,f,u,e,t),"&-warning":f2(l,i,a,e,t),"&-error":Object.assign(Object.assign({},f2(d,s,c,e,t)),{["".concat(t,"-description > pre")]:{margin:0,padding:0}})}}},m2=e=>{const{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:o,fontSizeIcon:a,colorIcon:i,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:o},["".concat(t,"-close-icon")]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:a,lineHeight:rn(a),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",["".concat(n,"-close")]:{color:i,transition:"color ".concat(r),"&:hover":{color:l}}},"&-close-text":{color:i,transition:"color ".concat(r),"&:hover":{color:l}}}}},g2=$o("Alert",(e=>[p2(e),h2(e),m2(e)]),(e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:"".concat(e.paddingContentVerticalSM,"px ").concat(12,"px"),withDescriptionPadding:"".concat(e.paddingMD,"px ").concat(e.paddingContentHorizontalLG,"px")})));var v2=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const b2={success:Gy,info:tx,error:Yy,warning:Qy},y2=e=>{const{icon:n,prefixCls:r,type:o}=e,a=b2[o]||null;return n?pa(n,t.createElement("span",{className:"".concat(r,"-icon")},n),(()=>({className:v()("".concat(r,"-icon"),{[n.props.className]:n.props.className})}))):t.createElement(a,{className:"".concat(r,"-icon")})},x2=e=>{const{isClosable:n,prefixCls:r,closeIcon:o,handleClose:a}=e,i=!0===o||void 0===o?t.createElement(zg,null):o;return n?t.createElement("button",{type:"button",onClick:a,className:"".concat(r,"-close-icon"),tabIndex:0},i):null};const w2=e=>{const{description:n,prefixCls:r,message:o,banner:a,className:i,rootClassName:l,style:c,onMouseEnter:s,onMouseLeave:d,onClick:u,afterClose:f,showIcon:p,closable:h,closeText:m,closeIcon:g,action:b}=e,y=v2(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),[x,w]=t.useState(!1);const C=t.useRef(null),{getPrefixCls:S,direction:E,alert:k}=t.useContext(at),j=S("alert",r),[I,T,A]=g2(j),O=t=>{var n;w(!0),null===(n=e.onClose)||void 0===n||n.call(e,t)},N=t.useMemo((()=>void 0!==e.type?e.type:a?"warning":"info"),[e.type,a]),R=t.useMemo((()=>!!m||("boolean"===typeof h?h:!1!==g&&null!==g&&void 0!==g)),[m,g,h]),P=!(!a||void 0!==p)||p,M=v()(j,"".concat(j,"-").concat(N),{["".concat(j,"-with-description")]:!!n,["".concat(j,"-no-icon")]:!P,["".concat(j,"-banner")]:!!a,["".concat(j,"-rtl")]:"rtl"===E},null===k||void 0===k?void 0:k.className,i,l,A,T),D=hx(y,{aria:!0,data:!0});return I(t.createElement(xi,{visible:!x,motionName:"".concat(j,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:f},(r=>{let{className:a,style:i}=r;return t.createElement("div",Object.assign({ref:C,"data-show":!x,className:v()(M,a),style:Object.assign(Object.assign(Object.assign({},null===k||void 0===k?void 0:k.style),c),i),onMouseEnter:s,onMouseLeave:d,onClick:u,role:"alert"},D),P?t.createElement(y2,{description:n,icon:e.icon,prefixCls:j,type:N}):null,t.createElement("div",{className:"".concat(j,"-content")},o?t.createElement("div",{className:"".concat(j,"-message")},o):null,n?t.createElement("div",{className:"".concat(j,"-description")},n):null),b?t.createElement("div",{className:"".concat(j,"-action")},b):null,t.createElement(x2,{isClosable:R,prefixCls:j,closeIcon:m||(null!==g&&void 0!==g?g:null===k||void 0===k?void 0:k.closeIcon),handleClose:O}))})))};let C2=function(e){function n(){var e;return At(this,n),e=function(e,t,n){return t=Oo(t),To(e,Ao()?Reflect.construct(t,n||[],Oo(e).constructor):t.apply(e,n))}(this,n,arguments),e.state={error:void 0,info:{componentStack:""}},e}return Ro(n,e),Nt(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){const{message:e,description:n,children:r}=this.props,{error:o,info:a}=this.state,i=a&&a.componentStack?a.componentStack:null,l="undefined"===typeof e?(o||"").toString():e,c="undefined"===typeof n?i:n;return o?t.createElement(w2,{type:"error",message:l,description:t.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},c)}):r}}]),n}(t.Component);const S2=C2,E2=w2;E2.ErrorBoundary=S2;const k2=E2,j2=110,I2=105,T2=85;function A2(e){const t=e*Math.PI/180;return{x:j2+T2*Math.cos(t),y:I2+T2*Math.sin(t)}}function O2(e,t){if(t<.5)return"";const n=A2(e),r=A2(e+t),o=t>180?1:0;return"M ".concat(n.x.toFixed(2)," ").concat(n.y.toFixed(2)," A ").concat(T2," ").concat(T2," 0 ").concat(o," 1 ").concat(r.x.toFixed(2)," ").concat(r.y.toFixed(2))}function N2(e,t,n){return 135+(e-t)/(n-t)*270}const R2=e=>{let{value:t,min:n=0,max:r=120,color:o,unit:a="",zones:i}=e;const l=(Math.max(n,Math.min(r,t))-n)/(r-n)*270,c=O2(135,l),s=l>=2?A2(135+l):null;return(0,ng.jsxs)("svg",{viewBox:"0 0 220 175",width:220,height:175,"aria-hidden":"true",children:[null===i||void 0===i?void 0:i.map(((e,t)=>{const o=O2(N2(e.from,n,r),N2(e.to,n,r)-N2(e.from,n,r));return o?(0,ng.jsx)("path",{d:o,fill:"none",strokeWidth:12,strokeLinecap:"round",style:{stroke:e.color}},t):null})),c&&(0,ng.jsx)("path",{d:c,fill:"none",strokeWidth:12,strokeLinecap:"round",style:{stroke:o,transition:"stroke .5s"}}),s&&(0,ng.jsx)("circle",{cx:s.x,cy:s.y,r:6,style:{fill:o,filter:"drop-shadow(0 0 4px ".concat(o,")"),transition:"fill .5s"}}),(0,ng.jsx)("text",{x:j2,y:112,textAnchor:"middle",fontSize:44,fontWeight:700,style:{fontFamily:"'SF Mono','Fira Code',Consolas,'Courier New',monospace",fontVariantNumeric:"tabular-nums",fill:o,transition:"fill .5s"},children:t.toFixed(1)}),a&&(0,ng.jsx)("text",{x:j2,y:133,textAnchor:"middle",fontSize:14,style:{fontFamily:"-apple-system,'Segoe UI',sans-serif",fill:"rgba(0,0,0,.35)"},children:a})]})};const P2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z"}}]},name:"fire",theme:"outlined"};var M2=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:P2}))};const D2=t.forwardRef(M2);const L2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var _2=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:L2}))};const z2=t.forwardRef(_2),B2=[{from:0,to:70,color:"rgba(34,197,94,.22)"},{from:70,to:80,color:"rgba(245,158,11,.30)"},{from:80,to:120,color:"rgba(239,68,68,.28)"}],F2=64,H2=5,W2=3e5,V2=15e5;function U2(e){return F2-H2-(e-W2)/(V2-W2)*(F2-2*H2)}const K2=e=>{let{cpuTemp:n,cpuSpeed:r,thermalThrottling:o,underVoltage:a}=e;const{translate:i}=og(),[l,c]=(0,t.useState)((()=>Array(32).fill(W2)));(0,t.useEffect)((()=>{r>0&&c((e=>[...e.slice(-31),r]))}),[r]);const s=n>=80?{color:"#ef4444",textColor:"#991b1b",label:i("critico")}:n>=70?{color:"#f59e0b",textColor:"#b45309",label:i("attenzione")}:{color:"#22c55e",textColor:"#166534",label:i("normale")},d=function(e){const t=(e-W2)/(V2-W2);return t>=.88?"#ef4444":t>=.5?"#f59e0b":"#22c55e"}(r),{line:u,area:f}=function(e){const t=e.length,n=e.map(((e,n)=>n/(t-1)*200)),r=e.map(U2);let o="M ".concat(n[0].toFixed(1),",").concat(r[0].toFixed(1));for(let a=1;a<t;a++){const e=(n[a]-n[a-1])/2.8;o+=" C ".concat((n[a-1]+e).toFixed(1),",").concat(r[a-1].toFixed(1)," ").concat((n[a]-e).toFixed(1),",").concat(r[a].toFixed(1)," ").concat(n[a].toFixed(1),",").concat(r[a].toFixed(1))}return{line:o,area:"".concat(o," L ").concat(n[t-1].toFixed(1),",").concat(F2," L 0,").concat(F2," Z")}}(l);return(0,ng.jsxs)(Qv,{size:"small",title:i("cpuTemperature"),children:[(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[(0,ng.jsx)(R2,{value:n,min:0,max:120,color:s.color,unit:"\xb0C",zones:B2}),(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:220,fontSize:11,color:"rgba(0,0,0,.45)",padding:"0 4px",marginTop:-8},children:[(0,ng.jsx)("span",{children:"0\xb0C"}),(0,ng.jsx)("span",{children:"120\xb0C"})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:7},children:[(0,ng.jsx)("span",{style:{width:9,height:9,borderRadius:"50%",background:s.color,display:"inline-block",transition:"background .4s"}}),(0,ng.jsx)("span",{style:{fontSize:13,fontWeight:500,color:s.textColor,transition:"color .4s"},children:s.label})]})]}),o&&(0,ng.jsx)(k2,{type:"warning",showIcon:!0,icon:(0,ng.jsx)(D2,{}),message:i("thermalThrottlingActive"),style:{marginTop:12}}),a&&(0,ng.jsx)(k2,{type:"error",showIcon:!0,icon:(0,ng.jsx)(z2,{}),message:i("underVoltageDetected"),style:{marginTop:12}}),(0,ng.jsx)(hB,{}),(0,ng.jsxs)("div",{style:{marginBottom:6},children:[(0,ng.jsx)("span",{style:{fontSize:13,fontWeight:900,color:"rgba(0,0,0,.65)"},children:i("cpuFrequency")}),(0,ng.jsx)("br",{}),(0,ng.jsx)("span",{style:{fontFamily:"'SF Mono','Fira Code',Consolas,monospace",fontSize:13},children:(p=r,p>=1e6?"".concat((p/1e6).toFixed(2)," GHz"):p>=1e3?"".concat(Math.round(p/1e3)," MHz"):"".concat(p," kHz"))})]}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",fontSize:10,color:"rgba(0,0,0,.45)",padding:"0 2px 2px"},children:(0,ng.jsx)("span",{children:"1.5 GHz"})}),(0,ng.jsx)("div",{style:{background:"#fafafa",border:"1px solid #f0f0f0",borderRadius:4,overflow:"hidden",height:64},children:(0,ng.jsxs)("svg",{viewBox:"0 0 ".concat(200," ").concat(F2),preserveAspectRatio:"none",style:{display:"block",width:"100%",height:64},children:[(0,ng.jsx)("defs",{children:(0,ng.jsxs)("linearGradient",{id:"cpu1-area-grad",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,ng.jsx)("stop",{offset:"0%",stopColor:d,stopOpacity:.35}),(0,ng.jsx)("stop",{offset:"100%",stopColor:d,stopOpacity:.04})]})}),(0,ng.jsx)("path",{d:f,fill:"url(#cpu1-area-grad)",vectorEffect:"non-scaling-stroke"}),(0,ng.jsx)("path",{d:u,fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke",style:{stroke:d}})]})}),(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",fontSize:10,color:"rgba(0,0,0,.45)",padding:"3px 2px 0"},children:(0,ng.jsx)("span",{children:"300 MHz"})})]});var p},G2=()=>{const{translate:e}=og(),n=(0,t.useRef)(),[r,o]=mE(((e,t,n)=>cE(e,t,n)),[]),[a,i]=(0,t.useState)({cpuSpeed:0,cpuTemp:0,thermalThrottling:!1,underVoltage:!1,ram:{used:0,total:0},rom:{used:0,total:0}});function l(){o("/diagnostic/system",GC(),!1)}return(0,t.useEffect)((()=>{r.value&&i(r.value)}),[r]),(0,t.useEffect)((()=>(l(),n.current=setInterval(l,5e3),()=>{clearInterval(n.current)})),[]),(0,ng.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))",gap:12},children:[(0,ng.jsx)(Qv,{size:"small",title:e("memoryBusy"),style:{height:"100%"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"space-around",height:"100%",gap:14},children:[(0,ng.jsx)(u2,{title:"RAM",data:a.ram}),(0,ng.jsx)(u2,{title:"Flash",data:a.rom})]})}),(0,ng.jsx)(K2,{cpuTemp:a.cpuTemp,cpuSpeed:a.cpuSpeed,thermalThrottling:a.thermalThrottling,underVoltage:a.underVoltage})]})},q2=()=>{const{translate:e}=og(),n=KG(),r=(0,t.useRef)(),[o,a]=mE(((e,t,n)=>cE(e,t,n)),[]);(0,t.useEffect)((()=>(s(),r.current=setInterval((()=>{s()}),5e3),()=>{clearInterval(r.current)})),[]);const[i,l]=(0,t.useState)([]),c=[{title:"IP Port",key:"ipport",dataIndex:"ipport",width:120,onCell:()=>({style:{minWidth:120}}),render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"IP Port"}),e]}),sorter:(e,t)=>e.ipport-t.ipport,...n("ipport")},{title:e("protocol"),key:"protocol",dataIndex:"protocol",width:105,render:(t,n,r)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("protocol")}),t.toLocaleUpperCase()]}),sorter:(e,t)=>e.protocol.localeCompare(t.protocol)},{title:e("type"),key:"type",dataIndex:"type",width:105,render:(t,n,r)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("type")}),(0,ng.jsx)("span",{children:d(t)})]}),sorter:(e,t)=>e.type.localeCompare(t.type),onFilter:(e,t)=>0===t.type.indexOf(e),filters:iS(i.map((e=>({text:d(e.type),value:e.type})))).length>1?iS(i.map((e=>({text:d(e.type),value:e.type})))):void 0},{title:e("networkCard"),key:"port",dataIndex:"port",width:160,onCell:()=>({style:{minWidth:160}}),render:t=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("networkCard")}),e(t).toLocaleUpperCase()||ZC(t)||t.toLocaleUpperCase()]}),sorter:(e,t)=>e.port.localeCompare(t.port)},{title:e("status"),key:"state",dataIndex:"state",width:130,onCell:()=>({style:{minWidth:50}}),render:t=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("status")}),u(t)]}),sorter:(e,t)=>e.state.localeCompare(t.state),onFilter:(e,t)=>0===t.state.indexOf(e),filters:iS(i.map((e=>({text:u(e.state),value:e.state})))).length>1?iS(i.map((e=>({text:u(e.state),value:e.state})))).filter((e=>!!e.value)):void 0},{title:e("process"),key:"process",dataIndex:"process",sorter:(e,t)=>e.state.localeCompare(t.state),width:200,onCell:()=>({style:{minWidth:130}})}];function s(){a(GS,GC(),!1)}function d(e){return e.replace("ip","IP")}function u(e){return e.replaceAll("_"," ").toLocaleUpperCase()}return(0,t.useEffect)((()=>{o.value&&l(o.value)}),[o]),(0,ng.jsx)("div",{className:"custom",children:(0,ng.jsx)(k_,{style:{maxWidth:900},className:"tablePortsDiagnostic",dataSource:i,columns:c,pagination:!1})})};function X2(e){const t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:2);return Math.round(e*t)/t}function Y2(e){return Math.max(0,Math.min(100,e))}function $2(e){return Number.isFinite(e)?Math.max(0,e):0}const J2=1/1024;const Q2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};var Z2=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Q2}))};const e4=t.forwardRef(Z2),t4=e=>{let{usedGb:t,capacityGb:n,size:r=120,strokeWidth:o=18,usedColor:a="#1579fe",freeColor:i="#e6edf8",decimals:l=2}=e;const c=Number(null!==n&&void 0!==n?n:0),s=Number(null!==t&&void 0!==t?t:0),d=c>0?s/c*100:0,u=(r-o)/2,f=r/2,p=r/2,h=2*Math.PI*u,m=Math.max(0,Math.min(100,d))/100*h,g=Math.max(0,h-m),v=s.toFixed(l),b=(Math.max(0,c-s).toFixed(l),d>=0?d.toFixed(l):"0.00");return(0,ng.jsxs)("svg",{width:r,height:r,viewBox:"0 0 ".concat(r," ").concat(r),role:"img","aria-label":"Used ".concat(v," GB of ").concat(c," GB (").concat(b,"%)"),children:[(0,ng.jsx)("circle",{cx:f,cy:p,r:u,fill:"none",stroke:i,strokeWidth:o}),(0,ng.jsx)("circle",{cx:f,cy:p,r:u,fill:"none",stroke:a,strokeWidth:o,strokeLinecap:"round",transform:"rotate(-90 ".concat(f," ").concat(p,")"),strokeDasharray:"".concat(m," ").concat(g),strokeDashoffset:0}),(0,ng.jsxs)("g",{transform:"translate(".concat(f,", ").concat(p,")"),textAnchor:"middle",dominantBaseline:"central",children:[(0,ng.jsxs)("text",{style:{fontSize:Math.max(10,.12*r),fontWeight:600},children:[v," GB"]}),(0,ng.jsxs)("text",{y:.14*r,style:{fontSize:Math.max(9,.09*r),fill:"#6b7280"},children:[b,"%"]})]})]})},n4=()=>{var e,n,r;const{translate:o}=og(),[a,i]=(0,t.useState)(),[l,c]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{c(tE,GC())}),[]),(0,t.useEffect)((()=>{l.value&&i(l.value)}),[l]);const s=null!==(e=null===a||void 0===a?void 0:a.totalMb)&&void 0!==e?e:0,d=null!==(n=null===a||void 0===a?void 0:a.usedMb)&&void 0!==n?n:0,u=null!==(r=null===a||void 0===a?void 0:a.folders.map((e=>e.usedMb)))&&void 0!==r?r:[],{disk:f,folders:p}=function(e,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return(0,t.useMemo)((()=>{const t=$2(e)*J2,a=$2(n)*J2,i=X2(t,o),l=X2(a,o),c=X2(Math.max(0,i-l),o),s=i>0?X2(Y2(c/i*100),o):null,d=i>0?X2(Y2(l/i*100),o):null,u=r.map((e=>{const t=X2($2(e)*J2,o);return{folderGb:t,freeFolderGb:X2(Math.max(0,i-t),o),percentOfCapacity:i>0?X2(Y2(t/i*100),o):null,percentOfUsed:l>0?X2(Y2(t/l*100),o):null}}));return{disk:{capacityGb:i,usedGb:l,freeGb:c,percentFree:s,percentUsed:d},folders:u}}),[e,n,r,o])}(s,d,u,2);return(0,ng.jsxs)("div",{className:"custom-panel",children:[(0,ng.jsxs)(qz,{align:"middle",children:[(0,ng.jsx)(Zz,{xs:{span:4,offset:1},md:{span:4,offset:1},lg:{span:1,offset:0},children:(0,ng.jsx)("i",{className:"anticon",children:(0,ng.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-hard-drive h-6 w-6 text-slate-700","aria-hidden":"true","data-source-pos":"160:10-160:58","data-source-name":"HardDrive",children:[(0,ng.jsx)("line",{x1:"22",x2:"2",y1:"12",y2:"12"}),(0,ng.jsx)("path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}),(0,ng.jsx)("line",{x1:"6",x2:"6.01",y1:"16",y2:"16"}),(0,ng.jsx)("line",{x1:"10",x2:"10.01",y1:"16",y2:"16"})]})})}),(0,ng.jsxs)(Zz,{xs:{span:16,offset:1},md:{span:16,offset:1},lg:{span:16,offset:0},children:[(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"18px"},children:o("diagFs")})}),(0,ng.jsx)(qz,{children:(0,ng.jsx)("span",{children:o("diagFsSubTitle")})})]})]}),(0,ng.jsxs)(qz,{style:{marginTop:50},gutter:[32,40],children:[(0,ng.jsx)(Zz,{style:{marginRight:20},xs:{span:24,offset:0},md:{span:24,offset:0},lg:{span:6,offset:0},children:(0,ng.jsxs)(Qv,{className:"diagnosticFs",style:{textAlign:"center"},children:[(0,ng.jsx)("h4",{className:"page-title",style:{marginBottom:10},children:o("overview")}),(0,ng.jsx)(t4,{usedGb:f.usedGb,capacityGb:f.capacityGb,size:140}),(0,ng.jsx)("h3",{}),(0,ng.jsxs)("span",{children:[f.usedGb," GB ",o("used")," / ",f.capacityGb," GB ",o("total")]})]})}),(0,ng.jsx)(Zz,{xs:{span:22,offset:0},md:{span:24,offset:0},lg:{span:16,offset:0},children:(0,ng.jsx)(hc,{direction:"vertical",size:"middle",style:{display:"flex"},children:null===a||void 0===a?void 0:a.folders.map(((e,t)=>{var n,r,a,i,l;const s=null!==(n=null===(r=p[t])||void 0===r?void 0:r.folderGb)&&void 0!==n?n:0,d=(Math.max(0,(null!==(a=f.capacityGb)&&void 0!==a?a:0)-s),null!==(i=null===(l=p[t])||void 0===l?void 0:l.percentOfCapacity)&&void 0!==i?i:null);return(0,ng.jsx)(qz,{children:(0,ng.jsx)(Qv,{className:"diagnosticFs",style:{marginBottom:30},children:(0,ng.jsxs)("div",{style:{display:"flex",gap:"20px",alignItems:"center",justifyContent:"spaceBetween"},children:[(0,ng.jsxs)("div",{style:{width:"100%"},children:[(0,ng.jsx)("div",{className:"fileSystemDetail",children:(0,ng.jsx)(Hd,{title:o("".concat(e.name,"ToolTip")),children:(0,ng.jsx)("h4",{className:"page-title",children:o(e.name)})})}),(0,ng.jsx)(WF,{percent:d<=1?0:d,showInfo:!1}),(0,ng.jsxs)("div",{className:"fileSystemDetail",children:[(0,ng.jsxs)("span",{children:[d<=1&&e.name.includes("systemLogs")?0:s.toFixed(2)," GB ",o("used")]}),(0,ng.jsxs)("span",{children:[d<=1&&e.name.includes("systemLogs")?0:d,"%"]})]})]}),(0,ng.jsx)("div",{style:{width:50},children:e.name.includes("systemLogs")?(0,ng.jsx)(Hd,{title:o("deleteAllLogFile"),children:(0,ng.jsx)(IN,{title:o("titleAreYouSure"),onConfirm:async()=>{try{await uE("/diagnostic/filesystem/syslogs","","",GC()),await c(tE,GC()),ak.success(o("ok"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(o(e.message))}},cancelText:o("cancel"),okText:o("ok"),children:(0,ng.jsx)(ac,{type:"primary",danger:!0,icon:(0,ng.jsx)(e4,{style:{fontSize:"18px"}},"setting")})})}):null})]})})},t)}))})})]})]})},r4=()=>{const{translate:e}=og(),t=[{key:"status",label:(0,ng.jsx)("span",{children:e("status")}),children:(0,ng.jsx)(G2,{})},{key:"log_config",label:(0,ng.jsx)("span",{children:e("logConfig")}),children:(0,ng.jsx)(l2,{})},{key:"log_view",label:(0,ng.jsx)("span",{children:e("logView")}),children:(0,ng.jsx)(K1,{})},{key:"file_system",label:(0,ng.jsx)("span",{children:"File System"}),children:(0,ng.jsx)(n4,{})},{key:"ports_ip",label:(0,ng.jsx)("span",{children:e("ports")}),children:(0,ng.jsx)(q2,{})}];return(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("deviceDiag")})}),(0,ng.jsx)(Qv,{children:(0,ng.jsx)(Mv,{defaultActiveKey:"status",items:t,destroyInactiveTabPane:!0})})]})};const o4={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm193.4 225.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.3 0 19.9 5 25.9 13.3l71.2 98.8 157.2-218c6-8.4 15.7-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.4 12.7z",fill:t}},{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z",fill:e}}]}},name:"check-circle",theme:"twotone"};var a4=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:o4}))};const i4=t.forwardRef(a4);const l4={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm0 632c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z",fill:t}},{tag:"path",attrs:{d:"M472 732a40 40 0 1080 0 40 40 0 10-80 0zm151.6-415.3C593.6 290.5 554 276 512 276s-81.6 14.4-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.2 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5 0-39.3-17.2-76-48.4-103.3z",fill:e}}]}},name:"question-circle",theme:"twotone"};var c4=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:l4}))};const s4=t.forwardRef(c4),d4="00000000-0000-0000-0000-000000000000",u4=()=>{const[e,n]=(0,t.useState)([]),[r,o]=(0,t.useState)([]),[a,i]=(0,t.useState)([]),{translate:l,language:c}=og(),[s,d]=(0,t.useState)(!1),[u,f]=(0,t.useState)(""),[p,h]=(0,t.useState)(null),[m,g]=(0,t.useState)(),[v,b]=(0,t.useState)(""),[,y]=(0,t.useState)(0),[,x]=(0,t.useState)(0),[,w]=(0,t.useState)(null),[C,S]=(0,t.useState)(""),[,E]=(0,t.useState)(""),[k,j]=(0,t.useState)([]),[I,T]=(0,t.useState)(window.innerHeight+"px"),A=(0,t.useRef)(),O=(0,t.useRef)(),[N,R]=(0,t.useState)(!1),[P,M]=(0,t.useState)([]),[D,L]=mE(((e,t)=>cE(e,t)),[]),[_,z]=mE(((e,t,n)=>cE(e,t,n)),[]),[B,F]=mE(((e,t)=>cE(e,t)),[]);function H(){z(_S,GC(),!1)}function W(){clearInterval(A.current)}(0,t.useEffect)((()=>(sessionStorage.removeItem("selectedNodes"),L(MS,GC()),F(LS,GC()),z(_S,GC()),H(),A.current=setInterval((()=>{H()}),5e3),()=>{W()})),[]),(0,t.useEffect)((()=>{D.value&&n([...D.value]),_.value&&o([..._.value]),B.value&&i([...B.value])}),[D,B,_]);const V={};a.forEach((e=>{V[e.id]={id:e.id,category:e.category,description:e.description,protocol:e.protocol,driver:e.driver,defaultAddress:e.defaultAddress,addressRange:{min:e.addressRange.min,max:e.addressRange.max,step:e.addressRange.step},maxChilds:e.maxChilds,physicalConnectionType:e.physicalConnectionType,parentCategories:e.parentCategories,tip:e.tip}}));const U={};function K(e){R(!1),cE(zS,GC(),!1,e).then((e=>{j(e.measures)})).catch((e=>{null!==e&&void 0!==e&&e.globalHandled||(console.log(e),j([]))}))}function G(){clearInterval(O.current)}function q(e){const t=new Map,n={id:d4,description:"EHC 602",connection:"",enabled:!0,category:"",model:"",address:0,protocol:"",isExposed:"",virtualAddress:1,automaticallyAdded:"yes",radioPollingPeriod:0,url:void 0,apiKey:void 0,options:{},children:[]};return e.forEach((e=>{t.set(e.id,{...e,children:[]})})),t.forEach((e=>{if(e.connection===d4)n.children.push(e);else{const n=t.get(e.connection);n&&n.children.push(e)}})),n.children.sort(((e,t)=>e.id<t.id?-1:e.id>t.id?1:0)),[n]}r.forEach((e=>{U[e.id]={id:e.id,status:e.status,errorDetail:e.errorDetail,lastSuccessComm:e.lastSuccessComm,totalPackets:e.totalPackets,successPackets:e.successPackets,failedPackets:e.failedPackets,commParams:{valid:e.commParams.valid,baudrate:e.commParams.baudrate,parity:e.commParams.parity,bits:e.commParams.bits,stopBits:e.commParams.stopBits},isRadio:e.isRadio,radio:{model:e.radio.model,version:e.radio.version,ssn:e.radio.ssn,frequency:e.radio.frequency,rssi:e.radio.rssi,txPower:e.radio.txPower,hasBattery:e.radio.hasBattery,batteryCharge:e.radio.batteryCharge,batteryVoltage:e.radio.batteryVoltage}}})),(0,t.useEffect)((()=>{const t={virtualdevice:q(e)};M(t.virtualdevice)}),[e]);(0,t.useEffect)((()=>{const e=()=>{T(window.innerHeight+550+"px")};return e(),window.addEventListener("resize",e),()=>{W(),G(),window.removeEventListener("resize",e)}}),[]);const X=e=>{var t;f(e.id),g(e),K(t=e.id),O.current=setInterval((()=>{K(t)}),5e3),d(!0)},Y={mode:"diagnostic",showActions:!1,canAdd:()=>!1,canRemove:()=>!1,onSelect:e=>X(e),onAdd:void 0,onRemove:void 0,getStatusClass:e=>{if(!e)return"node-unknown";switch(e.status){case"error":return"node-error";case"ok":return"node-ok";default:return"node-unknown"}},getBatteryClass:e=>e?e.radio.batteryCharge<=20?"low":e.radio.batteryCharge>20&&e.radio.batteryCharge<=40?"low_medium":e.radio.batteryCharge>40&&e.radio.batteryCharge<=60?"medium":e.radio.batteryCharge>60&&e.radio.batteryCharge<=80?"full_medium":(e.radio.batteryCharge,"full"):"low",getSignalClass:e=>e?e.radio.rssi<=21?"signal-weak":e.radio.rssi>=22&&e.radio.rssi<=24?"signal-medium":(e.radio.rssi,"signal-strong"):"signal-weak",hasBattery:e=>e?e.radio.hasBattery:"no",isRadio:e=>e?e.isRadio:"no",getBatteryCharge:e=>e?e.radio.batteryCharge:0};return(0,ng.jsx)("div",{className:"card-container",children:(0,ng.jsxs)(Qv,{bordered:!1,style:{overflowX:"auto",overflowY:"hidden",height:"100%",minHeight:"1000px"},children:[(0,ng.jsx)(wT,{title:aS(p,20)||l("details"),placement:"right",closable:!1,onClose:()=>{d(!1),G()},open:s,getContainer:!1,children:m&&U[m.id]?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(hB,{orientation:"left",orientationMargin:"0",children:(0,ng.jsxs)("span",{children:["ok"===U[m.id].status?(0,ng.jsxs)("span",{children:[(0,ng.jsx)(i4,{twoToneColor:"#52c41a"})," "]}):"error"===U[m.id].status?(0,ng.jsxs)("span",{children:[(0,ng.jsx)(J1,{twoToneColor:"#ff0000"})," "]}):"unknown"===U[m.id].status?(0,ng.jsxs)("span",{children:[(0,ng.jsx)(s4,{twoToneColor:"#a6a6a6"})," "]}):null,l("communication")]})}),(0,ng.jsxs)("div",{className:"node-diagnostic-details-container",children:[(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("statoConn")}),(0,ng.jsx)("span",{children:"ok"===U[m.id].status?(0,ng.jsx)("span",{children:"Ok"}):"error"===U[m.id].status?(0,ng.jsx)("span",{className:"error-detail",children:l(U[m.id].errorDetail)}):"unknown"===U[m.id].status?(0,ng.jsx)("span",{children:l("notyetcomm")}):null})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("lastComm")}),(0,ng.jsx)("span",{children:(e=>{if(""===e)return"---";return new Date(e).toLocaleString(c)})(U[m.id].lastSuccessComm)})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("totalPackets")}),(0,ng.jsx)("span",{children:U[m.id].totalPackets>0?U[m.id].totalPackets:"---"})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("successPackets")}),(0,ng.jsx)("span",{children:0!==U[m.id].totalPackets&&U[m.id].successPackets/U[m.id].totalPackets*100>0?(U[m.id].successPackets/U[m.id].totalPackets*100).toFixed()+"%":"---"})]}),"yes"===U[m.id].commParams.valid&&("http"===m.protocol?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:"URL"}),(0,ng.jsx)("span",{children:m.url})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:"API Key"}),(0,ng.jsx)("span",{children:m.apiKey})]})]}):(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("baudRate")}),(0,ng.jsx)("span",{children:U[m.id].commParams.baudrate})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("parity")}),(0,ng.jsx)("span",{children:U[m.id].commParams.parity})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("numBits")}),(0,ng.jsx)("span",{children:U[m.id].commParams.bits})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("stopBit")}),(0,ng.jsx)("span",{children:U[m.id].commParams.stopBits})]})]})),"yes"===U[m.id].isRadio&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("infoHw")}),(0,ng.jsx)("span",{children:l("model")+": "+U[m.id].radio.model+" - "+l("version")+": "+U[m.id].radio.version})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:"SSN"}),(0,ng.jsx)("span",{children:U[m.id].radio.ssn})]}),U[m.id].radio.frequency&&(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("frequency")}),(0,ng.jsxs)("span",{children:[U[m.id].radio.frequency," MHz"]})]}),U[m.id].radio.rssi&&(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("qualityRxSignale")}),(0,ng.jsx)(WF,{steps:15,percent:U[m.id].radio.rssi/32*100,strokeColor:U[m.id].radio.rssi<=21?"#da1e2a":U[m.id].radio.rssi>=22&&U[m.id].radio.rssi<=24?"#ffee00":"#83c083",size:[8,15],format:()=>"ok"===U[m.id].status?"".concat(U[m.id].radio.rssi):null})]}),U[m.id].radio.txPower&&(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("powerTx")}),(0,ng.jsxs)("span",{children:[U[m.id].radio.txPower," dBm"]})]}),"yes"===U[m.id].radio.hasBattery&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"},children:l("batteryLevel")}),(0,ng.jsx)(WF,{steps:15,percent:U[m.id].radio.batteryCharge,strokeColor:U[m.id].radio.batteryCharge<=20?"#da1e2a":U[m.id].radio.batteryCharge>20&&U[m.id].radio.batteryCharge<=40?"#da5c1e":U[m.id].radio.batteryCharge>40&&U[m.id].radio.batteryCharge<=60?"#ffee00":U[m.id].radio.batteryCharge>60&&U[m.id].radio.batteryCharge<=80?"#52b952":"#83c083",size:[8,15],format:e=>"ok"===U[m.id].status?"".concat(e,"%"):null})]}),(0,ng.jsxs)("div",{className:"node-diagnostic-detail-item",children:[(0,ng.jsx)("span",{style:{fontWeight:"bold"}}),(0,ng.jsxs)("span",{children:[U[m.id].radio.batteryVoltage," mV"]})]})]})]})]}),k.length>0&&"ok"===U[m.id].status?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(hB,{orientation:"left",orientationMargin:"0",children:l("data")}),(0,ng.jsx)("div",{style:{lineHeight:"1.5",fontSize:"12px"},children:k.map((e=>"unavailable"!==e.status?(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"start",borderBottom:"1px solid #e6e6e6"},children:[(0,ng.jsx)("span",{style:{flexBasis:"60%",padding:"2px"},children:l(e.descr)||e.descr}),(0,ng.jsx)("span",{style:{flexBasis:"25%",padding:"2px"},children:"ok"===e.status?e.value+" "+e.unit:"error"===e.status?"---":"unknown"===e.status?"?":null})]}):null))})]}):null]}):(0,ng.jsx)(iO,{image:iO.PRESENTED_IMAGE_SIMPLE})}),(0,ng.jsx)("div",{className:"tree-container",onClick:()=>{f(""),d(!1)},children:(0,ng.jsx)("ul",{children:P.map((e=>(0,ng.jsx)(cq,{device:e,modelMap:V,diagnosticMap:U,selectedIds:[u],strategy:Y},e.id)))})})]})})},f4=e=>{let{rssi:n,connStatus:r}=e;const[o,a]=(0,t.useState)("");return(0,t.useEffect)((()=>{"error"===r?a("signal-none"):n<=21?a("signal-weak"):n>=22&&n<=24?a("signal-medium"):n>24&&a("signal-strong")}),[]),(0,ng.jsxs)("svg",{version:"1.1",className:"signal "+o,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"15px",height:"15px",viewBox:"0 0 11.26 8","enable-background":"new 0 0 11.26 8",xmlSpace:"preserve",children:[(0,ng.jsx)("path",{className:"signal-base",d:"M6.337,7.247c-0.391-0.391-1.023-0.391-1.414,0l0.708,0.708L6.337,7.247z"}),(0,ng.jsxs)("g",{className:"signal-wave",children:[(0,ng.jsx)("path",{className:"signal-wave-inner",fill:"none",stroke:"#000000","stroke-miterlimit":"10",d:"M7.62,5.966c-1.098-1.098-2.88-1.098-3.977,0"}),(0,ng.jsx)("path",{className:"signal-wave-middle",fill:"none",stroke:"#000000","stroke-miterlimit":"10",d:"M9.31,4.275C7.278,2.244,3.984,2.245,1.952,4.276"}),(0,ng.jsx)("path",{className:"signal-wave-outer",fill:"none",stroke:"#000000","stroke-miterlimit":"10",d:"M10.9,2.684c-2.911-2.911-7.629-2.911-10.54,0"})]})]})},p4="status",h4="lastSuccessComm",m4="successPackets",g4="radio",v4="ssn",b4="rssi",y4="txPower",x4="batteryCharge",w4="virtualDevice",C4=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)({lang:"it",tz:"GMT+1"}),o=(0,t.useRef)(),a=KG(),[i,l]=(0,t.useState)([]),[c,s]=(0,t.useState)([]),[d,u]=(0,t.useState)([]),[f,p]=(0,t.useState)([]),[h,m]=mE(((e,t,n)=>cE(e,t,n)),[]),[g,v]=mE(((e,t,n)=>cE(e,t,n)),[]),[b,y]=mE(((e,t,n)=>cE(e,t,n)),[]),[x,w]=mE(((e,t,n)=>cE(e,t,n)),[]),C=[{title:e(H1),key:H1,dataIndex:[w4,H1],width:100,...a([w4,H1]),sorter:(e,t)=>{var n,r,o,a;return(null!==(n=null===(r=e.virtualDevice)||void 0===r?void 0:r.description)&&void 0!==n?n:"").localeCompare(null!==(o=null===(a=t.virtualDevice)||void 0===a?void 0:a.description)&&void 0!==o?o:"")},render:t=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(H1)}),aS(t,15)]})},{title:e(z1),key:z1,dataIndex:[w4,z1],width:100,sorter:(e,t)=>{var n,r;return S(null===(n=e.virtualDevice)||void 0===n?void 0:n.model).localeCompare(S(null===(r=t.virtualDevice)||void 0===r?void 0:r.model))},render:t=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(z1)}),(0,ng.jsx)("div",{children:S(t)})]}),...a([w4,z1])},{title:e(F1),dataIndex:[w4,F1],key:F1,width:60,align:"center",sorter:(e,t)=>{var n,r;return(null===(n=e.virtualDevice)||void 0===n?void 0:n.virtualAddress)-(null===(r=t.virtualDevice)||void 0===r?void 0:r.virtualAddress)},render:(t,n)=>{var r;return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(F1)}),(0,ng.jsx)("span",{children:"no"===(null===(r=n.virtualDevice)||void 0===r?void 0:r.isExposed)?"---":t})]})}},{title:e("fisicalAddress"),key:B1,dataIndex:[w4,B1],width:60,align:"center",sorter:(e,t)=>{var n,r;return(null===(n=e.virtualDevice)||void 0===n?void 0:n.address)-(null===(r=t.virtualDevice)||void 0===r?void 0:r.address)},render:(t,n)=>{var r,o,a;const i=null!==(r=null===(o=n.virtualDevice)||void 0===o?void 0:o.url)&&void 0!==r?r:"";return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("fisicalAddress")}),(0,ng.jsx)("div",{children:"http"===(null===(a=n.virtualDevice)||void 0===a?void 0:a.protocol)?aS(i,15):t})]})}},{title:e(p4),key:p4,dataIndex:p4,align:"center",width:50,sorter:(e,t)=>e[p4].localeCompare(t[p4]),render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(p4)}),(0,ng.jsx)(Hd,{title:e("ok"===t?t:n.errorDetail),children:(0,ng.jsx)("div",{style:{borderRadius:"3px",backgroundColor:"ok"===t?"green":"error"===t?"red":"grey"},children:(0,ng.jsx)("span",{children:"ok"===t?(0,ng.jsx)(NO,{style:{color:"white"}}):(0,ng.jsx)(zg,{style:{color:"white"}})})})})]})},{title:e(m4),key:h4,dataIndex:h4,align:"center",width:70,sorter:(e,t)=>e[h4].localeCompare(t[h4]),render:(t,r)=>{const o=new Date(t),a=o.toLocaleDateString(n.lang),i=o.toLocaleTimeString(n.lang);return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(m4)}),"ok"===r.status?(0,ng.jsx)("span",{children:0!==r.totalPackets?(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(Hd,{title:(0,ng.jsxs)(hc,{direction:"vertical",children:[e("totalPackets")+" : "+r.totalPackets,(0,ng.jsxs)(ng.Fragment,{children:[e("lastComm")+" : ",(0,ng.jsxs)(hc,{children:["Invalid Date"!==a&&a,"Invalid Date"!==i&&i]})]}),"yes"===r.commParams.valid?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)(hc,{children:[e("baudRate"),": ",r.commParams.baudrate]}),(0,ng.jsxs)(hc,{children:[e("parity"),": ",e(r.commParams.parity)]}),(0,ng.jsxs)(hc,{children:[e("numBits"),": ",r.commParams.bits]}),(0,ng.jsxs)(hc,{children:[e("stopBit"),": ",r.commParams.stopBits]})]}):null]}),children:(0,ng.jsx)(Tz,{})}),(r.successPackets/r.totalPackets*100).toFixed(1)+"%"]}):""}):"---"]})}},{title:e("infoHw"),dataIndex:[g4,z1],key:z1,align:"center",width:100,render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e(z1)}),(0,ng.jsxs)(hc,{direction:"vertical",children:[e(z1)+": "+t,e("version")+": "+n.radio.version]})]}),sorter:(e,t)=>e[g4][z1]-t[g4][z1]},{title:"SSN",dataIndex:[g4,v4],key:v4,align:"center",width:100,sorter:(e,t)=>e[g4][v4].localeCompare(t[g4][v4]),render:e=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:"SSN"}),(0,ng.jsx)("span",{children:e})]})},{title:(0,ng.jsx)(GU,{}),dataIndex:[g4,b4],key:b4,align:"center",width:50,sorter:(e,t)=>("yes"===e.isRadio?e.radio.rssi:-1)-("yes"===t.isRadio?t.radio.rssi:-1),render:(e,t)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:(0,ng.jsx)(GU,{})}),"ok"===t.status?"yes"===t.isRadio&&(0,ng.jsxs)(hc,{children:[e,(0,ng.jsx)(f4,{connStatus:t.status,rssi:e})]}):"---"]})},{title:e("powerTx"),dataIndex:[g4,y4],key:y4,align:"center",width:100,render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("powerTx")}),"ok"===n.status?"yes"===n.radio.hasBattery&&(0,ng.jsxs)("span",{children:[t," dBm"]}):"---"]}),sorter:(e,t)=>("yes"===e.radio.hasBattery?e.radio.txPower:-1)-("yes"===t.radio.hasBattery?t.radio.txPower:-1)},{title:e("batteryLevel"),dataIndex:[g4,x4],key:x4,align:"center",width:100,render:(t,n)=>(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{className:"xs-column-title",children:e("batteryLevel")}),"ok"===n.status?"yes"===n.radio.hasBattery&&(0,ng.jsxs)("span",{children:[t,"%"]}):"---"]}),sorter:(e,t)=>("yes"===e.radio.hasBattery?e.radio.batteryCharge:-1)-("yes"===t.radio.hasBattery?t.radio.batteryCharge:-1)}];function S(e){var t,n;return null!==(t=null===(n=d.find((t=>t.id===e)))||void 0===n?void 0:n.description)&&void 0!==t?t:""}function E(){m(_S,GC(),!1),y(MS,GC(),!1),w(LS,GC(),!1)}return(0,t.useEffect)((()=>(E(),o.current=setInterval((()=>{E()}),5e3),v(hS,GC(),!1),()=>{clearInterval(o.current)})),[]),(0,t.useEffect)((()=>{h.value&&l(h.value)}),[h]),(0,t.useEffect)((()=>{g.value&&r({lang:g.value.language,tz:g.value.timezone})}),[g]),(0,t.useEffect)((()=>{b.value&&s(b.value)}),[b]),(0,t.useEffect)((()=>{x.value&&u(x.value)}),[x]),(0,t.useEffect)((()=>{c.length&&i.length&&p(i.map((e=>({...e,virtualDevice:c.find((t=>t.id===e.id))}))))}),[c,i,d]),(0,ng.jsx)(k_,{dataSource:f,columns:C,pagination:!1,scroll:{x:"min-content"}})},S4=(0,t.memo)(C4),E4=e=>{let{value:t,errorDetail:n}=e;const{translate:r}=og();return(0,ng.jsx)(Hd,{title:r("ok"===t?t:null!==n&&void 0!==n?n:""),children:(0,ng.jsx)(xK,{color:"ok"===t?"success":"error"===t?"error":"default",children:"ok"===t?(0,ng.jsx)(NO,{}):(0,ng.jsx)(zg,{})})})},k4=e=>{var n,r;let{data:o}=e;const{translate:a}=og(),i=KG(),l=[...y(o).measures.map((e=>e.descr))],c=a(null!==(n=null===(r=o[0].virtualDevice)||void 0===r?void 0:r.category)&&void 0!==n?n:""),[s,d]=(0,t.useState)(l),[u,f]=(0,t.useState)(o),p=()=>u.map((e=>{var t,n,r;const o=s.map((t=>{var n,r;const o=e.measures.find((e=>e.descr===t));return{[a(t).length?a(t):t]:"ok"===(null===o||void 0===o?void 0:o.status)?(null!==(n=null===o||void 0===o?void 0:o.value)&&void 0!==n?n:"")+" "+(null!==(r=null===o||void 0===o?void 0:o.unit)&&void 0!==r?r:""):"error"===(null===o||void 0===o?void 0:o.status)?"err":"unavailable"===(null===o||void 0===o?void 0:o.status)?"X":"unknown"===(null===o||void 0===o?void 0:o.status)?"---":""}})),i=Object.assign({},...o);return{DESCRIPTION:null!==(t=null===(n=e.virtualDevice)||void 0===n?void 0:n.description)&&void 0!==t?t:"",status:"ok"===e.status?a(e.status):a(null!==(r=e.errorDetail)&&void 0!==r?r:""),...i}})),h=[a(H1),a("status"),...s.map((e=>a(e)))],m=[{title:a(H1),key:H1,dataIndex:[w4,H1],width:200,render:(e,t)=>(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(E4,{value:t.status,errorDetail:t.errorDetail}),(0,ng.jsx)("span",{children:aS(e,15)})]}),...i([w4,H1]),sorter:(e,t)=>{var n,r,o,a;return(null!==(n=null===(r=e.virtualDevice)||void 0===r?void 0:r.description)&&void 0!==n?n:"").localeCompare(null!==(o=null===(a=t.virtualDevice)||void 0===a?void 0:a.description)&&void 0!==o?o:"")},fixed:!0},...y(o).measures.map(((e,t)=>({title:"".concat(a(e.descr).length?a(e.descr):e.descr),key:e.descr,dataIndex:"descr",width:150,sorter:(e,n)=>{var r,o;return(null==(null===(r=e.measures[t])||void 0===r?void 0:r.status)||"ok"!==e.measures[t].status?-10:+e.measures[t].value)-(null==(null===(o=n.measures[t])||void 0===o?void 0:o.status)||"ok"!==n.measures[t].status?-10:+n.measures[t].value)},render:(e,n)=>null!=n.measures[t]&&(0,ng.jsxs)("span",{children:["ok"===n.measures[t].status&&n.measures[t].value+" "+n.measures[t].unit,"error"===n.measures[t].status&&"err","unknown"===n.measures[t].status&&"---","unavailable"===n.measures[t].status&&(0,ng.jsx)(zg,{})]})})))],g=m.map((e=>({...e,hidden:b(e)}))),v=[{key:"1",label:a("csv")},{key:"2",label:a("xlsx")}];function b(e){var t;return null===(t=e.title)||void 0===t||!t.toString().length||e.key!==H1&&!(null!==s&&void 0!==s&&s.includes(e.key))}function y(e){const t=Math.max(...e.map((e=>e.measures.length)));return e.find((e=>e.measures.length===t))}return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(hc,{style:{marginBottom:16},children:(0,ng.jsx)(Nh,{menu:{items:v,onClick:e=>{let{key:t}=e;"1"===t&&function(){const e={data:p(),filename:c,delimiter:",",headers:h};try{hq(e)}catch{ak.error(a("errorDownloadCSV"))}}(),"2"===t&&function(){try{const e=D1.book_new(),t=D1.json_to_sheet([]);D1.sheet_add_aoa(t,[h]),D1.sheet_add_json(t,p(),{origin:"A2",skipHeader:!0}),D1.book_append_sheet(e,t,"Sheet1");const n=S1(e,{bookType:"xlsx",type:"array"}),r=new Blob([n],{type:"application/octet-stream"});(0,mq.saveAs)(r,"".concat(c,".xlsx"))}catch{ak.error(a("errorDownloadExcel"))}}()}},trigger:["click"],children:(0,ng.jsx)(ac,{children:a("download")})})}),(0,ng.jsx)(HO,{style:{marginBottom:"10px",marginTop:"10px",minWidth:"200px"},mode:"multiple",value:s,placeholder:"Columns",onChange:e=>{d(e)},options:l.map((e=>({label:a(e).length?a(e):e,value:e})))}),(0,ng.jsx)(k_,{style:{minHeight:100},dataSource:o,columns:g,pagination:!1,scroll:{x:500},onChange:function(e,t,n,r){f(r.currentDataSource)}})]})},j4=(0,t.memo)(k4),I4=()=>{const e=(0,t.useRef)(),{translate:n}=og(),[r,o]=(0,t.useState)([]),[a,i]=(0,t.useState)([]),[l,c]=(0,t.useState)([]),[s,d]=(0,t.useState)([]),[u,f]=mE(((e,t,n,r)=>cE(e,t,n,r)),[]),[p,h]=mE(((e,t,n)=>cE(e,t,n)),[]),[m,g]=mE(((e,t,n)=>cE(e,t,n)),[]),[v,b]=mE(((e,t,n)=>cE(e,t,n)),[]);function y(){f(zS,GC(),!1),h(MS,GC(),!1),g(LS,GC(),!1),b(_S,GC(),!1)}return(0,t.useEffect)((()=>(y(),e.current=setInterval((()=>{y()}),5e3),()=>{clearInterval(e.current)})),[]),(0,t.useEffect)((()=>{l.length&&a.length&&s.length&&u.value&&o(function(e){const t=e.filter((e=>0!==e.measures.length)).map((e=>{var t,n;return{virtualDevice:a.find((t=>t.id===e.id)),measures:e.measures.map((e=>({...e}))),status:null===(t=s.find((t=>t.id===e.id)))||void 0===t?void 0:t.status,errorDetail:null===(n=s.find((t=>t.id===e.id)))||void 0===n?void 0:n.errorDetail}}));return t}(u.value))}),[u,l,a,s]),(0,t.useEffect)((()=>{p.value&&i(p.value)}),[p]),(0,t.useEffect)((()=>{m.value&&c(m.value)}),[m]),(0,t.useEffect)((()=>{v.value&&d(v.value)}),[v]),(0,ng.jsx)(ng.Fragment,{children:!!r.length&&iS(r.map((e=>{var t;return null!=(null===(t=e.virtualDevice)||void 0===t?void 0:t.category)?e.virtualDevice.category:""}))).map(((e,t)=>(0,ng.jsx)(j4,{data:r.filter((t=>{var n;return(null!=(null===(n=t.virtualDevice)||void 0===n?void 0:n.category)?t.virtualDevice.category:"")===e}))},t)))||(0,ng.jsx)(iO,{})})},T4=(0,t.memo)(I4),A4=()=>{const{translate:e}=og(),t=[{key:"1",label:e("connections"),children:(0,ng.jsx)(S4,{})},{key:"2",label:e("measures"),children:(0,ng.jsx)(T4,{})}];return(0,ng.jsx)("div",{className:"card-container",children:(0,ng.jsx)(Qv,{children:(0,ng.jsx)(Mv,{defaultActiveKey:"1",items:t,destroyInactiveTabPane:!0})})})},O4=()=>{const{translate:e}=og(),t=[{key:"1",label:e("graphic"),children:(0,ng.jsx)(u4,{})},{key:"2",label:e("table"),children:(0,ng.jsx)(A4,{})}];return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:e("virtualDeviceDiag")})}),(0,ng.jsx)(Mv,{defaultActiveKey:"1",items:t,destroyInactiveTabPane:!0})]})},{TextArea:N4}=Aj,R4=()=>{const[e,n]=(0,t.useState)(""),[r,o]=(0,t.useState)(""),{translate:a}=og();return(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",children:(0,ng.jsx)("h3",{className:"page-title",children:"SHELL-COMMAND"})}),(0,ng.jsxs)(Qv,{bordered:!1,className:"ylcSummaryCard",children:[(0,ng.jsxs)(hc.Compact,{style:{width:"100%"},children:[(0,ng.jsx)(Aj,{placeholder:"Insert command",onChange:e=>n(e.target.value)}),(0,ng.jsx)(ac,{type:"primary",onClick:async()=>{(async()=>{const t={cmd:e};try{await sE("/container/command",JSON.stringify(t),GC(),!1).then((e=>{o(e)})).catch((e=>{console.log(e)}))}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return;ak.error(a(n.message))}})()},children:"Submit"})]}),(0,ng.jsx)(N4,{rows:10,placeholder:"shell result",value:r,style:{fontFamily:"monospace",color:"#fff",background:"#000"}})]})]})})},P4=e=>{let{packetSent:t,packetReceived:n,status:r}=e;const{translate:o}=og();return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(M4,{title:o("writeData"),data:t,status:r,datiScritti:!0}),(0,ng.jsx)(M4,{title:o("readData"),data:n,status:r,datiScritti:!1})]})},M4=e=>{let{title:t,data:n=[],status:r,datiScritti:o}=e;return(0,ng.jsxs)("div",{style:{alignItems:"center",display:"flex"},children:[(0,ng.jsxs)("span",{style:{width:100,whiteSpace:"nowrap",overflow:"hidden"},children:[t,":"]}),o||"ok"===r?(0,ng.jsx)("span",{style:{minWidth:100,maxWidth:"70vw",minHeight:"20px",color:"gray",overflowY:"hidden",overflowX:"auto",alignContent:"center",padding:"0 5px",whiteSpace:"nowrap"},children:n.map((e=>cS(e))).toString().replaceAll(","," ; ")}):(0,ng.jsx)("span",{style:{minWidth:100,maxWidth:"70vw",minHeight:"20px",color:"red",overflowY:"hidden",overflowX:"auto",alignContent:"center",padding:"0 5px",whiteSpace:"nowrap"},children:r})]})},D4=e=>{let{resultRead:t,resultWrite:n}=e;return(0,ng.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:n?(0,ng.jsx)(P4,{packetReceived:null===n||void 0===n?void 0:n.packetReceived,packetSent:null===n||void 0===n?void 0:n.packetSent,status:null===n||void 0===n?void 0:n.result}):(0,ng.jsx)(P4,{packetReceived:null===t||void 0===t?void 0:t.packetReceived,packetSent:null===t||void 0===t?void 0:t.packetSent,status:null===t||void 0===t?void 0:t.result})})},L4=e=>{let{decoder:t,setDecoder:n,optionsDecoderType:r,resultReadTable:o,setResultReadTable:a,esegui:i,diffDataReceivedList:l,resultRead:c,resultWrite:s}=e;const{translate:d}=og(),u=[{key:"address",dataIndex:"address",title:d("address"),align:"center",render:e=>(0,ng.jsx)(ng.Fragment,{children:t?cS(e):e})},{key:"value",dataIndex:"value",title:d("value"),align:"center",render:e=>(0,ng.jsx)(ng.Fragment,{children:t?cS(e):e}),onCell:e=>({style:{backgroundColor:null!==l&&void 0!==l&&l[o.indexOf(e)]?"#5ec515ff":"",color:null!==l&&void 0!==l&&l[o.indexOf(e)]?"#ffffffff":""}})},{key:"decodedValue",dataIndex:"decodedValue",title:d("decodedValue"),align:"center",render(e,t,n){if(t.function>2&&t.isVisibleDecoderType)switch(t.decoderType){case 0:return function(e){(32768&e)>0&&(e-=1,e=-(e^=65535));return e}(e);case 1:return e;case 2:return f([o[n].value,o[n+1].value],"REVERSE_NONE");case 3:return f([o[n].value,o[n+1].value],"REVERSE_NONE",!0);case 4:return f([o[n].value,o[n+1].value],"REVERSE_WORD");case 5:return f([o[n].value,o[n+1].value],"REVERSE_WORD",!0);case 6:return f([o[n].value,o[n+1].value],"REVERSE_BYTE");case 7:return f([o[n].value,o[n+1].value],"REVERSE_BYTE",!0);case 8:return f([o[n].value,o[n+1].value,o[n+2].value,o[n+3].value],"REVERSE_NONE");case 9:return f([o[n].value,o[n+1].value,o[n+2].value,o[n+3].value],"REVERSE_NONE",!0);case 10:return p([o[n].value,o[n+1].value],"REVERSE_NONE");case 11:return p([o[n].value,o[n+1].value],"REVERSE_WORD");case 12:return p([o[n].value,o[n+1].value],"REVERSE_BYTE");case 13:return String.fromCharCode(e)}},onCell:e=>({style:e.function>2&&{backgroundColor:null!==l&&void 0!==l&&l[o.indexOf(e)]?"#5ec515ff":"",color:null!==l&&void 0!==l&&l[o.indexOf(e)]?"#ffffffff":""}||{},rowSpan:e.isVisibleDecoderType?8===e.decoderType||9===e.decoderType?4:e.decoderType>=2&&e.decoderType<=12?2:1:0})},{key:"decoderType",dataIndex:"decoderType",title:d("decoderType"),align:"center",render:(e,t,n)=>(0,ng.jsx)(HO,{disabled:i,style:{minWidth:270,visibility:t.function>2&&t.isVisibleDecoderType?"visible":"hidden"},options:h(n,t),value:e,onSelect:e=>{!function(e,t,n){const r=o.filter((t=>t.addressFather===e.addressFather)).indexOf(e);8!==n&&9!==n||r%2!==0?0===n||1===n||13===n?(8!==o[t].decoderType&&9!==o[t].decoderType||(o[t+1].isVisibleDecoderType=!0,o[t+2].isVisibleDecoderType=!0,o[t+2].decoderType>1&&o[t+2].decoderType<13?o[t+3].isVisibleDecoderType=!1:o[t+3].isVisibleDecoderType=!0),o[t].decoderType>1&&o[t].decoderType<13&&(o[t+1].isVisibleDecoderType=!0),o[t].decoderType=n,a([...o])):8!==n&&9!==n&&r%2===0&&(8!==o[t].decoderType&&9!==o[t].decoderType||(o[t+2].isVisibleDecoderType=!0,o[t+2].decoderType>1&&o[t+2].decoderType<13?o[t+3].isVisibleDecoderType=!1:o[t+3].isVisibleDecoderType=!0),o[t+1].isVisibleDecoderType=!1,o[t].decoderType=n,a([...o])):(o[t].decoderType=n,o[t+1].isVisibleDecoderType=!1,o[t+2].isVisibleDecoderType=!1,o[t+3].isVisibleDecoderType=!1,a([...o]))}(t,n,e)}}),onCell:e=>({rowSpan:e.isVisibleDecoderType?8===e.decoderType||9===e.decoderType?4:e.decoderType>=2&&e.decoderType<=12?2:1:0})}];function f(e,t,n){let r=0;if("REVERSE_NONE"===t)for(let o=0;o<e.length;o++)r+=e[e.length-1-o]<<16*o;else if("REVERSE_WORD"===t)for(let o=0;o<e.length;o++)r+=e[o]<<16*o;else if("REVERSE_BYTE"===t)for(let o=0;o<e.length;o++){r+=((255&e[e.length-1-o])<<8|e[e.length-1-o]>>8&255)<<16*o}return n?r>>>0:r}function p(e,t){const n=f(e,t),r=new ArrayBuffer(4),o=new DataView(r);return o.setInt32(0,n),o.getFloat32(0).toFixed(6)}function h(e,t){const n=o.filter((e=>e.addressFather===t.addressFather)),a=n.indexOf(t),i=n.slice(a).length;return a%2!==0?r.filter((e=>0===e.value||1===e.value||13===e.value)):i>=4?r:i>=2?r.filter((e=>8!==e.value&&9!==e.value)):r.filter((e=>0===e.value||1===e.value||13===e.value))}return(0,ng.jsx)(Qv,{style:{width:"100%"},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,ng.jsx)(D4,{resultRead:c,resultWrite:s}),(0,ng.jsxs)(hc,{size:20,children:[(0,ng.jsxs)("div",{style:{display:"flex",gap:5,alignItems:"center",marginLeft:4},children:[d("dec"),(0,ng.jsx)(yI,{checked:t,onClick:()=>{n((e=>!e))}}),d("hex")]}),(0,ng.jsx)("div",{style:{borderRadius:3,backgroundColor:"rgb(94, 197, 21)",visibility:i?"visible":"hidden",paddingLeft:7,paddingRight:7,color:"white"},children:d("inRunning")})]}),(0,ng.jsx)(k_,{className:"tabellaDiagnosticaModbus",dataSource:o,columns:u,pagination:!1}),(0,ng.jsx)(B4,{resultRead:c,resultWrite:s})]})})},_4=e=>{let{dataRead:t,setDataRead:n,esegui:r,initRow:o,labelCodeFunction:a,addressDevice:i,setAddressDevice:l}=e;const{translate:c}=og(),s=(e,t)=>{n((n=>({...n,[e]:t})))},d=(e,n,r)=>{const o=[...t.rows];o[e][n]=r,s("rows",[...o])},u=Array.from({length:31},((e,t)=>({value:1e3*t,label:0===t?c("once"):"".concat(t," sec")}))),f=[{key:"index",title:c("index"),align:"center",render:(e,t,n)=>n+1},{key:"enable",title:c("enable"),dataIndex:"enable",align:"center",render:(e,t,n)=>(0,ng.jsx)(aM,{checked:e,onClick:()=>d(n,"enable",!e),disabled:r})},{key:"registerAddress",title:c("registerAddress"),dataIndex:"registerAddress",align:"center",onCell:()=>({style:{minWidth:145}}),render:(e,t,n)=>(0,ng.jsx)(xN,{min:0,max:65535,value:e,disabled:!t.enable||r,onChange:e=>null!=e&&d(n,"registerAddress",e)})},{key:"numberOfRegisters",title:c("numberOfRegisters"),dataIndex:"numberOfRegisters",align:"center",onCell:()=>({style:{minWidth:145}}),render:(e,t,n)=>(0,ng.jsx)(xN,{min:1,max:125,value:e,disabled:!t.enable||r,onChange:e=>null!=e&&d(n,"numberOfRegisters",e)})},{key:"functionCode",title:c("functionCode"),dataIndex:"functionCode",align:"center",onCell:()=>({style:{minWidth:145}}),render:(e,t,n)=>(0,ng.jsx)(HO,{style:{width:200},value:e,options:[{value:1,label:a(c("readCoils"),1)},{value:2,label:a(c("readDiscreteInput"),2)},{value:3,label:a(c("readHoldingRegisters"),3)},{value:4,label:a(c("readInputRegisters"),4)}],disabled:!t.enable||r,onChange:e=>d(n,"functionCode",e)})},{key:"action",title:c("action"),align:"center",render:(e,n)=>(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},icon:(0,ng.jsx)(kz,{}),onClick:()=>t.rows.length>1&&s("rows",t.rows.filter((e=>e!==n))),disabled:r||t.rows.length<=1})}];return(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[(0,ng.jsxs)("div",{style:{display:"flex",width:"100%",flexWrap:"wrap",gap:20},children:[(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>{if(t.rows.length<10){const e=t.rows.length-1,n=t.rows[e].registerAddress,r=t.rows[e].numberOfRegisters,a={...o,registerAddress:n+r};s("rows",[...t.rows,a])}},disabled:r,icon:(0,ng.jsx)(Hg,{})}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c("readEvery"),(0,ng.jsx)(HO,{style:{width:110},value:t.readEvery,onChange:e=>s("readEvery",e),options:u,disabled:r})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c("for"),(0,ng.jsx)(HO,{style:{width:140},value:t.timer,onChange:e=>s("timer",e),options:[{value:1,label:"1 min"},{value:5,label:"5 min"},{value:10,label:"10 min"},{value:15,label:"15 min"},{value:1e3,label:c("forever")}],disabled:r})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c("slaveAddress"),(0,ng.jsx)(xN,{min:1,max:255,value:i.read,onChange:e=>null!=e&&l((t=>({...t,read:e}))),disabled:r})]})]}),(0,ng.jsx)(k_,{className:"tabellaDiagnosticaModbus",columns:f,dataSource:t.rows,pagination:!1})]})},z4=e=>{let{dataPreset:n,setDataPreset:r,connect:o,optionsDecoderType:a,doWrite:i,initPreset:l,labelCodeFunction:c,addressDevice:s,setAddressDevice:d}=e;const{translate:u}=og(),[f,p]=(0,t.useState)(!1),h=(e,t)=>{r((n=>({...n,[e]:t})))},m=(e,t,r)=>{const o=[...n.rows];o[e][t]=r,h("rows",[...o])},g=[{key:"index",title:u("index"),align:"center",render:(e,t,n)=>n+1},{key:"registerAddress",title:u("registerAddress"),dataIndex:"registerAddress",align:"center",onCell:()=>({style:{minWidth:145}}),render:(e,t,n)=>(0,ng.jsx)(xN,{min:0,max:65535,value:e,onChange:e=>null!=e&&m(n,"registerAddress",e)})},{key:"functionCode",title:u("functionCode"),dataIndex:"functionCode",align:"center",onCell:()=>({style:{minWidth:145}}),render:(e,t,n)=>(0,ng.jsx)(HO,{style:{width:270},value:e,options:[{value:5,label:c(u("writeSingleCoil"),5)},{value:6,label:c(u("writeSingleHoldingRegisters"),6)},{value:15,label:c(u("writeMultipleCoils"),15)},{value:16,label:c(u("writeMultipleHoldingRegisters"),16)}],onChange:e=>{m(n,"functionCode",e),m(n,"data","")}})},{key:"data",title:u("data"),dataIndex:"data",align:"center",render(e,t,n){const r=5===t.functionCode||15===t.functionCode,o=5===t.functionCode||6===t.functionCode,a=t.decoderType>=10&&t.decoderType<=12,i=t.decoderType%2===0&&t.decoderType>=0&&t.decoderType<=9,l=t.decoderType%2!==0&&t.decoderType>=0&&t.decoderType<=9,c=13===t.decoderType;return(0,ng.jsx)(Hd,{title:o?"":u("useSemicolonAsSeparator"),children:(0,ng.jsx)(Aj,{style:{minWidth:100},value:e,onChange:e=>{const t=e.target.value,s=/^$|^[01](;[01])*(;)?$/,d=/^\s*-?\d*\s*$/,u=/^\s*\d*\s*$/,f=/^\s*([+-]?\d*([.,]\d*)?|[.,]|\s*)\s*$/,h=/^[\s\S]*$/,g=/^\s*-?\d*\s*(;\s*-?\d*\s*)*$/,v=/^\s*\d*\s*(;\s*\d*\s*)*$/,b=/^\s*([+-]?\d*([.,]\d*)?|[.,]|\s*)(;\s*([+-]?\d*([.,]\d*)?|[.,]|\s*))*$/;o?r?/^[01]?$/.test(t)&&m(n,"data",t):(a&&f.test(t)&&m(n,"data",t),i&&d.test(t)&&m(n,"data",t),l&&u.test(t)&&m(n,"data",t),c&&h.test(t)&&t.length<3&&m(n,"data",t)):(r?s.test(t)&&m(n,"data",t):(a&&b.test(t)&&m(n,"data",t),i&&g.test(t)&&m(n,"data",t),l&&v.test(t)&&m(n,"data",t)),c&&h.test(t)&&t.split(";").every((e=>e.length<3))&&m(n,"data",t)),p(!1)},status:f?"error":""})})}},{key:"decoderType",dataIndex:"decoderType",title:u("decoderType"),align:"center",render:(e,t,n)=>(0,ng.jsx)(HO,{style:{minWidth:250},value:e,options:a,onSelect:e=>{m(n,"decoderType",e)},disabled:16!==t.functionCode&&6!==t.functionCode})},{key:"action",title:u("action"),align:"center",render:(e,t)=>(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(ac,{onClick:async()=>async function(e){if(e.data.trim().length){var t,n;const r={flag:!1,value:0},o=null!==(t=null===(n=a.find((t=>t.value===e.decoderType)))||void 0===n?void 0:n.max)&&void 0!==t?t:a[0].max;8===e.decoderType||9===e.decoderType?e.data.split(";").forEach((e=>{(function(e,t){if(e.length!==t.length)return e.length>t.length;return e>t})(e,o)&&(r.value=e,r.flag=!0)})):e.data.split(";").forEach((e=>{e>o&&(r.flag=!0,r.value=e)})),p(r.flag),!r.flag&&await i(e)}}(t),disabled:!o,children:u("preset")}),(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},icon:(0,ng.jsx)(kz,{}),onClick:()=>n.rows.length>1&&h("rows",n.rows.filter((e=>e!==t))),disabled:n.rows.length<=1})]})}];return(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[(0,ng.jsxs)("div",{style:{display:"flex",width:"100%",gap:20,flexWrap:"wrap"},children:[(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>n.rows.length<10&&h("rows",[...n.rows,l.rows[0]]),icon:(0,ng.jsx)(Hg,{})}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[u("slaveAddress"),(0,ng.jsx)(xN,{min:1,max:255,value:s.write,onChange:e=>null!=e&&d((t=>({...t,write:e})))})]})]}),(0,ng.jsx)(k_,{className:"tabellaDiagnosticaModbus",columns:g,dataSource:n.rows,pagination:!1})]})},B4=e=>{let{resultWrite:n,resultRead:r}=e;const{translate:o}=og(),[a,i]=(0,t.useState)(!1),[l,c]=(0,t.useState)([]),s=()=>{const e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),i=String(e.getSeconds()).padStart(2,"0");return"".concat(t,":").concat(n,":").concat(r,"-").concat(o,":").concat(a,":").concat(i)};return(0,t.useEffect)((()=>{if(r){const e=s(),t=null===r||void 0===r?void 0:r.packetReceived.map((e=>cS(e))).toString().replaceAll(","," ; "),n=(null===r||void 0===r?void 0:r.packetSent).map((e=>cS(e))).toString().replaceAll(","," ; "),a="".concat(o("read"),": ").concat(e," - \u2191(").concat(n,") - ");if("ok"===(null===r||void 0===r?void 0:r.result)){const e="\u2193(".concat(t,")");c((t=>[...t,{value:a+e,status:"ok"}]))}if("ok"!==(null===r||void 0===r?void 0:r.result)){const e=null===r||void 0===r?void 0:r.result;c((t=>[...t,{value:a+e,status:r.result}]))}}}),[r]),(0,t.useEffect)((()=>{if(n){const e=s(),t=null===n||void 0===n?void 0:n.packetReceived.map((e=>cS(e))).toString().replaceAll(","," ; "),r=null===n||void 0===n?void 0:n.packetSent.map((e=>cS(e))).toString().replaceAll(","," ; "),a="".concat(o("write"),": ").concat(e," - \u2191(").concat(r,") - ");if("ok"===(null===n||void 0===n?void 0:n.result)){const e="\u2193(".concat(t,")");c((t=>[...t,{value:a+e,status:"ok"}]))}if("ok"!==(null===n||void 0===n?void 0:n.result)){const e=null===n||void 0===n?void 0:n.result;c((t=>[...t,{value:a+e,status:n.result}]))}}}),[n]),(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10,justifyContent:"left"},children:[(0,ng.jsxs)("div",{style:{display:"flex",gap:20},children:[(0,ng.jsx)(ac,{onClick:()=>i((e=>!e)),icon:!a&&(0,ng.jsx)(MO,{})||(0,ng.jsx)(UO,{}),children:!a&&o("showLog")||o("hideLog")}),(0,ng.jsx)(ac,{onClick:()=>c([]),children:o("clear")})]}),a&&(0,ng.jsx)("div",{style:{fontFamily:"monospace",fontSize:13,resize:"none",overflow:"auto",border:"1px solid lightgray",borderRadius:5,padding:10,height:300,letterSpacing:1},children:l.length?l.filter((e=>!!e)).map(((e,t)=>"ok"!==e.status?(0,ng.jsxs)("div",{children:[(0,ng.jsxs)("span",{children:[t+1,": "]}),(0,ng.jsx)("span",{style:{color:"red"},children:e.value})]},t):(0,ng.jsxs)("div",{children:[t+1,": ",e.value]},t))).reverse():(0,ng.jsx)("div",{style:{color:"gray"},children:"Log"})})]})},F4=e=>{let{port:t,porteDisponibili:n,setPort:r,openModal:o,setOpenModal:a,connect:i}=e;const{translate:l}=og(),c=(e,n)=>{const o={...t};o[e]=n,r({...o})};return(0,ng.jsx)(UC,{title:l("portConfig"),open:o,onCancel:()=>a(!1),footer:null,width:300,style:{top:150},children:(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:20},children:[l("port"),(0,ng.jsx)(HO,{style:{width:120},value:t.port,options:n.map((e=>({value:e,label:ZC(e)}))),onChange:e=>c("port",e),disabled:i})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l("baudRate"),(0,ng.jsx)(HO,{style:{width:120},value:t.baudrate,options:[{value:1200,label:"1200"},{value:2400,label:"2400"},{value:4800,label:"4800"},{value:9600,label:"9600"},{value:19200,label:"19200"},{value:38400,label:"38400"}],onChange:e=>c("baudrate",e),disabled:i})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l("numBits"),(0,ng.jsx)(HO,{style:{width:120},value:t.bits,options:[{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"}],onChange:e=>c("bits",e),disabled:i})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l("parity"),(0,ng.jsx)(HO,{style:{width:120},value:t.parity,options:[{label:l("none"),value:"none"},{label:l("even"),value:"even"},{label:l("odd"),value:"odd"}],onChange:e=>c("parity",e),disabled:i})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l("stopBit"),(0,ng.jsx)(HO,{style:{width:120},value:t.stopBits,options:[{value:"1",label:"1"},{value:"1.5",label:"1.5"},{value:"2",label:"2"}],onChange:e=>c("stopBits",e),disabled:i})]}),(0,ng.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,ng.jsxs)("span",{children:[l("timeout")," ",(0,ng.jsx)("small",{style:{textTransform:"lowercase"},children:"(ms)"})]}),(0,ng.jsx)(xN,{value:t.timeout,min:500,max:5e3,step:500,onChange:e=>e&&c("timeout",e),style:{width:120},disabled:i})]})]})})},H4=e=>{let{port:t,connect:n}=e;const{translate:r}=og();return(0,ng.jsx)("div",{style:{display:"flex",flexDirection:"row",width:"fit-content",color:"gray",height:32,padding:"0 10px",alignItems:"center"},children:n?(0,ng.jsxs)("span",{children:[(0,ng.jsx)("b",{children:r("connected")})," ",r("to"),": ",(0,ng.jsx)("b",{children:ZC(t.port)})," (",t.baudrate,", ",t.bits,", ",r(t.parity),","," ",t.stopBits,")"]}):(0,ng.jsx)("b",{children:r("disconnected")})})},W4=(0,t.memo)(H4),V4=e=>{let{showDialog:t,doDiconnect:n}=e;const[r,o,a]=kI(t),{translate:i}=og();return(0,ng.jsx)(UC,{title:"".concat(i("attenzione"),"!"),open:r,onOk:async()=>{try{await n(),o()}catch(e){ak.error(i(e.message))}},onCancel:a,cancelText:i("cancel"),okText:i("ok"),children:(0,ng.jsx)("p",{children:i("alertDisconnection")})})};const U4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512.5 390.6c-29.9 0-57.9 11.6-79.1 32.8-21.1 21.2-32.8 49.2-32.8 79.1 0 29.9 11.7 57.9 32.8 79.1 21.2 21.1 49.2 32.8 79.1 32.8 29.9 0 57.9-11.7 79.1-32.8 21.1-21.2 32.8-49.2 32.8-79.1 0-29.9-11.7-57.9-32.8-79.1a110.96 110.96 0 00-79.1-32.8zm412.3 235.5l-65.4-55.9c3.1-19 4.7-38.4 4.7-57.7s-1.6-38.8-4.7-57.7l65.4-55.9a32.03 32.03 0 009.3-35.2l-.9-2.6a442.5 442.5 0 00-79.6-137.7l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.2 28.9c-30-24.6-63.4-44-99.6-57.5l-15.7-84.9a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52-9.4-106.8-9.4-158.8 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.3a353.44 353.44 0 00-98.9 57.3l-81.8-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a445.93 445.93 0 00-79.6 137.7l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.2 56.5c-3.1 18.8-4.6 38-4.6 57 0 19.2 1.5 38.4 4.6 57l-66 56.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.3 44.8 96.8 79.6 137.7l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.8-29.1c29.8 24.5 63 43.9 98.9 57.3l15.8 85.3a32.05 32.05 0 0025.8 25.7l2.7.5a448.27 448.27 0 00158.8 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-84.9c36.2-13.6 69.6-32.9 99.6-57.5l81.2 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.5-87.4 79.6-137.7l.9-2.6c4.3-12.4.6-26.3-9.5-35zm-412.3 52.2c-97.1 0-175.8-78.7-175.8-175.8s78.7-175.8 175.8-175.8 175.8 78.7 175.8 175.8-78.7 175.8-175.8 175.8z"}}]},name:"setting",theme:"filled"};var K4=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:U4}))};const G4=t.forwardRef(K4);const q4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832.6 191.4c-84.6-84.6-221.5-84.6-306 0l-96.9 96.9 51 51 96.9-96.9c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204l-96.9 96.9 51.1 51.1 96.9-96.9c84.4-84.6 84.4-221.5-.1-306.1zM446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l96.9-96.9-51.1-51.1-96.9 96.9c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l96.9-96.9-51-51-96.8 97zM260.3 209.4a8.03 8.03 0 00-11.3 0L209.4 249a8.03 8.03 0 000 11.3l554.4 554.4c3.1 3.1 8.2 3.1 11.3 0l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3L260.3 209.4z"}}]},name:"disconnect",theme:"outlined"};var X4=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:q4}))};const Y4=t.forwardRef(X4);const $4={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"filled"};var J4=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:$4}))};const Q4=t.forwardRef(J4);const Z4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M396 512a112 112 0 10224 0 112 112 0 10-224 0zm546.2-25.8C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM508 688c-97.2 0-176-78.8-176-176s78.8-176 176-176 176 78.8 176 176-78.8 176-176 176z"}}]},name:"eye",theme:"filled"};var e3=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:Z4}))};const t3=t.forwardRef(e3);const n3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M508 624a112 112 0 00112-112c0-3.28-.15-6.53-.43-9.74L498.26 623.57c3.21.28 6.45.43 9.74.43zm370.72-458.44L836 122.88a8 8 0 00-11.31 0L715.37 232.23Q624.91 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.7 119.43 136.55 191.45L112.56 835a8 8 0 000 11.31L155.25 889a8 8 0 0011.31 0l712.16-712.12a8 8 0 000-11.32zM332 512a176 176 0 01258.88-155.28l-48.62 48.62a112.08 112.08 0 00-140.92 140.92l-48.62 48.62A175.09 175.09 0 01332 512z"}},{tag:"path",attrs:{d:"M942.2 486.2Q889.4 375 816.51 304.85L672.37 449A176.08 176.08 0 01445 676.37L322.74 798.63Q407.82 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5z"}}]},name:"eye-invisible",theme:"filled"};var r3=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:n3}))};const o3=t.forwardRef(r3),a3=()=>{const{translate:e}=og(),[n,r]=(0,t.useState)(!1),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(!0),c={enable:!0,registerAddress:0,numberOfRegisters:1,functionCode:1},s={rows:[{registerAddress:0,data:"",functionCode:5,decoderType:0}]},d={rows:[c],readEvery:1e3,timer:5},[u,f]=(0,t.useState)(s),[p,h]=(0,t.useState)(d),[m,g]=(0,t.useState)({port:"",baudrate:9600,parity:"none",bits:8,stopBits:1,timeout:1e3}),[v,b]=(0,t.useState)(!1),[y,x]=(0,t.useState)({read:1,write:1}),[w,C]=(0,t.useState)(),[S,E]=(0,t.useState)(),[k,j]=(0,t.useState)(!1),I=(0,t.useRef)(),[T,A]=mE(((e,t,n)=>cE(e,t,n)),[]),[O,N]=(0,t.useState)([]),[R,P]=(0,t.useState)([]),[M,D]=(0,t.useState)(),L=(0,t.useRef)([]);(0,t.useEffect)((()=>{A("/diagnostic/modbus/ports",GC(),!1)}),[]),(0,t.useEffect)((()=>{T.value&&N(T.value.ports)}),[T]);(0,t.useEffect)((()=>{let e=null;return v&&0!==p.readEvery&&1e3!==p.timer&&(e=((e,t,n)=>setTimeout((()=>{t(),n(!1)}),60*e*1e3))(p.timer,z,b)),()=>{e&&clearTimeout(e)}}),[v]);const _=[{label:"16 bit integer",value:0,max:32767},{label:"16 bit integer unsigned",value:1,max:65535},{label:"32 bit integer",value:2,max:2147483647},{label:"32 bit integer unsigned",value:3,max:4294967295},{label:"32 bit integer reverse word",value:4,max:2147483647},{label:"32 bit integer reverse word unsigned",value:5,max:4294967295},{label:"32 bit integer reverse byte",value:6,max:2147483647},{label:"32 bit integer reverse byte unsigned",value:7,max:4294967295},{label:"64 bit integer ",value:8,max:"9223372036854775807"},{label:"64 bit integer unsigned",value:9,max:"18446744073709551615"},{label:"IEEE754 (32 bit FP)",value:10,max:34028234663852886e22},{label:"IEEE754 (32 bit FP) reverse word",value:11,max:34028234663852886e22},{label:"IEEE754 (32 bit FP) reverse byte",value:12,max:34028234663852886e22},{label:"ASCII",value:13,max:127}];function z(){clearInterval(I.current)}async function B(){let t=[];for(const r of p.rows)if(r.enable)try{const e=F(r),n=await dE("/diagnostic/modbus/read",JSON.stringify(e),GC(),void 0,!1);C(n),E(void 0);const o=n.function;t=[...t,...n.dataWords.map(((e,t)=>{var r,a;const i=n.address+t,l=R.find((e=>e.address===i));return{address:i,value:e,decodedValue:e,decoderType:null!==(r=null===l||void 0===l?void 0:l.decoderType)&&void 0!==r?r:0,function:o,isVisibleDecoderType:null===(a=null===l||void 0===l?void 0:l.isVisibleDecoderType)||void 0===a||a,addressFather:n.address}}))]}catch(n){if(null!==n&&void 0!==n&&n.globalHandled)return;ak.error(e(n.message)||n.message)}!function(e,t){const n=[];e.forEach(((e,r)=>{var o;const a=null===(o=t[r])||void 0===o?void 0:o.value,i=e.value;n[r]=a!==i})),D([...n])}(t,L.current),L.current=t,P(t)}function F(e){return{slave:y.read,address:e.registerAddress,function:e.functionCode,numRegs:e.numberOfRegisters}}function H(e){return e<0?65536+e&65535:65535&e}function W(e,t,n){const r=[];for(let o=0;o<t;o++){const t=e>>16*o&65535;r.push(t)}if("REVERSE_NONE"===n)return r.reverse();if("REVERSE_WORD"===n)return r;if("REVERSE_BYTE"===n){return r.map((e=>(255&e)<<8|e>>8&255)).reverse()}return r}function V(e,t){const n=new ArrayBuffer(4),r=new DataView(n);r.setFloat32(0,e);return W(r.getInt32(0),2,t)}function U(e,t){return"".concat(e," (").concat(t,")")}async function K(){v&&(b(!1),z());try{const e={port:m.port};await dE("/diagnostic/modbus/port/disconnect",JSON.stringify(e),GC()),a(!1)}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e(t.message)||t.message)}}const G=!m.port||!m.baudrate||!m.parity||!m.bits||!m.stopBits||!m.timeout,q={display:"flex",justifyContent:"center",alignItems:"center"};return(0,ng.jsxs)("div",{className:"card-container",children:[(0,ng.jsx)(Qv,{bordered:!1,className:"title-card",style:{width:"100%"},children:(0,ng.jsx)("h3",{className:"page-title",children:e("modbusTerminal")})}),(0,ng.jsxs)(Qv,{bordered:!1,style:{width:"100%"},children:[(0,ng.jsxs)("div",{style:{display:"flex",gap:20},children:[(0,ng.jsxs)(cl,{size:"middle",children:[(0,ng.jsx)(Hd,{title:e("portConfig"),children:(0,ng.jsx)(ac,{style:q,icon:(0,ng.jsx)(G4,{}),onClick:()=>r(!0),disabled:o})}),(0,ng.jsx)(Hd,{title:e(o?"disconnect":"connect"),children:(0,ng.jsx)(ac,{style:q,onClick:async()=>{o?await K():await async function(){try{await dE("/diagnostic/modbus/port/connect",JSON.stringify(m),GC()),a(!0),setTimeout((()=>r(!1)),350)}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(e("connectError"))}}()},disabled:G,icon:o?(0,ng.jsx)(Y4,{style:{color:"red"}}):(0,ng.jsx)(_G,{style:{color:G?"grey":"green"}})})}),(0,ng.jsx)(Hd,{title:e("startRead"),children:(0,ng.jsx)(ac,{style:q,onClick:()=>{b(!0),B(),0!==p.readEvery?I.current=setInterval((()=>{B()}),p.readEvery):setTimeout((()=>b((e=>!e))),200),l(!1)},disabled:!o||v,icon:(0,ng.jsx)(Q4,{})})}),(0,ng.jsx)(Hd,{title:e("stopRead"),children:(0,ng.jsx)(ac,{onClick:()=>{b(!1),z()},disabled:!v,style:q,icon:(0,ng.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",viewBox:"0 0 1024 1024",children:(0,ng.jsx)("path",{d:"M864 64H160C107 64 64 107 64 160v704c0 53 43 96 96 96h704c53 0 96-43 96-96V160c0-53-43-96-96-96z"})})})}),i?(0,ng.jsx)(Hd,{title:e("hideConfiguration"),children:(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>l((e=>!e)),icon:(0,ng.jsx)(o3,{})})}):(0,ng.jsx)(Hd,{title:e("showConfiguration"),children:(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>l(!0),icon:(0,ng.jsx)(t3,{})})})]}),(0,ng.jsx)(W4,{port:m,connect:o})]}),i&&(0,ng.jsx)(Mv,{defaultActiveKey:v?"2":"1",items:[{key:"1",label:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"var(--ant-card-header-font-size)"},children:e("read")}),children:(0,ng.jsx)(_4,{dataRead:p,setDataRead:h,esegui:v,initRow:c,labelCodeFunction:U,addressDevice:y,setAddressDevice:x})},{key:"2",label:(0,ng.jsx)("span",{style:{fontWeight:"bold",fontSize:"var(--ant-card-header-font-size)"},children:e("write")}),children:(0,ng.jsx)(z4,{dataPreset:u,setDataPreset:f,connect:o,optionsDecoderType:_,doWrite:async function(t){const n=t.data.trim();try{if(!n.length)throw new Error(e("errorWriteNull"));const r={registerAddress:t.registerAddress,functionCode:t.functionCode,decoderType:t.decoderType,data:n},o=await dE("/diagnostic/modbus/write",JSON.stringify(function(e){const t=15===e.functionCode||16===e.functionCode?e.data.split(";"):[e.data];return{slave:y.write,address:e.registerAddress,function:e.functionCode,dataWords:16===e.functionCode||6===e.functionCode?t.map((t=>function(e,t){const n="string"===typeof t?+t.replace(",","."):t;switch(e){case 0:return[H(n)];case 1:return[65535&n];case 2:case 3:return W(n,2,"REVERSE_NONE");case 4:case 5:return W(n,2,"REVERSE_WORD");case 6:case 7:return W(n,2,"REVERSE_BYTE");case 8:case 9:return W(n,4,"REVERSE_NONE");case 10:return V(n,"REVERSE_NONE");case 11:return V(n,"REVERSE_WORD");case 12:return V(n,"REVERSE_BYTE");case 13:if("string"!==typeof t)throw new Error("Per ASCII serve una stringa come input");return t.split("").map((e=>255&e.charCodeAt(0)));default:throw new Error("Tipo non supportato")}}(e.decoderType,t))).flatMap((e=>e)):t.map((e=>+e))}}(r)),GC());E(o)}catch(r){if(null!==r&&void 0!==r&&r.globalHandled)return;ak.error(e(r.message)||r.message)}},initPreset:s,labelCodeFunction:U,addressDevice:y,setAddressDevice:x})}],indicator:{align:"center"}})]}),(0,ng.jsx)(L4,{decoder:k,setDecoder:j,optionsDecoderType:_,resultReadTable:R,setResultReadTable:P,esegui:v,diffDataReceivedList:M,resultRead:w,resultWrite:S}),(0,ng.jsx)(F4,{port:m,setPort:g,porteDisponibili:O,openModal:n,setOpenModal:r,connect:o}),(0,ng.jsx)(V4,{showDialog:o,doDiconnect:K})]})},i3=(0,t.memo)(a3),l3=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,o="".concat(t,"-notice"),a=new Rr("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),i=new Rr("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),l=new Rr("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),c=new Rr("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[t]:{["&".concat(t,"-top, &").concat(t,"-bottom")]:{marginInline:0,[o]:{marginInline:"auto auto"}},["&".concat(t,"-top")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:i}},["&".concat(t,"-bottom")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:l}},["&".concat(t,"-topRight, &").concat(t,"-bottomRight")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:a}},["&".concat(t,"-topLeft, &").concat(t,"-bottomLeft")]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[o]:{marginInlineEnd:"auto",marginInlineStart:0},["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:c}}}}},c3=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],s3={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},d3=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t["&:nth-last-child(".concat(n+1,")")]={overflow:"hidden",["& > ".concat(e.componentCls,"-notice")]:{opacity:0,transition:"opacity ".concat(e.motionDurationMid)}};return Object.assign({["&:not(:nth-last-child(-n+".concat(e.notificationStackLayer,"))")]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},t)},u3=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t["&:nth-last-child(".concat(n+1,")")]={background:e.colorBgBlur,backdropFilter:"blur(10px)","-webkit-backdrop-filter":"blur(10px)"};return Object.assign({},t)},f3=e=>{const{componentCls:t}=e;return Object.assign({["".concat(t,"-stack")]:{["& > ".concat(t,"-notice-wrapper")]:Object.assign({transition:"all ".concat(e.motionDurationSlow,", backdrop-filter 0s"),position:"absolute"},d3(e))},["".concat(t,"-stack:not(").concat(t,"-stack-expanded)")]:{["& > ".concat(t,"-notice-wrapper")]:Object.assign({},u3(e))},["".concat(t,"-stack").concat(t,"-stack-expanded")]:{["& > ".concat(t,"-notice-wrapper")]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",["& > ".concat(e.componentCls,"-notice")]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:e.margin,width:"100%",insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},c3.map((t=>((e,t)=>{const{componentCls:n}=e;return{["".concat(n,"-").concat(t)]:{["&".concat(n,"-stack > ").concat(n,"-notice-wrapper")]:{[t.startsWith("top")?"top":"bottom"]:0,[s3[t]]:{value:0,_skip_check_:!0}}}}})(e,t))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))},p3=e=>{const{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:a,borderRadiusLG:i,colorSuccess:l,colorInfo:c,colorWarning:s,colorError:d,colorTextHeading:u,notificationBg:f,notificationPadding:p,notificationMarginEdge:h,fontSize:m,lineHeight:g,width:v,notificationIconSize:b,colorText:y}=e,x="".concat(n,"-notice");return{position:"relative",marginBottom:a,marginInlineStart:"auto",background:f,borderRadius:i,boxShadow:r,[x]:{padding:p,width:v,maxWidth:"calc(100vw - ".concat(rn(e.calc(h).mul(2).equal()),")"),overflow:"hidden",lineHeight:g,wordWrap:"break-word"},["".concat(n,"-close-icon")]:{fontSize:m,cursor:"pointer"},["".concat(x,"-message")]:{marginBottom:e.marginXS,color:u,fontSize:o,lineHeight:e.lineHeightLG},["".concat(x,"-description")]:{fontSize:m,color:y},["".concat(x,"-closable ").concat(x,"-message")]:{paddingInlineEnd:e.paddingLG},["".concat(x,"-with-icon ").concat(x,"-message")]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:o},["".concat(x,"-with-icon ").concat(x,"-description")]:{marginInlineStart:e.calc(e.marginSM).add(b).equal(),fontSize:m},["".concat(x,"-icon")]:{position:"absolute",fontSize:b,lineHeight:1,["&-success".concat(t)]:{color:l},["&-info".concat(t)]:{color:c},["&-warning".concat(t)]:{color:s},["&-error".concat(t)]:{color:d}},["".concat(x,"-close")]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:"background-color ".concat(e.motionDurationMid,", color ").concat(e.motionDurationMid),display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.closeBtnHoverBg}},["".concat(x,"-btn")]:{float:"right",marginTop:e.marginSM}}},h3=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:o,motionEaseInOut:a}=e,i="".concat(t,"-notice"),l=new Rr("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:Object.assign(Object.assign({},$r(e)),{position:"fixed",zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},["".concat(t,"-hook-holder")]:{position:"relative"},["".concat(t,"-fade-appear-prepare")]:{opacity:"0 !important"},["".concat(t,"-fade-enter, ").concat(t,"-fade-appear")]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:"both",opacity:0,animationPlayState:"paused"},["".concat(t,"-fade-leave")]:{animationTimingFunction:a,animationFillMode:"both",animationDuration:o,animationPlayState:"paused"},["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationPlayState:"running"},["".concat(t,"-fade-leave").concat(t,"-fade-leave-active")]:{animationName:l,animationPlayState:"running"},"&-rtl":{direction:"rtl",["".concat(i,"-btn")]:{float:"left"}}})},{[t]:{["".concat(i,"-wrapper")]:Object.assign({},p3(e))}}]},m3=e=>({zIndexPopup:e.zIndexPopupBase+Vs+50,width:384,closeBtnHoverBg:e.wireframe?"transparent":e.colorFillContent}),g3=e=>{const t=e.paddingMD,n=e.paddingLG;return Ho(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:"".concat(rn(e.paddingMD)," ").concat(rn(e.paddingContentHorizontalLG)),notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3})},v3=$o("Notification",(e=>{const t=g3(e);return[h3(t),l3(t),f3(t)]}),m3),b3=Yo(["Notification","PurePanel"],(e=>{const t="".concat(e.componentCls,"-notice"),n=g3(e);return{["".concat(t,"-pure-panel")]:Object.assign(Object.assign({},p3(n)),{width:n.width,maxWidth:"calc(100vw - ".concat(rn(e.calc(n.notificationMarginEdge).mul(2).equal()),")"),margin:0})}}),m3);var y3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function x3(e,n){return null===n||!1===n?null:n||t.createElement("span",{className:"".concat(e,"-close-x")},t.createElement(zg,{className:"".concat(e,"-close-icon")}))}const w3={success:Gy,info:tx,error:Yy,warning:Qy},C3=e=>{const{prefixCls:n,icon:r,type:o,message:a,description:i,btn:l,role:c="alert"}=e;let s=null;return r?s=t.createElement("span",{className:"".concat(n,"-icon")},r):o&&(s=t.createElement(w3[o]||null,{className:v()("".concat(n,"-icon"),"".concat(n,"-icon-").concat(o))})),t.createElement("div",{className:v()({["".concat(n,"-with-icon")]:s}),role:c},s,t.createElement("div",{className:"".concat(n,"-message")},a),t.createElement("div",{className:"".concat(n,"-description")},i),l&&t.createElement("div",{className:"".concat(n,"-btn")},l))},S3=e=>{const{prefixCls:n,className:r,icon:o,type:a,message:i,description:l,btn:c,closable:s=!0,closeIcon:d,className:u}=e,f=y3(e,["prefixCls","className","icon","type","message","description","btn","closable","closeIcon","className"]),{getPrefixCls:p}=t.useContext(at),h=n||p("notification"),m="".concat(h,"-notice"),g=lh(h),[b,y,x]=v3(h,g);return b(t.createElement("div",{className:v()("".concat(m,"-pure-panel"),y,r,x,g)},t.createElement(b3,{prefixCls:h}),t.createElement(EE,Object.assign({},f,{prefixCls:h,eventKey:"pure",duration:null,closable:s,className:v()({notificationClassName:u}),closeIcon:x3(h,d),content:t.createElement(C3,{prefixCls:m,icon:o,type:a,message:i,description:l,btn:c})}))))};var E3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const k3="topRight",j3=e=>{let{children:n,prefixCls:r}=e;const o=lh(r),[a,i,l]=v3(r,o);return a(t.createElement(jE,{classNames:{list:v()(i,l,o)}},n))},I3=(e,n)=>{let{prefixCls:r,key:o}=n;return t.createElement(j3,{prefixCls:r,key:o},e)},T3=t.forwardRef(((e,n)=>{const{top:r,bottom:o,prefixCls:a,getContainer:i,maxCount:l,rtl:c,onAllRemoved:s,stack:d,duration:u}=e,{getPrefixCls:f,getPopupContainer:p,notification:h,direction:m}=(0,t.useContext)(at),[,g]=jo(),b=a||f("notification"),[y,x]=DE({prefixCls:b,style:e=>function(e,t,n){let r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n}}return r}(e,null!==r&&void 0!==r?r:24,null!==o&&void 0!==o?o:24),className:()=>v()({["".concat(b,"-rtl")]:null!==c&&void 0!==c?c:"rtl"===m}),motion:()=>function(e){return{motionName:"".concat(e,"-fade")}}(b),closable:!0,closeIcon:x3(b),duration:null!==u&&void 0!==u?u:4.5,getContainer:()=>(null===i||void 0===i?void 0:i())||(null===p||void 0===p?void 0:p())||document.body,maxCount:l,onAllRemoved:s,renderNotifications:I3,stack:!1!==d&&{threshold:"object"===typeof d?null===d||void 0===d?void 0:d.threshold:void 0,offset:8,gap:g.margin}});return t.useImperativeHandle(n,(()=>Object.assign(Object.assign({},y),{prefixCls:b,notification:h}))),x}));function A3(e){const n=t.useRef(null),r=(ud("Notification"),t.useMemo((()=>{const r=r=>{var o;if(!n.current)return;const{open:a,prefixCls:i,notification:l}=n.current,c="".concat(i,"-notice"),{message:s,description:d,icon:u,type:f,btn:p,className:h,style:m,role:g="alert",closeIcon:b}=r,y=E3(r,["message","description","icon","type","btn","className","style","role","closeIcon"]),x=x3(c,"undefined"!==typeof b?b:null===l||void 0===l?void 0:l.closeIcon);return a(Object.assign(Object.assign({placement:null!==(o=null===e||void 0===e?void 0:e.placement)&&void 0!==o?o:k3},y),{content:t.createElement(C3,{prefixCls:c,icon:u,type:f,message:s,description:d,btn:p,role:g}),className:v()(f&&"".concat(c,"-").concat(f),h,null===l||void 0===l?void 0:l.className),style:Object.assign(Object.assign({},null===l||void 0===l?void 0:l.style),m),closeIcon:x,closable:!!x}))},o={open:r,destroy:e=>{var t,r;void 0!==e?null===(t=n.current)||void 0===t||t.close(e):null===(r=n.current)||void 0===r||r.destroy()}};return["success","info","warning","error"].forEach((e=>{o[e]=t=>r(Object.assign(Object.assign({},t),{type:e}))})),o}),[]));return[r,t.createElement(T3,Object.assign({key:"notification-holder"},e,{ref:n}))]}let O3=null,N3=e=>e(),R3=[],P3={};function M3(){const{getContainer:e,rtl:t,maxCount:n,top:r,bottom:o}=P3,a=(null===e||void 0===e?void 0:e())||document.body;return{getContainer:()=>a,rtl:t,maxCount:n,top:r,bottom:o}}const D3=t.forwardRef(((e,n)=>{const{notificationConfig:r,sync:o}=e,{getPrefixCls:a}=(0,t.useContext)(at),i=P3.prefixCls||a("notification"),l=(0,t.useContext)(CE),[c,s]=A3(Object.assign(Object.assign(Object.assign({},r),{prefixCls:i}),l.notification));return t.useEffect(o,[]),t.useImperativeHandle(n,(()=>{const e=Object.assign({},c);return Object.keys(e).forEach((t=>{e[t]=function(){return o(),c[t].apply(c,arguments)}})),{instance:e,sync:o}})),s})),L3=t.forwardRef(((e,n)=>{const[r,o]=t.useState(M3),a=()=>{o(M3)};t.useEffect(a,[]);const i=Tu(),l=i.getRootPrefixCls(),c=i.getIconPrefixCls(),s=i.getTheme(),d=t.createElement(D3,{ref:n,sync:a,notificationConfig:r});return t.createElement(Nu,{prefixCls:l,iconPrefixCls:c,theme:s},i.holderRender?i.holderRender(d):d)}));function _3(){if(!O3){const e=document.createDocumentFragment(),n={fragment:e};return O3=n,void N3((()=>{Ni(t.createElement(L3,{ref:e=>{const{instance:t,sync:r}=e||{};Promise.resolve().then((()=>{!n.instance&&t&&(n.instance=t,n.sync=r,_3())}))}}),e)}))}O3.instance&&(R3.forEach((e=>{switch(e.type){case"open":N3((()=>{O3.instance.open(Object.assign(Object.assign({},P3),e.config))}));break;case"destroy":N3((()=>{null===O3||void 0===O3||O3.instance.destroy(e.key)}))}})),R3=[])}function z3(e){Tu();R3.push({type:"open",config:e}),_3()}const B3={open:z3,destroy:function(e){R3.push({type:"destroy",key:e}),_3()},config:function(e){P3=Object.assign(Object.assign({},P3),e),N3((()=>{var e;null===(e=null===O3||void 0===O3?void 0:O3.sync)||void 0===e||e.call(O3)}))},useNotification:function(e){return A3(e)},_InternalPanelDoNotUseOrYouWillBeFired:S3};["success","info","warning","error"].forEach((e=>{B3[e]=t=>z3(Object.assign(Object.assign({},t),{type:e}))}));const F3=B3;class H3 extends HTMLDivElement{constructor(e){super(),this.inputEl=void 0,this.id=void 0,this.onValueChange=()=>{},this.className="custom-input-box",this.id=e,this.inputEl=document.createElement("input"),this.inputEl.id=e+"_input",this.inputEl.type="number",this.inputEl.size=3,this.inputEl.value="0",this.inputEl.draggable=!1,this.inputEl.addEventListener("input",(()=>{const e=parseFloat(this.inputEl.value);this.onValueChange(isNaN(e)?0:e)}));const t=document.createElement("div");t.className="stepper";const n=document.createElement("button");n.className="plus",n.textContent="+",n.setAttribute("data-ignore-dblclick","true"),n.draggable=!1,n.addEventListener("pointerdown",(e=>e.stopPropagation())),n.addEventListener("click",(e=>{e.stopPropagation(),this.inputEl.stepUp();const t=parseFloat(this.inputEl.value);this.onValueChange(isNaN(t)?0:t)}));const r=document.createElement("button");r.className="minus",r.textContent="-",r.setAttribute("data-ignore-dblclick","true"),r.draggable=!1,r.addEventListener("pointerdown",(e=>e.stopPropagation())),r.addEventListener("click",(e=>{e.stopPropagation(),this.inputEl.stepDown();const t=parseFloat(this.inputEl.value);this.onValueChange(isNaN(t)?0:t)})),t.appendChild(n),t.appendChild(r),this.appendChild(this.inputEl),this.appendChild(t)}}customElements.define("custom-input-box",H3,{extends:"div"});class W3 extends HTMLDivElement{constructor(){super(),this.onAdd=void 0,this.className="add-input";const e=document.createElement("button");e.className="plus",e.style.fontSize="16px",e.style.fontWeight="bold",e.textContent="+",e.draggable=!1,e.addEventListener("pointerdown",(e=>e.stopPropagation())),e.addEventListener("click",(e=>{e.stopPropagation();try{const t=this.onclick;"function"===typeof t&&t.call(this,e)}catch(r5){}if("function"===typeof this.onAdd)try{this.onAdd()}catch(r5){console.error(r5)}this.dispatchEvent(new CustomEvent("addinput",{bubbles:!0}))}));const t=document.createElement("label");t.style.fontSize="12px",t.textContent=" Add input",t.addEventListener("pointerdown",(e=>e.stopPropagation())),this.appendChild(e),this.appendChild(t)}}customElements.define("add-input",W3,{extends:"div"});class V3 extends HTMLDivElement{constructor(){super(),this.className="rem-input";const e=document.createElement("button");e.className="plus rem",e.textContent="x",e.draggable=!1,e.addEventListener("pointerdown",(e=>e.stopPropagation())),e.addEventListener("click",(e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent("reminput",{bubbles:!0}));const t=this.onclick;"function"===typeof t&&t.call(this,e)})),this.appendChild(e)}}customElements.define("rem-input",V3,{extends:"div"});let U3=function(e){return e.START="START",e.VAR="VAR",e.EXT="EXT",e.VIRTUAL="VIRTUAL",e.CONST="CONST",e.MATH="MATH",e.CTRLFLOW="CTRLFLOW",e.STRING="STRING",e.GROUP="GROUP",e.LOGIC="LOGIC",e.PROTOCOL="PROTOCOL",e.NOTES="NOTES",e.CUSTOMFUNCT="CUSTOMFUNCT",e.EXPOSED="EXPOSED",e}({}),K3=function(e){return e.VAR_BLOCK="VAR_BLOCK",e.FUNCTION_BLOCK="FUNCTION_BLOCK",e.MISC_BLOCK="MISC_BLOCK",e.GROUP_BLOCK="GROUP_BLOCK",e}({});const G3=()=>_z();class q3{constructor(e,t,n,r,o){this.id=void 0,this.blockId=void 0,this.direction=void 0,this.maxConnections=void 0,this.isConnected=void 0,this.id=e,this.blockId=t,this.direction=n,this.maxConnections=r,this.isConnected=o}}class X3{constructor(e,t,n,r,o,a,i,l,c,s,d,u,f,p,h,m,g){this.id=void 0,this.name=void 0,this.devName=void 0,this.descr=void 0,this.type=void 0,this.category=void 0,this.xPosition=void 0,this.yPosition=void 0,this.numSocketsIn=void 0,this.numSocketsOut=void 0,this.direction=void 0,this.uom=void 0,this.isTypified=!1,this.element=void 0,this.socketsIn=[],this.socketsOut=[],this.note=void 0,this.background=void 0,this.refId=void 0,this.maxNumInputs=void 0,this.constValue=void 0,this.noteIconEl=null,this.noteTooltipEl=null,this._noteEditing=!1,this._noteSaveTimer=null,this.NOTE_SAVE_DEBOUNCE=600,this.asNote=!1,this.onNoteChange=void 0,this.paramIcon=void 0,this.tags=void 0,this.name=e,this.devName=t,this.descr=n,this.type=r,this.category=o,this.xPosition=a,this.yPosition=i,this.numSocketsIn=l,this.numSocketsOut=c,this.direction=s,this.uom=d,this.refId=m,this.maxNumInputs=g,this.id=null!==f&&void 0!==f?f:"block_".concat(G3()),this.element=document.createElement("div"),this.element.id=this.id,this.tags=u}buildElement(e,t){this.element.classList.add("costerlogic-block",...this.getCssClasses());const n=this.element.offsetWidth,r=this.element.offsetHeight;this.element.style.top="".concat(this.yPosition-r/2,"px"),this.element.style.left="".concat(this.xPosition-n/2,"px");const o=this.createHeader();this.element.appendChild(o);const a=this.createAction();this.element.appendChild(a);const i=document.createElement("div");i.classList.add("inputs");for(let c=0;c<this.numSocketsIn;c++){const t=null===e||void 0===e?void 0:e[c],n=this.createSocket("input",t),r=this.createSocketContainer("input",n);i.appendChild(r)}const l=this.createSocketContainer("outputs");for(let c=0;c<this.numSocketsOut;c++){const e=null===t||void 0===t?void 0:t[c],n=this.createSocket("output",e);l.appendChild(n)}a.appendChild(i),a.appendChild(l)}createAction(){const e=document.createElement("div");return e.classList.add("costerlogic_action"),e}createHeader(){const e=document.createElement("div");e.classList.add("title");const t=document.createElement("span");t.classList.add("title-varDesc","text-center");const n=document.createElement("span");n.classList.add("title-devName");const r=document.createElement("span");return r.classList.add("title-varName"),t.innerHTML=this.descr,n.innerHTML=this.devName.toUpperCase(),r.innerHTML=this.name.toUpperCase(),e.appendChild(t),e.appendChild(n),e.appendChild(r),e}createSocketContainer(e,t){const n=document.createElement("div");if("input"===e?(n.classList.add("input_container"),n.appendChild(t)):n.classList.add(e),"CONST"===this.category)if("outputs"===e){n.classList.add("output_container");const e=document.createElement("span");e.classList.add("const-value"),e.innerText="0",n.appendChild(e)}else n.classList.add(e);return n}createSocket(e,t){const n=null!==t&&void 0!==t?t:"socket_".concat(G3()),r=new q3(n,this.id,e,1,!1);"input"===e?this.socketsIn.push(r):this.socketsOut.push(r);const o=document.createElement("div");return o.classList.add(e,"socket"),o.setAttribute("id",n),o}applyFixedInputLabels(){if(!this.element)return;const e="sub"===this.name||"div"===this.name,t=Array.from(this.element.querySelectorAll(".input"));e&&2===t.length?(t[0].dataset.label="A",t[1].dataset.label="B"):t.forEach((e=>{delete e.dataset.label}))}setNoteText(e){var t;const n=e&&e.trim().length?e.trim():"";var r;if(this.note=n,this.asNote=!!n,!this.note)return this.removeNoteIcon(),void(null===(r=this.onNoteChange)||void 0===r||r.call(this,void 0,void 0));if(this.noteIconEl&&this.noteTooltipEl&&!this._noteEditing){var o;const e=this.noteTooltipEl.querySelector(".note-read");if(e)e.textContent=null!==(o=this.note)&&void 0!==o?o:"";else{var a;this.noteTooltipEl.innerHTML="";const e=document.createElement("div");e.className="note-read",e.textContent=null!==(a=this.note)&&void 0!==a?a:"",this.noteTooltipEl.appendChild(e)}}else{if(this.noteIconEl){var i,l;const e=null===(i=this.noteTooltipEl)||void 0===i?void 0:i.querySelector(".note-read");if(e)e.textContent=null!==(l=this.note)&&void 0!==l?l:"";else if(this.noteTooltipEl){var c;this.noteTooltipEl.innerHTML="";const e=document.createElement("div");e.className="note-read",e.textContent=null!==(c=this.note)&&void 0!==c?c:"",this.noteTooltipEl.appendChild(e)}}else{var s,d;const e=document.createElement("div");e.classList.add("note-icon"),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-label","Mostra nota"),e.innerHTML='\n                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false">\n                    <path d="M4 4.5h16a1.5 1.5 0 0 1 1.5 1.5v8a1.5 1.5 0 0 1-1.5 1.5H8l-4 4V6a1.5 1.5 0 0 1 1.5-1.5z"\n                        fill="none" stroke="currentColor" stroke-width="1.25" stroke-linejoin="round" />\n                    <path d="M7 8.5h10" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>\n                    <path d="M7 11h7"   fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>\n                    <path d="M7 13.5h5" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>\n                </svg>\n            ';const t=e.querySelector("svg");t&&(t.style.pointerEvents="none");const n=document.createElement("div");n.classList.add("note-tooltip"),n.setAttribute("role","dialog");const r=document.createElement("div");r.className="note-read",r.textContent=null!==(s=this.note)&&void 0!==s?s:"",n.appendChild(r);(null!==(d=this.element.querySelector(".title"))&&void 0!==d?d:this.element).appendChild(e),this.element.appendChild(n);const o=e=>{e.stopPropagation(),(e instanceof PointerEvent||e instanceof MouseEvent)&&e.preventDefault()};e.addEventListener("mouseenter",(()=>{var t;if(this._noteEditing)return;let r=n.querySelector(".note-read");r||(r=document.createElement("div"),r.className="note-read",n.innerHTML="",n.appendChild(r)),r.textContent=null!==(t=this.note)&&void 0!==t?t:"",n.classList.add("visible"),n.style.right="0px";const o=n.offsetHeight||n.getBoundingClientRect().height||0,a=e.offsetTop||0;n.style.top="".concat(a-o-10,"px")})),e.addEventListener("mouseleave",(e=>{if(this._noteEditing)return;const t=e.relatedTarget;t&&n.contains(t)||n.classList.remove("visible")})),n.addEventListener("mouseenter",(()=>{this._noteEditing||n.classList.add("visible")})),n.addEventListener("mouseleave",(t=>{if(this._noteEditing)return;const r=t.relatedTarget;r&&e.contains(r)||n.classList.remove("visible")})),e.addEventListener("pointerdown",(e=>{o(e)}),{passive:!1}),e.addEventListener("click",(t=>{o(t),this._noteEditing?(this._saveInlineNote(n),this._closeInlineEditor(n,e)):this._openInlineEditor(n,e)})),e.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||(o(t),this._noteEditing?(this._saveInlineNote(n),this._closeInlineEditor(n,e)):this._openInlineEditor(n,e))})),this.noteIconEl=e,this.noteTooltipEl=n,this.noteIconEl.style.display="inline-flex"}null===(t=this.onNoteChange)||void 0===t||t.call(this,void 0,this.note)}}getText(){const e=this.element.querySelector(".costerlogic_action_notes");return e?e.value:""}createParamIcon(){if(this.paramIcon)return;const e=document.createElement("span");e.classList.add("param-icon"),e.title="Non parametrizzato",e.setAttribute("aria-hidden","true"),e.innerHTML='\n            <svg viewBox="64 64 896 896" focusable="false" data-icon="warning" width="1em" height="1em" fill="currentColor">\n                <path d="M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z" ></path>\n                <path d="M172.2 828.1h679.6L512 239.9 172.2 828.1zM560 720a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm-16-304v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8z" fill="#ffffe6ff"></path>\n                <path d="M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8z"></path>\n            </svg>\n        ',this.paramIcon=e,this.element.appendChild(e)}setParametrized(e){e?this.element.classList.add("parametrized"):this.element.classList.remove("parametrized")}updateRefId(e){e?(this.refId=String(e),this.setParametrized(!0)):(delete this.refId,this.setParametrized(!1))}_openInlineEditor(e,t){var n;this._noteEditing=!0,e.innerHTML="";const r=document.createElement("textarea");r.className="note-inline-ta",r.value=null!==(n=this.note)&&void 0!==n?n:"",r.maxLength=100,r.setAttribute("aria-label","Modifica nota"),r.spellcheck=!0,r.style.boxSizing="border-box",r.addEventListener("keydown",(n=>{n.stopPropagation(),"Escape"===n.key&&(n.preventDefault(),this._saveInlineNote(e),this._closeInlineEditor(e,t))})),r.addEventListener("input",(()=>{this._noteSaveTimer&&clearTimeout(this._noteSaveTimer),this._noteSaveTimer=setTimeout((()=>{this._saveInlineNote(e)}),this.NOTE_SAVE_DEBOUNCE)})),r.addEventListener("blur",(()=>{setTimeout((()=>{document.activeElement&&e.contains(document.activeElement)||(this._saveInlineNote(e),this._closeInlineEditor(e,t))}),50)})),e.appendChild(r),e.classList.add("visible"),r.focus(),r.selectionStart=r.value.length;const o=n=>{const r=n.target;r&&(e.contains(r)||t.contains(r)||(this._saveInlineNote(e),this._closeInlineEditor(e,t)))};e.__onDocPointer=o,setTimeout((()=>{document.addEventListener("pointerdown",o)}),0)}_closeInlineEditor(e,t){var n;if(!this._noteEditing)return;this._noteEditing=!1;const r=e.__onDocPointer;r&&(document.removeEventListener("pointerdown",r),delete e.__onDocPointer),e.innerHTML="";const o=document.createElement("div");o.className="note-read",o.textContent=null!==(n=this.note)&&void 0!==n?n:"",e.appendChild(o),e.classList.remove("visible"),this._noteSaveTimer&&(clearTimeout(this._noteSaveTimer),this._noteSaveTimer=null)}_saveInlineNote(e){var t;const n=e.querySelector("textarea"),r=n?n.value:null!==(t=this.note)&&void 0!==t?t:"",o=r.trim().length?r:void 0,a=this.note;if((null!==a&&void 0!==a?a:"")!==(null!==o&&void 0!==o?o:"")){this.note=o;try{var i;null===(i=this.onNoteChange)||void 0===i||i.call(this,a,o);const e=new CustomEvent("noteChanged",{detail:o,bubbles:!0,composed:!0});this.element.dispatchEvent(e)}catch(r5){}}this._noteSaveTimer&&(clearTimeout(this._noteSaveTimer),this._noteSaveTimer=null)}removeNoteIcon(){this.noteIconEl&&(this.noteIconEl.remove(),this.noteIconEl=null),this.noteTooltipEl&&(this.noteTooltipEl.remove(),this.noteTooltipEl=null)}setInvalidVar(){this.element.classList.add("invalidVar")}setupCustomBehavior(e,t){}}class Y3 extends X3{constructor(e,t,n,r,o,a,i,l,c,s,d,u,f,p,h,m){super(e,t,n,K3.FUNCTION_BLOCK,r,o,a,i,l,c,s,d,u,f,p,h,m),this.buildElement(f,p)}getCssClasses(){return"MATH"===this.category?"sqrt"===this.name?["math","sqrt"]:"div"===this.name?["math","div"]:"sub"===this.name?["math","sub"]:["math"]:[]}createAction(){const e=document.createElement("div");e.classList.add("costerlogic_action");const t=document.createElement("div"),n=document.createElement("span");return t.classList.add("function-title"),n.classList.add("function-title-span"),n.textContent=this.name,n.title=n.textContent,t.appendChild(n),e.appendChild(t),e}createHeader(){return document.createElement("span")}createSocketContainer(e,t){const n=document.createElement("div");if("input"===e){if(n.classList.add("input_container"),n.appendChild(t),"sqrt"!==this.name){const e=document.createElement("div");e.classList.add("remButtonPlaceHolder"),n.appendChild(e)}}else n.classList.add(e);return n}setupCustomBehavior(e,t){const n=e.querySelector(".inputs");if(!n)return;let r=n.querySelector(".add-input");r||"sqrt"===this.name||"div"===this.name||"sub"===this.name||(r=this.createCustomAddInput(),n.appendChild(r));const o=e=>{const t=e.target.closest(".add-input, .rem-input");if(t)if(e.stopPropagation(),t.classList.contains("add-input")||"add-input"===t.dataset.action){if(this.numSocketsIn>=this.maxNumInputs)return void console.warn("Numero massimo di input raggiunto");const e=this.addInputAction();if(e){n.insertBefore(e,r);const t=new CustomEvent("addInputSocket",{detail:{addButton:r},bubbles:!0,composed:!0});this.element.dispatchEvent(t)}}else if(t.classList.contains("rem-input")){const t=e.target.closest(".input_container");if(!t)return;const n=t.querySelector(".socket");this.remInput(t,n)}else;};n.__hasDelegatedClick||(n.addEventListener("click",o),n.__hasDelegatedClick=!0),this.refreshInputButtons()}addInputAction(e){if(this.numSocketsIn>=this.maxNumInputs)return null;const t=+this.numSocketsIn+1;this.numSocketsIn=t;const n="socket_".concat(G3()),r=document.createElement("div");r.setAttribute("id",n),r.classList.add("input","socket");const o=this.createSocketContainer("input",r);if(t>1){const t=new V3;t.onclick=()=>{this.remInput(o,r),e&&e()},o.appendChild(t)}return e&&e(),o}refreshInputButtons(){const e=this.element.querySelector(".inputs");if(!e)return;Array.from(e.querySelectorAll(".input_container")).forEach(((e,t)=>{if(t>=2){const t=e.querySelector(".socket"),n=new V3;n.onclick=()=>{this.remInput(e,t)},e.appendChild(n)}}))}remInput(e,t){try{const e=null===t||void 0===t?void 0:t.id;if(e){const t=new CustomEvent("requestRemoveConnectionsForSocket",{detail:{socketId:e},bubbles:!0,composed:!0});this.element.dispatchEvent(t)}}catch(n){console.warn("Errore dispatch remove-socket event",n)}e.remove(),this.numSocketsIn=Math.max(0,this.numSocketsIn-1)}createCustomAddInput(){const e=document.createElement("div");e.className="add-input";const t=document.createElement("span");t.className="plus",t.style.fontSize="16px",t.style.fontWeight="bold",t.textContent="+",t.draggable=!1,t.addEventListener("pointerdown",(e=>e.stopPropagation()));const n=document.createElement("label");return n.style.fontSize="12px",n.textContent=" Add input",n.style.cursor="pointer",n.addEventListener("pointerdown",(e=>e.stopPropagation())),e.appendChild(t),e.appendChild(n),e}}class $3 extends X3{constructor(e,t,n,r,o,a,i,l,c,s,d,u,f,p,h){super(e,t,n,K3.VAR_BLOCK,r,o,a,i,l,c,s,d,u,f,p),this.refId=void 0,h&&(this.refId=h),this.buildElement(f,p)}getCssClasses(){return"VAR"===this.category?["var"]:"EXT"===this.category?["ext"]:"CONST"===this.category?["const"]:"VIRTUAL"===this.category?["virtual"]:"EXPOSED"===this.category&&"r"===this.direction?["exposed","in"]:"EXPOSED"===this.category&&"w"===this.direction?["exposed","out"]:[]}createHeader(){const e=document.createElement("div");e.classList.add("title");const t=document.createElement("span");if("CONST"===this.category){e.classList.add("function-title-span");const t=document.createElement("span");t.innerHTML=this.name.toUpperCase(),e.appendChild(t)}else t.classList.add("title-varDesc"),t.textContent=this.descr&&""!==this.descr?this.descr:this.name.toUpperCase(),"VAR"===this.category?t.title="".concat(this.descr):t.title="".concat(this.devName,"\n").concat(this.name.toUpperCase()),e.appendChild(t),this.createParamIcon(),this.paramIcon&&e.appendChild(this.paramIcon);return e}setConstValue(e){this.constValue=e;const t=this.element.querySelector(".const-value");t&&(t.textContent=String(e))}}class J3 extends X3{constructor(e,t,n,r,o,a,i,l,c,s,d,u,f,p){super(e,t,n,K3.MISC_BLOCK,r,o,a,i,l,c,s,d,u,f,p),this.buildElement(f,p)}getCssClasses(){return"NOTES"===this.category?["notes"]:[]}createHeader(){return document.createElement("div")}createAction(){const e=document.createElement("textarea");e.classList.add("costerlogic_action_notes","textarea"),e.placeholder=this.name,e.maxLength=100,e.ondragstart=()=>!1,this.note&&(e.value=this.note);const t=e=>{e.style.height="".concat(0===e.scrollHeight?e.style.height:e.scrollHeight,"px")};return setTimeout((()=>t(e)),0),e.addEventListener("input",(n=>{this.note=n.target.value;const r=new CustomEvent("noteChanged",{detail:this.note,bubbles:!0,composed:!0});this.element.dispatchEvent(r),t(e)})),e.addEventListener("mousedown",(e=>e.stopPropagation())),e.addEventListener("dblclick",(e=>e.stopPropagation())),e}getText(){const e=this.element.querySelector(".costerlogic_action_notes");return e?e.value:""}setNoteText(e,t){this.note=e&&e.trim().length?e:"";const n=this.element.querySelector(".costerlogic_action_notes");var r;n&&(n.value=null!==(r=this.note)&&void 0!==r?r:"",n.style.height="".concat(t))}setNotesColor(e){this.background=e;const t=this.element.querySelector(".costerlogic_action_notes");this.element.style.background=e,t.style.color="blue"===e||"red"===e?"#fff":"#000"}}class Q3{constructor(){this.listeners=new Map}subscribe(e,t){const n=this.listeners.get(e)||[];this.listeners.set(e,[...n,t])}emit(e,t){(this.listeners.get(e)||[]).forEach((e=>e(t)))}unsubscribe(e,t){const n=this.listeners.get(e);if(!n)return;const r=n.indexOf(t);-1!==r&&n.splice(r,1)}}Q3.Events={BLOCK_CREATED:"block:created",BLOCK_MOVED:"block:moved",CONNECTION_CREATED:"connection:created",ERROR_OCCURRED:"error:occurred"};let Z3=function(e){return e.CREATE="CREATE",e.MOVE="MOVE",e.MOVE_GROUP="MOVE_GROUP",e.UPDATE="UPDATE",e.DELETE="DELETE",e.DELETE_BLOCK_CONNECTED="DELETE_BLOCK_CONNECTED",e.CONNECT="CONNECT",e.INSERTBLOCKINCONNECTION="INSERTBLOCKINCONNECTION",e.DELETE_CONNECTIONS_BY_SOCKET="DELETE_CONNECTIONS_BY_SOCKET",e.UNGROUP="UNGROUP",e.MERGENOTE="MERGENOTE",e.SET_CONST="SET_CONST",e}({});class e6{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;this.undoStack=[],this.redoStack=[],this.suspended=!1,this.maxHistory=void 0,this.maxHistory=Math.max(1,Math.floor(e))}suspend(){this.suspended=!0}resume(){this.suspended=!1}addOperation(e,t){if(!e)return;if(!1!==(null===t||void 0===t?void 0:t.record)&&!this.suspended){if(this.undoStack.push(e),this.undoStack.length>this.maxHistory){const e=this.undoStack.length-this.maxHistory;e>0&&this.undoStack.splice(0,e)}this.redoStack.length=0}}undo(){if(!this.canUndo())return null;const e=this.undoStack.pop();return this.redoStack.push(e),e}redo(){if(!this.canRedo())return null;const e=this.redoStack.pop();return this.undoStack.push(e),e}clear(){this.undoStack.length=0,this.redoStack.length=0}setMaxHistory(e){this.maxHistory=Math.max(1,Math.floor(e)),this.undoStack.length>this.maxHistory&&this.undoStack.splice(0,this.undoStack.length-this.maxHistory)}getUndoCount(){return this.undoStack.length}getRedoCount(){return this.redoStack.length}peekUndo(){return this.undoStack.length?this.undoStack[this.undoStack.length-1]:null}peekRedo(){return this.redoStack.length?this.redoStack[this.redoStack.length-1]:null}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}setLimit(e){this.maxHistory=Math.max(1,e)}sizeUndo(){return this.undoStack.length}sizeRedo(){return this.redoStack.length}}function t6(e,t){e.forEach((e=>{if(e.divider){const e=document.createElement("div");return e.className="context-menu-item-divider",void t.appendChild(e)}const n=document.createElement("div");if(n.className="context-menu-item",e.disabled&&n.classList.add("disabled"),e.label){const t=document.createElement("span");t.className="context-menu-item-text",t.textContent=e.label,n.appendChild(t)}if(e.iconSvg){const t=document.createElement("span");t.className="context-menu-item-icon",t.innerHTML=e.iconSvg,n.appendChild(t)}if(e.submenu){n.classList.add("has-submenu");const t=document.createElement("div");t.className="context-submenu",t6(e.submenu,t),n.appendChild(t)}e.action&&!e.disabled&&n.addEventListener("click",(()=>{e.action(),t.remove()})),t.appendChild(n)}))}class n6 extends X3{constructor(e,t,n,r,o,a,i,l,c,s,d,u,f,p){super(e,t,n,K3.GROUP_BLOCK,U3.GROUP,r,o,a,i,l,c,s,u,f,p),this.childrenData=void 0,this.buildElement(f,p),Array.isArray(d)?this.childrenData=d:this.childrenData=d.children}getCssClasses(){return["group-block"]}getChildrenData(){return this.childrenData}}class r6{static get clipboard(){return r6._clipboard}static set clipboard(e){r6._clipboard=e}constructor(e){this.blocks=new Map,this.eventManager=void 0,this.container=void 0,this.canvas=void 0,this.id=void 0,this.isDragging=void 0,this.isLinking=void 0,this.draggedEl=void 0,this.offsetX=void 0,this.offsetY=void 0,this.selectedBlockId=void 0,this.selectedConnectionId=void 0,this.contextMenu=void 0,this.initialPosition={x:0,y:0},this.startSocket=void 0,this.previewPath=void 0,this.connections=new Map,this.svgLayer=void 0,this.domListeners=[],this.selectionStart=null,this.selectionEnd=null,this.selectionRect=null,this.undoRedoManager=new e6(50),this.groupDragData=[],this.groupDragStart={x:0,y:0},this.isGroupDragging=!1,this.object_selected=new Set,this.hoveredConnectionId=null,this.currentDropTarget=null,this.zoom=void 0,this.zoom_max=void 0,this.zoom_min=void 0,this.zoom_value=void 0,this.zoom_last_value=void 0,this.scale=void 0,this.isLock=!1,this.CLICK_MOVE_THRESHOLD=6,this.pendingClick=null,this._availableDevices=[],this._availableFunctionBlocks=[],this.previewInvalidTarget=null,this.previousPreviewWasInvalid=!1,this._ctxShortcutsHandler=null,this._destroyed=!1,this.lastClickPosX=0,this.lastClickPosY=0,this.translate=void 0,this.hasYlc=!1,this.eventManager=new Q3,this.container=e,this.isDragging=!1,this.isLinking=!1,this.draggedEl=null,this.contextMenu=null,this.offsetX=0,this.offsetY=0,this.selectedBlockId=null,this.selectedConnectionId=null,this.startSocket=null,this.previewPath=null,this.object_selected=new Set,this.zoom=1,this.zoom_max=1.6,this.zoom_min=.5,this.zoom_value=.1,this.zoom_last_value=1,this.scale=1,this.id="diagram_".concat(G3()),this.canvas=document.createElement("div"),this.canvas.tabIndex=0,this.canvas.style.outline="none",this.canvas.id=this.id,this.canvas.classList.add("costerlogic"),this.container.appendChild(this.canvas);this.svgLayer=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svgLayer.setAttribute("class","connection-layer"),this.canvas.appendChild(this.svgLayer),this.initEventWiring(),this.initEventHandlers(),document.addEventListener("pointerup",(e=>this.handleGlobalDragEnd(e)))}setTranslate(e){this.translate=e}setHasYlc(e){this.hasYlc=e}initEventWiring(){[{dom:"pointerdown",bus:"pointerdown"},{dom:"pointermove",bus:"pointermove"},{dom:"pointerup",bus:"pointerup"},{dom:"dblclick",bus:"dblclick"},{dom:"wheel",bus:"wheel"},{dom:"contextmenu",bus:"contextmenu"},{dom:"keydown",bus:"keydown"}].forEach((e=>{let{dom:t,bus:n}=e;const r=e=>this.eventManager.emit(n,e);this.canvas.addEventListener(t,r),this.domListeners.push({type:t,handler:r})})),document.addEventListener("keydown",(e=>{const t=e.target;if(t){const e=t.tagName,n=t.isContentEditable;if("INPUT"===e||"TEXTAREA"===e||"SELECT"===e||n)return}"Delete"!==e.key&&"Backspace"!==e.key||(this.dispatchCustomEvent("closeDetails"),this.deleteSelected())}))}initEventHandlers(){this.eventManager.subscribe("pointerdown",this.handlePointerDown.bind(this)),this.eventManager.subscribe("pointermove",this.handlePointerMove.bind(this)),this.eventManager.subscribe("pointerup",this.handlePointerUp.bind(this)),this.eventManager.subscribe("contextmenu",this.handleContextMenu.bind(this)),this.eventManager.subscribe("keydown",this.handleKeyDown.bind(this)),this.container.addEventListener("addInputSocket",(e=>{this.dispatchCustomEvent("hasModified")})),this.container.addEventListener("noteChanged",(e=>{this.dispatchCustomEvent("hasModified")})),this.container.addEventListener("requestRemoveConnectionsForSocket",(e=>{try{const n=e.detail,r=n&&n.socketId?String(n.socketId):void 0;var t;if(r)this.removeConnectionsForSocket(r),null===(t=this.updateAllConnections)||void 0===t||t.call(this),this.dispatchCustomEvent("hasModified")}catch(r5){console.warn("requestRemoveConnectionsForSocket handler error",r5)}}))}setLock(e){this.isLock=Boolean(e);const t=this.canvas.querySelectorAll(".input_container"),n=this.canvas.querySelectorAll(".add-input"),r=this.canvas.querySelectorAll(".rem-input"),o=this.canvas.querySelectorAll(".costerlogic_action_notes"),a=this.canvas.querySelectorAll(".note-tooltip"),i=this.canvas.querySelectorAll(".note-icon");e?(t.forEach((e=>e.style.pointerEvents="none")),n.forEach((e=>e.style.pointerEvents="none")),r.forEach((e=>e.style.pointerEvents="none")),o.forEach((e=>e.style.pointerEvents="none")),a.forEach((e=>e.style.pointerEvents="none")),i.forEach((e=>e.style.pointerEvents="none"))):(t.forEach((e=>e.style.pointerEvents="unset")),n.forEach((e=>e.style.pointerEvents="unset")),r.forEach((e=>e.style.pointerEvents="unset")),o.forEach((e=>e.style.pointerEvents="unset")),a.forEach((e=>e.style.pointerEvents="auto")),i.forEach((e=>e.style.pointerEvents="auto")))}handlePointerDown(e){const t=e.target;if(!(t instanceof Element))return;if(this.isLock)return;if(0===e.button&&this.removeContextMenu(),t.closest(".note-icon")||t.closest(".note-tooltip"))return;const n=t.closest(".costerlogic-block"),r=Array.from(this.canvas.querySelectorAll(".costerlogic-block.selected")),o=t.closest(".connection");if(2===e.button)return this.pendingClick=null,n&&!n.classList.contains("selected")&&(this.canvas.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),this.object_selected.forEach((e=>e.classList.remove("selected"))),this.object_selected.clear(),n.classList.add("selected"),this.object_selected.add(n),this.selectedBlockId=n.id),o&&!o.classList.contains("selected")&&(this.canvas.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),this.object_selected.forEach((e=>e.classList.remove("selected"))),this.object_selected.clear(),o.classList.add("selected"),this.object_selected.add(o),this.selectedConnectionId=o.id),void this.dispatchCustomEvent("closeDetails");if(n&&n.classList.contains("invalidVar"))return;if(n&&n.classList.contains("selected")&&r.length>1){this.pendingClick=null,this.isGroupDragging=!0,this.groupDragStart={x:e.clientX,y:e.clientY},this.groupDragData=r.map((e=>({el:e,startX:e.offsetLeft,startY:e.offsetTop})));try{this.canvas.setPointerCapture(e.pointerId)}catch(r5){}return}const a=t.closest(".output");if(a)return this.pendingClick=null,e.preventDefault(),this.isLinking=!0,this.startSocket=a,this.previewPath=document.createElementNS(this.svgLayer.namespaceURI,"path"),this.previewPath.classList.add("connection","preview"),this.previewPath.style.pointerEvents="all",this.svgLayer.appendChild(this.previewPath),this.updatePreviewPath(e.clientX,e.clientY),void this.dispatchCustomEvent("closeDetails");if(o)return this.pendingClick=null,this.canvas.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),o.classList.add("selected"),this.selectedConnectionId=o.id,this.object_selected.forEach((e=>e.classList.remove("selected"))),this.object_selected.clear(),this.clearDropTarget(),this.dispatchCustomEvent("closeDetails"),void this.object_selected.add(o);if(n){const r=e.ctrlKey||e.metaKey;if(this.selectedConnectionId){const e=this.selectedConnectionId;this.svgLayer.querySelector("#".concat(e)).classList.remove("selected")}if(r){return n.classList.contains("selected")?(n.classList.remove("selected"),this.object_selected.delete(n),this.selectedBlockId===n.id&&(this.selectedBlockId=null)):(n.classList.add("selected"),this.object_selected.add(n),this.selectedBlockId=n.id),void(this.pendingClick=null)}this.canvas.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),this.selectedBlockId=null,this.selectedConnectionId=null,this.removeContextMenu(),this.object_selected.forEach((e=>e.classList.remove("selected"))),this.object_selected.clear(),this.clearDropTarget(),this.dispatchCustomEvent("closeDetails"),this.object_selected.add(n);const o=n.id,a=!!t.closest('textarea, input, [contenteditable="true"]')||!!n.querySelector(".costerlogic_action_notes")&&t.closest(".costerlogic_action_notes"),i=this.blocks.get(n.id),l=(null===i||void 0===i?void 0:i.category)===U3.NOTES||n.classList.contains("notes");l&&(this.initialPosition={x:n.offsetLeft,y:n.offsetTop}),n.classList.add("selected"),this.selectedBlockId=n.id;const c=n.getBoundingClientRect(),s=(this.container.getBoundingClientRect(),this.scale||1);this.offsetX=(e.clientX-c.left)/s,this.offsetY=(e.clientY-c.top)/s,this.initialPosition={x:n.offsetLeft,y:n.offsetTop};try{n.setPointerCapture(e.pointerId)}catch(r5){}return a?void(this.pendingClick=null):void(this.pendingClick={id:o,startX:e.clientX,startY:e.clientY,pointerId:e.pointerId,needsOpenDetails:!l})}if(t.closest(".costerlogic")){this.canvas.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),this.selectedBlockId=null,this.selectedConnectionId=null,this.removeContextMenu(),this.object_selected.forEach((e=>e.classList.remove("selected"))),this.object_selected.clear(),this.clearDropTarget(),this.dispatchCustomEvent("closeDetails"),this.pendingClick=null,this.isDragging=this.isLinking=!1;const t=this.canvas.getBoundingClientRect(),n=this.scale||1;this.selectionStart={x:(e.clientX-t.left)/n,y:(e.clientY-t.top)/n},this.selectionEnd=null,this.createSelectionRect()}}handlePointerUp(e){if(!this.isLock){if(this.lastClickPosX=e.clientX,this.lastClickPosY=e.clientY,this.pendingClick){const t=this.pendingClick;if(!t.pointerId||t.pointerId===e.pointerId){const n=Math.abs(e.clientX-t.startX),r=Math.abs(e.clientY-t.startY);n<=this.CLICK_MOVE_THRESHOLD&&r<=this.CLICK_MOVE_THRESHOLD&&t.needsOpenDetails&&this.dispatchCustomEvent("openDetails",{id:t.id})}this.pendingClick=null}if(this.isDragging&&this.draggedEl){this.isDragging=!1;const t=this.draggedEl,n={x:t.offsetLeft,y:t.offsetTop};this.dispatchCustomEvent("hasModified");const r=this.blocks.get(t.id);r&&(r.xPosition=n.x,r.yPosition=n.y),this.registerOperation({type:Z3.MOVE,data:{id:t.id,oldPosition:{...this.initialPosition},newPosition:n}});try{t.releasePointerCapture(e.pointerId)}catch(r5){}if(t.style.cursor="grab",!this.isGroupDragging&&!this.isLinking&&0===e.button){const t=this.draggedEl,n=this.blocks.get(t.id);if(n&&n.category===U3.NOTES&&this.currentDropTarget){const e=this.currentDropTarget;let r="";if("function"===typeof n.getText)r=n.getText()||"";else{const e=t.querySelector("textarea");r=e?e.value:""}if(!r)return;const o=this.blocks.get(e.id);if(o){const a=o.note,i=t.cloneNode(!0);return this.registerOperation({type:Z3.MERGENOTE,data:{noteId:n.id,noteText:r,targetId:o.id,previousNote:a,blockNote:i,block:n,oldPosition:{...this.initialPosition}}}),o.setNoteText(r),t.remove(),this.blocks.delete(n.id),e.classList.remove("drop-target"),this.currentDropTarget=null,this.draggedEl=null,void(this.isDragging=!1)}}const r=this.hoveredConnectionId;if(r){const t=this.connections.get(r);if(t&&t.pathEl){const n=t.pathEl,o=this.container.getBoundingClientRect();if(!this.isMouseNearPath(n,e.clientX,e.clientY,8,o))return void(this.hoveredConnectionId=null);this.selectedBlockId&&this.insertBlockInConnection(this.selectedBlockId,r)}}this.hoveredConnectionId=null}this.draggedEl=null}if(this.isGroupDragging){this.isGroupDragging=!1;try{this.canvas.releasePointerCapture(e.pointerId),this.dispatchCustomEvent("hasModified")}catch(r5){}}else if(this.isLinking){this.isLinking=!1;const a=this.previewPath;this.previewPath=null;const i=e.target.closest(".input");if(this.previewInvalidTarget){try{this.previewInvalidTarget.classList.remove("input-occupied-hover")}catch(r5){}this.previewInvalidTarget=null,document.body.style.cursor=""}if(a&&a.classList.contains("preview-invalid")&&a.classList.remove("preview-invalid"),i){var t,n,r;if(Array.from(this.connections.values()).some((e=>{var t;return(null===(t=e.endSocket)||void 0===t?void 0:t.id)===i.id}))){var o;try{i.classList.add("input-occupied")}catch(r5){}return a.remove(),this.startSocket=null,window.setTimeout((()=>{try{i.classList.remove("input-occupied")}catch(r5){}}),800),void(null===(o=this.dispatchCustomEvent)||void 0===o||o.call(this,"connectionDenied",{targetInputId:i.id}))}a.classList.remove("preview"),a.id="conn_".concat(G3());t=this.startSocket.closest(".costerlogic-block");const e=null!==(n=i.closest(".costerlogic-block"))&&void 0!==n?n:null,l=e?this.blocks.get(e.id):null;let c;if(("FUNCTION_BLOCK"===(null===l||void 0===l?void 0:l.type)||(null===e||void 0===e?void 0:e.classList.contains("function")))&&e){const t=Array.from(e.querySelectorAll(".input")),n=t.findIndex((e=>e.id===i.id)),r=n>=0?n+1:t.length+1;c="input".concat(r),i.dataset.orderId=c}else i.dataset.orderId&&(c=i.dataset.orderId);const s={id:a.id,startSocket:this.startSocket,endSocket:i,pathEl:a};c&&(s.orderId=c),this.connections.set(a.id,s),this.dispatchCustomEvent("hasModified");const d=a.cloneNode(!0);this.registerOperation({type:Z3.CONNECT,data:{id:a.id,fromSocketId:null===(r=this.startSocket)||void 0===r?void 0:r.id,toSocketId:null===i||void 0===i?void 0:i.id,element:d}});try{this.updateInputBlocks(i.id)}catch(r5){}}else a.remove();this.startSocket=null}else;}}handlePointerMove(e){if(this.pendingClick&&this.pendingClick.pointerId===e.pointerId&&!this.isLinking){const t=Math.abs(e.clientX-this.pendingClick.startX),n=Math.abs(e.clientY-this.pendingClick.startY);if(t>this.CLICK_MOVE_THRESHOLD||n>this.CLICK_MOVE_THRESHOLD){const e=document.getElementById(this.pendingClick.id);e&&(this.isDragging=!0,this.draggedEl=e,e.style.cursor="grabbing",this.selectedBlockId=e.id),this.pendingClick=null}}if(!this.selectionStart||this.isDragging||this.isLinking){if(this.isGroupDragging){const t=this.scale||1,n=(e.clientX-this.groupDragStart.x)/t,r=(e.clientY-this.groupDragStart.y)/t;return this.groupDragData.forEach((e=>{const t=e.startX+n,o=e.startY+r;e.el.style.left="".concat(t,"px"),e.el.style.top="".concat(o,"px");const a=this.blocks.get(e.el.id);a&&(a.xPosition=t,a.yPosition=o),e.endX=t,e.endY=o})),this.registerOperation({type:Z3.MOVE_GROUP,data:{groupDragStart:this.groupDragStart,groupDragData:this.groupDragData}}),void this.updateAllConnections()}if(this.isDragging&&this.draggedEl){const n=this.container.getBoundingClientRect(),r=this.scale||1;let o=(e.clientX-n.left)/r-this.offsetX,a=(e.clientY-n.top)/r-this.offsetY;o=Math.max(0,Math.min(n.width/r-this.draggedEl.offsetWidth,o)),a=Math.max(0,Math.min(n.height/r-this.draggedEl.offsetHeight,a)),this.draggedEl.style.left="".concat(o,"px"),this.draggedEl.style.top="".concat(a,"px");try{const t=this.draggedEl.id,n=this.blocks.get(t);if(n&&n.category===U3.NOTES){const r=document.elementFromPoint(e.clientX,e.clientY),o=r?r.closest(".costerlogic-block"):null;let a="";if("function"===typeof n.getText)a=n.getText()||"";else{const e=this.draggedEl.querySelector("textarea");a=e?e.value:""}if(!a)return;o&&o.id!==t?this.currentDropTarget!==o&&(this.currentDropTarget&&this.currentDropTarget.classList.remove("drop-target"),this.currentDropTarget=o,this.currentDropTarget.classList.add("drop-target")):this.currentDropTarget&&(this.currentDropTarget.classList.remove("drop-target"),this.currentDropTarget=null)}else this.currentDropTarget&&(this.currentDropTarget.classList.remove("drop-target"),this.currentDropTarget=null)}catch(t){}return!this.isBlockConnected(this.draggedEl.id)&&this.hasInAndOutSockets(this.draggedEl)?this.connections.forEach((t=>{const r=document.getElementById(t.id);r&&(this.isMouseNearPath(r,e.clientX,e.clientY,8,n)?(r.classList.add("hover-block"),this.hoveredConnectionId=t.id):r.classList.remove("hover-block"))})):(this.connections.forEach((e=>{const t=document.getElementById(e.id);t&&t.classList.remove("hover-block")})),this.hoveredConnectionId=null),void this.updateAllConnections()}this.isLinking&&(e.preventDefault(),this.updatePreviewPath(e.clientX,e.clientY))}else{const t=this.canvas.getBoundingClientRect(),n=this.scale||1;this.selectionEnd={x:(e.clientX-t.left)/n,y:(e.clientY-t.top)/n},this.highlightBlocksInSelection();const r=Math.min(this.selectionStart.x,this.selectionEnd.x),o=Math.min(this.selectionStart.y,this.selectionEnd.y),a=Math.max(this.selectionStart.x,this.selectionEnd.x),i=Math.max(this.selectionStart.y,this.selectionEnd.y);Object.assign(this.selectionRect.style,{left:"".concat(r,"px"),top:"".concat(o,"px"),width:"".concat(a-r,"px"),height:"".concat(i-o,"px")})}}hasInAndOutSockets(e){const t=e.querySelectorAll(".input").length>0,n=e.querySelectorAll(".output").length>0;return t&&n}isMouseNearPath(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:8,o=arguments.length>4?arguments[4]:void 0;const a=t-o.left,i=n-o.top,l=e.getTotalLength(),c=Math.max(Math.floor(l/30),5);let s=1/0;for(let p=0;p<=l;p+=c){const t=e.getPointAtLength(p),n=t.x-a,o=t.y-i,l=n*n+o*o;if(l<s&&(s=l,s<=r*r))return!0}const d=e.getPointAtLength(l),u=d.x-a,f=d.y-i;return u*u+f*f<=r*r}highlightBlocksInSelection(){const e=new Set;this.blocks.forEach((t=>{const n=t.element,r=n.id,o=parseFloat(n.style.left)||0,a=parseFloat(n.style.top)||0,i=n.offsetWidth,l=n.offsetHeight,c=this.isBlockInsideSelection(o,a,i,l);n.classList.contains("invalidVar")||(n.classList.toggle("selected",c),c&&(e.add(r),this.object_selected.add(n)))}))}isBlockInsideSelection(e,t,n,r){if(!this.selectionStart||!this.selectionEnd)return!1;const o=Math.min(this.selectionStart.x,this.selectionEnd.x),a=Math.min(this.selectionStart.y,this.selectionEnd.y),i=Math.abs(this.selectionEnd.x-this.selectionStart.x),l=Math.abs(this.selectionEnd.y-this.selectionStart.y);return e<o+i&&e+n>o&&t<a+l&&t+r>a}clearDropTarget(){this.currentDropTarget&&(this.currentDropTarget.classList.remove("drop-target"),this.currentDropTarget=null)}handleContextMenu(e){this.isLock||this.createContextMenu(e)}handleKeyDown(e){this.isLock||"Delete"===e.key&&(this.dispatchCustomEvent("closeDetails"),this.deleteSelected())}handleGlobalDragEnd(e){this.clearDropTarget(),this.selectionRect&&this.finalizeSelection(),this.cleanupSelection(),this.handlePointerUp(e)}createSelectionRect(){this.selectionRect=document.createElement("div"),Object.assign(this.selectionRect.style,{position:"absolute",border:"1px dashed #0099ff",pointerEvents:"none"}),this.canvas.appendChild(this.selectionRect)}finalizeSelection(){if(null===this.selectionStart||null===this.selectionEnd)return;const e=Math.min(this.selectionStart.x,this.selectionEnd.x),t=Math.min(this.selectionStart.y,this.selectionEnd.y),n=Math.max(this.selectionStart.x,this.selectionEnd.x),r=Math.max(this.selectionStart.y,this.selectionEnd.y);this.blocks.forEach((o=>{const a=o.element,i=a.offsetLeft,l=a.offsetTop,c=i+a.offsetWidth,s=l+a.offsetHeight,d=!(c<e||i>n||s<t||l>r);a.classList.contains("invalidVar")||(a.classList.toggle("selected",d),d?this.object_selected.add(a):this.object_selected.delete(a))}));const o=this.canvas.getBoundingClientRect();Array.from(this.connections.values()).forEach((a=>{const i=a.pathEl;if(!i)return;const l=i.getBoundingClientRect(),c=l.left-o.left,s=l.top-o.top,d=c+l.width,u=s+l.height,f=c>=e&&s>=t&&d<=n&&u<=r;i.classList.toggle("selected",f),f?this.object_selected.add(i):this.object_selected.delete(i)})),this.selectionRect&&(this.selectionRect.remove(),this.selectionRect=null),this.selectionStart=null,this.selectionEnd=null}updatePreviewPath(e,t){if(!this.previewPath||!this.startSocket)return;const n=this.scale||1,r=this.container.getBoundingClientRect(),o=this.startSocket.getBoundingClientRect(),a=(o.left+o.width/2-r.left)/n,i=(o.top+o.height/2-r.top)/n,l=(e-r.left)/n,c=(t-r.top)/n,s=Math.abs(l-a),d=Math.max(20,s/2),u="M ".concat(a," ").concat(i," C ").concat(a+d," ").concat(i," ").concat(l-d," ").concat(c," ").concat(l," ").concat(c);this.previewPath.setAttribute("d",u);try{const n=document.elementFromPoint(e,t),r=n?n.closest(".input"):null;if(!this.previewInvalidTarget||r&&this.previewInvalidTarget===r||(this.previewInvalidTarget.classList.remove("input-occupied-hover"),this.previewInvalidTarget=null,this.previewPath.classList.remove("preview-invalid"),this.previousPreviewWasInvalid=!1),r){Array.from(this.connections.values()).some((e=>{var t;return(null===(t=e.endSocket)||void 0===t?void 0:t.id)===r.id}))?(r.classList.add("input-occupied-hover"),this.previewInvalidTarget=r,this.previewPath.classList.contains("preview-invalid")||this.previewPath.classList.add("preview-invalid"),this.previousPreviewWasInvalid=!0):(this.previewPath.classList.contains("preview-invalid")&&this.previewPath.classList.remove("preview-invalid"),r.style.cursor="crosshair",this.previousPreviewWasInvalid=!1,this.previewPath.classList.remove("input-occupied-hover"))}else this.previewPath.classList.contains("preview-invalid")&&this.previewPath.classList.remove("preview-invalid"),this.previousPreviewWasInvalid=!1}catch(f){console.warn("updatePreviewPath: errore checking hovered input",f)}}updateConnection(e){if(!e.startSocket||!e.endSocket)return;const t=this.container.getBoundingClientRect(),n=e.startSocket.getBoundingClientRect(),r=e.endSocket.getBoundingClientRect(),o=n.left+n.width/2-t.left,a=n.top+n.height/2-t.top,i=r.left+r.width/2-t.left,l=r.top+r.height/2-t.top,c=.5*Math.abs(i-o),s=o+c,d=a,u=i-c,f=l,p="M".concat(o,",").concat(a," C").concat(s,",").concat(d," ").concat(u,",").concat(f," ").concat(i,",").concat(l);e.pathEl.setAttribute("d",p)}_createConnectionPath(e){const t=this.container.getBoundingClientRect(),n=document.getElementById(e.startSocket.id),r=document.getElementById(e.endSocket.id),o=n.getBoundingClientRect(),a=r.getBoundingClientRect(),i=o.left+o.width/2-t.left,l=o.top+o.height/2-t.top,c=a.left+a.width/2-t.left,s=a.top+a.height/2-t.top,d=.5*Math.abs(c-i),u="M".concat(i,",").concat(l," C").concat(i+d,",").concat(l," ").concat(c-d,",").concat(s," ").concat(c,",").concat(s),f=document.createElementNS(this.svgLayer.namespaceURI,"path");return f.setAttribute("d",u),f.setAttribute("id",e.id),f.classList.add("connection"),this.svgLayer.appendChild(f),f}cleanupSelection(){var e;null===(e=this.selectionRect)||void 0===e||e.remove(),this.selectionRect=null,this.selectionStart=this.selectionEnd=null}addBlock(e,t,n,r,o,a,i,l,c,s,d,u,f,p,h,m,g,v){const b=this.mapBlockType(r);if(f&&p){const e=f.children.find((e=>e.id===p));h=null===e||void 0===e?void 0:e.socketInIds,m=null===e||void 0===e?void 0:e.socketOutIds}console.log("tags",u);const y=(()=>{switch(b){case K3.VAR_BLOCK:return new $3(e,t,n,o,a,i,l,c,s,d,u,p,h,m,g);case K3.MISC_BLOCK:return new J3(e,t,n,o,a,i,l,c,s,d,u,p,h,m);case K3.FUNCTION_BLOCK:return new Y3(e,t,n,o,a,i,l,c,s,d,u,p,h,m,g,v);case K3.GROUP_BLOCK:return new n6(e,t,n,a,i,l,c,s,d,u,f,p,h,m)}})();this.canvas.appendChild(y.element),this.blocks.set(y.id,y);const x=document.getElementById(y.id).cloneNode(!0);return this.registerOperation({type:Z3.CREATE,data:{id:y.id,element:x}}),y.setupCustomBehavior(y.element,y.id),y.applyFixedInputLabels(),this.namesLocalization(y),y.id}namesLocalization(e){var t;const n=null!==(t=this.translate)&&void 0!==t?t:e=>e,r=e.element;Array.from(r.querySelectorAll(".function-title-span")).forEach((e=>{e.innerHTML=n(e.innerText.toLowerCase()),e.title=e.innerText.toLowerCase().toUpperCase()})),r.setAttribute("data-descr","\ud835\udc53: ".concat(e.descr))}isBlockConnected(e){for(const a of Array.from(this.connections.values())){if(!a)continue;let i,l;const c=a.startSocket,s=a.endSocket;var t,n;if(c&&"function"===typeof c.closest)i=null===(t=c.closest(".costerlogic-block"))||void 0===t?void 0:t.id;else if("string"===typeof c){var r;const e=document.getElementById(c);i=null===e||void 0===e||null===(r=e.closest(".costerlogic-block"))||void 0===r?void 0:r.id}if(s&&"function"===typeof s.closest)l=null===(n=s.closest(".costerlogic-block"))||void 0===n?void 0:n.id;else if("string"===typeof s){var o;const e=document.getElementById(s);l=null===e||void 0===e||null===(o=e.closest(".costerlogic-block"))||void 0===o?void 0:o.id}if(i===e||l===e)return!0}return!1}updateInputBlocks(e){const t=".".concat("input_command_"+e),n=document.querySelector(t);if(!n)return;n.classList.contains("hidden")?n.classList.remove("hidden"):n.classList.add("hidden");const r=n.parentElement;if(!r)return;const o=r.querySelector("div.rem-input button.plus.rem");if(o){const e=o.classList.contains("hidden");o.classList.add("hidden"),e?o.classList.remove("hidden"):o.classList.add("hidden")}}mapBlockType(e){const t="string"===typeof e?e.toUpperCase():e,n={VAR_BLOCK:K3.VAR_BLOCK,FUNCTION_BLOCK:K3.FUNCTION_BLOCK,MISC_BLOCK:K3.MISC_BLOCK,GROUP_BLOCK:K3.GROUP_BLOCK}[t]||K3.VAR_BLOCK;return Object.values(K3).includes(n)?n:(console.warn("Tipo ".concat(e," non riconosciuto, usando default VAR_BLOCK")),K3.VAR_BLOCK)}addLink(){return""}deleteSelected(){const e=Array.from(this.canvas.querySelectorAll(".costerlogic-block.selected")).map((e=>e.id));if(this.selectedConnectionId){const e=this.selectedConnectionId,r=this.svgLayer.querySelector("#".concat(e));if(r){var t,n;const o=null===(t=this.connections.get(e))||void 0===t?void 0:t.startSocket,a=null===(n=this.connections.get(e))||void 0===n?void 0:n.endSocket;a&&this.updateInputBlocks(a.id);const i=r.cloneNode(!0);this.registerOperation({type:Z3.DELETE,data:{id:e,startSocket:null===o||void 0===o?void 0:o.id,endSocket:null===a||void 0===a?void 0:a.id,element:i}}),r.remove(),this.connections.delete(e)}return this.selectedConnectionId=null,void this.dispatchCustomEvent("hasModified")}if(!e.length)return;const r=[],o=[];for(const a of e){const e=this.blocks.get(a);if(e)if("VAR"===e.category&&"w"===e.direction){const t=e.element.classList.contains("parametrized");r.push({blockId:e.id,blockRefId:e.refId,isParametrized:t})}else o.push(a)}r.length>0?this.dispatchCustomEvent("deleteVarOut",{blocks:r,otherIds:o}):(this._deleteIdsImmediate(e),this.object_selected.clear(),this.dispatchCustomEvent("hasModified"))}async _deleteIdsImmediate(e){const t=[],n=[],r=[];for(const i of e){const e=document.getElementById(i),o=this.blocks.get(i);if(!e||!o)continue;Array.from(this.connections.values()).filter((e=>{var t,n;const r=null===(t=e.startSocket.closest(".costerlogic-block"))||void 0===t?void 0:t.id,o=null===(n=e.endSocket.closest(".costerlogic-block"))||void 0===n?void 0:n.id;return r===i||o===i})).forEach((e=>{var t,r;this.svgLayer.contains(e.pathEl)&&this.svgLayer.removeChild(e.pathEl);const o=e.pathEl.cloneNode(!0);n.push({connId_to_rem:e.id,startSocket_to_rem:null===(t=e.startSocket)||void 0===t?void 0:t.id,endSocket_to_rem:null===(r=e.endSocket)||void 0===r?void 0:r.id,connection_to_rem:o}),this.connections.delete(e.id)})),o.category===U3.VAR&&"w"===o.direction&&(r.push(o.refId),this.delExportVariable(o.refId));const a=e.cloneNode(!0);t.push({id:i,block_block:o,block_to_rem:a}),this.blocks.delete(i),e.remove()}try{await uE(eE,"",JSON.stringify({ids:r}),GC())}catch(a){var o;const e=null!==(o=this.translate)&&void 0!==o?o:e=>e;console.error(e(a.message))}t.length>0&&this.registerOperation({type:Z3.DELETE_BLOCK_CONNECTED,data:{blocks:t,connections:n}})}performConfirmedDeletion(e){const t=new Set;if(Array.isArray(null===e||void 0===e?void 0:e.blocks))for(const n of e.blocks)n&&n.blockId&&t.add(n.blockId),n&&n.blockRefId&&this.blocks.forEach((e=>{e.refId===n.blockRefId&&"VAR"===e.category&&t.add(e.id)}));Array.isArray(null===e||void 0===e?void 0:e.otherIds)&&e.otherIds.forEach((e=>t.add(e))),this._deleteIdsImmediate(Array.from(t)),this.object_selected.clear(),this.dispatchCustomEvent("varOutDelete"),this.dispatchCustomEvent("hasModified")}removeConnectionsForBlock(e){Array.from(this.connections.values()).filter((t=>{const n=t.startSocket.closest(".costerlogic-block").id,r=t.endSocket.closest(".costerlogic-block").id;return n===e||r===e})).forEach((e=>{var t,n;this.svgLayer.contains(e.pathEl)&&this.svgLayer.removeChild(e.pathEl);const r=e.pathEl.cloneNode(!0);this.registerOperation({type:Z3.DELETE,data:{id:e.id,startSocket:null===(t=e.startSocket)||void 0===t?void 0:t.id,endSocket:null===(n=e.endSocket)||void 0===n?void 0:n.id,element:r}}),this.connections.delete(e.id)}))}removeConnectionsForSocket(e){if(!e)return;const t=[];for(const[o,a]of Array.from(this.connections.entries()))try{var n,r;const i=null===(n=a.startSocket)||void 0===n?void 0:n.id,l=null===(r=a.endSocket)||void 0===r?void 0:r.id;i!==e&&l!==e||t.push({id:o,conn:a})}catch(r5){t.push({id:o,conn:a})}if(0!==t.length){if(this.undoRedoManager&&"function"===typeof this.registerOperation){const n=t.map((e=>{var t,n,r,o;return{id:e.id,startSocketId:null!==(t=null===(n=e.conn.startSocket)||void 0===n?void 0:n.id)&&void 0!==t?t:null,endSocketId:null!==(r=null===(o=e.conn.endSocket)||void 0===o?void 0:o.id)&&void 0!==r?r:null,pathHtml:e.conn.pathEl?e.conn.pathEl.cloneNode(!0):null}}));this.registerOperation({type:Z3.DELETE_CONNECTIONS_BY_SOCKET,data:{socketId:e,removed:n}})}t.forEach((e=>{let{id:t,conn:n}=e;try{n.pathEl&&n.pathEl.parentElement===this.svgLayer?this.svgLayer.removeChild(n.pathEl):n.pathEl&&n.pathEl.parentElement&&n.pathEl.parentElement.removeChild(n.pathEl)}catch(r5){}this.connections.delete(t)}));try{const t=document.getElementById(e);t&&(t.classList.remove("socket-connected"),t.removeAttribute("data-connected"))}catch(r5){console.warn(r5)}if("function"===typeof this.updateAllConnections)try{this.updateAllConnections()}catch(r5){console.warn(r5)}}}updateConnectionsForBlock(e){const t=this.container.getBoundingClientRect();Array.from(this.connections.values()).filter((t=>{const n=t.startSocket.closest(".costerlogic-block").id,r=t.endSocket.closest(".costerlogic-block").id;return n===e||r===e})).forEach((e=>{const n=e.startSocket.getBoundingClientRect(),r=e.endSocket.getBoundingClientRect(),o=n.left+n.width/2-t.left,a=n.top+n.height/2-t.top,i=r.left+r.width/2-t.left,l=r.top+r.height/2-t.top,c=.5*Math.abs(i-o),s="M".concat(o,",").concat(a," C").concat(o+c,",").concat(a," ").concat(i-c,",").concat(l," ").concat(i,",").concat(l);e.pathEl.setAttribute("d",s)}))}updateAllConnections(){this.connections.forEach((e=>{this.updateConnection(e)}))}insertBlockInConnection(e,t){const n=this.connections.get(t);if(!n)return;this.svgLayer.removeChild(n.pathEl),this.connections.delete(t);const{startSocket:r,endSocket:o}=n,a=document.getElementById(e),i=Array.from(a.querySelectorAll(".input")),l=Array.from(a.querySelectorAll(".output"));if(0===i.length||0===l.length)return void console.warn("Blocco ".concat(e," non ha socket sufficienti"));const c=i[0],s=l[l.length-1],d=[],u=(e,t)=>{const n="conn_".concat(G3()),r={id:n,startSocket:e,endSocket:t,pathEl:{}},o={id:n,startSocket:e,endSocket:t,pathEl:this._createConnectionPath(r)};return this.connections.set(n,o),o};d.push(u(r,c)),d.push(u(s,o)),this.registerOperation({type:Z3.INSERTBLOCKINCONNECTION,data:{oldConnection:n,newConnections:d}}),this.dispatchCustomEvent("hasModified"),this.updateAllConnections()}copySelected(){const e=Array.from(this.canvas.querySelectorAll(".costerlogic-block.selected")).map((e=>e.id));if(0===e.length)return void console.warn("Nessun blocco selezionato da copiare");const t=e.map((e=>{const t=this.blocks.get(e),n=t.element,r=Array.from(n.querySelectorAll(".input")),o=Array.from(n.querySelectorAll(".output")),a=!(null===n||void 0===n||!n.classList.contains("parametrized"));return{originalId:e,data:{name:t.name,devName:t.devName,descr:t.descr,type:t.type,category:t.category,x:t.xPosition,y:t.yPosition,numSocketsIn:r.length,numSocketsOut:o.length,direction:t.direction,uom:t.uom,refId:"VAR"===t.category&&"w"===t.direction?"internal_".concat(G3()):t.refId,maxNumInputs:t.maxNumInputs,asNote:t.asNote,note:t.note,isTypified:t.isTypified,isParametrized:a,background:t.element.style.background,constValue:t.constValue,tags:t.tags}}})),n=Array.from(this.connections.values()).filter((t=>{const n=t.startSocket.closest(".costerlogic-block").id,r=t.endSocket.closest(".costerlogic-block").id;return e.includes(n)&&e.includes(r)})).map((e=>{const t=e.startSocket.closest(".costerlogic-block").id,n=e.endSocket.closest(".costerlogic-block").id,r=Array.from(document.getElementById(t).querySelectorAll(".output")),o=Array.from(document.getElementById(n).querySelectorAll(".input"));return{originalId:e.id,data:{fromBlockId:t,fromSocketIndex:r.findIndex((t=>t.id===e.startSocket.id)),toBlockId:n,toSocketIndex:o.findIndex((t=>t.id===e.endSocket.id))}}}));r6.clipboard=[...t,...n]}pasteClipboard(e,t){var n;const r=r6.clipboard;if(!r||0===r.length)return void console.warn("Clipboard vuoto");null===(n=this.dispatchCustomEvent)||void 0===n||n.call(this,"hasModified");const o=this.canvas.getBoundingClientRect(),a=e-o.left,i=t-o.top,l=e=>"number"===typeof e?e:Number(e)||0,c=(e,t)=>{var n;const r=e&&e.trim()?e.trim():"Block",o="Copia di ".concat(r),a=Array.from(document.querySelectorAll(".costerlogic-block")).map((e=>{const t=e.querySelector(".title-varDesc, .block-descr, .descr, .title");return t&&"string"===typeof t.textContent?t.textContent.trim():""})).filter(Boolean),i=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");const l=new RegExp("^Copia di\\s+".concat(i,"(?:\\s+(\\d+))?$"));let c=0;for(const d of a){const e=d.match(l);if(e){const t=e[1]?parseInt(e[1],10):1;!Number.isNaN(t)&&t>c&&(c=t)}}const s=c+1;return null===(n=this.dispatchCustomEvent)||void 0===n||n.call(this,"pasteVAR",{refId:t,descr:"".concat(o," ").concat(s),uom:"other",direction:"rw",type:null}),"".concat(o," ").concat(s)},s=r.filter((e=>void 0!==e.data.type));if(0===s.length)return void console.warn("Nessun blocco nella clipboard da incollare");const d=s.map((e=>l(e.data.x))),u=s.map((e=>l(e.data.y))),f=Math.min(...d),p=Math.min(...u),h=a-f,m=i-p,g=new Map;s.forEach((e=>{var t,n;const r=e.data,o=e.originalId,a=l(r.x)+h,i=l(r.y)+m,s="VAR"===r.category&&"w"===r.direction?"internal_".concat(G3()):r.refId,d="VAR"===r.category&&"w"===r.direction?c(r.descr,s):r.descr,u=this.addBlock(r.name,r.devName,d,r.type,r.category,a,i,r.numSocketsIn,r.numSocketsOut,r.direction,r.uom,r.tags,void 0,void 0,void 0,void 0,s,null!==(t=r.maxNumInputs)&&void 0!==t?t:void 0);if(g.set(o,u),r.isParametrized){const e=this.blocks.get(u);null===e||void 0===e||e.element.classList.add("parametrized")}if("CONST"===r.category){const e=this.blocks.get(u),t=r.constValue||0;if(e)if(e.constValue=t,"function"===typeof e.setConstValue)e.setConstValue(t);else{const n=e.element.querySelector(".const-value");n&&(n.textContent=String(t))}}if("NOTES"===r.category){const e=this.blocks.get(u),t=r.note;e&&(e.setNoteText(t),this.setNotesColor(r.background,e.element))}null===(n=this.dispatchCustomEvent)||void 0===n||n.call(this,"blockCreated",{id:u,name:r.name,category:r.category,type:r.type,refId:r.refId,direction:r.direction,numSocketsIn:r.numSocketsIn,numSocketsOut:r.numSocketsOut,uom:r.uom,maxNumInputs:r.maxNumInputs,tags:r.tags}),this.undoRedoManager.clear()}));r.filter((e=>void 0!==e.data.fromBlockId)).forEach((e=>{const t=e.data,n=g.get(t.fromBlockId),r=g.get(t.toBlockId);if(!n||!r)return;const o=document.getElementById(n),a=document.getElementById(r);if(!o||!a)return;const i=Array.from(o.querySelectorAll(".output")),l=Array.from(a.querySelectorAll(".input")),c=i[t.fromSocketIndex],s=l[t.toSocketIndex];if(!c||!s)return;const d="conn_".concat(G3()),u=this._createConnectionPath({id:d,startSocket:c,endSocket:s,pathEl:null});this.connections.set(d,{id:d,startSocket:c,endSocket:s,pathEl:u}),this.undoRedoManager.clear()}))}exportVariable(e){const t=this.blocks.get(e);if(!t)return;const n=[{refId:t.refId,descr:t.descr&&""!==t.descr?t.descr:t.name.toUpperCase(),direction:t.direction,address:null}];try{dE(nE,JSON.stringify({vars:n}),GC()),this.dispatchCustomEvent("addVVar")}catch(o){var r;const e=null!==(r=this.translate)&&void 0!==r?r:e=>e;console.error(e(o.message)),this.dispatchCustomEvent("errorPut",{e:e(o.message)})}}delExportVariable(e){const t=this.blocks.get(e);if(!t)return;const n=t.refId;try{uE(nE,"",JSON.stringify({vars:[n]}),GC())}catch(o){var r;const e=null!==(r=this.translate)&&void 0!==r?r:e=>e;console.error(e(o.message))}}buildContextMenuState(e,t,n){return{object_selected:this.object_selected,clipboard:r6.clipboard,lastMenuPosX:t,lastMenuPosY:n,lastMenuTarget:e,ylcOk:this.hasYlc,copySelected:()=>this.copySelected(),cutSelected:()=>{this.copySelected(),this.deleteSelected()},deleteSelected:()=>this.deleteSelected(),pasteAt:(e,t)=>this.pasteClipboard(e,t),align:e=>this.alignSelectedBlocks(e),selectAll:()=>this.selectAll(),unhookNote:e=>this.unhookNote(e),deleteNote:e=>this.deleteNote(e),canUndo:()=>{var e,t;return null!==(e=null===(t=this.undoRedoManager)||void 0===t?void 0:t.canUndo())&&void 0!==e&&e},canRedo:()=>{var e,t;return null!==(e=null===(t=this.undoRedoManager)||void 0===t?void 0:t.canRedo())&&void 0!==e&&e},undo:()=>{this.undo()},redo:()=>{this.redo()},setNotesColor:(e,t)=>this.setNotesColor(e,t),availableDevices:this._availableDevices,availableFunctionBlocks:this._availableFunctionBlocks,createBlockFromTemplate:(e,t,n)=>{var r,o,a,i,l,c,s,d,u,f,p,h;const m=this.canvas.getBoundingClientRect(),g=t-m.x,v=n-m.y,b=this.addBlock(null!==(r=e.name)&&void 0!==r?r:"",null!==(o=e.devName)&&void 0!==o?o:"",null!==(a=e.descr)&&void 0!==a?a:"",null!==(i=e.type)&&void 0!==i?i:"",null!==(l=e.category)&&void 0!==l?l:"",g,v,null!==(c=e.numSocketsIn)&&void 0!==c?c:0,null!==(s=e.numSocketsOut)&&void 0!==s?s:0,null!==(d=e.direction)&&void 0!==d?d:"rw",null!==(u=e.uom)&&void 0!==u?u:"",null!==(f=e.tags)&&void 0!==f?f:null,void 0,void 0,e.socketInIds,e.socketOutIds,null!==(p=e.refId)&&void 0!==p?p:"",e.maxNumInputs),y=this.blocks.get(b);return y&&(e.refId&&(y.refId=e.refId),e.meta&&(y.meta=e.meta)),null===(h=this.dispatchCustomEvent)||void 0===h||h.call(this,"blockCreated",{id:b,name:e.name,category:e.category,type:e.type,refId:e.refId,direction:e.direction,numSocketsIn:e.numSocketsIn,numSocketsOut:e.numSocketsOut,uom:e.uom,socketInIds:e.socketInIds,socketOutIds:e.socketOutIds,maxNumInputs:e.maxNumInputs,tags:e.tags}),b}}}createContextMenu(e){var t;e.preventDefault(),e.stopPropagation(),this.removeContextMenu();const n=document.createElement("div");n.className="context-menu",n.style.left="".concat(e.clientX,"px"),n.style.top="".concat(e.clientY,"px");const r=e.target,o=Array.from(this.canvas.querySelectorAll(".selected"));this.object_selected.clear(),o.forEach((e=>this.object_selected.add(e)));const a=r.closest(".costerlogic-block");a&&!this.object_selected.has(a)&&(this.object_selected.clear(),this.object_selected.add(a)),this._lastMenuTarget=r;const i=function(e,t,n){const r=[],o=e.object_selected.size>0,a=e.object_selected.size>=2,i=(Array.from(e.object_selected).some((e=>e.classList.contains("group-block"))),Array.from(e.object_selected).some((e=>e.classList.contains("var")||e.classList.contains("ext")||e.classList.contains("virtual"))),Array.from(e.object_selected).some((e=>e.classList.contains("exported"))),Array.from(e.object_selected).some((e=>e.classList.contains("invalidVar")))),l=(Array.from(e.object_selected).some((e=>e.classList.contains("parametrized"))),'\n    <svg width="12" height="12" viewBox="0 0 24 24" fill="none"\n         xmlns="http://www.w3.org/2000/svg">\n      <path d="M9 18l6-6-6-6"\n            stroke="currentColor" stroke-width="2"\n            stroke-linecap="round" stroke-linejoin="round"/>\n    </svg>\n  '),c=e=>'\n    <svg width="1.2em" height="1.2em" fill="'.concat(e,'" viewBox="0 0 1024 1024"\n        xmlns="http://www.w3.org/2000/svg">\n      <path d="M864 64H160C107 64 64 107 64 160v704c0 53 43 96 96 96h704c53 0 96-43 96-96V160c0-53-43-96-96-96z"></path>\n    </svg>  \n  ');if(a)r.push({label:n("arrange"),iconSvg:l,submenu:[{label:n("alignLeft"),action:()=>e.align("left")},{label:n("alignCenter"),action:()=>e.align("horizontal-center")},{label:n("alignRight"),action:()=>e.align("right")},{divider:!0},{label:n("alignTop"),action:()=>e.align("top")},{label:n("alignMiddle"),action:()=>e.align("vertical-center")},{label:n("alignBottom"),action:()=>e.align("bottom")},{divider:!0},{label:n("distributeHoriz"),action:()=>e.align("horizontal-distribute")},{label:n("distributeVert"),action:()=>e.align("vertical-distribute")}],disabled:i}),r.push({divider:!0}),r.push({label:n("copy"),iconSvg:"ctrl-c",action:()=>e.copySelected(),disabled:i}),r.push({label:n("cut"),iconSvg:"ctrl-x",action:()=>e.cutSelected(),disabled:i}),r.push({label:n("deleteSelected"),iconSvg:"del",action:()=>e.deleteSelected(),disabled:!o});else if(t.closest(".costerlogic-block:not(.group-block)")){const a=t.closest(".costerlogic-block");let s=!1;a.querySelector(".note-icon")&&(s=!0),r.push({label:n("copy"),iconSvg:"ctrl-c",action:()=>e.copySelected(),disabled:i}),r.push({label:n("cut"),iconSvg:"ctrl-x",action:()=>e.cutSelected(),disabled:i}),r.push({label:n("deleteSelected"),iconSvg:"del",action:()=>e.deleteSelected(),disabled:!o}),r.push({divider:!0}),r.push({label:n("unhookNote"),action:()=>e.unhookNote(a.id),disabled:!s||i}),r.push({label:n("delNote"),action:()=>e.deleteNote(a.id),disabled:!s||i});const d=t.closest(".notes");d&&(r.push({divider:!0}),r.push({label:n("color"),iconSvg:l,submenu:[{iconSvg:c("blue"),action:()=>e.setNotesColor("blue",d)},{iconSvg:c("red"),action:()=>e.setNotesColor("red",d)},{iconSvg:c("yellow"),action:()=>e.setNotesColor("#fdfd86",d)},{iconSvg:c("orange"),action:()=>e.setNotesColor("orange",d)},{iconSvg:c("green"),action:()=>e.setNotesColor("green",d)},{iconSvg:c("gray"),action:()=>e.setNotesColor("gray",d)}]}))}else if(t.closest(".group-block"))r.push({label:n("copy"),iconSvg:"ctrl-c",action:()=>e.copySelected()}),r.push({label:n("cut"),iconSvg:"ctrl-x",action:()=>e.cutSelected()}),r.push({label:n("deleteSelected"),iconSvg:"del",action:()=>e.deleteSelected(),disabled:!o});else if(t.closest(".connection"))r.push({label:n("dellConnect"),action:()=>e.deleteSelected(),disabled:!o});else if(t.closest(".costerlogic")){var s,d;const t=[];t.push({label:n("variables"),iconSvg:l,submenu:[{label:"VAR IN",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"VAR IN",type:"VAR_BLOCK",category:"VAR",numSocketsIn:0,numSocketsOut:1,direction:"r",descr:"",devName:""},e.lastMenuPosX,e.lastMenuPosY)}},{label:"VAR OUT",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"VAR OUT",type:"VAR_BLOCK",category:"VAR",numSocketsIn:1,numSocketsOut:0,direction:"w",descr:"",devName:""},e.lastMenuPosX,e.lastMenuPosY)}},{label:"VIRTUAL DEVICE DATA IN",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"VIRTUAL IN",type:"VAR_BLOCK",category:"VIRTUAL",numSocketsIn:0,numSocketsOut:1,direction:"r",descr:"",devName:""},e.lastMenuPosX,e.lastMenuPosY)}},{label:"VIRTUAL DEVICE DATA OUT",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"VIRTUAL OUT",type:"VAR_BLOCK",category:"VIRTUAL",numSocketsIn:1,numSocketsOut:0,direction:"w",descr:"",devName:""},e.lastMenuPosX,e.lastMenuPosY)}},{label:"EXT IN",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"EXT IN",type:"VAR_BLOCK",category:"EXT",numSocketsIn:0,numSocketsOut:1,direction:"r",descr:"",devName:""},e.lastMenuPosX,e.lastMenuPosY)},disabled:!e.ylcOk},{label:"EXT OUT",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"EXT OUT",type:"VAR_BLOCK",category:"EXT",numSocketsIn:1,numSocketsOut:0,direction:"w",descr:"",devName:""},e.lastMenuPosX,e.lastMenuPosY)},disabled:!e.ylcOk},{label:"EXPOSED VAR IN",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"EXPOSED IN",type:"VAR_BLOCK",category:"EXPOSED",numSocketsIn:0,numSocketsOut:1,direction:"r",descr:"EXPOSED IN",devName:""},e.lastMenuPosX,e.lastMenuPosY)}},{label:"EXPOSED VAR OUT",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"EXPOSED OUT",type:"VAR_BLOCK",category:"EXPOSED",numSocketsIn:1,numSocketsOut:0,direction:"w",descr:"EXPOSED OUT",devName:""},e.lastMenuPosX,e.lastMenuPosY)}}]}),t.push({divider:!0}),t.push({label:n("constants"),iconSvg:l,submenu:[{label:n("constant"),action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:n("constant"),type:"VAR_BLOCK",category:"CONST",numSocketsIn:0,numSocketsOut:1,direction:"r",descr:"",devName:""},e.lastMenuPosX,e.lastMenuPosY)}}]}),e.availableFunctionBlocks&&e.availableFunctionBlocks.length&&(t.push({divider:!0}),t.push({label:n("functions"),iconSvg:l,submenu:e.availableFunctionBlocks.map((t=>({label:n(t.name),action:()=>{if("function"===typeof e.createBlockFromTemplate){const n={name:t.name,category:t.category,type:t.type,maxNumInputs:t.maxNumInputs,numSocketsIn:t.minNumInputs,numSocketsOut:1,direction:t.direction,descr:t.descr,uom:t.uom,refId:t.id,meta:t};e.createBlockFromTemplate(n,e.lastMenuPosX,e.lastMenuPosY)}}})))})),t.push({divider:!0}),t.push({label:n("misc"),iconSvg:l,submenu:[{label:"Notes",action:()=>{"function"===typeof e.createBlockFromTemplate&&e.createBlockFromTemplate({name:"Notes",type:"MISC_BLOCK",category:"NOTES",numSocketsIn:0,numSocketsOut:0},e.lastMenuPosX,e.lastMenuPosY)}}]}),r.push({label:n("addBlock"),iconSvg:l,submenu:t}),r.push({divider:!0}),r.push({label:n("undo"),iconSvg:"ctrl-z",action:()=>{var t;return null===(t=e.undo)||void 0===t?void 0:t.call(e)},disabled:!(null!==(s=e.canUndo)&&void 0!==s&&s.call(e))}),r.push({label:n("redo"),iconSvg:"ctrl-y",action:()=>{var t;return null===(t=e.redo)||void 0===t?void 0:t.call(e)},disabled:!(null!==(d=e.canRedo)&&void 0!==d&&d.call(e))}),r.push({divider:!0}),r.push({label:n("selectAll"),iconSvg:"ctrl-a",action:()=>e.selectAll()}),r.push({label:n("deleteSelected"),iconSvg:"del",action:()=>e.deleteSelected(),disabled:!o})}return e.clipboard.length>0&&!t.closest(".connection")&&r.push({label:n("paste"),iconSvg:"ctrl-v",action:()=>e.pasteAt(e.lastMenuPosX,e.lastMenuPosY)}),r}(this.buildContextMenuState(r,e.clientX,e.clientY),r,null!==(t=this.translate)&&void 0!==t?t:e=>e);i.length>0&&(t6(i,n),document.body.appendChild(n),this.contextMenu=n,setTimeout((()=>{document.addEventListener("click",this.removeContextMenu.bind(this),{once:!0})}),10))}removeContextMenu(){this.contextMenu&&(this.contextMenu.remove(),this.contextMenu=null)}disposeContextMenuShortcuts(){this._ctxShortcutsHandler&&(window.removeEventListener("keydown",this._ctxShortcutsHandler),this._ctxShortcutsHandler=null)}setNotesColor(e,t){var n;const r=t.querySelector(".costerlogic_action_notes");t.style.background=e,r.style.color="blue"===e||"red"===e?"#fff":"#000";const o=this.blocks.get(t.id);o&&(o.background=e),null===(n=this.dispatchCustomEvent)||void 0===n||n.call(this,"hasModified")}updateBlock(e,t){try{var n;const o=this.blocks.get(e);if(!o)return console.warn("updateBlock: block non trovato",e),!1;const a=null!==(n=document.getElementById(o.id))&&void 0!==n?n:o.element;if(!a)return console.warn("updateBlock: elemento DOM del block mancante",e),!1;if("undefined"!==typeof t.name)if(o.name=t.name,"function"===typeof o.updateHeader)o.updateHeader(t.name);else{const e=a.querySelector(".title-varDesc");e&&(e.title=String("".concat(t.name.toUpperCase(),"\n").concat(o.devName))),e&&(e.textContent=String("".concat(t.name.toUpperCase())))}if("undefined"!==typeof t.devName&&""!==t.devName)if(o.devName=t.devName,"function"===typeof o.updateHeader)o.updateHeader(t.devName);else{const e=a.querySelector(".title-varDesc");e&&(e.title=String("".concat(o.name.toUpperCase(),"\n").concat(t.devName)))}if("undefined"!==typeof t.descr)if(o.descr=t.descr,"function"===typeof o.updateHeader)o.updateHeader(t.descr);else{const e=a.querySelector(".title-varDesc");"VAR"===t.category?(e&&(e.textContent=""!==t.descr?String(t.descr):String(o.name.toUpperCase())),e&&(e.title=String("".concat(t.descr)))):e&&(e.textContent=""!==t.descr?String(t.descr):String(o.name.toUpperCase()))}if("undefined"!==typeof t.value)if(o.constValue=t.value,"function"===typeof o.setConstValue)o.setConstValue(t.value);else{const e=a.querySelector(".const-value");e&&(e.textContent=String(t.value))}if("undefined"!==typeof t.type&&(o.type=t.type),"undefined"!==typeof t.category&&(o.category=t.category),"undefined"!==typeof t.refId&&(o.refId=t.refId,a.setAttribute("data-refid",String(t.refId))),"number"===typeof t.x&&(o.xPosition=t.x,a.style.left="".concat(t.x,"px")),"number"===typeof t.y&&(o.yPosition=t.y,a.style.top="".concat(t.y,"px")),"undefined"!==typeof t.uom&&(o.uom=t.uom),"undefined"!==typeof t.tags&&(o.tags=t.tags),"undefined"!==typeof t.note)if("function"===typeof o.setNoteText)o.setNoteText(t.note);else{const e=a.querySelector(".costerlogic_action_notes");e&&(e.value=String(t.note)),o.note=t.note}const i=(e,t)=>{var n;if(!t)return;const r=a.querySelector(e);if(!r)return;const o=Array.from(r.querySelectorAll(".input, .output")),i=o.map((e=>e.id)).filter(Boolean);for(const a of i)if(!t.includes(a)){for(const[t,n]of Array.from(this.connections.entries()))try{var l,c;const e=null===(l=n.startSocket)||void 0===l?void 0:l.id,r=null===(c=n.endSocket)||void 0===c?void 0:c.id;e!==a&&r!==a||(n.pathEl&&n.pathEl.parentElement&&n.pathEl.parentElement.removeChild(n.pathEl),this.connections.delete(t))}catch(r5){console.warn(r5)}const e=r.querySelector("#".concat(a));e&&e.parentElement&&e.parentElement.removeChild(e)}const s=null!==(n=o[0])&&void 0!==n?n:null;for(const a of t){if(!a)continue;let t=r.querySelector("#".concat(a));t||(s?(t=s.cloneNode(!0),t.id=a,t.classList.remove("connected")):(t=document.createElement("div"),t.className=e.includes("inputs")?"input":"output",t.id=a),r.appendChild(t))}};t.socketInIds&&i(".inputs",t.socketInIds),t.socketOutIds&&i(".outputs",t.socketOutIds),this.undoRedoManager&&"function"===typeof this.registerOperation&&this.registerOperation({type:Z3.UPDATE,data:{id:e,props:t}});try{"function"===typeof this.updateAllConnections&&this.updateAllConnections(),"function"===typeof this.repaint&&this.repaint()}catch(r){console.warn(r)}return this.dispatchCustomEvent&&this.dispatchCustomEvent("blockUpdated",{id:e,props:t}),!0}catch(r){return console.error("updateBlock: errore updating block",e,r),!1}}undo(){const e=this.undoRedoManager.undo();if(e){switch(e.type){case Z3.CREATE:{const{id:t,element:n}=e.data,r=document.getElementById(t);r&&r.remove();break}case Z3.MOVE:const{id:t,oldPosition:n}=e.data,r=document.getElementById(t);r&&(r.style.left="".concat(n.x,"px"),r.style.top="".concat(n.y,"px"));break;case Z3.MOVE_GROUP:const{groupDragData:o,groupDragStart:a}=e.data;o.forEach((e=>{const t=document.getElementById(e.el.id);t&&(t.style.left="".concat(e.startX,"px"),t.style.top="".concat(e.startY,"px"))}));break;case Z3.DELETE:const{id:i,block:l,element:c,startSocket:s,endSocket:d}=e.data;if(!document.getElementById(i))if("path"===c.tagName){const e=c.cloneNode(!0);e.setAttribute("id",i),this.svgLayer.appendChild(e);const t=document.getElementById(s),n=document.getElementById(d);this.connections.set(i,{id:i,startSocket:t,endSocket:n,pathEl:e})}else{const e=c;e.setAttribute("id",i),this.blocks.set(l.id,l),this.canvas.appendChild(e)}break;case Z3.DELETE_BLOCK_CONNECTED:const{blocks:u,connections:f}=e.data;u.forEach((e=>{const t=e.block_block.element;t.setAttribute("id",e.id),this.blocks.set(e.block_block.id,e.block_block),this.canvas.appendChild(t)})),f.forEach((e=>{const t=document.getElementById(e.startSocket_to_rem),n=document.getElementById(e.endSocket_to_rem);if(t&&n){const r=e.connection_to_rem.cloneNode(!0);r.setAttribute("id",e.connId_to_rem),this.svgLayer.appendChild(r),this.connections.set(e.connId_to_rem,{id:e.connId_to_rem,startSocket:t,endSocket:n,pathEl:r})}}));break;case Z3.CONNECT:const{id:p}=e.data,h=this.svgLayer.querySelector("#".concat(p));null===h||void 0===h||h.remove(),this.connections.delete(p);break;case Z3.INSERTBLOCKINCONNECTION:const{oldConnection:m,newConnections:g}=e.data;g.forEach((e=>{const t=document.getElementById(e.id);t&&this.svgLayer.removeChild(t),this.connections.delete(e.id)}));const v=this._createConnectionPath(m);m.pathEl=v,this.connections.set(m.id,m);break;case Z3.MERGENOTE:{const{noteId:t,noteText:n,targetId:r,previousNote:o,blockNote:a,block:i,oldPosition:l}=e.data,c=this.blocks.get(r);c&&c.setNoteText(void 0);const s=a;a.style.left="".concat(l.x,"px"),a.style.top="".concat(l.y,"px"),s.setAttribute("id",t),this.blocks.set(i.id,i),this.canvas.appendChild(s);break}}this.updateAllConnections(),this.emitUndoRedoState()}}redo(){const e=this.undoRedoManager.redo();if(e){switch(e.type){case Z3.CREATE:const{id:t,element:n}=e.data,r=n.cloneNode(!0);r.setAttribute("id",t),this.canvas.appendChild(r);const o=this.blocks.get(t);o&&(o.element=r,this.namesLocalization(o),"function"===typeof o.setupCustomBehavior&&o.setupCustomBehavior(o.element,o.id));break;case Z3.MOVE:{const{id:t,newPosition:n}=e.data,r=document.getElementById(t);r&&(r.style.left="".concat(n.x,"px"),r.style.top="".concat(n.y,"px"));break}case Z3.MOVE_GROUP:const{groupDragData:a,groupDragStart:i}=e.data;a.forEach((e=>{const t=document.getElementById(e.el.id);t&&(t.style.left="".concat(e.endX,"px"),t.style.top="".concat(e.endY,"px"))}));break;case Z3.DELETE:{const{id:t}=e.data,n=document.getElementById(t);n&&n.remove();break}case Z3.DELETE_BLOCK_CONNECTED:{const{blocks:t,connections:n}=e.data;t.forEach((e=>{const t=document.getElementById(e.id);t&&t.parentElement&&t.parentElement.removeChild(t),this.blocks.delete(e.id)})),n.forEach((e=>{var t,n;const r=null!==(t=e.connId_to_rem)&&void 0!==t?t:"".concat(e.startSocket_to_rem,"_").concat(e.endSocket_to_rem);let o=this.svgLayer.querySelector('[data-undo-conn-id="'.concat(r,'"]'));if(!o){var a;const t=this.connections.get(null!==(a=e.connId_to_rem)&&void 0!==a?a:r);t&&t.pathEl&&(o=t.pathEl)}o&&this.svgLayer.contains(o)&&this.svgLayer.removeChild(o),this.connections.delete(null!==(n=e.connId_to_rem)&&void 0!==n?n:r)}));break}case Z3.CONNECT:{const{id:t,fromSocketId:n,toSocketId:r,element:o}=e.data,a=o.cloneNode(!0);a.setAttribute("id",t),this.svgLayer.appendChild(a);const i=document.getElementById(n),l=document.getElementById(r);this.connections.set(t,{id:t,startSocket:i,endSocket:l,pathEl:a});break}case Z3.INSERTBLOCKINCONNECTION:{const{oldConnection:t,newConnections:n}=e.data,r=document.getElementById(t.id);r&&this.svgLayer.removeChild(r),this.connections.delete(t.id),n.forEach((e=>{const t=this._createConnectionPath(e);e.pathEl=t,this.connections.set(e.id,e)}));break}case Z3.MERGENOTE:{const{noteId:t,noteText:n,targetId:r}=e.data,o=document.getElementById(t);o&&o.remove(),this.blocks.delete(t);const a=this.blocks.get(r);a&&a.setNoteText(n);break}}this.updateAllConnections(),this.emitUndoRedoState()}}emitUndoRedoState(){try{var e,t,n,r;const o=this.undoRedoManager;let a=!1,i=!1;o&&("function"===typeof o.canUndo?a=Boolean(o.canUndo()):Array.isArray(o.undoStack)?a=o.undoStack.length>0:Array.isArray(o._undoStack)&&(a=o._undoStack.length>0),"function"===typeof o.canRedo?i=Boolean(o.canRedo()):Array.isArray(o.redoStack)?i=o.redoStack.length>0:Array.isArray(o._redoStack)&&(i=o._redoStack.length>0));const l={diagramId:null!==(e=this.container&&(this.container.id||(null===(t=(n=this.container).getAttribute)||void 0===t?void 0:t.call(n,"id"))))&&void 0!==e?e:null!==(r=this.id)&&void 0!==r?r:null,canUndo:a,canRedo:i};document.dispatchEvent(new CustomEvent("undoRedoChanged",{detail:l}))}catch(r5){console.warn("emitUndoRedoState failed",r5)}}registerOperation(e){try{var t,n;if(this.undoRedoManager&&"function"===typeof this.registerOperation)this.undoRedoManager.addOperation(e);else null===(t=this.undoRedoManager)||void 0===t||null===(n=t.addOperation)||void 0===n||n.call(t,e)}catch(r5){console.warn("registerOperation: errore registrando operazione",r5)}}alignSelectedBlocks(e){const t=Array.from(this.object_selected).filter((e=>e.classList.contains("costerlogic-block")));if(t.length<2)return;this.dispatchCustomEvent("hasModified");const n=t.map((e=>({element:e,left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})));switch(e){case"top":{const e=n.reduce(((e,t)=>t.top<e.top?t:e),n[0]);n.forEach((t=>t.element.style.top="".concat(e.top,"px")));break}case"bottom":{const e=n.reduce(((e,t)=>t.top+t.height>e.top+e.height?t:e),n[0]),t=e.top+e.height;n.forEach((e=>e.element.style.top="".concat(t-e.height,"px")));break}case"left":{const e=n.reduce(((e,t)=>t.left<e.left?t:e),n[0]);n.forEach((t=>t.element.style.left="".concat(e.left,"px")));break}case"right":{const e=n.reduce(((e,t)=>t.left+t.width>e.left+e.width?t:e),n[0]),t=e.left+e.width;n.forEach((e=>e.element.style.left="".concat(t-e.width,"px")));break}case"vertical-center":{const e=n.reduce(((e,t)=>t.top<e.top?t:e),n[0]),t=n.reduce(((e,t)=>t.top+t.height>e.top+e.height?t:e),n[0]),r=(e.top+(t.top+t.height))/2;n.forEach((e=>e.element.style.top="".concat(r-e.height/2,"px")));break}case"horizontal-center":{const e=n.reduce(((e,t)=>t.left<e.left?t:e),n[0]),t=n.reduce(((e,t)=>t.left+t.width>e.left+e.width?t:e),n[0]),r=(e.left+(t.left+t.width))/2;n.forEach((e=>e.element.style.left="".concat(r-e.width/2,"px")));break}case"horizontal-distribute":{if(n.length<=2)break;const e=n.slice().sort(((e,t)=>e.left-t.left)),t=e[0],r=e[e.length-1],o=e.slice(1,-1),a=t.left+t.width,i=r.left-a,l=o.reduce(((e,t)=>e+t.width),0),c=o.length+1,s=c>0?(i-l)/c:0;let d=a+s;for(const n of o){const e=Math.round(d);n.element.style.left="".concat(e,"px"),d+=n.width+s}break}case"vertical-distribute":{if(n.length<=2)break;const e=n.slice().sort(((e,t)=>e.top-t.top)),t=e[0],r=e[e.length-1],o=e.slice(1,-1),a=t.top+t.height,i=r.top-a,l=o.reduce(((e,t)=>e+t.height),0),c=o.length+1,s=c>0?(i-l)/c:0;let d=a+s;for(const n of o){const e=Math.round(d);n.element.style.top="".concat(e,"px"),d+=n.height+s}break}}n.forEach((e=>{const t=this.blocks.get(e.element.id);t&&(t.xPosition=e.element.offsetLeft,t.yPosition=e.element.offsetTop)})),this.updateAllConnections()}selectAll(){this.blocks.forEach((e=>{const t=e.element;t.classList.add("selected"),this.object_selected.add(t)})),Array.from(this.connections.values()).forEach((e=>{e.pathEl.classList.add("selected"),this.object_selected.add(e.pathEl)}))}groupBlocks(){const e=Array.from(this.canvas.querySelectorAll(".costerlogic-block.selected")).map((e=>e.id));if(e.length<2)return;this.dispatchCustomEvent("hasModified");const t=Array.from(this.connections.values()).filter((t=>{const n=t.startSocket.closest(".costerlogic-block").id,r=t.endSocket.closest(".costerlogic-block").id;return e.includes(n)&&e.includes(r)})),n=e.map((e=>{var n,r;const o=this.blocks.get(e),a=o.socketsIn.map((e=>e.id)),i=o.socketsOut.map((e=>e.id)),l=t.filter((t=>t.startSocket.closest(".costerlogic-block").id===e)).map((e=>({from:e.startSocket.id,to:e.endSocket.id})));return{id:o.id,name:o.name,devName:o.devName,descr:o.descr,type:o.type,category:o.category,x:o.xPosition,y:o.yPosition,numIn:o.numSocketsIn,numOut:o.numSocketsOut,direction:o.direction,uom:o.uom,tags:o.tags,socketInIds:a,socketOutIds:i,connections:l,note:null!==(n=o.note)&&void 0!==n?n:void 0,asNote:!!o.asNote,refId:null!==(r=o.refId)&&void 0!==r?r:void 0}}));this.addBlock("Group","","Gruppo",K3.GROUP_BLOCK,U3.GROUP,50,50,1,1,"rw","",null,{children:n},void 0,["socketInIds"],["socketOutIds"]);e.forEach((e=>{this.removeConnectionsForBlock(e),this.blocks.get(e).element.remove(),this.blocks.delete(e)}))}ungroupBlocks(){const e=Array.from(this.object_selected).filter((e=>e.classList.contains("group-block")));if(0!==e.length){this.dispatchCustomEvent("hasModified");for(const t of e){const e=this.blocks.get(t.id);if(!e)continue;const n=e.getChildrenData();if(!Array.isArray(n)){console.error("ungroupBlocks: childrenData non \xe8 un array",n);continue}this.canvas.removeChild(e.element),this.blocks.delete(e.id),this.registerOperation({type:Z3.UNGROUP,data:{groupId:e.id,childrenData:n}});const r=new Map;for(const t of n){const e=this.addBlock(t.name,t.devName,t.descr,t.type,t.category,t.x,t.y,t.numIn,t.numOut,t.direction,t.uom,t.tags,void 0,t.id,t.socketInIds,t.socketOutIds);r.set(t.id,e);const n=this.blocks.get(e);n&&t.asNote&&t.note&&n.setNoteText(t.note)}this.restoreConnections(n)}}else console.warn("Nessun GroupBlock selezionato da \u201cUngroup\u201d.")}restoreConnections(e){for(const t of e)if(t.connections&&0!==t.connections.length)for(const e of t.connections){const t=document.getElementById(e.from),n=document.getElementById(e.to);if(!t||!n){console.warn("restoreConnections: socket non trovato; from=".concat(e.from,", to=").concat(e.to));continue}const r="conn_".concat(G3()),o=this._createConnectionPath({id:r,startSocket:t,endSocket:n,pathEl:null});this.connections.set(r,{id:r,startSocket:t,endSocket:n,pathEl:o})}}unhookNote(e){const t=this.blocks.get(e);if(!t)return;this.dispatchCustomEvent("hasModified");const n=t.note;if("function"===typeof t.setNoteText)t.setNoteText(void 0);else{const e=t.element.querySelector(".note-icon");e&&e.remove(),t.note=void 0,delete t.asNote}const r=this.addBlock("Nota","","",K3.MISC_BLOCK,U3.NOTES,t.xPosition+10,t.yPosition+60,0,0,"","",null),o=this.blocks.get(r);null===o||void 0===o||o.setNoteText(n)}deleteNote(e){const t=this.blocks.get(e);if(t)if(this.dispatchCustomEvent("hasModified"),"function"===typeof t.setNoteText)t.setNoteText(void 0);else{const e=t.element.querySelector(".note-icon");e&&e.remove(),t.note=void 0,delete t.asNote}}setTemplates(e){this._availableFunctionBlocks=null!==e&&void 0!==e?e:[]}zoom_enter(e){e.ctrlKey&&(e.preventDefault(),e.deltaY>0?this.zoom_out():this.zoom_in())}zoom_refresh(){this.offsetX=this.offsetX/this.zoom_last_value*this.zoom,this.offsetY=this.offsetY/this.zoom_last_value*this.zoom,this.zoom_last_value=this.zoom,this.canvas.style.transform="translate("+this.offsetX+"px, "+this.offsetY+"px) scale("+this.zoom+")"}zoom_in(){this.zoom<this.zoom_max&&(this.zoom+=this.zoom_value,this.zoom_refresh())}zoom_out(){this.zoom>this.zoom_min&&(this.zoom-=this.zoom_value,this.zoom_refresh())}zoom_reset(){1!==this.zoom&&(this.zoom=1,this.zoom_refresh())}clearAll(){try{if(this.connections&&this.connections instanceof Map){for(const[e,t]of Array.from(this.connections.entries()))try{t.pathEl&&t.pathEl.parentElement&&t.pathEl.parentElement.removeChild(t.pathEl)}catch(r5){}this.connections.clear()}else if(this.svgLayer)try{this.svgLayer.querySelectorAll("path.connection, path").forEach((e=>e.remove()))}catch(r5){}}catch(r5){}try{if(this.blocks&&this.blocks instanceof Map){for(const[e,t]of Array.from(this.blocks.entries()))try{if("function"===typeof t.destroy)t.destroy();else try{t.element&&t.element.parentElement&&t.element.parentElement.removeChild(t.element)}catch(r5){}}catch(r5){}this.blocks.clear()}}catch(r5){}try{if(this.undoRedoManager&&"function"===typeof this.undoRedoManager.clear)this.undoRedoManager.clear();else if(this.undoRedoManager){try{this.undoRedoManager.undoStack=[]}catch(r5){}try{this.undoRedoManager.redoStack=[]}catch(r5){}}}catch(r5){}try{this.selectedBlockId=null,this.selectedConnectionId=null,this.isDragging=!1,this.isLinking=!1,this.startSocket=null,this.previewPath=null,this.selectionRect=null}catch(r5){}this.dispatchCustomEvent("hasModified")}dispatchCustomEvent(e,t){const n=new CustomEvent(e,{detail:t});document.dispatchEvent(n)}destroy(){if(!this._destroyed){this._destroyed=!0;try{this.eventManager.unsubscribe("pointerdown",this.handlePointerDown.bind(this)),this.eventManager.unsubscribe("pointermove",this.handlePointerMove.bind(this)),this.eventManager.unsubscribe("pointerup",this.handlePointerUp.bind(this)),this.eventManager.unsubscribe("contextmenu",this.handleContextMenu.bind(this)),this.eventManager.unsubscribe("keydown",this.handleKeyDown.bind(this)),document.removeEventListener("pointerup",(e=>this.handleGlobalDragEnd(e))),this.disposeContextMenuShortcuts()}catch(r5){}try{this.undoRedoManager&&"function"===typeof this.undoRedoManager.clear&&this.undoRedoManager.clear()}catch(r5){}try{this.blocks.clear(),this.connections.clear()}catch(r5){}try{if(this.canvas&&this.canvas.parentNode){try{this.canvas.innerHTML=""}catch(r5){}this.canvas.parentNode.removeChild(this.canvas)}}catch(r5){}this.canvas=new HTMLElement,this.undoRedoManager=new e6(50)}}}r6._clipboard=[];class o6{constructor(){this.diagrams=new Map,this.destroyed=!1}init(){console.info("%c  \n            \u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e                 \n            \u2502 %cCoster %c\u251c\u2500\u2500\u2500\u256e               \n            \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f   \u2502   \u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e   \n                         \u2570\u2500\u2500\u2500\u2524 %cLogic %c\u2502   \n                             \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f  ","color: #2a5195;font-size:1em","color: #8cba37","color: #2a5195","color: #8cba37","color: #2a5195"),console.info("%c \xa92024 by Coster Group ","color: #8cba37;font-size:1em; text-shadow: 4px 4px 9px rgba(21,98,81,0.6);")}addDiagram(e){const t=new r6(e);return this.diagrams.set(t.id,t),t.id}getDiagram(e){return this.diagrams.get(e)}destroy(){this.destroyed||(this.destroyed=!0,this.diagrams.forEach((e=>{try{e.destroy()}catch(r5){console.error(r5)}})),this.diagrams.clear(),this.diagrams=new Map)}}function a6(e){return{costerlogic:e.map((e=>{let{key:t,title:n,instance:r}=e;return{key:t,title:n,blocks:Array.from(r.blocks.values()).map((e=>{var t,n,o,a;const i=e.element,l=Array.from(i.querySelectorAll(".input")),c=Array.from(i.querySelectorAll(".output")),s=l.map((e=>{var t;const n=e.id,o=Array.from(r.connections.values()).filter((e=>{var t;return(null===(t=e.endSocket)||void 0===t?void 0:t.id)===n})).map((e=>e.id)),a=null!==(t=e.dataset.orderId)&&void 0!==t?t:void 0,i={id:n};if(o.length>0){const e=o[0];let t;if(i.link=e,r.connections&&"function"===typeof r.connections.get)try{t=r.connections.get(e)}catch(r5){t=void 0}t||(t=Array.from(r.connections.values()).find((t=>t.id===e)))}if(a)i.orderId=a;else{const e=Array.from(r.connections.values()).find((e=>e.endSocket.id===n&&e.orderId));e&&(i.orderId=e.orderId)}return i})),d=[];c.forEach((e=>{const t=Array.from(r.connections.values()).filter((t=>t&&t.startSocket&&t.startSocket.id===e.id));0===t.length?d.push({id:e.id}):t.forEach((t=>{if(!t||!t.id)return;const n={id:e.id,link:t.id};d.push(n)}))}));const u=new Map;for(const r of d){var f;const e="".concat(r.id,"::").concat(null!==(f=r.link)&&void 0!==f?f:"");u.has(e)||u.set(e,r)}const p=Array.from(u.values()),h=null!==(t=null!==(n=e.xPosition)&&void 0!==n?n:i.offsetLeft)&&void 0!==t?t:0,m=null!==(o=null!==(a=e.yPosition)&&void 0!==a?a:i.offsetTop)&&void 0!==o?o:0;let g,v;if(e.type===K3.MISC_BLOCK){var b;g="function"===typeof e.getText?e.getText():null!==(b=e.note)&&void 0!==b?b:"",g=void 0!==g?String(g):void 0;v=i.querySelector(".costerlogic_action_notes").style.height}else{var y;g=!0===e.asNote||!!e.note?null!==(y=e.note)&&void 0!==y?y:"":void 0}const x=e.refId?{refId:e.refId}:{},w=e.background?{background:e.background}:{};let C;const S=i.querySelector(".const-value");return S&&S.textContent&&""!==S.textContent.trim()&&(C=Number(S.textContent.trim())),{id:e.id,type:e.type,category:e.category,name:e.name,devName:e.devName,descr:e.descr,inputs:s.length?s:[],outputs:p.length?p:[],socketsIn:l.length,socketsOut:c.length,direction:e.direction,uom:e.uom,...void 0!==g?{note:g}:{},...x,maxNumInputs:e.maxNumInputs,...void 0!==C?{constValue:C}:{},gParams:{x:h,y:m,...w,height:v},tags:e.tags}}))}}))}}function i6(e){return e?Array.isArray(e)?e:"object"===typeof e?Object.keys(e).map((t=>e[t])).filter(Boolean):[]:[]}const l6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var c6=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:l6}))};const s6=t.forwardRef(c6);const d6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z"}}]},name:"undo",theme:"outlined"};var u6=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:d6}))};const f6=t.forwardRef(u6);const p6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 176h80v672h-80zm408 0h-64c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8z"}}]},name:"pause",theme:"outlined"};var h6=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:p6}))};const m6=t.forwardRef(h6);const g6={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};var v6=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:g6}))};const b6=t.forwardRef(v6);const y6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"};var x6=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:y6}))};const w6=t.forwardRef(x6),C6=e=>{let{handleDragStart:n,positionMobile:r,handleDrop:o,containerId:a,onTemplatesReady:i,setOpenDrawer:l}=e;const[c,s]=(0,t.useState)([]),{translate:d}=og(),[u,f]=(0,t.useState)(!1),p=(0,t.useRef)(null),h=(0,t.useRef)(null),[m,g]=(0,t.useState)(void 0),[v,b]=(0,t.useState)(!1),[y,x]=mE(((e,t)=>cE(e,t)),[]),[w,C]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{x("/costerlogic/functionblocks",GC()),C(QS,GC())}),[]),(0,t.useEffect)((()=>{if(w.value){w.value.find((e=>"YLC"===e.id&&e.vars.length>0))&&b(!0)}}),[w]),(0,t.useEffect)((()=>{if(y.value&&(Array.isArray(y.value)?s([...y.value]):Array.isArray(y.value.items)?s([...y.value.items]):console.warn("VarFunctionMenu: shape functions inattesa:",y.value)),"function"===typeof i&&y.value){var e,t;const n=Array.isArray(y.value)?y.value:null!==(e=null===(t=y.value)||void 0===t?void 0:t.items)&&void 0!==e?e:[];i(a,n)}}),[y,a,i]),(0,t.useEffect)((()=>{function e(e){if(!u)return;const t=e.target;t&&p.current&&h.current&&!p.current.contains(t)&&!h.current.contains(t)&&f(!1)}function t(e){"Escape"===e.key&&u&&f(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}),[u]);const S={fontSize:12,fontWeight:"bold",background:"#fff"},E=c.length>0?c.map(((e,t)=>(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onTouchEnd:e=>o(e),onTouchMove:e=>r(e),onTouchStart:e=>n(e),onDragStart:e=>n(e),"data-refid":e.id,"data-block-type":e.type,"data-block-category":e.category,"data-title":e.name,"data-description":e.descr,"data-block-maxnumsocketsin":e.maxNumInputs,"data-block-numsocketsin":e.minNumInputs,"data-block-numsocketsout":"1","data-direction":"rw","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:d(e.name)}),(0,ng.jsx)(FD,{})]},t))):null,k=[{key:"1",label:d("variables"),style:S,children:(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"VAR","data-title":"VAR IN","data-block-numsocketsin":"0","data-block-numsocketsout":"1","data-direction":"r","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"VAR IN"}),(0,ng.jsx)(FD,{})]},"var_in"),(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"VAR","data-title":"VAR OUT","data-description":"VAR OUT","data-block-numsocketsin":"1","data-block-numsocketsout":"0","data-direction":"w","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"VAR OUT"}),(0,ng.jsx)(FD,{})]},"var_out"),(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"VIRTUAL","data-title":"VIRTUAL IN","data-block-numsocketsin":"0","data-block-numsocketsout":"1","data-direction":"r","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"Virtual Device Data IN"}),(0,ng.jsx)(FD,{})]},"virtual_in"),(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"VIRTUAL","data-title":"VIRTUAL OUT","data-block-numsocketsin":"1","data-block-numsocketsout":"0","data-direction":"w","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"Virtual Device Data OUT"}),(0,ng.jsx)(FD,{})]},"virtual_out"),(0,ng.jsx)(Hd,{title:v?null:d("ylcVarNotFound"),children:(0,ng.jsxs)("div",{className:v?"drag-block":"drag-block diseable",draggable:v,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"EXT","data-title":"EXT IN","data-block-numsocketsin":"0","data-block-numsocketsout":"1","data-direction":"r","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"EXT IN"}),(0,ng.jsx)(FD,{})]},"ext_in")}),(0,ng.jsx)(Hd,{title:v?null:d("ylcVarNotFound"),children:(0,ng.jsxs)("div",{className:v?"drag-block":"drag-block diseable",draggable:v,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"EXT","data-title":"EXT OUT","data-block-numsocketsin":"1","data-block-numsocketsout":"0","data-direction":"w","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"EXT OUT"}),(0,ng.jsx)(FD,{})]},"ext_out")}),(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"EXPOSED","data-title":"EXPOSED IN","data-description":"EXPOSED IN","data-block-numsocketsin":"0","data-block-numsocketsout":"1","data-direction":"r","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"Exposed VAR IN"}),(0,ng.jsx)(FD,{})]},"exposed_in"),(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"EXPOSED","data-title":"EXPOSED OUT","data-description":"EXPOSED OUT","data-block-numsocketsin":"1","data-block-numsocketsout":"0","data-direction":"w","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"Exposed VAR OUT"}),(0,ng.jsx)(FD,{})]},"exposed_out")]})},{key:"2",label:d("constants"),style:S,children:(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onDragStart:e=>n(e),"data-block-type":"VAR_BLOCK","data-block-category":"CONST","data-title":"constant","data-block-numsocketsin":"0","data-block-numsocketsout":"1","data-direction":"r","data-uom":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:d("constant")}),(0,ng.jsx)(FD,{})]},"const_1")})},{key:"3",label:d("functions"),style:S,children:E&&E.length>0?(0,ng.jsx)("div",{style:{display:"grid",gap:6},children:E}):(0,ng.jsx)(ng.Fragment,{})},{key:"4",label:d("misc"),style:S,children:(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)("div",{className:"drag-block",draggable:!0,onTouchEnd:e=>o(e),onTouchMove:e=>r(e),onTouchStart:e=>n(e),onDragStart:e=>n(e),"data-block-type":"MISC_BLOCK","data-block-category":"NOTES","data-title":"Notes","data-block-numsocketsin":"0","data-block-numsocketsout":"0","data-funct":"",style:{padding:"6px 8px",display:"flex",alignItems:"center",gap:8},children:[(0,ng.jsx)("span",{style:{fontWeight:600},children:"Notes"}),(0,ng.jsx)(FD,{})]})})}];(0,t.useEffect)((()=>{g(void 0)}),[u]);return(0,ng.jsxs)("div",{className:"newMenu ".concat(u?"open":""),ref:p,children:[(0,ng.jsx)("span",{ref:h,onClick:()=>{f((e=>!e)),l(!1)},role:"button",tabIndex:0,"aria-pressed":u,className:"newMenu-button ".concat(u?"open":""),"aria-expanded":u,children:(0,ng.jsx)(Hg,{className:"newMenu-button-icon"})}),(0,ng.jsx)("div",{className:"newMenu-panel ".concat(u?"open":""),"aria-hidden":!u,children:(0,ng.jsx)(BK,{accordion:!0,activeKey:m,onChange:e=>{g(e)},bordered:!1,size:"small",items:k,style:{userSelect:"none",width:"100%"}})})]})};function S6(e){return e?Array.isArray(e)?e:"object"===typeof e?"id"in e||"value"in e||"link"in e?[e]:Object.keys(e).map((t=>e[t])).filter(Boolean):[]:[]}function E6(e){const t=null!==e&&void 0!==e?e:document;Array.from(t.querySelectorAll(".coster-result-socket-label")).forEach((e=>e.remove()));Array.from(t.querySelectorAll(".coster-result-external-label")).forEach((e=>e.remove()))}const k6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var j6=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:k6}))};const I6=t.forwardRef(j6);const T6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 112H724V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H500V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H320c-17.7 0-32 14.3-32 32v120h-96c-17.7 0-32 14.3-32 32v632c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32v-96h96c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM664 888H232V336h218v174c0 22.1 17.9 40 40 40h174v338zm0-402H514V336h.2L664 485.8v.2zm128 274h-56V456L544 264H360v-80h68v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h152v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h68v576z"}}]},name:"snippets",theme:"outlined"};var A6=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:T6}))};const O6=t.forwardRef(A6),N6=e=>{let{setOpen:n,open:r,virtualDeviceVar:o,ylcVarType:a,blockId:i,blockType:l,blockCategory:c,blockDirection:s,instance:d}=e;const{translate:u}=og(),[f,p]=(0,t.useState)(void 0),[h,m]=(0,t.useState)(void 0),[g,v]=(0,t.useState)(void 0),[b,y]=(0,t.useState)(void 0),[x,w]=(0,t.useState)("-"),[C,S]=(0,t.useState)(""),[E,k]=(0,t.useState)(0),[j,I]=(0,t.useState)([]),[T,A]=(0,t.useState)(void 0),[O,N]=(0,t.useState)(void 0),[R,P]=(0,t.useState)(void 0),[M,D]=(0,t.useState)([]),[L,_]=(0,t.useState)(""),[z,B]=(0,t.useState)(),[F,H]=(0,t.useState)(!1),[W,V]=(0,t.useState)(""),[U,K]=(0,t.useState)(-1),[G,q]=(0,t.useState)(""),X=(0,t.useRef)(null),Y=(0,t.useRef)(null),[$,J]=mE(((e,t,n)=>cE(e,t,n)),[]),[Q,Z]=mE(((e,t)=>cE(e,t)),[]),[ee,te]=mE(((e,t)=>cE(e,t)),[]);(0,t.useEffect)((()=>{r&&(J(eE,GC(),!1),Z(nE,GC()),te("/vvdev/unit",GC()))}),[r]),(0,t.useEffect)((()=>{$.value&&I($.value),ee.value&&B(ee.value)}),[$,Q,ee]);const ne=(0,t.useMemo)((()=>{var e,t;return null!==(e=null===j||void 0===j||null===(t=j[0])||void 0===t?void 0:t.vars)&&void 0!==e?e:[]}),[j]),re=ne.map((e=>({value:e.refId,label:e.descr,meta:e}))),oe=(0,t.useMemo)((()=>{var e;return[...null!==(e=null===z||void 0===z?void 0:z.units)&&void 0!==e?e:[]].sort(((e,t)=>{var n,r;return u(null!==(n=e.descr)&&void 0!==n?n:"").localeCompare(u(null!==(r=t.descr)&&void 0!==r?r:""),"it",{sensitivity:"base"})})).map(((e,t)=>{var n;const r=(null!==(n=e.symbol)&&void 0!==n?n:"__sym_".concat(t)).toString(),o=e.id?String(e.id):"".concat(r,"-").concat(t);return{label:"".concat(u(e.descr)).concat("-"!==e.symbol?" [".concat(e.symbol,"]"):""),value:e.symbol,key:o}}))}),[z,u]),ae=e=>"rw"===e?new Set(["r","w","rw"]):"r"===e?new Set(["r","rw"]):"w"===e?new Set(["w","rw"]):new Set([e]),ie=(0,t.useMemo)((()=>{const e=ae(s);return o.filter((t=>t.vars.some((t=>e.has(t.direction))))).map((e=>({value:e.id,label:e.descr,meta:e})))}),[o,s]),le=(0,t.useMemo)((()=>"VIRTUAL"===c?ie.filter((e=>"YLC"!==e.value&&"Internal"!==e.value)):ie),[ie,c]),ce=(0,t.useMemo)((()=>{var e,t;return null!==(e=null===(t=o.find((e=>e.id===f)))||void 0===t?void 0:t.vars)&&void 0!==e?e:[]}),[o,f]),se=(0,t.useMemo)((()=>{var e,t;return null!==(e=null===(t=o.find((e=>"YLC"===e.id)))||void 0===t?void 0:t.vars)&&void 0!==e?e:[]}),[o]),de=(0,t.useMemo)((()=>{const e=ae(s);return ce.filter((t=>e.has(t.direction))).map((e=>({value:e.refId,label:e.descr,meta:e})))}),[ce,s]),ue=(0,t.useMemo)((()=>{const e=ae(s);return se.filter((t=>e.has(t.direction))).map((e=>({value:e.refId,label:e.descr,meta:e})))}),[se,s]),fe=(0,t.useMemo)((()=>a.map((e=>({value:e.type,label:u(e.type),meta:e})))),[a]);(0,t.useEffect)((()=>{var e,t,n,a,l,s,u,f,h,g,b,C,E,j,I,T,O,R,M,L;if(!r)return;if(!i||!d)return;let _;try{var z;_=null!==d&&void 0!==d&&null!==(z=d.blocks)&&void 0!==z&&z.get?d.blocks.get(i):d.getBlock?d.getBlock(i):void 0}catch(r5){_=void 0}if(!_&&"function"===typeof(null===d||void 0===d?void 0:d.getBlock))try{_=d.getBlock(i)}catch(r5){}const B=null===(e=_)||void 0===e?void 0:e.refId,F=null!==(t=null===(n=_)||void 0===n?void 0:n.devName)&&void 0!==t?t:null!==(a=null===(l=_)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.devName)&&void 0!==a?a:void 0,H=null!==(u=null!==(f=null===(h=_)||void 0===h?void 0:h.descr)&&void 0!==f?f:null===(g=_)||void 0===g?void 0:g.name)&&void 0!==u?u:null!==(b=null===(C=_)||void 0===C||null===(E=C.data)||void 0===E?void 0:E.descr)&&void 0!==b?b:void 0,W=null!==(j=null!==(I=null===(T=_)||void 0===T?void 0:T.constValue)&&void 0!==I?I:null===(O=_)||void 0===O||null===(R=O.data)||void 0===R?void 0:R.constValue)&&void 0!==j?j:void 0,V=(null===(M=_)||void 0===M?void 0:M.uom)||x,U=null===(L=_)||void 0===L?void 0:L.tags,K=(G=U,Array.isArray(G)?G:null==G?[]:String(G).trim().split(/\s+/).filter(Boolean));var G;if(P(B),console.log("varUomFromBlock",V),S("string"===typeof H?H:""),w(V),D(K),"CONST"===c&&k(null!==W&&void 0!==W?W:0),B){const e=o.find((e=>e.vars.some((e=>e.refId===B))));if(e){p(e.id),m(e.descr);const t=e.vars.find((e=>e.refId===B));t?(v(t.refId),y(t.descr)):(v(void 0),y(void 0))}else{const e=ne.find((e=>e.refId===B));e?(A(e.refId),N(e.descr),p(void 0),m(void 0),v(void 0),y(void 0),w("\xb0C")):(v(B),y(void 0),p(void 0),m(void 0),A(void 0),N(void 0))}}else if(F){const e=o.find((e=>e.descr===F));e?(p(e.id),m(e.descr)):(p(void 0),m(void 0)),v(void 0),y(void 0),A(void 0)}else p(void 0),m(void 0),v(void 0),y(void 0),w("EXT"===c?"temperature":"-"),A(void 0)}),[r,i,d,o,l,ne]),(0,t.useEffect)((()=>{if(r&&"EXT"===c){const e=o.find((e=>"YLC"===e.id));e&&(p("YLC"),m(e.descr),g&&!e.vars.some((e=>e.refId===g))&&(v(void 0),y(void 0)))}}),[r,c,o,g]),(0,t.useEffect)((()=>{if(!f){if("EXT"===c||"EXTERNAL"===c)return;return v(void 0),void y(void 0)}g&&!ce.some((e=>e.refId===g))&&(v(void 0),y(void 0))}),[f,ce,g,c]),(0,t.useEffect)((()=>()=>{"undefined"!==typeof window&&window.localStorage&&localStorage.removeItem("tags_clipboard_value")}),[]);const pe=(0,t.useMemo)((()=>{if(ne.find((e=>e.refId===R)))return!1;return!!ne.find((e=>e.descr===C))}),[C]),he=()=>{const e=(null!==W&&void 0!==W?W:"").trim();if(e.length>0){const t=(null!==M&&void 0!==M?M:"").filter(Boolean);t.includes(e)||D([...t,e])}H(!1),V("")},me=e=>{q(e.target.value)},ge=()=>{const e=[...M];e[U]=G,D(e),K(-1),q("")},ve={width:64,height:22,marginInlineEnd:8,verticalAlign:"top"},be=e=>{e.stopPropagation()};return(0,ng.jsx)(wT,{title:"VAR"===c||"EXT"===c||"VIRTUAL"===c?u("editVar"):"CONST"===c?u("editConst"):"MATH"===c?u("editFunct"):"EXPOSED"===c?u("exposedVar"):null,placement:"right",size:"default",onClose:()=>{n(!1)},closable:!1,open:r,getContainer:!1,mask:!1,style:{userSelect:"auto"},extra:(0,ng.jsx)(hc,{children:(0,ng.jsx)(ac,{disabled:("VAR"===c&&"w"===s||"EXPOSED"===c)&&(pe||0===C.length||/^\s+|\s+$/g.test(C)),type:"primary",onClick:()=>(async()=>{const e={refId:void 0,name:void 0,devName:void 0,descr:null!==C&&void 0!==C?C:void 0,uom:null!==x&&void 0!==x?x:"-",value:null!==E&&void 0!==E?E:null,category:c};if("VAR"===c&&"r"===s&&T)e.refId=T,e.name=null!==O&&void 0!==O?O:b,e.devName="INTERNAL",e.descr=null!==O&&void 0!==O?O:C;else if("VAR"!==c||"w"!==s||T)if("VAR"===c&&"w"===s&&T){e.refId=T,e.name=null!==O&&void 0!==O?O:b,e.devName="INTERNAL",e.descr=C;const t={refId:e.refId,descr:C,uom:"other",direction:"rw",type:null};try{await dE(eE,JSON.stringify({var:t}),GC(),T),d.dispatchCustomEvent("allVarOutDescr",{id:i,payload:e})}catch(a){console.error(u(a.message))}}else"EXPOSED"===c?(e.refId=g?T:"exposed_".concat(G3()),e.name=null!==b&&void 0!==b?b:void 0,e.devName=null!==h&&void 0!==h?h:void 0,e.tags=Array.isArray(M)&&M.length>0?M.join(" "):null):(e.refId=null!==g&&void 0!==g?g:null,e.name=null!==b&&void 0!==b?b:void 0,e.devName=null!==h&&void 0!==h?h:void 0);else{const t="internal_".concat(G3());e.refId=t,e.name=null!==O&&void 0!==O?O:b,e.devName="INTERNAL",e.descr=C;const n={refId:t,descr:C,uom:"other",direction:"rw",type:null};try{await sE(eE,JSON.stringify({var:n}),GC())}catch(a){console.error(u(a.message))}}"CONST"===c&&(e.value=E);try{var t;if("function"===typeof(null===d||void 0===d?void 0:d.updateBlock))d.updateBlock(i,e);else{var r;const t=null!==d&&void 0!==d&&null!==(r=d.blocks)&&void 0!==r&&r.get?d.blocks.get(i):void 0;t&&(void 0!==e.refId&&(t.refId=e.refId),void 0!==e.devName&&(t.devName=e.devName),void 0!==e.name&&(t.name=e.name),void 0!==e.descr&&(t.descr=e.descr),void 0!==e.value&&(t.value=e.value),void 0!==e.uom&&(t.uom=e.uom),void 0!==e.tags&&(t.tags=e.tags))}const a=null===(t=d.blocks)||void 0===t?void 0:t.get(i);var o;if(a)if("function"===typeof a.updateRefId)a.updateRefId(null!==(o=e.refId)&&void 0!==o?o:null);else if("function"===typeof a.setParametrized)a.setParametrized(Boolean(e.refId));else{const t=document.getElementById(i);t&&(e.refId?t.classList.add("parametrized"):t.classList.remove("parametrized"))}"function"===typeof d.dispatchCustomEvent&&d.dispatchCustomEvent("blockUpdated",{id:i,payload:e}),n(!1),d.dispatchCustomEvent("hasModified")}catch(l){n(!1),console.warn("onBlockUpd: update fallita",l)}})(),children:u("save")})}),children:(0,ng.jsx)("div",{style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",userSelect:"auto"},onKeyDownCapture:be,onCopyCapture:be,onPasteCapture:be,onCutCapture:be,children:(0,ng.jsx)(hc,{direction:"vertical",children:"EXT"===c||"VIRTUAL"===c?(0,ng.jsxs)(ng.Fragment,{children:["VIRTUAL"===c&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{children:u("device")}),(0,ng.jsx)(HO,{showSearch:!0,placeholder:u("selDevice"),options:le,value:f,onChange:(e,t)=>((e,t)=>{var n;const r=t&&t.label||(null===(n=o.find((t=>t.id===e)))||void 0===n?void 0:n.descr)||"";p(e),m(r),v(void 0),y(void 0),A(void 0),N(void 0)})(String(e),t),filterOption:(e,t)=>{var n;return String(null!==(n=null===t||void 0===t?void 0:t.label)&&void 0!==n?n:"").toLowerCase().includes(e.toLowerCase())},style:{width:300}})]}),(0,ng.jsx)("span",{children:u("variable")}),(0,ng.jsx)(HO,{showSearch:!0,placeholder:u("selVar"),options:"EXT"===c?ue:de,value:g,onChange:(e,t)=>((e,t)=>{var n,r,o,a;const i=(t&&(null!==(n=t.label)&&void 0!==n?n:t.children)?null!==(r=t.label)&&void 0!==r?r:t.children:void 0)||(null===(o=ce.find((t=>t.refId===e)))||void 0===o?void 0:o.descr)||(null===(a=se.find((t=>t.refId===e)))||void 0===a?void 0:a.descr)||"";v(String(e)),y(i)})(String(e),t),disabled:"VIRTUAL"===c&&!f,style:{width:300,userSelect:"none"},filterOption:(e,t)=>{var n;return String(null!==(n=null===t||void 0===t?void 0:t.label)&&void 0!==n?n:"").toLowerCase().includes(e.toLowerCase())}}),(0,ng.jsx)("span",{children:u("description")}),(0,ng.jsx)(Aj,{placeholder:u("descrVar"),style:{width:300,userSelect:"text"},value:C,onChange:e=>S(e.target.value),draggable:!1,onDragStart:e=>e.preventDefault(),maxLength:32}),"EXT"===c&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{children:u("varType")}),(0,ng.jsx)(HO,{placeholder:u("typeVar"),options:fe,value:x,onChange:e=>w(e),style:{width:300}})]})]}):"VAR"===c&&"r"===s?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{children:u("variable")}),(0,ng.jsx)(HO,{showSearch:!0,placeholder:u("selVar"),options:re,value:T,onChange:(e,t)=>((e,t)=>{var n,r,o;const a=ne.find((t=>t.refId===e));A(e),N(null!==(n=null!==(r=null===a||void 0===a?void 0:a.descr)&&void 0!==r?r:t&&t.label)&&void 0!==n?n:""),p(void 0),m(void 0),v(void 0),y(void 0),w(null!==(o=null===a||void 0===a?void 0:a.uom)&&void 0!==o?o:"\xb0C")})(String(e),t),style:{width:300,marginBottom:8},allowClear:!0,filterOption:(e,t)=>{var n;return String(null!==(n=null===t||void 0===t?void 0:t.label)&&void 0!==n?n:"").toLowerCase().includes(e.toLowerCase())}})]}):"VAR"===c&&"w"===s?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{children:u("description")}),(0,ng.jsx)(Aj,{placeholder:u("descrVar"),style:{width:300,userSelect:"text"},value:C,onChange:e=>S(e.target.value),draggable:!1,onDragStart:e=>e.preventDefault(),status:pe?"error":void 0,maxLength:32}),pe&&(0,ng.jsx)("div",{id:"descr-error",style:{color:"red",marginTop:6,fontSize:13},children:u("varAlreadyExist")})]}):"CONST"===c?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{children:u("value")}),(0,ng.jsx)(xN,{style:{width:200,marginBottom:12,userSelect:"text"},value:E,controls:!1,onChange:e=>k(null!==e&&void 0!==e?e:0),draggable:!1,onDragStart:e=>e.preventDefault()}),(0,ng.jsx)("div",{})]}):"MATH"===c?(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsxs)("span",{children:[u("functionType")," ",(0,ng.jsx)("strong",{children:c})]}),(0,ng.jsx)("div",{})]}):"EXPOSED"===c?(0,ng.jsx)(ng.Fragment,{children:(0,ng.jsxs)(hc,{direction:"vertical",children:[(0,ng.jsx)("span",{children:u("uom")}),(0,ng.jsx)(HO,{style:{width:300,marginBottom:8},options:oe,onChange:e=>w(String(e)),value:x}),(0,ng.jsx)("span",{children:u("description")}),(0,ng.jsx)(Aj,{placeholder:u("descrVar"),style:{width:300,userSelect:"text"},value:C,onChange:e=>S(e.target.value),draggable:!1,onDragStart:e=>e.preventDefault(),status:pe?"error":void 0,maxLength:32}),pe&&(0,ng.jsx)("div",{id:"descr-error",style:{color:"red",marginTop:6,fontSize:13},children:u("varAlreadyExist")}),(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("span",{children:"TAG"}),(0,ng.jsx)(NH,{style:{background:"unset",width:"300px",minHeight:32,flexWrap:"wrap",gap:"4px 0",border:"1px solid #d9d9d9",borderRadius:"6px",padding:"4px"},children:M.length>0?M.map(((e,t)=>{if(U===t)return(0,ng.jsx)(Aj,{ref:Y,size:"small",style:ve,value:G,onChange:me,onBlur:ge,onPressEnter:ge},e);const n=e.length>20,r=(0,ng.jsx)(xK,{closable:!0,style:{userSelect:"none"},onClose:()=>(e=>{const t=M.filter((t=>t!==e));console.log(t.length),t.length>0?D(t):D([])})(e),children:(0,ng.jsx)("span",{onDoubleClick:n=>{K(t),q(e),n.preventDefault()},children:n?"".concat(e.slice(0,20),"..."):e})},e);return n?(0,ng.jsx)(Hd,{title:e,children:r},e):r})):null})]}),F?(0,ng.jsx)(Aj,{ref:X,type:"text",size:"small",style:ve,value:W,onChange:e=>{V(e.target.value)},onBlur:he,onPressEnter:he}):(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(Hd,{title:u("addNewTag"),children:(0,ng.jsx)(ac,{size:"small",icon:(0,ng.jsx)(Hg,{}),onClick:()=>{H(!0)}})}),(0,ng.jsx)(Hd,{title:u("copyTags"),children:(0,ng.jsx)(ac,{disabled:0===M.length,size:"small",icon:(0,ng.jsx)(I6,{}),onClick:()=>{return e="tags_clipboard_value",void("undefined"!==typeof window&&window.localStorage&&localStorage.setItem(e,(null!==M&&void 0!==M?M:[]).join(" ")));var e}})}),(0,ng.jsx)(Hd,{title:u("pasteTags"),children:(0,ng.jsx)(ac,{disabled:!(e=>{try{return!!localStorage.getItem(e)}catch(r5){return!1}})("tags_clipboard_value"),size:"small",icon:(0,ng.jsx)(O6,{}),onClick:()=>(e=>{try{if("undefined"===typeof window||!window.localStorage)return;const t=localStorage.getItem(e);if(!t)return;const n=t.split(/[\s,]+/).map((e=>e.trim())).filter(Boolean);if(0===n.length)return;D((e=>{const t=[...Array.isArray(e)?e:[]];for(const r of n)t.includes(r)||t.push(r);return t}))}catch(r5){console.warn("handleTagsPaste: cannot read from localStorage",r5)}})("tags_clipboard_value")})}),(0,ng.jsx)(Hd,{title:u("delAllTags"),children:(0,ng.jsx)(ac,{disabled:0===M.length,size:"small",icon:(0,ng.jsx)(zg,{}),onClick:()=>{D([])}})})]})]})}):null})})})},R6={width:"100%",borderCollapse:"collapse"},P6={borderBottom:"1px solid silver",borderCollapse:"collapse",padding:"5px",width:"200px"},M6=e=>{let{open:n,vars:r,translate:o,onCancel:a,onSave:i}=e;const[l,c]=(0,t.useState)({}),[s,d]=(0,t.useState)({});(0,t.useEffect)((()=>{if(!n)return;const e={};r.forEach((t=>{const n=null===t.address||void 0===t.address||""===t.address?null:Number(t.address);e[t.id]=Number.isNaN(n)?null:n})),d(e),c(e)}),[n,r]);const u=e=>r.filter((t=>t.direction===e)),f=e=>{const t=l[e.id];if(void 0!==t)return t;const n=null===e.address||void 0===e.address||""===e.address?null:Number(e.address);return Number.isNaN(n)?null:n},p=(e,t)=>{const n=f(t);if(null===n||Number.isNaN(n))return"error";if(n%2!==0)return"error";const r=(e=>{const t=new Map;e.forEach((e=>{var n;const r=f(e);null===r||Number.isNaN(r)||t.set(r,(null!==(n=t.get(r))&&void 0!==n?n:0)+1)}));const n=new Set;return t.forEach(((e,t)=>{e>1&&n.add(t)})),n})(e);return r.has(n)?"error":void 0},h=(0,t.useMemo)((()=>u("r")),[r,l]),m=(0,t.useMemo)((()=>u("w")),[r,l]),g=(0,t.useMemo)((()=>h.some((e=>"error"===p(h,e)))||m.some((e=>"error"===p(m,e)))),[h,m,l]),v=(0,t.useMemo)((()=>r.filter((e=>{const t=f(e),n=s[e.id];return null!==t&&t!==n})).map((e=>({id:e.id,address:String(f(e))})))),[r,l,s]),b=(e,t)=>{const n="r"===e?h:m;return(0,ng.jsxs)("table",{style:R6,children:[(0,ng.jsx)("thead",{style:{background:"lightGray"},children:(0,ng.jsxs)("tr",{children:[(0,ng.jsx)("th",{style:P6,children:o("description")}),(0,ng.jsx)("th",{style:P6,children:"".concat(o("address")," (").concat(t,")")})]})}),(0,ng.jsx)("tbody",{children:n.map((e=>(0,ng.jsxs)("tr",{children:[(0,ng.jsx)("td",{style:P6,children:(0,ng.jsx)("span",{children:e.name})}),(0,ng.jsx)("td",{style:P6,children:(0,ng.jsx)(xN,{style:{width:100},value:f(e),min:0,max:65535,step:2,controls:!0,status:p(n,e),onChange:t=>{c((n=>({...n,[e.id]:null===t?null:Number(t)})))},onStep:(t,n)=>{const r=f(e);if(null===r||void 0===r||Number.isNaN(r))return;let o=r;o=r%2!==0?"up"===n.type?r+1:r-1:"up"===n.type?r+2:r-2,o<0&&(o=0),c((t=>({...t,[e.id]:o})))}})})]},e.id)))})]})};return(0,ng.jsx)(UC,{open:n,width:600,title:(0,ng.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,ng.jsx)("span",{style:{textAlign:"center",width:"100%"},children:o("expoVarList")})}),onOk:async()=>{g||await i({vars:v})},onCancel:a,okText:"Ok",cancelText:o("cancel"),okButtonProps:{disabled:g||0===v.length},footer:(e,t)=>{let{OkBtn:n,CancelBtn:r}=t;return(0,ng.jsx)("div",{children:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(r,{}),(0,ng.jsx)(n,{})]})})},children:(0,ng.jsx)("div",{style:{marginTop:10},children:(0,ng.jsx)(Mv,{defaultActiveKey:"1",type:"card",size:"small",items:[{key:"1",label:"Input",children:b("r","Holding registers")},{key:"2",label:"Output",children:b("w","Input registers")}],tabBarExtraContent:(0,ng.jsx)("span",{style:{textDecoration:"underline",fontSize:12},children:"Modbus Slave address: 252"})})})})};var D6=function(e){return e.OK="0",e.DUPLICATEVARBLOCK="1",e}(D6||{});const L6=()=>{const e=(0,t.useRef)({}),[n,r]=(0,t.useState)([]),[o,a]=(0,t.useState)(""),[i,l]=(0,t.useState)(""),[c,s]=(0,t.useState)(null),[d,u]=(0,t.useState)([]),[f,p]=(0,t.useState)(""),[h,m]=(0,t.useState)(""),[g,v]=(0,t.useState)(""),[b,y]=(0,t.useState)("rw"),[x,w]=(0,t.useState)(!1),[C,S]=(0,t.useState)(!1),[E,k]=(0,t.useState)(!1),[j,I]=(0,t.useState)(null),[T,A]=(0,t.useState)(""),{translate:O}=og(),[N,R]=(0,t.useState)(!1),[P,M]=(0,t.useState)(),[D,L]=(0,t.useState)([]),[_,z]=(0,t.useState)([]),[B,F]=(0,t.useState)(!1),[H,W]=(0,t.useState)(!1),[V,U]=(0,t.useState)(null),[K,G]=(0,t.useState)(!1),[q,X]=(0,t.useState)(!1),[Y,$]=(0,t.useState)(!1),J=(0,t.useRef)(new o6),Q=((0,t.useRef)(null),(0,t.useRef)(null)),Z=(0,t.useRef)(null),ee=(0,t.useRef)(!1),te=(0,t.useRef)({}),ne=(0,t.useRef)({}),re=(0,t.useRef)(),oe=(0,t.useRef)(null),[ae,ie]=(0,t.useState)(""),[le,ce]=(0,t.useState)(""),[se,de]=(0,t.useState)(),[ue,fe]=(0,t.useState)([]),[pe,he]=(0,t.useState)([]),[me,ge]=(0,t.useState)(!1),[ve,be]=(0,t.useState)([]),[ye,xe]=(0,t.useState)(!1),[we,Ce]=(0,t.useState)({blocks:{blockId:"",blockRefId:"",isParametrized:!1},otherIds:""}),[Se,Ee]=mE(((e,t,n)=>cE(e,t,n)),[]),[ke,je]=mE(((e,t)=>cE(e,t)),[]),[Ie,Te]=mE(((e,t)=>cE(e,t)),[]),[Ae,Oe]=mE(((e,t,n)=>cE(e,t,n)),[]);function Ne(e,t){const o=e&&"firstRun"!==e?e:"tab_".concat(G3()),i=t||"Diagram ".concat(n.length+1);r((e=>[...e,{key:o,title:i}])),a(o),"firstRun"!==e&&(w(!1),F(!0),W(!0))}function Re(){Oe("/costerlogic/keepalive",GC(),!1)}function Pe(){Re(),null!==oe.current&&clearInterval(oe.current),oe.current=window.setInterval(Re,6e4)}(0,t.useEffect)((()=>()=>{try{var e,t;null===(e=(t=J.current).destroy)||void 0===e||e.call(t)}catch(r5){}}),[]),(0,t.useEffect)((()=>{je(QS,GC()),Te("/costerlogic/ylcvartypes",GC())}),[]),(0,t.useEffect)((()=>{if(ke.value){ke.value.find((e=>"YLC"===e.id&&e.vars.length>0))&&xe(!0),Array.isArray(ke.value)?L([...ke.value]):Array.isArray(ke.value.costerlogic)?L([...ke.value.costerlogic]):console.warn("VarFunctionMenu: shape devices inattesa:",ke.value)}Ie.value&&(Array.isArray(Ie.value)?z([...Ie.value]):Array.isArray(Ie.value.costerlogic)?z([...Ie.value.costerlogic]):console.warn("VarFunctionMenu: shape devices inattesa:",Ie.value))}),[ke,Ie]),(0,t.useEffect)((()=>{J.current.init(),(async()=>{try{const e=await cE(ZS,GC(),!1),t=await cE(nE,GC(),!1);if(e&&void 0!==e.costerlogic){const n=e.costerlogic.map((e=>({key:e.key,title:e.title})));r(n),Q.current=e,t&&(Z.current=t,t.vars.length>0&&$(!0)),n.length>0&&a(n[0].key)}else Ne("firstRun")}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(O(e.message))}})()}),[]),(0,t.useEffect)((()=>{n.forEach((t=>{let{key:n}=t;const r="costerlogic-".concat(n);if(e.current[r])return;const o=te.current[r];if(!o)return;const a=J.current.addDiagram(o),i=J.current.getDiagram(a);if(i&&"function"===typeof i.setTranslate)try{i.setTranslate(O)}catch(r5){console.warn("setTranslate on diagram failed",r5)}e.current[r]=i;const l=ne.current[r];if(l&&i&&"function"===typeof i.setTemplates)try{i.setTemplates(l.funcs),delete ne.current[r]}catch(r5){console.error("Errore settando templates pendenti su",r,r5)}})),Q.current&&!ee.current&&setTimeout((()=>{try{const t=[];Object.keys(e.current).forEach((n=>{const r=e.current[n];if(!r)return;const o=r.undoRedoManager;if(o)if("function"===typeof o.suspend)try{o.suspend()}catch(r5){}else if("function"===typeof o.addOperation){t.push({manager:o,originalAddOp:o.addOperation.bind(o),instKey:n});try{o.addOperation=()=>{}}catch(r5){}}}));const n=function(e,t,n){if(!e)return console.warn("importDiagrams: payload vuoto"),{};function r(e){return e||0===e?Array.isArray(e)?e.filter(Boolean).map(String):"string"===typeof e?e?[e]:[]:"object"===typeof e?Object.keys(e).map((t=>e[t])).filter(Boolean).map(String):[]:[]}const o=Array.isArray(e)?e:Array.isArray(e.costerlogic)?e.costerlogic:[],a={};console.log("payload",e),console.log("createdByTab",a);for(const D of o){var i,l;const e=null!==(i=D.key)&&void 0!==i?i:"tab_".concat(G3()),t=null!==(l=D.title)&&void 0!==l?l:e,o=null!==n&&void 0!==n&&n.createDiagram?n.createDiagram(e,t):void 0;if(!o){console.warn("importDiagrams: nessuna diagram instance fornita per tab ".concat(e,". Salto."));continue}const P=Array.isArray(D.blocks)?D.blocks:[],L=new Map;for(const n of P){const e=i6(n.inputs);for(const t of e){const e=r(t.link);for(const n of e)"string"===typeof n&&L.set(n,t.id)}}const _=new Map;for(const n of P){const e=i6(n.outputs);for(const t of e){const e=r(t.link);for(const n of e)"string"===typeof n&&_.set(n,t.id)}}const z=new Map;for(const n of P){const e=i6(n.inputs);for(const t of e){var c,s;const e=r(t.link),n=null!==(c=null!==(s=t.orderId)&&void 0!==s?s:t.datasetOrder)&&void 0!==c?c:void 0;for(const t of e)"string"===typeof t&&n&&z.set(t,String(n))}}a[e]=[];for(const n of P){const t=i6(n.inputs).map((e=>e.id)).filter(Boolean),r=i6(n.outputs).map((e=>e.id)).filter(Boolean),i=t.length,l=r.length;console.log("blocks",P),console.log("b.tags",n.tags);try{var d,u,f,p;const c=o.addBlock(n.name,n.devName,n.descr,n.type,n.category,Number(n.gParams.x),Number(n.gParams.y),i,l,n.direction,n.uom,n.tags,void 0,n.id,t.length?t:void 0,r.length?r:void 0,n.refId,n.maxNumInputs),s=null!==(d=n.id)&&void 0!==d?d:c;if(n.constValue&&n.constValue.toString().trim()){var h,m,g;const e=null!==(h=null===(m=o.blocks)||void 0===m?void 0:m.get(n.id))&&void 0!==h?h:null===(g=o.blocks)||void 0===g?void 0:g.get(c);e&&"function"===typeof e.setConstValue&&e.setConstValue(n.constValue)}if(n.note&&n.note.toString().trim()){var v,b,y;const e=null!==(v=null===(b=o.blocks)||void 0===b?void 0:b.get(n.id))&&void 0!==v?v:null===(y=o.blocks)||void 0===y?void 0:y.get(c);e&&"function"===typeof e.setNoteText&&(e.setNoteText(n.note,n.gParams.height),e.asNote=!0)}if(n.gParams.background){var x,w,C;const e=null!==(x=null===(w=o.blocks)||void 0===w?void 0:w.get(n.id))&&void 0!==x?x:null===(C=o.blocks)||void 0===C?void 0:C.get(c);e&&"function"===typeof e.setNotesColor&&e.setNotesColor(n.gParams.background)}if(n.invalidVar){var S,E,k;const e=null!==(S=null===(E=o.blocks)||void 0===E?void 0:E.get(n.id))&&void 0!==S?S:null===(k=o.blocks)||void 0===k?void 0:k.get(c);e&&"function"===typeof e.setInvalidVar&&e.setInvalidVar()}const O=null!==(u=null===(f=o.blocks)||void 0===f?void 0:f.get(n.id))&&void 0!==u?u:null===(p=o.blocks)||void 0===p?void 0:p.get(c);if(O){if(O.refId=n.refId,"function"===typeof O.updateRefId)try{var j;O.updateRefId(null!==(j=n.refId)&&void 0!==j?j:null)}catch(r5){}else if("function"===typeof O.setParametrized)try{O.setParametrized(Boolean(n.refId))}catch(r5){}else try{var I,T;const e=document.getElementById(null!==(I=null!==(T=O.id)&&void 0!==T?T:n.id)&&void 0!==I?I:c);e&&(n.refId?e.classList.add("parametrized"):e.classList.remove("parametrized"))}catch(r5){}if("undefined"!==typeof n.maxNumInputs&&null!==n.maxNumInputs)try{if(O.maxNumInputs=Number(n.maxNumInputs),"function"===typeof O.refreshInputButtons)O.refreshInputButtons();else if("function"===typeof O.setupCustomBehavior)try{O.setupCustomBehavior(O.element,O.id)}catch(M){}}catch(r5){var A;console.warn("importDiagrams: impossibile impostare maxNumInputs su block",null!==(A=n.id)&&void 0!==A?A:c,r5)}}a[e].push({id:s,name:n.name,descr:n.descr,type:n.type,category:n.category,direction:n.direction,uom:n.uom,linked:"",note:n.note,tags:n.tags})}catch(M){console.error("importDiagrams: errore ricreando block",n,M)}}const B=new Set;for(const n of P){const t=i6(n.outputs);for(const n of t){const t=n.id,i=r(n.link);for(const n of i){if(B.has(n))continue;const r=L.get(n);if(!r)continue;const i=document.getElementById(t),l=document.getElementById(r);if(i&&l)try{var O,N;const t={id:n,startSocket:i,endSocket:l,pathEl:null},r=o._createConnectionPath?o._createConnectionPath(t):null;if(!r){console.warn("importDiagrams: _createConnectionPath non ha restituito pathEl per conn",n);continue}const c={id:n,startSocket:i,endSocket:l,pathEl:r};if(z&&z.has(n)){const e=z.get(n);if(e)try{l.dataset.orderId=e,c.orderId=e}catch(r5){}}else l.dataset.orderId&&(c.orderId=l.dataset.orderId);o.connections&&"function"===typeof o.connections.set&&o.connections.set(n,c);const s=i.closest(".costerlogic-block"),d=l.closest(".costerlogic-block"),u=null!==(O=null===s||void 0===s?void 0:s.id)&&void 0!==O?O:null,f=null!==(N=null===d||void 0===d?void 0:d.id)&&void 0!==N?N:null;if(f&&u){const t=a[e],n=t.findIndex((e=>e.id===f));-1!==n&&(t[n].linked=u)}B.add(n)}catch(M){console.error("importDiagrams: errore creando connessione",n,M)}else console.warn("importDiagrams: socket non trovato; from=".concat(t,", to=").concat(r))}}}try{for(const e of P){const t=i6(e.inputs);e.type;for(const e of t){var R;const t=document.getElementById(e.id);if(!t)continue;const n=null!==(R=t.closest(".input_container"))&&void 0!==R?R:t.parentElement;if(!n)continue;const o=n.querySelector(".add-input");o&&(o.style.display="none");const a=n.querySelector(".rem-input");if(a&&(a.style.display="none"),0===r(e.link).length){const e=n.querySelector(".rem-input");e&&(e.style.display="none")}}}}catch(M){console.warn("importDiagrams: errore nascondendo inputbox per input collegati",M)}if("function"===typeof o.updateAllConnections)try{o.updateAllConnections()}catch(r5){}}const P=Object.keys(a);return requestAnimationFrame((()=>{requestAnimationFrame((()=>{for(const e of P){const t=null!==n&&void 0!==n&&n.createDiagram?n.createDiagram(e):void 0;if(t&&"function"===typeof t.updateAllConnections)try{t.updateAllConnections()}catch(r5){}else if(t&&"function"===typeof t.repaint)try{t.repaint()}catch(r5){}}}))})),a}(Q.current.costerlogic,Z.current,{createDiagram:t=>e.current["costerlogic-".concat(t)]});t.forEach((e=>{try{e.originalAddOp&&e.manager&&(e.manager.addOperation=e.originalAddOp)}catch(r5){}})),Object.keys(e.current).forEach((t=>{const n=e.current[t];if(!n)return;const r=n.undoRedoManager;if(r){try{"function"===typeof r.clear&&r.clear()}catch(r5){}try{"function"===typeof r.resume&&r.resume()}catch(r5){}}}));const r=Object.values(n).flat().map((e=>{var t,n,r,o;return{id:e.id,name:e.name,descr:e.descr,category:e.category,type:e.type,linked:"",note:e.note,refId:null!==(t=e.refId)&&void 0!==t?t:"",direction:null!==(n=e.direction)&&void 0!==n?n:"",uom:null!==(r=e.uom)&&void 0!==r?r:"",maxNumInputs:null!==(o=e.maxNumInputs)&&void 0!==o?o:"",tags:e.tags}}));u(r),ee.current=!0}catch(t){console.error("Errore importDiagrams:",t)}}),0)}),[n]),(0,t.useEffect)((()=>{if(!o)return;const t="costerlogic-".concat(o),n=e.current[t];n&&requestAnimationFrame((()=>{try{var e;null===(e=n.updateAllConnections)||void 0===e||e.call(n)}catch(r5){console.warn(r5)}}))}),[o]),(0,t.useEffect)((()=>{if(!o)return;const t="costerlogic-".concat(o),n=e.current[t];n.setTranslate(O),n.setHasYlc(ye)}),[O,o,ye]),(0,t.useEffect)((()=>{H&&G(!0)}),[H]),(0,t.useEffect)((()=>()=>{null!==oe.current&&clearInterval(oe.current)}),[]);const Me=()=>{null!==j?""!==T.trim()?(r((e=>e.map((e=>e.key===j?{...e,title:T}:e)))),W(!0),k(!1),I(null),A("")):UC.error({title:"Titolo non valido",content:"Il nome non pu\xf2 essere vuoto."}):k(!1)},De=e=>{const{id:t}=e.detail;p(d.find((e=>e.id===t)).id),m(d.find((e=>e.id===t)).type),v(d.find((e=>e.id===t)).category),y(d.find((e=>e.id===t)).direction),M(d.find((e=>e.id===t)).note),w(!0)},Le=()=>{w(!1)};(0,t.useEffect)((()=>{const t=e=>{const{id_input:t,id_output:n}=e.detail;u((e=>e.map((e=>e.id===n?{...e,linked:t}:e))))},r=e=>{const{id:t}=e.detail;u((e=>e.filter((e=>e.id!==t))))},o=e=>{const{id:t}=e.detail;u((e=>e.map((e=>e.linked===t?{...e,linked:""}:e))))},a=e=>{const t=e.detail;u((e=>{var n,r,o,a;return[...e,{id:t.id,name:t.name,descr:t.descr,category:t.category,type:t.type,linked:"",refId:null!==(n=t.refId)&&void 0!==n?n:"",direction:null!==(r=t.direction)&&void 0!==r?r:"",uom:null!==(o=t.uom)&&void 0!==o?o:"",maxNumInputs:null!==(a=t.maxNumInputs)&&void 0!==a?a:"",tags:t.tags}]})),Pe(),F(!0),W(!0)},i=e=>{var t;const n=null!==(t=e.detail)&&void 0!==t?t:{},r=n.props&&"object"===typeof n.props?n.props:n,o=Object.fromEntries(Object.entries(r).filter((e=>{let[t,n]=e;return"id"!==t&&"undefined"!==typeof n})));u((e=>{let t=!1;const r=e.map((e=>e.id===n.id?(t=!0,{...e,...o}):e));if(!t){var a,i,l,c,s,d,u,f,p,h,m,g,v,b,y,x,w,C,S,E;const e={id:n.id,name:null!==(a=null!==(i=o.name)&&void 0!==i?i:n.name)&&void 0!==a?a:"",category:null!==(l=null!==(c=o.category)&&void 0!==c?c:n.category)&&void 0!==l?l:"",direction:null!==(s=null!==(d=o.direction)&&void 0!==d?d:n.direction)&&void 0!==s?s:"",type:null!==(u=null!==(f=o.type)&&void 0!==f?f:n.type)&&void 0!==u?u:"",linked:null!==(p=null!==(h=o.linked)&&void 0!==h?h:n.linked)&&void 0!==p?p:"",descr:null!==(m=null!==(g=o.descr)&&void 0!==g?g:n.descr)&&void 0!==m?m:"",refId:null!==(v=null!==(b=o.refId)&&void 0!==b?b:n.refId)&&void 0!==v?v:"",uom:null!==(y=null!==(x=o.uom)&&void 0!==x?x:n.uom)&&void 0!==y?y:"",maxNumInputs:null!==(w=null!==(C=o.maxNumInputs)&&void 0!==C?C:n.maxNumInputs)&&void 0!==w?w:"",tags:null!==(S=null!==(E=o.tags)&&void 0!==E?E:n.tags)&&void 0!==S?S:""};return[...r,e]}return r})),F(!0),W(!0)},l=()=>{Pe(),F(!0),W(!0)},c=e=>{const t=e.detail;Ce(t),S(!0)},s=async e=>{const t=e.detail;try{await sE(eE,JSON.stringify({var:t}),GC())}catch(n){console.error(O(n.message))}},d=t=>{const r=t.detail;n.forEach((t=>{let{key:n}=t;const o="costerlogic-".concat(n),a=e.current[o];a&&a.blocks.forEach((e=>{if(e.refId===r.payload.refId)if(e.descr=r.payload.descr,a.updateBlock(e.id,r.payload),"function"===typeof e.updateHeader)e.updateHeader(r.payload.descr);else{var t;const n=(null!==(t=document.getElementById(e.id))&&void 0!==t?t:e.element).querySelector(".title-varDesc");n&&(n.textContent=""!==r.payload.descr?String(r.payload.descr):String(e.name.toUpperCase())),n&&(n.title=n.textContent||"")}}))}))},f=e=>{const t=e.detail;ak.error(t.payload.e)};return document.addEventListener("openDetails",De),document.addEventListener("closeDetails",Le),document.addEventListener("linkCreated",t),document.addEventListener("blockDeleted",r),document.addEventListener("linkDeleted",o),document.addEventListener("blockCreated",a),document.addEventListener("hasModified",l),document.addEventListener("blockUpdated",i),document.addEventListener("deleteVarOut",c),document.addEventListener("pasteVAR",s),document.addEventListener("allVarOutDescr",d),document.addEventListener("addVVar",(()=>$(!0))),document.addEventListener("errorPut",f),()=>{document.removeEventListener("openDetails",De),document.removeEventListener("closeDetails",Le),document.removeEventListener("linkCreated",t),document.removeEventListener("blockDeleted",r),document.removeEventListener("linkDeleted",o),document.removeEventListener("blockCreated",a),document.removeEventListener("hasModified",l),document.removeEventListener("blockUpdated",i),document.removeEventListener("deleteVarOut",c),document.removeEventListener("pasteVAR",s),document.removeEventListener("allVarOutDescr",d),document.removeEventListener("addVVar",(()=>$(!0))),document.removeEventListener("errorPut",f)}}),[d]),(0,t.useEffect)((()=>{const e=document.getElementsByClassName("drag-block"),t=e=>Fe(e),n=e=>s(e),r=e=>ze(e),o=e=>_e(e);for(let a=0;a<e.length;a++)e[a].addEventListener("touchend",t,!1),e[a].addEventListener("touchmove",n,!1),e[a].addEventListener("touchstart",r,!1),e[a].addEventListener("keydown",o,!1);return()=>{for(let a=0;a<e.length;a++)e[a].removeEventListener("touchend",t),e[a].removeEventListener("touchmove",n),e[a].removeEventListener("touchstart",r),e[a].removeEventListener("keydown",o)}}),[]);const _e=(t,n)=>{const r="costerlogic-".concat(n);e.current[r]},ze=e=>{if("touchstart"===e.type){const t=e.target.closest(".drag-block");if(t){const e=t.getAttribute("data-block-type")||"",n=t.getAttribute("data-block-category")||"",r=t.getAttribute("data-title")||"",o=t.getAttribute("data-block-numsocketsin")||"",a=t.getAttribute("data-block-numsocketsout")||"",i=t.getAttribute("data-refid")||"",c=t.getAttribute("data-direction")||"",s=t.getAttribute("data-uom")||"",d=t.getAttribute("data-block-maxnumsocketsin")||"",u=t.getAttribute("data-description")||"";l("".concat(r,"|").concat(u,"|").concat(e,"|").concat(n,"|").concat(o,"|").concat(a,"|").concat(i,"|").concat(c,"|").concat(s,"|").concat(d))}}else{var t;const n=e.target.getAttribute("data-block-type")||"",r=e.target.getAttribute("data-block-category")||"",o=e.target.getAttribute("data-title")||"",a=e.target.getAttribute("data-block-numsocketsin")||"",i=e.target.getAttribute("data-block-numsocketsout")||"",l=e.target.getAttribute("data-refid")||"",c=e.target.getAttribute("data-direction")||"",s=e.target.getAttribute("data-uom")||"",d=e.target.getAttribute("data-block-maxnumsocketsin")||"",u=e.target.getAttribute("data-description")||"";null===(t=e.dataTransfer)||void 0===t||t.setData("text/plain","".concat(o,"|").concat(u,"|").concat(n,"|").concat(r,"|").concat(a,"|").concat(i,"|").concat(l,"|").concat(c,"|").concat(s,"|").concat(d))}},Be=e=>{e.preventDefault()},Fe=(e,t)=>{if("touchend"===e.type&&c){var n;const e=c.touches[0].clientX,t=c.touches[0].clientY,r=null===(n=document.elementFromPoint(e,t))||void 0===n?void 0:n.closest(".costerlogic-container");if(r&&i){const n=r.getAttribute("id"),[o,a,l,c,s,d,u,f,p,h]=i.split("|");We(n,{name:o,descr:a,type:l,category:c,numSocketsIn:s,numSocketsOut:d,refId:u,direction:f,uom:p,maxNumInputs:h},e,t)}l("")}else{var r;e.preventDefault();const n=null===(r=e.dataTransfer)||void 0===r?void 0:r.getData("text/plain");if(n&&t){const[r,o,a,i,l,c,s,d,u,f]=n.split("|");We(t,{name:r,descr:o,type:a,category:i,numSocketsIn:l,numSocketsOut:c,refId:s,direction:d,uom:u,maxNumInputs:f},e.clientX,e.clientY)}}},He=t=>{let r=0;return n.forEach((n=>{let{key:o}=n;const a="costerlogic-".concat(o),i=e.current[a];i&&i.blocks.forEach((e=>{if(!e.descr.startsWith(t))return;if(e.descr===t)return void(r=Math.max(r,1));const n=(e=>{const t=e.match(/(\d+)\s*$/);if(!t)return null;const n=parseInt(t[1],10);return Number.isNaN(n)?null:n})(e.descr);null!==n&&(r=Math.max(r,n))}))})),0===r?t:"".concat(t," ").concat(r+1)},We=(t,n,r,o)=>{const a=e.current[t];if(a){var i;const e=a.canvas.getBoundingClientRect(),t=null!==(i=a.scale)&&void 0!==i?i:1,c=(r-e.left)/t,s=(o-e.top)/t,d="VAR"===n.category&&"w"===n.direction?"internal_".concat(G3()):n.refId;"VAR"===n.category&&"w"===n.direction&&(n.descr=He("VAR OUT")),"EXPOSED"===n.category&&"r"===n.direction&&(n.descr=He("EXPOSED IN")),"EXPOSED"===n.category&&"w"===n.direction&&(n.descr=He("EXPOSED OUT"));const f=a.addBlock(n.name,"",n.descr,n.type,n.category,c,s,n.numSocketsIn,n.numSocketsOut,n.direction,n.uom,n.tags,void 0,void 0,void 0,void 0,d,n.maxNumInputs);try{const e=a.blocks.get(f);e.refId?e.updateRefId(e.refId):e.setParametrized(!1)}catch(l){console.warn("Impossibile assegnare refId al blocco:",l)}Pe(),F(!0),W(!0),u((e=>{var t,r,o,a;return[...e,{id:f,name:n.name,descr:n.descr,category:n.category,type:n.type,linked:"",refId:null!==(t=n.refId)&&void 0!==t?t:"",direction:null!==(r=n.direction)&&void 0!==r?r:"",uom:null!==(o=n.uom)&&void 0!==o?o:"",maxNumInputs:null!==(a=n.maxNumInputs)&&void 0!==a?a:"",tags:n.tags}]}))}else console.error("Istanza di CosterLogic non trovata per",t)};function Ve(){Ee("/costerlogic/result",GC(),!1)}function Ue(){clearInterval(re.current)}(0,t.useEffect)((()=>{Se.value?function(e,t,n){const r=Array.isArray(e)?e:Array.isArray(null===e||void 0===e?void 0:e.costerlogic_result)?e.costerlogic_result:[];E6();for(const i of r)for(const e of i.blocks||[]){const n=e.id,r=S6(e.outputs);for(const e of r){const r=e.id,i=e.value,l="N/D",c=t(e.err||"");if(r){const e=document.getElementById(r);if(e){var o;const t='.coster-result-socket-label[data-socket-id="'.concat(r,'"]');let n=null!==(o=e.querySelector(t))&&void 0!==o?o:null;n||(n=document.createElement("div"),n.className=null===i?"coster-result-socket-label error":"coster-result-socket-label",n.dataset.socketId=r,e.appendChild(n)),n.textContent=String(null===i?l:i),n.title=String(c),null===i&&(n.title=String(c))}}else{var a;const e=document.getElementById(n);if(!e){console.warn("applyResultValues: block DOM ".concat(n," non trovato per valore esterno"));continue}const t=window.getComputedStyle(e);"static"!==t.position&&t.position||(e.style.position="relative");const r='.coster-result-external-label[data-block-id="'.concat(n,'"]');let o=null!==(a=e.querySelector(r))&&void 0!==a?a:null;o||(o=document.createElement("div"),o.className=null===i?"coster-result-external-label error":"coster-result-external-label",o.dataset.blockId=n,e.appendChild(o)),o.textContent=String(null===i?l:i),null===i&&(o.title=String(c))}}}}(Se.value,O):E6()}),[Se.value]);const Ke=()=>{const e=document.getElementsByClassName("connection");for(let t=0;t<e.length;t++)e[t].classList.remove("pathAnim")},Ge=t=>{n.forEach((n=>{let{key:r}=n;const o="costerlogic-".concat(r),a=e.current[o];a&&a.setLock(t)}))};(0,t.useEffect)((()=>()=>{Ue()}),[]),(0,t.useEffect)((()=>{const t=t=>{if((t.ctrlKey||t.metaKey)&&"c"===t.key.toLowerCase()){t.preventDefault();const n="costerlogic-".concat(o),r=e.current[n];if(!r)return;r.copySelected()}else if((t.ctrlKey||t.metaKey)&&"x"===t.key.toLowerCase()){t.preventDefault();const n="costerlogic-".concat(o),r=e.current[n];if(!r)return;r.copySelected(),r.deleteSelected()}else if((t.ctrlKey||t.metaKey)&&"v"===t.key.toLowerCase()){t.preventDefault(),t.stopPropagation();const r="costerlogic-".concat(o),a=e.current[r];if(!a)return;let i=window.innerWidth/2,l=window.innerHeight/2;const c=te.current[r];if(c){const e=c.getBoundingClientRect();i=e.left+20,l=e.top+20}if("function"===typeof a.getLastContextMenuPos){const e=a.getLastContextMenuPos();e&&"number"===typeof e.x&&"number"===typeof e.y&&(i=e.x,l=e.y)}try{a.pasteClipboard(i,l)}catch(n){console.warn("pasteClipboard failed",n)}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)}),[o,e,te]);const qe={left:(0,ng.jsx)("div",{className:"command-bar",children:(0,ng.jsxs)(hc,{children:[(0,ng.jsx)(hc.Compact,{block:!0,style:{marginLeft:8},children:(0,ng.jsx)(Hd,{placement:"bottom",title:O("save"),children:(0,ng.jsx)(Q_,{dot:K,children:(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},disabled:!K,icon:(0,ng.jsx)(s6,{}),onClick:async()=>{const t=n.map((t=>{const n="costerlogic-".concat(t.key),r=e.current[n];return r||console.warn("Nessuna istanza trovata per ".concat(n)),{key:t.key,title:t.title,instance:r}}));w(!1);const r=a6(t);await dE(ZS,JSON.stringify(r),GC()).then((e=>{e.status===D6.DUPLICATEVARBLOCK?F3.open({type:"error",message:"".concat(O("duplicateVarBlock")),description:"".concat(e.details),duration:10}):e.status===D6.OK&&((async()=>{try{const e=await cE(nE,GC(),!1,void 0,void 0,!0);e&&(Z.current=e,e.vars.length>0&&$(!0))}catch(e){ak.error(O(e.message))}})(),F(!1),W(!1),G(!1),null!==oe.current&&(clearInterval(oe.current),oe.current=null),ak.success(O("ok")))})).catch((e=>{null===e||void 0===e||e.globalHandled}))}})})})}),(0,ng.jsxs)(hc.Compact,{block:!0,style:{marginLeft:8},children:[(0,ng.jsx)(Hd,{placement:"bottom",title:O("undo"),children:(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},disabled:N,icon:(0,ng.jsx)(f6,{}),onClick:()=>{w(!1),W(!0);const t="costerlogic-".concat(o);e.current[t].undo()}})}),(0,ng.jsx)(Hd,{placement:"bottom",title:O("redo"),children:(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},disabled:N,icon:(0,ng.jsx)(CI,{}),onClick:()=>{w(!1),W(!0);const t="costerlogic-".concat(o);e.current[t].redo()}})}),(0,ng.jsx)(Hd,{placement:"bottom",title:O("deleteAll"),children:(0,ng.jsx)(IN,{title:O("deleteAll"),description:O("deleteAllDiagrams"),onConfirm:()=>(r([]),w(!1),n.length=0,void Ne()),okText:O("true"),cancelText:O("false"),icon:(0,ng.jsx)(Je,{}),children:(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},disabled:N,icon:(0,ng.jsx)(e4,{})})})})]}),(0,ng.jsxs)(hc.Compact,{block:!0,style:{marginLeft:8},children:[(0,ng.jsx)(Hd,{placement:"bottom",title:O(N?"pause":"execDiagram"),children:(0,ng.jsx)(ac,{disabled:K,"aria-pressed":N,"aria-label":N?"Pause animation":"Play animation",style:{display:"flex",justifyContent:"center",alignItems:"center"},icon:N?(0,ng.jsx)(m6,{}):(0,ng.jsx)(b6,{}),onClick:async()=>{const t="costerlogic-".concat(o),n=e.current[t];w(!1),n&&(N?(await Ge(!1),R(!1),await Ke(),Ue()):(await Ge(!0),R(!0),await(()=>{const e=document.getElementsByClassName("connection");for(let t=0;t<e.length;t++)e[t].classList.add("pathAnim")})(),Ve(),re.current=setInterval((()=>{Ve()}),5e3)))}})}),(0,ng.jsx)(Hd,{placement:"bottom",title:"Stop",children:(0,ng.jsx)(ac,{"aria-pressed":N,"aria-label":"Stop animation",style:{display:"flex",justifyContent:"center",alignItems:"center"},icon:(0,ng.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",viewBox:"0 0 1024 1024",children:(0,ng.jsx)("path",{d:"M864 64H160C107 64 64 107 64 160v704c0 53 43 96 96 96h704c53 0 96-43 96-96V160c0-53-43-96-96-96z"})}),onClick:async()=>{await Ge(!1),R(!1),await Ke(),Ue(),E6()}})})]}),(0,ng.jsx)(hc.Compact,{block:!0,style:{marginLeft:8},children:(0,ng.jsx)(Hd,{placement:"bottom",title:O("viewExpVarList"),children:(0,ng.jsx)(ac,{style:{display:"flex",justifyContent:"center",alignItems:"center"},disabled:!Y,icon:(0,ng.jsx)(w6,{}),onClick:()=>{cE(nE,GC(),!1).then((e=>{const t=Array.isArray(null===e||void 0===e?void 0:e.vars)?e.vars.map((e=>{var t;return{id:String(null===e||void 0===e?void 0:e.id),name:String(null!==(t=null===e||void 0===e?void 0:e.descr)&&void 0!==t?t:""),address:null===(null===e||void 0===e?void 0:e.address)||void 0===(null===e||void 0===e?void 0:e.address)||""===(null===e||void 0===e?void 0:e.address)?null:String(e.address),direction:null===e||void 0===e?void 0:e.direction}})).filter(Boolean):[];be(t),ge(!0)})).catch((e=>{console.error(e)}))}})})})]})})},Xe=n.map((e=>{let{key:t,title:r}=e;const o=(0,ng.jsxs)("span",{className:"tab-label-container",onMouseDown:e=>e.preventDefault(),children:[(0,ng.jsx)("span",{style:{userSelect:"none",marginRight:4},children:r}),(0,ng.jsx)(bE,{disabled:N,className:"edit-icon",onClick:e=>{N||(e.preventDefault(),e.stopPropagation(),((e,t)=>{I(e),w(!1),A(t),k(!0)})(t,r))},onMouseDown:e=>e.preventDefault(),style:{fontSize:14,cursor:"pointer"}})]}),a=(0,ng.jsx)("div",{style:{flex:1,minHeight:0,overflow:"auto",WebkitOverflowScrolling:"touch",boxSizing:"border-box"},children:(0,ng.jsx)("div",{id:"costerlogic-".concat(t),ref:e=>{te.current["costerlogic-".concat(t)]=e},onDrop:e=>Fe(e,"costerlogic-".concat(t)),onDragOver:Be,style:{border:"1px solid #ccc",borderRadius:4,backgroundColor:"#fafafa",width:"2500px",height:"2500px"}})});return{key:t,label:o,children:a,closable:n.length>1,forceRender:!0}}));return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)(M6,{open:me,vars:ve,translate:O,onCancel:()=>ge(!1),onSave:async e=>{0!==e.vars.length?(await dE(nE,JSON.stringify(e),GC()),ge(!1)):ge(!1)}}),(0,ng.jsx)(jI,{showDialog:B}),(0,ng.jsx)(UC,{open:C,okText:"Ok",cancelText:O("cancel"),onOk:()=>{S(!1),n.forEach((t=>{let{key:n}=t;const r="costerlogic-".concat(n),o=e.current[r];o&&o.performConfirmedDeletion(we)}))},onCancel:()=>S(!1),children:(0,ng.jsx)("p",{children:O("deleteAllVar")})}),(0,ng.jsx)("div",{className:"card-container",children:(0,ng.jsxs)(Qv,{bordered:!1,styles:{body:{padding:10,display:"flex",flexDirection:"column",minHeight:0}},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",minHeight:0,height:"90vh"},children:[(0,ng.jsx)(UC,{title:O("editTitle"),open:E,onOk:Me,onCancel:()=>{k(!1),I(null),A("")},okText:"Ok",cancelText:O("cancel"),children:(0,ng.jsx)(Aj,{value:T,onChange:e=>A(e.target.value),onPressEnter:Me,autoFocus:!0,maxLength:32})}),(0,ng.jsxs)("div",{style:{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"visible"},ref:U,children:[h!==K3.FUNCTION_BLOCK&&(0,ng.jsx)(N6,{setOpen:w,open:x,virtualDeviceVar:D,ylcVarType:_,blockId:f,blockType:h,blockCategory:g,blockDirection:b,instance:e.current["costerlogic-".concat(o)]}),!N&&(0,ng.jsx)(C6,{handleDragStart:ze,positionMobile:e=>s(e),handleDrop:Fe,containerId:"costerlogic-".concat(o),onTemplatesReady:(t,n)=>{const r=null!==t&&void 0!==t?t:"costerlogic-".concat(o),a=e.current[r];if(a&&"function"===typeof a.setTemplates)try{a.setTemplates(n)}catch(r5){console.error("setTemplates failed",r5)}else ne.current[r]={funcs:n}},setOpenDrawer:w}),(0,ng.jsx)(Mv,{destroyInactiveTabPane:!1,className:"full-height-tabs",type:"editable-card",activeKey:o,onChange:t=>{(t=>{a(t),w(!1),n.forEach((t=>{let{key:n}=t;const r="costerlogic-".concat(n),o=e.current[r];o&&(o.object_selected.clear(),o.canvas.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),o.object_selected.forEach((e=>e.classList.remove("selected"))),o.object_selected.clear())}))})(t)},onEdit:(e,t)=>{N||("add"===t?Ne():function(e){w(!1),r((t=>{const n=t.filter((t=>t.key!==e));if(e===o){const e=n.length?n[0].key:"";a(e)}return n})),F(!0),W(!0)}(e))},items:Xe,tabBarExtraContent:qe,onKeyDown:e=>{"Delete"!==e.key&&"Del"!==e.key||e.stopPropagation()}})]})]})})]})},{Header:_6,Content:z6}=sa,B6=e=>{let{clearToken:n,restartDevice:r}=e;const[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(!1),[c,s]=(0,t.useState)(!1),[d,u]=(0,t.useState)(!1),{translate:f}=og(),{hasPasswordRecovery:p}=DH();(0,t.useEffect)((()=>{const e=()=>{window.innerWidth<=980?a(!0):a(!1),window.innerWidth<=740?l(!0):l(!1)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=[{key:"1",icon:(0,ng.jsx)(Ke,{}),onClick:()=>u(!0),label:(0,ng.jsx)("span",{children:"Logout"})}],m={user:$C()};return(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("div",{className:"custom-container",children:(0,ng.jsx)("img",{className:"img-bk",src:zI,alt:""})}),(0,ng.jsxs)(sa,{children:[(0,ng.jsxs)(_6,{className:"site-layout-sub-header-background custom-header flex",children:[(0,ng.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginLeft:i?"-50px":"-20px"},children:[i&&(0,ng.jsx)(ac,{type:"text",icon:(0,ng.jsx)(Xe,{}),onClick:()=>s(!0),style:{fontSize:"16px",width:64,height:64}}),(0,ng.jsx)("div",{className:o?"logo collapsed":"logo expanded"})]}),(0,ng.jsx)("div",{className:"action-bar",children:(0,ng.jsxs)(hc,{children:[!p&&(0,ng.jsx)(Hd,{placement:"bottom",title:f("noMailRecConfigured"),children:(0,ng.jsx)(Je,{style:{color:"#ff0000",padding:"12px"}})}),(0,ng.jsx)(Nh,{menu:{items:h},children:(0,ng.jsxs)(hc,{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",paddingBlock:0,paddingInline:"2px",color:"rgba(0, 0, 0, 0.45)",fontSize:"14px",cursor:"pointer",borderRadius:"6px"},children:[(0,ng.jsx)(am,{style:{backgroundColor:"#8CBA37"},icon:(0,ng.jsx)(et,{})}),(0,ng.jsx)("span",{className:"userName",children:m.user})]})})]})})]}),(0,ng.jsx)(MT,{setShowDrawer:s,showDrawer:c}),(0,ng.jsxs)(sa,{className:"site-layout",style:i?{marginLeft:0}:o?{marginLeft:65,transition:"all 0.2s"}:{marginLeft:245,transition:"all 0.2s"},children:[(0,ng.jsx)(DT,{setCollapsed:a,collapsed:o}),(0,ng.jsx)(z6,{style:{overflow:"initial"},className:"site-layout-background",children:(0,ng.jsx)("div",{className:"main-container",children:(0,ng.jsxs)(Xm,{children:[(0,ng.jsx)(Gm,{path:"/",element:(0,ng.jsx)(Bj,{})}),(0,ng.jsx)(Gm,{path:"/network",element:(0,ng.jsx)(_I,{clearToken:n,restartDevice:r})}),(0,ng.jsx)(Gm,{path:"/serialports",element:(0,ng.jsx)(FG,{})}),(0,ng.jsx)(Gm,{path:"/general",element:(0,ng.jsx)(oK,{clearToken:n,restartDevice:r})}),(0,ng.jsx)(Gm,{path:"/container",element:(0,ng.jsx)(pG,{})}),(0,ng.jsx)(Gm,{path:"/cbus_transparent",element:(0,ng.jsx)(EG,{})}),(0,ng.jsx)(Gm,{path:"/modbus_transparent",element:(0,ng.jsx)(kG,{})}),(0,ng.jsx)(Gm,{path:"/bacnet_transparent",element:(0,ng.jsx)(xG,{})}),(0,ng.jsx)(Gm,{path:"/virtual_device",element:(0,ng.jsx)(U1,{})}),(0,ng.jsx)(Gm,{path:"/ylc",element:(0,ng.jsx)(dB,{})}),(0,ng.jsx)(Gm,{path:"/bacnetDiagnostic",element:(0,ng.jsx)(UG,{})}),(0,ng.jsx)(Gm,{path:"/ylcDiagnostic",element:(0,ng.jsx)(qG,{})}),(0,ng.jsx)(Gm,{path:"/virtualdeviceDiagnostic",element:(0,ng.jsx)(O4,{})}),(0,ng.jsx)(Gm,{path:"/systemDiagnostic",element:(0,ng.jsx)(r4,{})}),(0,ng.jsx)(Gm,{path:"/settingStatus",element:(0,ng.jsx)(MG,{})}),(0,ng.jsx)(Gm,{path:"/shellcommand",element:(0,ng.jsx)(R4,{})}),(0,ng.jsx)(Gm,{path:"/modbusTerminal",element:(0,ng.jsx)(i3,{})}),(0,ng.jsx)(Gm,{path:"/exchange_variables",element:(0,ng.jsx)(L6,{})})]})})})]})]}),d&&(0,ng.jsx)(hG,{clearToken:n,setIsVisible:u,isVisible:d})]})};function F6(e){const[n,r]=t.useState(e);return t.useEffect((()=>{const t=setTimeout((()=>{r(e)}),e.length?0:10);return()=>{clearTimeout(t)}}),[e]),n}const H6=e=>{const{componentCls:t}=e,n="".concat(t,"-show-help"),r="".concat(t,"-show-help-item");return{[n]:{transition:"opacity ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut),"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:"height ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,",\n                     opacity ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut,",\n                     transform ").concat(e.motionDurationSlow," ").concat(e.motionEaseInOut," !important"),["&".concat(r,"-appear, &").concat(r,"-enter")]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},["&".concat(r,"-leave-active")]:{transform:"translateY(-5px)"}}}}},W6=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:"".concat(rn(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus":{outline:0,boxShadow:"0 0 0 ".concat(rn(e.controlOutlineWidth)," ").concat(e.controlOutline)},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),V6=(e,t)=>{const{formItemCls:n}=e;return{[n]:{["".concat(n,"-label > label")]:{height:t},["".concat(n,"-control-input")]:{minHeight:t}}}},U6=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},$r(e)),W6(e)),{["".concat(t,"-text")]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},V6(e,e.controlHeightSM)),"&-large":Object.assign({},V6(e,e.controlHeightLG))})}},K6=e=>{const{formItemCls:t,iconCls:n,componentCls:r,rootPrefixCls:o,labelRequiredMarkColor:a,labelColor:i,labelFontSize:l,labelHeight:c,labelColonMarginInlineStart:s,labelColonMarginInlineEnd:d,itemMarginBottom:u}=e;return{[t]:Object.assign(Object.assign({},$r(e)),{marginBottom:u,verticalAlign:"top","&-with-help":{transition:"none"},["&-hidden,\n        &-hidden.".concat(o,"-row")]:{display:"none"},"&-has-warning":{["".concat(t,"-split")]:{color:e.colorError}},"&-has-error":{["".concat(t,"-split")]:{color:e.colorWarning}},["".concat(t,"-label")]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:c,color:i,fontSize:l,["> ".concat(n)]:{fontSize:e.fontSize,verticalAlign:"top"},["&".concat(t,"-required:not(").concat(t,"-required-mark-optional)::before")]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',["".concat(r,"-hide-required-mark &")]:{display:"none"}},["".concat(t,"-optional")]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,["".concat(r,"-hide-required-mark &")]:{display:"none"}},["".concat(t,"-tooltip")]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:s,marginInlineEnd:d},["&".concat(t,"-no-colon::after")]:{content:'"\\a0"'}}},["".concat(t,"-control")]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,["&:first-child:not([class^=\"'".concat(o,"-col-'\"]):not([class*=\"' ").concat(o,"-col-'\"])")]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:"color ".concat(e.motionDurationMid," ").concat(e.motionEaseOut)},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},["&-with-help ".concat(t,"-explain")]:{height:"auto",opacity:1},["".concat(t,"-feedback-icon")]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:md,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},G6=e=>{const{componentCls:t,formItemCls:n}=e;return{["".concat(t,"-horizontal")]:{["".concat(n,"-label")]:{flexGrow:0},["".concat(n,"-control")]:{flex:"1 1 0",minWidth:0},["".concat(n,"-label[class$='-24'], ").concat(n,"-label[class*='-24 ']")]:{["& + ".concat(n,"-control")]:{minWidth:"unset"}}}}},q6=e=>{const{componentCls:t,formItemCls:n}=e;return{["".concat(t,"-inline")]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",marginInlineEnd:e.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},["> ".concat(n,"-label,\n        > ").concat(n,"-control")]:{display:"inline-block",verticalAlign:"top"},["> ".concat(n,"-label")]:{flex:"none"},["".concat(t,"-text")]:{display:"inline-block"},["".concat(n,"-has-feedback")]:{display:"inline-block"}}}}},X6=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Y6=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{["".concat(n," ").concat(n,"-label")]:X6(e),["".concat(t,":not(").concat(t,"-inline)")]:{[n]:{flexWrap:"wrap",["".concat(n,"-label, ").concat(n,"-control")]:{['&:not([class*=" '.concat(r,'-col-xs"])')]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},$6=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{["".concat(t,"-vertical")]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},["".concat(t,"-item-control")]:{width:"100%"}}},["".concat(t,"-vertical ").concat(n,"-label,\n      .").concat(r,"-col-24").concat(n,"-label,\n      .").concat(r,"-col-xl-24").concat(n,"-label")]:X6(e),["@media (max-width: ".concat(rn(e.screenXSMax),")")]:[Y6(e),{[t]:{[".".concat(r,"-col-xs-24").concat(n,"-label")]:X6(e)}}],["@media (max-width: ".concat(rn(e.screenSMMax),")")]:{[t]:{[".".concat(r,"-col-sm-24").concat(n,"-label")]:X6(e)}},["@media (max-width: ".concat(rn(e.screenMDMax),")")]:{[t]:{[".".concat(r,"-col-md-24").concat(n,"-label")]:X6(e)}},["@media (max-width: ".concat(rn(e.screenLGMax),")")]:{[t]:{[".".concat(r,"-col-lg-24").concat(n,"-label")]:X6(e)}}}},J6=(e,t)=>Ho(e,{formItemCls:"".concat(e.componentCls,"-item"),rootPrefixCls:t}),Q6=$o("Form",((e,t)=>{let{rootPrefixCls:n}=t;const r=J6(e,n);return[U6(r),K6(r),H6(r),G6(r),q6(r),$6(r),Bp(r),md]}),(e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:"0 0 ".concat(e.paddingXS,"px"),verticalLabelMargin:0})),{order:-1e3}),Z6=[];function e5(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{key:"string"===typeof e?e:"".concat(t,"-").concat(r),error:e,errorStatus:n}}const t5=e=>{let{help:n,helpStatus:r,errors:o=Z6,warnings:a=Z6,className:i,fieldId:l,onVisibleChanged:c}=e;const{prefixCls:s}=t.useContext(qw),d="".concat(s,"-item-explain"),u=lh(s),[f,p,h]=Q6(s,u),m=(0,t.useMemo)((()=>Qs(s)),[s]),g=F6(o),b=F6(a),y=t.useMemo((()=>void 0!==n&&null!==n?[e5(n,"help",r)]:[].concat(nt(g.map(((e,t)=>e5(e,"error","error",t)))),nt(b.map(((e,t)=>e5(e,"warning","warning",t)))))),[n,r,g,b]),x={};return l&&(x.id="".concat(l,"_help")),f(t.createElement(xi,{motionDeadline:m.motionDeadline,motionName:"".concat(s,"-show-help"),visible:!!y.length,onVisibleChanged:c},(e=>{const{className:n,style:r}=e;return t.createElement("div",Object.assign({},x,{className:v()(d,n,h,u,i,p),style:r,role:"alert"}),t.createElement(yi,Object.assign({keys:y},Qs(s),{motionName:"".concat(s,"-show-help-item"),component:!1}),(e=>{const{key:n,error:r,errorStatus:o,className:a,style:i}=e;return t.createElement("div",{key:n,className:v()(a,{["".concat(d,"-").concat(o)]:o}),style:i},r)})))})))},n5=e=>"object"==typeof e&&null!=e&&1===e.nodeType,r5=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,o5=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return r5(n.overflowY,t)||r5(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},a5=(e,t,n,r,o,a,i,l)=>a<e&&i>t||a>e&&i<t?0:a<=e&&l<=n||i>=t&&l>=n?a-e-r:i>t&&l<n||a<e&&l>n?i-t+o:0,i5=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},l5=(e,t)=>{var n,r,o,a;if("undefined"==typeof document)return[];const{scrollMode:i,block:l,inline:c,boundary:s,skipOverflowHiddenElements:d}=t,u="function"==typeof s?s:e=>e!==s;if(!n5(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;n5(h)&&u(h);){if(h=i5(h),h===f){p.push(h);break}null!=h&&h===document.body&&o5(h)&&!o5(document.documentElement)||null!=h&&o5(h,d)&&p.push(h)}const m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(a=null==(o=window.visualViewport)?void 0:o.height)?a:innerHeight,{scrollX:v,scrollY:b}=window,{height:y,width:x,top:w,right:C,bottom:S,left:E}=e.getBoundingClientRect(),{top:k,right:j,bottom:I,left:T}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let A="start"===l||"nearest"===l?w-k:"end"===l?S+I:w+y/2-k+I,O="center"===c?E+x/2-T+j:"end"===c?C+j:E-T;const N=[];for(let R=0;R<p.length;R++){const e=p[R],{height:t,width:n,top:r,right:o,bottom:a,left:s}=e.getBoundingClientRect();if("if-needed"===i&&w>=0&&E>=0&&S<=g&&C<=m&&w>=r&&S<=a&&E>=s&&C<=o)return N;const d=getComputedStyle(e),u=parseInt(d.borderLeftWidth,10),h=parseInt(d.borderTopWidth,10),k=parseInt(d.borderRightWidth,10),j=parseInt(d.borderBottomWidth,10);let I=0,T=0;const P="offsetWidth"in e?e.offsetWidth-e.clientWidth-u-k:0,M="offsetHeight"in e?e.offsetHeight-e.clientHeight-h-j:0,D="offsetWidth"in e?0===e.offsetWidth?0:n/e.offsetWidth:0,L="offsetHeight"in e?0===e.offsetHeight?0:t/e.offsetHeight:0;if(f===e)I="start"===l?A:"end"===l?A-g:"nearest"===l?a5(b,b+g,g,h,j,b+A,b+A+y,y):A-g/2,T="start"===c?O:"center"===c?O-m/2:"end"===c?O-m:a5(v,v+m,m,u,k,v+O,v+O+x,x),I=Math.max(0,I+b),T=Math.max(0,T+v);else{I="start"===l?A-r-h:"end"===l?A-a+j+M:"nearest"===l?a5(r,a,t,h,j+M,A,A+y,y):A-(r+t/2)+M/2,T="start"===c?O-s-u:"center"===c?O-(s+n/2)+P/2:"end"===c?O-o+k+P:a5(s,o,n,u,k+P,O,O+x,x);const{scrollLeft:i,scrollTop:d}=e;I=0===L?0:Math.max(0,Math.min(d+I/L,e.scrollHeight-t/L+M)),T=0===D?0:Math.max(0,Math.min(i+T/D,e.scrollWidth-n/D+P)),A+=d-I,O+=i-T}N.push({el:e,top:I,left:T})}return N},c5=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};const s5=["parentNode"],d5="form_item";function u5(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function f5(e,t){if(!e.length)return;const n=e.join("_");if(t)return"".concat(t,"_").concat(n);return s5.includes(n)?"".concat(d5,"_").concat(n):n}function p5(e,t,n,r,o,a){let i=r;return void 0!==a?i=a:n.validating?i="validating":e.length?i="error":t.length?i="warning":(n.touched||o&&n.validated)&&(i="success"),i}function h5(e){return u5(e).join("_")}function m5(e){const[n]=Pw(),r=t.useRef({}),o=t.useMemo((()=>null!==e&&void 0!==e?e:Object.assign(Object.assign({},n),{__INTERNAL__:{itemRef:e=>t=>{const n=h5(e);t?r.current[n]=t:delete r.current[n]}},scrollToField:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=f5(u5(e),o.__INTERNAL__.name),r=n?document.getElementById(n):null;r&&function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(l5(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:a,left:i}of l5(e,c5(t))){const e=a-n.top+n.bottom,t=i-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(r,Object.assign({scrollMode:"if-needed",block:"nearest"},t))},getFieldInstance:e=>{const t=h5(e);return r.current[t]}})),[e,n]);return[o]}var g5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const v5=(e,n)=>{const r=t.useContext(Ki),{getPrefixCls:o,direction:a,form:i}=t.useContext(at),{prefixCls:l,className:c,rootClassName:s,size:d,disabled:u=r,form:f,colon:p,labelAlign:h,labelWrap:m,labelCol:g,wrapperCol:b,hideRequiredMark:y,layout:x="horizontal",scrollToFirstError:w,requiredMark:C,onFinishFailed:S,name:E,style:k,feedbackIcons:j,variant:I}=e,T=g5(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),A=Yi(d),O=t.useContext(Zd);const N=(0,t.useMemo)((()=>void 0!==C?C:!y&&(!i||void 0===i.requiredMark||i.requiredMark)),[y,C,i]),R=null!==p&&void 0!==p?p:null===i||void 0===i?void 0:i.colon,P=o("form",l),M=lh(P),[D,L,_]=Q6(P,M),z=v()(P,"".concat(P,"-").concat(x),{["".concat(P,"-hide-required-mark")]:!1===N,["".concat(P,"-rtl")]:"rtl"===a,["".concat(P,"-").concat(A)]:A},_,M,L,null===i||void 0===i?void 0:i.className,c,s),[B]=m5(f),{__INTERNAL__:F}=B;F.name=E;const H=(0,t.useMemo)((()=>({name:E,labelAlign:h,labelCol:g,labelWrap:m,wrapperCol:b,vertical:"vertical"===x,colon:R,requiredMark:N,itemRef:F.itemRef,form:B,feedbackIcons:j})),[E,h,g,b,x,R,N,B,j]);t.useImperativeHandle(n,(()=>B));const W=(e,t)=>{if(e){let n={block:"nearest"};"object"===typeof e&&(n=e),B.scrollToField(t,n)}};return D(t.createElement($w.Provider,{value:I},t.createElement(Ui,{disabled:u},t.createElement(Xi.Provider,{value:A},t.createElement(Gw,{validateMessages:O},t.createElement(Uw.Provider,{value:H},t.createElement(Vw,Object.assign({id:E},T,{name:E,onFinishFailed:e=>{if(null===S||void 0===S||S(e),e.errorFields.length){const t=e.errorFields[0].name;if(void 0!==w)return void W(w,t);i&&void 0!==i.scrollToFirstError&&W(i.scrollToFirstError,t)}},form:B,style:Object.assign(Object.assign({},null===i||void 0===i?void 0:i.style),k),className:z}))))))))};const b5=t.forwardRef(v5);const y5=()=>{const{status:e,errors:n=[],warnings:r=[]}=(0,t.useContext)(Xw);return{status:e,errors:n,warnings:r}};y5.Context=Xw;const x5=y5;const w5=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{["".concat(t,"-control")]:{display:"flex"}}}},C5=Yo(["Form","item-item"],((e,t)=>{let{rootPrefixCls:n}=t;const r=J6(e,n);return[w5(r)]})),S5=e=>{const{prefixCls:n,status:r,wrapperCol:o,children:a,errors:i,warnings:l,_internalItemRender:c,extra:s,help:d,fieldId:u,marginBottom:f,onErrorVisibleChanged:p}=e,h="".concat(n,"-item"),m=t.useContext(Uw),g=o||m.wrapperCol||{},b=v()("".concat(h,"-control"),g.className),y=t.useMemo((()=>Object.assign({},m)),[m]);delete y.labelCol,delete y.wrapperCol;const x=t.createElement("div",{className:"".concat(h,"-control-input")},t.createElement("div",{className:"".concat(h,"-control-input-content")},a)),w=t.useMemo((()=>({prefixCls:n,status:r})),[n,r]),C=null!==f||i.length||l.length?t.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},t.createElement(qw.Provider,{value:w},t.createElement(t5,{fieldId:u,errors:i,warnings:l,help:d,helpStatus:r,className:"".concat(h,"-explain-connected"),onVisibleChanged:p})),!!f&&t.createElement("div",{style:{width:0,height:f}})):null,S={};u&&(S.id="".concat(u,"_extra"));const E=s?t.createElement("div",Object.assign({},S,{className:"".concat(h,"-extra")}),s):null,k=c&&"pro_table_render"===c.mark&&c.render?c.render(e,{input:x,errorList:C,extra:E}):t.createElement(t.Fragment,null,x,C,E);return t.createElement(Uw.Provider,{value:y},t.createElement(Qz,Object.assign({},g,{className:b}),k),t.createElement(C5,{prefixCls:n}))};const E5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};var k5=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:E5}))};const j5=t.forwardRef(k5);var I5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const T5=e=>{let{prefixCls:n,label:r,htmlFor:o,labelCol:a,labelAlign:i,colon:l,required:c,requiredMark:s,tooltip:d}=e;var u;const[f]=nx("Form"),{vertical:p,labelAlign:h,labelCol:m,labelWrap:g,colon:b}=t.useContext(Uw);if(!r)return null;const y=a||m||{},x=i||h,w="".concat(n,"-item-label"),C=v()(w,"left"===x&&"".concat(w,"-left"),y.className,{["".concat(w,"-wrap")]:!!g});let S=r;const E=!0===l||!1!==b&&!1!==l;E&&!p&&"string"===typeof r&&""!==r.trim()&&(S=r.replace(/[:|\uff1a]\s*$/,""));const k=function(e){return e?"object"!==typeof e||t.isValidElement(e)?{title:e}:e:null}(d);if(k){const{icon:e=t.createElement(j5,null)}=k,r=I5(k,["icon"]),o=t.createElement(Hd,Object.assign({},r),t.cloneElement(e,{className:"".concat(n,"-item-tooltip"),title:"",onClick:e=>{e.preventDefault()},tabIndex:null}));S=t.createElement(t.Fragment,null,S,o)}const j="optional"===s,I="function"===typeof s;I?S=s(S,{required:!!c}):j&&!c&&(S=t.createElement(t.Fragment,null,S,t.createElement("span",{className:"".concat(n,"-item-optional"),title:""},(null===f||void 0===f?void 0:f.optional)||(null===(u=au.Form)||void 0===u?void 0:u.optional))));const T=v()({["".concat(n,"-item-required")]:c,["".concat(n,"-item-required-mark-optional")]:j||I,["".concat(n,"-item-no-colon")]:!E});return t.createElement(Qz,Object.assign({},y,{className:C}),t.createElement("label",{htmlFor:o,className:T,title:"string"===typeof r?r:""},S))},A5={success:Gy,warning:Qy,error:Yy,validating:yl};function O5(e){let{children:n,errors:r,warnings:o,hasFeedback:a,validateStatus:i,prefixCls:l,meta:c,noStyle:s}=e;const d="".concat(l,"-item"),{feedbackIcons:u}=t.useContext(Uw),f=p5(r,o,c,null,!!a,i),{isFormItemInput:p,status:h,hasFeedback:m,feedbackIcon:g}=t.useContext(Xw),b=t.useMemo((()=>{var e;let n;if(a){const i=!0!==a&&a.icons||u,l=f&&(null===(e=null===i||void 0===i?void 0:i({status:f,errors:r,warnings:o}))||void 0===e?void 0:e[f]),c=f&&A5[f];n=!1!==l&&c?t.createElement("span",{className:v()("".concat(d,"-feedback-icon"),"".concat(d,"-feedback-icon-").concat(f))},l||t.createElement(c,null)):null}const i={status:f||"",errors:r,warnings:o,hasFeedback:!!a,feedbackIcon:n,isFormItemInput:!0};return s&&(i.status=(null!==f&&void 0!==f?f:h)||"",i.isFormItemInput=p,i.hasFeedback=!!(null!==a&&void 0!==a?a:m),i.feedbackIcon=void 0!==a?i.feedbackIcon:g),i}),[f,a,s,p,h]);return t.createElement(Xw.Provider,{value:b},n)}var N5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function R5(e){const{prefixCls:n,className:r,rootClassName:o,style:a,help:i,errors:l,warnings:c,validateStatus:s,meta:d,hasFeedback:u,hidden:f,children:p,fieldId:h,required:m,isRequired:g,onSubItemMetaChange:b}=e,y=N5(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),x="".concat(n,"-item"),{requiredMark:w}=t.useContext(Uw),C=t.useRef(null),S=F6(l),E=F6(c),k=void 0!==i&&null!==i,j=!!(k||l.length||c.length),I=!!C.current&&da(C.current),[T,A]=t.useState(null);fn((()=>{if(j&&C.current){const e=getComputedStyle(C.current);A(parseInt(e.marginBottom,10))}}),[j,I]);const O=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return p5(e?S:d.errors,e?E:d.warnings,d,"",!!u,s)}(),N=v()(x,r,o,{["".concat(x,"-with-help")]:k||S.length||E.length,["".concat(x,"-has-feedback")]:O&&u,["".concat(x,"-has-success")]:"success"===O,["".concat(x,"-has-warning")]:"warning"===O,["".concat(x,"-has-error")]:"error"===O,["".concat(x,"-is-validating")]:"validating"===O,["".concat(x,"-hidden")]:f});return t.createElement("div",{className:N,style:a,ref:C},t.createElement(Gz,Object.assign({className:"".concat(x,"-row")},rt(y,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),t.createElement(T5,Object.assign({htmlFor:h},e,{requiredMark:w,required:null!==m&&void 0!==m?m:g,prefixCls:n})),t.createElement(S5,Object.assign({},e,d,{errors:S,warnings:E,prefixCls:n,status:O,help:i,marginBottom:T,onErrorVisibleChanged:e=>{e||A(null)}}),t.createElement(Kw.Provider,{value:b},t.createElement(O5,{prefixCls:n,meta:d,errors:d.errors,warnings:d.warnings,hasFeedback:u,validateStatus:O},p)))),!!T&&t.createElement("div",{className:"".concat(x,"-margin-offset"),style:{marginBottom:-T}}))}const P5=t.memo((e=>{let{children:t}=e;return t}),((e,t)=>function(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>{const r=e[n],o=t[n];return r===o||"function"===typeof r||"function"===typeof o}))}(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every(((e,n)=>e===t.childProps[n]))));const M5=function(e){const{name:n,noStyle:r,className:o,dependencies:a,prefixCls:i,shouldUpdate:l,rules:c,children:s,required:d,label:u,messageVariables:f,trigger:p="onChange",validateTrigger:h,hidden:m,help:g}=e,{getPrefixCls:b}=t.useContext(at),{name:y}=t.useContext(Uw),x=function(e){if("function"===typeof e)return e;const t=st(e);return t.length<=1?t[0]:t}(s),w="function"===typeof x,C=t.useContext(Kw),{validateTrigger:S}=t.useContext(Ox),E=void 0!==h?h:S,k=!(void 0===n||null===n),j=b("form",i),I=lh(j),[T,A,O]=Q6(j,I);ud("Form.Item");const N=t.useContext(Nx),R=t.useRef(),[P,M]=function(e){const[n,r]=t.useState(e),o=(0,t.useRef)(null),a=(0,t.useRef)([]),i=(0,t.useRef)(!1);return t.useEffect((()=>(i.current=!1,()=>{i.current=!0,Sa.cancel(o.current),o.current=null})),[]),[n,function(e){i.current||(null===o.current&&(a.current=[],o.current=Sa((()=>{o.current=null,r((e=>{let t=e;return a.current.forEach((e=>{t=e(t)})),t}))}))),a.current.push(e))}]}({}),[D,L]=Dr((()=>({errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}))),_=(e,t)=>{M((n=>{const r=Object.assign({},n),o=[].concat(nt(e.name.slice(0,-1)),nt(t)).join("__SPLIT__");return e.destroy?delete r[o]:r[o]=e,r}))},[z,B]=t.useMemo((()=>{const e=nt(D.errors),t=nt(D.warnings);return Object.values(P).forEach((n=>{e.push.apply(e,nt(n.errors||[])),t.push.apply(t,nt(n.warnings||[]))})),[e,t]}),[P,D.errors,D.warnings]),F=function(){const{itemRef:e}=t.useContext(Uw),n=t.useRef({});return function(t,r){const o=r&&"object"===typeof r&&r.ref,a=t.join("_");return n.current.name===a&&n.current.originRef===o||(n.current.name=a,n.current.originRef=o,n.current.ref=Br(e(t),o)),n.current.ref}}();function H(n,a,i){return r&&!m?t.createElement(O5,{prefixCls:j,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:D,errors:z,warnings:B,noStyle:!0},n):t.createElement(R5,Object.assign({key:"row"},e,{className:v()(o,O,I,A),prefixCls:j,fieldId:a,isRequired:i,errors:z,warnings:B,meta:D,onSubItemMetaChange:_}),n)}if(!k&&!w&&!a)return T(H(x));let W={};return"string"===typeof u?W.label=u:n&&(W.label=String(n)),f&&(W=Object.assign(Object.assign({},W),f)),T(t.createElement(kw,Object.assign({},e,{messageVariables:W,trigger:p,validateTrigger:E,onMetaChange:e=>{const t=null===N||void 0===N?void 0:N.getKey(e.name);if(L(e.destroy?{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}:e,!0),r&&!1!==g&&C){let n=e.name;if(e.destroy)n=R.current||n;else if(void 0!==t){const[e,r]=t;n=[e].concat(nt(r)),R.current=n}C(e,n)}}}),((r,o,i)=>{const s=u5(n).length&&o?o.name:[],u=f5(s,y),f=void 0!==d?d:!(!c||!c.some((e=>{if(e&&"object"===typeof e&&e.required&&!e.warningOnly)return!0;if("function"===typeof e){const t=e(i);return t&&t.required&&!t.warningOnly}return!1}))),h=Object.assign({},r);let m=null;if(Array.isArray(x)&&k)m=x;else if(w&&(!l&&!a||k));else if(!a||w||k)if(ua(x)){const n=Object.assign(Object.assign({},x.props),h);if(n.id||(n.id=u),g||z.length>0||B.length>0||e.extra){const t=[];(g||z.length>0)&&t.push("".concat(u,"_help")),e.extra&&t.push("".concat(u,"_extra")),n["aria-describedby"]=t.join(" ")}z.length>0&&(n["aria-invalid"]="true"),f&&(n["aria-required"]="true"),Hr(x)&&(n.ref=F(s,x));new Set([].concat(nt(u5(p)),nt(u5(E)))).forEach((e=>{n[e]=function(){for(var t,n,r,o,a,i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];null===(r=h[e])||void 0===r||(t=r).call.apply(t,[h].concat(l)),null===(a=(o=x.props)[e])||void 0===a||(n=a).call.apply(n,[o].concat(l))}}));const r=[n["aria-required"],n["aria-invalid"],n["aria-describedby"]];m=t.createElement(P5,{control:h,update:x,childProps:r},ha(x,n))}else m=w&&(l||a)&&!k?x(i):x;else;return H(m,u,f)})))};M5.useStatus=x5;const D5=M5;var L5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const _5=e=>{var{prefixCls:n,children:r}=e,o=L5(e,["prefixCls","children"]);const{getPrefixCls:a}=t.useContext(at),i=a("form",n),l=t.useMemo((()=>({prefixCls:i,status:"error"})),[i]);return t.createElement(jw,Object.assign({},o),((e,n,o)=>t.createElement(qw.Provider,{value:l},r(e.map((e=>Object.assign(Object.assign({},e),{fieldKey:e.key}))),n,{errors:o.errors,warnings:o.warnings}))))};const z5=b5;z5.Item=D5,z5.List=_5,z5.ErrorList=t5,z5.useForm=m5,z5.useFormInstance=function(){const{form:e}=(0,t.useContext)(Uw);return e},z5.useWatch=Hw,z5.Provider=Gw,z5.create=()=>{};const B5=z5,F5=e=>{let{oldPass:n,setChangePass:r,token:o,setToken:a}=e;const{translate:i}=og(),[l,c]=(0,t.useState)({pass:"",pass1:""});return(0,ng.jsx)("div",{className:"card-login",children:(0,ng.jsxs)("div",{className:"login-container",children:[(0,ng.jsx)("div",{className:"login-form",children:(0,ng.jsxs)(NH,{vertical:!0,gap:"middle",children:[(0,ng.jsx)("h4",{children:i("mandatoryPasswordReset")}),(0,ng.jsxs)(hc,{direction:"vertical",children:[i("newPassword"),(0,ng.jsx)(qU,{value:l.pass,manageOnChange:function(e){c({...l,pass:e.target.value})},status:lS(l.pass)})]}),(0,ng.jsxs)(hc,{direction:"vertical",children:[i("passwordRepeat"),(0,ng.jsx)(qU,{value:l.pass1,manageOnChange:function(e){c({...l,pass1:e.target.value})},status:lS(l.pass1)})]}),(0,ng.jsx)(ac,{type:"primary",onClick:async function(){if(l.pass!==l.pass1)ak.error(i("messagePasswordNotMatch"));else{const t={username:$C(),password:n,newPassword:l.pass};try{"ok"===(await sE(mS,JSON.stringify(t),'"'.concat(o,'"'))).result?(ak.success(i("messageChangePasswordOk")),r(!1),a(o)):ak.error(i("messageChangePasswordFailed"))}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;ak.error(i("messageChangePasswordFailed"))}}},disabled:!lS(l.pass)&&!lS(l.pass1),className:"btn-login",children:i("passwordChange")})]})}),(0,ng.jsx)("div",{className:"toggle-box",children:(0,ng.jsx)("div",{className:"toggle-panel",children:(0,ng.jsx)("h1",{children:"EHC 602"})})})]})})},H5=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Enter",n=arguments.length>1?arguments[1]:void 0;const r=(0,t.useCallback)((t=>{t.key===e&&n()}),[e,n]);(0,t.useEffect)((()=>(document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)})),[r])};const W5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};var V5=function(e,n){return t.createElement(Ve,a({},e,{ref:n,icon:W5}))};const U5=t.forwardRef(V5),K5=e=>{let{setToken:n,loaded:r}=e;const{changeLanguage:o,translate:a}=og(),[i,l]=(0,t.useState)(!1),[c,s]=(0,t.useState)(!1),[d,u]=(Wm(),(0,t.useState)("")),[f,p]=(0,t.useState)(!0),h=(0,t.useRef)(),[m]=B5.useForm();async function g(){try{const{language:e}=await cE(hS,"",!1,void 0,void 0,!0);o(e),p(!1)}catch(e){if(null!==e&&void 0!==e&&e.globalHandled)return;p(!0)}}function v(){clearInterval(h.current)}if(H5("Enter",(()=>m.submit())),(0,t.useEffect)((()=>(g(),h.current=setInterval(g,5e3),v)),[]),!r)return(0,ng.jsx)("div",{style:{textAlign:"center",marginTop:100},children:(0,ng.jsx)(rD,{size:"large"})});if(i){const e=m.getFieldValue("pass")||"";return(0,ng.jsx)(F5,{oldPass:e,setChangePass:l,token:d,setToken:n})}return(0,ng.jsx)("div",{className:"card-login",children:(0,ng.jsxs)("div",{className:"login-container",children:[(0,ng.jsxs)("div",{className:"login-form",children:[(0,ng.jsxs)(B5,{form:m,layout:"vertical",name:"loginForm",onFinish:async function(e){var t;if(!f)try{const r=await sE("/account/login",JSON.stringify({username:e.user,password:e.pass}),void 0,void 0,!0);t=e.user,YC=t,"yes"===r.changePassword?(u(r.token),l(!0)):n(r.token)}catch(c){var r,o,i;if(null!==c&&void 0!==c&&c.globalHandled)return;const e=c,t=null===(r=e.response)||void 0===r?void 0:r.status,n=(null===(o=e.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.message)||e.message;if(401===t||"error401"===n)m.setFields([{name:"user",value:"",errors:[" "]},{name:"pass",value:"",errors:[a("invalidCredentials")]}]),s(!0);else{const e=a(n)||n;ak.error(e)}}},initialValues:{user:"",pass:""},autoComplete:"on",className:"form",children:[(0,ng.jsx)("h1",{children:"Login"}),(0,ng.jsx)(B5.Item,{name:"user",rules:[{required:!0,message:a("userRequired")}],validateTrigger:["onBlur","onSubmit"],className:"input-box",children:(0,ng.jsx)(Aj,{placeholder:a("user"),autoComplete:"username",disabled:f,className:"input-item",prefix:(0,ng.jsx)(et,{className:"input-icon"})})}),(0,ng.jsx)(B5.Item,{name:"pass",rules:[{required:!0,message:a("passRequired")},{min:5,message:a("passMinLength")}],validateTrigger:["onBlur","onSubmit"],className:"input-box",children:(0,ng.jsx)(Aj.Password,{placeholder:a("password"),autoComplete:"current-password",disabled:f,className:"input-item",prefix:(0,ng.jsx)(U5,{className:"input-icon"})})}),(0,ng.jsx)(B5.Item,{children:(0,ng.jsxs)(hc,{direction:"vertical",style:{width:"100%"},children:[(0,ng.jsx)(ac,{type:"primary",htmlType:"submit",disabled:f,block:!0,className:"btn-login",children:a("login")}),(0,ng.jsx)(ac,{type:"link",onClick:async function(){if(f)return;const e=m.getFieldValue("user");if(null!==e&&void 0!==e&&e.trim())try{await sE("/account/requestotp",JSON.stringify({username:e})).then((e=>{"ok"===e.result?ak.success(a("messageCodeReqSent")):ak.error(a(e.result))})).catch((e=>{console.log(e)}))}catch(t){if(null!==t&&void 0!==t&&t.globalHandled)return;if(null!==t&&void 0!==t&&t.globalHandled)return;ak.error(a(t.message))}else ak.warning(a("missUsername"))},disabled:f,children:a("forgotPassword")})]})})]}),f&&(0,ng.jsxs)(ng.Fragment,{children:[(0,ng.jsx)("p",{style:{color:"red",textAlign:"center"},children:a("deviceNotConnected")}),(0,ng.jsx)(rD,{indicator:(0,ng.jsx)(yl,{spin:!0}),size:"large",spinning:!0})]})]}),(0,ng.jsx)("div",{className:"toggle-box",children:(0,ng.jsx)("div",{className:"toggle-panel",children:(0,ng.jsx)("h1",{children:"EHC 602"})})})]})})},G5=e=>{const[n,r]=(0,t.useState)(!1),{translate:o}=og(),a=(0,t.useRef)(),i=(0,t.useRef)(!1);(0,t.useEffect)((()=>(uS(),a.current=setInterval((()=>{uS(),l()}),3e3),()=>{fS(),clearInterval(a.current)})),[]);const l=()=>{cE(yS,void 0,!1,void 0,void 0,!0).then((t=>{const n="object"===typeof t?t.restarting:t;!0!==n&&"true"!==n?!1!==n&&"false"!==n||i.current&&(r(!0),clearInterval(a.current),RI=!1,PI=0,e.clearRestartDevice()):i.current=!0})).catch((()=>{i.current=!0}))};return(0,ng.jsx)(ng.Fragment,{children:n?(0,ng.jsx)(Km,{replace:!0,to:"/"}):(0,ng.jsx)("div",{className:"home__card__container",children:(0,ng.jsxs)(Qv,{className:"title-card",children:[(0,ng.jsx)("p",{children:o("restarting")}),(0,ng.jsx)("p",{children:o("isRestarted")})]})})})},q5=e=>{let{children:n}=e;const[r,o]=(0,t.useState)(!1);return(0,t.useEffect)((()=>(dS(o),()=>{dS(null)})),[]),(0,ng.jsxs)(ng.Fragment,{children:[n,r&&(0,ng.jsx)("div",{style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},children:(0,ng.jsx)(rD,{size:"large"})})]})};n(244);class X5 extends t.Component{constructor(e){super(e),this.state={initialLanguage:"en",loaded:!1,token:GC(),deviceRestarted:RI,notifyIconClicked:!1}}componentDidMount(){this.initializeLanguage()}initializeLanguage(){cE(hS).then((e=>{localStorage.setItem("device_lang",e.language),this.setState({initialLanguage:e.language,loaded:!0})})).catch((()=>{const e=localStorage.getItem("device_lang");this.setState({initialLanguage:e||navigator.language,loaded:!0})}))}setToken(e){this.setState({token:qC(JSON.stringify(e))})}clearToken(){this.setState({token:""})}getToken(){return this.state.token}isDeviceRestarted(){return this.state.deviceRestarted}restartDevice(){this.setState({deviceRestarted:!0,token:""}),qC("")}clearRestartDevice(){this.setState({deviceRestarted:!1}),window.location.reload()}onIconClicked(){this.setState({notifyIconClicked:!0})}onAlertClose(){this.setState({notifyIconClicked:!1})}render(){const{initialLanguage:e,deviceRestarted:t,token:n}=this.state;if(t){const t=localStorage.getItem("device_lang")||e;return(0,ng.jsx)(Nu,{theme:{cssVar:{key:"coster"}},children:(0,ng.jsx)(lg,{initialLanguage:t,children:(0,ng.jsx)(q5,{children:(0,ng.jsx)(kT,{children:(0,ng.jsx)(G5,{clearRestartDevice:this.clearRestartDevice.bind(this)})})})})})}return n?(0,ng.jsx)(Nu,{theme:{cssVar:{key:"coster"}},children:(0,ng.jsx)(RT,{oemProduct:"coster",children:(0,ng.jsx)(lg,{initialLanguage:e,children:(0,ng.jsx)(q5,{children:(0,ng.jsx)(ZK,{children:(0,ng.jsx)(LH,{children:(0,ng.jsx)(AT,{children:(0,ng.jsx)(jT,{history:EI,children:(0,ng.jsx)(B6,{clearToken:this.clearToken.bind(this),restartDevice:this.restartDevice.bind(this)})})})})})})})})}):(0,ng.jsx)(Nu,{theme:{cssVar:{key:"coster"}},children:(0,ng.jsx)(lg,{initialLanguage:e,children:(0,ng.jsx)(q5,{children:(0,ng.jsx)(kT,{children:(0,ng.jsx)(K5,{setToken:this.setToken.bind(this),loaded:this.state.loaded})})})})})}}const Y5=X5;o.createRoot(document.getElementById("root")).render((0,ng.jsx)(ng.Fragment,{children:(0,ng.jsx)(Y5,{})}))})()})();
//# sourceMappingURL=main.be1c7bee.js.map