master-components-react 2.1.8 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@ React keys must be passed directly to JSX without using spread:
37
37
  ${gn.popupContainer}
38
38
  ${i!=null&&i.type?gn.withOptions:""}
39
39
  ${o==="horizontal"?gn.horizontal:""}
40
- `,children:[((i==null?void 0:i.title)||(i==null?void 0:i.description)||(i==null?void 0:i.type))&&k.jsxs("div",{className:`${gn.popupHeader}`,style:d??{},children:[f()&&k.jsxs("div",{className:gn.typeIcon,children:[k.jsx("div",{style:{backgroundColor:(i==null?void 0:i.type)==="success"?"#DCFAE6":(i==null?void 0:i.type)==="unsaved"?"#FEF0C7":"#FEE4E2"},className:gn.icon,children:f()}),k.jsx("div",{style:{display:"grid",placeItems:"center",cursor:"pointer"},onClick:p,children:k.jsx(yu,{width:"24",height:"24",viewBox:"0 0 24 24",d:"M18 6L6 18M6 6L18 18",stroke:"#A4A7AE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})})]}),i&&(i==null?void 0:i.title)&&k.jsx("div",{className:gn.popupTitle,children:k.jsxs("h2",{style:c??{},children:[" ",(i==null?void 0:i.title)??""," "]})}),i&&(i==null?void 0:i.description)&&k.jsx("div",{className:gn.popupDescription,children:k.jsxs("p",{children:[" ",(i==null?void 0:i.description)??""," "]})})]}),k.jsxs("div",{className:gn.templateWrapper,style:u??{},children:[t&&t(),n&&n]})]})})},_P="FilterWithTags-module__compWrapper",gP="FilterWithTags-module__filterButton",mP="FilterWithTags-module__filter",CP="FilterWithTags-module__resultNumber",yP="FilterWithTags-module__filterCont",xP="FilterWithTags-module__title",bP="FilterWithTags-module__renderComponent",SP="FilterWithTags-module__singleComp",EP="FilterWithTags-module__footer",wP="FilterWithTags-module__clear",IP="FilterWithTags-module__buttonsWrapper",TP="FilterWithTags-module__tag",AP="FilterWithTags-module__checkbox",DP="FilterWithTags-module__toggle",OP="FilterWithTags-module__slider",RP="FilterWithTags-module__showButton",kP="FilterWithTags-module__rectGroup",BP="FilterWithTags-module__dark",hi={compWrapper:_P,filterButton:gP,filter:mP,resultNumber:CP,filterCont:yP,title:xP,renderComponent:bP,singleComp:SP,footer:EP,clear:wP,buttonsWrapper:IP,tag:TP,checkbox:AP,toggle:DP,slider:OP,showButton:RP,rectGroup:kP,dark:BP},LP="TimePicker-module__timepickerWrapper",PP="TimePicker-module__timepickerLabel",FP="TimePicker-module__required",MP="TimePicker-module__timepicker",VP="TimePicker-module__sm",NP="TimePicker-module__md",HP="TimePicker-module__focused",$P="TimePicker-module__error",WP="TimePicker-module__disabled",zP="TimePicker-module__dropdownList",GP="TimePicker-module__selected",UP="TimePicker-module__timepickerHelperText",KP="TimePicker-module__dark",qi={timepickerWrapper:LP,timepickerLabel:PP,required:FP,timepicker:MP,sm:VP,md:NP,focused:HP,error:$P,disabled:WP,dropdownList:zP,selected:GP,timepickerHelperText:UP,dark:KP};var bI={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Vt,function(){var i=1e3,n=6e4,r=36e5,a="millisecond",o="second",s="minute",l="hour",u="day",d="week",c="month",h="quarter",f="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,x={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(b){var j=["th","st","nd","rd"],ne=b%100;return"["+b+(j[(ne-20)%10]||j[ne]||j[0])+"]"}},T=function(b,j,ne){var J=String(b);return!J||J.length>=j?b:""+Array(j+1-J.length).join(ne)+b},R={s:T,z:function(b){var j=-b.utcOffset(),ne=Math.abs(j),J=Math.floor(ne/60),pe=ne%60;return(j<=0?"+":"-")+T(J,2,"0")+":"+T(pe,2,"0")},m:function b(j,ne){if(j.date()<ne.date())return-b(ne,j);var J=12*(ne.year()-j.year())+(ne.month()-j.month()),pe=j.clone().add(J,c),le=ne-pe<0,Q=j.clone().add(J+(le?-1:1),c);return+(-(J+(ne-pe)/(le?pe-Q:Q-pe))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return{M:c,y:f,w:d,d:u,D:p,h:l,m:s,s:o,ms:a,Q:h}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},A="en",H={};H[A]=x;var $="$isDayjsObject",V=function(b){return b instanceof M||!(!b||!b[$])},U=function b(j,ne,J){var pe;if(!j)return A;if(typeof j=="string"){var le=j.toLowerCase();H[le]&&(pe=le),ne&&(H[le]=ne,pe=le);var Q=j.split("-");if(!pe&&Q.length>1)return b(Q[0])}else{var z=j.name;H[z]=j,pe=z}return!J&&pe&&(A=pe),pe||!J&&A},K=function(b,j){if(V(b))return b.clone();var ne=typeof j=="object"?j:{};return ne.date=b,ne.args=arguments,new M(ne)},X=R;X.l=U,X.i=V,X.w=function(b,j){return K(b,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var M=function(){function b(ne){this.$L=U(ne.locale,null,!0),this.parse(ne),this.$x=this.$x||ne.x||{},this[$]=!0}var j=b.prototype;return j.parse=function(ne){this.$d=function(J){var pe=J.date,le=J.utc;if(pe===null)return new Date(NaN);if(X.u(pe))return new Date;if(pe instanceof Date)return new Date(pe);if(typeof pe=="string"&&!/Z$/i.test(pe)){var Q=pe.match(m);if(Q){var z=Q[2]-1||0,y=(Q[7]||"0").substring(0,3);return le?new Date(Date.UTC(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,y)):new Date(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,y)}}return new Date(pe)}(ne),this.init()},j.init=function(){var ne=this.$d;this.$y=ne.getFullYear(),this.$M=ne.getMonth(),this.$D=ne.getDate(),this.$W=ne.getDay(),this.$H=ne.getHours(),this.$m=ne.getMinutes(),this.$s=ne.getSeconds(),this.$ms=ne.getMilliseconds()},j.$utils=function(){return X},j.isValid=function(){return this.$d.toString()!==g},j.isSame=function(ne,J){var pe=K(ne);return this.startOf(J)<=pe&&pe<=this.endOf(J)},j.isAfter=function(ne,J){return K(ne)<this.startOf(J)},j.isBefore=function(ne,J){return this.endOf(J)<K(ne)},j.$g=function(ne,J,pe){return X.u(ne)?this[J]:this.set(pe,ne)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(ne,J){var pe=this,le=!!X.u(J)||J,Q=X.p(ne),z=function(ie,re){var _e=X.w(pe.$u?Date.UTC(pe.$y,re,ie):new Date(pe.$y,re,ie),pe);return le?_e:_e.endOf(u)},y=function(ie,re){return X.w(pe.toDate()[ie].apply(pe.toDate("s"),(le?[0,0,0,0]:[23,59,59,999]).slice(re)),pe)},I=this.$W,S=this.$M,B=this.$D,N="set"+(this.$u?"UTC":"");switch(Q){case f:return le?z(1,0):z(31,11);case c:return le?z(1,S):z(0,S+1);case d:var G=this.$locale().weekStart||0,W=(I<G?I+7:I)-G;return z(le?B-W:B+(6-W),S);case u:case p:return y(N+"Hours",0);case l:return y(N+"Minutes",1);case s:return y(N+"Seconds",2);case o:return y(N+"Milliseconds",3);default:return this.clone()}},j.endOf=function(ne){return this.startOf(ne,!1)},j.$set=function(ne,J){var pe,le=X.p(ne),Q="set"+(this.$u?"UTC":""),z=(pe={},pe[u]=Q+"Date",pe[p]=Q+"Date",pe[c]=Q+"Month",pe[f]=Q+"FullYear",pe[l]=Q+"Hours",pe[s]=Q+"Minutes",pe[o]=Q+"Seconds",pe[a]=Q+"Milliseconds",pe)[le],y=le===u?this.$D+(J-this.$W):J;if(le===c||le===f){var I=this.clone().set(p,1);I.$d[z](y),I.init(),this.$d=I.set(p,Math.min(this.$D,I.daysInMonth())).$d}else z&&this.$d[z](y);return this.init(),this},j.set=function(ne,J){return this.clone().$set(ne,J)},j.get=function(ne){return this[X.p(ne)]()},j.add=function(ne,J){var pe,le=this;ne=Number(ne);var Q=X.p(J),z=function(S){var B=K(le);return X.w(B.date(B.date()+Math.round(S*ne)),le)};if(Q===c)return this.set(c,this.$M+ne);if(Q===f)return this.set(f,this.$y+ne);if(Q===u)return z(1);if(Q===d)return z(7);var y=(pe={},pe[s]=n,pe[l]=r,pe[o]=i,pe)[Q]||1,I=this.$d.getTime()+ne*y;return X.w(I,this)},j.subtract=function(ne,J){return this.add(-1*ne,J)},j.format=function(ne){var J=this,pe=this.$locale();if(!this.isValid())return pe.invalidDate||g;var le=ne||"YYYY-MM-DDTHH:mm:ssZ",Q=X.z(this),z=this.$H,y=this.$m,I=this.$M,S=pe.weekdays,B=pe.months,N=pe.meridiem,G=function(re,_e,oe,Re){return re&&(re[_e]||re(J,le))||oe[_e].slice(0,Re)},W=function(re){return X.s(z%12||12,re,"0")},ie=N||function(re,_e,oe){var Re=re<12?"AM":"PM";return oe?Re.toLowerCase():Re};return le.replace(C,function(re,_e){return _e||function(oe){switch(oe){case"YY":return String(J.$y).slice(-2);case"YYYY":return X.s(J.$y,4,"0");case"M":return I+1;case"MM":return X.s(I+1,2,"0");case"MMM":return G(pe.monthsShort,I,B,3);case"MMMM":return G(B,I);case"D":return J.$D;case"DD":return X.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return G(pe.weekdaysMin,J.$W,S,2);case"ddd":return G(pe.weekdaysShort,J.$W,S,3);case"dddd":return S[J.$W];case"H":return String(z);case"HH":return X.s(z,2,"0");case"h":return W(1);case"hh":return W(2);case"a":return ie(z,y,!0);case"A":return ie(z,y,!1);case"m":return String(y);case"mm":return X.s(y,2,"0");case"s":return String(J.$s);case"ss":return X.s(J.$s,2,"0");case"SSS":return X.s(J.$ms,3,"0");case"Z":return Q}return null}(re)||Q.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(ne,J,pe){var le,Q=this,z=X.p(J),y=K(ne),I=(y.utcOffset()-this.utcOffset())*n,S=this-y,B=function(){return X.m(Q,y)};switch(z){case f:le=B()/12;break;case c:le=B();break;case h:le=B()/3;break;case d:le=(S-I)/6048e5;break;case u:le=(S-I)/864e5;break;case l:le=S/r;break;case s:le=S/n;break;case o:le=S/i;break;default:le=S}return pe?le:X.a(le)},j.daysInMonth=function(){return this.endOf(c).$D},j.$locale=function(){return H[this.$L]},j.locale=function(ne,J){if(!ne)return this.$L;var pe=this.clone(),le=U(ne,J,!0);return le&&(pe.$L=le),pe},j.clone=function(){return X.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},b}(),q=M.prototype;return K.prototype=q,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",u],["$M",c],["$y",f],["$D",p]].forEach(function(b){q[b[1]]=function(j){return this.$g(j,b[0],b[1])}}),K.extend=function(b,j){return b.$i||(b(j,M,K),b.$i=!0),K},K.locale=U,K.isDayjs=V,K.unix=function(b){return K(1e3*b)},K.en=H[A],K.Ls=H,K.p={},K})})(bI);var jP=bI.exports;const et=Bg(jP),qP=()=>k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[k.jsx("g",{clipPath:"url(#clip0_1321_39043)",children:k.jsx("path",{d:"M10.0013 4.99935V9.99935L13.3346 11.666M18.3346 9.99935C18.3346 14.6017 14.6037 18.3327 10.0013 18.3327C5.39893 18.3327 1.66797 14.6017 1.66797 9.99935C1.66797 5.39698 5.39893 1.66602 10.0013 1.66602C14.6037 1.66602 18.3346 5.39698 18.3346 9.99935Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),k.jsx("defs",{children:k.jsx("clipPath",{id:"clip0_1321_39043",children:k.jsx("rect",{width:"20",height:"20",fill:"white"})})})]});var SI={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Vt,function(){var i={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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,a=/\d\d/,o=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(m){return(m=+m)+(m>68?1900:2e3)},d=function(m){return function(C){this[m]=+C}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var x=C.match(/([+-]|\d\d)/g),T=60*x[1]+(+x[2]||0);return T===0?0:x[0]==="+"?-T:T}(m)}],h=function(m){var C=l[m];return C&&(C.indexOf?C:C.s.concat(C.f))},f=function(m,C){var x,T=l.meridiem;if(T){for(var R=1;R<=24;R+=1)if(m.indexOf(T(R,0,C))>-1){x=R>12;break}}else x=m===(C?"pm":"PM");return x},p={A:[s,function(m){this.afternoon=f(m,!1)}],a:[s,function(m){this.afternoon=f(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[a,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[o,d("seconds")],ss:[o,d("seconds")],m:[o,d("minutes")],mm:[o,d("minutes")],H:[o,d("hours")],h:[o,d("hours")],HH:[o,d("hours")],hh:[o,d("hours")],D:[o,d("day")],DD:[a,d("day")],Do:[s,function(m){var C=l.ordinal,x=m.match(/\d+/);if(this.day=x[0],C)for(var T=1;T<=31;T+=1)C(T).replace(/\[|\]/g,"")===m&&(this.day=T)}],w:[o,d("week")],ww:[a,d("week")],M:[o,d("month")],MM:[a,d("month")],MMM:[s,function(m){var C=h("months"),x=(h("monthsShort")||C.map(function(T){return T.slice(0,3)})).indexOf(m)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[s,function(m){var C=h("months").indexOf(m)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(m){this.year=u(m)}],YYYY:[/\d{4}/,d("year")],Z:c,ZZ:c};function g(m){var C,x;C=m,x=l&&l.formats;for(var T=(m=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(K,X,M){var q=M&&M.toUpperCase();return X||x[M]||i[M]||x[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,j,ne){return j||ne.slice(1)})})).match(n),R=T.length,A=0;A<R;A+=1){var H=T[A],$=p[H],V=$&&$[0],U=$&&$[1];T[A]=U?{regex:V,parser:U}:H.replace(/^\[|\]$/g,"")}return function(K){for(var X={},M=0,q=0;M<R;M+=1){var b=T[M];if(typeof b=="string")q+=b.length;else{var j=b.regex,ne=b.parser,J=K.slice(q),pe=j.exec(J)[0];ne.call(X,pe),K=K.replace(pe,"")}}return function(le){var Q=le.afternoon;if(Q!==void 0){var z=le.hours;Q?z<12&&(le.hours+=12):z===12&&(le.hours=0),delete le.afternoon}}(X),X}}return function(m,C,x){x.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(u=m.parseTwoDigitYear);var T=C.prototype,R=T.parse;T.parse=function(A){var H=A.date,$=A.utc,V=A.args;this.$u=$;var U=V[1];if(typeof U=="string"){var K=V[2]===!0,X=V[3]===!0,M=K||X,q=V[2];X&&(q=V[2]),l=this.$locale(),!K&&q&&(l=x.Ls[q]),this.$d=function(J,pe,le,Q){try{if(["x","X"].indexOf(pe)>-1)return new Date((pe==="X"?1e3:1)*J);var z=g(pe)(J),y=z.year,I=z.month,S=z.day,B=z.hours,N=z.minutes,G=z.seconds,W=z.milliseconds,ie=z.zone,re=z.week,_e=new Date,oe=S||(y||I?1:_e.getDate()),Re=y||_e.getFullYear(),w=0;y&&!I||(w=I>0?I-1:_e.getMonth());var he,se=B||0,L=N||0,P=G||0,Y=W||0;return ie?new Date(Date.UTC(Re,w,oe,se,L,P,Y+60*ie.offset*1e3)):le?new Date(Date.UTC(Re,w,oe,se,L,P,Y)):(he=new Date(Re,w,oe,se,L,P,Y),re&&(he=Q(he).week(re).toDate()),he)}catch{return new Date("")}}(H,U,$,x),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),M&&H!=this.format(U)&&(this.$d=new Date("")),l={}}else if(U instanceof Array)for(var b=U.length,j=1;j<=b;j+=1){V[1]=U[j-1];var ne=x.apply(this,V);if(ne.isValid()){this.$d=ne.$d,this.$L=ne.$L,this.init();break}j===b&&(this.$d=new Date(""))}else R.call(this,A)}}})})(SI);var YP=SI.exports;const Fg=Bg(YP);et.extend(Fg);const EI=({label:e,required:t,placeholder:i,format:n,defaultHour:r,defaultMinute:a,size:o="md",msg:s,onTimeChange:l,onFocus:u,onBlur:d,timepickerStyle:c,dropdownListStyle:h,hoursListStyle:f,minutesListStyle:p,timepickerHelperTextStyle:g,timepickerLabelStyle:m,requiredStyle:C,theme:x,fixedDropdown:T})=>{const[R,A]=ve.useState(!1);ve.useRef(!1);const[H,$]=ve.useState(""),V=ve.useRef(null),U=ve.useRef(null),K=ve.useRef(null),X=ve.useRef(null),M=ve.useCallback(()=>Array.from({length:60},(y,I)=>I<10?`0${I}`:`${I}`),[]),q=ve.useCallback(()=>Array.from({length:23},(y,I)=>I<9?`0${I+1}`:`${I+1}`),[]),b=(z,y,I)=>{z.stopPropagation(),z.target.scrollIntoView({behavior:"smooth",block:"start"}),I==="hour"&&(U.current=y,V.current||(V.current="00")),I==="minute"&&(V.current=y,U.current||(U.current="00"));const S=et().hour(parseInt(U.current??"0",10)).minute(parseInt(V.current??"0",10)).format(n??"HH:mm");$(S),l&&typeof l=="function"&&l(S)},j=z=>{z.stopPropagation(),U.current=null,V.current=null,$(""),l&&typeof l=="function"&&l("")},ne=z=>{z.composedPath().includes(K.current)||A(!1)},J=z=>{T&&z.composedPath().includes(K.current)||A(!1)},pe=()=>{u&&typeof u=="function"&&u()},le=()=>{const z=K.current,y=X.current;if(!y||!z)return;const I=z.getBoundingClientRect(),S=window.innerHeight;T?(y.style.position="fixed",y.style.left=`${I.left+window.pageXOffset}px`,I.bottom+y.offsetHeight>S?(y.style.top=`${window.scrollY+I.top-y.offsetHeight-8}px`,y.style.bottom="unset"):(y.style.top=`${window.scrollY+I.bottom}px`,y.style.bottom="unset")):I.bottom>S?(y.style.top="unset",y.style.bottom="calc(100% + 8px)"):(y.style.bottom="unset",y.style.top="calc(100% + 8px)")},Q=ve.useRef(!0);return ve.useEffect(()=>{if(r){const z=et().hour(parseInt(r,10)).minute(parseInt(a??"0",10)).format(n??"HH:mm");U.current=r,V.current=a??"00",$(z)}},[]),ve.useEffect(()=>{if(Q.current){Q.current=!1;return}R||d&&typeof d=="function"&&d()},[R]),ve.useEffect(()=>{le()},[K,R]),ve.useEffect(()=>(document.addEventListener("click",ne),document.addEventListener("wheel",J),()=>{document.removeEventListener("click",ne),document.removeEventListener("wheel",J)}),[]),k.jsxs("div",{className:`${x==="dark"?qi.dark:""} ${qi.timepickerWrapper}`,children:[e&&k.jsxs("label",{className:qi.timepickerLabel,style:m??{},children:[e," ",k.jsx("span",{className:qi.required,style:C??{},children:t&&"*"})]}),k.jsxs("div",{ref:K,onFocus:pe,className:`${qi.timepicker} ${R?qi.focused:""} ${qi[o]}`,onClick:()=>A(z=>!z),style:c??{},children:[k.jsx("div",{style:{display:"grid",placeItems:"center"},children:k.jsx(qP,{})}),k.jsx("input",{type:"text",readOnly:!0,placeholder:i??"",value:H}),H?k.jsx("div",{onClick:z=>j(z),style:{display:"grid",placeItems:"center"},children:k.jsx(yu,{})}):k.jsx("div",{style:{display:"grid",placeItems:"center",transform:R?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:k.jsx(wh,{})}),R&&k.jsxs("div",{ref:X,className:qi.dropdownList,style:h??{},children:[k.jsx("ul",{className:qi.hours,children:q().map(z=>k.jsx("li",{style:f??{},className:`${z===U.current?qi.selected:""}`,onClick:y=>b(y,z,"hour"),children:z},z))}),k.jsx("ul",{className:qi.minutes,children:M().map(z=>k.jsx("li",{style:p??{},className:`${z===V.current?qi.selected:""}`,onClick:y=>b(y,z,"minute"),children:z},z))})]})]}),s&&(s==null?void 0:s.visible)&&k.jsx("div",{style:g??{},className:`${qi.timepickerHelperText} ${s!=null&&s.error?qi.error:""}`,children:k.jsx("p",{style:(s==null?void 0:s.style)??{},children:s.text})})]})},XP="DatePicker-module__datepickerContainer",ZP="DatePicker-module__datepickerLabel",QP="DatePicker-module__required",JP="DatePicker-module__datepicker",eF="DatePicker-module__sm",tF="DatePicker-module__md",iF="DatePicker-module__focused",nF="DatePicker-module__error",rF="DatePicker-module__disabled",aF="DatePicker-module__datepickerHelperText",oF="DatePicker-module__dark",Kn={datepickerContainer:XP,datepickerLabel:ZP,required:QP,datepicker:JP,sm:eF,md:tF,focused:iF,error:nF,disabled:rF,datepickerHelperText:aF,dark:oF},UC=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k.jsx("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),KC=({style:e})=>k.jsx("svg",{style:e??{},xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k.jsx("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),sF="Calendar-module__datePicker",lF="Calendar-module__dualCalendar",uF="Calendar-module__dualCalendarWithQuick",dF="Calendar-module__border",cF="Calendar-module__calendarWrapper",hF="Calendar-module__quickPick",fF="Calendar-module__datePickerHeader",pF="Calendar-module__left",vF="Calendar-module__right",_F="Calendar-module__div",gF="Calendar-module__day",mF="Calendar-module__today",CF="Calendar-module__inRange",yF="Calendar-module__selected",xF="Calendar-module__startDate",bF="Calendar-module__endDate",SF="Calendar-module__otherMonth",EF="Calendar-module__dark",Pt={datePicker:sF,dualCalendar:lF,dualCalendarWithQuick:uF,border:dF,calendarWrapper:cF,quickPick:hF,datePickerHeader:fF,left:pF,right:vF,div:_F,day:gF,today:mF,inRange:CF,selected:yF,startDate:xF,endDate:bF,otherMonth:SF,dark:EF};et.extend(Fg);const wF=({valueFormat:e,quickPick:t,onChange:i,CurrentMonth:n,setCurrentMonth:r,SelectedDate:a,setSelectedDate:o,IsFocused:s,setIsFocused:l,mode:u,RangeSelection:d,setRangeSelection:c,type:h,CalendarRef:f,defaultValue:p,theme:g})=>{const m=["Mo","Tu","We","Th","Fr","Sa","Su"],C=ve.useRef([]),x=K=>{const X=(K.startOf("month").day()+6)%7,M=K.endOf("month").date(),q=K.subtract(1,"month").endOf("month").date(),b=[];let j=[],ne=1;for(let pe=0;pe<X;pe++)j.push({date:K.subtract(1,"month").date(q-X+pe+1),currentMonth:!1});for(;ne<=M;)j.push({date:K.date(ne++),currentMonth:!0}),j.length===7&&(b.push(j),j=[]);let J=1;for(;b.length<5;)j.length===7&&(b.push(j),j=[]),j.push({date:K.add(1,"month").date(J++),currentMonth:!1});if(j.length){for(;j.length<7;)j.push({date:K.add(1,"month").date(J++),currentMonth:!1});b.push(j)}return b},T=x(n),R=h==="dual"?x(n.add(1,"month")):null,A=()=>{let K=[];return t&&Array.isArray(t)&&t.length>0&&t.forEach(X=>{switch(X){case"today":C.current.push({name:"Today",key:"Today"});break;case"yesterday":C.current.push({name:"Yesterday",key:"Yesterday"});break;case"thisweek":C.current.push({name:"This week",key:"Thisweek"});break;case"lastweek":C.current.push({name:"Last week",key:"Lastweek"});break;case"thismonth":C.current.push({name:"This month",key:"Thismonth"});break;case"lastmonth":C.current.push({name:"Last month",key:"Lastmonth"});break;case"thisyear":C.current.push({name:"This year",key:"Thisyear"});break;case"lastyear":C.current.push({name:"Last year",key:"Lastyear"});break;case"alltime":C.current.push({name:"All time",key:"Alltime"});break}}),C.current=fP(C.current,"key"),K=C.current,K},H=K=>{let X={start:"",end:""};switch(o(null),K.key.toLowerCase()){case"today":c({start:et(),end:et()}),X.start=et();break;case"yesterday":o(et().subtract(1,"day")),c({start:et().subtract(1,"day"),end:et().subtract(1,"day")}),X.start=et().subtract(1,"day");break;case"thisweek":c({start:et().startOf("week"),end:et().endOf("week")}),X.start=et().startOf("week"),X.end=et().endOf("week");break;case"lastweek":c({start:et().subtract(1,"week").startOf("week"),end:et().subtract(1,"week").endOf("week")}),X.start=et().subtract(1,"week").startOf("week"),X.end=et().subtract(1,"week").endOf("week");break;case"thismonth":c({start:et().startOf("month"),end:et().endOf("month")}),X.start=et().startOf("month"),X.end=et().endOf("month");break;case"lastmonth":c({start:et().subtract(1,"month").startOf("month"),end:et().subtract(1,"month").endOf("month")}),X.start=et().subtract(1,"month").startOf("month"),X.end=et().subtract(1,"month").endOf("month");break;case"thisyear":c({start:et().startOf("year"),end:et().endOf("year")}),X.start=et().startOf("year"),X.end=et().endOf("year");break;case"lastyear":c({start:et().subtract(1,"year").startOf("year"),end:et().subtract(1,"year").endOf("year")}),X.start=et().subtract(1,"year").startOf("year"),X.end=et().subtract(1,"year").endOf("year");break;case"alltime":c({start:"",end:""}),X.start="",X.end="";break;default:console.warn("Unsupported quick pick option:",K);break}if(i&&typeof i=="function"){const M={start:X.start?X.start:"",end:X.end?X.end:""};l(!1),i(M.end===""?M.start:M,M.end==="")}return K},$=(K,X,M=!1)=>{X||r(K.startOf("month")),u==="range"?c(q=>!q.start||q.start&&q.end?(i&&typeof i=="function"&&i({start:K??"",end:""}),{start:K??"",end:""}):q.start&&!q.end?K.isBefore(q.start,"day")?(i&&typeof i=="function"&&i({start:K??"",end:(q==null?void 0:q.start)??""}),{start:K??"",end:(q==null?void 0:q.start)??""}):(i({...q,end:K??""}),{...q,end:K??""}):q):(c({start:null,end:null}),o(K),M||(l(!1),i&&typeof i=="function"&&i(K.format(e??"DD-MM-YYYY"))))},V=()=>{r(n.add(1,"month"))},U=()=>{r(n.subtract(1,"month"))};return ve.useEffect(()=>{p.state&&(Array.isArray(p.value)?c({start:et(p.value[0],"DD-MM-YYYY"),end:et(p.value[1],"DD-MM-YYYY")}):$(et(p.value,"DD-MM-YYYY"),!1,!0),p.state=!1)},[]),k.jsxs("div",{ref:f,className:`${g==="dark"?Pt.dark:""} ${Pt.datePicker} ${s?Pt.focused:""} ${h==="dual"?t&&t.length?Pt.dualCalendarWithQuick:Pt.dualCalendar:""} `,onClick:K=>K.stopPropagation(),style:h==="dual"&&t&&t.length>0?{width:"848px"}:{},children:[h==="dual"&&t&&t.length>0&&k.jsx("div",{children:t&&t.length>0&&k.jsx("ul",{className:Pt.quickPick,children:A().map(K=>k.jsx("li",{onClick:()=>H(K),children:K.name},K.key))})}),k.jsxs("div",{className:Pt.div,children:[h==="dual"?k.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"space-between"},children:[k.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"80px"},children:[k.jsx("div",{className:Pt.left,onClick:U,children:k.jsx(UC,{})}),k.jsx("span",{children:n.format("MMMM YYYY")})]}),k.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"80px"},children:[k.jsx("span",{children:n.add(1,"month").format("MMMM YYYY")}),k.jsx("div",{className:Pt.right,onClick:V,children:k.jsx(KC,{})})]})]}):k.jsxs("div",{className:Pt.datePickerHeader,children:[k.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[k.jsx("div",{className:Pt.left,onClick:U,children:k.jsx(UC,{})}),k.jsx("span",{children:n.format("MMMM YYYY")}),k.jsx("div",{className:Pt.right,onClick:V,children:k.jsx(KC,{})})]}),h==="single"&&t&&t.length>0&&k.jsx("ul",{className:Pt.quickPick,children:A().slice(0,3).map(K=>k.jsx("li",{onClick:()=>H(K),children:K.name},K.key))})]}),k.jsxs("div",{className:Pt.calendarWrapper,children:[k.jsxs("table",{children:[k.jsx("thead",{children:k.jsx("tr",{children:m.map(K=>k.jsx("th",{children:K},K))})}),k.jsx("tbody",{children:T.map((K,X)=>k.jsx("tr",{children:K.map(({date:M,currentMonth:q},b)=>{const j=d.start&&d.end&&M.isAfter(d.start,"day")&&M.isBefore(d.end,"day"),ne=d.start&&M.isSame(d.start,"day"),J=d.end&&M.isSame(d.end,"day"),pe=u==="single"&&a&&M.isSame(a,"day");return k.jsx("td",{className:`${Pt.day}
40
+ `,children:[((i==null?void 0:i.title)||(i==null?void 0:i.description)||(i==null?void 0:i.type))&&k.jsxs("div",{className:`${gn.popupHeader}`,style:d??{},children:[f()&&k.jsxs("div",{className:gn.typeIcon,children:[k.jsx("div",{style:{backgroundColor:(i==null?void 0:i.type)==="success"?"#DCFAE6":(i==null?void 0:i.type)==="unsaved"?"#FEF0C7":"#FEE4E2"},className:gn.icon,children:f()}),k.jsx("div",{style:{display:"grid",placeItems:"center",cursor:"pointer"},onClick:p,children:k.jsx(yu,{width:"24",height:"24",viewBox:"0 0 24 24",d:"M18 6L6 18M6 6L18 18",stroke:"#A4A7AE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})})]}),i&&(i==null?void 0:i.title)&&k.jsx("div",{className:gn.popupTitle,children:k.jsxs("h2",{style:c??{},children:[" ",(i==null?void 0:i.title)??""," "]})}),i&&(i==null?void 0:i.description)&&k.jsx("div",{className:gn.popupDescription,children:k.jsxs("p",{children:[" ",(i==null?void 0:i.description)??""," "]})})]}),k.jsxs("div",{className:gn.templateWrapper,style:u??{},children:[t&&t(),n&&n]})]})})},_P="FilterWithTags-module__compWrapper",gP="FilterWithTags-module__filterButton",mP="FilterWithTags-module__filter",CP="FilterWithTags-module__resultNumber",yP="FilterWithTags-module__filterCont",xP="FilterWithTags-module__title",bP="FilterWithTags-module__renderComponent",SP="FilterWithTags-module__singleComp",EP="FilterWithTags-module__footer",wP="FilterWithTags-module__clear",IP="FilterWithTags-module__buttonsWrapper",TP="FilterWithTags-module__tag",AP="FilterWithTags-module__checkbox",DP="FilterWithTags-module__toggle",OP="FilterWithTags-module__slider",RP="FilterWithTags-module__showButton",kP="FilterWithTags-module__rectGroup",BP="FilterWithTags-module__dark",hi={compWrapper:_P,filterButton:gP,filter:mP,resultNumber:CP,filterCont:yP,title:xP,renderComponent:bP,singleComp:SP,footer:EP,clear:wP,buttonsWrapper:IP,tag:TP,checkbox:AP,toggle:DP,slider:OP,showButton:RP,rectGroup:kP,dark:BP},LP="TimePicker-module__timepickerWrapper",PP="TimePicker-module__timepickerLabel",FP="TimePicker-module__required",MP="TimePicker-module__timepicker",VP="TimePicker-module__sm",NP="TimePicker-module__md",HP="TimePicker-module__focused",$P="TimePicker-module__error",WP="TimePicker-module__disabled",zP="TimePicker-module__dropdownList",GP="TimePicker-module__selected",UP="TimePicker-module__timepickerHelperText",KP="TimePicker-module__dark",qi={timepickerWrapper:LP,timepickerLabel:PP,required:FP,timepicker:MP,sm:VP,md:NP,focused:HP,error:$P,disabled:WP,dropdownList:zP,selected:GP,timepickerHelperText:UP,dark:KP};var bI={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Vt,function(){var i=1e3,n=6e4,r=36e5,a="millisecond",o="second",s="minute",l="hour",u="day",d="week",c="month",h="quarter",f="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,x={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(b){var j=["th","st","nd","rd"],ne=b%100;return"["+b+(j[(ne-20)%10]||j[ne]||j[0])+"]"}},T=function(b,j,ne){var J=String(b);return!J||J.length>=j?b:""+Array(j+1-J.length).join(ne)+b},R={s:T,z:function(b){var j=-b.utcOffset(),ne=Math.abs(j),J=Math.floor(ne/60),pe=ne%60;return(j<=0?"+":"-")+T(J,2,"0")+":"+T(pe,2,"0")},m:function b(j,ne){if(j.date()<ne.date())return-b(ne,j);var J=12*(ne.year()-j.year())+(ne.month()-j.month()),pe=j.clone().add(J,c),le=ne-pe<0,Q=j.clone().add(J+(le?-1:1),c);return+(-(J+(ne-pe)/(le?pe-Q:Q-pe))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return{M:c,y:f,w:d,d:u,D:p,h:l,m:s,s:o,ms:a,Q:h}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},A="en",H={};H[A]=x;var $="$isDayjsObject",V=function(b){return b instanceof M||!(!b||!b[$])},U=function b(j,ne,J){var pe;if(!j)return A;if(typeof j=="string"){var le=j.toLowerCase();H[le]&&(pe=le),ne&&(H[le]=ne,pe=le);var Q=j.split("-");if(!pe&&Q.length>1)return b(Q[0])}else{var z=j.name;H[z]=j,pe=z}return!J&&pe&&(A=pe),pe||!J&&A},K=function(b,j){if(V(b))return b.clone();var ne=typeof j=="object"?j:{};return ne.date=b,ne.args=arguments,new M(ne)},X=R;X.l=U,X.i=V,X.w=function(b,j){return K(b,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var M=function(){function b(ne){this.$L=U(ne.locale,null,!0),this.parse(ne),this.$x=this.$x||ne.x||{},this[$]=!0}var j=b.prototype;return j.parse=function(ne){this.$d=function(J){var pe=J.date,le=J.utc;if(pe===null)return new Date(NaN);if(X.u(pe))return new Date;if(pe instanceof Date)return new Date(pe);if(typeof pe=="string"&&!/Z$/i.test(pe)){var Q=pe.match(m);if(Q){var z=Q[2]-1||0,y=(Q[7]||"0").substring(0,3);return le?new Date(Date.UTC(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,y)):new Date(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,y)}}return new Date(pe)}(ne),this.init()},j.init=function(){var ne=this.$d;this.$y=ne.getFullYear(),this.$M=ne.getMonth(),this.$D=ne.getDate(),this.$W=ne.getDay(),this.$H=ne.getHours(),this.$m=ne.getMinutes(),this.$s=ne.getSeconds(),this.$ms=ne.getMilliseconds()},j.$utils=function(){return X},j.isValid=function(){return this.$d.toString()!==g},j.isSame=function(ne,J){var pe=K(ne);return this.startOf(J)<=pe&&pe<=this.endOf(J)},j.isAfter=function(ne,J){return K(ne)<this.startOf(J)},j.isBefore=function(ne,J){return this.endOf(J)<K(ne)},j.$g=function(ne,J,pe){return X.u(ne)?this[J]:this.set(pe,ne)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(ne,J){var pe=this,le=!!X.u(J)||J,Q=X.p(ne),z=function(ie,re){var _e=X.w(pe.$u?Date.UTC(pe.$y,re,ie):new Date(pe.$y,re,ie),pe);return le?_e:_e.endOf(u)},y=function(ie,re){return X.w(pe.toDate()[ie].apply(pe.toDate("s"),(le?[0,0,0,0]:[23,59,59,999]).slice(re)),pe)},I=this.$W,S=this.$M,B=this.$D,N="set"+(this.$u?"UTC":"");switch(Q){case f:return le?z(1,0):z(31,11);case c:return le?z(1,S):z(0,S+1);case d:var G=this.$locale().weekStart||0,W=(I<G?I+7:I)-G;return z(le?B-W:B+(6-W),S);case u:case p:return y(N+"Hours",0);case l:return y(N+"Minutes",1);case s:return y(N+"Seconds",2);case o:return y(N+"Milliseconds",3);default:return this.clone()}},j.endOf=function(ne){return this.startOf(ne,!1)},j.$set=function(ne,J){var pe,le=X.p(ne),Q="set"+(this.$u?"UTC":""),z=(pe={},pe[u]=Q+"Date",pe[p]=Q+"Date",pe[c]=Q+"Month",pe[f]=Q+"FullYear",pe[l]=Q+"Hours",pe[s]=Q+"Minutes",pe[o]=Q+"Seconds",pe[a]=Q+"Milliseconds",pe)[le],y=le===u?this.$D+(J-this.$W):J;if(le===c||le===f){var I=this.clone().set(p,1);I.$d[z](y),I.init(),this.$d=I.set(p,Math.min(this.$D,I.daysInMonth())).$d}else z&&this.$d[z](y);return this.init(),this},j.set=function(ne,J){return this.clone().$set(ne,J)},j.get=function(ne){return this[X.p(ne)]()},j.add=function(ne,J){var pe,le=this;ne=Number(ne);var Q=X.p(J),z=function(S){var B=K(le);return X.w(B.date(B.date()+Math.round(S*ne)),le)};if(Q===c)return this.set(c,this.$M+ne);if(Q===f)return this.set(f,this.$y+ne);if(Q===u)return z(1);if(Q===d)return z(7);var y=(pe={},pe[s]=n,pe[l]=r,pe[o]=i,pe)[Q]||1,I=this.$d.getTime()+ne*y;return X.w(I,this)},j.subtract=function(ne,J){return this.add(-1*ne,J)},j.format=function(ne){var J=this,pe=this.$locale();if(!this.isValid())return pe.invalidDate||g;var le=ne||"YYYY-MM-DDTHH:mm:ssZ",Q=X.z(this),z=this.$H,y=this.$m,I=this.$M,S=pe.weekdays,B=pe.months,N=pe.meridiem,G=function(re,_e,oe,Re){return re&&(re[_e]||re(J,le))||oe[_e].slice(0,Re)},W=function(re){return X.s(z%12||12,re,"0")},ie=N||function(re,_e,oe){var Re=re<12?"AM":"PM";return oe?Re.toLowerCase():Re};return le.replace(C,function(re,_e){return _e||function(oe){switch(oe){case"YY":return String(J.$y).slice(-2);case"YYYY":return X.s(J.$y,4,"0");case"M":return I+1;case"MM":return X.s(I+1,2,"0");case"MMM":return G(pe.monthsShort,I,B,3);case"MMMM":return G(B,I);case"D":return J.$D;case"DD":return X.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return G(pe.weekdaysMin,J.$W,S,2);case"ddd":return G(pe.weekdaysShort,J.$W,S,3);case"dddd":return S[J.$W];case"H":return String(z);case"HH":return X.s(z,2,"0");case"h":return W(1);case"hh":return W(2);case"a":return ie(z,y,!0);case"A":return ie(z,y,!1);case"m":return String(y);case"mm":return X.s(y,2,"0");case"s":return String(J.$s);case"ss":return X.s(J.$s,2,"0");case"SSS":return X.s(J.$ms,3,"0");case"Z":return Q}return null}(re)||Q.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(ne,J,pe){var le,Q=this,z=X.p(J),y=K(ne),I=(y.utcOffset()-this.utcOffset())*n,S=this-y,B=function(){return X.m(Q,y)};switch(z){case f:le=B()/12;break;case c:le=B();break;case h:le=B()/3;break;case d:le=(S-I)/6048e5;break;case u:le=(S-I)/864e5;break;case l:le=S/r;break;case s:le=S/n;break;case o:le=S/i;break;default:le=S}return pe?le:X.a(le)},j.daysInMonth=function(){return this.endOf(c).$D},j.$locale=function(){return H[this.$L]},j.locale=function(ne,J){if(!ne)return this.$L;var pe=this.clone(),le=U(ne,J,!0);return le&&(pe.$L=le),pe},j.clone=function(){return X.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},b}(),q=M.prototype;return K.prototype=q,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",u],["$M",c],["$y",f],["$D",p]].forEach(function(b){q[b[1]]=function(j){return this.$g(j,b[0],b[1])}}),K.extend=function(b,j){return b.$i||(b(j,M,K),b.$i=!0),K},K.locale=U,K.isDayjs=V,K.unix=function(b){return K(1e3*b)},K.en=H[A],K.Ls=H,K.p={},K})})(bI);var jP=bI.exports;const et=Bg(jP),qP=()=>k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[k.jsx("g",{clipPath:"url(#clip0_1321_39043)",children:k.jsx("path",{d:"M10.0013 4.99935V9.99935L13.3346 11.666M18.3346 9.99935C18.3346 14.6017 14.6037 18.3327 10.0013 18.3327C5.39893 18.3327 1.66797 14.6017 1.66797 9.99935C1.66797 5.39698 5.39893 1.66602 10.0013 1.66602C14.6037 1.66602 18.3346 5.39698 18.3346 9.99935Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),k.jsx("defs",{children:k.jsx("clipPath",{id:"clip0_1321_39043",children:k.jsx("rect",{width:"20",height:"20",fill:"white"})})})]});var SI={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(Vt,function(){var i={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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,a=/\d\d/,o=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(m){return(m=+m)+(m>68?1900:2e3)},d=function(m){return function(C){this[m]=+C}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var x=C.match(/([+-]|\d\d)/g),T=60*x[1]+(+x[2]||0);return T===0?0:x[0]==="+"?-T:T}(m)}],h=function(m){var C=l[m];return C&&(C.indexOf?C:C.s.concat(C.f))},f=function(m,C){var x,T=l.meridiem;if(T){for(var R=1;R<=24;R+=1)if(m.indexOf(T(R,0,C))>-1){x=R>12;break}}else x=m===(C?"pm":"PM");return x},p={A:[s,function(m){this.afternoon=f(m,!1)}],a:[s,function(m){this.afternoon=f(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[a,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[o,d("seconds")],ss:[o,d("seconds")],m:[o,d("minutes")],mm:[o,d("minutes")],H:[o,d("hours")],h:[o,d("hours")],HH:[o,d("hours")],hh:[o,d("hours")],D:[o,d("day")],DD:[a,d("day")],Do:[s,function(m){var C=l.ordinal,x=m.match(/\d+/);if(this.day=x[0],C)for(var T=1;T<=31;T+=1)C(T).replace(/\[|\]/g,"")===m&&(this.day=T)}],w:[o,d("week")],ww:[a,d("week")],M:[o,d("month")],MM:[a,d("month")],MMM:[s,function(m){var C=h("months"),x=(h("monthsShort")||C.map(function(T){return T.slice(0,3)})).indexOf(m)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[s,function(m){var C=h("months").indexOf(m)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(m){this.year=u(m)}],YYYY:[/\d{4}/,d("year")],Z:c,ZZ:c};function g(m){var C,x;C=m,x=l&&l.formats;for(var T=(m=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(K,X,M){var q=M&&M.toUpperCase();return X||x[M]||i[M]||x[q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,j,ne){return j||ne.slice(1)})})).match(n),R=T.length,A=0;A<R;A+=1){var H=T[A],$=p[H],V=$&&$[0],U=$&&$[1];T[A]=U?{regex:V,parser:U}:H.replace(/^\[|\]$/g,"")}return function(K){for(var X={},M=0,q=0;M<R;M+=1){var b=T[M];if(typeof b=="string")q+=b.length;else{var j=b.regex,ne=b.parser,J=K.slice(q),pe=j.exec(J)[0];ne.call(X,pe),K=K.replace(pe,"")}}return function(le){var Q=le.afternoon;if(Q!==void 0){var z=le.hours;Q?z<12&&(le.hours+=12):z===12&&(le.hours=0),delete le.afternoon}}(X),X}}return function(m,C,x){x.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(u=m.parseTwoDigitYear);var T=C.prototype,R=T.parse;T.parse=function(A){var H=A.date,$=A.utc,V=A.args;this.$u=$;var U=V[1];if(typeof U=="string"){var K=V[2]===!0,X=V[3]===!0,M=K||X,q=V[2];X&&(q=V[2]),l=this.$locale(),!K&&q&&(l=x.Ls[q]),this.$d=function(J,pe,le,Q){try{if(["x","X"].indexOf(pe)>-1)return new Date((pe==="X"?1e3:1)*J);var z=g(pe)(J),y=z.year,I=z.month,S=z.day,B=z.hours,N=z.minutes,G=z.seconds,W=z.milliseconds,ie=z.zone,re=z.week,_e=new Date,oe=S||(y||I?1:_e.getDate()),Re=y||_e.getFullYear(),w=0;y&&!I||(w=I>0?I-1:_e.getMonth());var he,se=B||0,L=N||0,P=G||0,Y=W||0;return ie?new Date(Date.UTC(Re,w,oe,se,L,P,Y+60*ie.offset*1e3)):le?new Date(Date.UTC(Re,w,oe,se,L,P,Y)):(he=new Date(Re,w,oe,se,L,P,Y),re&&(he=Q(he).week(re).toDate()),he)}catch{return new Date("")}}(H,U,$,x),this.init(),q&&q!==!0&&(this.$L=this.locale(q).$L),M&&H!=this.format(U)&&(this.$d=new Date("")),l={}}else if(U instanceof Array)for(var b=U.length,j=1;j<=b;j+=1){V[1]=U[j-1];var ne=x.apply(this,V);if(ne.isValid()){this.$d=ne.$d,this.$L=ne.$L,this.init();break}j===b&&(this.$d=new Date(""))}else R.call(this,A)}}})})(SI);var YP=SI.exports;const Fg=Bg(YP);et.extend(Fg);const EI=({label:e,required:t,placeholder:i,format:n,defaultHour:r,defaultMinute:a,size:o="md",msg:s,onTimeChange:l,onFocus:u,onBlur:d,timepickerStyle:c,dropdownListStyle:h,hoursListStyle:f,minutesListStyle:p,timepickerHelperTextStyle:g,timepickerLabelStyle:m,requiredStyle:C,theme:x,fixedDropdown:T})=>{const[R,A]=ve.useState(!1);ve.useRef(!1);const[H,$]=ve.useState(""),V=ve.useRef(null),U=ve.useRef(null),K=ve.useRef(null),X=ve.useRef(null),M=ve.useCallback(()=>Array.from({length:60},(y,I)=>I<10?`0${I}`:`${I}`),[]),q=ve.useCallback(()=>Array.from({length:23},(y,I)=>I<9?`0${I+1}`:`${I+1}`),[]),b=(z,y,I)=>{z.stopPropagation(),z.target.scrollIntoView({behavior:"smooth",block:"start"}),I==="hour"&&(U.current=y,V.current||(V.current="00")),I==="minute"&&(V.current=y,U.current||(U.current="00"));const S=et().hour(parseInt(U.current??"0",10)).minute(parseInt(V.current??"0",10)).format(n??"HH:mm");$(S),l&&typeof l=="function"&&l(S)},j=z=>{z.stopPropagation(),U.current=null,V.current=null,$(""),l&&typeof l=="function"&&l("")},ne=z=>{z.composedPath().includes(K.current)||A(!1)},J=z=>{T&&z.composedPath().includes(K.current)||A(!1)},pe=()=>{u&&typeof u=="function"&&u()},le=()=>{const z=K.current,y=X.current;if(!y||!z)return;const I=z.getBoundingClientRect(),S=window.innerHeight;T?(y.style.position="fixed",y.style.left=`${I.left+window.pageXOffset}px`,I.bottom+y.offsetHeight>S?(y.style.top=`${window.scrollY+I.top-y.offsetHeight-8}px`,y.style.bottom="unset"):(y.style.top=`${window.scrollY+I.bottom}px`,y.style.bottom="unset")):I.bottom>S?(y.style.top="unset",y.style.bottom="calc(100% + 8px)"):(y.style.bottom="unset",y.style.top="calc(100% + 8px)")},Q=ve.useRef(!0);return ve.useEffect(()=>{if(r){const z=et().hour(parseInt(r,10)).minute(parseInt(a??"0",10)).format(n??"HH:mm");U.current=r,V.current=a??"00",$(z)}},[]),ve.useEffect(()=>{if(Q.current){Q.current=!1;return}R||d&&typeof d=="function"&&d()},[R]),ve.useEffect(()=>{le()},[K,R]),ve.useEffect(()=>(document.addEventListener("click",ne),document.addEventListener("wheel",J),()=>{document.removeEventListener("click",ne),document.removeEventListener("wheel",J)}),[]),k.jsxs("div",{className:`${x==="dark"?qi.dark:""} ${qi.timepickerWrapper}`,children:[e&&k.jsxs("label",{className:qi.timepickerLabel,style:m??{},children:[e," ",k.jsx("span",{className:qi.required,style:C??{},children:t&&"*"})]}),k.jsxs("div",{ref:K,onFocus:pe,className:`${qi.timepicker} ${R?qi.focused:""} ${qi[o]}`,onClick:()=>A(z=>!z),style:c??{},children:[k.jsx("div",{style:{display:"grid",placeItems:"center"},children:k.jsx(qP,{})}),k.jsx("input",{type:"text",readOnly:!0,placeholder:i??"",value:H}),H?k.jsx("div",{onClick:z=>j(z),style:{display:"grid",placeItems:"center"},children:k.jsx(yu,{})}):k.jsx("div",{style:{display:"grid",placeItems:"center",transform:R?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:k.jsx(wh,{})}),R&&k.jsxs("div",{ref:X,className:qi.dropdownList,style:h??{},children:[k.jsx("ul",{className:qi.hours,children:q().map(z=>k.jsx("li",{style:f??{},className:`${z===U.current?qi.selected:""}`,onClick:y=>b(y,z,"hour"),children:z},z))}),k.jsx("ul",{className:qi.minutes,children:M().map(z=>k.jsx("li",{style:p??{},className:`${z===V.current?qi.selected:""}`,onClick:y=>b(y,z,"minute"),children:z},z))})]})]}),s&&(s==null?void 0:s.visible)&&k.jsx("div",{style:g??{},className:`${qi.timepickerHelperText} ${s!=null&&s.error?qi.error:""}`,children:k.jsx("p",{style:(s==null?void 0:s.style)??{},children:s.text})})]})},XP="DatePicker-module__datepickerContainer",ZP="DatePicker-module__datepickerLabel",QP="DatePicker-module__required",JP="DatePicker-module__datepicker",eF="DatePicker-module__sm",tF="DatePicker-module__md",iF="DatePicker-module__focused",nF="DatePicker-module__error",rF="DatePicker-module__disabled",aF="DatePicker-module__datepickerHelperText",oF="DatePicker-module__dark",Kn={datepickerContainer:XP,datepickerLabel:ZP,required:QP,datepicker:JP,sm:eF,md:tF,focused:iF,error:nF,disabled:rF,datepickerHelperText:aF,dark:oF},UC=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k.jsx("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),KC=({style:e})=>k.jsx("svg",{style:e??{},xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k.jsx("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"#A4A7AE",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),sF="Calendar-module__datePicker",lF="Calendar-module__dualCalendar",uF="Calendar-module__dualCalendarWithQuick",dF="Calendar-module__border",cF="Calendar-module__calendarWrapper",hF="Calendar-module__quickPick",fF="Calendar-module__datePickerHeader",pF="Calendar-module__left",vF="Calendar-module__right",_F="Calendar-module__div",gF="Calendar-module__day",mF="Calendar-module__today",CF="Calendar-module__inRange",yF="Calendar-module__selected",xF="Calendar-module__startDate",bF="Calendar-module__endDate",SF="Calendar-module__otherMonth",EF="Calendar-module__dark",Pt={datePicker:sF,dualCalendar:lF,dualCalendarWithQuick:uF,border:dF,calendarWrapper:cF,quickPick:hF,datePickerHeader:fF,left:pF,right:vF,div:_F,day:gF,today:mF,inRange:CF,selected:yF,startDate:xF,endDate:bF,otherMonth:SF,dark:EF};et.extend(Fg);const wF=({valueFormat:e,quickPick:t,onChange:i,CurrentMonth:n,setCurrentMonth:r,SelectedDate:a,setSelectedDate:o,IsFocused:s,setIsFocused:l,mode:u,RangeSelection:d,setRangeSelection:c,type:h,CalendarRef:f,defaultValue:p,theme:g})=>{const m=["Mo","Tu","We","Th","Fr","Sa","Su"],C=ve.useRef([]),x=K=>{const X=(K.startOf("month").day()+6)%7,M=K.endOf("month").date(),q=K.subtract(1,"month").endOf("month").date(),b=[];let j=[],ne=1;for(let pe=0;pe<X;pe++)j.push({date:K.subtract(1,"month").date(q-X+pe+1),currentMonth:!1});for(;ne<=M;)j.push({date:K.date(ne++),currentMonth:!0}),j.length===7&&(b.push(j),j=[]);let J=1;for(;b.length<5;)j.length===7&&(b.push(j),j=[]),j.push({date:K.add(1,"month").date(J++),currentMonth:!1});if(j.length){for(;j.length<7;)j.push({date:K.add(1,"month").date(J++),currentMonth:!1});b.push(j)}return b},T=x(n),R=h==="dual"?x(n.add(1,"month")):null,A=()=>{let K=[];return t&&Array.isArray(t)&&t.length>0&&t.forEach(X=>{switch(X){case"today":C.current.push({name:"Today",key:"Today"});break;case"yesterday":C.current.push({name:"Yesterday",key:"Yesterday"});break;case"thisweek":C.current.push({name:"This week",key:"Thisweek"});break;case"lastweek":C.current.push({name:"Last week",key:"Lastweek"});break;case"thismonth":C.current.push({name:"This month",key:"Thismonth"});break;case"lastmonth":C.current.push({name:"Last month",key:"Lastmonth"});break;case"thisyear":C.current.push({name:"This year",key:"Thisyear"});break;case"lastyear":C.current.push({name:"Last year",key:"Lastyear"});break;case"alltime":C.current.push({name:"All time",key:"Alltime"});break}}),C.current=fP(C.current,"key"),K=C.current,K},H=K=>{let X={start:"",end:""};switch(o(null),K.key.toLowerCase()){case"today":c({start:et(),end:et()}),X.start=et();break;case"yesterday":o(et().subtract(1,"day")),c({start:et().subtract(1,"day"),end:et().subtract(1,"day")}),X.start=et().subtract(1,"day");break;case"thisweek":c({start:et().startOf("week"),end:et().endOf("week")}),X.start=et().startOf("week"),X.end=et().endOf("week");break;case"lastweek":c({start:et().subtract(1,"week").startOf("week"),end:et().subtract(1,"week").endOf("week")}),X.start=et().subtract(1,"week").startOf("week"),X.end=et().subtract(1,"week").endOf("week");break;case"thismonth":c({start:et().startOf("month"),end:et().endOf("month")}),X.start=et().startOf("month"),X.end=et().endOf("month");break;case"lastmonth":c({start:et().subtract(1,"month").startOf("month"),end:et().subtract(1,"month").endOf("month")}),X.start=et().subtract(1,"month").startOf("month"),X.end=et().subtract(1,"month").endOf("month");break;case"thisyear":c({start:et().startOf("year"),end:et().endOf("year")}),X.start=et().startOf("year"),X.end=et().endOf("year");break;case"lastyear":c({start:et().subtract(1,"year").startOf("year"),end:et().subtract(1,"year").endOf("year")}),X.start=et().subtract(1,"year").startOf("year"),X.end=et().subtract(1,"year").endOf("year");break;case"alltime":c({start:"",end:""}),X.start="",X.end="";break;default:console.warn("Unsupported quick pick option:",K);break}if(i&&typeof i=="function"){const M={start:X.start?X.start:"",end:X.end?X.end:""};l(!1),i(M.end===""?M.start:M,M.end==="")}return K},$=(K,X,M=!1)=>{X||r(K.startOf("month")),u==="range"?c(q=>!q.start||q.start&&q.end?(i&&typeof i=="function"&&i({start:K??"",end:""}),{start:K??"",end:""}):q.start&&!q.end?K.isBefore(q.start,"day")?(i&&typeof i=="function"&&i({start:K??"",end:(q==null?void 0:q.start)??""}),{start:K??"",end:(q==null?void 0:q.start)??""}):(i({...q,end:K??""}),{...q,end:K??""}):q):(c({start:null,end:null}),o(K),M||(l(!1),i&&typeof i=="function"&&i(K.format(e??e))))},V=()=>{r(n.add(1,"month"))},U=()=>{r(n.subtract(1,"month"))};return ve.useEffect(()=>{p.state&&(Array.isArray(p.value)?c({start:et(p.value[0],e),end:et(p.value[1],e)}):$(et(p.value,e),!1,!0),p.state=!1)},[]),k.jsxs("div",{ref:f,className:`${g==="dark"?Pt.dark:""} ${Pt.datePicker} ${s?Pt.focused:""} ${h==="dual"?t&&t.length?Pt.dualCalendarWithQuick:Pt.dualCalendar:""} `,onClick:K=>K.stopPropagation(),style:h==="dual"&&t&&t.length>0?{width:"848px"}:{},children:[h==="dual"&&t&&t.length>0&&k.jsx("div",{children:t&&t.length>0&&k.jsx("ul",{className:Pt.quickPick,children:A().map(K=>k.jsx("li",{onClick:()=>H(K),children:K.name},K.key))})}),k.jsxs("div",{className:Pt.div,children:[h==="dual"?k.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"space-between"},children:[k.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"80px"},children:[k.jsx("div",{className:Pt.left,onClick:U,children:k.jsx(UC,{})}),k.jsx("span",{children:n.format("MMMM YYYY")})]}),k.jsxs("div",{style:{width:"50%",display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"80px"},children:[k.jsx("span",{children:n.add(1,"month").format("MMMM YYYY")}),k.jsx("div",{className:Pt.right,onClick:V,children:k.jsx(KC,{})})]})]}):k.jsxs("div",{className:Pt.datePickerHeader,children:[k.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[k.jsx("div",{className:Pt.left,onClick:U,children:k.jsx(UC,{})}),k.jsx("span",{children:n.format("MMMM YYYY")}),k.jsx("div",{className:Pt.right,onClick:V,children:k.jsx(KC,{})})]}),h==="single"&&t&&t.length>0&&k.jsx("ul",{className:Pt.quickPick,children:A().slice(0,3).map(K=>k.jsx("li",{onClick:()=>H(K),children:K.name},K.key))})]}),k.jsxs("div",{className:Pt.calendarWrapper,children:[k.jsxs("table",{children:[k.jsx("thead",{children:k.jsx("tr",{children:m.map(K=>k.jsx("th",{children:K},K))})}),k.jsx("tbody",{children:T.map((K,X)=>k.jsx("tr",{children:K.map(({date:M,currentMonth:q},b)=>{const j=d.start&&d.end&&M.isAfter(d.start,"day")&&M.isBefore(d.end,"day"),ne=d.start&&M.isSame(d.start,"day"),J=d.end&&M.isSame(d.end,"day"),pe=u==="single"&&a&&M.isSame(a,"day");return k.jsx("td",{className:`${Pt.day}
41
41
  ${q?"":Pt.otherMonth}
42
42
  ${q&&M.isSame(et(),"day")?Pt.today:""}
43
43
  ${q&&j?Pt.inRange:""}
@@ -49,7 +49,7 @@ React keys must be passed directly to JSX without using spread:
49
49
  ${q&&j?Pt.inRange:""}
50
50
  ${q&&ne?Pt.startDate:""}
51
51
  ${q&&J?Pt.endDate:""}
52
- ${!q&&!j&&!J?"":pe?Pt.selected:""}`,onClick:()=>$(M,q),children:M.date()},b)})},X))})]})]})]})]})},IF=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k.jsx("path",{d:"M17.5 8.33464H2.5M13.3333 1.66797V5.0013M6.66667 1.66797V5.0013M6.5 18.3346H13.5C14.9001 18.3346 15.6002 18.3346 16.135 18.0622C16.6054 17.8225 16.9878 17.44 17.2275 16.9696C17.5 16.4348 17.5 15.7348 17.5 14.3346V7.33464C17.5 5.9345 17.5 5.23444 17.2275 4.69966C16.9878 4.22925 16.6054 3.8468 16.135 3.60712C15.6002 3.33464 14.9001 3.33464 13.5 3.33464H6.5C5.09987 3.33464 4.3998 3.33464 3.86502 3.60712C3.39462 3.8468 3.01217 4.22925 2.77248 4.69966C2.5 5.23444 2.5 5.9345 2.5 7.33464V14.3346C2.5 15.7348 2.5 16.4348 2.77248 16.9696C3.01217 17.44 3.39462 17.8225 3.86502 18.0622C4.3998 18.3346 5.09987 18.3346 6.5 18.3346Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})});et.extend(Fg);const wI=({label:e,required:t,msg:i,defaultValue:n,size:r="md",valueFormat:a="DD-MM-YYYY",onChange:o,onBlur:s,onFocus:l,fixedDropdown:u,datepickerStyle:d,placeholder:c,datepickerLabelStyle:h,requiredStyle:f,datepickerHelperTextStyle:p,quickPick:g,mode:m="single",type:C="single",theme:x="light",disabled:T})=>{const[R,A]=ve.useState(!1),[H,$]=ve.useState(""),V=ve.useRef({state:!1,value:""});ve.useState(!1);const U=ve.useRef(null),[K,X]=ve.useState(et()),[M,q]=ve.useState(""),[b,j]=ve.useState({start:null,end:null}),ne=ve.useRef(null),J=(S,B,N)=>{let G="",W={start:"",end:""};!B&&(m==="single"||typeof S=="string")&&(G=S,$(G)),!B&&(m!=="single"||typeof S!="string")&&(G=`${et((S==null?void 0:S.start)??"").format(a??"DD-MM-YYYY")} / ${S!=null&&S.end?et(S.end).format(a??"DD-MM-YYYY"):""}`,W.start=et((S==null?void 0:S.start)??"").format(a??"DD-MM-YYYY"),W.end=S!=null&&S.end?et(S.end).format(a??"DD-MM-YYYY"):"",$(G)),B&&(G=et(S).format(a??"DD-MM-YYYY"),$(G)),S!=null&&S.end&&A(!1),o&&typeof o=="function"&&!N&&(o(W.start!==""?W:G),V.current.value=W.start!==""?W:G)},pe=S=>{S.stopPropagation(),q(""),V.current.value="",$(""),j({start:null,end:null}),o&&typeof o=="function"&&o("")},le=S=>{S.composedPath().includes(ne.current)||A(!1)},Q=S=>{u&&S.composedPath().includes(ne.current)||A(!1)},z=()=>{l&&typeof l=="function"&&l()},y=()=>{s&&typeof s=="function"&&s()},I=()=>{const S=ne.current,B=U.current;if(!B||!S)return;const N=S.getBoundingClientRect(),G=window.innerHeight,W=window.innerWidth;u?(B.style.position="fixed",N.bottom+B.offsetHeight>G?(B.style.top=`${window.scrollY+N.top-B.offsetHeight-8}px`,B.style.bottom="unset"):(B.style.top=`${window.scrollY+N.bottom+8}px`,B.style.bottom="unset"),N.right+N.width>W?B.style.left=`${window.scrollX+N.left+N.width-B.offsetWidth}px`:B.style.left=`${window.scrollX+N.left}px`):(N.bottom>G?(B.style.top="unset",B.style.bottom="calc(100% + 8px)"):(B.style.bottom="unset",B.style.top="calc(100% + 8px)"),N.right>window.innerWidth?B.style.left=`calc(100% - ${N.width}px)`:N.left<0&&(B.style.left="0px"))};return ve.useEffect(()=>{if(n&&V.current.value===""){let S=Array.isArray(n)?{start:et(n[0],"DD-MM-YYYY"),end:n.length>1?et(n[1],"DD-MM-YYYY"):""}:et(n,"DD-MM-YYYY").format(a);V.current.value=n,V.current.state=!0,S&&J(S,!1,!0)}},[]),ve.useEffect(()=>{R&&I()},[U,R]),ve.useEffect(()=>(document.addEventListener("click",le),document.addEventListener("wheel",Q),()=>{document.removeEventListener("click",le),document.removeEventListener("wheel",Q)}),[]),k.jsxs("div",{className:`${x==="dark"?Kn.dark:""} ${Kn.datepickerContainer}`,children:[e&&k.jsxs("label",{className:Kn.datepickerLabel,style:h??{},children:[e," ",k.jsx("span",{className:Kn.required,style:f??{},children:t&&"*"})]}),k.jsxs("div",{ref:ne,onFocus:z,onBlur:y,className:`${Kn.datepicker} ${R?Kn.focused:""} ${Kn[r]} ${T?Kn.disabled:""}`,onClick:()=>A(S=>!S),style:d??{},children:[k.jsx("div",{style:{display:"grid",placeItems:"center"},children:k.jsx(IF,{})}),k.jsx("input",{type:"text",readOnly:!0,placeholder:c??"",value:H}),H?k.jsx("div",{onClick:S=>pe(S),style:{display:"grid",placeItems:"center"},children:k.jsx(yu,{})}):k.jsx("div",{style:{display:"grid",placeItems:"center",transform:R?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:k.jsx(wh,{})}),R&&k.jsx(wF,{theme:x,defaultValue:V.current,CalendarRef:U,valueFormat:a,onChange:J,CurrentMonth:K,setCurrentMonth:X,SelectedDate:M,setSelectedDate:q,IsFocused:R,setIsFocused:A,quickPick:g,mode:m,RangeSelection:b,setRangeSelection:j,type:C})]}),i&&(i==null?void 0:i.visible)&&k.jsx("div",{style:p??{},className:`${Kn.datepickerHelperText} ${i!=null&&i.error?Kn.error:""}`,children:k.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},TF="Slider-module__sliderContainer",AF="Slider-module__slider",DF="Slider-module__sliderProgress",OF="Slider-module__thumb",RF="Slider-module__thumbLeft",kF="Slider-module__thumbRight",BF="Slider-module__values",LF="Slider-module__top",PF="Slider-module__dark",mn={sliderContainer:TF,slider:AF,sliderProgress:DF,thumb:OF,thumbLeft:RF,thumbRight:kF,values:BF,top:LF,dark:PF},FF=()=>{const[e,t]=ve.useState(),i=(n,r)=>{clearTimeout(e),t(setTimeout(()=>{n()},r??500))};return ve.useEffect(()=>()=>{clearTimeout(e)},[]),i},II=({minValue:e,maxValue:t,min:i=0,max:n=100,label:r="top",showLabels:a=!1,withPercent:o=!1,debounceTime:s,onChange:l,theme:u})=>{const d=ve.useRef(!0),[c,h]=ve.useState({minValue:e??i,maxValue:t??n}),[f,p]=ve.useState({min:!1,max:!1}),g=FF(),m=ve.useRef(null),C=A=>{const $=m.current.getBoundingClientRect(),V=Math.min(Math.max(0,(A-$.left)/$.width),1);return Math.round(V*(n-i)+i)},x=A=>H=>{H.preventDefault();const $=U=>{const K=C(U.clientX);h(X=>A==="min"?{...X,minValue:Math.min(K,X.maxValue-1)}:{...X,maxValue:Math.max(K,X.minValue+1)})},V=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",V)};document.addEventListener("mousemove",$),document.addEventListener("mouseup",V)},T=A=>{const H=C(A.clientX),$=Math.abs(H-c.minValue),V=Math.abs(H-c.maxValue),U=$<V?"min":"max";h(K=>U==="min"?{...K,minValue:Math.min(H,K.maxValue-1)}:{...K,maxValue:Math.max(H,K.minValue+1)}),x(U)(A)},R={left:`${(c.minValue-i)/(n-i)*100}%`,width:`${(c.maxValue-c.minValue)/(n-i)*100}%`};return ve.useEffect(()=>{if(d.current){d.current=!1;return}l&&typeof l=="function"&&g(()=>l([c.minValue,c.maxValue]),s??100)},[c]),k.jsx("div",{className:`${u==="dark"?mn.dark:""} ${mn.sliderContainer}`,children:k.jsxs("div",{ref:m,className:mn.slider,onMouseDown:T,children:[k.jsx("div",{className:mn.sliderProgress,style:R}),k.jsx("div",{className:`${mn.thumb} ${mn.thumbLeft}`,style:{left:`${(c.minValue-i)/(n-i)*100}%`},onMouseEnter:()=>p({min:!0}),onMouseLeave:()=>p({min:!1}),onMouseDown:x("min"),children:a&&f.min&&k.jsx("div",{className:`${mn.values} ${mn[r]}`,children:k.jsxs("span",{children:[c.minValue,o&&"%"]})})}),k.jsx("div",{className:`${mn.thumb} ${mn.thumbRight}`,style:{left:`${(c.maxValue-i)/(n-i)*100}%`},onMouseEnter:()=>p({max:!0}),onMouseLeave:()=>p({max:!1}),onMouseDown:x("max"),children:a&&f.max&&k.jsx("div",{className:`${mn.values} ${mn[r]}`,children:k.jsxs("span",{children:[c.maxValue,o&&"%"]})})})]})})},MF=({options:e,filterOptions:t,selectedDropdown:i,deleteDate:n,setdeleteDate:r,setdeleteTime:a,deleteTime:o,renderComp:s,isLastElement:l,theme:u,onSingleChange:d,fieldGap:c,fieldStyle:h,MultiselectKey:f})=>{const[p,g]=ve.useState(!1),[m,C]=ve.useState(!1),[x,T]=ve.useState(""),[R,A]=ve.useState(""),H=ve.useRef([]);ve.useEffect(()=>{e.options[0].type=="slider"&&(T(e.options[0].min),A(e.options[0].max))},[e]),ve.useEffect(()=>{C(b=>!b),e.options[0].type=="slider"&&(T(e.options[0].min),A(e.options[0].max))},[s]);const $=()=>{let b=t.map(ne=>ne.options);H.current=b;let j=[];for(let ne=0;ne<H.current.length;ne++)j.push(...H.current[ne]);d&&typeof d=="function"&&d(j.filter(ne=>ne.value!==""))},V=b=>b!=null&&b.style&&Object.keys(b==null?void 0:b.style).length>0?b==null?void 0:b.style:{width:b.width?b.width*13.6875+(b.width-1)*1.9375+"rem":"13.6875rem"},U=b=>b&&Object.keys(b).length>0?b:{display:"flex",justifyContent:"flex-start",flexWrap:"wrap",width:"100%",gap:"1.9375rem"},K=ve.useRef(null),X=ve.useRef(null),M=(b,j,ne)=>{switch(j){case"min":b<=ne.min?(K.current=ne.min,T(ne.min)):(K.current=b,T(b));break;case"max":b>ne.max?(X.current=ne.max,A(ne.max)):(X.current=b,A(b));break}ne.value=[{label:`${K.current} - ${X.current}`,range:[+K.current,+X.current]}],g(J=>!J),C(J=>!J)},q=()=>k.jsx("div",{style:U(h),children:e.options.map((b,j)=>{var ne,J,pe,le,Q,z,y,I;switch(b.type){case"slider":return k.jsxs("div",{style:{width:"100%",padding:"0 10px",display:"grid",placeItems:"center"},children:[k.jsx(II,{debounceTime:0,showLabels:!0,min:b.min,max:b.max,minValue:b.value!==""&&b.value[0].range[0]?(ne=b.value[0])==null?void 0:ne.range[0]:x,maxValue:b.value!==""&&b.value[0].range[1]!==0?(J=b.value[0])==null?void 0:J.range[1]:R,onChange:S=>{T(S[0]),A(S[1]),K.current=x,X.current=R,b.value=[{label:`${S?S[0]:x} - ${S?S[1]:R}`,range:S}],g(B=>!B),$()}}),k.jsxs("div",{className:hi.inputs,style:{width:"70%",margin:"auto",marginTop:"0.75rem",display:"flex",justifyContent:"space-between",gap:"0.625rem"},children:[k.jsx(fc,{label:"Minimum",value:b.value!==""&&b.value[0].range[0]!==0?(pe=b.value[0])==null?void 0:pe.range[0]:x,type:"number",onChange:S=>{M(S,"min",b),$()}}),k.jsx(fc,{label:"Maximum",value:b.value!==""&&b.value[0].range[1]!==0?b.value[0].range[1]:R,type:"number",onChange:S=>{M(S,"max",b),$()}})]})]},j);case"datePicker":return k.jsx("div",{style:V(b),children:ve.createElement(wI,{theme:u,...b.props,label:b.label,defaultValue:b.value.length>0?(le=b.value[0])!=null&&le.time?(Q=b.value[0])==null?void 0:Q.time:b.value:"",fixedDropdown:!0,key:n,onChange:S=>{S===""?b.value="":b.props.mode=="single"?b.value=[{label:S,time:S}]:b.props.mode=="range"&&(b.value=[{label:`${S.start} / ${S.end}`,time:[S.start,S.end]}]),$()}})},j);case"timePicker":return k.jsx("div",{style:V(b),children:ve.createElement(EI,{...b.props,label:b.label,key:o,theme:u,defaultHour:b.value.length>0?b.value[0].time.split(":")[0]:b.value,defaultMinute:b.value.length>0?b.value[0].time.split(":")[1]:b.value,fixedDropdown:!0,onClear:()=>{b.value="",a(!0),$(),g(S=>!S)},onTimeChange:S=>{S===""?b.value="":(b.value=[{label:S,time:S}],$(),g(B=>!B))}})},j);case"input":return k.jsx("div",{style:V(b),children:k.jsx(fc,{...b.props,theme:u,value:(z=b.value[0])!=null&&z.id?(y=b.value[0])==null?void 0:y.id:b.value,label:b.label,onChange:S=>{S!==""?b.value=[{id:S,label:S}]:b.value="",$(),g(B=>!B)}})},j);case"dropdown":return k.jsx("div",{style:V(b),children:ve.createElement(l_,{...b.props,label:b.label,theme:u,data:b.data,key:i,fixedDropdown:!0,withFilter:!0,selectedOptionID:((I=b.value[0])==null?void 0:I.id)??null,onSelect:S=>{Object.keys(S).length===0?b.value="":(!Array.isArray(b.value)||b.value[0]!==S)&&(b.value=[S],$())}})},j);case"multiselect":return k.jsx("div",{style:V(b),children:ve.createElement(l_,{...b.props,key:f,label:b.label,theme:u,fixedDropdown:!0,data:b.data,withMultiSelect:!0,onSelect:S=>{S.length===0?b.value="":(b.value=S,$())}})},j);case"checkBox":return k.jsxs("div",{className:hi.checkbox,children:[k.jsx(Ih,{...b.props,checked:b.checked,theme:u,change:S=>{b.checked=!b.checked,b.checked?b.value=[{label:b.label,id:b.label,checked:b.checked}]:b.value="",g(B=>!B),$()}}),k.jsx("span",{className:hi.checkboxLabel,children:b.label})]},j);case"radio":return k.jsxs("div",{className:hi.checkbox,children:[k.jsx(yI,{...b.props,checked:b.checked,withUncheckState:!0,theme:u,change:S=>{b.checked=!b.checked,b.checked?b.value=[{label:b.label,id:b.label,checked:b.checked}]:b.value="",g(B=>!B),$()}}),k.jsx("span",{className:hi.checkboxLabel,children:b.label})]},j)}})});return k.jsxs("div",{className:hi.filterCont,children:[k.jsxs("div",{className:hi.title,children:[k.jsx("h3",{children:e.title}),k.jsx("p",{children:(e==null?void 0:e.subText)??""})]}),k.jsx("div",{className:hi.renderComponent,children:q()}),!l&&k.jsx("hr",{})]})},TI=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",fill:"none",viewBox:"0 0 14 14",children:k.jsx("path",{fill:"#555F62",stroke:"#555F62",strokeWidth:"0.2",d:"M3.944 9.045c.9 0 1.664-.582 1.938-1.39h7.229a.656.656 0 100-1.31H5.88a2.045 2.045 0 00-3.874 0H.89a.656.656 0 100 1.31h1.118a2.045 2.045 0 001.937 1.39zm6.111.633c-.9 0-1.663.581-1.937 1.389H.89a.656.656 0 100 1.311h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.311h-1.119a2.045 2.045 0 00-1.937-1.389zm0-9.445c-.9 0-1.663.582-1.937 1.39H.89a.656.656 0 100 1.31h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.31h-1.119a2.045 2.045 0 00-1.937-1.39zm.734 2.045a.733.733 0 11-1.467 0 .733.733 0 011.467 0zm0 9.444a.733.733 0 11-1.467 0 .733.733 0 011.467 0zM3.21 7a.733.733 0 111.467 0A.733.733 0 013.21 7z"})}),VF=({onApply:e,filterOptions:t,modalSize:i,buttonStyle:n,tagPosition:r="bottom",rowReverse:a=!0,filterIcon:o,tagStyle:s,visibleTagsNumber:l,onClearAll:u,theme:d,resultNumber:c,onSingleChange:h,loaded:f,onFilterClick:p,popupWidth:g,fieldGap:m,labels:C,singleFieldStyle:x,buttonLabel:T,initialApply:R=!1,withTags:A=!0,clickOutside:H=!0,width:$,popupProps:V,tagsProps:U})=>{var de,Ce,ae,we,Le,Ie,We,Qe,it,Kt,wi,Ge,wt,bt,Ki,rn,ui,Se,Xe,Wt,ai,Oi;const[K,X]=ve.useState(!1),[M,q]=ve.useState(c??null),[b,j]=ve.useState(!1);ve.useEffect(()=>{f&&X(f)},[f]),ve.useEffect(()=>{q(c)},[c]),ve.useEffect(()=>{R&&_e()},[]);const[ne,J]=ve.useState(!1),[pe,le]=ve.useState(!1),[Q,z]=ve.useState(!1),[y,I]=ve.useState(!1),[S,B]=ve.useState(!1),[N,G]=ve.useState(0),W=ve.useRef([]),ie=ve.useRef([]),re=ve.useRef([]),_e=()=>{let ze=t.map(Ve=>Ve.options);W.current=ze;let ft=[];for(let Ve=0;Ve<W.current.length;Ve++)ft.push(...W.current[Ve]);ie.current=ft;let ye=[];for(let Ve=0;Ve<ie.current.length;Ve++)ye.push(...ie.current[Ve].value);re.current=ye,X(!1),e&&typeof e=="function"&&e(ie.current.filter(Ve=>Ve.value!==""))},oe=()=>{u&&typeof u=="function"&&u([])},Re=ze=>{ze.selected&&(ze.selected=!1);let ft=re.current.filter(Ve=>Ve.label+Ve.id===ze.label+ze.id);t.forEach(Ve=>{Ve.options.map(St=>{St.value.includes(ft[0])&&(St.data&&(St.data.filter(vr=>vr.itemNodeID===ft[0].itemNodeID)[0].selected=!1,St.value=St.value.filter(vr=>vr.selected!==!1)),St.type=="dropdown"&&(St.value=""),St.type=="input"&&(St.value=""),(St.type=="checkBox"||St.type=="toggle"||St.type=="radio")&&(St.value="",St.checked=!1),St.type=="slider"&&(St.value=""),(St.type=="datePicker"||St.type=="timePicker")&&(St.value=""))})}),I(Ve=>!Ve),B(Ve=>!Ve),le(Ve=>!Ve),z(Ve=>!Ve);let ye=ie.current.filter(Ve=>Ve.value.length>0);e&&typeof e=="function"&&e(ye),re.current=re.current.filter(Ve=>Ve.label+Ve.id!==ze.label+ze.id),re.current.length===0&&oe(),J(Ve=>!Ve)},[w,he]=ve.useState(l),[se,L]=ve.useState(!0),[P,Y]=ve.useState(!1);return ve.useEffect(()=>{const ze=ft=>{ft.key==="Enter"&&K&&_e()};return window.addEventListener("keypress",ze),()=>{window.removeEventListener("keypress",ze)}},[_e]),k.jsxs("div",{className:`${d==="dark"?hi.dark:""} ${hi.compWrapper}`,style:{display:r=="side"?"flex":"block",flexDirection:a?"row-reverse":"row",justifyContent:a?"space-between":null,gap:`${a?"0":"1"}.125rem`},children:[k.jsxs("div",{className:hi.filterButton,style:(n==null?void 0:n.style)??null,onClick:()=>{p&&typeof p=="function"&&p([]),f||f==!1?X(f):X(!0)},children:[k.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:o||k.jsx(TI,{})}),k.jsxs("span",{className:hi.filter,style:(T==null?void 0:T.style)??{},children:[(T==null?void 0:T.label)??"Filter",M&&!A&&k.jsx("span",{className:hi.resultNumber,style:((de=C==null?void 0:C.showResultName)==null?void 0:de.style)??{},children:M??""})]})]}),K&&k.jsxs(Pg,{theme:d,visible:!0,size:i??"medium",titleStyle:((Ce=C==null?void 0:C.headerName)==null?void 0:Ce.style)??{},options:{title:(ae=C==null?void 0:C.headerName)!=null&&ae.label||((we=C==null?void 0:C.headerName)==null?void 0:we.label.length)>0?(Le=C==null?void 0:C.headerName)==null?void 0:Le.label:"Filters",align:"center"},onClickOutside:()=>H?X(!1):null,popupContainerStyle:{width:$??"825px"},...V,children:[k.jsx("div",{style:{maxHeight:"65vh",overflowY:"auto",paddingBottom:"4px"},children:t.map((ze,ft)=>{let ye=ft===t.length-1;return k.jsx("div",{children:k.jsx(MF,{MultiselectKey:b,popupWidth:g,fieldStyle:(ze==null?void 0:ze.style)??{},singleFieldStyle:x,fieldGap:m,setrenderComp:Y,renderComp:P,deleteDate:y,setdeleteDate:I,setdeleteTime:B,deleteTime:S,setopenPopup:X,options:ze,filterOptions:t,tagValue:re.current,selectedDropdown:pe,setselectedDropdown:le,deleteMultiSelect:Q,setdeleteMultiSelect:z,isLastElement:ye,setcounter:G,theme:d,onSingleChange:h})},ft)})}),k.jsxs("div",{className:hi.footer,children:[k.jsx("div",{className:hi.clear,onClick:()=>{h&&typeof h=="function"&&h([]),t.forEach(ze=>{ze.options.forEach(ft=>{ft.value="",ft.type=="multiselect"&&ft.data.forEach(ye=>{ye.selected=!1}),(ft.type=="radio"||ft.type=="checkBox")&&(ft.checked=!1)})}),re.current=[],le(ze=>!ze),z(ze=>!ze),I(ze=>!ze),B(ze=>!ze),G(0),oe(),e&&typeof e=="function"&&e(re.current),Y(ze=>!ze),j(ze=>!ze),J(ze=>!ze)},style:((Ie=C==null?void 0:C.clearAllName)==null?void 0:Ie.style)??{},children:(We=C==null?void 0:C.clearAllName)!=null&&We.label||((it=(Qe=C==null?void 0:C.clearAllName)==null?void 0:Qe.label)==null?void 0:it.length)>0?(Kt=C==null?void 0:C.clearAllName)==null?void 0:Kt.label:"Clear All"}),k.jsxs("div",{className:hi.buttonsWrapper,children:[k.jsx(iu,{buttonStyle:(wi=C==null?void 0:C.closeName)!=null&&wi.style?{...(Ge=C==null?void 0:C.closeName)==null?void 0:Ge.style,borderRadius:"0.375rem",backgroundColor:"transparent"}:{borderRadius:"0.375rem",backgroundColor:"transparent"},label:(wt=C==null?void 0:C.closeName)!=null&&wt.label||((Ki=(bt=C==null?void 0:C.closeName)==null?void 0:bt.label)==null?void 0:Ki.length)>0?(rn=C==null?void 0:C.closeName)==null?void 0:rn.label:"Close",onClick:()=>X(!1)}),k.jsx(iu,{buttonStyle:(ui=C==null?void 0:C.showResultName)!=null&&ui.style?{...(Se=C==null?void 0:C.showResultName)==null?void 0:Se.style,borderRadius:"0.375rem"}:{borderRadius:"0.375rem"},label:(Xe=C==null?void 0:C.showResultName)!=null&&Xe.label||((ai=(Wt=C==null?void 0:C.showResultName)==null?void 0:Wt.label)==null?void 0:ai.length)>0?(Oi=C==null?void 0:C.showResultName)==null?void 0:Oi.label:`Show ${M??""} result`,onClick:_e})]})]})]}),A&&re.current.length>0&&k.jsxs("div",{style:r=="side"?{marginTop:0}:{},className:hi.tag,children:[re.current.slice(0,w).map((ze,ft)=>k.jsx(Lg,{id:ze.id,label:ze.label,withClose:!0,theme:d,...U,onClose:ye=>Re(ze)},ft)),re.current.length>l&&w<=l&&se&&k.jsx("button",{className:hi.showButton,onClick:()=>{he(re.current.length),L(!1)},children:"Show More"}),!se&&re.current.length>=l&&k.jsx("button",{className:hi.showButton,onClick:()=>{he(l),L(!0)},children:"Show Less"}),k.jsx("button",{className:hi.showButton,onClick:()=>{t.forEach(ze=>{ze.options.forEach(ft=>{ft.value="",ft.type=="multiselect"&&ft.data.forEach(ye=>{ye.selected=!1}),(ft.type=="radio"||ft.type=="checkBox")&&(ft.checked=!1)})}),re.current=[],le(ze=>!ze),z(ze=>!ze),I(ze=>!ze),B(ze=>!ze),G(0),oe(),j(ze=>!ze),e&&typeof e=="function"&&e(re.current),Y(ze=>!ze),J(ze=>!ze)},children:"Clear All"})]})]})},NF="ProgressSteps-module__steps",HF="ProgressSteps-module__currentStep",$F="ProgressSteps-module__progressBar",WF="ProgressSteps-module__progressBarVertical",zF="ProgressSteps-module__singleStep",GF="ProgressSteps-module__texts",UF="ProgressSteps-module__currentText",KF="ProgressSteps-module__name",jF="ProgressSteps-module__subTitle",qF="ProgressSteps-module__vertical",YF="ProgressSteps-module__radioWrapper",XF="ProgressSteps-module__checked",ZF="ProgressSteps-module__innerCircle",QF="ProgressSteps-module__radioState",JF="ProgressSteps-module__disabled",eM="ProgressSteps-module__dark",Xt={steps:NF,currentStep:HF,progressBar:$F,progressBarVertical:WF,singleStep:zF,texts:GF,currentText:UF,name:KF,subTitle:jF,vertical:qF,radioWrapper:YF,checked:XF,innerCircle:ZF,radioState:QF,disabled:JF,dark:eM},tM=({width:e})=>k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"32",height:e??"32",viewBox:"0 0 32 32",fill:"none",children:[k.jsx("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"#0158FF"}),k.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.7953 9.8534L13.2487 19.0667L10.7153 16.3601C10.2487 15.9201 9.51534 15.8934 8.982 16.2667C8.462 16.6534 8.31534 17.3334 8.63534 17.8801L11.6353 22.7601C11.9287 23.2134 12.4353 23.4934 13.0087 23.4934C13.5553 23.4934 14.0753 23.2134 14.3687 22.7601C14.8487 22.1334 24.0087 11.2134 24.0087 11.2134C25.2087 9.98674 23.7553 8.90674 22.7953 9.84007V9.8534Z",fill:"white"})]}),iM=({currentStep:e,stepsData:t,onStepClick:i,independentStep:n,fillIcon:r,stepIcon:a,emptyIcon:o,gap:s=20,vertical:l=!1,stepsStyle:u,currentStepStyle:d,progressBarStyle:c,singleStepStyle:h,textsStyle:f,theme:p})=>{const g=x=>{i&&typeof i=="function"&&n&&i(x)},m=x=>l?{...x.id===t[t.length-1].id?{height:"0",top:0,left:0}:x.id===t[t.length-2].id?{height:`calc(100% + ${s}px`,top:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"}:{height:`calc(100% + ${s}px)`,top:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"},...c??{}}:{...x.id===t[t.length-1].id?{width:"0",left:0,right:0}:x.id===t[t.length-2].id?{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"}:{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"},...c??{}},C=x=>x;return k.jsx("div",{className:`${p==="dark"?Xt.dark:""} ${Xt.steps} ${l?Xt.vertical:""}`,style:{...u,gap:s+"px"},children:t.map(x=>k.jsxs("div",{style:d??{},className:`${Xt.currentStep} ${x.disabled?Xt.disabled:""}`,onClick:()=>g(x),children:[l?k.jsx("div",{className:Xt.progressBarVertical,style:m(x)}):k.jsx("div",{style:m(x),className:Xt.progressBar}),k.jsx("div",{className:Xt.singleStep,style:h??{},children:k.jsx(k.Fragment,{children:x.isAllFilled?k.jsx(k.Fragment,{children:r?C(r):k.jsx(tM,{width:"24px"})}):e<(x==null?void 0:x.id)?k.jsx(k.Fragment,{children:o?C(o):k.jsx("div",{className:`${Xt.radioWrapper} ${Xt.md} ${Xt.checked} ${Xt.disabled}`,children:k.jsx("div",{className:Xt.radioState,children:k.jsx("div",{className:Xt.innerCircle})})})}):k.jsx(k.Fragment,{children:a?C(a):k.jsx("div",{className:`${Xt.radioWrapper} ${Xt.md} ${Xt.checked} `,children:k.jsx("div",{className:Xt.radioState,children:k.jsx("div",{className:Xt.innerCircle})})})})})}),k.jsxs("div",{className:`${Xt.texts} ${x.id===e?Xt.currentText:{}}`,style:f??{},children:[k.jsx("p",{style:(x==null?void 0:x.titleStyle)??{},className:Xt.name,children:x==null?void 0:x.name}),typeof(x==null?void 0:x.subTitle)=="function"?x.subTitle():k.jsx("p",{className:Xt.subTitle,style:x!=null&&x.subTitleStyle?{...x.subTitleStyle}:{},children:(x==null?void 0:x.subTitle)??""})??""]})]},x.id))})};var ce={},nM={"[object Array]":"array","[object Date]":"date","[object Object]":"object","[object String]":"string","[object Null]":"null"},On=function(e){var t=Object.prototype.toString.call(e);return typeof e=="object"?nM[t]||"object":typeof e},Ss=function(e){return typeof e=="boolean"},jC=function(e){return xt(e)&&e.toString().indexOf("e")!==-1},Mi=function(e){return On(e)==="date"},E=function(e){return e!=null},Ee=function(e){return typeof e=="function"},Me=function(e){return typeof e=="string"},xt=function(e){return typeof e=="number"&&isFinite(e)||!isNaN(e-parseFloat(e))},He=function(e){return On(e)==="object"},Rn=function(e){var t;for(t in e)return!1;return!0},Ye=function(e){if(!e||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e),i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof i=="function"&&Object.toString.call(i)===Object.toString.call(Object)},Hl=function(e){return["object","array","function"].indexOf(On(e))===-1},Yt=function(e){return e!=null&&e===e.window},hn=function(e){return!!e&&!!(e.jquery||e.dxRenderer)},xu=function(e){return!!e&&Ee(e.then)},Mg=function(e){return!!e&&Ee(e.done)&&Ee(e.fail)},rM=function(e){return!!(e&&e.preventDefault)},AI=function(e,t,i){e=e||{};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];(!(n in e)||i)&&(e[n]=r)}return e},O=function e(t){t=t||{};var i=1,n=!1;for(typeof t=="boolean"&&(n=t,t=arguments[1]||{},i++);i<arguments.length;i++){var r=arguments[i];if(r!=null)for(var a in r){var o=t[a],s=r[a],l=!1,u=void 0;a==="__proto__"||a==="constructor"||t===s||(n&&s&&(Ye(s)||(l=Array.isArray(s)))?(l?u=o&&Array.isArray(o)?o:[]:u=o&&Ye(o)?o:{},t[a]=e(n,u,s)):s!==void 0&&(t[a]=s))}}return t},Jt=(e,t)=>{if(Array.isArray(e))return e.map(t);var i=[];for(var n in e)i.push(t(e[n],n));return i},F=(e,t)=>{if(e){if("length"in e)for(var i=0;i<e.length&&t.call(e[i],i,e[i])!==!1;i++);else for(var n in e)if(t.call(e[n],n,e[n])===!1)break;return e}},aM=function(){},xf=function(e){return typeof console>"u"||!Ee(console[e])?aM:console[e].bind(console)},bu={info:xf("info"),warn:xf("warn"),error:xf("error")},Vg=function(){var e=[new RegExp("&","g"),new RegExp('"',"g"),new RegExp("'","g"),new RegExp("<","g"),new RegExp(">","g")];return function(t){return String(t).replace(e[0],"&amp;").replace(e[1],"&quot;").replace(e[2],"&#39;").replace(e[3],"&lt;").replace(e[4],"&gt;")}}(),oM=function(e){switch(typeof e){case"string":return e.split(/\s+/,4);case"object":return[e.x||e.h||e.left,e.y||e.v||e.top,e.x||e.h||e.right,e.y||e.v||e.bottom];case"number":return[e];default:return e}},sM=function(e){var t=oM(e),i=parseInt(t&&t[0],10),n=parseInt(t&&t[1],10),r=parseInt(t&&t[2],10),a=parseInt(t&&t[3],10);return isFinite(i)||(i=0),isFinite(n)||(n=i),isFinite(r)||(r=i),isFinite(a)||(a=n),{top:n,right:r,bottom:a,left:i}};function Hr(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Ee(e)?e(...i):(i.forEach((r,a)=>{Me(r)&&(r=r.replace(/\$/g,"$$$$"));var o=new RegExp("\\{"+a+"\\}","gm");e=e.replace(o,r)}),e)}var $l=function(){var e=/\s/g;return function(t){return!t||!t.replace(e,"")}}(),lM="22.1.3",uM="http://js.devexpress.com/error/"+lM.split(".").slice(0,2).join("_")+"/";function Ng(e,t){var i={ERROR_MESSAGES:O(t,e),Error:function(){return o([].slice.call(arguments))},log:function(l){var u="log";/^E\d+$/.test(l)?u="error":/^W\d+$/.test(l)&&(u="warn"),bu[u](u==="log"?l:n([].slice.call(arguments)))}};function n(l){var u=l[0];return l=l.slice(1),a(u,r(u,l))}function r(l,u){return u=[i.ERROR_MESSAGES[l]].concat(u),Hr.apply(this,u).replace(/\.*\s*?$/,"")}function a(l,u){return Hr.apply(this,[`{0} - {1}. See:
52
+ ${!q&&!j&&!J?"":pe?Pt.selected:""}`,onClick:()=>$(M,q),children:M.date()},b)})},X))})]})]})]})]})},IF=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:k.jsx("path",{d:"M17.5 8.33464H2.5M13.3333 1.66797V5.0013M6.66667 1.66797V5.0013M6.5 18.3346H13.5C14.9001 18.3346 15.6002 18.3346 16.135 18.0622C16.6054 17.8225 16.9878 17.44 17.2275 16.9696C17.5 16.4348 17.5 15.7348 17.5 14.3346V7.33464C17.5 5.9345 17.5 5.23444 17.2275 4.69966C16.9878 4.22925 16.6054 3.8468 16.135 3.60712C15.6002 3.33464 14.9001 3.33464 13.5 3.33464H6.5C5.09987 3.33464 4.3998 3.33464 3.86502 3.60712C3.39462 3.8468 3.01217 4.22925 2.77248 4.69966C2.5 5.23444 2.5 5.9345 2.5 7.33464V14.3346C2.5 15.7348 2.5 16.4348 2.77248 16.9696C3.01217 17.44 3.39462 17.8225 3.86502 18.0622C4.3998 18.3346 5.09987 18.3346 6.5 18.3346Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})});et.extend(Fg);const wI=({label:e,required:t,msg:i,defaultValue:n,size:r="md",valueFormat:a="DD-MM-YYYY",onChange:o,onBlur:s,onFocus:l,fixedDropdown:u,datepickerStyle:d,placeholder:c,datepickerLabelStyle:h,requiredStyle:f,datepickerHelperTextStyle:p,quickPick:g,mode:m="single",type:C="single",theme:x="light",disabled:T})=>{const[R,A]=ve.useState(!1),[H,$]=ve.useState(""),V=ve.useRef({state:!1,value:""});ve.useState(!1);const U=ve.useRef(null),[K,X]=ve.useState(et()),[M,q]=ve.useState(""),[b,j]=ve.useState({start:null,end:null}),ne=ve.useRef(null),J=(S,B,N)=>{let G="",W={start:"",end:""};!B&&(m==="single"||typeof S=="string")&&(G=S,$(G)),!B&&(m!=="single"||typeof S!="string")&&(G=`${et((S==null?void 0:S.start)??"").format(a)} / ${S!=null&&S.end?et(S.end).format(a):""}`,W.start=et((S==null?void 0:S.start)??"").format(a),W.end=S!=null&&S.end?et(S.end).format(a):"",$(G)),B&&(G=et(S).format(a),$(G)),S!=null&&S.end&&A(!1),o&&typeof o=="function"&&!N&&(o(W.start!==""?W:G),V.current.value=W.start!==""?W:G)},pe=S=>{S.stopPropagation(),q(""),V.current.value="",$(""),j({start:null,end:null}),o&&typeof o=="function"&&o("")},le=S=>{S.composedPath().includes(ne.current)||A(!1)},Q=S=>{u&&S.composedPath().includes(ne.current)||A(!1)},z=()=>{l&&typeof l=="function"&&l()},y=()=>{s&&typeof s=="function"&&s()},I=()=>{const S=ne.current,B=U.current;if(!B||!S)return;const N=S.getBoundingClientRect(),G=window.innerHeight,W=window.innerWidth;u?(B.style.position="fixed",N.bottom+B.offsetHeight>G?(B.style.top=`${window.scrollY+N.top-B.offsetHeight-8}px`,B.style.bottom="unset"):(B.style.top=`${window.scrollY+N.bottom+8}px`,B.style.bottom="unset"),N.right+N.width>W?B.style.left=`${window.scrollX+N.left+N.width-B.offsetWidth}px`:B.style.left=`${window.scrollX+N.left}px`):(N.bottom>G?(B.style.top="unset",B.style.bottom="calc(100% + 8px)"):(B.style.bottom="unset",B.style.top="calc(100% + 8px)"),N.right>window.innerWidth?B.style.left=`calc(100% - ${N.width}px)`:N.left<0&&(B.style.left="0px"))};return ve.useEffect(()=>{if(n&&V.current.value===""){let S=Array.isArray(n)?{start:et(n[0],a),end:n.length>1?et(n[1],a):""}:et(n,a).format(a);V.current.value=n,V.current.state=!0,console.log(n,a),S&&J(S,!1,!0)}},[]),ve.useEffect(()=>{R&&I()},[U,R]),ve.useEffect(()=>(document.addEventListener("click",le),document.addEventListener("wheel",Q),()=>{document.removeEventListener("click",le),document.removeEventListener("wheel",Q)}),[]),k.jsxs("div",{className:`${x==="dark"?Kn.dark:""} ${Kn.datepickerContainer}`,children:[e&&k.jsxs("label",{className:Kn.datepickerLabel,style:h??{},children:[e," ",k.jsx("span",{className:Kn.required,style:f??{},children:t&&"*"})]}),k.jsxs("div",{ref:ne,onFocus:z,onBlur:y,className:`${Kn.datepicker} ${R?Kn.focused:""} ${Kn[r]} ${T?Kn.disabled:""}`,onClick:()=>A(S=>!S),style:d??{},children:[k.jsx("div",{style:{display:"grid",placeItems:"center"},children:k.jsx(IF,{})}),k.jsx("input",{type:"text",readOnly:!0,placeholder:c??"",value:H}),H?k.jsx("div",{onClick:S=>pe(S),style:{display:"grid",placeItems:"center"},children:k.jsx(yu,{})}):k.jsx("div",{style:{display:"grid",placeItems:"center",transform:R?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:k.jsx(wh,{})}),R&&k.jsx(wF,{theme:x,defaultValue:V.current,CalendarRef:U,valueFormat:a,onChange:J,CurrentMonth:K,setCurrentMonth:X,SelectedDate:M,setSelectedDate:q,IsFocused:R,setIsFocused:A,quickPick:g,mode:m,RangeSelection:b,setRangeSelection:j,type:C})]}),i&&(i==null?void 0:i.visible)&&k.jsx("div",{style:p??{},className:`${Kn.datepickerHelperText} ${i!=null&&i.error?Kn.error:""}`,children:k.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},TF="Slider-module__sliderContainer",AF="Slider-module__slider",DF="Slider-module__sliderProgress",OF="Slider-module__thumb",RF="Slider-module__thumbLeft",kF="Slider-module__thumbRight",BF="Slider-module__values",LF="Slider-module__top",PF="Slider-module__dark",mn={sliderContainer:TF,slider:AF,sliderProgress:DF,thumb:OF,thumbLeft:RF,thumbRight:kF,values:BF,top:LF,dark:PF},FF=()=>{const[e,t]=ve.useState(),i=(n,r)=>{clearTimeout(e),t(setTimeout(()=>{n()},r??500))};return ve.useEffect(()=>()=>{clearTimeout(e)},[]),i},II=({minValue:e,maxValue:t,min:i=0,max:n=100,label:r="top",showLabels:a=!1,withPercent:o=!1,debounceTime:s,onChange:l,theme:u})=>{const d=ve.useRef(!0),[c,h]=ve.useState({minValue:e??i,maxValue:t??n}),[f,p]=ve.useState({min:!1,max:!1}),g=FF(),m=ve.useRef(null),C=A=>{const $=m.current.getBoundingClientRect(),V=Math.min(Math.max(0,(A-$.left)/$.width),1);return Math.round(V*(n-i)+i)},x=A=>H=>{H.preventDefault();const $=U=>{const K=C(U.clientX);h(X=>A==="min"?{...X,minValue:Math.min(K,X.maxValue-1)}:{...X,maxValue:Math.max(K,X.minValue+1)})},V=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",V)};document.addEventListener("mousemove",$),document.addEventListener("mouseup",V)},T=A=>{const H=C(A.clientX),$=Math.abs(H-c.minValue),V=Math.abs(H-c.maxValue),U=$<V?"min":"max";h(K=>U==="min"?{...K,minValue:Math.min(H,K.maxValue-1)}:{...K,maxValue:Math.max(H,K.minValue+1)}),x(U)(A)},R={left:`${(c.minValue-i)/(n-i)*100}%`,width:`${(c.maxValue-c.minValue)/(n-i)*100}%`};return ve.useEffect(()=>{if(d.current){d.current=!1;return}l&&typeof l=="function"&&g(()=>l([c.minValue,c.maxValue]),s??100)},[c]),k.jsx("div",{className:`${u==="dark"?mn.dark:""} ${mn.sliderContainer}`,children:k.jsxs("div",{ref:m,className:mn.slider,onMouseDown:T,children:[k.jsx("div",{className:mn.sliderProgress,style:R}),k.jsx("div",{className:`${mn.thumb} ${mn.thumbLeft}`,style:{left:`${(c.minValue-i)/(n-i)*100}%`},onMouseEnter:()=>p({min:!0}),onMouseLeave:()=>p({min:!1}),onMouseDown:x("min"),children:a&&f.min&&k.jsx("div",{className:`${mn.values} ${mn[r]}`,children:k.jsxs("span",{children:[c.minValue,o&&"%"]})})}),k.jsx("div",{className:`${mn.thumb} ${mn.thumbRight}`,style:{left:`${(c.maxValue-i)/(n-i)*100}%`},onMouseEnter:()=>p({max:!0}),onMouseLeave:()=>p({max:!1}),onMouseDown:x("max"),children:a&&f.max&&k.jsx("div",{className:`${mn.values} ${mn[r]}`,children:k.jsxs("span",{children:[c.maxValue,o&&"%"]})})})]})})},MF=({options:e,filterOptions:t,selectedDropdown:i,deleteDate:n,setdeleteDate:r,setdeleteTime:a,deleteTime:o,renderComp:s,isLastElement:l,theme:u,onSingleChange:d,fieldGap:c,fieldStyle:h,MultiselectKey:f})=>{const[p,g]=ve.useState(!1),[m,C]=ve.useState(!1),[x,T]=ve.useState(""),[R,A]=ve.useState(""),H=ve.useRef([]);ve.useEffect(()=>{e.options[0].type=="slider"&&(T(e.options[0].min),A(e.options[0].max))},[e]),ve.useEffect(()=>{C(b=>!b),e.options[0].type=="slider"&&(T(e.options[0].min),A(e.options[0].max))},[s]);const $=()=>{let b=t.map(ne=>ne.options);H.current=b;let j=[];for(let ne=0;ne<H.current.length;ne++)j.push(...H.current[ne]);d&&typeof d=="function"&&d(j.filter(ne=>ne.value!==""))},V=b=>b!=null&&b.style&&Object.keys(b==null?void 0:b.style).length>0?b==null?void 0:b.style:{width:b.width?b.width*13.6875+(b.width-1)*1.9375+"rem":"13.6875rem"},U=b=>b&&Object.keys(b).length>0?b:{display:"flex",justifyContent:"flex-start",flexWrap:"wrap",width:"100%",gap:"1.9375rem"},K=ve.useRef(null),X=ve.useRef(null),M=(b,j,ne)=>{switch(j){case"min":b<=ne.min?(K.current=ne.min,T(ne.min)):(K.current=b,T(b));break;case"max":b>ne.max?(X.current=ne.max,A(ne.max)):(X.current=b,A(b));break}ne.value=[{label:`${K.current} - ${X.current}`,range:[+K.current,+X.current]}],g(J=>!J),C(J=>!J)},q=()=>k.jsx("div",{style:U(h),children:e.options.map((b,j)=>{var ne,J,pe,le,Q,z,y,I;switch(b.type){case"slider":return k.jsxs("div",{style:{width:"100%",padding:"0 10px",display:"grid",placeItems:"center"},children:[k.jsx(II,{debounceTime:0,showLabels:!0,min:b.min,max:b.max,minValue:b.value!==""&&b.value[0].range[0]?(ne=b.value[0])==null?void 0:ne.range[0]:x,maxValue:b.value!==""&&b.value[0].range[1]!==0?(J=b.value[0])==null?void 0:J.range[1]:R,onChange:S=>{T(S[0]),A(S[1]),K.current=x,X.current=R,b.value=[{label:`${S?S[0]:x} - ${S?S[1]:R}`,range:S}],g(B=>!B),$()}}),k.jsxs("div",{className:hi.inputs,style:{width:"70%",margin:"auto",marginTop:"0.75rem",display:"flex",justifyContent:"space-between",gap:"0.625rem"},children:[k.jsx(fc,{label:"Minimum",value:b.value!==""&&b.value[0].range[0]!==0?(pe=b.value[0])==null?void 0:pe.range[0]:x,type:"number",onChange:S=>{M(S,"min",b),$()}}),k.jsx(fc,{label:"Maximum",value:b.value!==""&&b.value[0].range[1]!==0?b.value[0].range[1]:R,type:"number",onChange:S=>{M(S,"max",b),$()}})]})]},j);case"datePicker":return k.jsx("div",{style:V(b),children:ve.createElement(wI,{theme:u,...b.props,label:b.label,defaultValue:b.value.length>0?(le=b.value[0])!=null&&le.time?(Q=b.value[0])==null?void 0:Q.time:b.value:"",fixedDropdown:!0,key:n,onChange:S=>{S===""?b.value="":b.props.mode=="single"?b.value=[{label:S,time:S}]:b.props.mode=="range"&&(b.value=[{label:`${S.start} / ${S.end}`,time:[S.start,S.end]}]),$()}})},j);case"timePicker":return k.jsx("div",{style:V(b),children:ve.createElement(EI,{...b.props,label:b.label,key:o,theme:u,defaultHour:b.value.length>0?b.value[0].time.split(":")[0]:b.value,defaultMinute:b.value.length>0?b.value[0].time.split(":")[1]:b.value,fixedDropdown:!0,onClear:()=>{b.value="",a(!0),$(),g(S=>!S)},onTimeChange:S=>{S===""?b.value="":(b.value=[{label:S,time:S}],$(),g(B=>!B))}})},j);case"input":return k.jsx("div",{style:V(b),children:k.jsx(fc,{...b.props,theme:u,value:(z=b.value[0])!=null&&z.id?(y=b.value[0])==null?void 0:y.id:b.value,label:b.label,onChange:S=>{S!==""?b.value=[{id:S,label:S}]:b.value="",$(),g(B=>!B)}})},j);case"dropdown":return k.jsx("div",{style:V(b),children:ve.createElement(l_,{...b.props,label:b.label,theme:u,data:b.data,key:i,fixedDropdown:!0,withFilter:!0,selectedOptionID:((I=b.value[0])==null?void 0:I.id)??null,onSelect:S=>{Object.keys(S).length===0?b.value="":(!Array.isArray(b.value)||b.value[0]!==S)&&(b.value=[S],$())}})},j);case"multiselect":return k.jsx("div",{style:V(b),children:ve.createElement(l_,{...b.props,key:f,label:b.label,theme:u,fixedDropdown:!0,data:b.data,withMultiSelect:!0,onSelect:S=>{S.length===0?b.value="":(b.value=S,$())}})},j);case"checkBox":return k.jsxs("div",{className:hi.checkbox,children:[k.jsx(Ih,{...b.props,checked:b.checked,theme:u,change:S=>{b.checked=!b.checked,b.checked?b.value=[{label:b.label,id:b.label,checked:b.checked}]:b.value="",g(B=>!B),$()}}),k.jsx("span",{className:hi.checkboxLabel,children:b.label})]},j);case"radio":return k.jsxs("div",{className:hi.checkbox,children:[k.jsx(yI,{...b.props,checked:b.checked,withUncheckState:!0,theme:u,change:S=>{b.checked=!b.checked,b.checked?b.value=[{label:b.label,id:b.label,checked:b.checked}]:b.value="",g(B=>!B),$()}}),k.jsx("span",{className:hi.checkboxLabel,children:b.label})]},j)}})});return k.jsxs("div",{className:hi.filterCont,children:[k.jsxs("div",{className:hi.title,children:[k.jsx("h3",{children:e.title}),k.jsx("p",{children:(e==null?void 0:e.subText)??""})]}),k.jsx("div",{className:hi.renderComponent,children:q()}),!l&&k.jsx("hr",{})]})},TI=()=>k.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",fill:"none",viewBox:"0 0 14 14",children:k.jsx("path",{fill:"#555F62",stroke:"#555F62",strokeWidth:"0.2",d:"M3.944 9.045c.9 0 1.664-.582 1.938-1.39h7.229a.656.656 0 100-1.31H5.88a2.045 2.045 0 00-3.874 0H.89a.656.656 0 100 1.31h1.118a2.045 2.045 0 001.937 1.39zm6.111.633c-.9 0-1.663.581-1.937 1.389H.89a.656.656 0 100 1.311h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.311h-1.119a2.045 2.045 0 00-1.937-1.389zm0-9.445c-.9 0-1.663.582-1.937 1.39H.89a.656.656 0 100 1.31h7.23a2.045 2.045 0 003.873 0h1.119a.656.656 0 100-1.31h-1.119a2.045 2.045 0 00-1.937-1.39zm.734 2.045a.733.733 0 11-1.467 0 .733.733 0 011.467 0zm0 9.444a.733.733 0 11-1.467 0 .733.733 0 011.467 0zM3.21 7a.733.733 0 111.467 0A.733.733 0 013.21 7z"})}),VF=({onApply:e,filterOptions:t,modalSize:i,buttonStyle:n,tagPosition:r="bottom",rowReverse:a=!0,filterIcon:o,tagStyle:s,visibleTagsNumber:l,onClearAll:u,theme:d,resultNumber:c,onSingleChange:h,loaded:f,onFilterClick:p,popupWidth:g,fieldGap:m,labels:C,singleFieldStyle:x,buttonLabel:T,initialApply:R=!1,withTags:A=!0,clickOutside:H=!0,width:$,popupProps:V,tagsProps:U})=>{var de,Ce,ae,we,Le,Ie,We,Qe,it,Kt,wi,Ge,wt,bt,Ki,rn,ui,Se,Xe,Wt,ai,Oi;const[K,X]=ve.useState(!1),[M,q]=ve.useState(c??null),[b,j]=ve.useState(!1);ve.useEffect(()=>{f&&X(f)},[f]),ve.useEffect(()=>{q(c)},[c]),ve.useEffect(()=>{R&&_e()},[]);const[ne,J]=ve.useState(!1),[pe,le]=ve.useState(!1),[Q,z]=ve.useState(!1),[y,I]=ve.useState(!1),[S,B]=ve.useState(!1),[N,G]=ve.useState(0),W=ve.useRef([]),ie=ve.useRef([]),re=ve.useRef([]),_e=()=>{let ze=t.map(Ve=>Ve.options);W.current=ze;let ft=[];for(let Ve=0;Ve<W.current.length;Ve++)ft.push(...W.current[Ve]);ie.current=ft;let ye=[];for(let Ve=0;Ve<ie.current.length;Ve++)ye.push(...ie.current[Ve].value);re.current=ye,X(!1),e&&typeof e=="function"&&e(ie.current.filter(Ve=>Ve.value!==""))},oe=()=>{u&&typeof u=="function"&&u([])},Re=ze=>{ze.selected&&(ze.selected=!1);let ft=re.current.filter(Ve=>Ve.label+Ve.id===ze.label+ze.id);t.forEach(Ve=>{Ve.options.map(St=>{St.value.includes(ft[0])&&(St.data&&(St.data.filter(vr=>vr.itemNodeID===ft[0].itemNodeID)[0].selected=!1,St.value=St.value.filter(vr=>vr.selected!==!1)),St.type=="dropdown"&&(St.value=""),St.type=="input"&&(St.value=""),(St.type=="checkBox"||St.type=="toggle"||St.type=="radio")&&(St.value="",St.checked=!1),St.type=="slider"&&(St.value=""),(St.type=="datePicker"||St.type=="timePicker")&&(St.value=""))})}),I(Ve=>!Ve),B(Ve=>!Ve),le(Ve=>!Ve),z(Ve=>!Ve);let ye=ie.current.filter(Ve=>Ve.value.length>0);e&&typeof e=="function"&&e(ye),re.current=re.current.filter(Ve=>Ve.label+Ve.id!==ze.label+ze.id),re.current.length===0&&oe(),J(Ve=>!Ve)},[w,he]=ve.useState(l),[se,L]=ve.useState(!0),[P,Y]=ve.useState(!1);return ve.useEffect(()=>{const ze=ft=>{ft.key==="Enter"&&K&&_e()};return window.addEventListener("keypress",ze),()=>{window.removeEventListener("keypress",ze)}},[_e]),k.jsxs("div",{className:`${d==="dark"?hi.dark:""} ${hi.compWrapper}`,style:{display:r=="side"?"flex":"block",flexDirection:a?"row-reverse":"row",justifyContent:a?"space-between":null,gap:`${a?"0":"1"}.125rem`},children:[k.jsxs("div",{className:hi.filterButton,style:(n==null?void 0:n.style)??null,onClick:()=>{p&&typeof p=="function"&&p([]),f||f==!1?X(f):X(!0)},children:[k.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:o||k.jsx(TI,{})}),k.jsxs("span",{className:hi.filter,style:(T==null?void 0:T.style)??{},children:[(T==null?void 0:T.label)??"Filter",M&&!A&&k.jsx("span",{className:hi.resultNumber,style:((de=C==null?void 0:C.showResultName)==null?void 0:de.style)??{},children:M??""})]})]}),K&&k.jsxs(Pg,{theme:d,visible:!0,size:i??"medium",titleStyle:((Ce=C==null?void 0:C.headerName)==null?void 0:Ce.style)??{},options:{title:(ae=C==null?void 0:C.headerName)!=null&&ae.label||((we=C==null?void 0:C.headerName)==null?void 0:we.label.length)>0?(Le=C==null?void 0:C.headerName)==null?void 0:Le.label:"Filters",align:"center"},onClickOutside:()=>H?X(!1):null,popupContainerStyle:{width:$??"825px"},...V,children:[k.jsx("div",{style:{maxHeight:"65vh",overflowY:"auto",paddingBottom:"4px"},children:t.map((ze,ft)=>{let ye=ft===t.length-1;return k.jsx("div",{children:k.jsx(MF,{MultiselectKey:b,popupWidth:g,fieldStyle:(ze==null?void 0:ze.style)??{},singleFieldStyle:x,fieldGap:m,setrenderComp:Y,renderComp:P,deleteDate:y,setdeleteDate:I,setdeleteTime:B,deleteTime:S,setopenPopup:X,options:ze,filterOptions:t,tagValue:re.current,selectedDropdown:pe,setselectedDropdown:le,deleteMultiSelect:Q,setdeleteMultiSelect:z,isLastElement:ye,setcounter:G,theme:d,onSingleChange:h})},ft)})}),k.jsxs("div",{className:hi.footer,children:[k.jsx("div",{className:hi.clear,onClick:()=>{h&&typeof h=="function"&&h([]),t.forEach(ze=>{ze.options.forEach(ft=>{ft.value="",ft.type=="multiselect"&&ft.data.forEach(ye=>{ye.selected=!1}),(ft.type=="radio"||ft.type=="checkBox")&&(ft.checked=!1)})}),re.current=[],le(ze=>!ze),z(ze=>!ze),I(ze=>!ze),B(ze=>!ze),G(0),oe(),e&&typeof e=="function"&&e(re.current),Y(ze=>!ze),j(ze=>!ze),J(ze=>!ze)},style:((Ie=C==null?void 0:C.clearAllName)==null?void 0:Ie.style)??{},children:(We=C==null?void 0:C.clearAllName)!=null&&We.label||((it=(Qe=C==null?void 0:C.clearAllName)==null?void 0:Qe.label)==null?void 0:it.length)>0?(Kt=C==null?void 0:C.clearAllName)==null?void 0:Kt.label:"Clear All"}),k.jsxs("div",{className:hi.buttonsWrapper,children:[k.jsx(iu,{buttonStyle:(wi=C==null?void 0:C.closeName)!=null&&wi.style?{...(Ge=C==null?void 0:C.closeName)==null?void 0:Ge.style,borderRadius:"0.375rem",backgroundColor:"transparent"}:{borderRadius:"0.375rem",backgroundColor:"transparent"},label:(wt=C==null?void 0:C.closeName)!=null&&wt.label||((Ki=(bt=C==null?void 0:C.closeName)==null?void 0:bt.label)==null?void 0:Ki.length)>0?(rn=C==null?void 0:C.closeName)==null?void 0:rn.label:"Close",onClick:()=>X(!1)}),k.jsx(iu,{buttonStyle:(ui=C==null?void 0:C.showResultName)!=null&&ui.style?{...(Se=C==null?void 0:C.showResultName)==null?void 0:Se.style,borderRadius:"0.375rem"}:{borderRadius:"0.375rem"},label:(Xe=C==null?void 0:C.showResultName)!=null&&Xe.label||((ai=(Wt=C==null?void 0:C.showResultName)==null?void 0:Wt.label)==null?void 0:ai.length)>0?(Oi=C==null?void 0:C.showResultName)==null?void 0:Oi.label:`Show ${M??""} result`,onClick:_e})]})]})]}),A&&re.current.length>0&&k.jsxs("div",{style:r=="side"?{marginTop:0}:{},className:hi.tag,children:[re.current.slice(0,w).map((ze,ft)=>k.jsx(Lg,{id:ze.id,label:ze.label,withClose:!0,theme:d,...U,onClose:ye=>Re(ze)},ft)),re.current.length>l&&w<=l&&se&&k.jsx("button",{className:hi.showButton,onClick:()=>{he(re.current.length),L(!1)},children:"Show More"}),!se&&re.current.length>=l&&k.jsx("button",{className:hi.showButton,onClick:()=>{he(l),L(!0)},children:"Show Less"}),k.jsx("button",{className:hi.showButton,onClick:()=>{t.forEach(ze=>{ze.options.forEach(ft=>{ft.value="",ft.type=="multiselect"&&ft.data.forEach(ye=>{ye.selected=!1}),(ft.type=="radio"||ft.type=="checkBox")&&(ft.checked=!1)})}),re.current=[],le(ze=>!ze),z(ze=>!ze),I(ze=>!ze),B(ze=>!ze),G(0),oe(),j(ze=>!ze),e&&typeof e=="function"&&e(re.current),Y(ze=>!ze),J(ze=>!ze)},children:"Clear All"})]})]})},NF="ProgressSteps-module__steps",HF="ProgressSteps-module__currentStep",$F="ProgressSteps-module__progressBar",WF="ProgressSteps-module__progressBarVertical",zF="ProgressSteps-module__singleStep",GF="ProgressSteps-module__texts",UF="ProgressSteps-module__currentText",KF="ProgressSteps-module__name",jF="ProgressSteps-module__subTitle",qF="ProgressSteps-module__vertical",YF="ProgressSteps-module__radioWrapper",XF="ProgressSteps-module__checked",ZF="ProgressSteps-module__innerCircle",QF="ProgressSteps-module__radioState",JF="ProgressSteps-module__disabled",eM="ProgressSteps-module__dark",Xt={steps:NF,currentStep:HF,progressBar:$F,progressBarVertical:WF,singleStep:zF,texts:GF,currentText:UF,name:KF,subTitle:jF,vertical:qF,radioWrapper:YF,checked:XF,innerCircle:ZF,radioState:QF,disabled:JF,dark:eM},tM=({width:e})=>k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"32",height:e??"32",viewBox:"0 0 32 32",fill:"none",children:[k.jsx("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"#0158FF"}),k.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.7953 9.8534L13.2487 19.0667L10.7153 16.3601C10.2487 15.9201 9.51534 15.8934 8.982 16.2667C8.462 16.6534 8.31534 17.3334 8.63534 17.8801L11.6353 22.7601C11.9287 23.2134 12.4353 23.4934 13.0087 23.4934C13.5553 23.4934 14.0753 23.2134 14.3687 22.7601C14.8487 22.1334 24.0087 11.2134 24.0087 11.2134C25.2087 9.98674 23.7553 8.90674 22.7953 9.84007V9.8534Z",fill:"white"})]}),iM=({currentStep:e,stepsData:t,onStepClick:i,independentStep:n,fillIcon:r,stepIcon:a,emptyIcon:o,gap:s=20,vertical:l=!1,stepsStyle:u,currentStepStyle:d,progressBarStyle:c,singleStepStyle:h,textsStyle:f,theme:p})=>{const g=x=>{i&&typeof i=="function"&&n&&i(x)},m=x=>l?{...x.id===t[t.length-1].id?{height:"0",top:0,left:0}:x.id===t[t.length-2].id?{height:`calc(100% + ${s}px`,top:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"}:{height:`calc(100% + ${s}px)`,top:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"},...c??{}}:{...x.id===t[t.length-1].id?{width:"0",left:0,right:0}:x.id===t[t.length-2].id?{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"}:{width:`calc(100% + ${s}px)`,left:"50%",backgroundColor:e>(x==null?void 0:x.id)?"#7F56D9":"#E9EAEB"},...c??{}},C=x=>x;return k.jsx("div",{className:`${p==="dark"?Xt.dark:""} ${Xt.steps} ${l?Xt.vertical:""}`,style:{...u,gap:s+"px"},children:t.map(x=>k.jsxs("div",{style:d??{},className:`${Xt.currentStep} ${x.disabled?Xt.disabled:""}`,onClick:()=>g(x),children:[l?k.jsx("div",{className:Xt.progressBarVertical,style:m(x)}):k.jsx("div",{style:m(x),className:Xt.progressBar}),k.jsx("div",{className:Xt.singleStep,style:h??{},children:k.jsx(k.Fragment,{children:x.isAllFilled?k.jsx(k.Fragment,{children:r?C(r):k.jsx(tM,{width:"24px"})}):e<(x==null?void 0:x.id)?k.jsx(k.Fragment,{children:o?C(o):k.jsx("div",{className:`${Xt.radioWrapper} ${Xt.md} ${Xt.checked} ${Xt.disabled}`,children:k.jsx("div",{className:Xt.radioState,children:k.jsx("div",{className:Xt.innerCircle})})})}):k.jsx(k.Fragment,{children:a?C(a):k.jsx("div",{className:`${Xt.radioWrapper} ${Xt.md} ${Xt.checked} `,children:k.jsx("div",{className:Xt.radioState,children:k.jsx("div",{className:Xt.innerCircle})})})})})}),k.jsxs("div",{className:`${Xt.texts} ${x.id===e?Xt.currentText:{}}`,style:f??{},children:[k.jsx("p",{style:(x==null?void 0:x.titleStyle)??{},className:Xt.name,children:x==null?void 0:x.name}),typeof(x==null?void 0:x.subTitle)=="function"?x.subTitle():k.jsx("p",{className:Xt.subTitle,style:x!=null&&x.subTitleStyle?{...x.subTitleStyle}:{},children:(x==null?void 0:x.subTitle)??""})??""]})]},x.id))})};var ce={},nM={"[object Array]":"array","[object Date]":"date","[object Object]":"object","[object String]":"string","[object Null]":"null"},On=function(e){var t=Object.prototype.toString.call(e);return typeof e=="object"?nM[t]||"object":typeof e},Ss=function(e){return typeof e=="boolean"},jC=function(e){return xt(e)&&e.toString().indexOf("e")!==-1},Mi=function(e){return On(e)==="date"},E=function(e){return e!=null},Ee=function(e){return typeof e=="function"},Me=function(e){return typeof e=="string"},xt=function(e){return typeof e=="number"&&isFinite(e)||!isNaN(e-parseFloat(e))},He=function(e){return On(e)==="object"},Rn=function(e){var t;for(t in e)return!1;return!0},Ye=function(e){if(!e||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e),i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof i=="function"&&Object.toString.call(i)===Object.toString.call(Object)},Hl=function(e){return["object","array","function"].indexOf(On(e))===-1},Yt=function(e){return e!=null&&e===e.window},hn=function(e){return!!e&&!!(e.jquery||e.dxRenderer)},xu=function(e){return!!e&&Ee(e.then)},Mg=function(e){return!!e&&Ee(e.done)&&Ee(e.fail)},rM=function(e){return!!(e&&e.preventDefault)},AI=function(e,t,i){e=e||{};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];(!(n in e)||i)&&(e[n]=r)}return e},O=function e(t){t=t||{};var i=1,n=!1;for(typeof t=="boolean"&&(n=t,t=arguments[1]||{},i++);i<arguments.length;i++){var r=arguments[i];if(r!=null)for(var a in r){var o=t[a],s=r[a],l=!1,u=void 0;a==="__proto__"||a==="constructor"||t===s||(n&&s&&(Ye(s)||(l=Array.isArray(s)))?(l?u=o&&Array.isArray(o)?o:[]:u=o&&Ye(o)?o:{},t[a]=e(n,u,s)):s!==void 0&&(t[a]=s))}}return t},Jt=(e,t)=>{if(Array.isArray(e))return e.map(t);var i=[];for(var n in e)i.push(t(e[n],n));return i},F=(e,t)=>{if(e){if("length"in e)for(var i=0;i<e.length&&t.call(e[i],i,e[i])!==!1;i++);else for(var n in e)if(t.call(e[n],n,e[n])===!1)break;return e}},aM=function(){},xf=function(e){return typeof console>"u"||!Ee(console[e])?aM:console[e].bind(console)},bu={info:xf("info"),warn:xf("warn"),error:xf("error")},Vg=function(){var e=[new RegExp("&","g"),new RegExp('"',"g"),new RegExp("'","g"),new RegExp("<","g"),new RegExp(">","g")];return function(t){return String(t).replace(e[0],"&amp;").replace(e[1],"&quot;").replace(e[2],"&#39;").replace(e[3],"&lt;").replace(e[4],"&gt;")}}(),oM=function(e){switch(typeof e){case"string":return e.split(/\s+/,4);case"object":return[e.x||e.h||e.left,e.y||e.v||e.top,e.x||e.h||e.right,e.y||e.v||e.bottom];case"number":return[e];default:return e}},sM=function(e){var t=oM(e),i=parseInt(t&&t[0],10),n=parseInt(t&&t[1],10),r=parseInt(t&&t[2],10),a=parseInt(t&&t[3],10);return isFinite(i)||(i=0),isFinite(n)||(n=i),isFinite(r)||(r=i),isFinite(a)||(a=n),{top:n,right:r,bottom:a,left:i}};function Hr(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Ee(e)?e(...i):(i.forEach((r,a)=>{Me(r)&&(r=r.replace(/\$/g,"$$$$"));var o=new RegExp("\\{"+a+"\\}","gm");e=e.replace(o,r)}),e)}var $l=function(){var e=/\s/g;return function(t){return!t||!t.replace(e,"")}}(),lM="22.1.3",uM="http://js.devexpress.com/error/"+lM.split(".").slice(0,2).join("_")+"/";function Ng(e,t){var i={ERROR_MESSAGES:O(t,e),Error:function(){return o([].slice.call(arguments))},log:function(l){var u="log";/^E\d+$/.test(l)?u="error":/^W\d+$/.test(l)&&(u="warn"),bu[u](u==="log"?l:n([].slice.call(arguments)))}};function n(l){var u=l[0];return l=l.slice(1),a(u,r(u,l))}function r(l,u){return u=[i.ERROR_MESSAGES[l]].concat(u),Hr.apply(this,u).replace(/\.*\s*?$/,"")}function a(l,u){return Hr.apply(this,[`{0} - {1}. See:
53
53
  {2}`,l,u,s(l)])}function o(l){var u=l[0];l=l.slice(1);var d=r(u,l),c=s(u),h=a(u,d);return O(new Error(h),{__id:u,__details:d,url:c})}function s(l){return uM+l}return i}const _t=Ng({E0001:"Method is not implemented",E0002:"Member name collision: {0}",E0003:"A class must be instantiated using the 'new' keyword",E0004:"The NAME property of the component is not specified",E0005:"Unknown device",E0006:"Unknown endpoint key is requested",E0007:"'Invalidate' method is called outside the update transaction",E0008:"Type of the option name is not appropriate to create an action",E0009:"Component '{0}' has not been initialized for an element",E0010:"Animation configuration with the '{0}' type requires '{1}' configuration as {2}",E0011:"Unknown animation type '{0}'",E0012:"jQuery version is too old. Please upgrade jQuery to 1.10.0 or later",E0013:"KnockoutJS version is too old. Please upgrade KnockoutJS to 2.3.0 or later",E0014:"The 'release' method shouldn't be called for an unlocked Lock object",E0015:"Queued task returned an unexpected result",E0017:"Event namespace is not defined",E0018:"DevExpress.ui.DevExpressPopup widget is required",E0020:"Template engine '{0}' is not supported",E0021:"Unknown theme is set: {0}",E0022:"LINK[rel=DevExpress-theme] tags must go before DevExpress included scripts",E0023:"Template name is not specified",E0024:"DevExtreme bundle already included",E0025:"Unexpected argument type",E0100:"Unknown validation type is detected",E0101:"Misconfigured range validation rule is detected",E0102:"Misconfigured comparison validation rule is detected",E0103:"validationCallback of an asynchronous rule should return a jQuery or a native promise",E0110:"Unknown validation group is detected",E0120:"Adapter for a DevExpressValidator component cannot be configured",E0121:"The 'customItem' parameter of the 'onCustomItemCreating' function is empty or contains invalid data. Assign a custom object or a Promise that is resolved after the item is created.",W0000:"'{0}' is deprecated in {1}. {2}",W0001:"{0} - '{1}' option is deprecated in {2}. {3}",W0002:"{0} - '{1}' method is deprecated in {2}. {3}",W0003:"{0} - '{1}' property is deprecated in {2}. {3}",W0004:"Timeout for theme loading is over: {0}",W0005:"'{0}' event is deprecated in {1}. {2}",W0006:"Invalid recurrence rule: '{0}'",W0007:"'{0}' Globalize culture is not defined",W0008:"Invalid view name: '{0}'",W0009:"Invalid time zone name: '{0}'",W0010:"{0} is deprecated in {1}. {2}",W0011:"Number parsing is invoked while the parser is not defined",W0012:"Date parsing is invoked while the parser is not defined",W0013:"'{0}' file is deprecated in {1}. {2}",W0014:"{0} - '{1}' type is deprecated in {2}. {3}",W0015:"Instead of returning a value from the '{0}' function, write it into the '{1}' field of the function's parameter.",W0016:'The "{0}" option does not accept the "{1}" value since v{2}. {3}.',W0017:'Setting the "{0}" property with a function is deprecated since v21.2',W0018:'Setting the "position" property with a function is deprecated since v21.2'});var dM=function(e,t,i){return function(){var n=this.callBase;this.callBase=e[t];try{return i.apply(this,arguments)}finally{this.callBase=n}}},cM=function(e){var t=function(){};return t.prototype=e.prototype,new t},hM=function(e){var t,i,n;if(!e)return this;for(i in e)n=e[i],t=typeof this.prototype[i]=="function"&&typeof n=="function",this.prototype[i]=t?dM(this.parent.prototype,i,n):n;return this},fM=function(){var e=this,t,i,n,r=Object.prototype.hasOwnProperty.bind(e),a=!r("_includedCtors")&&!r("_includedPostCtors");for(a&&(e._includedCtors=e._includedCtors.slice(0),e._includedPostCtors=e._includedPostCtors.slice(0)),n=0;n<arguments.length;n++){t=arguments[n],t.ctor&&e._includedCtors.push(t.ctor),t.postCtor&&e._includedPostCtors.push(t.postCtor);for(i in t)i==="ctor"||i==="postCtor"||i==="default"||(e.prototype[i]=t[i])}return e},pM=function(e){var t=Object.prototype.hasOwnProperty.bind(this)("parent"),i=!t&&this.parent;if(i){var n=Object.getPrototypeOf(this);return n===e||n.subclassOf(e)}else return this.parent===e?!0:!this.parent||!this.parent.subclassOf?!1:this.parent.subclassOf(e)},DI=function(){throw _t.Error("E0001")},vM=function(){var e=Object.prototype.hasOwnProperty;return function(t,i){for(var n in t){if(!e.call(t,n))return;i[n]=t[n]}}}(),nt=function(){};nt.inherit=function(e){var t=function(){if(!this||Yt(this)||typeof this.constructor!="function")throw _t.Error("E0003");var i=this,n=i.ctor,r=i.constructor._includedCtors,a=i.constructor._includedPostCtors,o;for(o=0;o<r.length;o++)r[o].call(i);for(n&&n.apply(i,arguments),o=0;o<a.length;o++)a[o].call(i)};return t.prototype=cM(this),vM(this,t),t.inherit=this.inherit,t.abstract=DI,t.redefine=hM,t.include=fM,t.subclassOf=pM,t.parent=this,t._includedCtors=this._includedCtors?this._includedCtors.slice(0):[],t._includedPostCtors=this._includedPostCtors?this._includedPostCtors.slice(0):[],t.prototype.constructor=t,t.redefine(e),t};nt.abstract=DI;function kn(e){var t=nt.inherit(e),i=t,n=new i(e),r={},a=function(o,s){F(o,function(l){Ee(n[l])?(s||!e[l])&&(e[l]=function(){return n[l].apply(e,arguments)}):(s&&(r[l]=e[l]),e[l]=n[l])})};return a(e,!0),e.inject=function(o){i=i.inherit(o),n=new i,a(o)},e.resetInjection=function(){O(e,r),i=t,n=new t},e}var qC={rtlEnabled:!1,defaultCurrency:"USD",defaultUseCurrencyAccountingStyle:!0,oDataFilterToLower:!0,serverDecimalSeparator:".",decimalSeparator:".",thousandsSeparator:",",forceIsoDateParsing:!0,wrapActionsBeforeExecute:!0,useLegacyStoreResult:!1,useJQuery:void 0,editorStylingMode:void 0,useLegacyVisibleIndex:!1,floatingActionButtonConfig:{icon:"add",closeIcon:"close",label:"",position:{at:"right bottom",my:"right bottom",offset:{x:-16,y:-16}},maxSpeedDialActionCount:5,shading:!1,direction:"auto"},optionsParser:e=>{e.trim().charAt(0)!=="{"&&(e="{"+e+"}");try{return new Function("return "+e)()}catch(t){throw _t.Error("E3018",t,e)}}},_M=["decimalSeparator","thousandsSeparator"],It=function(){if(!arguments.length)return qC;var e=arguments.length<=0?void 0:arguments[0];_M.forEach(t=>{if(e[t]){var i="Now, the ".concat(t," is selected based on the specified locale.");_t.log("W0003","config",t,"19.2",i)}}),O(qC,e)};typeof DevExpress<"u"&&DevExpress.config&&It(DevExpress.config);var ri=nt.inherit({ctor:function(e){e&&(e=String(e)),this._value=this._normalize(e||this._generate())},_normalize:function(e){for(e=e.replace(/[^a-f0-9]/gi,"").toLowerCase();e.length<32;)e+="0";return[e.substr(0,8),e.substr(8,4),e.substr(12,4),e.substr(16,4),e.substr(20,12)].join("-")},_generate:function(){for(var e="",t=0;t<32;t++)e+=Math.round(15*Math.random()).toString(16);return e},toString:function(){return this._value},valueOf:function(){return this._value},toJSON:function(){return this._value}}),Ur=function(e){this._options=e||{},this._list=[],this._queue=[],this._firing=!1,this._fired=!1,this._firingIndexes=[]};Ur.prototype._fireCore=function(e,t){var i=this._firingIndexes,n=this._list,r=this._options.stopOnFalse,a=i.length;for(i[a]=0;i[a]<n.length;i[a]++){var o=n[i[a]].apply(e,t);if(o===!1&&r)break}i.pop()};Ur.prototype.add=function(e){return typeof e=="function"&&(!this._options.unique||!this.has(e))&&this._list.push(e),this};Ur.prototype.remove=function(e){var t=this._list,i=this._firingIndexes,n=t.indexOf(e);if(n>-1&&(t.splice(n,1),this._firing&&i.length))for(var r=0;r<i.length;r++)n<=i[r]&&i[r]--;return this};Ur.prototype.has=function(e){var t=this._list;return e?t.indexOf(e)>-1:!!t.length};Ur.prototype.empty=function(e){return this._list=[],this};Ur.prototype.fireWith=function(e,t){var i=this._queue;if(t=t||[],t=t.slice?t.slice():t,this._options.syncStrategy)this._firing=!0,this._fireCore(e,t);else{if(i.push([e,t]),this._firing)return;for(this._firing=!0;i.length;){var n=i.shift();this._fireCore(n[0],n[1])}}return this._firing=!1,this._fired=!0,this};Ur.prototype.fire=function(){this.fireWith(this,arguments)};Ur.prototype.fired=function(){return this._fired};var dt=function(e){return new Ur(e)},OI=[{method:"resolve",handler:"done",state:"resolved"},{method:"reject",handler:"fail",state:"rejected"},{method:"notify",handler:"progress"}],Es=function(){var e=this;this._state="pending",this._promise={},OI.forEach((function(t){var i=t.method;this[i+"Callbacks"]=new dt,this[i]=(function(){return this[i+"With"](this._promise,arguments)}).bind(this),this._promise[t.handler]=function(n){if(!n)return this;var r=e[i+"Callbacks"];return r.fired()?n.apply(e[i+"Context"],e[i+"Args"]):r.add((function(a,o){n.apply(a,o)}).bind(this)),this}}).bind(this)),this._promise.always=function(t){return this.done(t).fail(t)},this._promise.catch=function(t){return this.then(null,t)},this._promise.then=function(t,i){var n=new Es;return["done","fail"].forEach((function(r){var a=r==="done"?t:i;this[r](function(){if(!a){n[r==="done"?"resolve":"reject"].apply(this,arguments);return}var o=a&&a.apply(this,arguments);Mg(o)?o.done(n.resolve).fail(n.reject):xu(o)?o.then(n.resolve,n.reject):n.resolve.apply(this,E(o)?[o]:arguments)})}).bind(this)),n.promise()},this._promise.state=function(){return e._state},this._promise.promise=function(t){return t?O(t,e._promise):e._promise},this._promise.promise(this)};OI.forEach(function(e){var t=e.method,i=e.state;Es.prototype[t+"With"]=function(n,r){var a=this[t+"Callbacks"];return this.state()==="pending"&&(this[t+"Args"]=r,this[t+"Context"]=n,i&&(this._state=i),a.fire(n,r)),this}});function gi(e,t){if(Mg(e))return e;if(xu(e)){var i=new Es;return e.then(function(){i.resolveWith.apply(i,[t].concat([[].slice.call(arguments)]))},function(){i.rejectWith.apply(i,[t].concat([[].slice.call(arguments)]))}),i}return new Es().resolveWith(t,[e])}var gM=function(){if(arguments.length===1)return gi(arguments[0]);for(var e=[].slice.call(arguments),t=[],i=0,n=new Es,r=function(o){return function(s){t[o]=this,e[o]=arguments.length>1?[].slice.call(arguments):s,i++,i===e.length&&n.resolveWith(t,e)}},a=0;a<e.length;a++)Mg(e[a])?e[a].promise().done(r(a)).fail(n.reject):i++;return i===e.length&&n.resolveWith(t,e),n.promise()};function te(){return new Es}function Ae(){return gM.apply(this,arguments)}const Fi=kn({isWrapped:function(){return!1},isWritableWrapped:function(){return!1},wrap:function(e){return e},unwrap:function(e){return e},assign:function(){bu.error("Method 'assign' should not be used for not wrapped variables. Use 'isWrapped' method for ensuring.")}});var u_=function(e,t){var i=[],n,r;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.push(n);for(i.sort(function(a,o){var s=xt(a),l=xt(o);return s&&l?a-o:s&&!l?-1:!s&&l?1:a<o?-1:a>o?1:0}),r=0;r<i.length;r++)n=i[r],t(n,e[n])},mM=function(e,t,i,n){!n&&Fi.isWrapped(e[t])?Fi.assign(e[t],i):e[t]=i},Jn=function e(t,i,n,r){var a,o;for(var s in i)if(a=t[s],o=i[s],!(s==="__proto__"||s==="constructor"||t===o)){if(Ye(o)){var l=n?He(a):Ye(a);o=e(l?a:{},o,n,r)}o!==void 0&&a!==o&&mM(t,s,o,r)}return t},CM=Fi.unwrap,RI=Fi.isWrapped,yM=Fi.assign,xM=function(e){return e.replace(/\[/g,".").replace(/\]/g,"")},So=function(e){return xM(e).split(".")},bM=function(e,t,i){return i=i||{},nu(t==="this"?e:e[t],i)},kI=function(e,t,i,n){if(t==="this")throw new _t.Error("E4016");var r=e[t];n.unwrapObservables&&RI(r)?yM(r,i):e[t]=i},BI=function(e){return e=e||{},e.unwrapObservables=e.unwrapObservables!==void 0?e.unwrapObservables:!0,e};function nu(e,t){return t.unwrapObservables?CM(e):e}var mt=function(e){if(arguments.length>1&&(e=[].slice.call(arguments)),!e||e==="this")return function(i){return i};if(typeof e=="string"){var t=So(e);return function(i,n){n=BI(n);for(var r=n.functionsAsIs,a=("defaultValue"in n),o=nu(i,n),s=0;s<t.length;s++){if(!o){if(o==null&&a)return n.defaultValue;break}var l=t[s];if(a&&He(o)&&!(l in o))return n.defaultValue;var u=nu(o[l],n);!r&&Ee(u)&&(u=u.call(o)),o=u}return o}}if(Array.isArray(e))return SM(e);if(Ee(e))return e};function SM(e){for(var t={},i=0,n=e.length;i<n;i++){var r=e[i];t[r]=mt(r)}return function(a,o){var s;return F(t,function(l){var u=this(a,o);if(u!==void 0){for(var d=s||(s={}),c=l.split("."),h=c.length-1,f=0;f<h;f++){var p=c[f];p in d||(d[p]={}),d=d[p]}d[c[h]]=u}}),s}}var YC=function(e,t,i,n){if(E(i))return i;var r={};return kI(e,t,r,n),r},Hg=function(e){e=So(e||"this");var t=e.length-1;return function(i,n,r){r=BI(r);var a=nu(i,r);e.forEach(function(o,s){var l=bM(a,o,r),u=!r.functionsAsIs&&Ee(l)&&!RI(l);s===t?r.merge&&Ye(n)&&(!E(l)||Ye(l))?(l=YC(a,o,l,r),Jn(l,n,!1,!0)):u?a[o](n):kI(a,o,n,r):(l=YC(a,o,l,r),u&&(l=l.call(a)),a=l)})}},jt=function(e,t){return e instanceof Date?e.getTime():e&&e instanceof nt&&e.valueOf?e.valueOf():!t&&typeof e=="string"?e.toLowerCase():e},Ft=function(e,t){return E(e)?e:t},Th=function(e,t){var i=new te,n=t||this,r={promise:i.promise(),abort:function(){clearTimeout(o),i.rejectWith(n)}},a=function(){var s=e.call(n);s&&s.done&&Ee(s.done)?s.done(function(){i.resolveWith(n)}):i.resolveWith(n)},o=(arguments[2]||setTimeout)(a,typeof t=="number"?t:0);return r},bf=[],XC=[],qs=[],Ho,Ah=function(e,t,i){if(Ho&&Ho!==e)return bf.push(t),XC.push(e),i=i||new te,qs.push(i),i;var n=Ho,r=qs.length;Ho=e;var a=t();return a||(qs.length>r?a=Ae.apply(this,qs.slice(r)):i&&i.resolve()),Ho=n,i&&a&&a.done&&a.done(i.resolve).fail(i.reject),!Ho&&bf.length&&(XC.shift()==="render"?Zt:Bi)(bf.shift(),qs.shift()),a||Ae()},Zt=function(e,t){return Ah("render",e,t)},Bi=function(e,t){return Ah("update",e,t)},to=function(e){return function(){var t=this;return Ah("render",function(){return e.call(t)})}},d_=function(e){return function(){var t=this;return Ah("update",function(){return e.call(t)})}},$g=function(e,t,i){var n=[],r=0;return F(t,(a,o)=>{var s=0,l=i?i(o):o;F(e,(u,d)=>{var c=l[u];if(c!==void 0){if(EM(c,d)){s++;return}return s=-1,!1}}),!(s<r)&&(s>r&&(n.length=0,r=s),n.push(o))}),n},EM=function(e,t){if(Array.isArray(e)&&Array.isArray(t)){var i=!1;return F(e,(n,r)=>{if(r!==t[n])return i=!0,!1}),!i}return e===t},Eo=function(e){var t,i;switch(On(e)){case"string":return e.split(/\s+/,2);case"object":return[(t=e.x)!==null&&t!==void 0?t:e.h,(i=e.y)!==null&&i!==void 0?i:e.v];case"number":return[e];case"array":return e;default:return null}},wM=function(e){var t=Me(e)?e:e.toString(),i=t.match(/[^a-zA-Z0-9_]/g);return i&&F(i,(n,r)=>{t=t.replace(r,"__"+r.charCodeAt()+"__")}),t},IM=function(e){var t=e.match(/__\d+__/g);return t&&t.forEach(i=>{var n=parseInt(i.replace("__",""));e=e.replace(i,String.fromCharCode(n))}),e},Dh=function(e,t){var i=Eo(e),n=t?parseFloat(i&&i[0]):parseInt(i&&i[0],10),r=t?parseFloat(i&&i[1]):parseInt(i&&i[1],10);return isFinite(n)||(n=0),isFinite(r)||(r=n),{h:n,v:r}},Wn=function(e){if(e instanceof ri)return e.toString();if(He(e)||Array.isArray(e))try{var t=JSON.stringify(e);return t==="{}"?e:t}catch{return e}return e},Or=function(e){return e.replace(/[[\]{}\-()*+?.\\^$|\s]/g,"\\$&")},LI=function(e){var t=It().serverDecimalSeparator;return E(e)&&(e=e.toString().replace(".",t)),e},ee=function(){},Wg=function(){return new te().resolve().promise()},Vi=function(e,t,i){for(var n=[],r,a=!i,o=0;o<e.length;o++)r=!!t(e[o],o),r===a&&n.push(e[o]);return n},TM=function(e,t,i){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!kt(e[n],t[n],i+1))return!1;return!0},AM=function(e,t,i,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&!kt(e[r],t[r],i+1,n))return!1;for(var a in t)if(!(a in e))return!1;return!0},DM=3,kt=function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;e=jt(e,!0),t=jt(t,!0);var r=n?e===t:e==t;return r||i>=DM?!0:He(e)&&He(t)?AM(e,t,i,n):Array.isArray(e)&&Array.isArray(t)?TM(e,t,i):!1};const OM=Object.freeze(Object.defineProperty({__proto__:null,applyServerDecimalSeparator:LI,asyncNoop:Wg,deferRender:Zt,deferRenderer:to,deferUpdate:Bi,deferUpdater:d_,denormalizeKey:IM,ensureDefined:Ft,equalByValue:kt,escapeRegExp:Or,executeAsync:Th,findBestMatches:$g,getKeyHash:Wn,grep:Vi,noop:ee,normalizeKey:wM,pairToObject:Dh,splitPair:Eo},Symbol.toStringTag,{value:"Module"}));var RM=1,kM=3,BM=9,LM={querySelectorAll:(e,t)=>e.querySelectorAll(t),elementMatches(e,t){var i=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||(n=>{var r=e.document||e.ownerDocument;if(!r)return!1;for(var a=this.querySelectorAll(r,n),o=0;o<a.length;o++)if(a[o]===e)return!0});return i.call(e,t)},createElement(e,t){return t=t||this._document,t.createElement(e)},createElementNS(e,t,i){return i=i||this._document,i.createElementNS(e,t)},createTextNode(e,t){return t=t||this._document,t.createTextNode(e)},isNode:e=>e&&typeof e=="object"&&"nodeType"in e&&"nodeName"in e,isElementNode:e=>e&&e.nodeType===RM,isTextNode:e=>e&&e.nodeType===kM,isDocument:e=>e&&e.nodeType===BM,removeElement(e){var t=e&&e.parentNode;t&&t.removeChild(e)},insertElement(e,t,i){e&&t&&e!==t&&(i?e.insertBefore(t,i):e.appendChild(t))},getAttribute:(e,t)=>e.getAttribute(t),setAttribute(e,t,i){e.setAttribute(t,i)},removeAttribute(e,t){e.removeAttribute(t)},setProperty(e,t,i){e[t]=i},setText(e,t){e&&(e.textContent=t)},setClass(e,t,i){e.nodeType===1&&t&&(i?e.classList.add(t):e.classList.remove(t))},setStyle(e,t,i){e.style[t]=i||""},_document:typeof document>"u"?void 0:document,getDocument(){return this._document},getActiveElement(){return this._document.activeElement},getBody(){return this._document.body},createDocumentFragment(){return this._document.createDocumentFragment()},getDocumentElement(){return this._document.documentElement},getLocation(){return this._document.location},getSelection(){return this._document.selection},getReadyState(){return this._document.readyState},getHead(){return this._document.head},hasDocumentProperty(e){return e in this._document},listen(e,t,i,n){return!e||!("addEventListener"in e)?ee:(e.addEventListener(t,i,n),()=>{e.removeEventListener(t,i)})},elementsFromPoint(e,t){return this._document.elementsFromPoint(e,t)}};const fe=kn(LM);function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},be.apply(null,arguments)}class zg{constructor(){this.memory=[],this.callbacks=dt()}add(t){F(this.memory,(i,n)=>t.apply(t,n)),this.callbacks.add(t)}remove(t){this.callbacks.remove(t)}fire(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];this.memory.push(i),this.callbacks.fire.apply(this.callbacks,i)}}const Gg=new zg;var PM=typeof window<"u",Ke=()=>PM,Ya=Ke()?window:void 0;Ya||(Ya={},Ya.window=Ya);var qe=()=>Ya,PI=e=>Ke()&&e in Ya,Ug=e=>e<768?"xs":e<992?"sm":e<1200?"md":"lg",FI=e=>{var t=e||Ug,i=fe.getDocumentElement().clientWidth;return t(i)},Su=()=>Ke()?Ya.navigator:{userAgent:""},FM=["pageX","pageY","screenX","screenY","clientX","clientY"],MM=function(e,t){if(t[e]&&!t.touches||!t.touches)return t[e];var i=t.touches.length?t.touches:t.changedTouches;if(i.length)return i[0][e]};function VM(e){FM.forEach(function(t){e(t,function(i){return MM(t,i)})},this)}var Kr=function(e){var t,i=function(){return t=e.apply(this,arguments),i=function(){return t},t};return function(){return i.apply(this,arguments)}},Kg=qe(),ad="dxEmptyEventType",ZC={mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},NM={focusin:"focus",focusout:"blur"},HM=["blur","focus","load"],MI=["touchmove","wheel","mousewheel","touchstart"],$M=["target","relatedTarget","delegateTarget","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","shiftKey","view","char","code","charCode","key","keyCode","button","buttons","offsetX","offsetY","pointerId","pointerType","targetTouches","toElement","touches"];function WM(e,t){return!Yt(e)&&e.nodeName!=="#document"&&fe.elementMatches(e,t)}var Sf=new WeakMap,VI=0,Vc,aa=function(){var e={};return Gg.add(function(t,i){e[t]=i}),{getField:function(t,i){return e[t]&&e[t][i]},callMethod:function(t,i,n,r){return e[t]&&e[t][i]&&e[t][i].apply(n,r)}}}(),D=kn({on:Ys(c_(ey(function(e,t,i,n,r){var a=ls(e,t);a.addHandler(r,i,n)}))),one:Ys(c_(function(e,t,i,n,r){D.on(e,t,i,n,function a(){D.off(e,t,i,a),r.apply(this,arguments)})})),off:Ys(UM(ey(function(e,t,i,n){var r=ls(e,t);r.removeHandler(n,i)}))),trigger:Ys(JC(function(e,t,i){var n=t.type,r=ls(e,t.type);aa.callMethod(n,"trigger",e,[t,i]),r.callHandlers(t,i);var a=aa.getField(n,"noBubble")||t.isPropagationStopped()||HM.indexOf(n)!==-1;if(!a){var o=[];(function u(d){var c=d.parentNode;c&&(o.push(c),u(c))})(e),o.push(Kg);for(var s=0;o[s]&&!t.isPropagationStopped();){var l=ls(o[s],t.type);l.callHandlers(O(t,{currentTarget:o[s]}),i),s++}}(e.nodeType||Yt(e))&&(aa.callMethod(n,"_default",e,[t,i]),jM(n,e))})),triggerHandler:Ys(JC(function(e,t,i){var n=ls(e,t.type);n.callHandlers(t,i)}))});function jg(e,t){var i=e[0];if(i)if(fe.isNode(i)||Yt(i))t.apply(D,e);else if(!Me(i)&&"length"in i){var n=Array.prototype.slice.call(e,0);Array.prototype.forEach.call(i,function(r){n[0]=r,jg(n,t)})}else throw _t.Error("E0025")}function Ys(e){return function(){jg(arguments,e)}}function zM(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,!0}});Kg.addEventListener("test",null,t)}catch{}return e}var NI=Kr(zM),HI=(e,t)=>Yt(e)?HI(e.document,t):e.contains?e.contains(t):!!(t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_CONTAINS);function ls(e,t){var i=Sf.get(e);t=t||"";var n=t.split("."),r=n.slice(1),a=!!n[0];t=n[0]||ad,i||(i={},Sf.set(e,i)),i[t]||(i[t]={handleObjects:[],nativeHandler:null});var o=i[t];return{addHandler:function(s,l,u){var d=function(g,m){var C=[g],x=g.currentTarget,T=g.relatedTarget,R,A;t in ZC&&(R=T&&x&&(T===x||HI(x,T))),m!==void 0&&C.push(m),aa.callMethod(t,"handle",e,[g,u]),R||(A=s.apply(x,C)),A===!1&&(g.preventDefault(),g.stopPropagation())},c={handler:s,wrappedHandler:function(g,m){if(!(Vc&&g.type===Vc))if(g.data=u,g.delegateTarget=e,l)for(var C=g.target;C&&C!==e;)WM(C,l)&&(g.currentTarget=C,d(g,m)),C=C.parentNode;else g.currentTarget=g.delegateTarget||g.target,d(g,m)},selector:l,type:t,data:u,namespace:r.join("."),namespaces:r,guid:++VI};o.handleObjects.push(c);var h=o.handleObjects.length===1,f=h&&a,p;f&&(f=!aa.callMethod(t,"setup",e,[u,r,s])),f&&(o.nativeHandler=GM(t),NI()&&MI.indexOf(t)>-1&&(p={passive:!1}),o.removeListener=fe.listen(e,ZC[t]||t,o.nativeHandler,p)),aa.callMethod(t,"add",e,[c])},removeHandler:function(s,l){var u=function(h){var f=i[h];if(!f.handleObjects.length){delete i[h];return}var p;f.handleObjects=f.handleObjects.filter(function(C){var x=r.length&&!QC(C.namespaces,r)||s&&C.handler!==s||l&&C.selector!==l;return x||(p=C.handler,aa.callMethod(h,"remove",e,[C])),x});var g=!f.handleObjects.length,m=g&&h!==ad;m&&(aa.callMethod(h,"teardown",e,[r,p]),f.nativeHandler&&f.removeListener(),delete i[h])};if(a)u(t);else for(var d in i)u(d);var c=Object.keys(i).length===0;c&&Sf.delete(e)},callHandlers:function(s,l){var u=!1,d=function(c){u||(!r.length||QC(c.namespaces,r))&&(c.wrappedHandler(s,l),u=s.isImmediatePropagationStopped())};o.handleObjects.forEach(d),r.length&&i[ad]&&i[ad].handleObjects.forEach(d)}}}function GM(e){return function(t,i){var n=ls(this,e);t=D.Event(t),n.callHandlers(t,i)}}function QC(e,t){for(var i=0;i<t.length;i++)if(e.indexOf(t[i])<0)return!1;return!0}function c_(e){return function(t,i,n,r,a){a||(a=r,r=void 0),typeof n!="string"&&(r=n,n=void 0),!a&&typeof i=="string"&&(a=r||n,n=void 0,r=void 0),e(t,i,n,r,a)}}function UM(e){return function(t,i,n,r){typeof n=="function"&&(r=n,n=void 0),e(t,i,n,r)}}function JC(e){return function(t,i,n){typeof i=="string"&&(i={type:i}),i.target||(i.target=t),i.currentTarget=t,i.delegateTarget||(i.delegateTarget=t),!i.type&&i.originalEvent&&(i.type=i.originalEvent.type),e(t,i instanceof D.Event?i:D.Event(i),n)}}function KM(e){return D.Event=function(t,i){if(!(this instanceof D.Event))return new D.Event(t,i);t||(t={}),typeof t=="string"&&(t={type:t}),i||(i={}),e.call(this,t,i)},be(D.Event.prototype,{_propagationStopped:!1,_immediatePropagationStopped:!1,_defaultPrevented:!1,isPropagationStopped:function(){return!!(this._propagationStopped||this.originalEvent&&this.originalEvent.propagationStopped)},stopPropagation:function(){this._propagationStopped=!0,this.originalEvent&&this.originalEvent.stopPropagation()},isImmediatePropagationStopped:function(){return this._immediatePropagationStopped},stopImmediatePropagation:function(){this.stopPropagation(),this._immediatePropagationStopped=!0,this.originalEvent&&this.originalEvent.stopImmediatePropagation()},isDefaultPrevented:function(){return!!(this._defaultPrevented||this.originalEvent&&this.originalEvent.defaultPrevented)},preventDefault:function(){this._defaultPrevented=!0,this.originalEvent&&this.originalEvent.preventDefault()}}),D.Event}function ey(e){var t=function(i,n){if(n&&n.indexOf(" ")>-1){var r=Array.prototype.slice.call(arguments,0);n.split(" ").forEach(function(a){r[1]=a,e.apply(this,r)})}else e.apply(this,arguments)};return function(i,n){if(typeof n=="object"){var r=Array.prototype.slice.call(arguments,0);for(var a in n)r[1]=a,r[r.length-1]=n[a],t.apply(this,r)}else t.apply(this,arguments)}}function jM(e,t){var i=NM[e]||e;(function(n,r){return n==="click"&&r.localName==="a"})(e,t)||Ee(t[i])&&(Vc=e,t[i](),Vc=void 0)}function qM(e){return function(t){return t.which==null&&t.type.indexOf("key")===0}(e)?e.charCode!=null?e.charCode:e.keyCode:function(t){return!t.which&&t.button!==void 0&&/^(?:mouse|pointer|contextmenu|drag|drop)|click/.test(t.type)}(e)?{1:1,2:3,3:1,4:2}[e.button]:e.which}function $I(e){e&&(D.Event=e,D.Event.prototype=e.prototype)}$I(KM(function(e,t){var i,n=e instanceof D.Event||Ke()&&e instanceof Kg.Event||((i=e.view)===null||i===void 0?void 0:i.Event)&&e instanceof e.view.Event;n?(this.originalEvent=e,this.type=e.type,this.currentTarget=void 0,Object.prototype.hasOwnProperty.call(e,"isTrusted")&&(this.isTrusted=e.isTrusted),this.timeStamp=e.timeStamp||Date.now()):be(this,e),qg("which",qM,this),e.type.indexOf("touch")===0&&(delete t.pageX,delete t.pageY),be(this,t),this.guid=++VI}));function qg(e,t,i){Object.defineProperty(i||D.Event.prototype,e,{enumerable:!0,configurable:!0,get:function(){return this.originalEvent&&t(this.originalEvent)},set:function(n){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:n})}})}$M.forEach(e=>qg(e,t=>t[e]));VM(qg);var WI=dt(),zI=dt();D.set=function(e){WI.fire(),D.inject(e),$I(e.Event),zI.fire()};D.subscribeGlobal=function(){jg(arguments,c_(function(){var e=arguments;D.on.apply(this,e),WI.add(function(){var t=Array.prototype.slice.call(e,0);t.splice(3,1),D.off.apply(this,t)}),zI.add(function(){D.on.apply(this,e)})}))};D.forcePassiveFalseEventNames=MI;D.passiveEventHandlersSupported=NI;var Xs=new WeakMap,io,YM=new zg,GI=function(){},XM=function(e){YM.fire(e),io=e;var t=io.cleanData;io.cleanData=function(i){GI(i);var n=t.call(this,i);return n}};XM({data:function(){var e=arguments[0],t=arguments[1],i=arguments[2];if(e){var n=Xs.get(e);return n||(n={},Xs.set(e,n)),t===void 0?n:arguments.length===2?n[t]:(n[t]=i,i)}},removeData:function(e,t){if(e)if(t===void 0)Xs.delete(e);else{var i=Xs.get(e);i&&delete i[t]}},cleanData:function(e){for(var t=0;t<e.length;t++)D.off(e[t]),Xs.delete(e[t])}});function Mt(){return io.data.apply(this,arguments)}function ZM(e){GI=e}function Oh(e,t){return io.removeData.call(this,e,t)}function Eu(e,t){if(fe.isElementNode(e)){var i=e.getElementsByTagName("*");io.cleanData(i),t&&io.cleanData([e])}}var UI=function(e){return e==null?"":String(e)},Yg=function(e){return UI(e).charAt(0).toUpperCase()+e.substr(1)},Xg=function(e){return UI(e).replace(/([a-z\d])([A-Z])/g,"$1 $2").split(/[\s_-]+/)},Zg=function(e){return Jt(Xg(e),function(t){return t.toLowerCase()}).join("-")},Nc=function(e,t){return Jt(Xg(e),function(i,n){return i=i.toLowerCase(),(t||n>0)&&(i=Yg(i)),i}).join("")},QM=function(e){return Yg(Zg(e).replace(/-/g," "))},Hc=function(e){return Jt(Xg(e),function(t){return Yg(t.toLowerCase())}).join(" ")},JM=["0","1","2","3","4","5","6","7","8","9"],uo=function(e){var t=[],i,n,r=!1,a=!1;for(i=0;i<e.length;i++)n=e.charAt(i),a=n===n.toUpperCase()&&n!=="-"&&n!==")"&&n!=="/"||n in JM,n==="_"||n==="."?(n=" ",a=!0):i===0?(n=n.toUpperCase(),a=!0):!r&&a&&t.length>0&&t.push(" "),t.push(n),r=a;return t.join("")},$c=["","Webkit","Moz","O","Ms"],eV={"":"",Webkit:"-webkit-",Moz:"-moz-",O:"-o-",ms:"-ms-"},h_=Kr(function(){return fe.createElement("dx").style}),tV=function(e,t){e=Nc(e,!0);for(var i,n=0,r=$c.length;n<r;n++){var a=$c[n],o=a+e,s=Nc(o);if(i=t(s,a),i===void 0&&(i=t(o,a)),i!==void 0)break}return i||""},xa=function(e){if(e in h_())return e;var t=e;e=e.charAt(0).toUpperCase()+e.substr(1);for(var i=1;i<$c.length;i++){var n=$c[i].toLowerCase()+e;if(n in h_())return n}return t},pc=function(e){return tV(e,function(t,i){if(t in h_())return eV[i]})},iV=["fillOpacity","columnCount","flexGrow","flexShrink","fontWeight","lineHeight","opacity","zIndex","zoom"],ws=function(e,t){return xt(t)&&iV.indexOf(e)===-1&&(t+="px"),t},KI=function(e,t,i){if(e){i=xt(i)?i+="px":i;for(var n=0;n<e.length;++n)e[n].style[t]=i}},Ef=function(e,t){KI(e,"width",t)},wf=function(e,t){KI(e,"height",t)},Qg=qe(),nV=["auto","none","inherit","initial"],If=function(e,t){var i=0;return t.forEach(function(n){i+=parseFloat(e[n])||0}),i},jI=function(e,t){var i=e==="width"?"Left":"Top",n=e==="width"?"Right":"Bottom";return{padding:If(t,["padding"+i,"padding"+n]),border:If(t,["border"+i+"Width","border"+n+"Width"]),margin:If(t,["margin"+i,"margin"+n])}},qI=function(e){var t,i=(e==null||(t=e.ownerDocument)===null||t===void 0?void 0:t.defaultView)||Qg;return i.getComputedStyle&&i.getComputedStyle(e)},f_=function(e,t,i,n){var r;return(t==null?void 0:t[i])||((r=e.style)===null||r===void 0?void 0:r[i])||n},$o={content:0,padding:1,border:2,margin:3,"content-box":0,"border-box":2},ty={width:["left","right"],height:["top","bottom"]};function Zs(e,t,i,n){var r=(o,s,l)=>parseFloat(f_(o,s,l,"0"))||0,a=i==="border"?"-width":"";return r(e,n,"".concat(i,"-").concat(ty[t][0]).concat(a))+r(e,n,"".concat(i,"-").concat(ty[t][1]).concat(a))}var rV=function(e,t,i){var n=t==="width"?"offsetWidth":"offsetHeight",r=qI(e),a=f_(e,r,t);(a===""||a==="auto")&&(a=e[n]),a=parseFloat(a)||0;var o=f_(e,r,"boxSizing","content-box"),s=i||o,l=$o[s],u=$o[o];if(l===void 0||u===void 0)throw new Error;if(u===l)return a;var d=Math.sign(l-u),c=!1,h=!1,f=!1,p=!1;d===1&&(l+=1,u+=1);for(var g=u;g!==l;g+=d)switch(g){case $o.content:break;case $o.padding:c=d*Zs(e,t,"padding",r);break;case $o.border:h=d*Zs(e,t,"border",r);break;case $o.margin:f=d*Zs(e,t,"margin",r)}if(c||h){var m=(c===!1?d*Zs(e,t,"padding",r):c)+(h===!1?d*Zs(e,t,"border",r):h);p=d*Math.max(0,Math.floor(e[n]-a-d*m))||0}return a+f+c+h+p},aV=function(e){return Yt(e)?e.innerHeight:e.offsetHeight},oV=function(e,t){return e.indexOf("px")>0?e=parseInt(e.replace("px","")):e.indexOf("%")>0?e=parseInt(e.replace("%",""))*aV(t)/100:isNaN(e)?e.indexOf("vh")>0&&(e=Qg.innerHeight/100*parseInt(e.replace("vh",""))):e=parseInt(e),e},YI=function(e,t,i){if(!e)return null;if(nV.indexOf(e)>-1)return t?null:e;if(Me(e)&&(e=oV(e,i)),xt(e))return Math.max(0,e+t);var n=t<0?" - ":" ";return"calc("+e+n+Math.abs(t)+"px)"},sV=function(e,t,i){var n=YI(e,t,i);return n!==null?n:"none"},lV=function(e,t,i){var n=YI(e,t,i);return n!==null?n:0},Tf=function(e,t){if(!e)return 0;var i=jI("height",Qg.getComputedStyle(e));return i.padding+i.border+(t?i.margin:0)},iy=function(e){if(e){var t=e.getBoundingClientRect();if(t.height)return t.height}return 0},ur={getWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("width",...t)},setWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("width",...t)},getHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("height",...t)},setHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("height",...t)},getOuterWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("outerWidth",...t)},setOuterWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("outerWidth",...t)},getOuterHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("outerHeight",...t)},setOuterHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("outerHeight",...t)},getInnerWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("innerWidth",...t)},setInnerWidth:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("innerWidth",...t)},getInnerHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("innerHeight",...t)},setInnerHeight:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Cn("innerHeight",...t)}};function Cn(e,t,i){return arguments.length===2?ay(t,e):ay(t,e,i)}var $e=e=>ur.getWidth(e),wu=(e,t)=>ur.setWidth(e,t),je=e=>ur.getHeight(e),fn=(e,t)=>ur.setHeight(e,t),lt=(e,t)=>ur.getOuterWidth(e,t||!1),ny=(e,t)=>ur.setOuterWidth(e,t),at=(e,t)=>ur.getOuterHeight(e,t||!1),ry=(e,t)=>ur.setOuterHeight(e,t),p_=e=>ur.getInnerWidth(e),Wc=e=>ur.getInnerHeight(e),ay=function e(t,i,n){var r=i.toLowerCase().indexOf("width")>=0?"Width":"Height",a=r.toLowerCase(),o=i.indexOf("outer")===0,s=i.indexOf("inner")===0,l=arguments.length===2||typeof n=="boolean";if(hn(t)){if(t.length>1&&!l){for(var u=0;u<t.length;u++)e(t[u],i,n);return}t=t[0]}if(t){if(Yt(t))return o?t["inner"+r]:fe.getDocumentElement()["client"+r];if(fe.isDocument(t)){var d=fe.getDocumentElement(),c=fe.getBody();return Math.max(c["scroll"+r],c["offset"+r],d["scroll"+r],d["offset"+r],d["client"+r])}if(l){var h="content";return o&&(h=n?"margin":"border"),s&&(h="padding"),rV(t,a,h)}if(xt(n)){var f=qI(t),p=jI(a,f),g=f.boxSizing==="border-box";n=Number(n),o?n-=g?0:p.border+p.padding:s?n+=g?p.border:-p.padding:g&&(n+=p.border+p.padding)}return n+=xt(n)?"px":"",fe.setStyle(t,a,n),null}},XI=e=>Yt(e)?e:e.defaultView,v_=e=>{if(!e.getClientRects().length)return{top:0,left:0};var t=e.getBoundingClientRect(),i=XI(e.ownerDocument),n=e.ownerDocument.documentElement;return{top:t.top+i.pageYOffset-n.clientTop,left:t.left+i.pageXOffset-n.clientLeft}},ZI=/<([a-z][^/\0>\x20\t\r\n\f]+)/i,ir={default:{tagsCount:0,startTags:"",endTags:""},thead:{tagsCount:1,startTags:"<table>",endTags:"</table>"},td:{tagsCount:3,startTags:"<table><tbody><tr>",endTags:"</tr></tbody></table>"},col:{tagsCount:2,startTags:"<table><colgroup>",endTags:"</colgroup></table>"},tr:{tagsCount:2,startTags:"<table><tbody>",endTags:"</tbody></table>"}};ir.tbody=ir.colgroup=ir.caption=ir.tfoot=ir.thead;ir.th=ir.td;var Jg=function(e){if(typeof e!="string")return null;var t=fe.createDocumentFragment(),i=t.appendChild(fe.createElement("div")),n=ZI.exec(e),r=n&&n[1].toLowerCase(),a=ir[r]||ir.default;i.innerHTML=a.startTags+e+a.endTags;for(var o=0;o<a.tagsCount;o++)i=i.lastChild;return[...i.childNodes]},uV=function(e){var t=ZI.exec(e);return t&&t[1]in ir},dV=qe(),ot,Ue=function(e,t){return e?typeof e=="string"?e==="body"?(this[0]=t?t.body:fe.getBody(),this.length=1,this):(t=t||fe.getDocument(),e[0]==="<"?(this[0]=fe.createElement(e.slice(1,-1),t),this.length=1,this):([].push.apply(this,fe.querySelectorAll(t,e)),this)):fe.isNode(e)||Yt(e)?(this[0]=e,this.length=1,this):Array.isArray(e)?([].push.apply(this,e),this):ot(e.toArray?e.toArray():[e]):(this.length=0,this)};ot=function(e,t){return new Ue(e,t)};ot.fn={dxRenderer:!0};Ue.prototype=ot.fn;var Vs=function(e,t){for(var i=0;i<this.length;i++){var n=ot(this[i]);n[e].apply(n,t)}return this},__=function(e,t,i){i!=null?fe.setAttribute(e,t,i):fe.removeAttribute(e,t)};Ue.prototype.show=function(){return this.toggle(!0)};Ue.prototype.hide=function(){return this.toggle(!1)};Ue.prototype.toggle=function(e){return this[0]&&this.toggleClass("dx-state-invisible",!e),this};Ue.prototype.attr=function(e,t){if(this.length>1&&arguments.length>1)return Vs.call(this,"attr",arguments);if(!this[0])return He(e)||t!==void 0?this:void 0;if(!this[0].getAttribute)return this.prop(e,t);if(typeof e=="string"&&arguments.length===1){var i=this[0].getAttribute(e);return i??void 0}else if(Ye(e))for(var n in e)this.attr(n,e[n]);else __(this[0],e,t);return this};Ue.prototype.removeAttr=function(e){return this[0]&&fe.removeAttribute(this[0],e),this};Ue.prototype.prop=function(e,t){if(!this[0])return this;if(typeof e=="string"&&arguments.length===1)return this[0][e];if(Ye(e))for(var i in e)this.prop(i,e[i]);else fe.setProperty(this[0],e,t);return this};Ue.prototype.addClass=function(e){return this.toggleClass(e,!0)};Ue.prototype.removeClass=function(e){return this.toggleClass(e,!1)};Ue.prototype.hasClass=function(e){if(!this[0]||this[0].className===void 0)return!1;for(var t=e.split(" "),i=0;i<t.length;i++)if(this[0].classList){if(this[0].classList.contains(t[i]))return!0}else{var n=Me(this[0].className)?this[0].className:fe.getAttribute(this[0],"class");if((n||"").split(" ").indexOf(t[i])>=0)return!0}return!1};Ue.prototype.toggleClass=function(e,t){if(this.length>1)return Vs.call(this,"toggleClass",arguments);if(!this[0]||!e)return this;t=t===void 0?!this.hasClass(e):t;for(var i=e.split(" "),n=0;n<i.length;n++)fe.setClass(this[0],i[n],t);return this};Ue.prototype.html=function(e){return arguments.length?(this.empty(),typeof e=="string"&&!uV(e)||typeof e=="number"?(this[0].innerHTML=e,this):this.append(Jg(e))):this[0].innerHTML};var QI=function(e,t){if(!(!this[0]||!e)){typeof e=="string"?e=Jg(e):e.nodeType?e=[e]:xt(e)&&(e=[fe.createTextNode(e)]);for(var i=0;i<e.length;i++){var n=e[i],r=this[0],a=r.tagName==="TABLE"&&n.tagName==="TR";a&&r.tBodies&&r.tBodies.length&&(r=r.tBodies[0]),fe.insertElement(r,n.nodeType?n:n[0],t)}}},oy=function(e,t){if(!(!this[0]||!this[0].style)&&!(t===null||typeof t=="number"&&isNaN(t))){e=xa(e);for(var i=0;i<this.length;i++)this[i].style[e]=ws(e,t)}};Ue.prototype.css=function(e,t){if(Me(e))if(arguments.length===2)oy.call(this,e,t);else{if(!this[0])return;e=xa(e);var i=dV.getComputedStyle(this[0])[e]||this[0].style[e];return xt(i)?i.toString():i}else if(Ye(e))for(var n in e)oy.call(this,n,e[n]);return this};Ue.prototype.prepend=function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.prepend(arguments[t]);return this}return QI.apply(this,[e,this[0].firstChild]),this};Ue.prototype.append=function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.append(arguments[t]);return this}return QI.apply(this,[e]),this};Ue.prototype.prependTo=function(e){if(this.length>1){for(var t=this.length-1;t>=0;t--)ot(this[t]).prependTo(e);return this}return e=ot(e),e[0]&&fe.insertElement(e[0],this[0],e[0].firstChild),this};Ue.prototype.appendTo=function(e){return this.length>1?Vs.call(this,"appendTo",arguments):(fe.insertElement(ot(e)[0],this[0]),this)};Ue.prototype.insertBefore=function(e){return e&&e[0]&&fe.insertElement(e[0].parentNode,this[0],e[0]),this};Ue.prototype.insertAfter=function(e){return e&&e[0]&&fe.insertElement(e[0].parentNode,this[0],e[0].nextSibling),this};Ue.prototype.before=function(e){return this[0]&&fe.insertElement(this[0].parentNode,e[0],this[0]),this};Ue.prototype.after=function(e){return this[0]&&fe.insertElement(this[0].parentNode,e[0],this[0].nextSibling),this};Ue.prototype.wrap=function(e){if(this[0]){var t=ot(e);t.insertBefore(this),t.append(this)}return this};Ue.prototype.wrapInner=function(e){var t=this.contents();return t.length?t.wrap(e):this.append(e),this};Ue.prototype.replaceWith=function(e){if(e&&e[0])return e.is(this)?this:(e.insertBefore(this),this.remove(),e)};Ue.prototype.remove=function(){return this.length>1?Vs.call(this,"remove",arguments):(Eu(this[0],!0),fe.removeElement(this[0]),this)};Ue.prototype.detach=function(){return this.length>1?Vs.call(this,"detach",arguments):(fe.removeElement(this[0]),this)};Ue.prototype.empty=function(){return this.length>1?Vs.call(this,"empty",arguments):(Eu(this[0]),fe.setText(this[0],""),this)};Ue.prototype.clone=function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t].cloneNode(!0));return ot(e)};Ue.prototype.text=function(e){if(!arguments.length){for(var t="",i=0;i<this.length;i++)t+=this[i]&&this[i].textContent||"";return t}var n=Ee(e)?e():e;return Eu(this[0],!1),fe.setText(this[0],E(n)?n:""),this};Ue.prototype.val=function(e){return arguments.length===1?this.prop("value",E(e)?e:""):this.prop("value")};Ue.prototype.contents=function(){if(!this[0])return ot();var e=[];return e.push.apply(e,this[0].childNodes),ot(e)};Ue.prototype.find=function(e){var t=ot();if(!e)return t;var i=[],n;if(typeof e=="string")for(e=e.trim(),n=0;n<this.length;n++){var r=this[n];if(fe.isElementNode(r)){var a=r.getAttribute("id"),o=a||"dx-query-children";a||__(r,"id",o),o="[id='"+o+"'] ";var s=o+e.replace(/([^\\])(,)/g,"$1, "+o);i.push.apply(i,fe.querySelectorAll(r,s)),__(r,"id",a)}else fe.isDocument(r)&&i.push.apply(i,fe.querySelectorAll(r,e))}else for(n=0;n<this.length;n++)e=fe.isNode(e)?e:e[0],this[n]!==e&&this[n].contains(e)&&i.push(e);return t.add(i)};var sy=function(e,t){return t.nodeType?!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length):!0};Ue.prototype.filter=function(e){if(!e)return ot();if(e===":visible")return this.filter(sy);if(e===":hidden")return this.filter(function(a,o){return!sy(a,o)});for(var t=[],i=0;i<this.length;i++){var n=this[i];if(fe.isElementNode(n)&&On(e)==="string")fe.elementMatches(n,e)&&t.push(n);else if(fe.isNode(e)||Yt(e))e===n&&t.push(n);else if(Ee(e))e.call(n,i,n)&&t.push(n);else for(var r=0;r<e.length;r++)e[r]===n&&t.push(n)}return ot(t)};Ue.prototype.not=function(e){for(var t=[],i=this.filter(e).toArray(),n=0;n<this.length;n++)i.indexOf(this[n])===-1&&t.push(this[n]);return ot(t)};Ue.prototype.is=function(e){return!!this.filter(e).length};Ue.prototype.children=function(e){for(var t=[],i=0;i<this.length;i++)for(var n=this[i]?this[i].childNodes:[],r=0;r<n.length;r++)fe.isElementNode(n[r])&&t.push(n[r]);return t=ot(t),e?t.filter(e):t};Ue.prototype.siblings=function(){var e=this[0];if(!e||!e.parentNode)return ot();for(var t=[],i=e.parentNode.childNodes||[],n=0;n<i.length;n++){var r=i[n];fe.isElementNode(r)&&r!==e&&t.push(r)}return ot(t)};Ue.prototype.each=function(e){for(var t=0;t<this.length&&e.call(this[t],t,this[t])!==!1;t++);};Ue.prototype.index=function(e){return e?(e=ot(e),this.toArray().indexOf(e[0])):this.parent().children().index(this)};Ue.prototype.get=function(e){return this[e<0?this.length+e:e]};Ue.prototype.eq=function(e){return e=e<0?this.length+e:e,ot(this[e])};Ue.prototype.first=function(){return this.eq(0)};Ue.prototype.last=function(){return this.eq(-1)};Ue.prototype.parent=function(e){if(!this[0])return ot();var t=ot(this[0].parentNode);return!e||t.is(e)?t:ot()};Ue.prototype.parents=function(e){for(var t=[],i=this.parent();i&&i[0]&&!fe.isDocument(i[0]);)fe.isElementNode(i[0])&&(!e||i.is(e))&&t.push(i.get(0)),i=i.parent();return ot(t)};Ue.prototype.closest=function(e){if(this.is(e))return this;for(var t=this.parent();t&&t.length;){if(t.is(e))return t;t=t.parent()}return ot()};Ue.prototype.next=function(e){if(!this[0])return ot();var t=ot(this[0].nextSibling);if(!arguments.length)return t;for(;t&&t.length;){if(t.is(e))return t;t=t.next()}return ot()};Ue.prototype.prev=function(){return this[0]?ot(this[0].previousSibling):ot()};Ue.prototype.add=function(e){for(var t=ot(e),i=this.toArray(),n=0;n<t.length;n++){var r=t[n];i.indexOf(r)===-1&&i.push(r)}return ot(i)};var em=[];Ue.prototype.splice=function(){return ot(em.splice.apply(this,arguments))};Ue.prototype.slice=function(){return ot(em.slice.apply(this,arguments))};Ue.prototype.toArray=function(){return em.slice.call(this)};Ue.prototype.offset=function(){if(this[0])return v_(this[0])};Ue.prototype.offsetParent=function(){if(!this[0])return ot();for(var e=ot(this[0].offsetParent);e[0]&&e.css("position")==="static";)e=ot(e[0].offsetParent);return e=e[0]?e:ot(fe.getDocumentElement()),e};Ue.prototype.position=function(){if(this[0]){var e,t=parseFloat(this.css("marginTop")),i=parseFloat(this.css("marginLeft"));if(this.css("position")==="fixed")return e=this[0].getBoundingClientRect(),{top:e.top-t,left:e.left-i};e=this.offset();var n=this.offsetParent(),r={top:0,left:0};return n[0].nodeName!=="HTML"&&(r=n.offset()),r={top:r.top+parseFloat(n.css("borderTopWidth")),left:r.left+parseFloat(n.css("borderLeftWidth"))},{top:e.top-r.top-t,left:e.left-r.left-i}}};[{name:"scrollLeft",offsetProp:"pageXOffset",scrollWindow:function(e,t){e.scrollTo(t,e.pageYOffset)}},{name:"scrollTop",offsetProp:"pageYOffset",scrollWindow:function(e,t){e.scrollTo(e.pageXOffset,t)}}].forEach(function(e){var t=e.name;Ue.prototype[t]=function(i){if(this[0]){var n=XI(this[0]);return i===void 0?n?n[e.offsetProp]:this[0][t]:(n?e.scrollWindow(n,i):this[0][t]=i,this)}}});Ue.prototype.data=function(e,t){if(this[0])return arguments.length<2?Mt.call(ot,this[0],e):(Mt.call(ot,this[0],e,t),this)};Ue.prototype.removeData=function(e){return this[0]&&Oh(this[0],e),this};var JI=function(){return ot.apply(this,arguments)};Object.defineProperty(JI,"fn",{enumerable:!0,configurable:!0,get:function(){return ot.fn},set:function(e){ot.fn=e}});const cV={set:function(e){ot=e},get:function(){return JI}},v=cV.get(),eT=new zg;var Bn=function(e,t){var i={};"noBubble"in t&&(i.noBubble=t.noBubble),"bindType"in t&&(i.bindType=t.bindType),"delegateType"in t&&(i.delegateType=t.delegateType),F(["setup","teardown","add","remove","trigger","handle","_default","dispose"],function(n,r){t[r]&&(i[r]=function(){var a=[].slice.call(arguments);return a.unshift(this),t[r].apply(t,a)})}),Gg.fire(e,i)};Bn.callbacks=Gg;var dr="dxremove",g_="dxRemoveEvent";ZM(function(e){e=[].slice.call(e);for(var t=0;t<e.length;t++){var i=v(e[t]);i.prop(g_)&&(i[0][g_]=null,D.triggerHandler(i,dr))}});Bn(dr,{noBubble:!0,setup:function(e){v(e).prop(g_,!0)}});var Af="dxComponents",hV="dxPrivateComponent",od=new WeakMap,fV=0,Iu=function(e,t){if(E(t)){od.set(e,t);return}if(!od.has(e)){var i=hV+fV++;return od.set(e,i),i}return od.get(e)};function tT(e,t,i){var n=Mt(e.get(0)),r=Iu(t.constructor);n[r]=t,i&&D.one(e,dr,function(){i.call(t)}),n[Af]||(n[Af]=[]),n[Af].push(r)}function iT(e,t){var i=Iu(t);return Mt(e.get(0),i)}var tt=function(e,t,i){i?t[e]=i:i=t,Iu(i,e),eT.fire(e,i)},pV=function(e,t){v.fn[e]=function(i){var n=typeof i=="string",r;if(n){var a=i,o=[].slice.call(arguments).slice(1);this.each(function(){var s=t.getInstance(this);if(!s)throw _t.Error("E0009",e);var l=s[a],u=l.apply(s,o);r===void 0&&(r=u)})}else this.each(function(){var s=t.getInstance(this);s?s.option(i):new t(this,i)}),r=this;return r}};eT.add(pV);var vV=Su(),_V=/(webkit)[ /]([\w.]+)/,gV=/(mozilla)(?:.*? rv:([\w.]+))/,ly=e=>{e=e.toLowerCase();var t={},i=_V.exec(e)||e.indexOf("compatible")<0&&gV.exec(e)||[],n=i[1],r=i[2];return n==="webkit"&&(t.webkit=!0,e.indexOf("chrome")>=0||e.indexOf("crios")>=0?(n="chrome",r=/(?:chrome|crios)\/(\d+\.\d+)/.exec(e),r=r&&r[1]):e.indexOf("fxios")>=0?(n="mozilla",r=/fxios\/(\d+\.\d+)/.exec(e),r=r&&r[1]):e.indexOf("safari")>=0&&/version|phantomjs/.test(e)?(n="safari",r=/(?:version|phantomjs)\/([0-9.]+)/.exec(e),r=r&&r[1]):(n="unknown",r=/applewebkit\/([0-9.]+)/.exec(e),r=r&&r[1])),n&&(t[n]=!0,t.version=r),t};const Bt=O({_fromUA:ly},ly(vV.userAgent));class en{constructor(t,i){i=i||{},this._action=t,this._context=i.context||qe(),this._beforeExecute=i.beforeExecute,this._afterExecute=i.afterExecute,this._component=i.component,this._validatingTargetName=i.validatingTargetName;var n=this._excludeValidators={};if(i.excludeValidators)for(var r=0;r<i.excludeValidators.length;r++)n[i.excludeValidators[r]]=!0}execute(){var t={action:this._action,args:Array.prototype.slice.call(arguments),context:this._context,component:this._component,validatingTargetName:this._validatingTargetName,cancel:!1,handled:!1},i=this._beforeExecute,n=this._afterExecute,r=t.args[0]||{};if(this._validateAction(t)&&(i==null||i.call(this._context,t),!t.cancel)){var a=this._executeAction(t);if(!r.cancel)return n==null||n.call(this._context,t),a}}_validateAction(t){var i=this._excludeValidators,{executors:n}=en;for(var r in n)if(!i[r]){var a,o=n[r];if((a=o.validate)===null||a===void 0||a.call(o,t),t.cancel)return!1}return!0}_executeAction(t){var i,{executors:n}=en;for(var r in n){var a,o=n[r];if((a=o.execute)===null||a===void 0||a.call(o,t),t.handled){i=t.result;break}}return i}static registerExecutor(t,i){if(Ye(t)){F(t,en.registerExecutor);return}en.executors[t]=i}static unregisterExecutor(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];F(i,function(){delete en.executors[this]})}}en.executors={};var uy=e=>t=>{if(t.args.length){var i=t.args[0],n=i[t.validatingTargetName]||i.element;n&&e(v(n))&&(t.cancel=!0)}};en.registerExecutor({disabled:{validate:uy(e=>e.is(".dx-state-disabled, .dx-state-disabled *"))},readOnly:{validate:uy(e=>e.is(".dx-state-readonly, .dx-state-readonly *:not(.dx-state-independent)"))},undefined:{execute:e=>{e.action||(e.result=void 0,e.handled=!0)}},func:{execute:e=>{Ee(e.action)&&(e.result=e.action.call(e.context,e.args[0]),e.handled=!0)}}});var Df=[],mV=Kr(()=>{var e=fe.listen(fe.getDocument(),"DOMContentLoaded",()=>{nT.fire(),e()})}),nT={add:e=>{var t=Ke();t&&fe.getReadyState()!=="loading"?e():(Df.push(e),t&&mV())},fire:()=>{Df.forEach(e=>e()),Df=[]}};const cr=kn(nT);var co=function(){var e,t=dt(),i=t.add,n=t.remove;if(!Ke())return t;var r=function(){var l=qe();return{width:l.innerWidth,height:l.innerHeight}},a=function(){var l=r();if(!(l.width===e.width&&l.height===e.height)){var u;l.width===e.width&&(u="height"),l.height===e.height&&(u="width"),e=l,t.fire(u)}},o=Kr(function(){e=r()}),s;return t.add=function(){var l=i.apply(t,arguments);return o(),cr.add(function(){!s&&t.has()&&(s=fe.listen(qe(),"resize",a))}),l},t.remove=function(){var l=n.apply(t,arguments);return!t.has()&&s&&(s(),s=void 0),l},t}(),CV=function(e,t){return 1/e===1/t},yV=function(e,t){if(e=jt(e,!0),t=jt(t,!0),e&&t&&hn(e)&&hn(t))return t.is(e);var i=e!==e,n=t!==t;return i&&n?!0:e===0&&t===0?CV(e,t):e===null||typeof e!="object"||fe.isElementNode(e)?e===t:!1};class wo{constructor(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._events={},this._owner=t,this._options=i}static create(t,i){return i?Ee(i)?i(t):i:new wo(t)}hasEvent(t){var i=this._events[t];return i?i.has():!1}fireEvent(t,i){var n=this._events[t];return n&&n.fireWith(this._owner,i),this._owner}on(t,i){if(Ye(t))F(t,(a,o)=>{this.on(a,o)});else{var n=this._events[t];n||(n=dt({syncStrategy:this._options.syncStrategy}),this._events[t]=n);var r=n.originalAdd||n.add;r.call(n,i)}}off(t,i){var n=this._events[t];n&&(Ee(i)?n.remove(i):n.empty())}dispose(){F(this._events,(t,i)=>{i.empty()})}}var xV=qe(),rT=function(){var e;try{e=xV.sessionStorage}catch{}return e},bV=cr.add,Rh=dt(),aT=v(),va=function(){var e;return function(t){if(!arguments.length)return e;var i=v(t);aT=i;var n=!!i.length,r=va();e=n?i:v("body"),Rh.fire(n?va():v(),r)}}();bV(function(){va(".dx-viewport")});function oT(){return aT}var SV=Su(),sT=qe(),EV={iPhone:"iPhone",iPhone5:"iPhone",iPhone6:"iPhone",iPhone6plus:"iPhone",iPad:"iPad",iPadMini:"iPad Mini",androidPhone:"Android Mobile",androidTablet:"Android",msSurface:"Windows ARM Tablet PC",desktop:"desktop"},dy={deviceType:"desktop",platform:"generic",version:[],phone:!1,tablet:!1,android:!1,ios:!1,generic:!0,grade:"A",mac:!1},wV={generic(e){var t=/windows phone/i.test(e)||e.match(/WPDesktop/),i=!t&&/Windows(.*)arm(.*)Tablet PC/i.test(e),n=!t&&!i&&/msapphost/i.test(e),r=/((intel|ppc) mac os x)/.test(e.toLowerCase());if(t||i||n||r)return{deviceType:t?"phone":i?"tablet":"desktop",platform:"generic",version:[],grade:"A",mac:r}},ios(e){if(/ip(hone|od|ad)/i.test(e)){var t=/ip(hone|od)/i.test(e),i=e.match(/os (\d+)_(\d+)_?(\d+)?/i),n=i?[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3]||0,10)]:[],r=sT.screen.height===480,a=r?"B":"A";return{deviceType:t?"phone":"tablet",platform:"ios",version:n,grade:a}}},android(e){if(/android|htc_|silk/i.test(e)){var t=/mobile/i.test(e),i=e.match(/android (\d+)\.?(\d+)?\.?(\d+)?/i),n=i?[parseInt(i[1],10),parseInt(i[2]||0,10),parseInt(i[3]||0,10)]:[],r=n.length>1&&(n[0]<4||n[0]===4&&n[1]<4),a=r?"B":"A";return{deviceType:t?"phone":"tablet",platform:"android",version:n,grade:a}}}};class IV{constructor(t){this._window=(t==null?void 0:t.window)||sT,this._realDevice=this._getDevice(),this._currentDevice=void 0,this._currentOrientation=void 0,this._eventsStrategy=new wo(this),this.changed=dt(),Ke()&&(cr.add(this._recalculateOrientation.bind(this)),co.add(this._recalculateOrientation.bind(this)))}current(t){if(t){this._currentDevice=this._getDevice(t),this._forced=!0,this.changed.fire();return}if(!this._currentDevice){t=void 0;try{t=this._getDeviceOrNameFromWindowScope()}catch{t=this._getDeviceNameFromSessionStorage()}finally{t||(t=this._getDeviceNameFromSessionStorage()),t&&(this._forced=!0)}this._currentDevice=this._getDevice(t)}return this._currentDevice}real(t){return O({},this._realDevice)}orientation(){return this._currentOrientation}isForced(){return this._forced}isRippleEmulator(){return!!this._window.tinyHippos}_getCssClasses(t){var i=[],n=this._realDevice;return t=t||this.current(),t.deviceType&&(i.push("dx-device-".concat(t.deviceType)),t.deviceType!=="desktop"&&i.push("dx-device-mobile")),i.push("dx-device-".concat(n.platform)),n.version&&n.version.length&&i.push("dx-device-".concat(n.platform,"-").concat(n.version[0])),this.isSimulator()&&i.push("dx-simulator"),It().rtlEnabled&&i.push("dx-rtl"),i}attachCssClasses(t,i){this._deviceClasses=this._getCssClasses(i).join(" "),v(t).addClass(this._deviceClasses)}detachCssClasses(t){v(t).removeClass(this._deviceClasses)}isSimulator(){try{return this._isSimulator||Ke()&&this._window.top!==this._window.self&&this._window.top["dx-force-device"]||this.isRippleEmulator()}catch{return!1}}forceSimulator(){this._isSimulator=!0}_getDevice(t){if(t==="genericPhone"&&(t={deviceType:"phone",platform:"generic",generic:!0}),Ye(t))return this._fromConfig(t);var i;if(t){if(i=EV[t],!i)throw _t.Error("E0005")}else i=SV.userAgent;return this._fromUA(i)}_getDeviceOrNameFromWindowScope(){var t;return Ke()&&(this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"])&&(t=this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"]),t}_getDeviceNameFromSessionStorage(){var t=rT();if(t){var i=t.getItem("dx-force-device");try{return JSON.parse(i)}catch{return i}}}_fromConfig(t){var i=O({},dy,this._currentDevice,t),n={phone:i.deviceType==="phone",tablet:i.deviceType==="tablet",android:i.platform==="android",ios:i.platform==="ios",generic:i.platform==="generic"};return O(i,n)}_fromUA(t){var i;return F(wV,(n,r)=>(i=r(t),!i)),i?this._fromConfig(i):dy}_changeOrientation(){var t=v(this._window),i=je(t)>$e(t)?"portrait":"landscape";this._currentOrientation!==i&&(this._currentOrientation=i,this._eventsStrategy.fireEvent("orientationChanged",[{orientation:i}]))}_recalculateOrientation(){var t=$e(this._window);this._currentWidth!==t&&(this._currentWidth=t,this._changeOrientation())}on(t,i){return this._eventsStrategy.on(t,i),this}off(t,i){return this._eventsStrategy.off(t,i),this}}var Oe=new IV,cy=va();cy&&Oe.attachCssClasses(cy);Rh.add((e,t)=>{Oe.detachCssClasses(t),Oe.attachCssClasses(e)});var Of={},Is=e=>{var t=Oe.current();return e.reduce((i,n)=>{var{device:r,options:a}=n,o=r||{},s=Ee(o)?o(t):AV(t,o);return s&&O(!0,i,a),i},{})},TV=(e,t)=>typeof e!="string"?e:{[e]:t},AV=(e,t)=>Rn(t)||$g(e,[t]).length>0,hy=e=>e.substr(e.lastIndexOf(".")+1),fy=e=>e.substr(0,e.lastIndexOf(".")),DV=function(e,t){return Of[t]=Of[t]||mt(t),Of[t](e,{functionsAsIs:!0})},OV=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e},Rf={},kf={};class RV{constructor(t,i){this._options=t,this._optionsByReference=i,this._changingCallback,this._changedCallback,this._namePreparedCallbacks}_setByReference(t,i){O(!0,t,i);for(var n in this._optionsByReference)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}_setPreparedValue(t,i,n,r){var a=this.get(this._options,t,!1);if(!yV(a,i)){var o=So(t);!r&&this._changingCallback(t,a,i),kf[t]=kf[t]||Hg(t),kf[t](this._options,i,{functionsAsIs:!0,merge:E(n)?n:!this._optionsByReference[t],unwrapObservables:o.length>1&&!!this._optionsByReference[o[0]]}),!r&&this._changedCallback(t,i,a)}}_prepareRelevantNames(t,i,n,r){if(Ye(n))for(var a in n)this._prepareRelevantNames(t,"".concat(i,".").concat(a),n[a]);this._namePreparedCallbacks(t,i,n,r)}get(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._options,i=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return Rf[i]=Rf[i]||mt(i),Rf[i](t,{functionsAsIs:!0,unwrapObservables:n})}set(t,i,n,r){t=TV(t,i);for(var a in t)this._prepareRelevantNames(t,a,t[a],r);for(var o in t)this._setPreparedValue(o,t[o],n,r)}onRelevantNamesPrepared(t){this._namePreparedCallbacks=t}onChanging(t){this._changingCallback=t}onChanged(t){this._changedCallback=t}dispose(){this._changingCallback=ee,this._changedCallback=ee}}class kV{constructor(t,i,n,r){this._deprecatedCallback,this._startChangeCallback,this._endChangeCallback,this._default=i,this._deprecated=r,this._deprecatedNames=[],this._initDeprecatedNames(),this._optionManager=new RV(t,n),this._optionManager.onRelevantNamesPrepared((a,o,s,l)=>this._setRelevantNames(a,o,s,l)),this._cachedOptions={},this._rules=[]}set _initial(t){this._initialOptions=t}get _initial(){if(!this._initialOptions){var t=this._getByRules(this.silent("defaultOptionsRules"));this._initialOptions=this._default,this._optionManager._setByReference(this._initialOptions,t)}return this._initialOptions}_initDeprecatedNames(){for(var t in this._deprecated)this._deprecatedNames.push(t)}_getByRules(t){return t=Array.isArray(t)?this._rules.concat(t):this._rules,Is(t)}_notifyDeprecated(t){var i=this._deprecated[t];i&&this._deprecatedCallback(t,i)}_setRelevantNames(t,i,n,r){if(i){var a=this._normalizeName(i,r);a&&a!==i&&(this._setField(t,a,n),this._clearField(t,i))}}_setField(t,i,n){var r="",a=null;do r=r?".".concat(r):"",r=hy(i)+r,i=fy(i),a=i?this._optionManager.get(t,i,!1):t;while(!a);a[r]=n}_clearField(t,i){delete t[i];var n=fy(i),r=n?this._optionManager.get(t,n,!1):t;r&&delete r[hy(i)]}_normalizeName(t,i){if(this._deprecatedNames.length&&t){for(var n=0;n<this._deprecatedNames.length;n++)if(this._deprecatedNames[n]===t){var r=this._deprecated[t];if(r)return!i&&this._notifyDeprecated(t),r.alias||t}}return t}addRules(t){this._rules=t.concat(this._rules)}applyRules(t){var i=this._getByRules(t);this.silent(i)}dispose(){this._deprecatedCallback=ee,this._startChangeCallback=ee,this._endChangeCallback=ee,this._optionManager.dispose()}onChanging(t){this._optionManager.onChanging(t)}onChanged(t){this._optionManager.onChanged(t)}onDeprecated(t){this._deprecatedCallback=t}onStartChange(t){this._startChangeCallback=t}onEndChange(t){this._endChangeCallback=t}isInitial(t){var i=this.silent(t),n=this.initial(t),r=Ee(i)&&Ee(n);return r?i.toString()===n.toString():kt(i,n)}initial(t){return DV(this._initial,t)}option(t,i){var n=arguments.length<2&&On(t)!=="object";if(n)return this._optionManager.get(void 0,this._normalizeName(t));this._startChangeCallback();try{this._optionManager.set(t,i)}finally{this._endChangeCallback()}}silent(t,i){var n=arguments.length<2&&On(t)!=="object";if(n)return this._optionManager.get(void 0,t,void 0,!0);this._optionManager.set(t,i,void 0,!0)}reset(t){if(t){var i=So(t),n=i.reduce((a,o)=>a?a[o]:this.initial(o),null),r=He(n)?be({},n):n;this._optionManager.set(t,r,!1)}}getAliasesByName(t){return Object.keys(this._deprecated).filter(i=>t===this._deprecated[i].alias)}isDeprecated(t){return Object.prototype.hasOwnProperty.call(this._deprecated,t)}cache(t,i){var n=arguments.length<2;if(n)return this._cachedOptions[t];this._cachedOptions[t]=O(this._cachedOptions[t],i)}}class BV{constructor(){this._postponedOperations={}}add(t,i,n){if(t in this._postponedOperations)n&&this._postponedOperations[t].promises.push(n);else{var r=new te;this._postponedOperations[t]={fn:i,completePromise:r,promises:n?[n]:[]}}return this._postponedOperations[t].completePromise.promise()}callPostponedOperations(){for(var t in this._postponedOperations){var i=this._postponedOperations[t];E(i)&&(i.promises&&i.promises.length?Ae(...i.promises).done(i.fn).then(i.completePromise.resolve):i.fn().done(i.completePromise.resolve))}this._postponedOperations={}}}var py=e=>e.charAt(2).toLowerCase()+e.substr(3),LV=e=>e.indexOf("_",0)===0,tm=nt.inherit({_setDeprecatedOptions(){this._deprecatedOptions={}},_getDeprecatedOptions(){return this._deprecatedOptions},_getDefaultOptions:()=>({onInitialized:null,onOptionChanged:null,onDisposing:null,defaultOptionsRules:null}),_defaultOptionsRules:()=>[],_setOptionsByDevice(e){this._options.applyRules(e)},_convertRulesToOptions:e=>Is(e),_isInitialOptionValue(e){return this._options.isInitial(e)},_setOptionsByReference(){this._optionsByReference={}},_getOptionsByReference(){return this._optionsByReference},ctor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{_optionChangedCallbacks:t,_disposingCallbacks:i}=e;this.NAME=Iu(this.constructor),this._eventsStrategy=wo.create(this,e.eventsStrategy),this._updateLockCount=0,this._optionChangedCallbacks=t||dt(),this._disposingCallbacks=i||dt(),this.postponedOperations=new BV,this._createOptions(e)},_createOptions(e){this.beginUpdate();try{this._setOptionsByReference(),this._setDeprecatedOptions(),this._options=new kV(this._getDefaultOptions(),this._getDefaultOptions(),this._getOptionsByReference(),this._getDeprecatedOptions()),this._options.onChanging((t,i,n)=>this._initialized&&this._optionChanging(t,i,n)),this._options.onDeprecated((t,i)=>this._logDeprecatedOptionWarning(t,i)),this._options.onChanged((t,i,n)=>this._notifyOptionChanged(t,i,n)),this._options.onStartChange(()=>this.beginUpdate()),this._options.onEndChange(()=>this.endUpdate()),this._options.addRules(this._defaultOptionsRules()),e&&e.onInitializing&&e.onInitializing.apply(this,[e]),this._setOptionsByDevice(e.defaultOptionsRules),this._initOptions(e)}finally{this.endUpdate()}},_initOptions(e){this.option(e)},_init(){this._createOptionChangedAction(),this.on("disposing",e=>{this._disposingCallbacks.fireWith(this,[e])})},_logDeprecatedOptionWarning(e,t){var i=t.message||"Use the '".concat(t.alias,"' option instead");_t.log("W0001",this.NAME,e,t.since,i)},_logDeprecatedComponentWarning(e,t){_t.log("W0000",this.NAME,e,"Use the '".concat(t,"' widget instead"))},_createOptionChangedAction(){this._optionChangedAction=this._createActionByOption("onOptionChanged",{excludeValidators:["disabled","readOnly"]})},_createDisposingAction(){this._disposingAction=this._createActionByOption("onDisposing",{excludeValidators:["disabled","readOnly"]})},_optionChanged(e){switch(e.name){case"onDisposing":case"onInitialized":break;case"onOptionChanged":this._createOptionChangedAction()}},_dispose(){this._optionChangedCallbacks.empty(),this._createDisposingAction(),this._disposingAction(),this._eventsStrategy.dispose(),this._options.dispose(),this._disposed=!0},_lockUpdate(){this._updateLockCount++},_unlockUpdate(){this._updateLockCount=Math.max(this._updateLockCount-1,0)},_isUpdateAllowed(){return this._updateLockCount===0},_isInitializingRequired(){return!this._initializing&&!this._initialized},isInitialized(){return this._initialized},_commitUpdate(){this.postponedOperations.callPostponedOperations(),this._isInitializingRequired()&&this._initializeComponent()},_initializeComponent(){this._initializing=!0;try{this._init()}finally{this._initializing=!1,this._lockUpdate(),this._createActionByOption("onInitialized",{excludeValidators:["disabled","readOnly"]})(),this._unlockUpdate(),this._initialized=!0}},instance(){return this},beginUpdate:function(){this._lockUpdate()},endUpdate:function(){this._unlockUpdate(),this._isUpdateAllowed()&&this._commitUpdate()},_optionChanging:ee,_notifyOptionChanged(e,t,i){if(this._initialized)for(var n=[e].concat(this._options.getAliasesByName(e)),r=0;r<n.length;r++){var a=n[r],o={name:So(a)[0],fullName:a,value:t,previousValue:i};LV(a)||(this._optionChangedCallbacks.fireWith(this,[O(this._defaultActionArgs(),o)]),this._optionChangedAction(O({},o))),!this._disposed&&this._cancelOptionChange!==a&&this._optionChanged(o)}},initialOption(e){return this._options.initial(e)},_defaultActionConfig(){return{context:this,component:this}},_defaultActionArgs(){return{component:this}},_createAction(e,t){var i;return n=>(E(n)||(n={}),Ye(n)||(n={actionValue:n}),i=i||new en(e,O(t,this._defaultActionConfig())),i.execute.call(i,O(n,this._defaultActionArgs())))},_createActionByOption(e,t){var i=this,n,r,a,o=function(){if(!r){if(t=t||{},typeof e!="string")throw _t.Error("E0008");e.indexOf("on")===0&&(r=py(e)),a=i.option()[e]}if(!(!n&&!a&&!t.beforeExecute&&!t.afterExecute&&!i._eventsStrategy.hasEvent(r))){if(!n){var l=t.beforeExecute;t.beforeExecute=function(){for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];l&&l.apply(i,g),i._eventsStrategy.fireEvent(r,g[0].args)},n=i._createAction(a,t)}for(var u=arguments.length,d=new Array(u),c=0;c<u;c++)d[c]=arguments[c];if(It().wrapActionsBeforeExecute){var h=i.option("beforeActionExecute")||ee,f=h(i,n,t)||n;return f.apply(i,d)}return n.apply(i,d)}};if(It().wrapActionsBeforeExecute)return o;var s=this.option("onActionCreated")||ee;return s(this,o,t)||o},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this},hasActionSubscription:function(e){return!!this._options.silent(e)||this._eventsStrategy.hasEvent(py(e))},isOptionDeprecated(e){return this._options.isDeprecated(e)},_setOptionWithoutOptionChange(e,t){this._cancelOptionChange=e,this.option(e,t),this._cancelOptionChange=!1},_getOptionValue(e,t){var i=this.option(e);return Ee(i)?i.bind(t)():i},option(){return this._options.option(...arguments)},resetOption(e){this.beginUpdate(),this._options.reset(e),this.endUpdate()}}),im=qe(),Ns=()=>{var e=fe.getActiveElement();if(e&&e!==fe.getBody()){var t;(t=e.blur)===null||t===void 0||t.call(e)}},PV=()=>{var e=im.getSelection();if(e&&e.type!=="Caret"){if(e.empty)e.empty();else if(e.removeAllRanges)try{e.removeAllRanges()}catch{}}},FV=(e,t)=>{var i=v(e),n=v(t);if(i[0]===n[0])return i[0];for(var r=i.parents(),a=n.parents(),o=Math.min(r.length,a.length),s=-o;s<0;s++)if(r.get(s)===a.get(s))return r.get(s)},Io=e=>{e=v(e);var t=e.length&&e.filter(function(){var i=v(this);return i.is("script[type]")&&i.attr("type").indexOf("script")<0});return t.length?t.eq(0).html():(e=v("<div>").append(e),e.html())},kh=e=>{var t=E(e)&&(e.nodeType||hn(e))?v(e):v("<div>").html(e).contents();return t.length===1&&(t.is("script")?t=kh(t.html().trim()):t.is("table")&&(t=t.children("tbody").contents())),t},m_=(e,t)=>{var i=e.originalEvent&&e.originalEvent.clipboardData||im.clipboardData;if(!t)return i&&i.getData("Text");i&&i.setData("Text",t)},ca=(e,t)=>t?(fe.isTextNode(t)&&(t=t.parentNode),fe.isDocument(e)?e.documentElement.contains(t):Yt(e)?ca(e.document,t):e.contains?e.contains(t):!!(t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_CONTAINS)):!1,MV=(e,t,i)=>{var n=im.getComputedStyle(v(e).get(0));return v("<div>").text(t).css({fontStyle:n.fontStyle,fontVariant:n.fontVariant,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFamily:n.fontFamily,letterSpacing:n.letterSpacing,border:n.border,paddingTop:"",paddingRight:"",paddingBottom:"",paddingLeft:"",visibility:"hidden",whiteSpace:"pre",position:"absolute",float:"left"})},VV=(e,t)=>(t&&fe.insertElement(e.parentNode,t,e),e),NV=(e,t)=>{if(t&&t[0])return t.is(e)?e:(F(t,(i,n)=>{VV(e[0],n)}),e.remove(),t)},nm=function(e){return function(t){for(var i=v(t||"body"),n=i.filter(".dx-visibility-change-handler").add(i.find(".dx-visibility-change-handler")),r=0;r<n.length;r++)D.triggerHandler(n[r],e)}},zc=nm("dxshown"),HV=nm("dxhiding"),nr=nm("dxresize"),$V=dt({syncStrategy:!0});class To{render(t){t=t||{};var i=t.onRendered;delete t.onRendered;var n;return t.renovated&&t.transclude&&this._element?n=v("<div>").append(this._element).contents():n=this._renderCore(t),this._ensureResultInContainer(n,t.container),$V.fire(n,t.container),i&&i(),n}_ensureResultInContainer(t,i){if(i){var n=v(i),r=ca(n.get(0),t.get(0));if(n.append(t),!r){var a=fe.getBody().contains(n.get(0));a&&zc(t)}}}_renderCore(){throw _t.Error("E0001")}}class Ts extends To{constructor(t){super(),this._render=t}_renderCore(t){return kh(this._render(t))}}class no extends To{_renderCore(){return v()}}class Bh extends To{constructor(t){super(),this.name=t}}var lT={},vc;function ba(e,t){lT[e]=t}function WV(e){if(Me(e)){if(vc=lT[e],!vc)throw _t.Error("E0020",e)}else vc=e}function vy(){return vc}ba("jquery-tmpl",{compile:e=>Io(e),render:(e,t)=>jQuery.tmpl(e,t)});ba("jsrender",{compile:e=>(jQuery||jsrender).templates(Io(e)),render:(e,t)=>e.render(t)});ba("mustache",{compile:e=>Io(e),render:(e,t)=>Mustache.render(e,t)});ba("hogan",{compile:e=>Hogan.compile(Io(e)),render:(e,t)=>e.render(t)});ba("underscore",{compile:e=>_.template(Io(e)),render:(e,t)=>e(t)});ba("handlebars",{compile:e=>Handlebars.compile(Io(e)),render:(e,t)=>e(t)});ba("doT",{compile:e=>doT.template(Io(e)),render:(e,t)=>e(t)});ba("default",{compile:e=>kh(e),render:(e,t,i)=>e.clone()});WV("default");let zV=class extends To{constructor(t){super(),this._element=t}_renderCore(t){var i=t.transclude;return!i&&!this._compiledTemplate&&(this._compiledTemplate=vy().compile(this._element)),v("<div>").append(i?this._element:vy().render(this._compiledTemplate,t.model,t.index)).contents()}source(){return v(this._element).clone()}};var GV=function(e){return Array.isArray(e)?e:[e]},UV=function(e){return[...new Set(e)]},_y=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=t.reduce((n,r)=>{var a;return n[r]=((a=n[r])!==null&&a!==void 0?a:0)+1,n},{});return e.filter(n=>!i[n]--)},Il=function(e,t,i,n){var r={},{useLegacyVisibleIndex:a}=It(),o=0,s=l=>!E(l[t])&&(!n||n(l));e.forEach(l=>{var u=l[t];u>=0?(r[u]=r[u]||[],l===i?r[u].unshift(l):r[u].push(l)):l[t]=void 0}),a||e.forEach(l=>{if(s(l)){for(;r[o];)o++;r[o]=[l],o++}}),o=0,u_(r,function(l,u){u.forEach(d=>{l>=0&&(d[t]=o++)})}),a&&e.forEach(l=>{s(l)&&(l[t]=o++)})},KV=(e,t)=>e.reduce((i,n)=>{var r,a=t(n);return i[a]=(r=i[a])!==null&&r!==void 0?r:[],i[a].push(n),i},{}),uT=(e,t)=>{var i=v(e).contents().filter("[".concat("data-options",'*="').concat(t,'"]'));return[].slice.call(i).map(n=>{var r=v(n).attr("data-options")||"";return{element:n,options:It().optionsParser(r)[t]}}).filter(n=>!!n.options)},jV=e=>{var t=KV(e,n=>n.options.name);if(t[void 0])throw _t.Error("E0023");var i={};return Object.keys(t).forEach(n=>{var r,a=(r=$g(Oe.current(),t[n],o=>o.options)[0])===null||r===void 0?void 0:r.element;a&&(i[n]=a)}),i},dT=e=>{var t=e.render.bind(e);return O({},e,{render(i){var n=t(i);return i&&i.onRendered&&i.onRendered(),n}})},qV=e=>{var t=[];return"model"in e&&t.push(e.model),"index"in e&&t.push(e.index),t.push(e.container),t},YV=e=>typeof e=="string"?kh(e):e,gy=e=>hn(e)&&e[0]||e,XV=e=>new zV(e),ZV=(e,t,i,n)=>{var r=null;return(!n||n.indexOf(e)===-1)&&(r=t[e],r&&!(r instanceof To)&&!i&&(r=dT(r))),r},my=(e,t,i,n,r,a)=>e==null?new no:e instanceof Bh?a[e.name]:e instanceof To?e:Ee(e.render)&&!hn(e)?n?e:dT(e):e.nodeType||hn(e)?t(v(e)):ZV(e,i,n,r)||a[e]||t(e),QV=3,JV="template",eN="dxTemplate",tN="dx-template-wrapper",iN=new Ts(e=>{var{model:t,parent:i}=e,n=t.widget;if(!n)return v();var r=v("<div>"),a=t.options||{};return i?i._createComponent(r,n,a):r[n](a),r});class Cy{constructor(t,i){this._tempTemplates=[],this._defaultTemplates={},this._anonymousTemplateName=i||JV,this._createElement=t||XV,this._createTemplateIfNeeded=this._createTemplateIfNeeded.bind(this)}static createDefaultOptions(){return{integrationOptions:{watchMethod:function(t,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n.skipImmediate||i(t()),ee},templates:{"dx-polymorph-widget":iN},useDeferUpdateForTemplates:!0}}}get anonymousTemplateName(){return this._anonymousTemplateName}addDefaultTemplates(t){this._defaultTemplates=O({},this._defaultTemplates,t)}dispose(){this._tempTemplates.forEach(t=>{t.template.dispose&&t.template.dispose()}),this._tempTemplates=[]}extractTemplates(t){var i=this._extractTemplates(t),n=this._extractAnonymousTemplate(t);return{templates:i,anonymousTemplateMeta:n}}_extractTemplates(t){var i=uT(t,eN),n=jV(i);return i.forEach(r=>{var{element:a,options:{name:o}}=r;a===n[o]?v(a).addClass(tN).detach():v(a).remove()}),Object.keys(n).map(r=>({name:r,template:this._createTemplate(n[r])}))}_extractAnonymousTemplate(t){var i=t.contents().detach(),n=i.filter((r,a)=>{var o=a.nodeType===QV,s=v(a).text().trim().length<1;return!(o&&s)});return n.length>0?{template:this._createTemplate(i),name:this._anonymousTemplateName}:{}}_createTemplateIfNeeded(t){var i=this._tempTemplates.filter(r=>r.source===gy(t))[0];if(i)return i.template;var n=this._createTemplate(t);return this._tempTemplates.push({template:n,source:gy(t)}),n}_createTemplate(t){return this._createElement(YV(t))}getTemplate(t,i,n,r){var{isAsyncTemplate:a,skipTemplates:o}=n;return Ee(t)?new Ts(s=>{var l=t.apply(r,qV(s));if(!E(l))return new no;var u=!1,d=my(l,h=>h.nodeType||hn(h)&&!v(h).is("script")?new Ts(()=>h):(u=!0,this._createTemplate(h)),i,a,o,this._defaultTemplates),c=d.render(s);return u&&d.dispose&&d.dispose(),c}):my(t,this._createTemplateIfNeeded,i,a,o,this._defaultTemplates)}}var nN=function(e){return e&&e.get(0)};function Fe(e){return nN(e)}var C_=(e,t)=>{if(!t)throw _t.Error("E0017");return Array.isArray(e)?e.map(i=>C_(i,t)).join(" "):e.indexOf(" ")!==-1?C_(e.split(/\s+/g),t):"".concat(e,".").concat(t)},cT=function(e,t){if(!rN(e))return!1;var i=e.nodeName.toLowerCase(),n=!isNaN(t),r=e.disabled,a=/^(input|select|textarea|button|object|iframe)$/.test(i),o=i==="a",s=!0,l=e.isContentEditable;return a||l?s=!r:o?s=e.href||n:s=n,s};function rN(e){var t=v(e);return t.is(":visible")&&t.css("visibility")!=="hidden"&&t.parents().css("visibility")!=="hidden"}var y_=function(e,t){return cT(t,v(t).attr("tabIndex"))},yy=function(e,t){var i=v(t).attr("tabIndex");return(isNaN(i)||i>=0)&&cT(t,i)},_a=function(e){var t=v(e).get(0);return fe.getActiveElement()===t},aN={backspace:"backspace",tab:"tab",enter:"enter",escape:"escape",pageup:"pageUp",pagedown:"pageDown",end:"end",home:"home",arrowleft:"leftArrow",arrowup:"upArrow",arrowright:"rightArrow",arrowdown:"downArrow",delete:"del"," ":"space",f:"F",a:"A","*":"asterisk","-":"minus",alt:"alt",control:"control",shift:"shift"},oN={8:"backspace",9:"tab",13:"enter",27:"escape",33:"pageUp",34:"pageDown",35:"end",36:"home",37:"leftArrow",38:"upArrow",39:"rightArrow",40:"downArrow",46:"del",32:"space",70:"F",65:"A",106:"asterisk",109:"minus",189:"minus",173:"minus",16:"shift",17:"control",18:"alt"},sN={dx:/^dx/i,mouse:/(mouse|wheel)/i,touch:/^touch/i,keyboard:/^key/i,pointer:/^(ms)?pointer/i},lN=e=>e,uN=e=>lN(D.Event(e,e)),rm=e=>Tu(e)==="dx",dN=e=>Tu(e)==="mouse",hT=e=>Tu(e)==="touch",Tu=e=>{var{type:t}=e,i="other";return F(sN,function(n){if(this.test(t))return i=n,!1}),i},fT=e=>Tu(e)==="pointer",ho=e=>dN(e)||(fT(e)||rm(e))&&e.pointerType==="mouse",zi=e=>e&&e.type==="dxmousewheel",Au=e=>hT(e)||(fT(e)||rm(e))&&e.pointerType==="touch",zt=e=>{var{pageX:t,pageY:i,timeStamp:n}=e;return{x:t,y:i,time:n}},Xa=(e,t)=>({x:t.x-e.x,y:t.y-e.y,time:t.time-e.time||1}),cN=e=>{var{originalEvent:t,pointers:i}=e;return hT(e)?(t.touches||[]).length:rm(e)?(i||[]).length:0},pT=e=>{var{target:t}=e,i=v(t),n=(t==null?void 0:t.isContentEditable)||(t==null?void 0:t.hasAttribute("contenteditable")),r=i.is("input, textarea, select")||n;if(zi(e)){var a=i.is("textarea")&&i.hasClass("dx-texteditor-input");if(a||n)return!1;var o=i.is("input[type='number'], textarea, select")&&i.is(":focus");return o}if(ho(e))return r||e.which>1;if(Au(e))return r&&_a(i)},ro=(e,t)=>{var i=uN(e);return t&&O(i,t),i},Sa=e=>{var{originalEvent:t,delegateTarget:i}=e,n=ro(t,e);return D.trigger(i||n.target,n),n},Nt=e=>{var{key:t,which:i}=e,n=t,r=!!t;if(t||i)return r&&(t=aN[t.toLowerCase()]),(!r||!t&&i)&&(t=oN[i]||String.fromCharCode(i)),t||n},Gc=e=>{var{key:t,which:i}=e;return t||String.fromCharCode(i)},me=C_,fi=e=>{var{ctrlKey:t,metaKey:i}=e;return t||i},xy="compositionstart",hN="compositionend",fN="keydown",Bf="KeyboardProcessor",vT=e=>({keyName:Nt(e),key:e.key,code:e.code,ctrl:e.ctrlKey,location:e.location,metaKey:e.metaKey,shift:e.shiftKey,alt:e.altKey,which:e.which,originalEvent:e}),am=nt.inherit({_keydown:me(fN,Bf),_compositionStart:me(xy,Bf),_compositionEnd:me(hN,Bf),ctor:function(e){e=e||{},e.element&&(this._element=v(e.element)),e.focusTarget&&(this._focusTarget=e.focusTarget),this._handler=e.handler,this._element&&(this._processFunction=t=>{var i=v(this._focusTarget).toArray(),n=this._focusTarget&&this._focusTarget!==t.target&&!i.includes(t.target),r=this._isComposingJustFinished&&t.which===229||this._isComposing||n;this._isComposingJustFinished=!1,r||this.process(t)},this._toggleProcessingWithContext=this.toggleProcessing.bind(this),D.on(this._element,this._keydown,this._processFunction),D.on(this._element,this._compositionStart,this._toggleProcessingWithContext),D.on(this._element,this._compositionEnd,this._toggleProcessingWithContext))},dispose:function(){this._element&&(D.off(this._element,this._keydown,this._processFunction),D.off(this._element,this._compositionStart,this._toggleProcessingWithContext),D.off(this._element,this._compositionEnd,this._toggleProcessingWithContext)),this._element=void 0,this._handler=void 0},process:function(e){this._handler(vT(e))},toggleProcessing:function(e){var{type:t}=e;this._isComposing=t===xy,this._isComposingJustFinished=!this._isComposing}});am.createKeyDownOptions=vT;function ii(e,t){return t?me(e,t):e}function x_(e,t){return typeof e=="function"?e(t):e.execute(t)}var by={on:(e,t,i,n)=>{var{selector:r,showTimeout:a,hideTimeout:o,namespace:s}=n;D.on(e,ii("dxactive",s),r,{timeout:a},l=>x_(t,{event:l,element:l.currentTarget})),D.on(e,ii("dxinactive",s),r,{timeout:o},l=>x_(i,{event:l,element:l.currentTarget}))},off:(e,t)=>{var{namespace:i,selector:n}=t;D.off(e,ii("dxactive",i),n),D.off(e,ii("dxinactive",i),n)}},Uc={on:function(e,t){var{namespace:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.on(e,ii("dxresize",i),t)},off:function(e){var{namespace:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.off(e,ii("dxresize",t))}},Sy={on:(e,t,i,n)=>{var{selector:r,namespace:a}=n;D.on(e,ii("dxhoverend",a),r,o=>i(o)),D.on(e,ii("dxhoverstart",a),r,o=>x_(t,{element:o.target,event:o}))},off:(e,t)=>{var{selector:i,namespace:n}=t;D.off(e,ii("dxhoverstart",n),i),D.off(e,ii("dxhoverend",n),i)}},Kc={on:(e,t,i,n)=>{var{namespace:r}=n;D.on(e,ii("dxhiding",r),i),D.on(e,ii("dxshown",r),t)},off:(e,t)=>{var{namespace:i}=t;D.off(e,ii("dxhiding",i)),D.off(e,ii("dxshown",i))}},_c={on:(e,t,i,n)=>{var{namespace:r}=n;D.on(e,ii("focusin",r),t),D.on(e,ii("focusout",r),i)},off:(e,t)=>{var{namespace:i}=t;D.off(e,ii("focusin",i)),D.off(e,ii("focusout",i))},trigger:e=>D.trigger(e,"focus")},Ey={on:function(e,t){var{namespace:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.on(e,ii("dxclick",i),t)},off:function(e){var{namespace:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.off(e,ii("dxclick",t))}},wy={on:function(e,t){var{namespace:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.on(e,ii("click",i),t)},off:function(e){var{namespace:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.off(e,ii("click",t))}},pN=0,Qs={},vN=()=>"keyboardProcessorId".concat(pN++),ha={on:(e,t,i)=>{var n=vN();return Qs[n]=new am({element:e,focusTarget:t,handler:i}),n},off:e=>{e&&Qs[e]&&(Qs[e].dispose(),delete Qs[e])},_getProcessor:e=>Qs[e]},{abstract:sd}=tm,hr=tm.inherit({_getDefaultOptions(){return O(this.callBase(),{width:void 0,height:void 0,rtlEnabled:It().rtlEnabled,elementAttr:{},disabled:!1,integrationOptions:{}},this._useTemplates()?Cy.createDefaultOptions():{})},ctor(e,t){this._customClass=null,this._createElement(e),tT(this._$element,this,this._dispose),this.callBase(t)},_createElement(e){this._$element=v(e)},_getSynchronizableOptionsForCreateComponent:()=>["rtlEnabled","disabled","templatesRenderAsynchronously"],_checkFunctionValueDeprecation:function(e){this.option("_ignoreFunctionValueDeprecation")||e.forEach(t=>{Ee(this.option(t))&&_t.log("W0017",t)})},_visibilityChanged:sd,_dimensionChanged:sd,_init(){this.callBase(),this._checkFunctionValueDeprecation(["width","height","maxHeight","maxWidth","minHeight","minWidth","popupHeight","popupWidth"]),this._attachWindowResizeCallback(),this._initTemplateManager()},_setOptionsByDevice(e){this.callBase([].concat(this.constructor._classCustomRules||[],e||[]))},_isInitialOptionValue(e){var t=this.constructor._classCustomRules&&Object.prototype.hasOwnProperty.call(this._convertRulesToOptions(this.constructor._classCustomRules),e);return!t&&this.callBase(e)},_attachWindowResizeCallback(){if(this._isDimensionChangeSupported()){var e=this._windowResizeCallBack=this._dimensionChanged.bind(this);co.add(e)}},_isDimensionChangeSupported(){return this._dimensionChanged!==sd},_renderComponent(){this._initMarkup(),Ke()&&this._render()},_initMarkup(){var{rtlEnabled:e}=this.option()||{};this._renderElementAttributes(),this._toggleRTLDirection(e),this._renderVisibilityChange(),this._renderDimensions()},_render(){this._attachVisibilityChangeHandlers()},_renderElementAttributes(){var{elementAttr:e}=this.option()||{},t=O({},e),i=t.class;delete t.class,this.$element().attr(t).removeClass(this._customClass).addClass(i),this._customClass=i},_renderVisibilityChange(){if(this._isDimensionChangeSupported()&&this._attachDimensionChangeHandlers(),this._isVisibilityChangeSupported()){var e=this.$element();e.addClass("dx-visibility-change-handler")}},_renderDimensions(){var e=this.$element(),t=e.get(0),i=this._getOptionValue("width",t),n=this._getOptionValue("height",t);this._isCssUpdateRequired(t,n,i)&&e.css({width:i===null?"":i,height:n===null?"":n})},_isCssUpdateRequired:(e,t,i)=>!!(E(i)||E(t)||e.style.width||e.style.height),_attachDimensionChangeHandlers(){var e=this.$element(),t="".concat(this.NAME,"VisibilityChange");Uc.off(e,{namespace:t}),Uc.on(e,()=>this._dimensionChanged(),{namespace:t})},_attachVisibilityChangeHandlers(){if(this._isVisibilityChangeSupported()){var e=this.$element(),t="".concat(this.NAME,"VisibilityChange");this._isHidden=!this._isVisible(),Kc.off(e,{namespace:t}),Kc.on(e,()=>this._checkVisibilityChanged("shown"),()=>this._checkVisibilityChanged("hiding"),{namespace:t})}},_isVisible(){var e=this.$element();return e.is(":visible")},_checkVisibilityChanged(e){var t=this._isVisible();t&&(e==="hiding"&&!this._isHidden?(this._visibilityChanged(!1),this._isHidden=!0):e==="shown"&&this._isHidden&&(this._isHidden=!1,this._visibilityChanged(!0)))},_isVisibilityChangeSupported(){return this._visibilityChanged!==sd&&Ke()},_clean:ee,_modelByElement(){var{modelByElement:e}=this.option(),t=this.$element();return e?e(t):void 0},_invalidate(){if(this._isUpdateAllowed())throw _t.Error("E0007");this._requireRefresh=!0},_refresh(){this._clean(),this._renderComponent()},_dispose(){this._templateManager&&this._templateManager.dispose(),this.callBase(),this._clean(),this._detachWindowResizeCallback()},_detachWindowResizeCallback(){this._isDimensionChangeSupported()&&co.remove(this._windowResizeCallBack)},_toggleRTLDirection(e){var t=this.$element();t.toggleClass("dx-rtl",e)},_createComponent(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Vi(this._getSynchronizableOptionsForCreateComponent(),d=>!(d in i)),{integrationOptions:r}=this.option(),{nestedComponentOptions:a}=this.option();a=a||ee;var o=O({integrationOptions:r},a(this));n.forEach(d=>o[d]=this.option(d)),this._extendConfig(i,o);var s=void 0;if(Me(t)){var l=v(e)[t](i);s=l[t]("instance")}else e&&(s=t.getInstance(e),s?s.option(i):s=new t(e,i));if(s){var u=d=>{var{name:c,value:h}=d;n.includes(c)&&s.option(c,h)};this.on("optionChanged",u),s.on("disposing",()=>this.off("optionChanged",u))}return s},_extendConfig(e,t){F(t,(i,n)=>{!Object.prototype.hasOwnProperty.call(e,i)&&(e[i]=n)})},_defaultActionConfig(){var e=this.$element(),t=this._modelByElement(e);return O(this.callBase(),{context:t})},_defaultActionArgs(){var e=this.$element(),t=this._modelByElement(e),i=this.element();return O(this.callBase(),{element:i,model:t})},_optionChanged(e){switch(e.name){case"width":case"height":this._renderDimensions();break;case"rtlEnabled":this._invalidate();break;case"elementAttr":this._renderElementAttributes();break;case"disabled":case"integrationOptions":break;default:this.callBase(e)}},_removeAttributes(e){for(var t=e.attributes,i=t.length-1;i>=0;i--){var n=t[i];if(n){var{name:r}=n;(!r.indexOf("aria-")||r.indexOf("dx-")!==-1||r==="role"||r==="style"||r==="tabindex")&&e.removeAttribute(r)}}},_removeClasses(e){e.className=e.className.split(" ").filter(t=>t.lastIndexOf("dx-",0)!==0).join(" ")},_updateDOMComponent(e){e?this._renderComponent():this._requireRefresh&&(this._requireRefresh=!1,this._refresh())},endUpdate(){var e=this._isInitializingRequired();this.callBase(),this._isUpdateAllowed()&&this._updateDOMComponent(e)},$element(){return this._$element},element(){var e=this.$element();return Fe(e)},dispose(){var e=this.$element().get(0);Eu(e,!0),e.textContent="",this._removeAttributes(e),this._removeClasses(e)},resetOption(e){if(this.callBase(e),e==="width"||e==="height"){var t=this.initialOption(e);!E(t)&&this.$element().css(e,"")}},_getAnonymousTemplateName(){},_initTemplateManager(){if(!(this._templateManager||!this._useTemplates())){var{integrationOptions:e={}}=this.option(),{createTemplate:t}=e;this._templateManager=new Cy(t,this._getAnonymousTemplateName()),this._initTemplates()}},_initTemplates(){var{templates:e,anonymousTemplateMeta:t}=this._templateManager.extractTemplates(this.$element()),i=this.option("integrationOptions.templates.".concat(t.name));e.forEach(n=>{var{name:r,template:a}=n;this._options.silent("integrationOptions.templates.".concat(r),a)}),t.name&&!i&&(this._options.silent("integrationOptions.templates.".concat(t.name),t.template),this._options.silent("_hasAnonymousTemplateContent",!0))},_getTemplateByOption(e){return this._getTemplate(this.option(e))},_getTemplate(e){var t=this.option("integrationOptions.templates"),i=this.option("templatesRenderAsynchronously"),n=this.option("integrationOptions.skipTemplates");return this._templateManager.getTemplate(e,t,{isAsyncTemplate:i,skipTemplates:n},this)},_saveTemplate(e,t){this._setOptionWithoutOptionChange("integrationOptions.templates."+e,this._templateManager._createTemplate(t))},_useTemplates:()=>!0});hr.getInstance=function(e){return iT(v(e),this)};hr.defaultOptions=function(e){this._classCustomRules=this._classCustomRules||[],this._classCustomRules.push(e)};function _T(e,t,i){function n(l){return typeof l=="string"?l.split("."):typeof l=="number"?[l]:l}e=n(e),t=n(t);var r=Math.max(e.length,t.length);isFinite(i)&&(r=Math.min(r,i));for(var a=0;a<r;a++){var o=parseInt(e[a]||0,10),s=parseInt(t[a]||0,10);if(o<s)return-1;if(o>s)return 1}return 0}var wn=Ke()?qe():{},_N=1e3/60,gT=function(e){return setTimeout(e,_N)},mT=function(e){clearTimeout(e)},CT=Kr(function(){var e=wn.requestAnimationFrame||wn.webkitRequestAnimationFrame||wn.mozRequestAnimationFrame||wn.oRequestAnimationFrame||wn.msRequestAnimationFrame,t=wn.cancelAnimationFrame||wn.webkitCancelAnimationFrame||wn.mozCancelAnimationFrame||wn.oCancelAnimationFrame||wn.msCancelAnimationFrame;e&&t&&(gT=e,mT=t)});function ru(){return CT(),gT.apply(wn,arguments)}function rr(){CT(),mT.apply(wn,arguments)}const gN=Object.freeze(Object.defineProperty({__proto__:null,cancelAnimationFrame:rr,requestAnimationFrame:ru},Symbol.toStringTag,{value:"Module"}));function yT(e){return e&&[e.target,e.delegateTarget,e.relatedTarget,e.currentTarget].filter(t=>!!t)}var mN=(e,t)=>{D.one(yT(e),dr,t)},CN=(e,t)=>{D.off(yT(e),dr,t)},{maxTouchPoints:xT}=Su(),yN={webkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},om=function(e){return!!xa(e)},xN=function(){var{platform:e,mac:t}=Oe.real(),i=e==="ios"||e==="android"||t;return i},Lh=function(e){if(e==="text")return!0;var t=fe.createElement("input");try{return t.setAttribute("type",e),t.value="wrongValue",!t.value}catch{return!1}},bN=function(e,t){return(e("ontouchstart")||!!t)&&!e("callPhantom")},SN=function(e){return e("PointerEvent")},bT=bN(PI,xT),ST=SN(PI),EN=!!xT,fo=bT||ST&&EN,b_=Kr(function(){return om("transition")}),ET=Kr(function(){return yN[xa("transition")]}),wT=Kr(function(){return om("animation")}),po=xN();const wN=Object.freeze(Object.defineProperty({__proto__:null,animation:wT,inputType:Lh,nativeScrolling:po,pointerEvents:ST,styleProp:xa,stylePropPrefix:pc,supportProp:om,touch:fo,touchEvents:bT,transition:b_,transitionEndEventName:ET},Symbol.toStringTag,{value:"Module"}));var Iy="dxPointerEvents",sm=nt.inherit({ctor:function(e,t){this._eventName=e,this._originalEvents=me(t,Iy),this._handlerCount=0,this.noBubble=this._isNoBubble()},_isNoBubble:function(){var e=this._eventName;return e==="dxpointerenter"||e==="dxpointerleave"},_handler:function(e){var t=this._getDelegateTarget(e);return this._fireEvent({type:this._eventName,pointerType:e.pointerType||Tu(e),originalEvent:e,delegateTarget:t,timeStamp:Bt.mozilla?new Date().getTime():e.timeStamp})},_getDelegateTarget:function(e){var t;return this.noBubble&&(t=e.delegateTarget),t},_fireEvent:function(e){return Sa(e)},_setSelector:function(e){this._selector=this.noBubble&&e?e.selector:null},_getSelector:function(){return this._selector},setup:function(){return!0},add:function(e,t){if(this._handlerCount<=0||this.noBubble){e=this.noBubble?e:fe.getDocument(),this._setSelector(t);var i=this;D.on(e,this._originalEvents,this._getSelector(),function(n){i._handler(n)})}this.noBubble||this._handlerCount++},remove:function(e){this._setSelector(e),this.noBubble||this._handlerCount--},teardown:function(e){this._handlerCount&&!this.noBubble||(e=this.noBubble?e:fe.getDocument(),this._originalEvents!=="."+Iy&&D.off(e,this._originalEvents,this._getSelector()))},dispose:function(e){e=this.noBubble?e:fe.getDocument(),D.off(e,this._originalEvents)}}),IN={dxpointerdown:"touchstart",dxpointermove:"touchmove",dxpointerup:"touchend",dxpointercancel:"touchcancel",dxpointerover:"",dxpointerout:"",dxpointerenter:"",dxpointerleave:""},IT=function(e){var t=[];return F(e.touches,function(i,n){t.push(O({pointerId:n.identifier},n))}),{pointers:t,pointerId:e.changedTouches[0].identifier}},TN=function(e){return Oe.real().platform==="ios"&&(e==="dxpointerdown"||e==="dxpointerup")},Ph=sm.inherit({ctor:function(){this.callBase.apply(this,arguments),this._pointerId=0},_handler:function(e){if(TN(this._eventName)){var t=e.changedTouches[0];if(this._pointerId===t.identifier&&this._pointerId!==0)return;this._pointerId=t.identifier}return this.callBase.apply(this,arguments)},_fireEvent:function(e){return this.callBase(O(IT(e.originalEvent),e))}});Ph.map=IN;Ph.normalize=IT;var ld=function(e,t){cr.add(function(){e.split(" ").forEach(function(i){fe.listen(fe.getDocument(),i,t,!0)})})},AN=function(e,t,i){i=i||function(){};var n=[],r=function(o){var s=-1;return F(n,function(l,u){return t(o,u)?(s=l,!1):!0}),s},a=function(o){var s=r(o);s>-1&&n.splice(s,1)};ld(e.dxpointerdown,function(o){r(o)===-1&&(i(o),n.push(o))}),ld(e.dxpointermove,function(o){n[r(o)]=o}),ld(e.dxpointerup,a),ld(e.dxpointercancel,a),this.pointers=function(){return n},this.reset=function(){n=[]}},TT={dxpointerdown:"mousedown",dxpointermove:"mousemove",dxpointerup:"mouseup",dxpointercancel:"",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},AT=function(e){return e.pointerId=1,{pointers:lm.pointers(),pointerId:1}},lm,Ty=!1,DT=function(){Ty||(lm=new AN(TT,function(){return!0}),Ty=!0)},Ea=sm.inherit({ctor:function(){this.callBase.apply(this,arguments),DT()},_fireEvent:function(e){return this.callBase(O(AT(e.originalEvent),e))}});Ea.map=TT;Ea.normalize=AT;Ea.activate=DT;Ea.resetObserver=function(){lm.reset()};var DN={dxpointerdown:"touchstart mousedown",dxpointermove:"touchmove mousemove",dxpointerup:"touchend mouseup",dxpointercancel:"touchcancel",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},Ay=!1,ON=function(){Ay||(Ea.activate(),Ay=!0)},um=sm.inherit({EVENT_LOCK_TIMEOUT:100,ctor:function(){this.callBase.apply(this,arguments),ON()},_handler:function(e){var t=ho(e);if(t||(this._skipNextEvents=!0),!(t&&this._mouseLocked)){if(t&&this._skipNextEvents){this._skipNextEvents=!1,this._mouseLocked=!0,clearTimeout(this._unlockMouseTimer);var i=this;this._unlockMouseTimer=setTimeout(function(){i._mouseLocked=!1},this.EVENT_LOCK_TIMEOUT);return}return this.callBase(e)}},_fireEvent:function(e){var t=ho(e.originalEvent)?Ea.normalize:Ph.normalize;return this.callBase(O(t(e.originalEvent),e))},dispose:function(){this.callBase(),this._skipNextEvents=!1,this._mouseLocked=!1,clearTimeout(this._unlockMouseTimer)}});um.map=DN;um.resetObserver=Ea.resetObserver;var RN=(e,t)=>{var{tablet:i,phone:n}=t;return e.touch&&!(i||n)?um:e.touch?Ph:Ea},Dy=RN(wN,Oe.real());F(Dy.map,(e,t)=>{Bn(e,new Dy(e,t))});var ut={down:"dxpointerdown",up:"dxpointerup",move:"dxpointermove",cancel:"dxpointercancel",enter:"dxpointerenter",leave:"dxpointerleave",over:"dxpointerover",out:"dxpointerout"},Fh=nt.inherit({ctor:function(e){this._$element=v(e),this._cancelCallback=dt(),this._acceptCallback=dt()},getElement:function(){return this._$element},validate:function(e){return!zi(e)},validatePointers:function(e){return cN(e)===1},allowInterruptionByMouseWheel:function(){return!0},configure:function(e){O(this,e)},addCancelCallback:function(e){this._cancelCallback.add(e)},removeCancelCallback:function(){this._cancelCallback.empty()},_cancel:function(e){this._cancelCallback.fire(this,e)},addAcceptCallback:function(e){this._acceptCallback.add(e)},removeAcceptCallback:function(){this._acceptCallback.empty()},_accept:function(e){this._acceptCallback.fire(this,e)},_requestAccept:function(e){this._acceptRequestEvent=e},_forgetAccept:function(){this._accept(this._acceptRequestEvent),this._acceptRequestEvent=null},start:ee,move:ee,end:ee,cancel:ee,reset:function(){this._acceptRequestEvent&&this._accept(this._acceptRequestEvent)},_fireEvent:function(e,t,i){var n=O({type:e,originalEvent:t,target:this._getEmitterTarget(t),delegateTarget:this.getElement().get(0)},i);return t=Sa(n),t.cancel&&this._cancel(t),t},_getEmitterTarget:function(e){return(this.delegateSelector?v(e.target).closest(this.delegateSelector):this.getElement()).get(0)},dispose:ee}),Du="dxmousewheel",Oy="dxWheel",kN="wheel",Ry=0,BN=30,S_={setup:function(e){var t=v(e);D.on(t,me(kN,Oy),S_._wheelHandler.bind(S_))},teardown:function(e){D.off(e,".".concat(Oy))},_wheelHandler:function(e){var{deltaMode:t,deltaY:i,deltaX:n,deltaZ:r}=e.originalEvent;Sa({type:Du,originalEvent:e,delta:this._normalizeDelta(i,t),deltaX:n,deltaY:i,deltaZ:r,deltaMode:t,pointerType:"mouse"}),e.stopPropagation()},_normalizeDelta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ry;return t===Ry?-e:-BN*e}};Bn(Du,S_);var ud="dxEventManager",Tl="dxEmitter",LN=nt.inherit({ctor:function(){this._attachHandlers(),this.reset(),this._proxiedCancelHandler=this._cancelHandler.bind(this),this._proxiedAcceptHandler=this._acceptHandler.bind(this)},_attachHandlers:function(){cr.add((function(){var e=fe.getDocument();D.subscribeGlobal(e,me(ut.down,ud),this._pointerDownHandler.bind(this)),D.subscribeGlobal(e,me(ut.move,ud),this._pointerMoveHandler.bind(this)),D.subscribeGlobal(e,me([ut.up,ut.cancel].join(" "),ud),this._pointerUpHandler.bind(this)),D.subscribeGlobal(e,me(Du,ud),this._mouseWheelHandler.bind(this))}).bind(this))},_eachEmitter:function(e){for(var t=this._activeEmitters||[],i=0;t.length>i;){var n=t[i];if(e(n)===!1)break;t[i]===n&&i++}},_applyToEmitters:function(e,t){this._eachEmitter(function(i){i[e].call(i,t)})},reset:function(){this._eachEmitter(this._proxiedCancelHandler),this._activeEmitters=[]},resetEmitter:function(e){this._proxiedCancelHandler(e)},_pointerDownHandler:function(e){ho(e)&&e.which>1||this._updateEmitters(e)},_updateEmitters:function(e){this._isSetChanged(e)&&(this._cleanEmitters(e),this._fetchEmitters(e))},_isSetChanged:function(e){var t=this._closestEmitter(e),i=this._emittersSet||[],n=t.length!==i.length;return F(t,function(r,a){return n=n||i[r]!==a,!n}),this._emittersSet=t,n},_closestEmitter:function(e){var t=this,i=[],n=v(e.target);function r(o,s){s&&s.validatePointers(e)&&s.validate(e)&&(s.addCancelCallback(t._proxiedCancelHandler),s.addAcceptCallback(t._proxiedAcceptHandler),i.push(s))}for(;n.length;){var a=Mt(n.get(0),Tl)||[];F(a,r),n=n.parent()}return i},_acceptHandler:function(e,t){var i=this;this._eachEmitter(function(n){n!==e&&i._cancelEmitter(n,t)})},_cancelHandler:function(e,t){this._cancelEmitter(e,t)},_cancelEmitter:function(e,t){var i=this._activeEmitters;t?e.cancel(t):e.reset(),e.removeCancelCallback(),e.removeAcceptCallback();var n=i.indexOf(e);n>-1&&i.splice(n,1)},_cleanEmitters:function(e){this._applyToEmitters("end",e),this.reset(e)},_fetchEmitters:function(e){this._activeEmitters=this._emittersSet.slice(),this._applyToEmitters("start",e)},_pointerMoveHandler:function(e){this._applyToEmitters("move",e)},_pointerUpHandler:function(e){this._updateEmitters(e)},_mouseWheelHandler:function(e){this._allowInterruptionByMouseWheel()&&(e.pointers=[null],this._pointerDownHandler(e),this._adjustWheelEvent(e),this._pointerMoveHandler(e),e.pointers=[],this._pointerUpHandler(e))},_allowInterruptionByMouseWheel:function(){var e=!0;return this._eachEmitter(function(t){return e=t.allowInterruptionByMouseWheel()&&e,e}),e},_adjustWheelEvent:function(e){var t=null;if(this._eachEmitter(function(a){if(a.gesture){var o=a.getDirection(e);if(o!=="horizontal"&&!e.shiftKey||o!=="vertical"&&e.shiftKey)return t=a,!1}}),!!t){var i=t.getDirection(e),n=i==="both"&&!e.shiftKey||i==="vertical",r=n?"pageY":"pageX";e[r]+=e.delta}},isActive:function(e){var t=!1;return this._eachEmitter(function(i){t=t||i.getElement().is(e)}),t}}),ky=new LN,Lf="dxEmitterSubscription",Hs=function(e){var t=e.emitter,i=e.events[0],n=e.events;F(n,function(r,a){Bn(a,{noBubble:!e.bubble,setup:function(o){var s=Mt(o,Lf)||{},l=Mt(o,Tl)||{},u=l[i]||new t(o);s[a]=!0,l[i]=u,Mt(o,Tl,l),Mt(o,Lf,s)},add:function(o,s){var l=Mt(o,Tl),u=l[i];u.configure(O({delegateSelector:s.selector},s.data),s.type)},teardown:function(o){var s=Mt(o,Lf),l=Mt(o,Tl),u=l[i];delete s[a];var d=!0;F(n,function(c,h){return d=d&&!s[h],d}),d&&(ky.isActive(o)&&ky.resetEmitter(u),u&&u.dispose(),delete l[i])}})})},ct="dxclick",E_=null,Al=null,By=()=>{Al=null},Ly=function(e){var t=e.originalEvent,i=Al===t||t&&t.DXCLICK_FIRED,n=!e.which||e.which===1;n&&!E_&&!i&&(t&&(t.DXCLICK_FIRED=!0),CN(Al,By),Al=t,mN(Al,By),Sa({type:ct,originalEvent:e}))},PN=Fh.inherit({ctor:function(e){this.callBase(e),D.on(this.getElement(),"click",Ly)},start:function(e){E_=null},cancel:function(){E_=!0},dispose:function(){D.off(this.getElement(),"click",Ly)}});(function(){var e=Oe.real().generic;if(!e){var t=null,i=!1,n=fe.getDocument();D.subscribeGlobal(n,me(ut.down,"NATIVE_CLICK_FIXER"),function(r){t=r.target,i=r.isDefaultPrevented()}),D.subscribeGlobal(n,me("click","NATIVE_CLICK_FIXER"),function(r){var a=v(r.target);!i&&t&&!a.is(t)&&!v(t).is("label")&&(o=a,v(o).is("input, textarea, select, button ,:focus, :focus *"))&&Ns();var o;t=null,i=!1})}})();Hs({emitter:PN,bubble:!0,events:[ct]});var w_="dxactive",I_="dxinactive",FN=30,MN=400,dd=nt.inherit({ctor:function(e,t){this._timeout=e,this._fire=t},start:function(){var e=this;this._schedule(function(){e.force()})},_schedule:function(e){this.stop(),this._timer=setTimeout(e,this._timeout)},stop:function(){clearTimeout(this._timer)},force:function(){this._fired||(this.stop(),this._fire(),this._fired=!0)},fired:function(){return this._fired}}),Mn,dm=Fh.inherit({ctor:function(){this.callBase.apply(this,arguments),this._active=new dd(0,ee),this._inactive=new dd(0,ee)},configure:function(e,t){switch(t){case w_:e.activeTimeout=e.timeout;break;case I_:e.inactiveTimeout=e.timeout}this.callBase(e)},start:function(e){if(Mn){var t=ca(this.getElement().get(0),Mn.getElement().get(0)),i=!Mn._active.fired();if(t&&i){this._cancel();return}Mn._inactive.force()}Mn=this,this._initEvents(e),this._active.start()},_initEvents:function(e){var t=this,i=this._getEmitterTarget(e),n=ho(e),r=Oe.isSimulator(),a=r||!n,o=Ft(this.activeTimeout,FN),s=Ft(this.inactiveTimeout,MN);this._active=new dd(a?o:0,function(){t._fireEvent(w_,e,{target:i})}),this._inactive=new dd(a?s:0,function(){t._fireEvent(I_,e,{target:i}),Mn=null})},cancel:function(e){this.end(e)},end:function(e){var t=e.type!==ut.up;t?this._active.stop():this._active.force(),this._inactive.start(),t&&this._inactive.force()},dispose:function(){this._active.stop(),this._inactive.stop(),Mn===this&&(Mn=null),this.callBase()},lockInactive:function(){return this._active.force(),this._inactive.stop(),Mn=null,this._cancel(),this._inactive.force.bind(this._inactive)}});dm.lock=function(e){var t=Mn?Mn.lockInactive():ee;e.done(t)};Hs({emitter:dm,events:[w_,I_]});var VN=dm.lock,OT="dxHoverStart",cm="dxhoverstart",NN=me(ut.enter,OT),RT="dxHoverEnd",Mh="dxhoverend",HN=me(ut.leave,RT),kT=nt.inherit({noBubble:!0,ctor:function(){this._handlerArrayKeyPath=this._eventNamespace+"_HandlerStore"},setup:function(e){Mt(e,this._handlerArrayKeyPath,{})},add:function(e,t){var i=this,n=function(r){i._handler(r)};D.on(e,this._originalEventName,t.selector,n),Mt(e,this._handlerArrayKeyPath)[t.guid]=n},_handler:function(e){Au(e)||Oe.isSimulator()||Sa({type:this._eventName,originalEvent:e,delegateTarget:e.delegateTarget})},remove:function(e,t){var i=Mt(e,this._handlerArrayKeyPath)[t.guid];D.off(e,this._originalEventName,t.selector,i)},teardown:function(e){Oh(e,this._handlerArrayKeyPath)}}),$N=kT.inherit({ctor:function(){this._eventNamespace=OT,this._eventName=cm,this._originalEventName=NN,this.callBase()},_handler:function(e){var t=e.pointers||[];t.length||this.callBase(e)}}),WN=kT.inherit({ctor:function(){this._eventNamespace=RT,this._eventName=Mh,this._originalEventName=HN,this.callBase()}});Bn(cm,new $N);Bn(Mh,new WN);function Py(e,t,i){e=e==="role"||e==="id"?e:"aria-".concat(e),t=E(t)?t.toString():null,i.attr(e,t)}var pi=hr.inherit({_feedbackHideTimeout:400,_feedbackShowTimeout:30,_supportedKeys:()=>({}),_getDefaultOptions(){return O(this.callBase(),{hoveredElement:null,isActive:!1,disabled:!1,visible:!0,hint:void 0,activeStateEnabled:!1,onContentReady:null,hoverStateEnabled:!1,focusStateEnabled:!1,tabIndex:0,accessKey:void 0,onFocusIn:null,onFocusOut:null,onKeyboardHandled:null,ignoreParentReadOnly:!1,useResizeObserver:!0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){var e=Oe.real(),t=e.platform,i=e.version;return t==="ios"&&_T(i,"13.3")<=0},options:{useResizeObserver:!1}}])},_init(){this.callBase(),this._initContentReadyAction()},_innerWidgetOptionChanged:function(e,t){var i=pi.getOptionsFromContainer(t);e&&e.option(i),this._options.cache(t.name,i)},_bindInnerWidgetOptions(e,t){var i=()=>this._options.silent(t,O({},e.option()));i(),e.on("optionChanged",i)},_getAriaTarget(){return this._focusTarget()},_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initMarkup(){var{disabled:e,visible:t}=this.option();this.$element().addClass("dx-widget"),this._toggleDisabledState(e),this._toggleVisibility(t),this._renderHint(),this._isFocusable()&&this._renderFocusTarget(),this.callBase()},_render(){this.callBase(),this._renderContent(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents(),this._toggleIndependentState()},_renderHint(){var{hint:e}=this.option();this.$element().attr("title",e||null)},_renderContent(){Zt(()=>this._disposed?void 0:this._renderContentImpl()).done(()=>this._disposed?void 0:this._fireContentReadyAction())},_renderContentImpl:ee,_fireContentReadyAction:to(function(){return this._contentReadyAction()}),_dispose(){this._contentReadyAction=null,this._detachKeyboardEvents(),this.callBase()},_resetActiveState(){this._toggleActiveState(this._eventBindingTarget(),!1)},_clean(){this._cleanFocusState(),this._resetActiveState(),this.callBase(),this.$element().empty()},_toggleVisibility(e){this.$element().toggleClass("dx-state-invisible",!e),this.setAria("hidden",!e||void 0)},_renderFocusState(){this._attachKeyboardEvents(),this._isFocusable()&&(this._renderFocusTarget(),this._attachFocusEvents(),this._renderAccessKey())},_renderAccessKey(){var e=this._focusTarget(),{accessKey:t}=this.option();e.attr("accesskey",t)},_isFocusable(){var{focusStateEnabled:e,disabled:t}=this.option();return e&&!t},_eventBindingTarget(){return this.$element()},_focusTarget(){return this._getActiveElement()},_isFocusTarget:function(e){var t=v(this._focusTarget()).toArray();return t.includes(e)},_getActiveElement(){var e=this._eventBindingTarget();return this._activeStateUnit?e.find(this._activeStateUnit).not(".dx-state-disabled"):e},_renderFocusTarget(){var{tabIndex:e}=this.option();this._focusTarget().attr("tabIndex",e)},_keyboardEventBindingTarget(){return this._eventBindingTarget()},_refreshFocusEvent(){this._detachFocusEvents(),this._attachFocusEvents()},_focusEventTarget(){return this._focusTarget()},_focusInHandler(e){e.isDefaultPrevented()||this._createActionByOption("onFocusIn",{beforeExecute:()=>this._updateFocusState(e,!0),excludeValidators:["readOnly"]})({event:e})},_focusOutHandler(e){e.isDefaultPrevented()||this._createActionByOption("onFocusOut",{beforeExecute:()=>this._updateFocusState(e,!1),excludeValidators:["readOnly","disabled"]})({event:e})},_updateFocusState(e,t){var{target:i}=e;this._isFocusTarget(i)&&this._toggleFocusClass(t,v(i))},_toggleFocusClass(e,t){var i=t&&t.length?t:this._focusTarget();i.toggleClass("dx-state-focused",e)},_hasFocusClass(e){var t=v(e||this._focusTarget());return t.hasClass("dx-state-focused")},_isFocused(){return this._hasFocusClass()},_getKeyboardListeners:()=>[],_attachKeyboardEvents(){this._detachKeyboardEvents();var{focusStateEnabled:e,onKeyboardHandled:t}=this.option(),i=this._getKeyboardListeners().length,n=!!t,r=e||i||n;r&&(this._keyboardListenerId=ha.on(this._keyboardEventBindingTarget(),this._focusTarget(),a=>this._keyboardHandler(a)))},_keyboardHandler(e,t){if(!t){var{originalEvent:i,keyName:n,which:r}=e,a=this._supportedKeys(i),o=a[n]||a[r];if(o!==void 0){var s=o.bind(this),l=s(i,e);if(!l)return!1}}var u=this._getKeyboardListeners(),{onKeyboardHandled:d}=this.option();return u.forEach(c=>c&&c._keyboardHandler(e)),d&&d(e),!0},_refreshFocusState(){this._cleanFocusState(),this._renderFocusState()},_cleanFocusState(){var e=this._focusTarget();e.removeAttr("tabIndex"),this._toggleFocusClass(!1),this._detachFocusEvents(),this._detachKeyboardEvents()},_detachKeyboardEvents(){ha.off(this._keyboardListenerId),this._keyboardListenerId=null},_attachHoverEvents(){var{hoverStateEnabled:e}=this.option(),t=this._activeStateUnit,i=this._eventBindingTarget();Sy.off(i,{selector:t,namespace:"UIFeedback"}),e&&Sy.on(i,new en(n=>{var{event:r,element:a}=n;this._hoverStartHandler(r),this.option("hoveredElement",v(a))},{excludeValidators:["readOnly"]}),n=>{this.option("hoveredElement",null),this._hoverEndHandler(n)},{selector:t,namespace:"UIFeedback"})},_attachFeedbackEvents(){var{activeStateEnabled:e}=this.option(),t=this._activeStateUnit,i=this._eventBindingTarget();by.off(i,{namespace:"UIFeedback",selector:t}),e&&by.on(i,new en(n=>{var{event:r,element:a}=n;return this._toggleActiveState(v(a),!0,r)}),new en(n=>{var{event:r,element:a}=n;return this._toggleActiveState(v(a),!1,r)},{excludeValidators:["disabled","readOnly"]}),{showTimeout:this._feedbackShowTimeout,hideTimeout:this._feedbackHideTimeout,selector:t,namespace:"UIFeedback"})},_detachFocusEvents(){var e=this._focusEventTarget();_c.off(e,{namespace:"".concat(this.NAME,"Focus")})},_attachFocusEvents(){var e=this._focusEventTarget();_c.on(e,t=>this._focusInHandler(t),t=>this._focusOutHandler(t),{namespace:"".concat(this.NAME,"Focus"),isFocusable:(t,i)=>v(i).is(y_)})},_hoverStartHandler:ee,_hoverEndHandler:ee,_toggleActiveState(e,t){this.option("isActive",t),e.toggleClass("dx-state-active",t)},_updatedHover(){var e=this._options.silent("hoveredElement");this._hover(e,e)},_findHoverTarget(e){return e&&e.closest(this._activeStateUnit||this._eventBindingTarget())},_hover(e,t){var{hoverStateEnabled:i,disabled:n,isActive:r}=this.option();if(t=this._findHoverTarget(t),t&&t.toggleClass("dx-state-hover",!1),e&&i&&!n&&!r){var a=this._findHoverTarget(e);a&&a.toggleClass("dx-state-hover",!0)}},_toggleDisabledState(e){this.$element().toggleClass("dx-state-disabled",!!e),this.setAria("disabled",e||void 0)},_toggleIndependentState(){this.$element().toggleClass("dx-state-independent",this.option("ignoreParentReadOnly"))},_setWidgetOption(e,t){if(this[e]){if(Ye(t[0])){F(t[0],(a,o)=>this._setWidgetOption(e,[a,o]));return}var i=t[0],n=t[1];t.length===1&&(n=this.option(i));var r=this["".concat(e,"OptionMap")];this[e].option(r?r(i):i,n)}},_optionChanged(e){var{name:t,value:i,previousValue:n}=e;switch(t){case"disabled":this._toggleDisabledState(i),this._updatedHover(),this._refreshFocusState();break;case"hint":this._renderHint();break;case"ignoreParentReadOnly":this._toggleIndependentState();break;case"activeStateEnabled":this._attachFeedbackEvents();break;case"hoverStateEnabled":this._attachHoverEvents(),this._updatedHover();break;case"tabIndex":case"focusStateEnabled":this._refreshFocusState();break;case"onFocusIn":case"onFocusOut":case"useResizeObserver":break;case"accessKey":this._renderAccessKey();break;case"hoveredElement":this._hover(i,n);break;case"isActive":this._updatedHover();break;case"visible":this._toggleVisibility(i),this._isVisibilityChangeSupported()&&this._checkVisibilityChanged(i?"shown":"hiding");break;case"onKeyboardHandled":this._attachKeyboardEvents();break;case"onContentReady":this._initContentReadyAction();break;default:this.callBase(e)}},_isVisible(){var{visible:e}=this.option();return this.callBase()&&e},beginUpdate(){this._ready(!1),this.callBase()},endUpdate(){this.callBase(),this._initialized&&this._ready(!0)},_ready(e){if(arguments.length===0)return this._isReady;this._isReady=e},setAria(){if(!Ye(arguments.length<=0?void 0:arguments[0]))Py(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],(arguments.length<=2?void 0:arguments[2])||this._getAriaTarget());else{var e=(arguments.length<=1?void 0:arguments[1])||this._getAriaTarget();F(arguments.length<=0?void 0:arguments[0],(t,i)=>Py(t,i,e))}},isReady(){return this._ready()},repaint(){this._refresh()},focus(){_c.trigger(this._focusTarget())},registerKeyHandler(e,t){var i=this._supportedKeys();this._supportedKeys=()=>O(i,{[e]:t})}});pi.getOptionsFromContainer=e=>{var{name:t,fullName:i,value:n}=e,r={};if(t===i)r=n;else{var a=i.split(".").pop();r[a]=n}return r};var zN=["year","month","day"],GN=["year","month","day","hour","minute"],T_=function(e){return e==="date"||e==="datetime"},Pf=function(e){var t,i=[],n=["year","month","day","hour","minute","second"],r=e.headerFilter&&e.headerFilter.groupInterval,a=r==="quarter"?"month":r;if(T_(e.dataType)&&r!==null)return i=e.dataType==="datetime"?GN:zN,t=n.indexOf(a),t>=0&&(i=n.slice(0,t),i.push(r)),i;if(E(r))return Array.isArray(r)?r:[r]};const As=function(){var e=function(r,a){var o=r.dataField||r.selector;return a==="search"&&(o=r.displayField||r.calculateDisplayValue||o),o},t=function(r,a){var o,s,l,u=e(this,a);if(Array.isArray(r)&&E(r[0])&&E(r[1]))return s=[u,">=",r[0]],l=[u,"<=",r[1]],T_(this.dataType)&&(d=r[1],d.getHours()+d.getMinutes()+d.getSeconds()+d.getMilliseconds()<1)&&(o=new Date(r[1].getTime()),this.dataType==="date"&&o.setDate(r[1].getDate()+1),l=[u,"<",o]),[s,"and",l];var d},i=function(r,a,o){var s,l,u,d=function(h){return Mi(h)?[h.getFullYear(),h.getMonth(),h.getDate(),h.getHours(),h.getMinutes(),h.getSeconds()]:Jt((""+h).split("/"),function(f,p){return p===1?Number(f)-1:Number(f)})}(r),c=e(this,o);switch(o==="headerFilter"?u=Pf(this)[d.length-1]:this.dataType==="datetime"&&(u="minute"),u){case"year":s=new Date(d[0],0,1),l=new Date(d[0]+1,0,1);break;case"month":s=new Date(d[0],d[1],1),l=new Date(d[0],d[1]+1,1);break;case"quarter":s=new Date(d[0],3*d[1],1),l=new Date(d[0],3*d[1]+3,1);break;case"hour":s=new Date(d[0],d[1],d[2],d[3]),l=new Date(d[0],d[1],d[2],d[3]+1);break;case"minute":s=new Date(d[0],d[1],d[2],d[3],d[4]),l=new Date(d[0],d[1],d[2],d[3],d[4]+1);break;case"second":s=new Date(d[0],d[1],d[2],d[3],d[4],d[5]),l=new Date(d[0],d[1],d[2],d[3],d[4],d[5]+1);break;default:s=new Date(d[0],d[1],d[2]),l=new Date(d[0],d[1],d[2]+1)}switch(a){case"<":return[c,"<",s];case"<=":return[c,"<",l];case">":return[c,">=",l];case">=":return[c,">=",s];case"<>":return[[c,"<",s],"or",[c,">=",l]];default:return[[c,">=",s],"and",[c,"<",l]]}},n=function(r,a,o){var s=e(this,o),l=Pf(this);if(o==="headerFilter"&&l&&E(r)){var u=(""+r).split("/"),d=Number(u[u.length-1]),c=l[u.length-1],h=[s,">=",d],f=[s,"<",d+c],p=[h,"and",f];return p}return[s,a||"=",r]};return{defaultCalculateFilterExpression:function(r,a,o){var s=this,l=e(s,o),u=s.calculateDisplayValue&&o==="search",d=u&&s.lookup&&s.lookup.dataType||s.dataType,c=null;if((o==="headerFilter"||o==="filterBuilder")&&r===null)c=[l,a||"=",null],d==="string"&&(c=[c,a==="="?"or":"and",[l,a||"=",""]]);else if(d==="string"&&(!s.lookup||u))c=[l,a||"contains",r];else{if(a==="between")return t.apply(s,[r,o]);if(T_(d)&&E(r))return i.apply(s,arguments);if(d==="number")return n.apply(s,arguments);c=[l,a||"=",r]}return c},getGroupInterval:Pf}}();var wa=e=>{var t=e??It().rtlEnabled;return t?"right":"left"},Gt=e=>Yt(e)?{width:e.outerWidth,height:e.outerHeight}:e.getBoundingClientRect();const UN={"en-150":"en-001","en-AG":"en-001","en-AI":"en-001","en-AU":"en-001","en-BB":"en-001","en-BM":"en-001","en-BS":"en-001","en-BW":"en-001","en-BZ":"en-001","en-CC":"en-001","en-CK":"en-001","en-CM":"en-001","en-CX":"en-001","en-CY":"en-001","en-DG":"en-001","en-DM":"en-001","en-ER":"en-001","en-FJ":"en-001","en-FK":"en-001","en-FM":"en-001","en-GB":"en-001","en-GD":"en-001","en-GG":"en-001","en-GH":"en-001","en-GI":"en-001","en-GM":"en-001","en-GY":"en-001","en-HK":"en-001","en-IE":"en-001","en-IL":"en-001","en-IM":"en-001","en-IN":"en-001","en-IO":"en-001","en-JE":"en-001","en-JM":"en-001","en-KE":"en-001","en-KI":"en-001","en-KN":"en-001","en-KY":"en-001","en-LC":"en-001","en-LR":"en-001","en-LS":"en-001","en-MG":"en-001","en-MO":"en-001","en-MS":"en-001","en-MT":"en-001","en-MU":"en-001","en-MW":"en-001","en-MY":"en-001","en-NA":"en-001","en-NF":"en-001","en-NG":"en-001","en-NR":"en-001","en-NU":"en-001","en-NZ":"en-001","en-PG":"en-001","en-PK":"en-001","en-PN":"en-001","en-PW":"en-001","en-RW":"en-001","en-SB":"en-001","en-SC":"en-001","en-SD":"en-001","en-SG":"en-001","en-SH":"en-001","en-SL":"en-001","en-SS":"en-001","en-SX":"en-001","en-SZ":"en-001","en-TC":"en-001","en-TK":"en-001","en-TO":"en-001","en-TT":"en-001","en-TV":"en-001","en-TZ":"en-001","en-UG":"en-001","en-VC":"en-001","en-VG":"en-001","en-VU":"en-001","en-WS":"en-001","en-ZA":"en-001","en-ZM":"en-001","en-ZW":"en-001","en-AT":"en-150","en-BE":"en-150","en-CH":"en-150","en-DE":"en-150","en-DK":"en-150","en-FI":"en-150","en-NL":"en-150","en-SE":"en-150","en-SI":"en-150","es-AR":"es-419","es-BO":"es-419","es-BR":"es-419","es-BZ":"es-419","es-CL":"es-419","es-CO":"es-419","es-CR":"es-419","es-CU":"es-419","es-DO":"es-419","es-EC":"es-419","es-GT":"es-419","es-HN":"es-419","es-MX":"es-419","es-NI":"es-419","es-PA":"es-419","es-PE":"es-419","es-PR":"es-419","es-PY":"es-419","es-SV":"es-419","es-US":"es-419","es-UY":"es-419","es-VE":"es-419",nb:"no",nn:"no","pt-AO":"pt-PT","pt-CH":"pt-PT","pt-CV":"pt-PT","pt-FR":"pt-PT","pt-GQ":"pt-PT","pt-GW":"pt-PT","pt-LU":"pt-PT","pt-MO":"pt-PT","pt-MZ":"pt-PT","pt-ST":"pt-PT","pt-TL":"pt-PT","az-Arab":"und","az-Cyrl":"und","bal-Latn":"und","blt-Latn":"und","bm-Nkoo":"und","bs-Cyrl":"und","byn-Latn":"und","cu-Glag":"und","dje-Arab":"und","dyo-Arab":"und","en-Dsrt":"und","en-Shaw":"und","ff-Adlm":"und","ff-Arab":"und","ha-Arab":"und","hi-Latn":"und","iu-Latn":"und","kk-Arab":"und","ks-Deva":"und","ku-Arab":"und","ky-Arab":"und","ky-Latn":"und","ml-Arab":"und","mn-Mong":"und","mni-Mtei":"und","ms-Arab":"und","pa-Arab":"und","sat-Deva":"und","sd-Deva":"und","sd-Khoj":"und","sd-Sind":"und","shi-Latn":"und","so-Arab":"und","sr-Latn":"und","sw-Arab":"und","tg-Arab":"und","ug-Cyrl":"und","uz-Arab":"und","uz-Cyrl":"und","vai-Latn":"und","wo-Arab":"und","yo-Arab":"und","yue-Hans":"und","zh-Hant":"und","zh-Hant-MO":"zh-Hant-HK"};var KN="-";const jN=(e,t)=>{var i=e[t];return i?i!=="root"&&i:t.substr(0,t.lastIndexOf(KN))};var Ff="en";const pn=kn({locale:(()=>{var e=Ff;return t=>{if(!t)return e;e=t}})(),getValueByClosestLocale:function(e){for(var t=this.locale(),i=e(t),n;!i&&!n;)t=jN(UN,t),t?i=e(t):n=!0;return i===void 0&&t!==Ff?e(Ff):i}});var qN={en:{Yes:"Yes",No:"No",Cancel:"Cancel",Clear:"Clear",Done:"Done",Loading:"Loading...",Select:"Select...",Search:"Search",Back:"Back",OK:"OK","dxCollectionWidget-noDataText":"No data to display","dxDropDownEditor-selectLabel":"Select","validation-required":"Required","validation-required-formatted":"{0} is required","validation-numeric":"Value must be a number","validation-numeric-formatted":"{0} must be a number","validation-range":"Value is out of range","validation-range-formatted":"{0} is out of range","validation-stringLength":"The length of the value is not correct","validation-stringLength-formatted":"The length of {0} is not correct","validation-custom":"Value is invalid","validation-custom-formatted":"{0} is invalid","validation-async":"Value is invalid","validation-async-formatted":"{0} is invalid","validation-compare":"Values do not match","validation-compare-formatted":"{0} does not match","validation-pattern":"Value does not match pattern","validation-pattern-formatted":"{0} does not match pattern","validation-email":"Email is invalid","validation-email-formatted":"{0} is invalid","validation-mask":"Value is invalid","dxLookup-searchPlaceholder":"Minimum character number: {0}","dxList-pullingDownText":"Pull down to refresh...","dxList-pulledDownText":"Release to refresh...","dxList-refreshingText":"Refreshing...","dxList-pageLoadingText":"Loading...","dxList-nextButtonText":"More","dxList-selectAll":"Select All","dxListEditDecorator-delete":"Delete","dxListEditDecorator-more":"More","dxScrollView-pullingDownText":"Pull down to refresh...","dxScrollView-pulledDownText":"Release to refresh...","dxScrollView-refreshingText":"Refreshing...","dxScrollView-reachBottomText":"Loading...","dxDateBox-simulatedDataPickerTitleTime":"Select time","dxDateBox-simulatedDataPickerTitleDate":"Select date","dxDateBox-simulatedDataPickerTitleDateTime":"Select date and time","dxDateBox-validation-datetime":"Value must be a date or time","dxFileUploader-selectFile":"Select a file","dxFileUploader-dropFile":"or Drop a file here","dxFileUploader-bytes":"bytes","dxFileUploader-kb":"kb","dxFileUploader-Mb":"Mb","dxFileUploader-Gb":"Gb","dxFileUploader-upload":"Upload","dxFileUploader-uploaded":"Uploaded","dxFileUploader-readyToUpload":"Ready to upload","dxFileUploader-uploadAbortedMessage":"Upload cancelled","dxFileUploader-uploadFailedMessage":"Upload failed","dxFileUploader-invalidFileExtension":"File type is not allowed","dxFileUploader-invalidMaxFileSize":"File is too large","dxFileUploader-invalidMinFileSize":"File is too small","dxRangeSlider-ariaFrom":"From","dxRangeSlider-ariaTill":"Till","dxSwitch-switchedOnText":"ON","dxSwitch-switchedOffText":"OFF","dxForm-optionalMark":"optional","dxForm-requiredMessage":"{0} is required","dxNumberBox-invalidValueMessage":"Value must be a number","dxNumberBox-noDataText":"No data","dxDataGrid-columnChooserTitle":"Column Chooser","dxDataGrid-columnChooserEmptyText":"Drag a column here to hide it","dxDataGrid-groupContinuesMessage":"Continues on the next page","dxDataGrid-groupContinuedMessage":"Continued from the previous page","dxDataGrid-groupHeaderText":"Group by This Column","dxDataGrid-ungroupHeaderText":"Ungroup","dxDataGrid-ungroupAllText":"Ungroup All","dxDataGrid-editingEditRow":"Edit","dxDataGrid-editingSaveRowChanges":"Save","dxDataGrid-editingCancelRowChanges":"Cancel","dxDataGrid-editingDeleteRow":"Delete","dxDataGrid-editingUndeleteRow":"Undelete","dxDataGrid-editingConfirmDeleteMessage":"Are you sure you want to delete this record?","dxDataGrid-validationCancelChanges":"Cancel changes","dxDataGrid-groupPanelEmptyText":"Drag a column header here to group by that column","dxDataGrid-noDataText":"No data","dxDataGrid-searchPanelPlaceholder":"Search...","dxDataGrid-filterRowShowAllText":"(All)","dxDataGrid-filterRowResetOperationText":"Reset","dxDataGrid-filterRowOperationEquals":"Equals","dxDataGrid-filterRowOperationNotEquals":"Does not equal","dxDataGrid-filterRowOperationLess":"Less than","dxDataGrid-filterRowOperationLessOrEquals":"Less than or equal to","dxDataGrid-filterRowOperationGreater":"Greater than","dxDataGrid-filterRowOperationGreaterOrEquals":"Greater than or equal to","dxDataGrid-filterRowOperationStartsWith":"Starts with","dxDataGrid-filterRowOperationContains":"Contains","dxDataGrid-filterRowOperationNotContains":"Does not contain","dxDataGrid-filterRowOperationEndsWith":"Ends with","dxDataGrid-filterRowOperationBetween":"Between","dxDataGrid-filterRowOperationBetweenStartText":"Start","dxDataGrid-filterRowOperationBetweenEndText":"End","dxDataGrid-applyFilterText":"Apply filter","dxDataGrid-trueText":"true","dxDataGrid-falseText":"false","dxDataGrid-sortingAscendingText":"Sort Ascending","dxDataGrid-sortingDescendingText":"Sort Descending","dxDataGrid-sortingClearText":"Clear Sorting","dxDataGrid-editingSaveAllChanges":"Save changes","dxDataGrid-editingCancelAllChanges":"Discard changes","dxDataGrid-editingAddRow":"Add a row","dxDataGrid-summaryMin":"Min: {0}","dxDataGrid-summaryMinOtherColumn":"Min of {1} is {0}","dxDataGrid-summaryMax":"Max: {0}","dxDataGrid-summaryMaxOtherColumn":"Max of {1} is {0}","dxDataGrid-summaryAvg":"Avg: {0}","dxDataGrid-summaryAvgOtherColumn":"Avg of {1} is {0}","dxDataGrid-summarySum":"Sum: {0}","dxDataGrid-summarySumOtherColumn":"Sum of {1} is {0}","dxDataGrid-summaryCount":"Count: {0}","dxDataGrid-columnFixingFix":"Fix","dxDataGrid-columnFixingUnfix":"Unfix","dxDataGrid-columnFixingLeftPosition":"To the left","dxDataGrid-columnFixingRightPosition":"To the right","dxDataGrid-exportTo":"Export","dxDataGrid-exportToExcel":"Export to Excel file","dxDataGrid-exporting":"Exporting...","dxDataGrid-excelFormat":"Excel file","dxDataGrid-selectedRows":"Selected rows","dxDataGrid-exportSelectedRows":"Export selected rows to {0}","dxDataGrid-exportAll":"Export all data to {0}","dxDataGrid-headerFilterEmptyValue":"(Blanks)","dxDataGrid-headerFilterOK":"OK","dxDataGrid-headerFilterCancel":"Cancel","dxDataGrid-ariaAdaptiveCollapse":"Hide additional data","dxDataGrid-ariaAdaptiveExpand":"Display additional data","dxDataGrid-ariaColumn":"Column","dxDataGrid-ariaValue":"Value","dxDataGrid-ariaFilterCell":"Filter cell","dxDataGrid-ariaCollapse":"Collapse","dxDataGrid-ariaExpand":"Expand","dxDataGrid-ariaDataGrid":"Data grid","dxDataGrid-ariaSearchInGrid":"Search in the data grid","dxDataGrid-ariaSelectAll":"Select all","dxDataGrid-ariaSelectRow":"Select row","dxDataGrid-ariaToolbar":"Data grid toolbar","dxDataGrid-filterBuilderPopupTitle":"Filter Builder","dxDataGrid-filterPanelCreateFilter":"Create Filter","dxDataGrid-filterPanelClearFilter":"Clear","dxDataGrid-filterPanelFilterEnabledHint":"Enable the filter","dxTreeList-ariaTreeList":"Tree list","dxTreeList-ariaSearchInGrid":"Search in the tree list","dxTreeList-ariaToolbar":"Tree list toolbar","dxTreeList-editingAddRowToNode":"Add","dxPager-infoText":"Page {0} of {1} ({2} items)","dxPager-pagesCountText":"of","dxPager-pageSizesAllText":"All","dxPivotGrid-grandTotal":"Grand Total","dxPivotGrid-total":"{0} Total","dxPivotGrid-fieldChooserTitle":"Field Chooser","dxPivotGrid-showFieldChooser":"Show Field Chooser","dxPivotGrid-expandAll":"Expand All","dxPivotGrid-collapseAll":"Collapse All","dxPivotGrid-sortColumnBySummary":'Sort "{0}" by This Column',"dxPivotGrid-sortRowBySummary":'Sort "{0}" by This Row',"dxPivotGrid-removeAllSorting":"Remove All Sorting","dxPivotGrid-dataNotAvailable":"N/A","dxPivotGrid-rowFields":"Row Fields","dxPivotGrid-columnFields":"Column Fields","dxPivotGrid-dataFields":"Data Fields","dxPivotGrid-filterFields":"Filter Fields","dxPivotGrid-allFields":"All Fields","dxPivotGrid-columnFieldArea":"Drop Column Fields Here","dxPivotGrid-dataFieldArea":"Drop Data Fields Here","dxPivotGrid-rowFieldArea":"Drop Row Fields Here","dxPivotGrid-filterFieldArea":"Drop Filter Fields Here","dxScheduler-editorLabelTitle":"Subject","dxScheduler-editorLabelStartDate":"Start Date","dxScheduler-editorLabelEndDate":"End Date","dxScheduler-editorLabelDescription":"Description","dxScheduler-editorLabelRecurrence":"Repeat","dxScheduler-openAppointment":"Open appointment","dxScheduler-recurrenceNever":"Never","dxScheduler-recurrenceMinutely":"Every minute","dxScheduler-recurrenceHourly":"Hourly","dxScheduler-recurrenceDaily":"Daily","dxScheduler-recurrenceWeekly":"Weekly","dxScheduler-recurrenceMonthly":"Monthly","dxScheduler-recurrenceYearly":"Yearly","dxScheduler-recurrenceRepeatEvery":"Repeat Every","dxScheduler-recurrenceRepeatOn":"Repeat On","dxScheduler-recurrenceEnd":"End repeat","dxScheduler-recurrenceAfter":"After","dxScheduler-recurrenceOn":"On","dxScheduler-recurrenceRepeatMinutely":"minute(s)","dxScheduler-recurrenceRepeatHourly":"hour(s)","dxScheduler-recurrenceRepeatDaily":"day(s)","dxScheduler-recurrenceRepeatWeekly":"week(s)","dxScheduler-recurrenceRepeatMonthly":"month(s)","dxScheduler-recurrenceRepeatYearly":"year(s)","dxScheduler-switcherDay":"Day","dxScheduler-switcherWeek":"Week","dxScheduler-switcherWorkWeek":"Work Week","dxScheduler-switcherMonth":"Month","dxScheduler-switcherAgenda":"Agenda","dxScheduler-switcherTimelineDay":"Timeline Day","dxScheduler-switcherTimelineWeek":"Timeline Week","dxScheduler-switcherTimelineWorkWeek":"Timeline Work Week","dxScheduler-switcherTimelineMonth":"Timeline Month","dxScheduler-recurrenceRepeatOnDate":"on date","dxScheduler-recurrenceRepeatCount":"occurrence(s)","dxScheduler-allDay":"All day","dxScheduler-confirmRecurrenceEditMessage":"Do you want to edit only this appointment or the whole series?","dxScheduler-confirmRecurrenceDeleteMessage":"Do you want to delete only this appointment or the whole series?","dxScheduler-confirmRecurrenceEditSeries":"Edit series","dxScheduler-confirmRecurrenceDeleteSeries":"Delete series","dxScheduler-confirmRecurrenceEditOccurrence":"Edit appointment","dxScheduler-confirmRecurrenceDeleteOccurrence":"Delete appointment","dxScheduler-noTimezoneTitle":"No timezone","dxScheduler-moreAppointments":"{0} more","dxCalendar-todayButtonText":"Today","dxCalendar-ariaWidgetName":"Calendar","dxColorView-ariaRed":"Red","dxColorView-ariaGreen":"Green","dxColorView-ariaBlue":"Blue","dxColorView-ariaAlpha":"Transparency","dxColorView-ariaHex":"Color code","dxTagBox-selected":"{0} selected","dxTagBox-allSelected":"All selected ({0})","dxTagBox-moreSelected":"{0} more","vizExport-printingButtonText":"Print","vizExport-titleMenuText":"Exporting/Printing","vizExport-exportButtonText":"{0} file","dxFilterBuilder-and":"And","dxFilterBuilder-or":"Or","dxFilterBuilder-notAnd":"Not And","dxFilterBuilder-notOr":"Not Or","dxFilterBuilder-addCondition":"Add Condition","dxFilterBuilder-addGroup":"Add Group","dxFilterBuilder-enterValueText":"<enter a value>","dxFilterBuilder-filterOperationEquals":"Equals","dxFilterBuilder-filterOperationNotEquals":"Does not equal","dxFilterBuilder-filterOperationLess":"Is less than","dxFilterBuilder-filterOperationLessOrEquals":"Is less than or equal to","dxFilterBuilder-filterOperationGreater":"Is greater than","dxFilterBuilder-filterOperationGreaterOrEquals":"Is greater than or equal to","dxFilterBuilder-filterOperationStartsWith":"Starts with","dxFilterBuilder-filterOperationContains":"Contains","dxFilterBuilder-filterOperationNotContains":"Does not contain","dxFilterBuilder-filterOperationEndsWith":"Ends with","dxFilterBuilder-filterOperationIsBlank":"Is blank","dxFilterBuilder-filterOperationIsNotBlank":"Is not blank","dxFilterBuilder-filterOperationBetween":"Is between","dxFilterBuilder-filterOperationAnyOf":"Is any of","dxFilterBuilder-filterOperationNoneOf":"Is none of","dxHtmlEditor-dialogColorCaption":"Change Font Color","dxHtmlEditor-dialogBackgroundCaption":"Change Background Color","dxHtmlEditor-dialogLinkCaption":"Add Link","dxHtmlEditor-dialogLinkUrlField":"URL","dxHtmlEditor-dialogLinkTextField":"Text","dxHtmlEditor-dialogLinkTargetField":"Open link in new window","dxHtmlEditor-dialogImageCaption":"Add Image","dxHtmlEditor-dialogImageUrlField":"URL","dxHtmlEditor-dialogImageAltField":"Alternate text","dxHtmlEditor-dialogImageWidthField":"Width (px)","dxHtmlEditor-dialogImageHeightField":"Height (px)","dxHtmlEditor-dialogInsertTableRowsField":"Rows","dxHtmlEditor-dialogInsertTableColumnsField":"Columns","dxHtmlEditor-dialogInsertTableCaption":"Insert Table","dxHtmlEditor-dialogUpdateImageCaption":"Update Image","dxHtmlEditor-dialogImageUpdateButton":"Update","dxHtmlEditor-dialogImageAddButton":"Add","dxHtmlEditor-dialogImageSpecifyUrl":"From the Web","dxHtmlEditor-dialogImageSelectFile":"From This Device","dxHtmlEditor-dialogImageKeepAspectRatio":"Keep Aspect Ratio","dxHtmlEditor-dialogImageEncodeToBase64":"Encode to Base64","dxHtmlEditor-heading":"Heading","dxHtmlEditor-normalText":"Normal text","dxHtmlEditor-background":"Background Color","dxHtmlEditor-bold":"Bold","dxHtmlEditor-color":"Font Color","dxHtmlEditor-font":"Font","dxHtmlEditor-italic":"Italic","dxHtmlEditor-link":"Add Link","dxHtmlEditor-image":"Add Image","dxHtmlEditor-size":"Size","dxHtmlEditor-strike":"Strikethrough","dxHtmlEditor-subscript":"Subscript","dxHtmlEditor-superscript":"Superscript","dxHtmlEditor-underline":"Underline","dxHtmlEditor-blockquote":"Blockquote","dxHtmlEditor-header":"Header","dxHtmlEditor-increaseIndent":"Increase Indent","dxHtmlEditor-decreaseIndent":"Decrease Indent","dxHtmlEditor-orderedList":"Ordered List","dxHtmlEditor-bulletList":"Bullet List","dxHtmlEditor-alignLeft":"Align Left","dxHtmlEditor-alignCenter":"Align Center","dxHtmlEditor-alignRight":"Align Right","dxHtmlEditor-alignJustify":"Align Justify","dxHtmlEditor-codeBlock":"Code Block","dxHtmlEditor-variable":"Add Variable","dxHtmlEditor-undo":"Undo","dxHtmlEditor-redo":"Redo","dxHtmlEditor-clear":"Clear Formatting","dxHtmlEditor-insertTable":"Insert Table","dxHtmlEditor-insertHeaderRow":"Insert Header Row","dxHtmlEditor-insertRowAbove":"Insert Row Above","dxHtmlEditor-insertRowBelow":"Insert Row Below","dxHtmlEditor-insertColumnLeft":"Insert Column Left","dxHtmlEditor-insertColumnRight":"Insert Column Right","dxHtmlEditor-deleteColumn":"Delete Column","dxHtmlEditor-deleteRow":"Delete Row","dxHtmlEditor-deleteTable":"Delete Table","dxHtmlEditor-cellProperties":"Cell Properties","dxHtmlEditor-tableProperties":"Table Properties","dxHtmlEditor-insert":"Insert","dxHtmlEditor-delete":"Delete","dxHtmlEditor-border":"Border","dxHtmlEditor-style":"Style","dxHtmlEditor-width":"Width","dxHtmlEditor-height":"Height","dxHtmlEditor-borderColor":"Color","dxHtmlEditor-tableBackground":"Background","dxHtmlEditor-dimensions":"Dimensions","dxHtmlEditor-alignment":"Alignment","dxHtmlEditor-horizontal":"Horizontal","dxHtmlEditor-vertical":"Vertical","dxHtmlEditor-paddingVertical":"Vertical Padding","dxHtmlEditor-paddingHorizontal":"Horizontal Padding","dxHtmlEditor-pixels":"Pixels","dxHtmlEditor-list":"List","dxHtmlEditor-ordered":"Ordered","dxHtmlEditor-bullet":"Bullet","dxHtmlEditor-align":"Align","dxHtmlEditor-center":"Center","dxHtmlEditor-left":"Left","dxHtmlEditor-right":"Right","dxHtmlEditor-indent":"Indent","dxHtmlEditor-justify":"Justify","dxFileManager-newDirectoryName":"Untitled directory","dxFileManager-rootDirectoryName":"Files","dxFileManager-errorNoAccess":"Access Denied. Operation could not be completed.","dxFileManager-errorDirectoryExistsFormat":"Directory '{0}' already exists.","dxFileManager-errorFileExistsFormat":"File '{0}' already exists.","dxFileManager-errorFileNotFoundFormat":"File '{0}' not found.","dxFileManager-errorDirectoryNotFoundFormat":"Directory '{0}' not found.","dxFileManager-errorWrongFileExtension":"File extension is not allowed.","dxFileManager-errorMaxFileSizeExceeded":"File size exceeds the maximum allowed size.","dxFileManager-errorInvalidSymbols":"This name contains invalid characters.","dxFileManager-errorDefault":"Unspecified error.","dxFileManager-errorDirectoryOpenFailed":"The directory cannot be opened","dxFileManager-commandCreate":"New directory","dxFileManager-commandRename":"Rename","dxFileManager-commandMove":"Move to","dxFileManager-commandCopy":"Copy to","dxFileManager-commandDelete":"Delete","dxFileManager-commandDownload":"Download","dxFileManager-commandUpload":"Upload files","dxFileManager-commandRefresh":"Refresh","dxFileManager-commandThumbnails":"Thumbnails View","dxFileManager-commandDetails":"Details View","dxFileManager-commandClearSelection":"Clear selection","dxFileManager-commandShowNavPane":"Toggle navigation pane","dxFileManager-dialogDirectoryChooserMoveTitle":"Move to","dxFileManager-dialogDirectoryChooserMoveButtonText":"Move","dxFileManager-dialogDirectoryChooserCopyTitle":"Copy to","dxFileManager-dialogDirectoryChooserCopyButtonText":"Copy","dxFileManager-dialogRenameItemTitle":"Rename","dxFileManager-dialogRenameItemButtonText":"Save","dxFileManager-dialogCreateDirectoryTitle":"New directory","dxFileManager-dialogCreateDirectoryButtonText":"Create","dxFileManager-dialogDeleteItemTitle":"Delete","dxFileManager-dialogDeleteItemButtonText":"Delete","dxFileManager-dialogDeleteItemSingleItemConfirmation":"Are you sure you want to delete {0}?","dxFileManager-dialogDeleteItemMultipleItemsConfirmation":"Are you sure you want to delete {0} items?","dxFileManager-dialogButtonCancel":"Cancel","dxFileManager-editingCreateSingleItemProcessingMessage":"Creating a directory inside {0}","dxFileManager-editingCreateSingleItemSuccessMessage":"Created a directory inside {0}","dxFileManager-editingCreateSingleItemErrorMessage":"Directory was not created","dxFileManager-editingCreateCommonErrorMessage":"Directory was not created","dxFileManager-editingRenameSingleItemProcessingMessage":"Renaming an item inside {0}","dxFileManager-editingRenameSingleItemSuccessMessage":"Renamed an item inside {0}","dxFileManager-editingRenameSingleItemErrorMessage":"Item was not renamed","dxFileManager-editingRenameCommonErrorMessage":"Item was not renamed","dxFileManager-editingDeleteSingleItemProcessingMessage":"Deleting an item from {0}","dxFileManager-editingDeleteMultipleItemsProcessingMessage":"Deleting {0} items from {1}","dxFileManager-editingDeleteSingleItemSuccessMessage":"Deleted an item from {0}","dxFileManager-editingDeleteMultipleItemsSuccessMessage":"Deleted {0} items from {1}","dxFileManager-editingDeleteSingleItemErrorMessage":"Item was not deleted","dxFileManager-editingDeleteMultipleItemsErrorMessage":"{0} items were not deleted","dxFileManager-editingDeleteCommonErrorMessage":"Some items were not deleted","dxFileManager-editingMoveSingleItemProcessingMessage":"Moving an item to {0}","dxFileManager-editingMoveMultipleItemsProcessingMessage":"Moving {0} items to {1}","dxFileManager-editingMoveSingleItemSuccessMessage":"Moved an item to {0}","dxFileManager-editingMoveMultipleItemsSuccessMessage":"Moved {0} items to {1}","dxFileManager-editingMoveSingleItemErrorMessage":"Item was not moved","dxFileManager-editingMoveMultipleItemsErrorMessage":"{0} items were not moved","dxFileManager-editingMoveCommonErrorMessage":"Some items were not moved","dxFileManager-editingCopySingleItemProcessingMessage":"Copying an item to {0}","dxFileManager-editingCopyMultipleItemsProcessingMessage":"Copying {0} items to {1}","dxFileManager-editingCopySingleItemSuccessMessage":"Copied an item to {0}","dxFileManager-editingCopyMultipleItemsSuccessMessage":"Copied {0} items to {1}","dxFileManager-editingCopySingleItemErrorMessage":"Item was not copied","dxFileManager-editingCopyMultipleItemsErrorMessage":"{0} items were not copied","dxFileManager-editingCopyCommonErrorMessage":"Some items were not copied","dxFileManager-editingUploadSingleItemProcessingMessage":"Uploading an item to {0}","dxFileManager-editingUploadMultipleItemsProcessingMessage":"Uploading {0} items to {1}","dxFileManager-editingUploadSingleItemSuccessMessage":"Uploaded an item to {0}","dxFileManager-editingUploadMultipleItemsSuccessMessage":"Uploaded {0} items to {1}","dxFileManager-editingUploadSingleItemErrorMessage":"Item was not uploaded","dxFileManager-editingUploadMultipleItemsErrorMessage":"{0} items were not uploaded","dxFileManager-editingUploadCanceledMessage":"Canceled","dxFileManager-listDetailsColumnCaptionName":"Name","dxFileManager-listDetailsColumnCaptionDateModified":"Date Modified","dxFileManager-listDetailsColumnCaptionFileSize":"File Size","dxFileManager-listThumbnailsTooltipTextSize":"Size","dxFileManager-listThumbnailsTooltipTextDateModified":"Date Modified","dxFileManager-notificationProgressPanelTitle":"Progress","dxFileManager-notificationProgressPanelEmptyListText":"No operations","dxFileManager-notificationProgressPanelOperationCanceled":"Canceled","dxDiagram-categoryGeneral":"General","dxDiagram-categoryFlowchart":"Flowchart","dxDiagram-categoryOrgChart":"Org Chart","dxDiagram-categoryContainers":"Containers","dxDiagram-categoryCustom":"Custom","dxDiagram-commandExportToSvg":"Export to SVG","dxDiagram-commandExportToPng":"Export to PNG","dxDiagram-commandExportToJpg":"Export to JPEG","dxDiagram-commandUndo":"Undo","dxDiagram-commandRedo":"Redo","dxDiagram-commandFontName":"Font Name","dxDiagram-commandFontSize":"Font Size","dxDiagram-commandBold":"Bold","dxDiagram-commandItalic":"Italic","dxDiagram-commandUnderline":"Underline","dxDiagram-commandTextColor":"Font Color","dxDiagram-commandLineColor":"Line Color","dxDiagram-commandLineWidth":"Line Width","dxDiagram-commandLineStyle":"Line Style","dxDiagram-commandLineStyleSolid":"Solid","dxDiagram-commandLineStyleDotted":"Dotted","dxDiagram-commandLineStyleDashed":"Dashed","dxDiagram-commandFillColor":"Fill Color","dxDiagram-commandAlignLeft":"Align Left","dxDiagram-commandAlignCenter":"Align Center","dxDiagram-commandAlignRight":"Align Right","dxDiagram-commandConnectorLineType":"Connector Line Type","dxDiagram-commandConnectorLineStraight":"Straight","dxDiagram-commandConnectorLineOrthogonal":"Orthogonal","dxDiagram-commandConnectorLineStart":"Connector Line Start","dxDiagram-commandConnectorLineEnd":"Connector Line End","dxDiagram-commandConnectorLineNone":"None","dxDiagram-commandConnectorLineArrow":"Arrow","dxDiagram-commandFullscreen":"Full Screen","dxDiagram-commandUnits":"Units","dxDiagram-commandPageSize":"Page Size","dxDiagram-commandPageOrientation":"Page Orientation","dxDiagram-commandPageOrientationLandscape":"Landscape","dxDiagram-commandPageOrientationPortrait":"Portrait","dxDiagram-commandPageColor":"Page Color","dxDiagram-commandShowGrid":"Show Grid","dxDiagram-commandSnapToGrid":"Snap to Grid","dxDiagram-commandGridSize":"Grid Size","dxDiagram-commandZoomLevel":"Zoom Level","dxDiagram-commandAutoZoom":"Auto Zoom","dxDiagram-commandFitToContent":"Fit to Content","dxDiagram-commandFitToWidth":"Fit to Width","dxDiagram-commandAutoZoomByContent":"Auto Zoom by Content","dxDiagram-commandAutoZoomByWidth":"Auto Zoom by Width","dxDiagram-commandSimpleView":"Simple View","dxDiagram-commandCut":"Cut","dxDiagram-commandCopy":"Copy","dxDiagram-commandPaste":"Paste","dxDiagram-commandSelectAll":"Select All","dxDiagram-commandDelete":"Delete","dxDiagram-commandBringToFront":"Bring to Front","dxDiagram-commandSendToBack":"Send to Back","dxDiagram-commandLock":"Lock","dxDiagram-commandUnlock":"Unlock","dxDiagram-commandInsertShapeImage":"Insert Image...","dxDiagram-commandEditShapeImage":"Change Image...","dxDiagram-commandDeleteShapeImage":"Delete Image","dxDiagram-commandLayoutLeftToRight":"Left-to-right","dxDiagram-commandLayoutRightToLeft":"Right-to-left","dxDiagram-commandLayoutTopToBottom":"Top-to-bottom","dxDiagram-commandLayoutBottomToTop":"Bottom-to-top","dxDiagram-unitIn":"in","dxDiagram-unitCm":"cm","dxDiagram-unitPx":"px","dxDiagram-dialogButtonOK":"OK","dxDiagram-dialogButtonCancel":"Cancel","dxDiagram-dialogInsertShapeImageTitle":"Insert Image","dxDiagram-dialogEditShapeImageTitle":"Change Image","dxDiagram-dialogEditShapeImageSelectButton":"Select image","dxDiagram-dialogEditShapeImageLabelText":"or drop a file here","dxDiagram-uiExport":"Export","dxDiagram-uiProperties":"Properties","dxDiagram-uiSettings":"Settings","dxDiagram-uiShowToolbox":"Show Toolbox","dxDiagram-uiSearch":"Search","dxDiagram-uiStyle":"Style","dxDiagram-uiLayout":"Layout","dxDiagram-uiLayoutTree":"Tree","dxDiagram-uiLayoutLayered":"Layered","dxDiagram-uiDiagram":"Diagram","dxDiagram-uiText":"Text","dxDiagram-uiObject":"Object","dxDiagram-uiConnector":"Connector","dxDiagram-uiPage":"Page","dxDiagram-shapeText":"Text","dxDiagram-shapeRectangle":"Rectangle","dxDiagram-shapeEllipse":"Ellipse","dxDiagram-shapeCross":"Cross","dxDiagram-shapeTriangle":"Triangle","dxDiagram-shapeDiamond":"Diamond","dxDiagram-shapeHeart":"Heart","dxDiagram-shapePentagon":"Pentagon","dxDiagram-shapeHexagon":"Hexagon","dxDiagram-shapeOctagon":"Octagon","dxDiagram-shapeStar":"Star","dxDiagram-shapeArrowLeft":"Left Arrow","dxDiagram-shapeArrowUp":"Up Arrow","dxDiagram-shapeArrowRight":"Right Arrow","dxDiagram-shapeArrowDown":"Down Arrow","dxDiagram-shapeArrowUpDown":"Up Down Arrow","dxDiagram-shapeArrowLeftRight":"Left Right Arrow","dxDiagram-shapeProcess":"Process","dxDiagram-shapeDecision":"Decision","dxDiagram-shapeTerminator":"Terminator","dxDiagram-shapePredefinedProcess":"Predefined Process","dxDiagram-shapeDocument":"Document","dxDiagram-shapeMultipleDocuments":"Multiple Documents","dxDiagram-shapeManualInput":"Manual Input","dxDiagram-shapePreparation":"Preparation","dxDiagram-shapeData":"Data","dxDiagram-shapeDatabase":"Database","dxDiagram-shapeHardDisk":"Hard Disk","dxDiagram-shapeInternalStorage":"Internal Storage","dxDiagram-shapePaperTape":"Paper Tape","dxDiagram-shapeManualOperation":"Manual Operation","dxDiagram-shapeDelay":"Delay","dxDiagram-shapeStoredData":"Stored Data","dxDiagram-shapeDisplay":"Display","dxDiagram-shapeMerge":"Merge","dxDiagram-shapeConnector":"Connector","dxDiagram-shapeOr":"Or","dxDiagram-shapeSummingJunction":"Summing Junction","dxDiagram-shapeContainerDefaultText":"Container","dxDiagram-shapeVerticalContainer":"Vertical Container","dxDiagram-shapeHorizontalContainer":"Horizontal Container","dxDiagram-shapeCardDefaultText":"Person's Name","dxDiagram-shapeCardWithImageOnLeft":"Card with Image on the Left","dxDiagram-shapeCardWithImageOnTop":"Card with Image on the Top","dxDiagram-shapeCardWithImageOnRight":"Card with Image on the Right","dxGantt-dialogTitle":"Title","dxGantt-dialogStartTitle":"Start","dxGantt-dialogEndTitle":"End","dxGantt-dialogProgressTitle":"Progress","dxGantt-dialogResourcesTitle":"Resources","dxGantt-dialogResourceManagerTitle":"Resource Manager","dxGantt-dialogTaskDetailsTitle":"Task Details","dxGantt-dialogEditResourceListHint":"Edit Resource List","dxGantt-dialogEditNoResources":"No resources","dxGantt-dialogButtonAdd":"Add","dxGantt-contextMenuNewTask":"New Task","dxGantt-contextMenuNewSubtask":"New Subtask","dxGantt-contextMenuDeleteTask":"Delete Task","dxGantt-contextMenuDeleteDependency":"Delete Dependency","dxGantt-dialogTaskDeleteConfirmation":"Deleting a task also deletes all its dependencies and subtasks. Are you sure you want to delete this task?","dxGantt-dialogDependencyDeleteConfirmation":"Are you sure you want to delete the dependency from the task?","dxGantt-dialogResourcesDeleteConfirmation":"Deleting a resource also deletes it from tasks to which this resource is assigned. Are you sure you want to delete these resources? Resources: {0}","dxGantt-dialogConstraintCriticalViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationMessage":"The task you are attempting to move is linked to a second task by a dependency relation. How would you like to proceed?","dxGantt-dialogCancelOperationMessage":"Cancel the operation","dxGantt-dialogDeleteDependencyMessage":"Delete the dependency","dxGantt-dialogMoveTaskAndKeepDependencyMessage":"Move the task and keep the dependency","dxGantt-dialogConstraintCriticalViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. This change would conflict with dependency rules. How would you like to proceed?","dxGantt-dialogConstraintViolationSeveralTasksMessage":"The task you are attempting to move is linked to another tasks by dependency relations. How would you like to proceed?","dxGantt-dialogDeleteDependenciesMessage":"Delete the dependency relations","dxGantt-dialogMoveTaskAndKeepDependenciesMessage":"Move the task and keep the dependencies","dxGantt-undo":"Undo","dxGantt-redo":"Redo","dxGantt-expandAll":"Expand All","dxGantt-collapseAll":"Collapse All","dxGantt-addNewTask":"Add New Task","dxGantt-deleteSelectedTask":"Delete Selected Task","dxGantt-zoomIn":"Zoom In","dxGantt-zoomOut":"Zoom Out","dxGantt-fullScreen":"Full Screen","dxGantt-quarter":"Q{0}","dxGantt-sortingAscendingText":"Sort Ascending","dxGantt-sortingDescendingText":"Sort Descending","dxGantt-sortingClearText":"Clear Sorting","dxGantt-showResources":"Show Resources","dxGantt-showDependencies":"Show Dependencies","dxGantt-dialogStartDateValidation":"Start date must be after {0}","dxGantt-dialogEndDateValidation":"End date must be after {0}"}},YN=O(!0,{},qN),XN=(e,t)=>e[t]||{},Mf={},ue=kn({engine:function(){return"base"},_dictionary:YN,load:function(e){O(!0,this._dictionary,e)},_localizablePrefix:"@",setup:function(e){this._localizablePrefix=e},localizeString:function(e){var t=this,i=new RegExp("(^|[^a-zA-Z_0-9"+t._localizablePrefix+"-]+)("+t._localizablePrefix+"{1,2})([a-zA-Z_0-9-]+)","g"),n=t._localizablePrefix+t._localizablePrefix;return e.replace(i,(r,a,o,s)=>{var l=t._localizablePrefix+s,u;return o!==n&&(u=t.format(s)),u||(Mf[s]=QM(s)),a+(u||l)})},getMessagesByLocales:function(){return this._dictionary},getDictionary:function(e){return e?Mf:O({},Mf,this.getMessagesByLocales()[pn.locale()])},getFormatter:function(e){return this._getFormatterBase(e)||this._getFormatterBase(e,"en")},_getFormatterBase:function(e,t){var i=pn.getValueByClosestLocale(n=>XN(this._dictionary,n)[e]);if(i)return function(){var n=arguments.length===1&&Array.isArray(arguments[0])?arguments[0].slice(0):Array.prototype.slice.call(arguments,0);return n.unshift(i),Hr.apply(this,n)}},format:function(e){var t=this.getFormatter(e),i=Array.prototype.slice.call(arguments,1);return t&&t.apply(this,i)||""}}),cs=new dt;const Je=Ng(_t.ERROR_MESSAGES,{E1001:"Module '{0}'. Controller '{1}' is already registered",E1002:"Module '{0}'. Controller '{1}' does not inherit from DevExpress.ui.dxDataGrid.Controller",E1003:"Module '{0}'. View '{1}' is already registered",E1004:"Module '{0}'. View '{1}' does not inherit from DevExpress.ui.dxDataGrid.View",E1005:"Public method '{0}' is already registered",E1006:"Public method '{0}.{1}' does not exist",E1007:"State storing cannot be provided due to the restrictions of the browser",E1010:"The template does not contain the TextBox widget",E1011:'Items cannot be deleted from the List. Implement the "remove" function in the data store',E1012:"Editing type '{0}' with the name '{1}' is unsupported",E1016:"Unexpected type of data source is provided for a lookup column",E1018:"The 'collapseAll' method cannot be called if you use a remote data source",E1019:"Search mode '{0}' is unavailable",E1020:"The type cannot be changed after initialization",E1021:"{0} '{1}' you are trying to remove does not exist",E1022:'The "markers" option is given an invalid value. Assign an array instead',E1023:'The "routes" option is given an invalid value. Assign an array instead',E1025:"This layout is too complex to render",E1026:'The "calculateCustomSummary" function is missing from a field whose "summaryType" option is set to "custom"',E1031:"Unknown subscription in the Scheduler widget: '{0}'",E1032:"Unknown start date in an appointment: '{0}'",E1033:"Unknown step in the date navigator: '{0}'",E1034:"The browser does not implement an API for saving files",E1035:"The editor cannot be created because of an internal error: {0}",E1037:"Invalid structure of grouped data",E1038:"The browser does not support local storages for local web pages",E1039:"A cell's position cannot be calculated",E1040:"The '{0}' key value is not unique within the data array",E1041:"The '{0}' script is referenced after the DevExtreme scripts or not referenced at all",E1042:"{0} requires the key field to be specified",E1043:"Changes cannot be processed due to the incorrectly set key",E1044:"The key field specified by the keyExpr option does not match the key field specified in the data store",E1045:"Editing requires the key field to be specified in the data store",E1046:"The '{0}' key field is not found in data objects",E1047:'The "{0}" field is not found in the fields array',E1048:'The "{0}" operation is not found in the filterOperations array',E1049:"Column '{0}': filtering is allowed but the 'dataField' or 'name' option is not specified",E1050:"The validationRules option does not apply to third-party editors defined in the editCellTemplate",E1051:`HtmlEditor's valueType is "{0}", but the {0} converter was not imported.`,E1052:'{0} should have the "dataSource" option specified',E1053:'The "buttons" option accepts an array that contains only objects or string values',E1054:"All text editor buttons must have names",E1055:'One or several text editor buttons have invalid or non-unique "name" values',E1056:'The {0} widget does not support buttons of the "{1}" type',E1058:'The "startDayHour" must be earlier than the "endDayHour"',E1059:"The following column names are not unique: {0}",E1060:"All editable columns must have names",W1001:'The "key" option cannot be modified after initialization',W1002:"An item with the key '{0}' does not exist",W1003:"A group with the key '{0}' in which you are trying to select items does not exist",W1004:"The item '{0}' you are trying to select in the group '{1}' does not exist",W1005:"Due to column data types being unspecified, data has been loaded twice in order to apply initial filter settings. To resolve this issue, specify data types for all grid columns.",W1006:"The map service returned the following error: '{0}'",W1007:"No item with key {0} was found in the data source, but this key was used as the parent key for item {1}",W1008:"Cannot scroll to the '{0}' date because it does not exist on the current view",W1009:"Searching works only if data is specified using the dataSource option",W1010:"The capability to select all items works with source data of plain structure only",W1011:'The "keyExpr" option is not applied when dataSource is not an array',W1012:"The '{0}' key field is not found in data objects",W1013:'The "message" field in the dialog component was renamed to "messageHtml". Change your code correspondingly. In addition, if you used HTML code in the message, make sure that it is secure',W1014:"The Floating Action Button exceeds the recommended speed dial action count. If you need to display more speed dial actions, increase the maxSpeedDialActionCount option value in the global config.",W1015:'The "cellDuration" should divide the range from the "startDayHour" to the "endDayHour" into even intervals',W1016:"The '{0}' field in the HTML Editor toolbar item configuration was renamed to '{1}'. Please make a corresponding change in your code.",W1017:"The 'key' property is not specified for a lookup data source. Please specify it to prevent requests for the entire dataset when users filter data.",W1018:"Infinite scrolling may not work properly with multiple selection. To use these features together, set 'selection.deferred' to true or set 'selection.selectAllMode' to 'page'.",W1019:"Filter query string exceeds maximum length limit of {0} characters.",W1020:"hideEvent is ignored when the shading property is true"});var BT=qe(),ZN=cr.add,QN=va,JN=Rh,au=new te,LT="link[rel=dx-theme]",eH="data-theme",tH="data-active",Fy="dx-hairlines",PT="any",Rr,A_,kr,sn,oa,My=15e3,Vf="dx.";function hm(){if(!Ke())return null;var e=v("<div>",Rr).addClass("dx-theme-marker").appendTo(Rr.documentElement),t;try{return t=BT.getComputedStyle(e.get(0)).fontFamily,!t||(t=t.replace(/["']/g,""),t.substr(0,Vf.length)!==Vf)?null:t.substr(Vf.length)}finally{e.remove()}}function Vy(e){var t,i,n=!0;oa=e;function r(){oa=null,clearInterval(i),n=!0,cs.fire(),cs.empty(),au.resolve()}if(Ny()||!My)r();else{if(!n){oa&&(oa=e);return}t=Date.now(),n=!1,i=setInterval(function(){var a=Ny(),o=!a&&Date.now()-t>My;o&&Je.log("W0004",oa),(a||o)&&r()},10)}}function Ny(){if(!oa)return!0;var e=oa===PT;if(au.state()==="resolved"&&e)return!0;var t=hm();return t&&e?!0:t===oa}function iH(){var e=v(LT,Rr);e.length&&(kr={},A_=v(Jg("<link rel=stylesheet>"),Rr),e.each(function(){var t=v(this,Rr),i=t.attr(eH),n=t.attr("href"),r=t.attr(tH)==="true";kr[i]={url:n,isActive:r}}),e.last().after(A_),e.remove())}function nH(e){var t=e?e.split("."):[],i=null;if(kr){if(e in kr)return e;F(kr,function(n,r){var a=n.split(".");if(!(t[0]&&a[0]!==t[0])&&!(t[1]&&t[1]!==a[1])&&!(t[2]&&t[2]!==a[2])&&((!i||r.isActive)&&(i=n),r.isActive))return!1})}return i}function rH(e){try{e!==Rr&&(kr=null)}catch{kr=null}Rr=e}function FT(e){e=e||{},rH(e.context||fe.getDocument()),Rr&&(iH(),sn=void 0,Un(e))}function Un(e){if(!arguments.length)return sn=sn||hm(),sn;VT(QN()),e=e||{},typeof e=="string"&&(e={theme:e});var t=e._autoInit,i=e.loadCallback,n;if(sn=nH(e.theme||sn),sn&&(n=kr[sn]),i&&cs.add(i),n)A_.attr("href",kr[sn].url),(cs.has()||au.state()!=="resolved"||e._forceTimeout)&&Vy(sn);else if(t)Ke()&&Vy(PT),cs.fire(),cs.empty();else throw Je.Error("E0021",sn);au.done(()=>MT(oT(),sn))}function aH(e){e=e||Un();var t=[],i=e&&e.split(".");return i&&(t.push("dx-theme-"+i[0],"dx-theme-"+i[0]+"-typography"),i.length>1&&t.push("dx-color-scheme-"+i[1]+(Qt(e)?"-"+i[2]:""))),t}var gc;function MT(e,t){gc=aH(t).join(" "),v(e).addClass(gc),function(){var i=Ke()&&BT.devicePixelRatio;if(!(!i||i<2)){var n=v("<div>");n.css("border",".5px solid transparent"),v("body").append(n),at(n)===1&&(v(e).addClass(Fy),gc+=" "+Fy),n.remove()}}()}function VT(e){v(e).removeClass(gc)}function fm(e,t){return t||(t=sn||hm()),new RegExp(e).test(t)}function Qt(e){return fm("material",e)}function NT(e){return fm("generic",e)}function oH(e){return fm("compact",e)}function sH(e,t){var i=fe.getDocument(),n=i.createElement("span");n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.style.visibility="hidden",n.style.fontFamily="Arial",n.style.fontSize="250px",n.style.fontWeight=t,n.innerHTML=e,i.body.appendChild(n);var r=n.offsetWidth;n.style.fontFamily="Roboto, RobotoFallback, Arial";var a=n.offsetWidth;return n.parentNode.removeChild(n),r!==a}function lH(e,t){return new Promise(i=>{var n=()=>{clearInterval(r),clearTimeout(a),i()},r=setInterval(()=>{sH(e,t)&&n()},15),a=setTimeout(n,2e3)})}function Hy(){if(FT({_autoInit:!0,_forceTimeout:!0}),v(LT,Rr).length)throw Je.Error("E0022")}Ke()?Hy():ZN(Hy);JN.add(function(e,t){au.done(function(){VT(t),MT(e)})});Oe.changed.add(function(){FT({_autoInit:!0})});var uH=Su(),dH="dx-loadindicator",cH="dx-loadindicator-wrapper",hH="dx-loadindicator-content",fH="dx-loadindicator-icon",$y="dx-loadindicator-segment",pH="dx-loadindicator-segment-inner",vH="dx-loadindicator-image",dn=pi.inherit({_getDefaultOptions:function(){return O(this.callBase(),{indicatorSrc:"",activeStateEnabled:!1,hoverStateEnabled:!1,_animatingSegmentCount:1,_animatingSegmentInner:!1})},_defaultOptionsRules:function(){var e=Un();return this.callBase().concat([{device:function(){var t=Oe.real(),i=t.platform==="android"&&!/chrome/i.test(uH.userAgent);return i},options:{viaImage:!0}},{device:function(){return Qt(e)},options:{_animatingSegmentCount:2,_animatingSegmentInner:!0}},{device:function(){return NT(e)},options:{_animatingSegmentCount:7}}])},_useTemplates:function(){return!1},_init:function(){this.callBase(),this.$element().addClass(dH)},_initMarkup:function(){this.callBase(),this._renderWrapper(),this._renderIndicatorContent(),this._renderMarkup()},_renderWrapper:function(){this._$wrapper=v("<div>").addClass(cH),this.$element().append(this._$wrapper)},_renderIndicatorContent:function(){this._$content=v("<div>").addClass(hH),this._$wrapper.append(this._$content)},_renderMarkup:function(){wT()&&!this.option("viaImage")&&!this.option("indicatorSrc")?this._renderMarkupForAnimation():this._renderMarkupForImage()},_renderMarkupForAnimation:function(){var e=this.option("_animatingSegmentInner");this._$indicator=v("<div>").addClass(fH),this._$content.append(this._$indicator);for(var t=this.option("_animatingSegmentCount");t>=0;--t){var i=v("<div>").addClass($y).addClass($y+t);e&&i.append(v("<div>").addClass(pH)),this._$indicator.append(i)}},_renderMarkupForImage:function(){var e=this.option("indicatorSrc");this._$wrapper.addClass(vH),e&&this._$wrapper.css("backgroundImage","url("+e+")")},_renderDimensions:function(){this.callBase(),this._updateContentSizeForAnimation()},_updateContentSizeForAnimation:function(){if(this._$indicator){var e=this.option("width"),t=this.option("height");if(e||t){e=$e(this.$element()),t=je(this.$element());var i=Math.min(t,e);this._$wrapper.css({height:i,width:i,fontSize:i})}}},_clean:function(){this.callBase(),this._removeMarkupForAnimation(),this._removeMarkupForImage()},_removeMarkupForAnimation:function(){this._$indicator&&(this._$indicator.remove(),delete this._$indicator)},_removeMarkupForImage:function(){this._$wrapper.css("backgroundImage","none")},_optionChanged:function(e){switch(e.name){case"_animatingSegmentCount":case"_animatingSegmentInner":case"indicatorSrc":this._invalidate();break;default:this.callBase(e)}}});tt("dxLoadIndicator",dn);var pm="dxTranslator",_H=/matrix(3d)?\((.+?)\)/,gH=/translate(?:3d)?\((.+?)\)/,In=function(e){e=v(e);var t=qc(e);return{left:t.x,top:t.y}};function jc(e){return On(e)==="string"&&e[e.length-1]==="%"}function HT(e,t){e.length&&Mt(e.get(0),pm,t)}var vm=function(e){e.length&&Oh(e.get(0),pm)},Ou=function(e){e.x=e.x||0,e.y=e.y||0;var t=jc(e.x)?e.x:e.x+"px",i=jc(e.y)?e.y:e.y+"px";return"translate("+t+", "+i+")"},qc=function(e){var t=e.length?Mt(e.get(0),pm):null;if(!t){var i=e.css("transform")||Ou({x:0,y:0}),n=i.match(_H),r=n&&n[1];n?(n=n[2].split(","),r==="3d"?n=n.slice(12,15):(n.push(0),n=n.slice(4,7))):n=[0,0,0],t={x:parseFloat(n[0]),y:parseFloat(n[1]),z:parseFloat(n[2])},HT(e,t)}return t},ti=function(e,t){e=v(e);var i=t.left,n=t.top,r;i===void 0?(r=qc(e),r.y=n||0):n===void 0?(r=qc(e),r.x=i||0):(r={x:i||0,y:n||0,z:0},HT(e,r)),e.css({transform:Ou(r)}),(jc(i)||jc(n))&&vm(e)},Ru=function(e,t){e=v(e);var i,n={left:0,top:0,transform:"none"};t&&(i=e.css("transition"),n.transition="none"),e.css(n),vm(e),t&&(e.get(0).offsetHeight,e.css("transition",i))},mH=function(e){var t=e.match(gH);if(!(!t||!t[1]))return t=t[1].split(","),t={x:parseFloat(t[0]),y:parseFloat(t[1]),z:parseFloat(t[2])},t},Wy=/cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/,zy={linear:"cubic-bezier(0, 0, 1, 1)",swing:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)"},CH=function(e,t,i,n){var r=3*e,a=3*(i-e)-r,o=1-r-a,s=3*t,l=3*(n-t)-s,u=1-s-l,d=function(h){return h*(r+h*(a+h*o))},c=function(h){return r+h*(2*a+3*h*o)};return function(h){return function(f){return f*(s+f*(l+f*u))}(function(f){for(var p=f,g=0,m;g<14&&(m=d(p)-f,!(Math.abs(m)<.001));)p-=m/c(p),g++;return p}(h))}},D_={},yH=function(e){e=zy[e]||e;var t=e.match(Wy),i;t||(i="linear",t=zy[i].match(Wy)),t=t.slice(1,5);for(var n=0;n<t.length;n++)t[n]=parseFloat(t[n]);var r=i||"cubicbezier_"+t.join("_").replace(/\./g,"p");return Ee(D_[r])||(D_[r]=function(a,o,s,l,u){return l*CH(t[0],t[1],t[2],t[3])(o/u)+s}),r};function xH(e){return D_[e]}var Gy=qe(),bH=/left|right/,SH=/top|bottom/,Uy=/fit|flip|none/,EH=/scale\(.+?\)/,wH=Bt.safari,O_=function(e){var t={h:"center",v:"center"},i=Eo(e);return i&&F(i,function(){var n=String(this).toLowerCase();bH.test(n)?t.h=n:SH.test(n)&&(t.v=n)}),t},Ky=function(e){return Dh(e)},IH=function(e){var t=Eo(e),i=String(t&&t[0]).toLowerCase(),n=String(t&&t[1]).toLowerCase();return Uy.test(i)||(i="none"),Uy.test(n)||(n=i),{h:i,v:n}},jy=function(e){switch(e){case"center":return .5;case"right":case"bottom":return 1;default:return 0}},R_=function(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return e}},k_=function(e,t){var i=0;return e.myLocation<t.min&&(i+=t.min-e.myLocation),e.myLocation>t.max&&(i+=e.myLocation-t.max),i},qy=function(e,t,i){return t.myLocation<i.min?e==="h"?"left":"top":t.myLocation>i.max?e==="h"?"right":"bottom":"none"},B_=function(e){e.myLocation=e.atLocation+jy(e.atAlign)*e.atSize-jy(e.myAlign)*e.mySize+e.offset},cd={fit:function(e,t){var i=!1;e.myLocation>t.max&&(e.myLocation=t.max,i=!0),e.myLocation<t.min&&(e.myLocation=t.min,i=!0),e.fit=i},flip:function(e,t){if(e.flip=!1,!(e.myAlign==="center"&&e.atAlign==="center")&&(e.myLocation<t.min||e.myLocation>t.max)){var i=O({},e,{myAlign:R_(e.myAlign),atAlign:R_(e.atAlign),offset:-e.offset});B_(i),i.oversize=k_(i,t),(i.myLocation>=t.min&&i.myLocation<=t.max||e.oversize>i.oversize)&&(e.myLocation=i.myLocation,e.oversize=i.oversize,e.flip=!0)}},flipfit:function(e,t){this.flip(e,t),this.fit(e,t)},none:function(e){e.oversize=0}},$T,WT=function(){var e=v("<div>").css({width:100,height:100,overflow:"scroll",position:"absolute",top:-9999}).appendTo(v("body")),t=e.get(0).offsetWidth-e.get(0).clientWidth;e.remove(),$T=t},TH={h:{location:0,flip:!1,fit:!1,oversize:0},v:{location:0,flip:!1,fit:!1,oversize:0}},zT=function(e,t){var i=v(e),n=i.offset(),r=O(!0,{},TH,{h:{location:n.left},v:{location:n.top}});if(!t)return r;var a=O_(t.my),o=O_(t.at),s=v(t.of).length&&t.of||Gy,l=Ky(t.offset),u=IH(t.collision),d=t.boundary,c=Ky(t.boundaryOffset),h={mySize:lt(i),myAlign:a.h,atAlign:o.h,offset:l.h,collision:u.h,boundaryOffset:c.h},f={mySize:at(i),myAlign:a.v,atAlign:o.v,offset:l.v,collision:u.v,boundaryOffset:c.v};if(s.preventDefault)h.atLocation=s.pageX,f.atLocation=s.pageY,h.atSize=0,f.atSize=0;else if(s=v(s),Yt(s[0]))h.atLocation=s.scrollLeft(),f.atLocation=s.scrollTop(),Oe.real().deviceType==="phone"&&s[0].visualViewport?(h.atLocation=Math.max(h.atLocation,s[0].visualViewport.offsetLeft),f.atLocation=Math.max(f.atLocation,s[0].visualViewport.offsetTop),h.atSize=s[0].visualViewport.width,f.atSize=s[0].visualViewport.height):(h.atSize=s[0].innerWidth>s[0].outerWidth?s[0].innerWidth:$e(s),f.atSize=s[0].innerHeight>s[0].outerHeight||wH?s[0].innerHeight:je(s));else if(s[0].nodeType===9)h.atLocation=0,f.atLocation=0,h.atSize=$e(s),f.atSize=je(s);else{var p=Gt(s.get(0)),g=GT(s);h.atLocation=g.left,f.atLocation=g.top,h.atSize=Math.max(p.width,lt(s)),f.atSize=Math.max(p.height,at(s))}B_(h),B_(f);var m=function(){var x=v(Gy),T=$e(x),R=je(x),A=x.scrollLeft(),H=x.scrollTop(),$=fe.getDocumentElement(),V=fo?$.clientWidth/T:1,U=fo?$.clientHeight/R:1;$T===void 0&&WT();var K=T,X=R;if(d){var M=v(d),q=M.offset();A=q.left,H=q.top,K=$e(M),X=je(M)}return{h:{min:A+h.boundaryOffset,max:A+K/V-h.mySize-h.boundaryOffset},v:{min:H+f.boundaryOffset,max:H+X/U-f.mySize-f.boundaryOffset}}}();h.oversize=k_(h,m.h),f.oversize=k_(f,m.v),h.collisionSide=qy("h",h,m.h),f.collisionSide=qy("v",f,m.v),cd[h.collision]&&cd[h.collision](h,m.h),cd[f.collision]&&cd[f.collision](f,m.v);var C=function(x){return t.precise?x:Math.round(x)};return O(!0,r,{h:{location:C(h.myLocation),oversize:C(h.oversize),fit:h.fit,flip:h.flip,collisionSide:h.collisionSide},v:{location:C(f.myLocation),oversize:C(f.oversize),fit:f.fit,flip:f.flip,collisionSide:f.collisionSide},precise:t.precise}),r},Yy=function(e,t,i,n,r){var a=E(e.style)&&!fe.isNode(e.style);a?e.style.transform=r?i.replace(t,""):i:e.setAttribute("style",r?n.replace(t,""):n)},GT=function e(t){var i,n,r,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,o=a.get(0);if(!o)return t.offset();var s=((i=o.getAttribute)===null||i===void 0?void 0:i.call(o,"style"))||"",l=(n=o.style)===null||n===void 0?void 0:n.transform,u=(r=s.match(EH))===null||r===void 0?void 0:r[0],d;return u?(Yy(o,u,l,s,!0),d=e(t,a.parent()),Yy(o,u,l,s,!1)):d=e(t,a.parent()),d},ou=function(e,t){var i=v(e);if(!t)return i.offset();Ru(i,!0);var n=GT(i),r=t.h&&t.v?t:zT(i,t),a=function(o){return t.precise?o:Math.round(o)};return ti(i,{left:r.h.location-a(n.left),top:r.v.location-a(n.top)}),r},AH=function(e){return e=v(e).get(0),Yt(e)?null:e&&"pageY"in e&&"pageX"in e?{top:e.pageY,left:e.pageX}:v(e).offset()};ou.inverseAlign||(ou.inverseAlign=R_);ou.normalizeAlign||(ou.normalizeAlign=O_);const mi={calculateScrollbarWidth:WT,calculate:zT,setup:ou,offset:AH};var UT=qe(),Wl=me(dr,"dxFX"),DH=/^([+-])=(.*)/i,su="dxAnimData",_m="dxAnimQueue",Vn="transform",OH={initAnimation:function(e,t){e.css({transitionProperty:"none"}),typeof t.from=="string"?e.addClass(t.from):P_(e,t.from);var i=this,n=new te,r=t.cleanupWhen;t.transitionAnimation={deferred:n,finish:function(){i._finishTransition(e),r?Ae(n,r).always(function(){i._cleanup(e,t)}):i._cleanup(e,t),n.resolveWith(e,[t,e])}},this._completeAnimationCallback(e,t).done(function(){t.transitionAnimation.finish()}).fail(function(){n.rejectWith(e,[t,e])}),t.duration||t.transitionAnimation.finish(),e.css("transform")},animate:function(e,t){return this._startAnimation(e,t),t.transitionAnimation.deferred.promise()},_completeAnimationCallback:function(e,t){var i=this,n=Date.now()+t.delay,r=new te,a=new te,o=new te,s,l=ET()+".dxFX";t.transitionAnimation.cleanup=function(){clearTimeout(s),clearTimeout(u),D.off(e,l),D.off(e,Wl)},D.one(e,l,function(){Date.now()-n>=t.duration&&a.reject()}),D.off(e,Wl),D.on(e,Wl,function(){i.stop(e,t),r.reject()});var u=setTimeout(function(){s=setTimeout(function(){o.reject()},t.duration+t.delay+$t._simulatedTransitionEndDelay),Ae(a,o).fail((function(){r.resolve()}).bind(this))});return r.promise()},_startAnimation:function(e,t){e.css({transitionProperty:"all",transitionDelay:t.delay+"ms",transitionDuration:t.duration+"ms",transitionTimingFunction:t.easing}),typeof t.to=="string"?e[0].className+=" "+t.to:t.to&&P_(e,t.to)},_finishTransition:function(e){e.css("transition","none")},_cleanup:function(e,t){t.transitionAnimation.cleanup(),typeof t.from=="string"&&(e.removeClass(t.from),e.removeClass(t.to))},stop:function(e,t,i){t&&(i?t.transitionAnimation.finish():(Ye(t.to)&&F(t.to,function(n){e.css(n,e.css(n))}),this._finishTransition(e),this._cleanup(e,t)))}},Xy={initAnimation:function(e,t){P_(e,t.from)},animate:function(e,t){var i=new te,n=this;return t?(F(t.to,function(r){t.from[r]===void 0&&(t.from[r]=n._normalizeValue(e.css(r)))}),t.to[Vn]&&(t.from[Vn]=n._parseTransform(t.from[Vn]),t.to[Vn]=n._parseTransform(t.to[Vn])),t.frameAnimation={to:t.to,from:t.from,currentValue:t.from,easing:yH(t.easing),duration:t.duration,startTime:new Date().valueOf(),finish:function(){this.currentValue=this.to,this.draw(),rr(t.frameAnimation.animationFrameId),i.resolve()},draw:function(){if(t.draw){t.draw(this.currentValue);return}var r=O({},this.currentValue);r[Vn]&&(r[Vn]=Jt(r[Vn],function(a,o){if(o==="translate")return Ou(a);if(o==="scale")return"scale("+a+")";if(o.substr(0,o.length-1)==="rotate")return o+"("+a+"deg)"}).join(" ")),e.css(r)}},t.delay?(t.frameAnimation.startTime+=t.delay,t.frameAnimation.delayTimeout=setTimeout(function(){n._startAnimation(e,t)},t.delay)):n._startAnimation(e,t),i.promise()):i.reject().promise()},_startAnimation:function(e,t){D.off(e,Wl),D.on(e,Wl,function(){t.frameAnimation&&rr(t.frameAnimation.animationFrameId)}),this._animationStep(e,t)},_parseTransform:function(e){var t={};return F(e.match(/\w+\d*\w*\([^)]*\)\s*/g),function(i,n){var r=mH(n),a=n.match(/scale\((.+?)\)/),o=n.match(/(rotate.)\((.+)deg\)/);r&&(t.translate=r),a&&a[1]&&(t.scale=parseFloat(a[1])),o&&o[1]&&(t[o[1]]=parseFloat(o[2]))}),t},stop:function(e,t,i){var n=t&&t.frameAnimation;n&&(rr(n.animationFrameId),clearTimeout(n.delayTimeout),i&&n.finish(),delete t.frameAnimation)},_animationStep:function(e,t){var i=t&&t.frameAnimation;if(i){var n=new Date().valueOf();if(n>=i.startTime+i.duration){i.finish();return}i.currentValue=this._calcStepValue(i,n-i.startTime),i.draw();var r=this;i.animationFrameId=ru(function(){r._animationStep(e,t)})}},_calcStepValue:function(e,t){return function i(n,r){var a=Array.isArray(r)?[]:{};return F(r,function(o,s){if(typeof s=="string"&&parseFloat(s,10)===!1)return!0;a[o]=typeof s=="object"?i(n[o],s):function(l){var u=t/e.duration,d=t,c=1*n[l],h=r[l]-n[l],f=e.duration;return xH(e.easing)(u,d,c,h,f)}(o)}),a}(e.from,e.to)},_normalizeValue:function(e){var t=parseFloat(e,10);return t===!1?e:t}},RH={initAnimation:function(){},animate:function(){return new te().resolve().promise()},stop:ee,isSynchronous:!0},kH=function(e){e=e||{};var t={transition:b_()?OH:Xy,frame:Xy,noAnimation:RH},i=e.strategy||"transition";return e.type==="css"&&!b_()&&(i="noAnimation"),t[i]},KT=function(e,t,i,n){F(["from","to"],function(){if(!i(e[this]))throw _t.Error("E0010",t,this,n)})},jT=function(e,t){return KT(e,t,function(i){return Ye(i)},"a plain object")},BH=function(e,t){return KT(e,t,function(i){return typeof i=="string"},"a string")},LH={setup:function(){}},PH={validateConfig:function(e){BH(e,"css")},setup:function(){}},FH={top:{my:"bottom center",at:"top center"},bottom:{my:"top center",at:"bottom center"},right:{my:"left center",at:"right center"},left:{my:"right center",at:"left center"}},Nf={validateConfig:function(e){jT(e,"slide")},setup:function(e,t){var i=In(e);if(t.type!=="slide"){var n=t.type==="slideIn"?t.from:t.to;n.position=O({of:UT},FH[t.direction]),L_(e,n)}this._setUpConfig(i,t.from),this._setUpConfig(i,t.to),vm(e)},_setUpConfig:function(e,t){t.left="left"in t?t.left:"+=0",t.top="top"in t?t.top:"+=0",this._initNewPosition(e,t)},_initNewPosition:function(e,t){var i={left:t.left,top:t.top};delete t.left,delete t.top;var n=this._getRelativeValue(i.left);n!==void 0?i.left=n+e.left:t.left=0,n=this._getRelativeValue(i.top),n!==void 0?i.top=n+e.top:t.top=0,t[Vn]=Ou({x:i.left,y:i.top})},_getRelativeValue:function(e){var t;if(typeof e=="string"&&(t=DH.exec(e)))return parseInt(t[1]+"1")*t[2]}},Hf={setup:function(e,t){var i,n,r=t.from,a=t.to,o=t.type==="fadeOut"?1:0,s=t.type==="fadeOut"?0:1,l=Ye(r)?String((i=r.opacity)!==null&&i!==void 0?i:o):String(r),u=Ye(a)?String((n=a.opacity)!==null&&n!==void 0?n:s):String(a);switch(t.skipElementInitialStyles||(l=e.css("opacity")),t.type){case"fadeIn":u=1;break;case"fadeOut":u=0}t.from={visibility:"visible",opacity:l},t.to={opacity:u}}},MH={validateConfig:function(e){jT(e,"pop")},setup:function(e,t){var i=t.from,n=t.to,r="opacity"in i?i.opacity:e.css("opacity"),a="opacity"in n?n.opacity:1,o="scale"in i?i.scale:0,s="scale"in n?n.scale:1;t.from={opacity:r};var l=qc(e);t.from[Vn]=this._getCssTransform(l,o),t.to={opacity:a},t.to[Vn]=this._getCssTransform(l,s)},_getCssTransform:function(e,t){return Ou(e)+"scale("+t+")"}},qT={custom:LH,slide:Nf,slideIn:Nf,slideOut:Nf,fade:Hf,fadeIn:Hf,fadeOut:Hf,pop:MH,css:PH},VH=function(e){var t=qT[e.type];if(!t)throw _t.Error("E0011",e.type);return t},NH={type:"custom",from:{},to:{},duration:400,start:ee,complete:ee,easing:"ease",delay:0},HH={duration:400,easing:"ease",delay:0};function $H(){var e=this.element,t=this.config;if(L_(e,t.from),L_(e,t.to),this.configurator.setup(e,t),e.data(su,this),this.strategy.initAnimation(e,t),t.start){var i=Fe(e);t.start.apply(this,[i,t])}}var WH=function(e){var t=e.element,i=e.config;if(t.removeData(su),i.complete){var n=Fe(t);i.complete.apply(this,[n,i])}e.deferred.resolveWith(this,[t,i])},zH=function(){var e=this,t=e.element,i=e.config;return e.isStarted=!0,e.strategy.animate(t,i).done(function(){WH(e)}).fail(function(){e.deferred.rejectWith(this,[t,i])})},GH=function(e){var t=this.element,i=this.config;clearTimeout(this.startTimeout),this.isStarted||this.start(),this.strategy.stop(t,i,e)},$f=me(dr,"dxFXStartAnimation"),UH=function(e){D.off(e.element,$f),D.on(e.element,$f,function(){$t.stop(e.element)}),e.deferred.always(function(){D.off(e.element,$f)})},YT=function(e,t){var i=t.type==="css"?HH:NH,n=O(!0,{},i,t),r=VH(n),a=kH(n),o={element:v(e),config:n,configurator:r,strategy:a,isSynchronous:a.isSynchronous,setup:$H,start:zH,stop:GH,deferred:new te};return Ee(r.validateConfig)&&r.validateConfig(n),UH(o),o},KH=function(e,t){var i=v(e);if(!i.length)return new te().resolve().promise();var n=YT(i,t);return jH(i,n),n.deferred.promise()};function jH(e,t){var i=gm(e);qH(e,i),i.push(t),Vh(e)||mm(e,i)}function gm(e){return e.data(_m)||[]}function qH(e,t){e.data(_m,t)}var XT=function(e){e.removeData(_m)};function Vh(e){return!!e.data(su)}function mm(e,t){if(t=gm(e),!!t.length){var i=t.shift();t.length===0&&XT(e),YH(i).done(function(){Vh(e)||mm(e)})}}function YH(e){return e.setup(),e.isSynchronous?e.start():e.startTimeout=setTimeout(function(){e.start()}),e.deferred.promise()}function L_(e,t){if(!(!t||!t.position)){var i=v(UT),n=0,r=0,a=mi.calculate(e,t.position),o=e.offset(),s=e.position();s.top>o.top&&(r=i.scrollTop()),s.left>o.left&&(n=i.scrollLeft()),O(t,{left:a.h.location-o.left+s.left-n,top:a.v.location-o.top+s.top-r}),delete t.position}}function P_(e,t){F(t,function(i,n){try{e.css(i,Ee(n)?n():n)}catch{}})}var XH=function(e,t){var i=v(e),n=gm(i);F(n,function(a,o){o.config.delay=0,o.config.duration=0,o.isSynchronous=!0}),Vh(i)||mm(i,n);var r=i.data(su);r&&r.stop(t),i.removeData(su),XT(i)},$t={off:!1,animationTypes:qT,animate:KH,createAnimation:YT,isAnimating:Vh,stop:XH,_simulatedTransitionEndDelay:100},Ds=function(e){return e===0?0:e/Math.abs(e)},Di=function(e,t,i){var n=!t&&t!==0,r=!i&&i!==0;return n&&(t=r?e:Math.min(e,i)),r&&(i=n?e:Math.max(e,t)),Math.min(Math.max(e,t),i)},Br=function(e,t,i){return e>=t&&e<=i};function Zy(e){return Math.abs(parseInt(e.toExponential().split("e")[1]))}function ZH(){return 3e-4.toPrecision(3)!=="0.000300"}function ZT(e,t){var i=QH(t||0)+2,n=e.toString().split("."),r=e,a=Math.abs(e),o,s=jC(e),l=a>1?10:0;return n.length===1?e:(s||(jC(t)&&(i=n[0].length+Zy(t)),e=a,e=e-Math.floor(e)+l),i=ZH()&&Zy(e)>6||i>7?15:7,!s&&(o=parseFloat(e.toPrecision(i)).toString().split("."),o[0]===l.toString())?parseFloat(n[0]+"."+o[1]):parseFloat(r.toPrecision(i)))}function QH(e){var t=e.toString();if(t.indexOf(".")<0)return 0;var i=t.split("."),n=i[1].indexOf("e");return n>=0?n:i[1].length}var JH=cr.add,Qy=Math.abs,Wf=0,zf=1,Js=2,Yc=10,e$=0,t$=180,i$=function(){return xa("pointer-events")},n$=Kr(function(){var e=Oe.real().deviceType==="desktop";if(!i$()||!e)return ee;var t=v("<div>").addClass("dx-gesture-cover").css("pointerEvents","none");return D.subscribeGlobal(t,"dxmousewheel",function(i){i.preventDefault()}),JH(function(){t.appendTo("body")}),function(i,n){t.css("pointerEvents",i?"all":"none"),i&&t.css("cursor",n)}}),r$=function(e,t){var i=n$();i(e,t)},ku=Fh.inherit({gesture:!0,configure:function(e){this.getElement().css("msTouchAction",e.immediate?"pinch-zoom":""),this.callBase(e)},allowInterruptionByMouseWheel:function(){return this._stage!==Js},getDirection:function(){return this.direction},_cancel:function(){this.callBase.apply(this,arguments),this._toggleGestureCover(!1),this._stage=Wf},start:function(e){if(e._needSkipEvent||pT(e)){this._cancel(e);return}this._startEvent=ro(e),this._startEventData=zt(e),this._stage=zf,this._init(e),this._setupImmediateTimer()},_setupImmediateTimer:function(){clearTimeout(this._immediateTimer),this._immediateAccepted=!1,this.immediate&&(this._immediateTimer=setTimeout((function(){this._immediateAccepted=!0}).bind(this),t$))},move:function(e){if(this._stage===zf&&this._directionConfirmed(e)){if(this._stage=Js,this._resetActiveElement(),this._toggleGestureCover(!0),this._clearSelection(e),this._adjustStartEvent(e),this._start(this._startEvent),this._stage===Wf)return;this._requestAccept(e),this._move(e),this._forgetAccept()}else this._stage===Js&&(this._clearSelection(e),this._move(e))},_directionConfirmed:function(e){var t=this._getTouchBoundary(e),i=Xa(this._startEventData,zt(e)),n=Qy(i.x),r=Qy(i.y),a=this._validateMove(t,n,r),o=this._validateMove(t,r,n),s=this.getDirection(e),l=s==="both"&&(a||o),u=s==="horizontal"&&a,d=s==="vertical"&&o;return l||u||d||this._immediateAccepted},_validateMove:function(e,t,i){return t&&t>=e&&(this.immediate?t>=i:!0)},_getTouchBoundary:function(e){return this.immediate||zi(e)?e$:Yc},_adjustStartEvent:function(e){var t=this._getTouchBoundary(e),i=Xa(this._startEventData,zt(e));this._startEvent.pageX+=Ds(i.x)*t,this._startEvent.pageY+=Ds(i.y)*t},_resetActiveElement:function(){Oe.real().platform==="ios"&&this.getElement().find(":focus").length&&Ns()},_toggleGestureCover:function(e){this._toggleGestureCoverImpl(e)},_toggleGestureCoverImpl:function(e){var t=this._stage===Js;t&&r$(e,this.getElement().css("cursor"))},_clearSelection:function(e){zi(e)||Au(e)||PV()},end:function(e){this._toggleGestureCover(!1),this._stage===Js?this._end(e):this._stage===zf&&this._stop(e),this._stage=Wf},dispose:function(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._toggleGestureCover(!1)},_init:ee,_start:ee,_move:ee,_stop:ee,_end:ee});ku.initialTouchBoundary=Yc;ku.touchBoundary=function(e){if(E(e)){Yc=e;return}return Yc};var vo="dxdragstart",ga="dxdrag",_o="dxdragend",Nh="dxdragenter",Hh="dxdragleave",Cm="dxdrop",hd="dxDragEventsCount",Tr=[],hs=[],F_=[],ym={setup:function(e,t){var i=Tr.includes(e);i||(Tr.push(e),hs.push([]),F_.push(t||{}))},add:function(e,t){var i=Tr.indexOf(e);this.updateEventsCounter(e,t.type,1);var n=t.selector;hs[i].includes(n)||hs[i].push(n)},updateEventsCounter:function(e,t,i){if([Nh,Hh,Cm].indexOf(t)>-1){var n=Mt(e,hd)||0;Mt(e,hd,Math.max(0,n+i))}},remove:function(e,t){this.updateEventsCounter(e,t.type,-1)},teardown:function(e){var t=Mt(e,hd);if(!t){var i=Tr.indexOf(e);Tr.splice(i,1),hs.splice(i,1),F_.splice(i,1),Oh(e,hd)}}};Bn(Nh,ym);Bn(Hh,ym);Bn(Cm,ym);var a$=function(e){var t=Tr.indexOf(e.get(0)),i=hs[t].filter(r=>r),n=e.find(i.join(", "));return hs[t].includes(void 0)&&(n=n.add(e)),n},o$=function(e){var t=Tr.indexOf(e.get(0));return F_[t]},s$=function(e,t){return e.itemPositionFunc?e.itemPositionFunc(t):t.offset()},l$=function(e,t){return e.itemSizeFunc?e.itemSizeFunc(t):{width:t.get(0).getBoundingClientRect().width,height:t.get(0).getBoundingClientRect().height}},u$=ku.inherit({ctor:function(e){this.callBase(e),this.direction="both"},_init:function(e){this._initEvent=e},_start:function(e){e=this._fireEvent(vo,this._initEvent),this._maxLeftOffset=e.maxLeftOffset,this._maxRightOffset=e.maxRightOffset,this._maxTopOffset=e.maxTopOffset,this._maxBottomOffset=e.maxBottomOffset;var t=GV(e.targetElements||(e.targetElements===null?[]:Tr));this._dropTargets=Jt(t,function(i){return v(i).get(0)})},_move:function(e){var t=zt(e),i=this._calculateOffset(t);e=this._fireEvent(ga,e,{offset:i}),this._processDropTargets(e),e._cancelPreventDefault||e.preventDefault()},_calculateOffset:function(e){return{x:this._calculateXOffset(e),y:this._calculateYOffset(e)}},_calculateXOffset:function(e){if(this.direction!=="vertical"){var t=e.x-this._startEventData.x;return this._fitOffset(t,this._maxLeftOffset,this._maxRightOffset)}return 0},_calculateYOffset:function(e){if(this.direction!=="horizontal"){var t=e.y-this._startEventData.y;return this._fitOffset(t,this._maxTopOffset,this._maxBottomOffset)}return 0},_fitOffset:function(e,t,i){return t!=null&&(e=Math.max(e,-t)),i!=null&&(e=Math.min(e,i)),e},_processDropTargets:function(e){var t=this._findDropTarget(e),i=t===this._currentDropTarget;i||(this._fireDropTargetEvent(e,Hh),this._currentDropTarget=t,this._fireDropTargetEvent(e,Nh))},_fireDropTargetEvent:function(e,t){if(this._currentDropTarget){var i={type:t,originalEvent:e,draggingElement:this._$element.get(0),target:this._currentDropTarget};Sa(i)}},_findDropTarget:function(e){var t=this,i;return F(Tr,function(n,r){if(t._checkDropTargetActive(r)){var a=v(r);F(a$(a),function(o,s){var l=v(s);t._checkDropTarget(o$(a),l,v(i),e)&&(i=s)})}}),i},_checkDropTargetActive:function(e){var t=!1;return F(this._dropTargets,function(i,n){return t=t||n===e||ca(n,e),!t}),t},_checkDropTarget:function(e,t,i,n){var r=t.get(0)===v(n.target).get(0);if(r)return!1;var a=s$(e,t);if(n.pageX<a.left||n.pageY<a.top)return!1;var o=l$(e,t);return n.pageX>a.left+o.width||n.pageY>a.top+o.height||i.length&&i.closest(t).length||e.checkDropTarget&&!e.checkDropTarget(t,n)?!1:t},_end:function(e){var t=zt(e);this._fireEvent(_o,e,{offset:this._calculateOffset(t)}),this._fireDropTargetEvent(e,Cm),delete this._currentDropTarget}});Hs({emitter:u$,events:[vo,ga,_o]});var Jy=function(){var e=[];return{add:function(t){e.includes(t)||e.push(t)},remove:function(t){var i=e.indexOf(t);i!==-1&&e.splice(i,1)},fire:function(){var t=e.pop(),i=!!t;return i&&t(),i},hasCallback:function(){return e.length>0}}}(),mc=1500,fa=[],d$=e=>(mc=Ft(e,mc),mc),QT=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mc,t=fa.length,i=(t?fa[t-1]:e)+1;return fa.push(i),i},M_=e=>{var t=fa.indexOf(e);t>=0&&fa.splice(t,1)},c$=e=>fa.length&&fa[fa.length-1]===e,Gf="dx-swatch-",h$=e=>{var t=v(e),i=t.closest('[class^="'.concat(Gf,'"], [class*=" ').concat(Gf,'"]')),n=va();if(!i.length)return n;var r=new RegExp("(\\s|^)(".concat(Gf,".*?)(\\s|$)")),a=i[0].className.match(r)[2],o=n.children("."+a);return o.length||(o=v("<div>").addClass(a).appendTo(n)),o};const JT={getSwatchContainer:h$};var f$=qe(),eA={top:{my:"top center",at:"top center"},bottom:{my:"bottom center",at:"bottom center"},right:{my:"right center",at:"right center"},left:{my:"left center",at:"left center"},center:{my:"center",at:"center"},"right bottom":{my:"right bottom",at:"right bottom"},"right top":{my:"right top",at:"right top"},"left bottom":{my:"left bottom",at:"left bottom"},"left top":{my:"left top",at:"left top"}},e0={h:0,v:0};class xm{constructor(t){var{position:i,container:n,visualContainer:r,$root:a,$content:o,$wrapper:s,onPositioned:l,onVisualPositionChanged:u,restorePosition:d,_fixWrapperPosition:c}=t;this._props={position:i,container:n,visualContainer:r,restorePosition:d,onPositioned:l,onVisualPositionChanged:u,_fixWrapperPosition:c},this._$root=a,this._$content=o,this._$wrapper=s,this._$markupContainer=void 0,this._$visualContainer=void 0,this._shouldRenderContentInitialPosition=!0,this._visualPosition=void 0,this._initialPosition=void 0,this._previousVisualPosition=void 0,this.updateContainer(n),this.updatePosition(i),this.updateVisualContainer(r)}get $container(){return this.updateContainer(),this._$markupContainer}get $visualContainer(){return this._$visualContainer}get position(){return this._position}set fixWrapperPosition(t){this._props._fixWrapperPosition=t,this.styleWrapperPosition()}set restorePosition(t){this._props.restorePosition=t}restorePositionOnNextRender(t){this._shouldRenderContentInitialPosition=t||!this._visualPosition}openingHandled(){var t=this._props.restorePosition;this.restorePositionOnNextRender(t)}updatePosition(t){this._props.position=t,this._position=this._normalizePosition(t),this.updateVisualContainer()}updateContainer(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._props.container;this._props.container=t,this._$markupContainer=t?v(t):JT.getSwatchContainer(this._$root),this.updateVisualContainer(this._props.visualContainer)}updateVisualContainer(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._props.visualContainer;this._props.visualContainer=t,this._$visualContainer=this._getVisualContainer()}detectVisualPositionChange(t){this._updateVisualPositionValue(),this._raisePositionedEvents(t)}positionContent(){this._shouldRenderContentInitialPosition?this._renderContentInitialPosition():(ti(this._$content,this._visualPosition),this.detectVisualPositionChange())}positionWrapper(){this._$visualContainer&&mi.setup(this._$wrapper,{my:"top left",at:"top left",of:this._$visualContainer})}styleWrapperPosition(){var t=Yt(this.$visualContainer.get(0))||this._props._fixWrapperPosition,i=t?"fixed":"absolute";this._$wrapper.css("position",i)}_updateVisualPositionValue(){this._previousVisualPosition=this._visualPosition,this._visualPosition=In(this._$content)}_renderContentInitialPosition(){this._renderBoundaryOffset(),Ru(this._$content);var t=this._$wrapper.css("overflow");this._$wrapper.css("overflow","hidden");var i=mi.setup(this._$content,this._position);this._$wrapper.css("overflow",t),this._initialPosition=i,this.detectVisualPositionChange()}_raisePositionedEvents(t){var i=this._previousVisualPosition,n=this._visualPosition,r=(i==null?void 0:i.top)!==n.top||(i==null?void 0:i.left)!==n.left;r&&this._props.onVisualPositionChanged({previousPosition:i,position:n,event:t}),this._props.onPositioned({position:this._initialPosition})}_renderBoundaryOffset(){var t,i=(t=this._position)!==null&&t!==void 0?t:{boundaryOffset:e0};this._$content.css("margin","".concat(i.v,"px ").concat(i.h,"px"))}_getVisualContainer(){var t,i,n=this._props.container,r=this._props.visualContainer,a=rM((t=this._props.position)===null||t===void 0?void 0:t.of)?this._props.position.of.target:(i=this._props.position)===null||i===void 0?void 0:i.of;return v(r||n||a||f$)}_normalizePosition(t){var i={boundaryOffset:e0};return E(t)?O(!0,{},i,this._positionToObject(t)):i}_positionToObject(t){return Me(t)?O({},eA[t]):t}}var p$=cr.add,Wo=qe(),t0=Rh,v$="dx-overlay",_$="dx-overlay-wrapper",g$="dx-overlay-content",m$="dx-overlay-shader",i0="dx-inner-overlay",n0="dx-state-invisible",C$="content",y$="dx-rtl",V_=[],Uf="dx-prevent-safari-scrolling",x$="tab";p$(()=>{D.subscribeGlobal(fe.getDocument(),ut.down,e=>{for(var t=V_.length-1;t>=0;t--)if(!V_[t]._proxiedDocumentDownHandler(e))return})});var zn=pi.inherit({_supportedKeys:function(){return O(this.callBase(),{escape:function(){this.hide()}})},_getDefaultOptions:function(){return O(this.callBase(),{activeStateEnabled:!1,visible:!1,deferRendering:!0,shading:!0,shadingColor:"",wrapperAttr:{},position:O({},eA.center),width:"80vw",minWidth:null,maxWidth:null,height:"80vh",minHeight:null,maxHeight:null,animation:{show:{type:"pop",duration:300,from:{scale:.55}},hide:{type:"pop",duration:300,to:{opacity:0,scale:.55},from:{opacity:1,scale:1}}},closeOnOutsideClick:!1,hideOnOutsideClick:!1,copyRootClassesToWrapper:!1,_ignoreCopyRootClassesToWrapperDeprecation:!1,onShowing:null,onShown:null,onHiding:null,onHidden:null,contentTemplate:"content",innerOverlay:!1,restorePosition:!0,container:void 0,visualContainer:void 0,hideTopOverlayHandler:()=>{this.hide()},hideOnParentScroll:!1,onPositioned:null,propagateOutsideClick:!1,ignoreChildEvents:!0,_checkParentVisibility:!0,_fixWrapperPosition:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return!Ke()},options:{width:null,height:null,animation:null,_checkParentVisibility:!1}}])},_setOptionsByReference:function(){this.callBase(),O(this._optionsByReference,{animation:!0})},$wrapper:function(){return this._$wrapper},_eventBindingTarget:function(){return this._$content},_setDeprecatedOptions(){this.callBase(),O(this._deprecatedOptions,{elementAttr:{since:"21.2",message:'Use the "wrapperAttr" option instead'},closeOnOutsideClick:{since:"22.1",alias:"hideOnOutsideClick"}})},ctor:function(e,t){this.callBase(e,t),t&&t.copyRootClassesToWrapper&&!t._ignoreCopyRootClassesToWrapperDeprecation&&_t.log("W0001",this.NAME,"copyRootClassesToWrapper","21.2",'Use the "wrapperAttr" option instead')},_init:function(){this.callBase(),this._initActions(),this._initHideOnOutsideClickHandler(),this._initTabTerminatorHandler(),this._customWrapperClass=null,this._$wrapper=v("<div>").addClass(_$),this._$content=v("<div>").addClass(g$),this._initInnerOverlayClass();var e=this.$element();this.option("copyRootClassesToWrapper")&&this._$wrapper.addClass(e.attr("class")),e.addClass(v$),this._$wrapper.attr("data-bind","dxControlsDescendantBindings: true"),this._toggleViewPortSubscription(!0),this._initHideTopOverlayHandler(this.option("hideTopOverlayHandler")),this._parentsScrollSubscriptionInfo={handler:t=>{this._hideOnParentsScrollHandler(t)}},this.warnPositionAsFunction()},warnPositionAsFunction(){Ee(this.option("position"))&&_t.log("W0018")},_initInnerOverlayClass:function(){this._$content.toggleClass(i0,this.option("innerOverlay"))},_initHideTopOverlayHandler:function(e){this._hideTopOverlayHandler=e},_getActionsList:function(){return["onShowing","onShown","onHiding","onHidden","onPositioned","onVisualPositionChanged"]},_initActions:function(){this._actions={};var e=this._getActionsList();F(e,(t,i)=>{this._actions[i]=this._createActionByOption(i,{excludeValidators:["disabled","readOnly"]})||ee})},_initHideOnOutsideClickHandler:function(){var e=this;this._proxiedDocumentDownHandler=function(){return e._documentDownHandler(...arguments)}},_areContentDimensionsRendered:function(e){var t,i,n,r=(t=e.contentBoxSize)===null||t===void 0?void 0:t[0];if(r){var a,o;return parseInt(r.inlineSize,10)===((a=this._renderedDimensions)===null||a===void 0?void 0:a.width)&&parseInt(r.blockSize,10)===((o=this._renderedDimensions)===null||o===void 0?void 0:o.height)}var s=e.contentRect;return parseInt(s.width,10)===((i=this._renderedDimensions)===null||i===void 0?void 0:i.width)&&parseInt(s.height,10)===((n=this._renderedDimensions)===null||n===void 0?void 0:n.height)},_initMarkup(){this.callBase(),this._renderWrapperAttributes(),this._initPositionController()},_documentDownHandler:function(e){this._showAnimationProcessing&&this._stopAnimation();var t=v(Wo.document).is(e.target)||ca(Wo.document,e.target),i=v(e.target).closest(".".concat(i0)).length,n=t&&!i&&!(this._$content.is(e.target)||ca(this._$content.get(0),e.target));return n&&this._shouldHideOnOutsideClick(e)&&this._outsideClickHandler(e),this.option("propagateOutsideClick")},_shouldHideOnOutsideClick:function(e){var{hideOnOutsideClick:t}=this.option();return Ee(t)?t(e):t},_outsideClickHandler(e){this.option("shading")&&e.preventDefault(),this.hide()},_getAnonymousTemplateName:function(){return C$},_initTemplates:function(){this._templateManager.addDefaultTemplates({content:new no}),this.callBase()},_isTopOverlay:function(){for(var e=this._overlayStack(),t=e.length-1;t>=0;t--){var i=e[t]._findTabbableBounds();if(i.first||i.last)return e[t]===this}return!1},_overlayStack:function(){return V_},_zIndexInitValue:function(){return zn.baseZIndex()},_toggleViewPortSubscription:function(e){var t=this;t0.remove(this._viewPortChangeHandle),e&&(this._viewPortChangeHandle=function(){t._viewPortChangeHandler(...arguments)},t0.add(this._viewPortChangeHandle))},_viewPortChangeHandler:function(){this._positionController.updateContainer(this.option("container")),this._refresh()},_renderWrapperAttributes(){var{wrapperAttr:e}=this.option(),t=O({},e),i=t.class;delete t.class,this.$wrapper().attr(t).removeClass(this._customWrapperClass).addClass(i),this._customWrapperClass=i},_renderVisibilityAnimate:function(e){return this._stopAnimation(),e?this._show():this._hide()},_getAnimationConfig:function(){return this._getOptionValue("animation",this)},_animateShowing:function(){var e,t,i,n=this,r=(e=this._getAnimationConfig())!==null&&e!==void 0?e:{},a=this._normalizeAnimation(r.show,"to"),o=(t=a==null?void 0:a.start)!==null&&t!==void 0?t:ee,s=(i=a==null?void 0:a.complete)!==null&&i!==void 0?i:ee;this._animate(a,function(){if(!n._isAnimationPaused){n.option("focusStateEnabled")&&D.trigger(n._focusTarget(),"focus");for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];s.call(n,...u),n._showAnimationProcessing=!1,n._isHidden=!1,n._actions.onShown(),n._toggleSafariScrolling(),n._showingDeferred.resolve()}},function(){if(!n._isAnimationPaused){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];o.call(n,...u),n._showAnimationProcessing=!0}})},_show:function(){if(this._showingDeferred=new te,this._parentHidden=this._isParentHidden(),this._showingDeferred.done(()=>{delete this._parentHidden}),this._parentHidden)return this._isHidden=!0,this._showingDeferred.resolve();if(this._currentVisible)return new te().resolve().promise();if(this._currentVisible=!0,this._isHidingActionCanceled)delete this._isHidingActionCanceled,this._showingDeferred.resolve();else{var e=()=>{if(this._renderVisibility(!0),this._isShowingActionCanceled){delete this._isShowingActionCanceled,this._showingDeferred.resolve();return}this._animateShowing()};this.option("templatesRenderAsynchronously")?(this._stopShowTimer(),this._asyncShowTimeout=setTimeout(e)):e()}return this._showingDeferred.promise()},_normalizeAnimation:function(e,t){return e&&(e=O({type:"slide",skipElementInitialStyles:!0},e),He(e[t])&&O(e[t],{position:this._positionController.position})),e},_animateHiding:function(){var e,t,i,n=this,r=(e=this._getAnimationConfig())!==null&&e!==void 0?e:{},a=this._normalizeAnimation(r.hide,"from"),o=(t=a==null?void 0:a.start)!==null&&t!==void 0?t:ee,s=(i=a==null?void 0:a.complete)!==null&&i!==void 0?i:ee;this._animate(a,function(){var l;n._$content.css("pointerEvents",""),n._renderVisibility(!1);for(var u=arguments.length,d=new Array(u),c=0;c<u;c++)d[c]=arguments[c];s.call(n,...d),n._hideAnimationProcessing=!1,(l=n._actions)===null||l===void 0||l.onHidden(),n._hidingDeferred.resolve()},function(){n._$content.css("pointerEvents","none");for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];o.call(n,...u),n._hideAnimationProcessing=!0})},_hide:function(){if(!this._currentVisible)return new te().resolve().promise();this._currentVisible=!1,this._hidingDeferred=new te;var e={cancel:!1};return this._isShowingActionCanceled?this._hidingDeferred.resolve():(this._actions.onHiding(e),this._toggleSafariScrolling(),e.cancel?(this._isHidingActionCanceled=!0,this.option("visible",!0),this._hidingDeferred.resolve()):(this._forceFocusLost(),this._toggleShading(!1),this._toggleSubscriptions(!1),this._stopShowTimer(),this._animateHiding())),this._hidingDeferred.promise()},_forceFocusLost:function(){var e=fe.getActiveElement(),t=!!this._$content.find(e).length;t&&Ns()},_animate:function(e,t,i){e?(i=i||e.start||ee,$t.animate(this._$content,O({},e,{start:i,complete:t}))):t()},_stopAnimation:function(){$t.stop(this._$content,!0)},_renderVisibility:function(e){if(!(e&&this._isParentHidden())){if(this._currentVisible=e,this._stopAnimation(),e||HV(this._$content),this._toggleVisibility(e),this._$content.toggleClass(n0,!e),this._updateZIndexStackPosition(e),e){this._positionController.openingHandled(),this._renderContent();var t={cancel:!1};if(this._actions.onShowing(t),t.cancel){this._toggleVisibility(!1),this._$content.toggleClass(n0,!0),this._updateZIndexStackPosition(!1),this._moveFromContainer(),this._isShowingActionCanceled=!0,this.option("visible",!1);return}this._moveToContainer(),this._renderGeometry(),zc(this._$content),nr(this._$content)}else this._moveFromContainer();this._toggleShading(e),this._toggleSubscriptions(e)}},_updateZIndexStackPosition:function(e){var t=this._overlayStack(),i=t.indexOf(this);e?(i===-1&&(this._zIndex=QT(this._zIndexInitValue()),t.push(this)),this._$wrapper.css("zIndex",this._zIndex),this._$content.css("zIndex",this._zIndex)):i!==-1&&(t.splice(i,1),M_(this._zIndex))},_toggleShading:function(e){this._$wrapper.toggleClass(m$,e&&this.option("shading")),this._$wrapper.css("backgroundColor",this.option("shading")?this.option("shadingColor"):""),this._toggleTabTerminator(e&&this.option("shading"))},_initTabTerminatorHandler:function(){var e=this;this._proxiedTabTerminatorHandler=function(){e._tabKeyHandler(...arguments)}},_toggleTabTerminator:function(e){var t=me("keydown",this.NAME);e?D.on(fe.getDocument(),t,this._proxiedTabTerminatorHandler):D.off(fe.getDocument(),t,this._proxiedTabTerminatorHandler)},_findTabbableBounds:function(){for(var e=this._$wrapper.find("*"),t=e.length-1,i={first:null,last:null},n=0;n<=t&&(!i.first&&e.eq(n).is(yy)&&(i.first=e.eq(n)),!i.last&&e.eq(t-n).is(yy)&&(i.last=e.eq(t-n)),!(i.first&&i.last));n++);return i},_tabKeyHandler:function(e){if(!(Nt(e)!==x$||!this._isTopOverlay())){var t=this._findTabbableBounds(),i=t.first,n=t.last,r=!e.shiftKey&&e.target===n.get(0),a=e.shiftKey&&e.target===i.get(0),o=t.length===0,s=!ca(this._$wrapper.get(0),e.target);if(r||a||o||s){e.preventDefault();var l=e.shiftKey?n:i;D.trigger(l,"focusin"),D.trigger(l,"focus")}}},_toggleSubscriptions:function(e){Ke()&&(this._toggleHideTopOverlayCallback(e),this._toggleHideOnParentsScrollSubscription(e))},_toggleHideTopOverlayCallback:function(e){this._hideTopOverlayHandler&&(e?Jy.add(this._hideTopOverlayHandler):Jy.remove(this._hideTopOverlayHandler))},_toggleHideOnParentsScrollSubscription:function(e){var t,i=me("scroll",this.NAME),{prevTargets:n,handler:r}=(t=this._parentsScrollSubscriptionInfo)!==null&&t!==void 0?t:{};D.off(n,i,r);var a=this.option("hideOnParentScroll");if(e&&a){var o=this._hideOnParentScrollTarget().parents();Oe.real().deviceType==="desktop"&&(o=o.add(Wo)),D.on(o,i,r),this._parentsScrollSubscriptionInfo.prevTargets=o}},_hideOnParentsScrollHandler:function(e){var t=!1,i=this.option("hideOnParentScroll");Ee(i)&&(t=i(e)),!t&&!this._showAnimationProcessing&&this.hide()},_hideOnParentScrollTarget:function(){return this._$wrapper},_render:function(){this.callBase(),this._appendContentToElement(),this._renderVisibilityAnimate(this.option("visible"))},_appendContentToElement:function(){this._$content.parent().is(this.$element())||this._$content.appendTo(this.$element())},_renderContent:function(){var e=!this._currentVisible&&this.option("deferRendering"),t=this.option("visible")&&this._isParentHidden();if(t){this._isHidden=!0;return}this._contentAlreadyRendered||e||(this._contentAlreadyRendered=!0,this._appendContentToElement(),this.callBase())},_isParentHidden:function(){if(!this.option("_checkParentVisibility"))return!1;if(this._parentHidden!==void 0)return this._parentHidden;var e=this.$element().parent();if(e.is(":visible"))return!1;var t=!1;return e.add(e.parents()).each(function(){var i=v(this);if(i.css("display")==="none")return t=!0,!1}),t||!fe.getBody().contains(e.get(0))},_renderContentImpl:function(){var e=new te,t=this.option("contentTemplate"),i=this._getTemplate(t),n=this._templateManager.anonymousTemplateName===t;return i&&i.render({container:Fe(this.$content()),noModel:!0,transclude:n,onRendered:()=>{e.resolve()}}),this._renderScrollTerminator(),e.done(()=>{this.option("visible")&&this._moveToContainer()}),e.promise()},_getPositionControllerConfig(){var{container:e,visualContainer:t,_fixWrapperPosition:i,restorePosition:n}=this.option();return{container:e,visualContainer:t,$root:this.$element(),$content:this._$content,$wrapper:this._$wrapper,onPositioned:this._actions.onPositioned,onVisualPositionChanged:this._actions.onVisualPositionChanged,restorePosition:n,_fixWrapperPosition:i}},_initPositionController(){this._positionController=new xm(this._getPositionControllerConfig())},_renderScrollTerminator:function(){var e=this._$wrapper,t=me(ga,this.NAME);D.off(e,t),D.on(e,t,{validate:function(){return!0},getDirection:function(){return"both"},_toggleGestureCover:function(i){i||this._toggleGestureCoverImpl(i)},_clearSelection:ee,isNative:!0},i=>{var n=i.originalEvent.originalEvent,{type:r}=n||{},a=r==="wheel",o=r==="mousemove",s=a&&!fi(i);i._cancelPreventDefault=!0,n&&i.cancelable!==!1&&(!o&&!a||s)&&i.preventDefault()})},_moveFromContainer:function(){this._$content.appendTo(this.$element()),this._detachWrapperToContainer()},_detachWrapperToContainer:function(){this._$wrapper.detach()},_moveToContainer:function(){this._$wrapper.appendTo(this._positionController.$container),this._$content.appendTo(this._$wrapper)},_renderGeometry:function(e){var{visible:t}=this.option();t&&Ke()&&this._renderGeometryImpl()},_renderGeometryImpl:function(){this._positionController.updatePosition(this._getOptionValue("position")),this._renderWrapper(),this._renderDimensions(),this._renderPosition()},_renderPosition(){this._positionController.positionContent()},_isAllWindowCovered:function(){return Yt(this._positionController.$visualContainer.get(0))&&this.option("shading")},_toggleSafariScrolling:function(){var e=this.option("visible"),t=v(fe.getBody()),i=Oe.real().platform==="ios"&&Bt.safari,n=this._isAllWindowCovered(),r=t.hasClass(Uf),a=!r&&e&&n,o=r&&(!e||!n||this._disposed);i&&(o?(t.removeClass(Uf),Wo.scrollTo(0,this._cachedBodyScrollTop),this._cachedBodyScrollTop=void 0):a&&(this._cachedBodyScrollTop=Wo.pageYOffset,t.addClass(Uf)))},_renderWrapper:function(){this._positionController.styleWrapperPosition(),this._renderWrapperDimensions(),this._positionController.positionWrapper()},_renderWrapperDimensions:function(){var e=this._positionController.$visualContainer,t=fe.getDocumentElement(),i=Yt(e.get(0)),n=i?t.clientWidth:lt(e),r=i?Wo.innerHeight:at(e);this._$wrapper.css({width:n,height:r})},_renderDimensions:function(){var e=this._$content.get(0);this._$content.css({minWidth:this._getOptionValue("minWidth",e),maxWidth:this._getOptionValue("maxWidth",e),minHeight:this._getOptionValue("minHeight",e),maxHeight:this._getOptionValue("maxHeight",e),width:this._getOptionValue("width",e),height:this._getOptionValue("height",e)})},_focusTarget:function(){return this._$content},_attachKeyboardEvents:function(){this._keyboardListenerId=ha.on(this._$content,null,e=>this._keyboardHandler(e))},_keyboardHandler:function(e){var t=e.originalEvent,i=v(t.target);(i.is(this._$content)||!this.option("ignoreChildEvents"))&&this.callBase(...arguments)},_isVisible:function(){return this.option("visible")},_visibilityChanged:function(e){e?this.option("visible")&&this._renderVisibilityAnimate(e):this._renderVisibilityAnimate(e)},_dimensionChanged:function(){this._renderGeometry()},_clean:function(){var e=this.option();!this._contentAlreadyRendered&&!e.isRenovated&&this.$content().empty(),this._renderVisibility(!1),this._stopShowTimer(),this._cleanFocusState()},_stopShowTimer(){this._asyncShowTimeout&&clearTimeout(this._asyncShowTimeout),this._asyncShowTimeout=null},_dispose:function(){$t.stop(this._$content,!1),clearTimeout(this._deferShowTimer),this._toggleViewPortSubscription(!1),this._toggleSubscriptions(!1),this._updateZIndexStackPosition(!1),this._toggleTabTerminator(!1),this._actions=null,this._parentsScrollSubscriptionInfo=null,this.callBase(),this._toggleSafariScrolling(),this.option("visible")&&M_(this._zIndex),this._$wrapper.remove(),this._$content.remove()},_toggleRTLDirection:function(e){this._$content.toggleClass(y$,e)},_optionChanged:function(e){var t=e.value;if(this._getActionsList().includes(e.name)){this._initActions();return}switch(e.name){case"animation":break;case"shading":this._toggleShading(this.option("visible")),this._toggleSafariScrolling();break;case"shadingColor":this._toggleShading(this.option("visible"));break;case"width":case"height":this._renderGeometry();break;case"minWidth":case"maxWidth":case"minHeight":case"maxHeight":this._renderGeometry();break;case"position":this._positionController.updatePosition(this.option("position")),this._positionController.restorePositionOnNextRender(!0),this._renderGeometry(),this._toggleSafariScrolling();break;case"visible":this._renderVisibilityAnimate(t).done(()=>{this._animateDeferred&&this._animateDeferred.resolveWith(this)});break;case"container":this._positionController.updateContainer(t),this._invalidate(),this._toggleSafariScrolling();break;case"visualContainer":this._positionController.updateVisualContainer(t),this._renderWrapper(),this._toggleSafariScrolling();break;case"innerOverlay":this._initInnerOverlayClass();break;case"deferRendering":case"contentTemplate":this._contentAlreadyRendered=!1,this._clean(),this._invalidate();break;case"hideTopOverlayHandler":this._toggleHideTopOverlayCallback(!1),this._initHideTopOverlayHandler(e.value),this._toggleHideTopOverlayCallback(this.option("visible"));break;case"hideOnParentScroll":this._toggleHideOnParentsScrollSubscription(this.option("visible"));break;case"closeOnOutsideClick":case"hideOnOutsideClick":case"propagateOutsideClick":break;case"rtlEnabled":this._contentAlreadyRendered=!1,this.callBase(e);break;case"_fixWrapperPosition":this._positionController.fixWrapperPosition=t;break;case"wrapperAttr":this._renderWrapperAttributes();break;case"restorePosition":this._positionController.restorePosition=e.value;break;default:this.callBase(e)}},toggle:function(e){e=e===void 0?!this.option("visible"):e;var t=new te;if(e===this.option("visible"))return t.resolveWith(this,[e]).promise();var i=new te;return this._animateDeferred=i,this.option("visible",e),i.promise().done(()=>{delete this._animateDeferred,t.resolveWith(this,[this.option("visible")])}),t.promise()},$content:function(){return this._$content},show:function(){return this.toggle(!0)},hide:function(){return this.toggle(!1)},content:function(){return Fe(this._$content)},repaint:function(){this._contentAlreadyRendered?(this._positionController.restorePositionOnNextRender(!0),this._renderGeometry({forceStopAnimation:!0}),nr(this._$content)):this.callBase()}});zn.baseZIndex=e=>d$(e);tt("dxOverlay",zn);var b$="dx-loadpanel",S$="dx-loadpanel-wrapper",r0="dx-loadpanel-indicator",a0="dx-loadpanel-message",E$="dx-loadpanel-content",w$="dx-loadpanel-content-wrapper",I$="dx-loadpanel-pane-hidden",bm=zn.inherit({_supportedKeys:function(){return O(this.callBase(),{escape:ee})},_getDefaultOptions:function(){return O(this.callBase(),{message:ue.format("Loading"),width:222,height:90,animation:null,showIndicator:!0,indicatorSrc:"",showPane:!0,delay:0,templatesRenderAsynchronously:!1,hideTopOverlayHandler:null,focusStateEnabled:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"generic"},options:{shadingColor:"transparent"}},{device:function(){return Qt()},options:{message:"",width:60,height:60,maxHeight:60,maxWidth:60}}])},_init:function(){this.callBase.apply(this,arguments)},_render:function(){this.callBase(),this.$element().addClass(b$),this.$wrapper().addClass(S$)},_renderContentImpl:function(){this.callBase(),this.$content().addClass(E$),this._$loadPanelContentWrapper=v("<div>").addClass(w$),this._$loadPanelContentWrapper.appendTo(this.$content()),this._togglePaneVisible(),this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage()},_show:function(){var e=this.option("delay");if(!e)return this.callBase();var t=new te,i=this.callBase.bind(this);return this._clearShowTimeout(),this._showTimeout=setTimeout(function(){i().done(function(){t.resolve()})},e),t.promise()},_hide:function(){return this._clearShowTimeout(),this.callBase()},_clearShowTimeout:function(){clearTimeout(this._showTimeout)},_renderMessage:function(){if(this._$loadPanelContentWrapper){var e=this.option("message");if(e){var t=v("<div>").addClass(a0).text(e);this._$loadPanelContentWrapper.append(t)}}},_renderLoadIndicator:function(){!this._$loadPanelContentWrapper||!this.option("showIndicator")||(this._$indicator||(this._$indicator=v("<div>").addClass(r0).appendTo(this._$loadPanelContentWrapper)),this._createComponent(this._$indicator,dn,{indicatorSrc:this.option("indicatorSrc")}))},_cleanPreviousContent:function(){this.$content().find("."+a0).remove(),this.$content().find("."+r0).remove(),delete this._$indicator},_togglePaneVisible:function(){this.$content().toggleClass(I$,!this.option("showPane"))},_optionChanged:function(e){switch(e.name){case"delay":break;case"message":case"showIndicator":this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage();break;case"showPane":this._togglePaneVisible();break;case"indicatorSrc":this._renderLoadIndicator();break;default:this.callBase(e)}},_dispose:function(){this._clearShowTimeout(),this.callBase()}});tt("dxLoadPanel",bm);var T$=cr.add,tA="DEVEXTREME_XHR_ERROR_UNLOAD",A$=function(e){return[e[0],e.length<3?"=":String(e[1]).toLowerCase(),e.length<2?!0:e[e.length-1]]},$r=function(e){return Array.isArray(e)||(e=[e]),Jt(e,function(t){var i={selector:Ee(t)||typeof t=="string"?t:t.getter||t.field||t.selector,desc:!!(t.desc||String(t.dir).charAt(0).toLowerCase()==="d")};return t.compare&&(i.compare=t.compare),i})},D$=function(){var e={timeout:"Network connection timeout",error:"Unspecified network error",parsererror:"Unexpected server response"},t;return T$(function(){var i=qe();fe.listen(i,"beforeunload",function(){t=!0})}),function(i,n){return t?tA:i.status<400?function(r){var a=e[r];return a||r}(n):i.statusText}}(),Sm={count:{seed:0,step:function(e){return 1+e}},sum:{seed:0,step:function(e,t){return e+t}},min:{step:function(e,t){return t<e?t:e}},max:{step:function(e,t){return t>e?t:e}},avg:{seed:[0,0],step:function(e,t){return[e[0]+t,e[1]+1]},finalize:function(e){return e[1]?e[0]/e[1]:NaN}}},O$=function(){var e=0,t;return{obtain:function(){e===0&&(t=new te),e++},release:function(){e--,e<1&&t.resolve()},promise:function(){var i=e===0?new te().resolve():t;return i.promise()},reset:function(){e=0,t&&t.resolve()}}}();function R$(e){return/^(and|&&|&)$/i.test(e)}var Bu=function(e,t,i){if(Array.isArray(e)){for(var n=Jt(t,function(o,s){return s}),r,a=0;a<n.length;a++)if(r=n[a],!kt(t[r],i[r],0,!1))return!1;return!0}return kt(t,i,0,!1)},k$=function(e){return e[0]==="!"&&Array.isArray(e[1])},B$=function(e){return e==="and"||e==="or"},L$=function(e){var t=e[0],i=e[1];return!!(Array.isArray(t)||Ee(t)&&(Array.isArray(i)||Ee(i)||B$(i)))},ms=function(){var e=new te;return e.resolve.apply(e,arguments).promise()},iA=function(){var e=new te;return e.reject.apply(e,arguments).promise()};function P$(e,t){var i,n;return function(){return n=arguments,i||(i=setTimeout(()=>{i=void 0,n&&e.call(this,n)},Ee(t)?t():t)),i}}function F$(e,t){var i=[],n=P$(function(){e.call(this,i),i=[]},t);return function(r){return Array.isArray(r)&&i.push(...r),n.call(this,i)}}var Dl=["millisecond","second","minute","hour","day","week","month","quarter","year"],Em=function e(t){switch(t){case"millisecond":return 1;case"second":return 1e3*e("millisecond");case"minute":return 60*e("second");case"hour":return 60*e("minute");case"day":return 24*e("hour");case"week":return 7*e("day");case"month":return 30*e("day");case"quarter":return 3*e("month");case"year":return 365*e("day");default:return 0}},M$=function(e,t,i){var n=t.getTime()-e.getTime(),r=Em(i)||1;return Math.floor(n/r)},V$=function(e,t){var i=$h(e);switch(i){case"millisecond":return"second";case"second":return"minute";case"minute":return"hour";case"hour":return"day";case"day":return t?"week":"month";case"week":return"month";case"month":return"quarter";case"quarter":case"year":return"year";default:return 0}},nA=function(e){var t,i,n,r=["millisecond","second","minute","hour","day","month","year"],a={};for(t=r.length-1;t>=0;t--)n=r[t],i=Math.floor(e/Em(n)),i>0&&(a[n+"s"]=i,e-=Xc(n,i));return a},N$=function(e){var t=0;return He(e)&&F(e,function(i,n){t+=Xc(i.substr(0,i.length-1),n)}),Me(e)&&(t=Xc(e,1)),t};function Xc(e,t){return Em(e)*t}function $h(e){var t=-1,i;return Me(e)?e:He(e)?(F(e,function(n,r){for(i=0;i<Dl.length;i++)r&&(n===Dl[i]+"s"||n===Dl[i])&&t<i&&(t=i)}),Dl[t]):""}var H$={millisecond:"millisecond",second:"longtime",minute:"shorttime",hour:"shorttime",day:"day",week:"day",month:"month",quarter:"quarter",year:"year"};function $$(e){return H$[$h(e)]||""}var rA=function(e){return Math.floor(e/3)},aA=function(e){return 3*rA(e)};function oA(e,t,i,n){e=new Date(e.getTime());var r=new Date(e.getTime()),a,o,s=$h(t);switch(s){case"second":e=new Date(1e3*Math.floor(r.getTime()/1e3));break;case"minute":e=new Date(6e4*Math.floor(r.getTime()/6e4));break;case"hour":e=new Date(36e5*Math.floor(r.getTime()/36e5));break;case"year":e.setMonth(0);case"month":e.setDate(1);case"day":e.setHours(0,0,0,0);break;case"week":e=hA(e,n||0),e.setHours(0,0,0,0);break;case"quarter":a=aA(e.getMonth()),o=e.getMonth(),e.setDate(1),e.setHours(0,0,0,0),o!==a&&e.setMonth(a)}return i&&s!=="hour"&&s!=="minute"&&s!=="second"&&pA(r,e),e}function sA(e){return oA(e,"day")}var W$=function(e){var t=sA(e);return t.setDate(t.getDate()+1),new Date(t.getTime()-1)},z$=function(e,t){var i=0,n={year:e.getFullYear()!==t.getFullYear(),month:e.getMonth()!==t.getMonth(),day:e.getDate()!==t.getDate(),hour:e.getHours()!==t.getHours(),minute:e.getMinutes()!==t.getMinutes(),second:e.getSeconds()!==t.getSeconds(),millisecond:e.getMilliseconds()!==t.getMilliseconds()};return F(n,function(r,a){a&&i++}),i===0&&vA(e,t)!==0&&(n.hour=!0,i++),n.count=i,n};function lA(e,t,i){var n=new Date(e.getTime()),r=Me(t)?dA(t.toLowerCase()):xt(t)?nA(t):t;return r.years&&n.setFullYear(n.getFullYear()+r.years*i),r.quarters&&n.setMonth(n.getMonth()+3*r.quarters*i),r.months&&n.setMonth(n.getMonth()+r.months*i),r.weeks&&n.setDate(n.getDate()+7*r.weeks*i),r.days&&n.setDate(n.getDate()+r.days*i),r.hours&&n.setTime(n.getTime()+36e5*r.hours*i),r.minutes&&n.setTime(n.getTime()+6e4*r.minutes*i),r.seconds&&n.setTime(n.getTime()+1e3*r.seconds*i),r.milliseconds&&n.setTime(n.getTime()+r.milliseconds*i),n}var uA=function(e,t,i){var n=i?-1:1;return Mi(e)?lA(e,t,n):ZT(e+t*n,t)},G$=function(e,t,i){var n=[],r;for(n.push(Mi(e)?new Date(e.getTime()):e),r=e;r<t;)r=uA(r,i),n.push(r);return n},U$=function(e,t){if(e==="month")return un(t.getFullYear(),t.getMonth(),1);if(e==="year")return un(t.getFullYear(),0,t.getDate());if(e==="decade")return un(Pu(t),t.getMonth(),t.getDate());if(e==="century")return un(Lu(t),t.getMonth(),t.getDate())},K$=function(e,t){if(e==="month")return un(t.getFullYear(),t.getMonth(),Zc(t));if(e==="year")return un(t.getFullYear(),11,t.getDate());if(e==="decade")return un(Pu(t)+9,t.getMonth(),t.getDate());if(e==="century")return un(Lu(t)+90,t.getMonth(),t.getDate())},j$=function(e,t){var i=un(t.getFullYear(),t.getMonth(),1);return e==="month"||(i.setMonth(0),e==="year")||(e==="decade"&&i.setFullYear(Pu(t)),e==="century"&&i.setFullYear(Lu(t))),i},q$=function(e,t){var i=new Date(t);return i.setDate(Zc(t)),e==="month"||(i.setMonth(11),i.setDate(Zc(i)),e==="year")||(e==="decade"&&i.setFullYear(Pu(t)+9),e==="century"&&i.setFullYear(Lu(t)+99)),i};function Zc(e){var t=un(e.getFullYear(),e.getMonth()+1,0);return t.getDate()}var Y$=function(e){switch(e){case"month":return"year";case"year":return"decade";case"decade":return"century"}},X$=function(e){switch(e){case"century":return"decade";case"decade":return"year";case"year":return"month"}},Z$=function(e){var t=1;return e==="year"&&(t=12),e==="decade"&&(t=120),e==="century"&&(t=1200),t},Q$=function(e){var t=1;return e==="decade"&&(t=12),e==="century"&&(t=120),t};function dA(e){var t={};switch(e){case"year":t.years=1;break;case"month":t.months=1;break;case"quarter":t.months=3;break;case"week":t.weeks=1;break;case"day":t.days=1;break;case"hour":t.hours=1;break;case"minute":t.minutes=1;break;case"second":t.seconds=1;break;case"millisecond":t.milliseconds=1}return t}function J$(e,t){return N_(e,t)&&e.getDate()===t.getDate()}function N_(e,t){return cA(e,t)&&e.getMonth()===t.getMonth()}function cA(e,t){return e&&t&&e.getFullYear()===t.getFullYear()}var e2=function(e,t){if(!(!E(e)||!E(t))){var i=e.getFullYear()-e.getFullYear()%10,n=t.getFullYear()-t.getFullYear()%10;return e&&t&&i===n}},t2=function(e,t){if(!(!E(e)||!E(t))){var i=e.getFullYear()-e.getFullYear()%100,n=t.getFullYear()-t.getFullYear()%100;return e&&t&&i===n}};function Lu(e){return e&&e.getFullYear()-e.getFullYear()%100}function Pu(e){return e&&e.getFullYear()-e.getFullYear()%10}var i2=function(){return"yyyy/MM/dd"},n2=function(e){if(E(e))return un(e.getFullYear(),e.getMonth(),1)},r2=function(e){if(E(e))return un(e.getFullYear(),e.getMonth()+1,0)};function hA(e,t){var i=(e.getDay()-t+7)%7,n=new Date(e);return n.setDate(e.getDate()-i),n}var a2=function(e,t){var i=Pe.getDatesInterval(e,t,"day"),n=new Date(e);return i>=6&&(n=new Date(n.setDate(n.getDate()+7))),n},o2=function(e,t,i,n){return n==="date"&&(t=t&&Pe.correctDateWithUnitBeginning(t,"day"),i=i&&Pe.correctDateWithUnitBeginning(i,"day"),e=e&&Pe.correctDateWithUnitBeginning(e,"day")),fA(e,t,i)===e},s2=function(e){var{firstMin:t,firstMax:i,secondMin:n,secondMax:r}=e;return t<=n&&n<=i||t>n&&t<r||t<r&&i>r},l2=function(e){var t=Math.floor(e),i=e%1*60;return{hours:t,minutes:i}},u2=function(e,t){var i=this.dateTimeFromDecimal(t),n=new Date(e);return(e.getHours()===i.hours&&e.getMinutes()<i.minutes||e.getHours()<i.hours)&&n.setHours(i.hours,i.minutes,0,0),n};function fA(e,t,i){var n=e;return E(e)?(E(t)&&e<t&&(n=t),E(i)&&e>i&&(n=i),n):e}function pA(e,t){if(E(e)){var i=t.getHours()-e.getHours();if(i!==0){var n=i===1||i===-23?-1:1,r=new Date(t.getTime()+36e5*n);(n>0||r.getDate()===t.getDate())&&t.setTime(r.getTime())}}}var d2=function(e){var t=new Date(e.getTime());return t.setHours(t.getHours()+1),t.setMinutes(0),t};function vA(e,t){return 60*(t.getTimezoneOffset()-e.getTimezoneOffset())*1e3}var c2=function(e){return new Date(e)},h2=function(e,t,i){for(var n=[],r=new Date(e.getTime());r<t;)n.push(new Date(r.getTime())),r=this.addInterval(r,i);return n},un=function(e){var t=new Date(...arguments);return t.setFullYear(e),t},Pe={dateUnitIntervals:Dl,convertMillisecondsToDateUnits:nA,dateToMilliseconds:N$,getNextDateUnit:V$,convertDateUnitToMilliseconds:Xc,getDateUnitInterval:$h,getDateFormatByTickInterval:$$,getDatesDifferences:z$,correctDateWithUnitBeginning:oA,trimTime:sA,setToDayEnd:W$,roundDateByStartDayHour:u2,dateTimeFromDecimal:l2,addDateInterval:lA,addInterval:uA,getSequenceByInterval:G$,getDateIntervalByString:dA,sameDate:J$,sameMonthAndYear:N_,sameMonth:N_,sameYear:cA,sameDecade:e2,sameCentury:t2,getDifferenceInMonth:Z$,getDifferenceInMonthForCells:Q$,getFirstYearInDecade:Pu,getFirstDecadeInCentury:Lu,getShortDateFormat:i2,getViewFirstCellDate:U$,getViewLastCellDate:K$,getViewDown:X$,getViewUp:Y$,getLastMonthDay:Zc,getLastMonthDate:r2,getFirstMonthDate:n2,getFirstWeekDate:hA,normalizeDateByWeek:a2,getQuarter:rA,getFirstQuarterMonth:aA,dateInRange:o2,intervalsOverlap:s2,roundToHour:d2,normalizeDate:fA,getViewMinBoundaryDate:j$,getViewMaxBoundaryDate:q$,fixTimezoneGap:pA,getTimezonesDifference:vA,makeDate:c2,getDatesInterval:M$,getDatesOfInterval:h2,createDateWithFullYear:un};Pe.sameView=function(e,t,i){return Pe[Nc("same "+e)](t,i)};var Kf=10;function f2(e){var t=Ds(e);return t*Math.round(Math.abs(e))}function p2(e,t){var i=Math.pow(Kf,t),n=i*Kf,r=e*n/Kf;return f2(r)/i}function _A(e,t){var i=t||0,n=i>0?p2(...arguments):e;return n.toFixed(i)}var v2={thousandsSeparator:",",decimalSeparator:"."},o0="'",_2=15;function g2(e){return e.split(",").slice(1).map(function(t){var i=0;return t.split("").filter(function(n,r){i+=n==="'";var a=n==="#"||n==="0",o=i%2;return a&&!o}).length})}function m2(e){var t=e.split(";");return t.length===1&&t.push("-"+t[0]),t}function jf(e){return e.toString().split("").reverse().join("")}function C2(e){return e.indexOf("%")!==-1&&!e.match(/'[^']*%[^']*'/g)}function gA(e){return e.replace(/'.+'/g,"")}function s0(e){if(!e)return 0;var t=gA(e);return t.length-t.replace(/[#]/g,"").length}function l0(e){if(!e)return 0;var t=gA(e);return t.length-t.replace(/[0]/g,"").length}function u0(e,t,i){if(!e)return"";for(e.length>i&&(e=e.substr(0,i));e.length>t&&e.slice(-1)==="0";)e=e.substr(0,e.length-1);for(;e.length<t;)e+="0";return e}function y2(e,t,i){if(!t.length)return e;for(var n=[],r=0;e;){var a=t[r];if(!a)break;n.push(e.slice(0,a)),e=e.slice(a),r<t.length-1&&r++}return n.join(i)}function d0(e,t){return e.split(o0).map(function(i,n){var r=n%2;return!i&&r?o0:r?i:i.replace(/[,#0]+/,t)}).join("")}function x2(e){for(var t=!1,i=0;i<e.length;i++)if(e[i]==="'"&&(t=!t),e[i]==="."&&!t)return i;return e.length}function b2(e,t){return t=t||v2,function(i){if(typeof i!="number"||isNaN(i))return"";var n=m2(e),r=1/i===1/0,a=i>0||r,o=n[a?0:1];C2(o)&&(i*=100),a||(i=-i);var s=x2(o),l=[o.substr(0,s),o.substr(s+1)],u=l0(l[1]),d=u+s0(l[1]),c=l0(l[0]),h=s0(l[0])||t.unlimitedIntegerDigits?void 0:c,f=Math.floor(i).toString().length,p=Di(d,0,_2-f),g=g2(l[0]).reverse(),m=_A(i,p<0?0:p).split("."),C=u0(jf(m[0]),c,h),x=u0(m[1],u,d);C=y2(C,g,t.thousandsSeparator);var T=jf(d0(jf(l[0]),C)),R=d?d0(l[1],x):"",A=T+(R.match(/\d/)?t.decimalSeparator:"")+R;return A}}function zl(e,t,i){var n=(t?.01:1)*parseFloat(e)||0;return i?-n:n}function c0(e,t,i,n){var r=e,a,o,s;do s&&(a=o.length===s.length?"0":"1",e=n?a+e:e+a),o=s||t(zl(r,i)),r=n?"1"+r:r+"1",s=t(zl(r,i));while(o!==s&&(n?o.length===s.length:o.length<=s.length));if(n&&s.length>o.length){var l=t(12345).indexOf("12345")===-1;do e="1"+e;while(l&&zl(e,i)<1e5)}return e}function h0(e,t,i,n){var r=t(zl(e,i,n)),a=e.split("."),o=a[0]+".3"+a[1].slice(1),s=zl(o,i,n),l=t(s).indexOf("3")-1;return r=r.replace(/(\d)\D(\d)/g,"$1,$2"),l>=0&&(r=r.slice(0,l)+"."+r.slice(l+1)),r=r.replace(/1+/,"1").replace(/1/g,"#"),i||(r=r.replace("%","'%'")),r}function S2(e){var t=".",i=e(1).indexOf("100")>=0;t=c0(t,e,i,!0),t=c0(t,e,i,!1);var n=h0(t,e,i,!1),r=h0(t,e,i,!0);return r==="-"+n?n:n+";"+r}const E2={_formatNumberCore:function(e,t,i){if(t==="currency"){i.precision=i.precision||0;var n=this.format(e,O({},i,{type:"fixedpoint"})),r=this.getCurrencySymbol().symbol.replace(/\$/g,"$$$$");return n=n.replace(/^(\D*)(\d.*)/,"$1"+r+"$2"),n}return this.callBase.apply(this,arguments)},getCurrencySymbol:function(){return{symbol:"$"}},getOpenXmlCurrencyFormat:function(){return"$#,##0{0}_);\\($#,##0{0}\\)"}},w2=(e,t)=>{if(t){var i=e;if(typeof e=="string"){i="";for(var n=0;n<e.length;n++)e[n]!=="$"&&(i+="\\"),i+=e[n]}for(var r={".00":"{0}","'":"\\'","\\(":"\\(","\\)":"\\)"," ":"\\ ",'"':"&quot;","\\¤":i},a=t.split(";"),o=0;o<a.length;o++)for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a[o]=a[o].replace(new RegExp(s,"g"),r[s]));return a.length===2?a[0]+"_);"+a[1]:a[0]}},I2={af:"¤#,##0.00;(¤#,##0.00)","af-NA":"¤#,##0.00;(¤#,##0.00)",agq:"#,##0.00¤",ak:"¤#,##0.00",am:"¤#,##0.00;(¤#,##0.00)",ar:"¤#,##0.00;(¤#,##0.00)","ar-AE":"¤#,##0.00;(¤#,##0.00)","ar-BH":"¤#,##0.00;(¤#,##0.00)","ar-DJ":"¤#,##0.00;(¤#,##0.00)","ar-DZ":"¤#,##0.00;(¤#,##0.00)","ar-EG":"¤#,##0.00;(¤#,##0.00)","ar-EH":"¤#,##0.00;(¤#,##0.00)","ar-ER":"¤#,##0.00;(¤#,##0.00)","ar-IL":"¤#,##0.00;(¤#,##0.00)","ar-IQ":"¤#,##0.00;(¤#,##0.00)","ar-JO":"¤#,##0.00;(¤#,##0.00)","ar-KM":"¤#,##0.00;(¤#,##0.00)","ar-KW":"¤#,##0.00;(¤#,##0.00)","ar-LB":"¤#,##0.00;(¤#,##0.00)","ar-LY":"¤#,##0.00;(¤#,##0.00)","ar-MA":"¤#,##0.00;(¤#,##0.00)","ar-MR":"¤#,##0.00;(¤#,##0.00)","ar-OM":"¤#,##0.00;(¤#,##0.00)","ar-PS":"¤#,##0.00;(¤#,##0.00)","ar-QA":"¤#,##0.00;(¤#,##0.00)","ar-SA":"¤#,##0.00;(¤#,##0.00)","ar-SD":"¤#,##0.00;(¤#,##0.00)","ar-SO":"¤#,##0.00;(¤#,##0.00)","ar-SS":"¤#,##0.00;(¤#,##0.00)","ar-SY":"¤#,##0.00;(¤#,##0.00)","ar-TD":"¤#,##0.00;(¤#,##0.00)","ar-TN":"¤#,##0.00;(¤#,##0.00)","ar-YE":"¤#,##0.00;(¤#,##0.00)",as:"¤ #,##,##0.00",asa:"#,##0.00 ¤",ast:"#,##0.00 ¤",az:"#,##0.00 ¤","az-Cyrl":"#,##0.00 ¤","az-Latn":"#,##0.00 ¤",bas:"#,##0.00 ¤",be:"#,##0.00 ¤","be-tarask":"#,##0.00 ¤",bem:"¤#,##0.00;(¤#,##0.00)",bez:"#,##0.00¤",bg:"0.00 ¤;(0.00 ¤)",bm:"¤#,##0.00;(¤#,##0.00)",bn:"#,##,##0.00¤;(#,##,##0.00¤)","bn-IN":"#,##,##0.00¤;(#,##,##0.00¤)",bo:"¤ #,##0.00","bo-IN":"¤ #,##0.00",br:"#,##0.00 ¤",brx:"¤ #,##,##0.00",bs:"#,##0.00 ¤","bs-Cyrl":"#,##0.00 ¤","bs-Latn":"#,##0.00 ¤",ca:"#,##0.00 ¤;(#,##0.00 ¤)","ca-AD":"#,##0.00 ¤;(#,##0.00 ¤)","ca-ES-valencia":"#,##0.00 ¤;(#,##0.00 ¤)","ca-FR":"#,##0.00 ¤;(#,##0.00 ¤)","ca-IT":"#,##0.00 ¤;(#,##0.00 ¤)",ccp:"#,##,##0.00¤;(#,##,##0.00¤)","ccp-IN":"#,##,##0.00¤;(#,##,##0.00¤)",ce:"#,##0.00 ¤",ceb:"¤#,##0.00;(¤#,##0.00)",cgg:"¤#,##0.00",chr:"¤#,##0.00;(¤#,##0.00)",ckb:"¤ #,##0.00","ckb-IR":"¤ #,##0.00",cs:"#,##0.00 ¤",cy:"¤#,##0.00;(¤#,##0.00)",da:"#,##0.00 ¤","da-GL":"#,##0.00 ¤",dav:"¤#,##0.00;(¤#,##0.00)",de:"#,##0.00 ¤","de-AT":"#,##0.00 ¤","de-BE":"#,##0.00 ¤","de-CH":"#,##0.00 ¤","de-IT":"#,##0.00 ¤","de-LI":"#,##0.00 ¤","de-LU":"#,##0.00 ¤",dje:"#,##0.00¤",doi:"¤#,##0.00",dsb:"#,##0.00 ¤",dua:"#,##0.00 ¤",dyo:"#,##0.00 ¤",dz:"¤#,##,##0.00",ebu:"¤#,##0.00;(¤#,##0.00)",ee:"¤#,##0.00;(¤#,##0.00)","ee-TG":"¤#,##0.00;(¤#,##0.00)",el:"#,##0.00 ¤","el-CY":"#,##0.00 ¤",en:"¤#,##0.00;(¤#,##0.00)","en-001":"¤#,##0.00;(¤#,##0.00)","en-150":"#,##0.00 ¤","en-AE":"¤#,##0.00;(¤#,##0.00)","en-AG":"¤#,##0.00;(¤#,##0.00)","en-AI":"¤#,##0.00;(¤#,##0.00)","en-AS":"¤#,##0.00;(¤#,##0.00)","en-AT":"¤ #,##0.00","en-AU":"¤#,##0.00;(¤#,##0.00)","en-BB":"¤#,##0.00;(¤#,##0.00)","en-BE":"#,##0.00 ¤","en-BI":"¤#,##0.00;(¤#,##0.00)","en-BM":"¤#,##0.00;(¤#,##0.00)","en-BS":"¤#,##0.00;(¤#,##0.00)","en-BW":"¤#,##0.00;(¤#,##0.00)","en-BZ":"¤#,##0.00;(¤#,##0.00)","en-CA":"¤#,##0.00;(¤#,##0.00)","en-CC":"¤#,##0.00;(¤#,##0.00)","en-CH":"¤ #,##0.00;¤-#,##0.00","en-CK":"¤#,##0.00;(¤#,##0.00)","en-CM":"¤#,##0.00;(¤#,##0.00)","en-CX":"¤#,##0.00;(¤#,##0.00)","en-CY":"¤#,##0.00;(¤#,##0.00)","en-DE":"#,##0.00 ¤","en-DG":"¤#,##0.00;(¤#,##0.00)","en-DK":"#,##0.00 ¤","en-DM":"¤#,##0.00;(¤#,##0.00)","en-ER":"¤#,##0.00;(¤#,##0.00)","en-FI":"#,##0.00 ¤","en-FJ":"¤#,##0.00;(¤#,##0.00)","en-FK":"¤#,##0.00;(¤#,##0.00)","en-FM":"¤#,##0.00;(¤#,##0.00)","en-GB":"¤#,##0.00;(¤#,##0.00)","en-GD":"¤#,##0.00;(¤#,##0.00)","en-GG":"¤#,##0.00;(¤#,##0.00)","en-GH":"¤#,##0.00;(¤#,##0.00)","en-GI":"¤#,##0.00;(¤#,##0.00)","en-GM":"¤#,##0.00;(¤#,##0.00)","en-GU":"¤#,##0.00;(¤#,##0.00)","en-GY":"¤#,##0.00;(¤#,##0.00)","en-HK":"¤#,##0.00;(¤#,##0.00)","en-IE":"¤#,##0.00;(¤#,##0.00)","en-IL":"¤#,##0.00;(¤#,##0.00)","en-IM":"¤#,##0.00;(¤#,##0.00)","en-IN":"¤#,##0.00;(¤#,##0.00)","en-IO":"¤#,##0.00;(¤#,##0.00)","en-JE":"¤#,##0.00;(¤#,##0.00)","en-JM":"¤#,##0.00;(¤#,##0.00)","en-KE":"¤#,##0.00;(¤#,##0.00)","en-KI":"¤#,##0.00;(¤#,##0.00)","en-KN":"¤#,##0.00;(¤#,##0.00)","en-KY":"¤#,##0.00;(¤#,##0.00)","en-LC":"¤#,##0.00;(¤#,##0.00)","en-LR":"¤#,##0.00;(¤#,##0.00)","en-LS":"¤#,##0.00;(¤#,##0.00)","en-MG":"¤#,##0.00;(¤#,##0.00)","en-MH":"¤#,##0.00;(¤#,##0.00)","en-MO":"¤#,##0.00;(¤#,##0.00)","en-MP":"¤#,##0.00;(¤#,##0.00)","en-MS":"¤#,##0.00;(¤#,##0.00)","en-MT":"¤#,##0.00;(¤#,##0.00)","en-MU":"¤#,##0.00;(¤#,##0.00)","en-MW":"¤#,##0.00;(¤#,##0.00)","en-MY":"¤#,##0.00;(¤#,##0.00)","en-NA":"¤#,##0.00;(¤#,##0.00)","en-NF":"¤#,##0.00;(¤#,##0.00)","en-NG":"¤#,##0.00;(¤#,##0.00)","en-NL":"¤ #,##0.00;(¤ #,##0.00)","en-NR":"¤#,##0.00;(¤#,##0.00)","en-NU":"¤#,##0.00;(¤#,##0.00)","en-NZ":"¤#,##0.00;(¤#,##0.00)","en-PG":"¤#,##0.00;(¤#,##0.00)","en-PH":"¤#,##0.00;(¤#,##0.00)","en-PK":"¤#,##0.00;(¤#,##0.00)","en-PN":"¤#,##0.00;(¤#,##0.00)","en-PR":"¤#,##0.00;(¤#,##0.00)","en-PW":"¤#,##0.00;(¤#,##0.00)","en-RW":"¤#,##0.00;(¤#,##0.00)","en-SB":"¤#,##0.00;(¤#,##0.00)","en-SC":"¤#,##0.00;(¤#,##0.00)","en-SD":"¤#,##0.00;(¤#,##0.00)","en-SE":"#,##0.00 ¤","en-SG":"¤#,##0.00;(¤#,##0.00)","en-SH":"¤#,##0.00;(¤#,##0.00)","en-SI":"#,##0.00 ¤;(#,##0.00 ¤)","en-SL":"¤#,##0.00;(¤#,##0.00)","en-SS":"¤#,##0.00;(¤#,##0.00)","en-SX":"¤#,##0.00;(¤#,##0.00)","en-SZ":"¤#,##0.00;(¤#,##0.00)","en-TC":"¤#,##0.00;(¤#,##0.00)","en-TK":"¤#,##0.00;(¤#,##0.00)","en-TO":"¤#,##0.00;(¤#,##0.00)","en-TT":"¤#,##0.00;(¤#,##0.00)","en-TV":"¤#,##0.00;(¤#,##0.00)","en-TZ":"¤#,##0.00;(¤#,##0.00)","en-UG":"¤#,##0.00;(¤#,##0.00)","en-UM":"¤#,##0.00;(¤#,##0.00)","en-VC":"¤#,##0.00;(¤#,##0.00)","en-VG":"¤#,##0.00;(¤#,##0.00)","en-VI":"¤#,##0.00;(¤#,##0.00)","en-VU":"¤#,##0.00;(¤#,##0.00)","en-WS":"¤#,##0.00;(¤#,##0.00)","en-ZA":"¤#,##0.00;(¤#,##0.00)","en-ZM":"¤#,##0.00;(¤#,##0.00)","en-ZW":"¤#,##0.00;(¤#,##0.00)",eo:"¤ #,##0.00",es:"#,##0.00 ¤","es-419":"¤#,##0.00","es-AR":"¤ #,##0.00;(¤ #,##0.00)","es-BO":"¤#,##0.00","es-BR":"¤#,##0.00","es-BZ":"¤#,##0.00","es-CL":"¤#,##0.00","es-CO":"¤#,##0.00","es-CR":"¤#,##0.00","es-CU":"¤#,##0.00","es-DO":"¤#,##0.00;(¤#,##0.00)","es-EA":"#,##0.00 ¤","es-EC":"¤#,##0.00","es-GQ":"#,##0.00 ¤","es-GT":"¤#,##0.00","es-HN":"¤#,##0.00","es-IC":"#,##0.00 ¤","es-MX":"¤#,##0.00","es-NI":"¤#,##0.00","es-PA":"¤#,##0.00","es-PE":"¤#,##0.00","es-PH":"#,##0.00 ¤","es-PR":"¤#,##0.00","es-PY":"¤#,##0.00","es-SV":"¤#,##0.00","es-US":"¤#,##0.00","es-UY":"¤ #,##0.00;(¤ #,##0.00)","es-VE":"¤#,##0.00",et:"#,##0.00 ¤;(#,##0.00 ¤)",eu:"#,##0.00 ¤;(#,##0.00 ¤)",ewo:"#,##0.00 ¤",fa:"‎¤ #,##0.00;‎(¤ #,##0.00)","fa-AF":"¤ #,##0.00;‎(¤ #,##0.00)",ff:"#,##0.00 ¤","ff-Adlm":"¤ #,##0.00","ff-Adlm-BF":"¤ #,##0.00","ff-Adlm-CM":"¤ #,##0.00","ff-Adlm-GH":"¤ #,##0.00","ff-Adlm-GM":"¤ #,##0.00","ff-Adlm-GW":"¤ #,##0.00","ff-Adlm-LR":"¤ #,##0.00","ff-Adlm-MR":"¤ #,##0.00","ff-Adlm-NE":"¤ #,##0.00","ff-Adlm-NG":"¤ #,##0.00","ff-Adlm-SL":"¤ #,##0.00","ff-Adlm-SN":"¤ #,##0.00","ff-Latn":"#,##0.00 ¤","ff-Latn-BF":"#,##0.00 ¤","ff-Latn-CM":"#,##0.00 ¤","ff-Latn-GH":"#,##0.00 ¤","ff-Latn-GM":"#,##0.00 ¤","ff-Latn-GN":"#,##0.00 ¤","ff-Latn-GW":"#,##0.00 ¤","ff-Latn-LR":"#,##0.00 ¤","ff-Latn-MR":"#,##0.00 ¤","ff-Latn-NE":"#,##0.00 ¤","ff-Latn-NG":"#,##0.00 ¤","ff-Latn-SL":"#,##0.00 ¤",fi:"#,##0.00 ¤",fil:"¤#,##0.00;(¤#,##0.00)",fo:"#,##0.00 ¤;(#,##0.00 ¤)","fo-DK":"#,##0.00 ¤;(#,##0.00 ¤)",fr:"#,##0.00 ¤;(#,##0.00 ¤)","fr-BE":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BI":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BJ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-BL":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CA":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CD":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CG":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CH":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CI":"#,##0.00 ¤;(#,##0.00 ¤)","fr-CM":"#,##0.00 ¤;(#,##0.00 ¤)","fr-DJ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-DZ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GA":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GN":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GP":"#,##0.00 ¤;(#,##0.00 ¤)","fr-GQ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-HT":"#,##0.00 ¤;(#,##0.00 ¤)","fr-KM":"#,##0.00 ¤;(#,##0.00 ¤)","fr-LU":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MA":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MC":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MG":"#,##0.00 ¤;(#,##0.00 ¤)","fr-ML":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MQ":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MR":"#,##0.00 ¤;(#,##0.00 ¤)","fr-MU":"#,##0.00 ¤;(#,##0.00 ¤)","fr-NC":"#,##0.00 ¤;(#,##0.00 ¤)","fr-NE":"#,##0.00 ¤;(#,##0.00 ¤)","fr-PF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-PM":"#,##0.00 ¤;(#,##0.00 ¤)","fr-RE":"#,##0.00 ¤;(#,##0.00 ¤)","fr-RW":"#,##0.00 ¤;(#,##0.00 ¤)","fr-SC":"#,##0.00 ¤;(#,##0.00 ¤)","fr-SN":"#,##0.00 ¤;(#,##0.00 ¤)","fr-SY":"#,##0.00 ¤;(#,##0.00 ¤)","fr-TD":"#,##0.00 ¤;(#,##0.00 ¤)","fr-TG":"#,##0.00 ¤;(#,##0.00 ¤)","fr-TN":"#,##0.00 ¤;(#,##0.00 ¤)","fr-VU":"#,##0.00 ¤;(#,##0.00 ¤)","fr-WF":"#,##0.00 ¤;(#,##0.00 ¤)","fr-YT":"#,##0.00 ¤;(#,##0.00 ¤)",fur:"¤ #,##0.00",fy:"¤ #,##0.00;(¤ #,##0.00)",ga:"¤#,##0.00;(¤#,##0.00)","ga-GB":"¤#,##0.00;(¤#,##0.00)",gd:"¤#,##0.00;(¤#,##0.00)",gl:"#,##0.00 ¤",gsw:"#,##0.00 ¤","gsw-FR":"#,##0.00 ¤","gsw-LI":"#,##0.00 ¤",gu:"¤#,##,##0.00;(¤#,##,##0.00)",guz:"¤#,##0.00;(¤#,##0.00)",gv:"¤#,##0.00",ha:"¤ #,##0.00","ha-GH":"¤ #,##0.00","ha-NE":"¤ #,##0.00",haw:"¤#,##0.00;(¤#,##0.00)",he:"#,##0.00 ¤",hi:"¤#,##,##0.00",hr:"#,##0.00 ¤","hr-BA":"#,##0.00 ¤",hsb:"#,##0.00 ¤",hu:"#,##0.00 ¤",hy:"#,##0.00 ¤",ia:"¤ #,##0.00;(¤ #,##0.00)",id:"¤#,##0.00",ig:"¤#,##0.00;(¤#,##0.00)",ii:"¤ #,##0.00",is:"#,##0.00 ¤",it:"#,##0.00 ¤","it-CH":"#,##0.00 ¤","it-SM":"#,##0.00 ¤","it-VA":"#,##0.00 ¤",ja:"¤#,##0.00;(¤#,##0.00)",jgo:"¤ #,##0.00",jmc:"¤#,##0.00",jv:"¤ #,##0.00",ka:"#,##0.00 ¤",kab:"#,##0.00¤",kam:"¤#,##0.00;(¤#,##0.00)",kde:"¤#,##0.00;(¤#,##0.00)",kea:"#,##0.00 ¤;(#,##0.00 ¤)",kgp:"¤ #,##0.00",khq:"#,##0.00¤",ki:"¤#,##0.00;(¤#,##0.00)",kk:"#,##0.00 ¤",kkj:"¤ #,##0.00",kl:"¤#,##0.00;¤-#,##0.00",kln:"¤#,##0.00;(¤#,##0.00)",km:"#,##0.00¤;(#,##0.00¤)",kn:"¤#,##0.00;(¤#,##0.00)",ko:"¤#,##0.00;(¤#,##0.00)","ko-KP":"¤#,##0.00;(¤#,##0.00)",kok:"¤#,##0.00;(¤#,##0.00)",ks:"¤ #,##,##0.00","ks-Arab":"¤ #,##,##0.00",ksb:"#,##0.00¤",ksf:"#,##0.00 ¤",ksh:"#,##0.00 ¤",ku:"#,##0.00 ¤;(#,##0.00 ¤)",kw:"¤#,##0.00",ky:"#,##0.00 ¤",lag:"¤ #,##0.00",lb:"#,##0.00 ¤",lg:"#,##0.00¤",lkt:"¤ #,##0.00",ln:"#,##0.00 ¤","ln-AO":"#,##0.00 ¤","ln-CF":"#,##0.00 ¤","ln-CG":"#,##0.00 ¤",lo:"¤#,##0.00;¤-#,##0.00",lrc:"¤ #,##0.00","lrc-IQ":"¤ #,##0.00",lt:"#,##0.00 ¤",lu:"#,##0.00¤",luo:"#,##0.00¤",luy:"¤#,##0.00;¤- #,##0.00",lv:"#,##0.00 ¤",mai:"¤ #,##0.00",mas:"¤#,##0.00;(¤#,##0.00)","mas-TZ":"¤#,##0.00;(¤#,##0.00)",mer:"¤#,##0.00;(¤#,##0.00)",mfe:"¤ #,##0.00",mg:"¤#,##0.00",mgh:"¤ #,##0.00",mgo:"¤ #,##0.00",mi:"¤ #,##0.00",mk:"#,##0.00 ¤",ml:"¤#,##0.00;(¤#,##0.00)",mn:"¤ #,##0.00",mni:"¤ #,##0.00","mni-Beng":"¤ #,##0.00",mr:"¤#,##0.00;(¤#,##0.00)",ms:"¤#,##0.00;(¤#,##0.00)","ms-BN":"¤#,##0.00;(¤#,##0.00)","ms-ID":"¤#,##0.00","ms-SG":"¤#,##0.00;(¤#,##0.00)",mt:"¤#,##0.00",mua:"¤#,##0.00;(¤#,##0.00)",my:"¤ #,##0.00",mzn:"¤ #,##0.00",naq:"¤#,##0.00",nb:"¤ #,##0.00;(¤ #,##0.00)","nb-SJ":"¤ #,##0.00;(¤ #,##0.00)",nd:"¤#,##0.00;(¤#,##0.00)",nds:"¤ #,##0.00","nds-NL":"¤ #,##0.00",ne:"¤ #,##,##0.00","ne-IN":"¤ #,##,##0.00",nl:"¤ #,##0.00;(¤ #,##0.00)","nl-AW":"¤ #,##0.00;(¤ #,##0.00)","nl-BE":"¤ #,##0.00;(¤ #,##0.00)","nl-BQ":"¤ #,##0.00;(¤ #,##0.00)","nl-CW":"¤ #,##0.00;(¤ #,##0.00)","nl-SR":"¤ #,##0.00;(¤ #,##0.00)","nl-SX":"¤ #,##0.00;(¤ #,##0.00)",nmg:"#,##0.00 ¤",nn:"#,##0.00 ¤",nnh:"¤ #,##0.00",no:"¤ #,##0.00;(¤ #,##0.00)",nus:"¤#,##0.00;(¤#,##0.00)",nyn:"¤#,##0.00",om:"¤#,##0.00","om-KE":"¤#,##0.00",or:"¤#,##0.00;(¤#,##0.00)",os:"¤ #,##0.00","os-RU":"¤ #,##0.00",pa:"¤ #,##0.00","pa-Arab":"¤ #,##0.00","pa-Guru":"¤ #,##0.00",pcm:"¤#,##0.00",pl:"#,##0.00 ¤;(#,##0.00 ¤)",ps:"¤#,##0.00;(¤#,##0.00)","ps-PK":"¤#,##0.00;(¤#,##0.00)",pt:"¤ #,##0.00","pt-AO":"#,##0.00 ¤;(#,##0.00 ¤)","pt-CH":"#,##0.00 ¤;(#,##0.00 ¤)","pt-CV":"#,##0.00 ¤;(#,##0.00 ¤)","pt-GQ":"#,##0.00 ¤;(#,##0.00 ¤)","pt-GW":"#,##0.00 ¤;(#,##0.00 ¤)","pt-LU":"#,##0.00 ¤;(#,##0.00 ¤)","pt-MO":"#,##0.00 ¤;(#,##0.00 ¤)","pt-MZ":"#,##0.00 ¤;(#,##0.00 ¤)","pt-PT":"#,##0.00 ¤;(#,##0.00 ¤)","pt-ST":"#,##0.00 ¤;(#,##0.00 ¤)","pt-TL":"#,##0.00 ¤;(#,##0.00 ¤)",qu:"¤ #,##0.00","qu-BO":"¤ #,##0.00","qu-EC":"¤ #,##0.00",rm:"#,##0.00 ¤",rn:"#,##0.00¤",ro:"#,##0.00 ¤;(#,##0.00 ¤)","ro-MD":"#,##0.00 ¤;(#,##0.00 ¤)",rof:"¤#,##0.00",ru:"#,##0.00 ¤","ru-BY":"#,##0.00 ¤","ru-KG":"#,##0.00 ¤","ru-KZ":"#,##0.00 ¤","ru-MD":"#,##0.00 ¤","ru-UA":"#,##0.00 ¤",rw:"¤ #,##0.00",rwk:"#,##0.00¤",sa:"¤ #,##0.00",sah:"#,##0.00 ¤",saq:"¤#,##0.00;(¤#,##0.00)",sat:"¤ #,##0.00","sat-Olck":"¤ #,##0.00",sbp:"#,##0.00¤",sc:"#,##0.00 ¤",sd:"¤ #,##0.00","sd-Arab":"¤ #,##0.00","sd-Deva":"¤ #,##0.00",se:"#,##0.00 ¤","se-FI":"#,##0.00 ¤","se-SE":"#,##0.00 ¤",seh:"#,##0.00¤",ses:"#,##0.00¤",sg:"¤#,##0.00;¤-#,##0.00",shi:"#,##0.00¤","shi-Latn":"#,##0.00¤","shi-Tfng":"#,##0.00¤",si:"¤#,##0.00;(¤#,##0.00)",sk:"#,##0.00 ¤;(#,##0.00 ¤)",sl:"#,##0.00 ¤;(#,##0.00 ¤)",smn:"#,##0.00 ¤",sn:"¤#,##0.00;(¤#,##0.00)",so:"¤#,##0.00;(¤#,##0.00)","so-DJ":"¤#,##0.00;(¤#,##0.00)","so-ET":"¤#,##0.00;(¤#,##0.00)","so-KE":"¤#,##0.00;(¤#,##0.00)",sq:"#,##0.00 ¤;(#,##0.00 ¤)","sq-MK":"#,##0.00 ¤;(#,##0.00 ¤)","sq-XK":"#,##0.00 ¤;(#,##0.00 ¤)",sr:"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl-BA":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl-ME":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Cyrl-XK":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn-BA":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn-ME":"#,##0.00 ¤;(#,##0.00 ¤)","sr-Latn-XK":"#,##0.00 ¤;(#,##0.00 ¤)",su:"¤#,##0.00","su-Latn":"¤#,##0.00",sv:"#,##0.00 ¤","sv-AX":"#,##0.00 ¤","sv-FI":"#,##0.00 ¤",sw:"¤ #,##0.00","sw-CD":"¤ #,##0.00","sw-KE":"¤ #,##0.00","sw-UG":"¤ #,##0.00",ta:"¤#,##0.00;(¤#,##0.00)","ta-LK":"¤#,##0.00;(¤#,##0.00)","ta-MY":"¤#,##0.00;(¤#,##0.00)","ta-SG":"¤#,##0.00;(¤#,##0.00)",te:"¤#,##0.00;(¤#,##0.00)",teo:"¤#,##0.00;(¤#,##0.00)","teo-KE":"¤#,##0.00;(¤#,##0.00)",tg:"#,##0.00 ¤",th:"¤#,##0.00;(¤#,##0.00)",ti:"¤#,##0.00","ti-ER":"¤#,##0.00",tk:"#,##0.00 ¤",to:"¤ #,##0.00",tr:"¤#,##0.00;(¤#,##0.00)","tr-CY":"¤#,##0.00;(¤#,##0.00)",tt:"#,##0.00 ¤",twq:"#,##0.00¤",tzm:"#,##0.00 ¤",ug:"¤#,##0.00;(¤#,##0.00)",uk:"#,##0.00 ¤",und:"¤ #,##0.00",ur:"¤#,##0.00;(¤#,##0.00)","ur-IN":"¤#,##0.00;(¤#,##0.00)",uz:"#,##0.00 ¤","uz-Arab":"¤ #,##0.00","uz-Cyrl":"#,##0.00 ¤","uz-Latn":"#,##0.00 ¤",vai:"¤#,##0.00;(¤#,##0.00)","vai-Latn":"¤#,##0.00;(¤#,##0.00)","vai-Vaii":"¤#,##0.00;(¤#,##0.00)",vi:"#,##0.00 ¤",vun:"¤#,##0.00",wae:"¤ #,##0.00",wo:"¤ #,##0.00",xh:"¤#,##0.00",xog:"#,##0.00 ¤",yav:"#,##0.00 ¤;(#,##0.00 ¤)",yi:"¤ #,##0.00",yo:"¤#,##0.00;(¤#,##0.00)","yo-BJ":"¤#,##0.00;(¤#,##0.00)",yrl:"¤ #,##0.00","yrl-CO":"¤ #,##0.00","yrl-VE":"¤ #,##0.00",yue:"¤#,##0.00;(¤#,##0.00)","yue-Hans":"¤#,##0.00;(¤#,##0.00)","yue-Hant":"¤#,##0.00;(¤#,##0.00)",zgh:"#,##0.00¤",zh:"¤#,##0.00;(¤#,##0.00)","zh-Hans":"¤#,##0.00;(¤#,##0.00)","zh-Hans-HK":"¤#,##0.00;(¤#,##0.00)","zh-Hans-MO":"¤#,##0.00;(¤#,##0.00)","zh-Hans-SG":"¤#,##0.00;(¤#,##0.00)","zh-Hant":"¤#,##0.00;(¤#,##0.00)","zh-Hant-HK":"¤#,##0.00;(¤#,##0.00)","zh-Hant-MO":"¤#,##0.00;(¤#,##0.00)",zu:"¤#,##0.00;(¤#,##0.00)"};var T2=["standard","accounting"],A2=/([^\s0]+)?(\s*)0*[.,]*0*(\s*)([^\s0]+)?/,qf={},f0=e=>{var t=pn.locale()+"/"+JSON.stringify(e);return qf[t]||(qf[t]=new Intl.NumberFormat(pn.locale(),e).format),qf[t]},D2=e=>new Intl.NumberFormat(pn.locale(),{style:"currency",currency:e});const O2={engine:function(){return"intl"},_formatNumberCore:function(e,t,i){return t==="exponential"?this.callBase.apply(this,arguments):f0(this._normalizeFormatConfig(t,i,e))(e)},_normalizeFormatConfig:function(e,t,i){var n;if(e==="decimal"?n={minimumIntegerDigits:t.precision||void 0,useGrouping:!1,maximumFractionDigits:String(i).length,round:i<0?"ceil":"floor"}:n=this._getPrecisionConfig(t.precision),e==="percent")n.style="percent";else if(e==="currency"){var r,a=(r=t.useCurrencyAccountingStyle)!==null&&r!==void 0?r:It().defaultUseCurrencyAccountingStyle;n.style="currency",n.currency=t.currency||It().defaultCurrency,n.currencySign=T2[+a]}return n},_getPrecisionConfig:function(e){var t;return e===null?t={minimumFractionDigits:0,maximumFractionDigits:20}:t={minimumFractionDigits:e||0,maximumFractionDigits:e||0},t},format:function(e,t){return typeof e!="number"?e:(t=this._normalizeFormat(t),t.currency==="default"&&(t.currency=It().defaultCurrency),!t||typeof t!="function"&&!t.type&&!t.formatter?f0(t)(e):this.callBase.apply(this,arguments))},_getCurrencySymbolInfo:function(e){var t=D2(e);return this._extractCurrencySymbolInfo(t.format(0))},_extractCurrencySymbolInfo:function(e){var t=A2.exec(e)||[],i=t[1]?"before":"after",n=t[1]||t[4]||"",r=t[2]||t[3]||"";return{position:i,symbol:n,delimiter:r}},getCurrencySymbol:function(e){e||(e=It().defaultCurrency);var t=this._getCurrencySymbolInfo(e);return{symbol:t.symbol}},getOpenXmlCurrencyFormat:function(e){var t=e||It().defaultCurrency,i=this._getCurrencySymbolInfo(t).symbol,n=pn.getValueByClosestLocale(r=>I2[r]);return w2(i,n)}};var R2=typeof Intl<"u",k2=4,fd=10,p0=["currency","fixedpoint","exponential","percent","decimal"],Yf={1:"K",2:"M",3:"B",4:"T"},v0={largenumber:"auto",thousands:1,millions:2,billions:3,trillions:4},yt=kn({engine:function(){return"base"},numericFormats:p0,defaultLargeNumberFormatPostfixes:Yf,_parseNumberFormatString:function(e){var t={};if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(" ");if(F(i,(n,r)=>{p0.includes(r)?t.formatType=r:r in v0&&(t.power=v0[r])}),t.power&&!t.formatType&&(t.formatType="fixedpoint"),t.formatType)return t}},_calculateNumberPower:function(e,t,i,n){var r=Math.abs(e),a=0;if(r>1)for(;r&&r>=t&&(n===void 0||a<n);)a++,r/=t;else if(r>0&&r<1)for(;r<1&&(i===void 0||a>i);)a--,r*=t;return a},_getNumberByPower:function(e,t,i){for(var n=e;t>0;)n/=i,t--;for(;t<0;)n*=i,t++;return n},_formatNumber:function(e,t,i){t.power==="auto"&&(t.power=this._calculateNumberPower(e,1e3,0,k2)),t.power&&(e=this._getNumberByPower(e,t.power,1e3));var n=this.defaultLargeNumberFormatPostfixes[t.power]||"",r=this._formatNumberCore(e,t.formatType,i);return r=r.replace(/(\d|.$)(\D*)$/,"$1"+n+"$2"),r},_formatNumberExponential:function(e,t){var i=this._calculateNumberPower(e,fd),n=this._getNumberByPower(e,i,fd);t.precision===void 0&&(t.precision=1),n.toFixed(t.precision||0)>=fd&&(i++,n/=fd);var r=(i>=0?"+":"")+i.toString();return this._formatNumberCore(n,"fixedpoint",t)+"E"+r},_addZeroes:function(e,t){var i=Math.pow(10,t),n=e<0?"-":"";e=(Math.abs(e)*i>>>0)/i;for(var r=e.toString();r.length<t;)r="0"+r;return n+r},_addGroupSeparators:function(e){var t=e.toString().split(".");return t[0].replace(/\B(?=(\d{3})+(?!\d))/g,It().thousandsSeparator)+(t[1]?It().decimalSeparator+t[1]:"")},_formatNumberCore:function(e,t,i){return t==="exponential"?this._formatNumberExponential(e,i):(t!=="decimal"&&i.precision!==null&&(i.precision=i.precision||0),t==="percent"&&(e*=100),i.precision!==void 0&&(t==="decimal"?e=this._addZeroes(e,i.precision):e=i.precision===null?e.toPrecision():_A(e,i.precision)),t!=="decimal"?e=this._addGroupSeparators(e):e=e.toString().replace(".",It().decimalSeparator),t==="percent"&&(e+="%"),e)},_normalizeFormat:function(e){return e?(typeof e=="function"||Ye(e)||(e={type:e}),e):{}},_getSeparators:function(){return{decimalSeparator:this.getDecimalSeparator(),thousandsSeparator:this.getThousandsSeparator()}},getThousandsSeparator:function(){return this.format(1e4,"fixedPoint")[2]},getDecimalSeparator:function(){return this.format(1.2,{type:"fixedPoint",precision:1})[1]},convertDigits:function(e,t){var i=this.format(90,"decimal");if(typeof e!="string"||i[1]==="0")return e;var n=t?i[1]:"0",r=t?"0":i[1],a=t?i[0]:"9",o=new RegExp("["+n+"-"+a+"]","g");return e.replace(o,s=>String.fromCharCode(s.charCodeAt(0)+(r.charCodeAt(0)-n.charCodeAt(0))))},getNegativeEtalonRegExp:function(e){var t=this._getSeparators(),i=new RegExp("[0-9"+Or(t.decimalSeparator+t.thousandsSeparator)+"]+","g"),n=this.format(-1,e).replace(i,"1");return["\\","(",")","[","]","*","+","$","^","?","|","{","}"].forEach(r=>{n=n.replaceAll(r,"\\".concat(r))}),n=n.replaceAll(" ","\\s"),n=n.replaceAll("1",".+"),new RegExp(n,"g")},getSign:function(e,t){if(!t)return e.replace(/[^0-9-]/g,"").charAt(0)==="-"?-1:1;var i=this.getNegativeEtalonRegExp(t);return e.match(i)?-1:1},format:function(e,t){if(typeof e!="number"||typeof t=="number")return e;if(t=t&&t.formatter||t,typeof t=="function")return t(e);t=this._normalizeFormat(t),t.type||(t.type="decimal");var i=this._parseNumberFormatString(t.type);if(!i){var n=this._getSeparators();return n.unlimitedIntegerDigits=t.unlimitedIntegerDigits,this.convertDigits(b2(t.type,n)(e))}return this._formatNumber(e,i,t)},parse:function(e,t){if(e){if(t&&t.parser)return t.parser(e);e=this.convertDigits(e,!0),t&&typeof t!="string"&&_t.log("W0011");var i=this.getDecimalSeparator(),n=new RegExp("[^0-9"+Or(i)+"]","g"),r=e.replace(n,"").replace(i,".").replace(/\.$/g,"");if(r==="."||r==="")return null;if(this._calcSignificantDigits(r)>15)return NaN;var a=+r*this.getSign(e,t);t=this._normalizeFormat(t);var o=this._parseNumberFormatString(t.type),s=o==null?void 0:o.power;if(s){if(s==="auto"){var l=e.match(/\d(K|M|B|T)/);l&&(s=Object.keys(Yf).find(u=>Yf[u]===l[1]))}a*=Math.pow(10,3*s)}return(o==null?void 0:o.formatType)==="percent"&&(a/=100),a}},_calcSignificantDigits:function(e){var[t,i]=e.split("."),n=a=>{for(var o=-1,s=0;s<a.length;s++)if(a[s]!=="0"){o=s;break}return o>-1?a.length-o:0},r=0;return t&&(r+=n(t.split(""))),i&&(r+=n(i.split("").reverse())),r}});yt.inject(E2);R2&&yt.inject(O2);function yn(e,t){for(;e.length<t;)e="0"+e;return e}var el={3:"abbreviated",4:"wide",5:"narrow"},H_={y:function(e,t,i){var n=e[i?"getUTCFullYear":"getFullYear"]();return t===2&&(n%=100),yn(n.toString(),t)},M:function(e,t,i,n){var r=e[i?"getUTCMonth":"getMonth"](),a=el[t];return a?n.getMonthNames(a,"format")[r]:yn((r+1).toString(),Math.min(t,2))},L:function(e,t,i,n){var r=e[i?"getUTCMonth":"getMonth"](),a=el[t];return a?n.getMonthNames(a,"standalone")[r]:yn((r+1).toString(),Math.min(t,2))},Q:function(e,t,i,n){var r=e[i?"getUTCMonth":"getMonth"](),a=Math.floor(r/3),o=el[t];return o?n.getQuarterNames(o)[a]:yn((a+1).toString(),Math.min(t,2))},E:function(e,t,i,n){var r=e[i?"getUTCDay":"getDay"](),a=el[t<3?3:t];return n.getDayNames(a)[r]},a:function(e,t,i,n){var r=e[i?"getUTCHours":"getHours"](),a=r<12?0:1,o=el[t];return n.getPeriodNames(o)[a]},d:function(e,t,i){return yn(e[i?"getUTCDate":"getDate"]().toString(),Math.min(t,2))},H:function(e,t,i){return yn(e[i?"getUTCHours":"getHours"]().toString(),Math.min(t,2))},h:function(e,t,i){var n=e[i?"getUTCHours":"getHours"]();return yn((n%12||12).toString(),Math.min(t,2))},m:function(e,t,i){return yn(e[i?"getUTCMinutes":"getMinutes"]().toString(),Math.min(t,2))},s:function(e,t,i){return yn(e[i?"getUTCSeconds":"getSeconds"]().toString(),Math.min(t,2))},S:function(e,t,i){return yn(e[i?"getUTCMilliseconds":"getMilliseconds"]().toString(),3).substr(0,t)},x:function(e,t,i){var n=i?0:e.getTimezoneOffset(),r=n>0?"-":"+",a=Math.abs(n),o=Math.floor(a/60),s=a%60,l=yn(o.toString(),2),u=yn(s.toString(),2);return r+l+(t>=3?":":"")+(t>1||s?u:"")},X:function(e,t,i){return i||!e.getTimezoneOffset()?"Z":H_.x(e,t,i)},Z:function(e,t,i){return H_.X(e,t>=5?3:2,i)}},mA=function(e,t){return function(i){var n,r,a,o=0,s=!1,l,u="";if(!i)return null;if(!e)return i;var d=e[e.length-1]==="Z"||e.slice(-3)==="'Z'";for(n=0;n<e.length;n++)a=e[n],r=H_[a],l=a===e[n+1],o++,l||(r&&!s&&(u+=r(i,o,d,t)),o=0),a==="'"&&!l?s=!s:(s||!r)&&(u+=a),a==="'"&&l&&n++;return u}},B2="،",CA=" .,:;/\\<>()-[]"+B2,L2=". m.",pa=function(e){var t=e&&yt.convertDigits(e,!1).charCodeAt(0),i=yt.convertDigits("0",!1).charCodeAt(0);return i<=t&&t<i+10},P2=function(e,t,i,n){var r=e[i],a=e[i+1];if(!n&&(r==="."||r===" "&&e.slice(i-1,i+3)===L2||r==="-"&&!pa(a)))return!0;var o=n&&t.some(s=>e[i]!==s[i]);return CA.indexOf(r)<0&&n===pa(r)&&(!n||o)},F2=function(e,t){if(!pa(e[t]))for(;t>0&&!pa(e[t-1])&&(e[t-1]==="."||CA.indexOf(e[t-1])<0);)t--;return t},M2=function(e,t,i,n){var r=0,a=[],o=function(s){return e[r]!==s[r]&&(n===void 0||pa(e[r])===n)};for(Array.isArray(t)||(t=[t]),r=0;r<e.length;r++)if(i.indexOf(r)<0&&t.filter(o).length){r=F2(e,r);do{if(n=pa(e[r]),!a.length&&!n&&pa(t[0][r]))break;a.push(r),i.unshift(r),r++}while(e[r]&&P2(e,t,r,n));break}return a.length===1&&(e[i[0]-1]==="0"||e[i[0]-1]==="٠")&&i.unshift(i[0]-1),a},V2=function(e,t,i,n){var r=t[0],a=r<n.length?n[r]:r;return t.forEach(function(o,s){e=e.substr(0,a+s)+(i.length>1?i[s]:i)+e.substr(a+s+1)}),t.length===1&&(e=e.replace("0"+i,i+i),e=e.replace("٠"+i,i+i)),e},N2=function(e,t,i,n){var r,a,o;if(!pa(e[t[0]]||"0")){for(var s=Math.max(t.length<=3?3:4,i.length);t.length>s;){for(a=t.pop(),o=n[a],n[a]=-1,r=a+1;r<n.length;r++)n[r]--;e=e.substr(0,o)+e.substr(o+1)}for(a=t[t.length-1]+1,o=a<n.length?n[a]:a;t.length<s;){for(t.push(t[t.length-1]+1),r=a;r<n.length;r++)n[r]++;e=e.substr(0,o)+" "+e.substr(o)}}return e=V2(e,t,i,n),e},_0=function(e,t){return Array.isArray(e)?e.map(function(i){return(t(i)||"").toString()}):(t(e)||"").toString()},H2=/[a-zA-Z]/g,$2=function(e,t,i,n){var r=t.split("").map(function(a,o){return i.indexOf(o)<0&&(a.match(H2)||a==="'")?n[o]:-1});return e=e.split("").map(function(a,o){var s=a,l=r.indexOf(o)>=0,u=o>0&&r.indexOf(o-1)>=0,d=r.indexOf(o+1)>=0;return l&&(u||(s="'"+s),d||(s+="'")),s}).join(""),e},wm=function(e){var t=[],i=_0(new Date(2009,8,8,6,5,4),e),n=i.split("").map(function(s,l){return l}),r=i,a={},o=[{date:new Date(2009,8,8,6,5,4,111),pattern:"S"},{date:new Date(2009,8,8,6,5,2),pattern:"s"},{date:new Date(2009,8,8,6,2,4),pattern:"m"},{date:new Date(2009,8,8,18,5,4),pattern:"H",isDigit:!0},{date:new Date(2009,8,8,2,5,4),pattern:"h",isDigit:!0},{date:new Date(2009,8,8,18,5,4),pattern:"a",isDigit:!1},{date:new Date(2009,8,1,6,5,4),pattern:"d"},{date:[new Date(2009,8,2,6,5,4),new Date(2009,8,3,6,5,4),new Date(2009,8,4,6,5,4)],pattern:"E"},{date:new Date(2009,9,6,6,5,4),pattern:"M"},{date:new Date(1998,8,8,6,5,4),pattern:"y"}];if(r&&(o.forEach(function(s){var l=M2(i,_0(s.date,e),t,s.isDigit),u=s.pattern==="M"&&!a.d?"L":s.pattern;r=N2(r,l,u,n),a[u]=l.length}),r=$2(r,i,t,n),t.length))return r},Lr={3:"abbreviated",4:"wide",5:"narrow"},g0=function(e,t){return e>2?Object.keys(Lr).map(function(i){return["format","standalone"].map(function(n){return t.getMonthNames(Lr[i],n).join("|")}).join("|")}).join("|"):e===2?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},W2={":":function(e,t){var i=e>1?"{".concat(e,"}"):"",n=Or(t.getTimeSeparator());return n!==":"&&(n="".concat(n,"|:")),"".concat(n).concat(i)},y:function(e){return e===2?"[0-9]{".concat(e,"}"):"[0-9]+?"},M:g0,L:g0,Q:function(e,t){return e>2?t.getQuarterNames(Lr[e],"format").join("|"):"0?[1-4]"},E:function(e,t){return"\\D*"},a:function(e,t){return t.getPeriodNames(Lr[e<3?3:e],"format").join("|")},d:function(e){return e===2?"3[01]|[12][0-9]|0?[1-9]":"0??[1-9]|[12][0-9]|3[01]"},H:function(e){return e===2?"2[0-3]|1[0-9]|0?[0-9]":"0??[0-9]|1[0-9]|2[0-3]"},h:function(e){return e===2?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},m:function(e){return e===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},s:function(e){return e===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},S:function(e){return"[0-9]{1,".concat(e,"}")},w:function(e){return e===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"}},Er=Number,$_=function(e,t){return e.map(i=>i.toLowerCase()).indexOf(t.toLowerCase())},m0=function(e,t,i){return t>2?["format","standalone"].map(function(n){return Object.keys(Lr).map(function(r){var a=i.getMonthNames(Lr[r],n);return $_(a,e)})}).reduce(function(n,r){return n.concat(r)}).filter(function(n){return n>=0})[0]:Er(e)-1},z2={y:function(e,t){var i=Er(e);return t===2?i<30?2e3+i:1900+i:i},M:m0,L:m0,Q:function(e,t,i){return t>2?i.getQuarterNames(Lr[t],"format").indexOf(e):Er(e)-1},E:function(e,t,i){var n=i.getDayNames(Lr[t<3?3:t],"format");return $_(n,e)},a:function(e,t,i){var n=i.getPeriodNames(Lr[t<3?3:t],"format");return $_(n,e)},d:Er,H:Er,h:Er,m:Er,s:Er,S:function(e,t){for(t=Math.max(t,3),e=e.slice(0,3);t<3;)e+="0",t++;return Er(e)}},Qc=["y","M","d","h","m","s","S"],Im={y:"setFullYear",M:"setMonth",L:"setMonth",a:function(e,t,i){var n=e.getHours(),r=i.h;r!==void 0&&r!==n&&n--,!t&&n===12?n=0:t&&n!==12&&(n+=12),e.setHours(n)},d:"setDate",H:"setHours",h:"setHours",m:"setMinutes",s:"setSeconds",S:"setMilliseconds"},G2=function(e,t){var i=e[t];if(!i)return 0;var n=0;do t++,n++;while(e[t]===i);return n},U2=function(e,t){for(var i="",n=0;n<t;n++)i+=e;return i},yA=function(e,t){for(var i="",n="",r,a=[],o=function(){n&&(a.push("'".concat(n,"'")),i+="".concat(Or(n),")"),n="")},s=0;s<e.length;s++){var l=e[s],u=l==="'",d=W2[l];if(!(u&&(r=!r,e[s-1]!=="'")))if(d&&!r){var c=G2(e,s),h=U2(l,c);o(),a.push(h),i+="(".concat(d(c,t),")"),s+=c-1}else n||(i+="("),n+=l}return o(),j2(a)||bu.warn("The following format may be parsed incorrectly: ".concat(e,".")),{patterns:a,regexp:new RegExp("^".concat(i,"$"),"i")}},K2=["d","H","h","m","s","w","M","L","Q"],j2=function(e){var t=r=>{if(!r)return!1;var a=r[0];return["y","S"].includes(a)||K2.includes(a)&&r.length<3},i=!0,n=0;return e.every((r,a,o)=>(t(r)&&((s=>s[0]!=="S"&&s.length!==2)(r)&&(i=++n<2),t(o[a+1])||(n=0)),i))},q2=function(){return Im},Y2=function(e,t,i,n,r){var a=t[0],o=Im[a],s=z2[a];if(o&&s){var l=s(i,t.length,n);r[t]=l,e[o]?e[o](l):o(e,l,r)}},X2=function(e,t,i){var n=Im[t],r="g"+n.substr(1),a=i[r]();e[n](a)},Z2=function(e){return e.map(function(t){return t[0]==="'"?"":t[0]==="H"?"h":t[0]})},Q2=function(e){var t=e.map(function(i){return Qc.indexOf(i)});return Math.max.apply(Math,t)},J2=function(e){var t=e.filter(function(i){return Qc.indexOf(i)<0});return Qc.concat(t)},e4=function(e,t){var i=yA(e,t);return function(n){var r=i.regexp.exec(n);if(r){var a=new Date,o=new Date(a.getFullYear(),0,1),s=Z2(i.patterns),l=Q2(s),u=J2(s),d={};return u.forEach(function(c,h){if(!(!c||h<Qc.length&&h>l)){var f=s.indexOf(c);if(f>=0){var p=i.patterns[f],g=r[f+1];Y2(o,p,g,t,d)}else X2(o,c,a)}}),o}return null}},t4=["January","February","March","April","May","June","July","August","September","October","November","December"],i4=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],n4=["AM","PM"],r4=["Q1","Q2","Q3","Q4"],C0=(e,t)=>{var i={abbreviated:3,short:2,narrow:1};return Jt(e,n=>n.substr(0,i[t]))};const Ol={getMonthNames:function(e){return C0(t4,e)},getDayNames:function(e){return C0(i4,e)},getQuarterNames:function(e){return r4},getPeriodNames:function(e){return n4}},a4={"af-NA":1,agq:1,ak:1,ar:6,"ar-EH":1,"ar-ER":1,"ar-KM":1,"ar-LB":1,"ar-MA":1,"ar-MR":1,"ar-PS":1,"ar-SO":1,"ar-SS":1,"ar-TD":1,"ar-TN":1,asa:1,ast:1,az:1,"az-Cyrl":1,bas:1,be:1,bem:1,bez:1,bg:1,bm:1,br:1,bs:1,"bs-Cyrl":1,ca:1,ce:1,cgg:1,ckb:6,cs:1,cy:1,da:1,de:1,dje:1,dsb:1,dua:1,dyo:1,ee:1,el:1,"en-001":1,"en-AE":6,"en-BI":1,"en-MP":1,"en-SD":6,eo:1,es:1,et:1,eu:1,ewo:1,fa:6,ff:1,"ff-Adlm":1,fi:1,fo:1,fr:1,"fr-DJ":6,"fr-DZ":6,"fr-SY":6,fur:1,fy:1,ga:1,gd:1,gl:1,gsw:1,gv:1,ha:1,hr:1,hsb:1,hu:1,hy:1,ia:1,ig:1,is:1,it:1,jgo:1,jmc:1,ka:1,kab:6,kde:1,kea:1,khq:1,kk:1,kkj:1,kl:1,"ko-KP":1,ksb:1,ksf:1,ksh:1,ku:1,kw:1,ky:1,lag:1,lb:1,lg:1,ln:1,lrc:6,lt:1,lu:1,lv:1,"mas-TZ":1,mfe:1,mg:1,mgo:1,mi:1,mk:1,mn:1,ms:1,mua:1,mzn:6,naq:1,nds:1,nl:1,nmg:1,nnh:1,no:1,nus:1,nyn:1,os:1,pcm:1,pl:1,ps:6,"pt-AO":1,"pt-CH":1,"pt-CV":1,"pt-GQ":1,"pt-GW":1,"pt-LU":1,"pt-ST":1,"pt-TL":1,"qu-BO":1,"qu-EC":1,rm:1,rn:1,ro:1,rof:1,ru:1,rw:1,rwk:1,sah:1,sbp:1,sc:1,se:1,ses:1,sg:1,shi:1,"shi-Latn":1,si:1,sk:1,sl:1,smn:1,so:1,"so-DJ":6,sq:1,sr:1,"sr-Latn":1,sv:1,sw:1,"ta-LK":1,"ta-MY":1,teo:1,tg:1,"ti-ER":1,tk:1,to:1,tr:1,tt:1,twq:1,tzm:1,uk:1,uz:1,"uz-Arab":6,"uz-Cyrl":1,vai:1,"vai-Latn":1,vi:1,vun:1,wae:1,wo:1,xog:1,yav:1,yi:1,yo:1,zgh:1};var o4=/[\u200E\u200F]/g,ja=e=>t=>{if(!e.timeZoneName){var i=t.getFullYear(),n=String(i).length<3,r=n?i+400:i,a=new Date(Date.UTC(r,t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));n&&a.setFullYear(i);var o=O({timeZone:"UTC"},e);return W_(a,o)}return W_(t,e)},Xf={},s4=e=>{var t=pn.locale()+"/"+JSON.stringify(e);return Xf[t]||(Xf[t]=new Intl.DateTimeFormat(pn.locale(),e).format),Xf[t]};function W_(e,t){return s4(t)(e).replace(o4,"")}var z_=e=>new Intl.NumberFormat(pn.locale()).format(e),l4=(()=>{var e={};return t=>{if(!(t in e)){if(z_(0)==="0")return e[t]=!1,!1;e[t]={};for(var i=0;i<10;++i)e[t][z_(i)]=i}return e[t]}})(),pd=e=>{var t=l4(pn.locale());return t?e.split("").map(i=>i in t?String(t[i]):i).join(""):e},y0=e=>e.replace(/(\D)0+(\d)/g,"$1$2"),u4=(e,t)=>y0(e)===y0(t),G_=e=>e.replace("d’","de "),Tm={day:{day:"numeric"},dayofweek:{weekday:"long"},longdate:{weekday:"long",year:"numeric",month:"long",day:"numeric"},longdatelongtime:{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},longtime:{hour:"numeric",minute:"numeric",second:"numeric"},month:{month:"long"},monthandday:{month:"long",day:"numeric"},monthandyear:{year:"numeric",month:"long"},shortdate:{},shorttime:{hour:"numeric",minute:"numeric"},shortyear:{year:"2-digit"},year:{year:"numeric"}};Object.defineProperty(Tm,"shortdateshorttime",{get:function(){var e=Intl.DateTimeFormat(pn.locale()).resolvedOptions();return{year:e.year,month:e.month,day:e.day,hour:"numeric",minute:"numeric"}}});var d4=e=>typeof e=="string"&&Tm[e.toLowerCase()],xA={standalone:function(e,t){var i=new Date(1999,e,13,1),n=ja({month:t})(i);return n},format:function(e,t){var i=new Date(0,e,13,1),n=G_(ja({day:"numeric",month:t})(i)),r=n.split(" ").filter(a=>a.indexOf("13")<0);return r.length===1?r[0]:r.length===2?r[0].length>r[1].length?r[0]:r[1]:xA.standalone(e,t)}};const c4={engine:function(){return"intl"},getMonthNames:function(e,t){var i={wide:"long",abbreviated:"short",narrow:"narrow"}[e||"wide"];return t=t==="format"?t:"standalone",Array.apply(null,new Array(12)).map((n,r)=>xA[t](r,i))},getDayNames:function(e){var t=(i=>Array.apply(null,new Array(7)).map((n,r)=>ja({weekday:i})(new Date(0,0,r))))({wide:"long",abbreviated:"short",short:"narrow",narrow:"narrow"}[e||"wide"]);return t},getPeriodNames:function(){var e=ja({hour:"numeric",hour12:!0});return[1,13].map(t=>{var i=z_(1),n=e(new Date(0,0,1,t)).split(i);if(n.length!==2)return"";var r=n[0].length>n[1].length?n[0]:n[1];return r.trim()})},format:function(e,t){if(e){if(!t)return e;typeof t!="function"&&!t.formatter&&(t=t.type||t);var i=d4(t);if(i)return ja(i)(e);var n=typeof t;return t.formatter||n==="function"||n==="string"?this.callBase.apply(this,arguments):ja(t)(e)}},parse:function(e,t){var i;return t&&!t.parser&&typeof e=="string"&&(e=G_(e),i=n=>G_(this.format(n,t))),this.callBase(e,i||t)},_parseDateBySimpleFormat:function(e,t){e=pd(e);var i=this.getFormatParts(t),n=e.split(/\D+/).filter(o=>o.length>0);if(i.length===n.length){var r=this._generateDateArgs(i,n),a=o=>{var s=((l,u)=>{var d=u?12:0;return new Date(l.year,l.month,l.day,(l.hours+d)%24,l.minutes,l.seconds)})(r,o);if(u4(pd(this.format(s,t)),e))return s};return a(!1)||a(!0)}},_generateDateArgs:function(e,t){var i=new Date,n={year:i.getFullYear(),month:i.getMonth(),day:i.getDate(),hours:0,minutes:0,seconds:0};return e.forEach((r,a)=>{var o=t[a],s=parseInt(o,10);r==="month"&&(s-=1),n[r]=s}),n},formatUsesMonthName:function(e){return typeof e=="object"&&!(e.type||e.format)?e.month==="long":this.callBase.apply(this,arguments)},formatUsesDayName:function(e){return typeof e=="object"&&!(e.type||e.format)?e.weekday==="long":this.callBase.apply(this,arguments)},getTimeSeparator:function(){return pd(W_(new Date(2001,1,1,11,11),{hour:"numeric",minute:"numeric",hour12:!1})).replace(/\d/g,"")},getFormatParts:function(e){if(typeof e=="string")return this.callBase(e);var t=O({},Tm[e.toLowerCase()]),i=new Date(2001,2,4,5,6,7),n=ja(t)(i);return n=pd(n),[{name:"year",value:1},{name:"month",value:3},{name:"day",value:4},{name:"hours",value:5},{name:"minutes",value:6},{name:"seconds",value:7}].map(r=>({name:r.name,index:n.indexOf(r.value)})).filter(r=>r.index>-1).sort((r,a)=>r.index-a.index).map(r=>r.name)}};var h4=0,f4=typeof Intl<"u",Zf={shortdate:"M/d/y",shorttime:"h:mm a",longdate:"EEEE, MMMM d, y",longtime:"h:mm:ss a",monthandday:"MMMM d",monthandyear:"MMMM y",quarterandyear:"QQQ y",day:"d",year:"y",shortdateshorttime:"M/d/y, h:mm a",longdatelongtime:"EEEE, MMMM d, y, h:mm:ss a",month:"LLLL",shortyear:"yy",dayofweek:"EEEE",quarter:"QQQ",hour:"HH",minute:"mm",second:"ss",millisecond:"SSS","datetime-local":"yyyy-MM-ddTHH':'mm':'ss"},p4={year:["y","yy","yyyy"],day:["d","dd"],month:["M","MM","MMM","MMMM"],hours:["H","HH","h","hh","ah"],minutes:["m","mm"],seconds:["s","ss"],milliseconds:["S","SS","SSS"]},Ze=kn({engine:function(){return"base"},_getPatternByFormat:function(e){return Zf[e.toLowerCase()]},_expandPattern:function(e){return this._getPatternByFormat(e)||e},formatUsesMonthName:function(e){return this._expandPattern(e).indexOf("MMMM")!==-1},formatUsesDayName:function(e){return this._expandPattern(e).indexOf("EEEE")!==-1},getFormatParts:function(e){var t=this._getPatternByFormat(e)||e,i=[];return F(t.split(/\W+/),(n,r)=>{F(p4,(a,o)=>{o.includes(r)&&i.push(a)})}),i},getMonthNames:function(e){return Ol.getMonthNames(e)},getDayNames:function(e){return Ol.getDayNames(e)},getQuarterNames:function(e){return Ol.getQuarterNames(e)},getPeriodNames:function(e){return Ol.getPeriodNames(e)},getTimeSeparator:function(){return":"},is24HourFormat:function(e){for(var t=new Date(2017,0,20,11,0,0,0),i=new Date(2017,0,20,23,0,0,0),n=this.format(t,e),r=this.format(i,e),a=0;a<n.length;a++)if(n[a]!==r[a])return!isNaN(parseInt(n[a]))},format:function(e,t){if(e){if(!t)return e;var i;if(typeof t=="function")i=t;else if(t.formatter)i=t.formatter;else if(t=t.type||t,Me(t))return t=Zf[t.toLowerCase()]||t,yt.convertDigits(mA(t,this)(e));if(i)return i(e)}},parse:function(e,t){var i=this,n,r;if(e){if(!t)return this.parse(e,"shortdate");if(t.parser)return t.parser(e);if(typeof t=="string"&&!Zf[t.toLowerCase()])n=t;else{r=o=>{var s=i.format(o,t);return yt.convertDigits(s,!0)};try{n=wm(r)}catch{}}if(n)return e=yt.convertDigits(e,!0),e4(n,this)(e);_t.log("W0012");var a=new Date(e);if(!(!a||isNaN(a.getTime())))return a}},firstDayOfWeekIndex:function(){var e=pn.getValueByClosestLocale(t=>a4[t]);return e===void 0?h4:e}});f4&&Ze.inject(c4);const bA=kn({format:function(e,t){var i=Me(t)&&t!==""||Ye(t)||Ee(t),n=xt(e)||Mi(e);if(!i||!n)return E(e)?e.toString():"";if(Ee(t))return t(e);if(Me(t)&&(t={type:t}),xt(e))return yt.format(e,t);if(Mi(e))return Ze.format(e,t)},getTimeFormat:function(e){return e?"longtime":"shorttime"},_normalizeFormat:function(e){return Array.isArray(e)?e.length===1?e[0]:function(t){return e.map(function(i){return Ze.format(t,i)}).join(" ")}:e},getDateFormatByDifferences:function(e,t){var i=[],n=t&&e.millisecond&&!(e.year||e.month||e.day);return n?i.push(function(r){return r.getSeconds()+r.getMilliseconds()/1e3+"s"}):e.millisecond&&i.push("millisecond"),(e.hour||e.minute||!n&&e.second)&&i.unshift(this.getTimeFormat(e.second)),e.year&&e.month&&e.day?t&&t==="month"?"monthandyear":(i.unshift("shortdate"),this._normalizeFormat(i)):e.year&&e.month?"monthandyear":e.year&&e.quarter?"quarterandyear":e.year?"year":e.quarter?"quarter":e.month&&e.day?(t?i.unshift(function(r){return Ze.getMonthNames("abbreviated")[r.getMonth()]+" "+Ze.format(r,"day")}):i.unshift("monthandday"),this._normalizeFormat(i)):e.month?"month":e.day?(t?i.unshift("day"):i.unshift(function(r){return Ze.format(r,"dayofweek")+", "+Ze.format(r,"day")}),this._normalizeFormat(i)):this._normalizeFormat(i)},getDateFormatByTicks:function(e){var t,i,n;if(e.length>1)for(t=Pe.getDatesDifferences(e[0],e[1]),n=1;n<e.length-1;n++)i=Pe.getDatesDifferences(e[n],e[n+1]),t.count<i.count&&(t=i);else t={year:!0,month:!0,day:!0,hour:e[0].getHours()>0,minute:e[0].getMinutes()>0,second:e[0].getSeconds()>0,millisecond:e[0].getMilliseconds()>0};var r=this.getDateFormatByDifferences(t);return r},getDateFormatByTickInterval:function(e,t,i){var n,r=function(s,l,u){switch(l){case"year":case"quarter":s.month=u;case"month":s.day=u;case"week":case"day":s.hour=u;case"hour":s.minute=u;case"minute":s.second=u;case"second":s.millisecond=u}};i=Me(i)?i.toLowerCase():i;var a=Pe.getDatesDifferences(e,t);e!==t&&function(s,l,u){!u.getMilliseconds()&&u.getSeconds()?u.getSeconds()-l.getSeconds()===1&&(s.millisecond=!0,s.second=!1):!u.getSeconds()&&u.getMinutes()?u.getMinutes()-l.getMinutes()===1&&(s.second=!0,s.minute=!1):!u.getMinutes()&&u.getHours()?u.getHours()-l.getHours()===1&&(s.minute=!0,s.hour=!1):!u.getHours()&&u.getDate()>1?u.getDate()-l.getDate()===1&&(s.hour=!0,s.day=!1):u.getDate()===1&&u.getMonth()?u.getMonth()-l.getMonth()===1&&(s.day=!0,s.month=!1):!u.getMonth()&&u.getFullYear()&&u.getFullYear()-l.getFullYear()===1&&(s.month=!0,s.year=!1)}(a,e>t?t:e,e>t?e:t),n=Pe.getDateUnitInterval(a),r(a,n,!0),n=Pe.getDateUnitInterval(i||"second"),r(a,n,!1),a[{week:"day"}[n]||n]=!0;var o=this.getDateFormatByDifferences(a);return o}});var ni=Ng(_t.ERROR_MESSAGES,{E4000:"[DevExpress.data]: {0}",E4001:"Unknown aggregating function is detected: '{0}'",E4002:"Unsupported OData protocol version is used",E4003:"Unknown filter operation is used: {0}",E4004:"The thenby() method is called before the sortby() method",E4005:"Store requires a key expression for this operation",E4006:"ArrayStore 'data' option must be an array",E4007:"Compound keys cannot be auto-generated",E4008:"Attempt to insert an item with a duplicated key",E4009:"Data item cannot be found",E4010:"CustomStore does not support creating queries",E4011:"Custom Store method is not implemented or is not a function: {0}",E4012:"Custom Store method returns an invalid value: {0}",E4013:"Local Store requires the 'name' configuration option is specified",E4014:"Unknown data type is specified for ODataStore: {0}",E4015:"Unknown entity name or alias is used: {0}",E4016:"The compileSetter(expr) method is called with 'self' passed as a parameter",E4017:"Keys cannot be modified",E4018:"The server has returned a non-numeric value in a response to an item count request",E4019:"Mixing of group operators inside a single group of filter expression is not allowed",E4020:"Unknown store type is detected: {0}",E4021:"The server response does not provide the totalCount value",E4022:"The server response does not provide the groupCount value",E4023:"Could not parse the following XML: {0}",E4024:"String function {0} cannot be used with the data field {1} of type {2}.",W4000:"Data returned from the server has an incorrect structure",W4001:'The {0} field is listed in both "keyType" and "fieldTypes". The value of "fieldTypes" is used.',W4002:"Data loading has failed for some cells due to the following error: {0}"}),v4=null,Am=function(e){var t;(t=v4)===null||t===void 0||t(e)};function _4(e,t){for(var i,n=typeof t=="string"?t.split():t.slice();n.length;)if(i=n.shift(),i in e)return!0;return!1}function SA(e,t,i,n){var r,a;if(n){for(var o=0;o<t.length;o++)if(r=t[o].items||t[o].collapsedItems||[],a=SA(e,r||[],i,n-1),a)return a}else if(go(e,t,i)>=0)return t}function g4(e,t,i,n){return n?SA(e,t,i,n)||[]:t}function m4(e,t){if(e.key()&&(!t._dataByKeyMap||t._dataByKeyMapLength!==t.length)){for(var i={},n=t.length,r=0;r<n;r++)i[JSON.stringify(e.keyOf(t[r]))]=t[r];t._dataByKeyMap=i,t._dataByKeyMapLength=n}}function C4(e,t){if(e._dataByKeyMap)return e._dataByKeyMap[JSON.stringify(t)]}function y4(e,t){return e._dataByKeyMap?e._dataByKeyMap[JSON.stringify(t)]:!0}function EA(e,t,i){e._dataByKeyMap&&(e._dataByKeyMap[JSON.stringify(t)]=i,e._dataByKeyMapLength+=i?1:-1)}function wA(e,t){t=t||new WeakMap;var i=e?Object.create(Object.getPrototypeOf(e)):{};e&&t.set(e,i);var n=AI({},e);for(var r in n){var a=n[r];He(a)&&!Ye(a)&&!t.has(a)&&(n[r]=wA(a,t))}Jn(i,n,!0,!0);for(var o in i){var s=i[o];He(s)&&t.has(s)&&(i[o]=t.get(s))}return i}function ua(e,t){var i=wA(e);return Jn(i,t,!0,!0)}function Cs(e){var{keyInfo:t,data:i,changes:n,groupCount:r,useInsertIndex:a,immutable:o,disableCache:s,logError:l}=e,u=o===!0?[...i]:i;return n.forEach(d=>{var c=d.type==="insert"?u:g4(t,u,d.key,r);switch(!s&&m4(t,c),d.type){case"update":Dm(t,c,d.key,d.data,!0,o,l);break;case"insert":Om(t,c,d.data,a&&E(d.index)?d.index:-1,!0,l);break;case"remove":IA(t,c,d.key,!0,l)}}),u}function Jc(e,t,i){return e?t&&ni.log(i):iA(ni.Error(i))}function Dm(e,t,i,n,r,a,o){var s,l=e.key();if(l){if(_4(n,l)&&!Bu(l,i,e.keyOf(n)))return Jc(r,o,"E4017");if(s=C4(t,i),!s){var u=go(e,t,i);if(u<0)return Jc(r,o,"E4009");if(s=t[u],a===!0&&E(s)){var d=ua(s,n);return t[u]=d,!r&&ms(d,i)}}}else s=i;if(Jn(s,n,!0),!r)return It().useLegacyStoreResult?ms(i,n):ms(s,i)}function Om(e,t,i,n,r,a){var o,s=e.key(),l=Ye(i)?O({},i):i;if(s){if(o=e.keyOf(l),o===void 0||typeof o=="object"&&Rn(o)){if(Array.isArray(s))throw ni.Error("E4007");o=l[s]=String(new ri)}else if(t[go(e,t,o)]!==void 0)return Jc(r,a,"E4008")}else o=l;if(n>=0?t.splice(n,0,l):t.push(l),EA(t,o,l),!r)return ms(It().useLegacyStoreResult?i:l,o)}function IA(e,t,i,n,r){var a=go(e,t,i);if(a>-1&&(t.splice(a,1),EA(t,i,null)),n){if(a<0)return Jc(n,r,"E4009")}else return ms(i)}function go(e,t,i){var n=e.key();if(!y4(t,i))return-1;for(var r=0,a=t.length;r<a;r++)if(Bu(n,e.keyOf(t[r]),i))return r;return-1}var Fu=nt.inherit({toArray:function(){var e=[];for(this.reset();this.next();)e.push(this.current());return e},countable:function(){return!1}}),Rm=Fu.inherit({ctor:function(e){this.array=e,this.index=-1},next:function(){return this.index+1<this.array.length?(this.index++,!0):!1},current:function(){return this.array[this.index]},reset:function(){this.index=-1},toArray:function(){return this.array.slice(0)},countable:function(){return!0},count:function(){return this.array.length}}),Wh=Fu.inherit({ctor:function(e){this.iter=e},next:function(){return this.iter.next()},current:function(){return this.iter.current()},reset:function(){return this.iter.reset()}}),Qf=Wh.inherit({ctor:function(e,t){this.callBase(e),this.index=-1,this.mapper=t},current:function(){return this.mapper(this.callBase(),this.index)},next:function(){var e=this.callBase();return e&&this.index++,e}}),x4=function(e,t){return e=jt(e),t=jt(t),e===null&&t!==null?-1:e!==null&&t===null||e===void 0&&t!==void 0?1:e!==void 0&&t===void 0||e<t?-1:e>t?1:0},U_=Fu.inherit({ctor:function(e,t,i,n){e instanceof Qf||(e=new Qf(e,this._wrap)),this.iter=e,this.rules=[{getter:t,desc:i,compare:n}]},thenBy:function(e,t,i){var n=new U_(this.sortedIter||this.iter,e,t,i);return this.sortedIter||(n.rules=this.rules.concat(n.rules)),n},next:function(){return this._ensureSorted(),this.sortedIter.next()},current:function(){return this._ensureSorted(),this.sortedIter.current()},reset:function(){delete this.sortedIter},countable:function(){return this.sortedIter||this.iter.countable()},count:function(){return this.sortedIter?this.sortedIter.count():this.iter.count()},_ensureSorted:function(){var e=this;e.sortedIter||(F(e.rules,function(){this.getter=mt(this.getter)}),e.sortedIter=new Qf(new Rm(this.iter.toArray().sort(function(t,i){return e._compare(t,i)})),e._unwrap))},_wrap:function(e,t){return{index:t,value:e}},_unwrap:function(e){return e.value},_compare:function(e,t){var i=e.index,n=t.index;if(e=e.value,t=t.value,e===t)return i-n;for(var r=0,a=this.rules.length;r<a;r++){var o=this.rules[r],s=o.getter(e),l=o.getter(t),u=o.compare||x4,d=u(s,l);if(d)return o.desc?-d:d}return i-n}}),K_=function(){var e=function(i){return E(i)?i.toString():""};function t(i,n,r){return function(a){a=jt(i(a));var o=function(s){return s===""||s===0||s===!1}(n)?a===n:a==n;return r&&(o=!o),o}}return function(i){return Ee(i)?i:L$(i)?function(n){var r=[],a=!1,o=!1;return F(n,function(){if(Array.isArray(this)||Ee(this)){if(r.length>1&&a!==o)throw new ni.Error("E4019");r.push(K_(this)),a=o,o=!0}else o=R$(this)}),function(s){for(var l=a,u=0;u<r.length;u++)if(r[u](s)!==a){l=!a;break}return l}}(i):k$(i)?function(n){var r=n[0],a=K_(n[1]);if(r==="!")return function(o){return!a(o)};throw ni.Error("E4003",r)}(i):function(n){n=A$(n);var r=mt(n[0]),a=n[1],o=n[2];switch(o=jt(o),a.toLowerCase()){case"=":return t(r,o);case"<>":return t(r,o,!0);case">":return function(s){return jt(r(s))>o};case"<":return function(s){return jt(r(s))<o};case">=":return function(s){return jt(r(s))>=o};case"<=":return function(s){return jt(r(s))<=o};case"startswith":return function(s){return jt(e(r(s))).indexOf(o)===0};case"endswith":return function(s){var l=jt(e(r(s))),u=e(o);if(l.length<u.length)return!1;var d=l.lastIndexOf(o);return d!==-1&&d===l.length-o.length};case"contains":return function(s){return jt(e(r(s))).indexOf(o)>-1};case"notcontains":return function(s){return jt(e(r(s))).indexOf(o)===-1}}throw ni.Error("E4003",a)}(i)}}(),b4=Wh.inherit({ctor:function(e,t){this.callBase(e),this.criteria=K_(t)},next:function(){for(;this.iter.next();)if(this.criteria(this.current()))return!0;return!1}}),S4=Fu.inherit({ctor:function(e,t){this.iter=e,this.getter=t},next:function(){return this._ensureGrouped(),this.groupedIter.next()},current:function(){return this._ensureGrouped(),this.groupedIter.current()},reset:function(){delete this.groupedIter},countable:function(){return!!this.groupedIter},count:function(){return this.groupedIter.count()},_ensureGrouped:function(){if(!this.groupedIter){var e={},t=[],i=this.iter,n=mt(this.getter);for(i.reset();i.next();){var r=i.current(),a=n(r);a in e?e[a].push(r):(e[a]=[r],t.push(a))}this.groupedIter=new Rm(Jt(t,function(o){return{key:o,items:e[o]}}))}}}),E4=Wh.inherit({ctor:function(e,t){this.callBase(e),this.getter=mt(t)},current:function(){return this.getter(this.callBase())},countable:function(){return this.iter.countable()},count:function(){return this.iter.count()}}),w4=Wh.inherit({ctor:function(e,t,i){this.callBase(e),this.skip=Math.max(0,t),this.take=Math.max(0,i),this.pos=0},next:function(){if(this.pos>=this.skip+this.take)return!1;for(;this.pos<this.skip&&this.iter.next();)this.pos++;return this.pos++,this.iter.next()},reset:function(){this.callBase(),this.pos=0},countable:function(){return this.iter.countable()},count:function(){return Math.min(this.iter.count()-this.skip,this.take)}}),zh=function e(t,i){i=i||{},t instanceof Fu||(t=new Rm(t));var n=function(u){var d=i.errorHandler;d&&d(u),Am(u)},r=function(u){var d=new te().fail(n),c,h=u.step,f=u.finalize;try{t.reset(),"seed"in u?c=u.seed:c=t.next()?t.current():NaN;for(var p=c;t.next();)p=h(p,t.current());d.resolve(f?f(p):p)}catch(g){d.reject(g)}return d.promise()},a=function(u){return r(Sm[u])},o=function(u){return!Ee(u)&&!Array.isArray(u)&&(u=[].slice.call(arguments)),l(new E4(t,u))},s=function(u){return o(mt(u))};function l(u){return e(u,i)}return{toArray:function(){return t.toArray()},enumerate:function(){var u=new te().fail(n);try{u.resolve(t.toArray())}catch(d){u.reject(d)}return u.promise()},sortBy:function(u,d,c){return l(new U_(t,u,d,c))},thenBy:function(u,d,c){if(t instanceof U_)return l(t.thenBy(u,d,c));throw ni.Error("E4004")},filter:function(u){return Array.isArray(u)||(u=[].slice.call(arguments)),l(new b4(t,u))},slice:function(u,d){return d===void 0&&(d=Number.MAX_VALUE),l(new w4(t,u,d))},select:o,groupBy:function(u){return l(new S4(t,u))},aggregate:function(u,d,c){return arguments.length<2?r({step:arguments[0]}):r({seed:u,step:d,finalize:c})},count:function(){if(t.countable()){var u=new te().fail(n);try{u.resolve(t.count())}catch(d){u.reject(d)}return u.promise()}return a("count")},sum:function(u){return u?s(u).sum():a("sum")},min:function(u){return u?s(u).min():a("min")},max:function(u){return u?s(u).max():a("max")},avg:function(u){return u?s(u).avg():a("avg")}}};function km(e,t){return e=e.groupBy(t[0].selector),t.length>1&&(e=e.select(function(i){return O({},i,{items:km(zh(i.items),t.slice(1)).toArray()})})),e}function TA(e,t){var i=[];return F(e,function(n,r){var a=Vi(t,function(o){return r.selector===o.selector});a.length<1&&i.push(r)}),i.concat(t)}function I4(e,t,i){t=t||{};var n=t.filter;if(n&&(e=e.filter(n)),i)return e;var r=t.sort,a=t.select,o=t.group,s=t.skip,l=t.take;return o&&(o=$r(o),o.keepInitialKeyOrder=!!t.group.keepInitialKeyOrder),(r||o)&&(r=$r(r||[]),o&&!o.keepInitialKeyOrder&&(r=TA(o,r)),F(r,function(u){e=e[u?"thenBy":"sortBy"](this.selector,this.desc,this.compare)})),a&&(e=e.select(a)),o&&(e=km(e,o)),(l||s)&&(e=e.slice(s||0,l)),e}const Wr={multiLevelGroup:km,arrangeSortingInfo:TA,queryByOptions:I4};var tl=nt.abstract,x0=Wr.queryByOptions,j_={},or=nt.inherit({ctor:function(e){var t=this;e=e||{},this._eventsStrategy=new wo(this),F(["onLoaded","onLoading","onInserted","onInserting","onUpdated","onUpdating","onPush","onRemoved","onRemoving","onModified","onModifying"],function(i,n){n in e&&t.on(n.slice(2).toLowerCase(),e[n])}),this._key=e.key,this._errorHandler=e.errorHandler,this._useDefaultSearch=!0},_customLoadOptions:function(){return null},key:function(){return this._key},keyOf:function(e){return this._keyGetter||(this._keyGetter=mt(this.key())),this._keyGetter(e)},_requireKey:function(){if(!this.key())throw ni.Error("E4005")},load:function(e){var t=this;return e=e||{},this._eventsStrategy.fireEvent("loading",[e]),this._withLock(this._loadImpl(e)).done(function(i){t._eventsStrategy.fireEvent("loaded",[i,e])})},_loadImpl:function(e){return x0(this.createQuery(e),e).enumerate()},_withLock:function(e){var t=new te;return e.done(function(){var i=this,n=arguments;O$.promise().done(function(){t.resolveWith(i,n)})}).fail(function(){t.rejectWith(this,arguments)}),t},createQuery:tl,totalCount:function(e){return this._totalCountImpl(e)},_totalCountImpl:function(e){return x0(this.createQuery(e),e,!0).count()},byKey:function(e,t){return this._addFailHandlers(this._withLock(this._byKeyImpl(e,t)))},_byKeyImpl:tl,insert:function(e){var t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("inserting",[e]),t._addFailHandlers(t._insertImpl(e).done(function(i,n){t._eventsStrategy.fireEvent("inserted",[i,n]),t._eventsStrategy.fireEvent("modified")}))},_insertImpl:tl,update:function(e,t){var i=this;return i._eventsStrategy.fireEvent("modifying"),i._eventsStrategy.fireEvent("updating",[e,t]),i._addFailHandlers(i._updateImpl(e,t).done(function(){i._eventsStrategy.fireEvent("updated",[e,t]),i._eventsStrategy.fireEvent("modified")}))},_updateImpl:tl,push:function(e){var t={changes:e,waitFor:[]};this._eventsStrategy.fireEvent("beforePush",[t]),Ae(...t.waitFor).done(()=>{this._pushImpl(e),this._eventsStrategy.fireEvent("push",[e])})},_pushImpl:ee,remove:function(e){var t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("removing",[e]),t._addFailHandlers(t._removeImpl(e).done(function(i){t._eventsStrategy.fireEvent("removed",[i]),t._eventsStrategy.fireEvent("modified")}))},_removeImpl:tl,_addFailHandlers:function(e){return e.fail(this._errorHandler).fail(Am)},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}});or.create=function(e,t){if(!(e in j_))throw ni.Error("E4020",e);return new j_[e](t)};or.registerClass=function(e,t){return t&&(j_[t]=e),e};or.inherit=function(e){return function(t,i){var n=e.apply(this,[t]);return or.registerClass(n,i),n}}(or.inherit);var AA="totalCount",q_="load",DA="byKey",b0="insert",S0="update",E0="remove";function ys(e){return e&&Ee(e.then)}function ao(e){return new te().resolve(e).promise()}function Gl(e,t){if(!Ee(t))throw ni.Error("E4011",e)}function OA(e){throw ni.Error("E4012",e)}function Ka(e){function t(i){var n=i[0],r=i[1];return!n||!n.getResponseHeader?null:D$(n,r)}return function(i){var n;i instanceof Error?n=i:n=new Error(t(arguments)||i&&String(i)||"Unknown error"),n.message!==tA&&e.reject(n)}}function RA(e,t){var i=e._loadFunc,n;return Gl(q_,i),n=i.apply(e,[t]),Array.isArray(n)?n=ao(n):n==null?n=ao([]):ys(n)||OA(q_),gi(n)}function T4(e,t){var i=e._totalCountFunc,n;if(!Ee(i))throw ni.Error("E4021");return n=i.apply(e,[t]),ys(n)||(n=Number(n),isFinite(n)||OA(AA),n=ao(n)),gi(n)}function A4(e,t,i){var n=e._byKeyFunc,r;return Gl(DA,n),r=n.apply(e,[t,i]),ys(r)||(r=ao(r)),gi(r)}function kA(e,t,i,n){if(t.__rawData)n(t.__rawData);else{var r=t.__rawDataPromise||RA(t,i);t._cacheRawData&&(t.__rawDataPromise=r),r.always(function(){delete t.__rawDataPromise}).done(function(a){t._cacheRawData&&(t.__rawData=a),n(a)}).fail(Ka(e))}}function w0(e,t,i,n){i=i||{};var r={};"userData"in i&&(r.userData=i.userData),kA(e,t,r,function(a){var o=zh(a,{errorHandler:t._errorHandler}),s,l,u=[],d,c;n||(s=Wr.queryByOptions(o,i),s===o?d=a.slice(0):u.push(s.enumerate().done(function(h){d=h}))),(i.requireTotalCount||n)&&(l=Wr.queryByOptions(o,i,!0),l===o?c=a.length:u.push(l.count().done(function(h){c=h}))),Ae.apply(v,u).done(function(){n?e.resolve(c):i.requireTotalCount?e.resolve(d,{totalCount:c}):e.resolve(d)}).fail(function(h){e.reject(h)})})}function D4(e,t,i){kA(e,t,{},function(n){for(var r=t.key(),a,o=0,s=n.length;o<s;o++)if(a=n[o],Bu(r,t.keyOf(n[o]),i)){e.resolve(a);return}e.reject(ni.Error("E4009"))})}var Os=or.inherit({ctor:function(e){e=e||{},this.callBase(e),this._useDefaultSearch=!!e.useDefaultSearch||e.loadMode==="raw",this._loadMode=e.loadMode,this._cacheRawData=e.cacheRawData!==!1,this._loadFunc=e[q_],this._totalCountFunc=e[AA],this._byKeyFunc=e[DA],this._insertFunc=e[b0],this._updateFunc=e[S0],this._removeFunc=e[E0]},createQuery:function(){throw ni.Error("E4010")},clearRawDataCache:function(){delete this.__rawData},_totalCountImpl:function(e){var t=new te;return this._loadMode==="raw"&&!this._totalCountFunc?w0(t,this,e,!0):(T4(this,e).done(function(i){t.resolve(Number(i))}).fail(Ka(t)),t=this._addFailHandlers(t)),t.promise()},_pushImpl:function(e){this.__rawData&&Cs({keyInfo:this,data:this.__rawData,changes:e})},_loadImpl:function(e){var t=new te;return this._loadMode==="raw"?w0(t,this,e,!1):(RA(this,e).done(function(i,n){t.resolve(i,n)}).fail(Ka(t)),t=this._addFailHandlers(t)),t.promise()},_byKeyImpl:function(e,t){var i=new te;return this._byKeyViaLoad()?(this._requireKey(),D4(i,this,e)):A4(this,e,t).done(function(n){i.resolve(n)}).fail(Ka(i)),i.promise()},_byKeyViaLoad:function(){return this._loadMode==="raw"&&!this._byKeyFunc},_insertImpl:function(e){var t=this,i=t._insertFunc,n,r=new te;return Gl(b0,i),n=i.apply(t,[e]),ys(n)||(n=ao(n)),gi(n).done(function(a){It().useLegacyStoreResult?r.resolve(e,a):r.resolve(a||e,t.keyOf(a))}).fail(Ka(r)),r.promise()},_updateImpl:function(e,t){var i=this._updateFunc,n,r=new te;return Gl(S0,i),n=i.apply(this,[e,t]),ys(n)||(n=ao(n)),gi(n).done(function(a){It().useLegacyStoreResult?r.resolve(e,t):r.resolve(a||t,e)}).fail(Ka(r)),r.promise()},_removeImpl:function(e){var t=this._removeFunc,i,n=new te;return Gl(E0,t),i=t.apply(this,[e]),ys(i)||(i=ao()),gi(i).done(function(){n.resolve(e)}).fail(Ka(n)),n.promise()}});function O4(e){var t=[],i=!1;function n(){for(;t.length;){i=!0;var r=t.shift(),a=r();if(a!==void 0){if(a.then){Ae(a).always(n);return}throw _t.Error("E0015")}}i=!1}return{add:function(r,a){t.push(r),i||n()},busy:function(){return i}}}function Lt(e,t){if(e==null)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;i[n]=e[n]}return i}var R4=qe(),k4={getXhr:function(){return new R4.XMLHttpRequest}};const B4=kn(k4);var Bm=qe(),Ul="success",Jf="error",L4="timeout",P4="nocontent",F4="parsererror",M4=function(e){return 200<=e&&e<300},V4=function(e){return e!==204},N4=function(e){var t=[];for(var i in e){var n=e[i];n!==void 0&&(n===null&&(n=""),typeof n=="function"&&(n=n()),t.push(encodeURIComponent(i)+"="+encodeURIComponent(n)))}return t.join("&")},BA=function(e){var t=fe.createElement("script");for(var i in e)t[i]=e[i];return t},LA=function(e){e.parentNode.removeChild(e)},PA=function(e){return fe.getHead().appendChild(e)},I0=function(e){var t=BA({text:e});PA(t),LA(t)},H4=function(e){var t=BA({src:e});return new Promise(function(i,n){var r={load:i,error:n},a=function(s){r[s.type](),LA(t)};for(var o in r)fe.listen(t,o,a);PA(t)})},$4=function(e){var t=e.dataType||"*",i="text/javascript, application/javascript, application/ecmascript, application/x-ecmascript",n={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",jsonp:i,script:i};return AI(n,e.accepts,!0),n[t]?n[t]+(t!=="*"?", */*; q=0.01":""):n["*"]},W4=function(e){var t;return e.data&&!e.upload&&Lm(e)!=="GET"&&(t="application/x-www-form-urlencoded;charset=utf-8"),e.contentType||t},z4=function(e){return e.responseType&&e.responseType!=="text"||typeof e.responseText!="string"?e.response:e.responseText},G4=function(e,t,i){var n=z4(t);switch(i){case"jsonp":I0(n);break;case"script":I0(n),e.resolve(n,Ul,t);break;case"json":try{e.resolve(JSON.parse(n),Ul,t)}catch(r){e.reject(t,F4,r)}break;default:e.resolve(n,Ul,t)}},U4=function(e){if(!Ke())return!0;var t=!1,i=fe.createElement("a"),n=fe.createElement("a");i.href=Bm.location.href;try{n.href=e,n.href=n.href,t=i.protocol+"//"+i.host!=n.protocol+"//"+n.host}catch{t=!0}return t},K4=function(e,t){return e&&setTimeout(function(){t.customStatus=L4,t.abort()},e)},j4=function(e){if(e.dataType==="jsonp"){var t=Math.random().toString().replace(/\D/g,""),i=e.jsonpCallback||"dxCallback"+Date.now()+"_"+t,n=e.jsonp||"callback";return e.data=e.data||{},e.data[n]=i,i}},q4=function(e,t){var i=e.data,n=typeof i=="string",r=e.url||Bm.location.href;return!n&&!e.cache&&(i=i||{},i._=Date.now()),i&&!e.upload&&(n||(i=N4(i)),Lm(e)==="GET"?(i!==""&&(r+=(r.indexOf("?")>-1?"&":"?")+i),i=null):t["Content-Type"]&&t["Content-Type"].indexOf("application/x-www-form-urlencoded")>-1&&(i=i.replace(/%20/g,"+"))),{url:r,parameters:i}};function Lm(e){return(e.method||"GET").toUpperCase()}var Y4=function(e){var t=e.headers||{};return t["Content-Type"]=t["Content-Type"]||W4(e),t.Accept=t.Accept||$4(e),!e.crossDomain&&!t["X-Requested-With"]&&(t["X-Requested-With"]="XMLHttpRequest"),t},X4=function(e){var t=B4.getXhr(),i=new te,n=i.promise(),r=E(e.async)?e.async:!0,a=e.dataType,o=e.timeout||0,s;e.crossDomain=U4(e.url);var l=a==="jsonp"||a==="script";e.cache===void 0&&(e.cache=!l);var u=j4(e),d=Y4(e),c=q4(e,d),h=c.url,f=c.parameters;if(u&&(Bm[u]=function(m){i.resolve(m,Ul,t)}),e.crossDomain&&l)return H4(h).then(function(){a!=="jsonp"&&i.resolve(null,Ul,t)},function(){i.reject(t,Jf)}),n;if(e.crossDomain&&!("withCredentials"in t))return i.reject(t,Jf),n;if(t.open(Lm(e),h,r,e.username,e.password),r&&(t.timeout=o,s=K4(o,t)),t.onreadystatechange=function(m){t.readyState===4&&(clearTimeout(s),M4(t.status)?V4(t.status)?G4(i,t,a):i.resolve(null,P4,t):i.reject(t,t.customStatus||Jf))},e.upload&&(t.upload.onprogress=e.upload.onprogress,t.upload.onloadstart=e.upload.onloadstart,t.upload.onabort=e.upload.onabort),e.xhrFields)for(var p in e.xhrFields)t[p]=e.xhrFields[p];e.responseType==="arraybuffer"&&(t.responseType=e.responseType);for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&E(d[g])&&t.setRequestHeader(g,d[g]);return e.beforeSend&&e.beforeSend(t),t.send(f),n.abort=function(){t.abort()},n};const Z4=kn({sendRequest:X4}),Q4={};var J4=function e(t,i,n){n=n||[],i=i||{};var r=function(s,l){return{name:s,args:l}},a=function(s){var l=new te,u,d,c,h,f,p=function(C){var x=i.errorHandler;x&&x(C),Am(C),l.reject(C)};function g(C){switch(C.name){case"sortBy":return f=[C.args],!0;case"thenBy":if(!f)throw ni.Error("E4004");return f.push(C.args),!0}return!1}try{u=i.adapter,Ee(u)||(u=Q4[u]),d=u(i),c=[].concat(n).concat(s);var m=d.optimize;for(m&&m(c);c.length;){if(h=c[0],!g(h)){if(f){c.unshift(r("multiSort",[f])),f=null;continue}if(String(h.name)!=="enumerate"&&(!d[h.name]||d[h.name].apply(d,h.args)===!1))break}c.shift()}(function(){var C=c[0],x=[];C&&C.name==="multiSort"&&(c.shift(),F(C.args[0],function(){x.push(r(x.length?"thenBy":"sortBy",this))})),c=x.concat(c)})(),d.exec(t).done(function(C,x){if(!c.length)l.resolve(C,x);else{var T=zh(C,{errorHandler:i.errorHandler});F(c,function(){T=T[this.name].apply(T,this.args)}),T.done(l.resolve).fail(l.reject)}}).fail(p)}catch(C){p(C)}return l.promise()},o={};return F(["sortBy","thenBy","filter","slice","select","groupBy"],function(){var s=String(this);o[s]=function(){return e(t,i,n.concat(r(s,arguments)))}}),F(["count","min","max","sum","avg","aggregate","enumerate"],function(){var s=String(this);o[s]=function(){return a.call(this,r(s,arguments))}}),o},eW={array:zh,remote:J4},Gi=function(){var e=Array.isArray(arguments[0])?"array":"remote";return eW[e].apply(this,arguments)},$s=or.inherit({ctor:function(e){Array.isArray(e)?e={data:e}:e=e||{},this.callBase(e);var t=e.data;if(t&&!Array.isArray(t))throw ni.Error("E4006");this._array=t||[]},createQuery:function(){return Gi(this._array,{errorHandler:this._errorHandler})},_byKeyImpl:function(e){var t=go(this,this._array,e);return t===-1?iA(ni.Error("E4009")):ms(this._array[t])},_insertImpl:function(e){return Om(this,this._array,e)},_pushImpl:function(e){Cs({keyInfo:this,data:this._array,changes:e})},_updateImpl:function(e,t){return Dm(this,this._array,e,t)},_removeImpl:function(e){return IA(this,this._array,e)},clear:function(){this._eventsStrategy.fireEvent("modifying"),this._array=[],this._eventsStrategy.fireEvent("modified")}},"array"),tW=["items"],FA="canceled",T0=e=>e.state()==="pending",A0=e=>{switch(e.length){case 0:return;case 1:return e[0]}return[].slice.call(e)},iW=(e,t,i)=>Jt(e,n=>{var r=Lt(n,tW);return be({},r,{items:MA(n.items,t-1,i)})}),MA=(e,t,i)=>Array.isArray(e)?t?iW(e,t,i):Jt(e,i):e,nW=(e,t,i)=>{var n=i?$r(i).length:0;return MA(e,n,t)},VA=(e,t)=>{var i;return(i=e)!==null&&i!==void 0&&i.data&&(t=e,e=e.data),Array.isArray(e)||(e=[e]),{data:e,extra:t}},rW=e=>{var t={};return F(["useDefaultSearch","key","load","loadMode","cacheRawData","byKey","lookup","totalCount","insert","update","remove"],function(){t[this]=e[this],delete e[this]}),new Os(t)},aW=e=>{var t=e.type;return delete e.type,or.create(t,e)},oW=(e,t)=>new Os({load:()=>Z4.sendRequest({url:e,dataType:"json"}),loadMode:t==null?void 0:t.fromUrlLoadMode}),Ws=(e,t)=>{var i;return typeof e=="string"&&(e={paginate:!1,store:oW(e,t)}),e===void 0&&(e=[]),Array.isArray(e)||e instanceof or?e={store:e}:e=O({},e),e.store===void 0&&(e.store=[]),i=e.store,"load"in e?i=rW(e):Array.isArray(i)?i=new $s(i):Ye(i)&&(i=aW(O({},i))),e.store=i,e};class sW{constructor(){this._counter=-1,this._deferreds={}}add(t){return this._counter++,this._deferreds[this._counter]=t,this._counter}remove(t){return delete this._deferreds[t]}cancel(t){return t in this._deferreds?(this._deferreds[t].reject(FA),!0):!1}cancelAll(){for(;this._counter>-1;)this.cancel(this._counter),this._counter--}}var lr=nt.inherit({ctor(e){var t;e=Ws(e),this._eventsStrategy=new wo(this,{syncStrategy:!0}),this._store=e.store,this._changedTime=0;var i=e.pushAggregationTimeout!==0;if(i){var n=e.pushAggregationTimeout===void 0?()=>5*this._changedTime:e.pushAggregationTimeout,r,a,o=F$(s=>{r.resolve();var l=Ae(...a);l.done(()=>this._onPush(s)),a=void 0,r=void 0},n);this._onPushHandler=s=>{this._aggregationTimeoutId=o(s.changes),r||(r=new te),a=s.waitFor,s.waitFor.push(r.promise())},this._store.on("beforePush",this._onPushHandler)}else this._onPushHandler=s=>this._onPush(s),this._store.on("push",this._onPushHandler);this._storeLoadOptions=this._extractLoadOptions(e),this._mapFunc=e.map,this._postProcessFunc=e.postProcess,this._pageIndex=e.pageIndex!==void 0?e.pageIndex:0,this._pageSize=e.pageSize!==void 0?e.pageSize:20,this._loadingCount=0,this._loadQueue=this._createLoadQueue(),this._searchValue="searchValue"in e?e.searchValue:null,this._searchOperation=e.searchOperation||"contains",this._searchExpr=e.searchExpr,this._paginate=e.paginate,this._reshapeOnPush=(t=e.reshapeOnPush)!==null&&t!==void 0?t:!1,F(["onChanged","onLoadError","onLoadingChanged","onCustomizeLoadResult","onCustomizeStoreLoadOptions"],(s,l)=>{l in e&&this.on(l.substr(2,1).toLowerCase()+l.substr(3),e[l])}),this._operationManager=new sW,this._init()},_init(){this._items=[],this._userData={},this._totalCount=-1,this._isLoaded=!1,E(this._paginate)||(this._paginate=!this.group()),this._isLastPage=!this._paginate},dispose(){var e;this._store.off("beforePush",this._onPushHandler),this._store.off("push",this._onPushHandler),this._eventsStrategy.dispose(),clearTimeout(this._aggregationTimeoutId),(e=this._delayedLoadTask)===null||e===void 0||e.abort(),this._operationManager.cancelAll(),delete this._store,delete this._items,delete this._delayedLoadTask,this._disposed=!0},_extractLoadOptions(e){var t={},i=["sort","filter","select","group","requireTotalCount"],n=this._store._customLoadOptions();return n&&(i=i.concat(n)),F(i,function(){t[this]=e[this]}),t},loadOptions(){return this._storeLoadOptions},items(){return this._items},pageIndex(e){if(!xt(e))return this._pageIndex;this._pageIndex=e,this._isLastPage=!this._paginate},paginate(e){if(!Ss(e))return this._paginate;this._paginate!==e&&(this._paginate=e,this.pageIndex(0))},pageSize(e){if(!xt(e))return this._pageSize;this._pageSize=e},isLastPage(){return this._isLastPage},generateStoreLoadOptionAccessor(e){return t=>{var i=A0(t);if(i===void 0)return this._storeLoadOptions[e];this._storeLoadOptions[e]=i}},sort(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("sort")(t)},filter(){var e=A0(arguments);if(e===void 0)return this._storeLoadOptions.filter;this._storeLoadOptions.filter=e,this.pageIndex(0)},group(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("group")(t)},select(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.generateStoreLoadOptionAccessor("select")(t)},requireTotalCount(e){if(!Ss(e))return this._storeLoadOptions.requireTotalCount;this._storeLoadOptions.requireTotalCount=e},searchValue(e){if(arguments.length<1)return this._searchValue;this._searchValue=e,this.pageIndex(0)},searchOperation(e){if(!Me(e))return this._searchOperation;this._searchOperation=e,this.pageIndex(0)},searchExpr(e){var t=arguments.length;if(t===0)return this._searchExpr;t>1&&(e=[].slice.call(arguments)),this._searchExpr=e,this.pageIndex(0)},store(){return this._store},key(){var e;return(e=this._store)===null||e===void 0?void 0:e.key()},totalCount(){return this._totalCount},isLoaded(){return this._isLoaded},isLoading(){return this._loadingCount>0},beginLoading(){this._changeLoadingCount(1)},endLoading(){this._changeLoadingCount(-1)},_createLoadQueue:()=>O4(),_changeLoadingCount(e){var t=this.isLoading();this._loadingCount+=e;var i=this.isLoading();t^i&&this._eventsStrategy.fireEvent("loadingChanged",[i])},_scheduleLoadCallbacks(e){this.beginLoading(),e.always(()=>{this.endLoading()})},_scheduleFailCallbacks(e){var t=this;e.fail(function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];n[0]!==FA&&t._eventsStrategy.fireEvent("loadError",n)})},_fireChanged(e){var t=new Date;this._eventsStrategy.fireEvent("changed",e),this._changedTime=new Date-t},_scheduleChangedCallbacks(e){e.done(()=>this._fireChanged())},loadSingle(e,t){var i=new te,n=this.key(),r=this._store,a=this._createStoreLoadOptions();return this._scheduleFailCallbacks(i),arguments.length<2&&(t=e,e=n),delete a.skip,delete a.group,delete a.refresh,delete a.pageIndex,delete a.searchString,(e===n||r instanceof Os&&!r._byKeyViaLoad()?r.byKey(t,a):(a.take=1,a.filter=a.filter?[a.filter,[e,t]]:[e,t],r.load(a))).fail(i.reject).done(o=>{var s=Array.isArray(o)&&!o.length;!E(o)||s?i.reject(new ni.Error("E4009")):(Array.isArray(o)||(o=[o]),i.resolve(this._applyMapFunction(o)[0]))}),i.promise()},load(){var e=new te,t=()=>{if(!this._disposed&&T0(e))return this._loadFromStore(i,e)};this._scheduleLoadCallbacks(e),this._scheduleFailCallbacks(e),this._scheduleChangedCallbacks(e);var i=this._createLoadOperation(e);return this._eventsStrategy.fireEvent("customizeStoreLoadOptions",[i]),this._loadQueue.add(()=>(typeof i.delay=="number"?this._delayedLoadTask=Th(t,i.delay):t(),e.promise())),e.promise({operationId:i.operationId})},_onPush(e){if(this._reshapeOnPush)this.load();else{this._eventsStrategy.fireEvent("changing",[{changes:e}]);var t=this.group(),i=this.items(),n=0,r=this.paginate()||t?e.filter(a=>a.type==="update"):e;t&&(n=Array.isArray(t)?t.length:1),this._mapFunc&&r.forEach(a=>{a.type==="insert"&&(a.data=this._mapFunc(a.data))}),Cs({keyInfo:this.store(),data:i,changes:r,groupCount:n,useInsertIndex:!0}),this._fireChanged([{changes:e}])}},_createLoadOperation(e){var t=this._operationManager.add(e),i=this._createStoreLoadOptions();return e.always(()=>this._operationManager.remove(t)),{operationId:t,storeLoadOptions:i}},reload(){var e=this.store();return e instanceof Os&&e.clearRawDataCache(),this._init(),this.load()},cancel(e){return this._operationManager.cancel(e)},cancelAll(){return this._operationManager.cancelAll()},_addSearchOptions(e){this._disposed||(this.store()._useDefaultSearch?this._addSearchFilter(e):(e.searchOperation=this._searchOperation,e.searchValue=this._searchValue,e.searchExpr=this._searchExpr))},_createStoreLoadOptions(){var e=O({},this._storeLoadOptions);return this._addSearchOptions(e),this._paginate&&this._pageSize&&(e.skip=this._pageIndex*this._pageSize,e.take=this._pageSize),e.userData=this._userData,e},_addSearchFilter(e){var t=this._searchValue,i=this._searchOperation,n=this._searchExpr,r=[];t&&(n||(n="this"),Array.isArray(n)||(n=[n]),F(n,function(a,o){r.length&&r.push("or"),r.push([o,i,t])}),e.filter?e.filter=[r,e.filter]:e.filter=r)},_loadFromStore(e,t){var i=(n,r)=>{if(!this._disposed&&T0(t)){var a=O(VA(n,r),e);this._eventsStrategy.fireEvent("customizeLoadResult",[a]),Ae(a.data).done(o=>{a.data=o,this._processStoreLoadResult(a,t)}).fail(t.reject)}};return e.data?new te().resolve(e.data).done(i):this.store().load(e.storeLoadOptions).done(i).fail(t.reject)},_processStoreLoadResult(e,t){var i=e.data,n=e.extra,r=e.storeLoadOptions,a=()=>(this._isLoaded=!0,this._totalCount=isFinite(n.totalCount)?n.totalCount:-1,t.resolve(i,n));this._disposed||(i=this._applyPostProcessFunction(this._applyMapFunction(i)),Ye(n)||(n={}),this._items=i,(!i.length||!this._paginate||this._pageSize&&i.length<this._pageSize)&&(this._isLastPage=!0),r.requireTotalCount&&!isFinite(n.totalCount)?this.store().totalCount(r).done(function(o){n.totalCount=o,a()}).fail(t.reject):a())},_applyMapFunction(e){return this._mapFunc?nW(e,this._mapFunc,this.group()):e},_applyPostProcessFunction(e){return this._postProcessFunc?this._postProcessFunc(e):e},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}}),lW="dx-selection-disabled",uW="dx-datagrid-group-opened",dW="dx-datagrid-group-closed",cW="dx-datagrid-expand",hW="nodata",fW="infinite",D0="virtual",pW="scrolling.legacyMode",O0="scrolling.mode",vW="scrolling.rowRenderingMode",_W={year:function(e){return e&&e.getFullYear()},month:function(e){return e&&e.getMonth()+1},day:function(e){return e&&e.getDate()},quarter:function(e){return e&&Math.floor(e.getMonth()/3)+1},hour:function(e){return e&&e.getHours()},minute:function(e){return e&&e.getMinutes()},second:function(e){return e&&e.getSeconds()}},gW=function(){var e=arguments[1],t=this.calculateCellValue(e);if(E(t)){if(NA(this.dataType)){var i=arguments[0];return _W[i](t)}else if(this.dataType==="number"){var n=arguments[0];return Math.floor(Number(t)/n)*n}}else return null},mW=function(e,t){return Ee(e)&&Ee(t)&&e.originalCallback&&t.originalCallback?e.originalCallback===t.originalCallback&&e.columnIndex===t.columnIndex:e===t};function NA(e){return e==="date"||e==="datetime"}var R0=function(e){e.get(0).textContent=" "},ep=function(e){e=e||[];for(var t=$r(e),i=0;i<e.length;i++)e&&e[i]&&e[i].isExpanded!==void 0&&(t[i].isExpanded=e[i].isExpanded),e&&e[i]&&e[i].groupInterval!==void 0&&(t[i].groupInterval=e[i].groupInterval);return t},HA=function(e,t){var i=bA.format(e,t.format)||e&&e.toString()||"",n={value:e,valueText:t.getDisplayFormat?t.getDisplayFormat(i):i,target:t.target||"row",groupInterval:t.groupInterval};return t.customizeText?t.customizeText.call(t,n):n.valueText},k0=function(e,t){var i=e.displayFormat||e.columnCaption&&t[e.summaryType+"OtherColumn"]||t[e.summaryType];return HA(e.value,{format:e.valueFormat,getDisplayFormat:function(n){return i?Hr(i,n,e.columnCaption):n},customizeText:e.customizeText})},B0=function(e){var t=e.data&&e.data(),i=t&&t.dxComponents,n=i&&i[0];return n&&t[n]},CW=function e(t,i){if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;for(var n=0;n<t.length;n++)if(!e(t[n],i[n]))return!1;return!0}else return Ee(t)&&t.columnIndex>=0&&Ee(i)&&i.columnIndex>=0?t.columnIndex===i.columnIndex&&jt(t.filterValue)===jt(i.filterValue):jt(t)==jt(i)};const xe={renderNoDataText:function(e){if(e=e||this.element(),!!e){var t=this.addWidgetPrefix(hW),i=e.find("."+t).last(),n=this._dataController.isEmpty(),r=this._dataController.isLoading();i.length||(i=v("<span>").addClass(t).appendTo(e)),n&&!r?i.removeClass("dx-hidden").text(this._getNoDataText()):i.addClass("dx-hidden")}},renderLoadPanel:function(e,t,i){var n;this._loadPanel&&this._loadPanel.$element().remove(),n=this.option("loadPanel"),n&&(n.enabled==="auto"?!i:n.enabled)?(n=O({shading:!1,message:n.text,container:t},n),this._loadPanel=this._createComponent(v("<div>").appendTo(t),bm,n)):this._loadPanel=null},calculateLoadPanelPosition(e){var t=v(qe());return je(e)>je(t)?{of:t,boundary:e,collision:"fit"}:{of:e}},getIndexByKey:function(e,t,i){var n=-1;if(e!==void 0&&Array.isArray(t)){i=arguments.length<=2?"key":i;for(var r=0;r<t.length;r++){var a=E(i)?t[r][i]:t[r];if(kt(e,a)){n=r;break}}}return n},combineFilters:function(e,t){var i=[];t=t||"and";for(var n=0;n<e.length;n++){var r;if(e[n]){if(((r=e[n])===null||r===void 0?void 0:r.length)===1&&e[n][0]==="!"){if(t==="and")return["!"];if(t==="or")continue}i.length&&i.push(t),i.push(e[n])}}if(i.length===1&&(i=i[0]),i.length)return i},checkChanges:function(e,t){for(var i=0,n=0;n<t.length;n++)e[t[n]]&&i++;return e.length&&e.length===i},equalFilterParameters:CW,proxyMethod:function(e,t,i){e[t]||(e[t]=function(){var n=this._dataSource;return n?n[t].apply(n,arguments):i})},formatValue:HA,getFormatOptionsByColumn:function(e,t){return{format:e.format,getDisplayFormat:e.getDisplayFormat,customizeText:e.customizeText,target:t,trueText:e.trueText,falseText:e.falseText}},getDisplayValue:function(e,t,i,n){return e.displayValueMap&&e.displayValueMap[t]!==void 0?e.displayValueMap[t]:e.calculateDisplayValue&&i&&n!=="group"?e.calculateDisplayValue(i):e.lookup&&!(n==="group"&&(e.calculateGroupValue||e.calculateDisplayValue))?e.lookup.calculateCellValue(t):t},getGroupRowSummaryText:function(e,t){for(var i="(",n=0;n<e.length;n++){var r=e[n];i+=(n>0?", ":"")+k0(r,t)}return i+")"},getSummaryText:k0,normalizeSortingInfo:ep,getFormatByDataType:function(e){switch(e){case"date":return"shortDate";case"datetime":return"shortDateShortTime"}},getHeaderFilterGroupParameters:function(e,t){var i=[],n=e.dataField||e.name,r=As.getGroupInterval(e);return r?(F(r,function(a,o){i.push(t?{selector:n,groupInterval:o,isExpanded:a<r.length-1}:gW.bind(e,o))}),i):(t?i=[{selector:n,isExpanded:!1}]:(i=function(a){var o=e.calculateCellValue(a);return(o===void 0||o==="")&&(o=null),o},e.sortingMethod&&(i=[{selector:i,compare:e.sortingMethod.bind(e)}])),i)},equalSortParameters(e,t,i){if(e=ep(e),t=ep(t),Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!mW(e[n].selector,t[n].selector)||e[n].desc!==t[n].desc||e[n].groupInterval!==t[n].groupInterval||!i&&!!e[n].isExpanded!=!!t[n].isExpanded)return!1;return!0}else return(!e||!e.length)==(!t||!t.length)},getPointsByColumns:function(e,t,i,n){for(var r=e.length,a=!1,o,s,l=n||0,u=[],d,c=0;c<=r;c++){c<r&&(o=e.eq(c),s=o.offset(),d=o.css("direction")==="rtl");var h={index:l,x:s?s.left+(!i&&d^c===r?Gt(o[0]).width:0):0,y:s?s.top+(i&&c===r?Gt(o[0]).height:0):0,columnIndex:l};if(!i&&c>0){var f=e.eq(c-1).offset();f.top<h.y&&(h.y=f.top)}t&&(a=t(h)),a||u.push(h),l++}return u},getExpandCellTemplate:function(){return{allowRenderToDetachedContainer:!0,render:function(e,t){var i=v(e);if(E(t.value)&&!(t.data&&t.data.isContinuation)&&!t.row.isNewRow){var n=t.component.getView("rowsView");i.addClass(cW).addClass(lW),v("<div>").addClass(t.value?uW:dW).appendTo(i),n.setAria("label",t.value?n.localize("dxDataGrid-ariaCollapse"):n.localize("dxDataGrid-ariaExpand"),i)}else R0(i)}}},setEmptyText:R0,isDateType:NA,getSelectionRange:function(e){try{if(e)return{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}catch{}return{}},setSelectionRange:function(e,t){try{e&&e.setSelectionRange&&e.setSelectionRange(t.selectionStart,t.selectionEnd)}catch{}},focusAndSelectElement:function(e,t){var i=t.is(":focus");D.trigger(t,"focus");var n=e.option("editing.selectTextOnEditStart"),r=t.get(0);if(!i&&n&&t.is(".dx-texteditor-input")&&!t.is("[readonly]")){var a=B0(t.closest(".dx-texteditor"));Ae(a&&a._loadItemDeferred).done(function(){r.select()})}},getWidgetInstance:B0,getLastResizableColumnIndex:function(e,t){var i=e.some(s=>s&&!s.command&&!s.fixed&&s.allowResizing!==!1),n;for(n=e.length-1;e[n];n--){var r=e[n],a=t&&t[n],o=!i||r.allowResizing!==!1;if(!r.command&&!r.fixed&&a!=="adaptiveHidden"&&o)break}return n},isElementInCurrentGrid:function(e,t){if(t&&t.length){var i=t.closest("."+e.getWidgetContainerClass()).parent();return i.is(e.component.$element())}return!1},isVirtualRowRendering:function(e){var t=e.option(vW),i=e.option(O0)===D0,n=e.option(O0)===fW;return e.option(pW)===!1&&(i||n)?!0:t===D0},getPixelRatio:function(e){return e.devicePixelRatio||1},getContentHeightLimit(e){return e.mozilla?8e6:15e6/this.getPixelRatio(qe())},normalizeLookupDataSource(e){var t;return e.items?t=e.items:(t=e.dataSource,Ee(t)&&!Fi.isWrapped(t)&&(t=t({}))),Ws(t)},getWrappedLookupDataSource(e,t,i){var n=this.normalizeLookupDataSource(e.lookup),r=e.displayField&&Me(e.displayField),a=r?[e.dataField,e.displayField]:e.dataField,o={load:s=>{var l=new te;return t.load({filter:i,group:a,isExpanded:!1}).done(u=>{if(u.length===0&&l.resolve([]),r){var d=u.map(f=>{var p;return{[e.lookup.valueExpr]:f.key,[e.lookup.displayExpr]:(p=e.displayValueMap[f.key])!==null&&p!==void 0?p:f.items[0].key}}),c=new lr(be({},s,{store:new $s({data:d,key:e.lookup.valueExpr})}));c.load(s).done(l.resolve).fail(l.fail)}else{var h=this.combineFilters(u.map(f=>[e.lookup.valueExpr,f.key]),"or");new lr(be({},n,s,{filter:this.combineFilters([h,s.filter],"and")})).load(s).done(l.resolve).fail(l.fail)}}).fail(l.fail),l},key:e.lookup.valueExpr,byKey(s){var l=te();return this.load({filter:[e.lookup.valueExpr,"=",s]}).done(u=>{l.resolve(u[0])}),l.promise()}};return o}};var yW="dxDataGrid",$A=nt.inherit({_endUpdateCore:function(){},ctor:function(e){var t=this;t._updateLockCount=0,t.component=e,t._actions={},t._actionConfigs={},F(this.callbackNames()||[],function(i,n){var r=t.callbackFlags(n)||{};r.unique=!0,r.syncStrategy=!0,t[this]=dt(r)})},init:function(){},callbackNames:function(){},callbackFlags:function(){},publicMethods:function(){},beginUpdate:function(){this._updateLockCount++},endUpdate:function(){this._updateLockCount>0&&(this._updateLockCount--,this._updateLockCount||this._endUpdateCore())},option:function(e){var t=this.component,i=t._optionCache;return arguments.length===1&&i?(e in i||(i[e]=t.option(e)),i[e]):t.option.apply(t,arguments)},_silentOption:function(e,t){var i=this.component,n=i._optionCache;return n&&(n[e]=t),i._setOptionWithoutOptionChange(e,t)},localize:function(e){var t=this.component._optionCache;return t?(e in t||(t[e]=ue.format(e)),t[e]):ue.format(e)},on:function(){return this.component.on.apply(this.component,arguments)},off:function(){return this.component.off.apply(this.component,arguments)},optionChanged:function(e){e.name in this._actions&&(this.createAction(e.name,this._actionConfigs[e.name]),e.handled=!0)},getAction:function(e){return this._actions[e]},setAria:function(e,t,i){var n=i.get(0),r=e!=="role"&&e!=="id"?"aria-":"";n.setAttribute?n.setAttribute(r+e,t):i.attr(r+e,t)},_createComponent:function(){return this.component._createComponent.apply(this.component,arguments)},getController:function(e){return this.component._controllers[e]},createAction:function(e,t){if(Ee(e)){var i=this.component._createAction(e.bind(this),t);return function(n){i({event:n})}}else this._actions[e]=this.component._createActionByOption(e,t),this._actionConfigs[e]=t},executeAction:function(e,t){var i=this._actions[e];return i&&i(t)},dispose:function(){var e=this;F(e.callbackNames()||[],function(){e[this].empty()})},addWidgetPrefix:function(e){var t=this.component.NAME;return"dx-"+t.slice(2).toLowerCase()+(e?"-"+e:"")},getWidgetContainerClass:function(){var e=this.component.NAME===yW?null:"container";return this.addWidgetPrefix(e)},elementIsInsideGrid:function(e){var t=e.closest("."+this.getWidgetContainerClass()).parent();return t.is(this.component.$element())}}),eh=$A,xW=eh.inherit({getView:function(e){return this.component._views[e]},getViews:function(){return this.component._views}}),WA=$A.inherit({_isReady:function(){return this.component.isReady()},_endUpdateCore:function(){this.callBase(),!this._isReady()&&this._requireReady&&(this._requireRender=!1,this.component._requireResize=!1),this._requireRender&&(this._requireRender=!1,this.render(this._$parent))},_invalidate:function(e,t){this._requireRender=!0,this.component._requireResize=Ke()&&(this.component._requireResize||e),this._requireReady=this._requireReady||t},_renderCore:function(){},_resizeCore:function(){},_parentElement:function(){return this._$parent},ctor:function(e){this.callBase(e),this.renderCompleted=dt(),this.resizeCompleted=dt()},element:function(){return this._$element},getElementHeight:function(){var e=this.element();if(!e)return 0;var t=parseFloat(e.css("marginTop"))||0,i=parseFloat(e.css("marginBottom"))||0,n=e.get(0).offsetHeight;return n+t+i},isVisible:function(){return!0},getTemplate:function(e){return this.component._getTemplate(e)},render:function(e,t){var i=this._$element,n=this.isVisible();!i&&!e||(this._requireReady=!1,i||(i=this._$element=v("<div>").appendTo(e),this._$parent=e),i.toggleClass("dx-hidden",!n),n&&(this.component._optionCache={},this._renderCore(t),this.component._optionCache=void 0,this.renderCompleted.fire(t)))},resize:function(){this.isResizing=!0,this._resizeCore(),this.resizeCompleted.fire(),this.isResizing=!1},focus:function(){D.trigger(this.element(),"focus")}}),L0=1e6,bW=function(e,t){var i=t.modules,n=t.modulesOrder,r=t.controllerTypes||{},a=t.viewTypes||{};t.controllerTypes||(n&&i.sort(function(s,l){var u=n.indexOf(s.name),d=n.indexOf(l.name);return u<0&&(u=L0),d<0&&(d=L0),u-d}),F(i,function(){var s=this.controllers,l=this.name,u=this.views;s&&F(s,function(d,c){if(r[d])throw Je.Error("E1001",l,d);if(!(c&&c.subclassOf&&c.subclassOf(eh)))throw c.subclassOf(eh),Je.Error("E1002",l,d);r[d]=c}),u&&F(u,function(d,c){if(a[d])throw Je.Error("E1003",l,d);if(!(c&&c.subclassOf&&c.subclassOf(WA)))throw Je.Error("E1004",l,d);a[d]=c})}),F(i,function(){var s=this.extenders;s&&(s.controllers&&F(s.controllers,function(l,u){r[l]&&(r[l]=r[l].inherit(u))}),s.views&&F(s.views,function(l,u){a[l]&&(a[l]=a[l].inherit(u))}))}),t.controllerTypes=r,t.viewTypes=a);var o=function(s){var l={};return F(s,function(u,d){var c=new d(e);c.name=u,function(h,f,p){var g=p.publicMethods();g&&F(g,function(m,C){if(p[C])if(!h[C])h[C]=function(){return p[C].apply(p,arguments)};else throw Je.Error("E1005",C);else throw Je.Error("E1006",f,C)})}(e,u,c),l[u]=c}),l};e._controllers=o(r),e._views=o(a)},SW=function(e,t,i){i=i||[],e._controllers&&F(e._controllers,function(){this[t]&&this[t].apply(this,i)}),e._views&&F(e._views,function(){this[t]&&this[t].apply(this,i)})};const Tt={modules:[],View:WA,ViewController:xW,Controller:eh,registerModule:function(e,t){for(var i=this.modules,n=0;n<i.length;n++)if(i[n].name===e)return;t.name=e,i.push(t),delete this.controllerTypes,delete this.viewTypes},registerModulesOrder:function(e){this.modulesOrder=e},unregisterModule:function(e){this.modules=Vi(this.modules,function(t){return t.name!==e}),delete this.controllerTypes,delete this.viewTypes},processModules:bW,callModuleItemsMethod:SW},De=be({},Tt,xe,{modules:[]});var Mu="dxdblclick",EW="dxDblClick",P0=me(ct,EW),F0=300,wW=nt.inherit({ctor:function(){this._handlerCount=0,this._forgetLastClick()},_forgetLastClick:function(){this._firstClickTarget=null,this._lastClickTimeStamp=-F0},add:function(){this._handlerCount<=0&&D.on(fe.getDocument(),P0,this._clickHandler.bind(this)),this._handlerCount++},_clickHandler:function(e){var t=e.timeStamp||Date.now(),i=t-this._lastClickTimeStamp,n=i<0,r=!n&&i<F0;r?(Sa({type:Mu,target:FV(this._firstClickTarget,e.target),originalEvent:e}),this._forgetLastClick()):(this._firstClickTarget=e.target,this._lastClickTimeStamp=t)},remove:function(){this._handlerCount--,this._handlerCount<=0&&(this._forgetLastClick(),D.off(fe.getDocument(),P0))}});Bn(Mu,new wW);var M0="dx-column-indicators",IW="dx-group-panel-item";const TW={_applyColumnState:function(e){var t,i=this.option("rtlEnabled"),n=this._getColumnAlignment(e.column.alignment,i),r=O(!0,{columnAlignment:n},e),a=r.rootElement.hasClass(IW),o=this._createIndicatorContainer(r,a),s=v("<span>").addClass(this._getIndicatorClassName(e.name)),l=(t=this.component)===null||t===void 0?void 0:t.getController("columns"),u=(l==null?void 0:l.getHeaderContentAlignment(n))||n;return r.container=o,r.indicator=s,this._renderIndicator(r),o[(a||!e.showColumnLines)&&u==="left"?"appendTo":"prependTo"](e.rootElement),s},_getIndicatorClassName:ee,_getColumnAlignment:function(e,t){return t=t||this.option("rtlEnabled"),e&&e!=="center"?e:wa(t)},_createIndicatorContainer:function(e,t){var i=this._getIndicatorContainer(e.rootElement),n=e.columnAlignment==="left"?"right":"left";return i.length||(i=v("<div>").addClass(M0)),this.setAria("role","presentation",i),i.css("float",e.showColumnLines&&!t?n:null)},_getIndicatorContainer:function(e){return e&&e.find("."+M0)},_getIndicatorElements:function(e){var t=this._getIndicatorContainer(e);return t&&t.children()},_renderIndicator:function(e){var t=e.container,i=e.indicator;t&&i&&t.append(i)},_updateIndicators:function(e){var t=this.getColumns(),i=this.getColumnElements(),n;if(!(!i||t.length!==i.length))for(var r=0;r<t.length;r++){n=i.eq(r),this._updateIndicator(n,t[r],e);var a=n.parent().data("options");a&&a.cells&&(a.cells[n.index()].column=t[r])}},_updateIndicator:function(e,t,i){if(!t.command)return this._applyColumnState({name:i,rootElement:e,column:t,showColumnLines:this.option("showColumnLines")})}};var V0="scroll-container",AW="scrollable-simulated",DW="group-space",OW="content",RW="table",kW="table-fixed",BW="content-fixed",il="dx-row",tp="dx-group-row",LW="dx-group-cell",ip="dx-master-detail-row",PW="filter-row",FW="dx-error-row",MW="cell-updated-animation",N0="0.0001px",np="dxCellHintVisible",VW="dx-field-item-content",NW={render:function(e){e.container.append(e.content)}},HW=function(e,t){var i,n,r;function a(o){return setTimeout(function(){i=n=null},o)}D.on(t,"touchstart touchend",".dx-row",function(o){clearTimeout(r),o.type==="touchstart"?(i=o.target,n=o.currentTarget,r=a(1e3)):r=a()}),D.on(t,[ct,Mu,ut.down].join(" "),".dx-row",e.createAction(function(o){var s=o.event;i&&(s.target=i,s.currentTarget=n),v(s.target).closest("a").length||(o.rowIndex=e.getRowIndex(s.currentTarget),o.rowIndex>=0&&(o.rowElement=Fe(v(s.currentTarget)),o.columns=e.getColumns(),s.type===ut.down?e._rowPointerDown(o):s.type===ct?e._rowClick(o):e._rowDblClick(o)))}))},vd=function(e){return e==="auto"?"":xt(e)?e+"px":e},H0=function(e,t,i){e.style.width=e.style.maxWidth=t.width==="auto"?"":i},$W=function(e,t){if(!(!e||!t)){var i=e.attributes,n=t.attributes,r;for(r=0;r<i.length;r++){var a=i[r].nodeName;t.hasAttribute(a)||e.removeAttribute(a)}for(r=0;r<n.length;r++)e.setAttribute(n[r].nodeName,n[r].nodeValue)}},Vu=Tt.View.inherit(TW).inherit({_createScrollableOptions:function(){var e=this.option("scrolling"),t=this.option("scrolling.useNative"),i=O({},e,{direction:"both",bounceEnabled:!1,useKeyboard:!1});return t===void 0&&(t=!0),t==="auto"?(delete i.useNative,delete i.useSimulatedScrollbar):(i.useNative=!!t,i.useSimulatedScrollbar=!t),i},_updateCell:function(e,t){t.rowType&&this._cellPrepared(e,t)},_createCell:function(e){var t=e.column,i=t.alignment||wa(this.option("rtlEnabled")),n=fe.createElement("td");n.style.textAlign=i;var r=v(n);return e.rowType==="data"&&t.headerId&&!t.type&&this.component.option("showColumnHeaders")&&this.setAria("describedby",t.headerId,r),t.cssClass&&r.addClass(t.cssClass),t.command==="expand"&&(r.addClass(t.cssClass),r.addClass(this.addWidgetPrefix(DW))),t.colspan>1?r.attr("colSpan",t.colspan):!t.isBand&&t.visibleWidth!=="auto"&&this.option("columnAutoWidth")&&((t.width||t.minWidth)&&(n.style.minWidth=vd(t.minWidth||t.width)),t.width&&H0(n,t,vd(t.width))),r},_createRow:function(e,t){t=t||"tr";var i=v("<".concat(t,">")).addClass(il);return this.setAria("role","row",i),i},_isAltRow:function(e){return e&&e.dataIndex%2===1},_createTable:function(e,t){var i=this,n=v("<table>").addClass(i.addWidgetPrefix(RW)).addClass(i.addWidgetPrefix(kW));if(e&&!t?(n.append(i._createColGroup(e)),Bt.safari&&n.append(v("<thead>").append("<tr>")),i.setAria("role","presentation",n)):i.setAria("hidden",!0,n),this.setAria("role","presentation",v("<tbody>").appendTo(n)),t)return n;Bt.mozilla&&D.on(n,"mousedown","td",function(a){a.ctrlKey&&a.preventDefault()}),i.option("cellHintEnabled")&&D.on(n,"mousemove",".dx-row > td",this.createAction(function(a){var o=a.event,s=v(o.target),l=v(o.currentTarget),u=l.parent(),d=u.hasClass("dx-data-row"),c=u.hasClass("dx-header-row"),h=u.hasClass(tp),f=u.hasClass(ip),p=u.hasClass(i.addWidgetPrefix(PW)),g=i._columnsController.getVisibleColumns(),m=u.data("options"),C=l.index(),x=m&&m.cells&&m.cells[C],T=x?x.column:g[C];if(!f&&!p&&(!d||d&&T&&!T.cellTemplate)&&(!c||c&&T&&!T.headerCellTemplate)&&(!h||h&&T&&(T.groupIndex===void 0||!T.groupCellTemplate))){s.data(np)&&(s.removeAttr("title"),s.data(np,!1));var R=s[0].scrollWidth-s[0].clientWidth;R>0&&!E(s.attr("title"))&&(s.attr("title",s.text()),s.data(np,!0))}}));var r=function(a){var o=v(a.currentTarget),s=v(a.target).closest("."+VW),l=o.parent(),u=l.data("options"),d=u&&u.cells&&u.cells[o.index()];if(o.closest("table").is(a.delegateTarget)){var c=O({},d,{cellElement:Fe(o),event:a,eventType:a.type});if(c.rowIndex=i.getRowIndex(l),s.length){var h=s.data("dx-form-item");h.column&&(c.column=h.column,c.columnIndex=i._columnsController.getVisibleIndex(c.column.index))}return c}};return D.on(n,"mouseover",".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellHoverChanged",o)}),D.on(n,"mouseout",".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellHoverChanged",o)}),D.on(n,ct,".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellClick",o)}),D.on(n,Mu,".dx-row > td",function(a){var o=r(a);o&&i.executeAction("onCellDblClick",o)}),HW(i,n),n},_rowPointerDown:ee,_rowClick:ee,_rowDblClick:ee,_createColGroup:function(e){for(var t=v("<colgroup>"),i=0;i<e.length;i++)for(var n=e[i].colspan||1,r=0;r<n;r++)t.append(this._createCol(e[i]));return t},_createCol:function(e){var t=e.visibleWidth||e.width;t==="adaptiveHidden"&&(t=N0);var i=v("<col>");return Ef(i,t),i},renderDelayedTemplates:function(e){var t=this._delayedTemplates,i=t.filter(r=>!r.async),n=t.filter(r=>r.async);this._delayedTemplates=[],this._renderDelayedTemplatesCore(i,!1,e),this._renderDelayedTemplatesCoreAsync(n)},_renderDelayedTemplatesCoreAsync:function(e){var t=this;e.length&&qe().setTimeout(function(){t._renderDelayedTemplatesCore(e,!0)})},_renderDelayedTemplatesCore:function(e,t,i){for(var n=new Date;e.length;){var r=e.shift(),a=r.options,o=fe.getDocument();if((!t||v(a.container).closest(o).length)&&(i&&(a.change=i),r.template.render(a)),t&&new Date-n>30){this._renderDelayedTemplatesCoreAsync(e);break}}!e.length&&this._delayedTemplates.length&&this.renderDelayedTemplates()},_processTemplate:function(e){var t;if(e&&e.render&&!hn(e))t={allowRenderToDetachedContainer:e.allowRenderToDetachedContainer,render:function(n){e.render(n.container,n.model,n.change),n.deferred&&n.deferred.resolve()}};else if(Ee(e))t={render:function(n){var r=e(Fe(n.container),n.model,n.change);r&&(r.nodeType||hn(r))&&n.container.append(r),n.deferred&&n.deferred.resolve()}};else{var i=Me(e)?e:v(e).attr("id");i?(this._templatesCache[i]||(this._templatesCache[i]=this.getTemplate(e)),t=this._templatesCache[i]):t=this.getTemplate(e)}return t},renderTemplate:function(e,t,i,n,r){var a=this._processTemplate(t,i),o=i.column,s=i.rowType==="data",l=new te,u={container:e,model:i,deferred:l,onRendered:()=>{l.resolve()}};if(a){i.component=this.component;var d=o&&(o.renderAsync&&s||this.option("renderAsync")&&(o.renderAsync!==!1&&(o.command||o.showEditorAlways)&&s||i.rowType==="filter"));(a.allowRenderToDetachedContainer||n)&&!d?a.render(u):this._delayedTemplates.push({template:a,options:u,async:d}),r&&(r.templateDeferreds=r.templateDeferreds||[],r.templateDeferreds.push(l))}else l.reject();return l.promise()},_getBodies:function(e){return v(e).children("tbody").not(".dx-header").not(".dx-footer")},_wrapRowIfNeed:function(e,t,i){var n=this.option().rowTemplate||this.option("dataRowTemplate"),r=i?e||this._tableElement:this._tableElement||e,a=n&&this._getBodies(r);if(a&&a.filter("."+il).length){var o=v("<tbody>").addClass(t.attr("class"));return this.setAria("role","presentation",o),o.append(t)}return t},_appendRow:function(e,t,i){i=i||NW,i.render({content:t,container:e})},_resizeCore:function(){var e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))},_renderCore:function(e){var t=this.element().parent();(!t||t.parent().length)&&this.renderDelayedTemplates(e)},_renderTable:function(e){e=e||{},e.columns=this._columnsController.getVisibleColumns();var t=e.change&&e.change.changeType,i=this._createTable(e.columns,t==="append"||t==="prepend"||t==="update");return this._renderRows(i,e),i},_renderRows:function(e,t){for(var i=this._getRows(t.change),n=t.change&&t.change.columnIndices||[],r=t.change&&t.change.changeTypes||[],a=0;a<i.length;a++)this._renderRow(e,O({row:i[a],columnIndices:n[a],changeType:r[a]},t))},_renderRow:function(e,t){t.columnIndices||(t.row.cells=[]);var i=this._createRow(t.row),n=this._wrapRowIfNeed(e,i);t.changeType!=="remove"&&this._renderCells(i,t),this._appendRow(e,n);var r=O({columns:t.columns},t.row);this._addWatchMethod(r,t.row),this._rowPrepared(n,r,t.row)},_needRenderCell:function(e,t){return!t||t.indexOf(e)>=0},_renderCells:function(e,t){for(var i=0,n=t.row,r=t.columns,a=0;a<r.length;a++)this._needRenderCell(a,t.columnIndices)&&this._renderCell(e,O({column:r[a],columnIndex:i,value:n.values&&n.values[i],oldValue:n.oldValues&&n.oldValues[i]},t)),r[a].colspan>1?i+=r[a].colspan:i++},_updateCells:function(e,t,i){var n=e.children(),r=t.children(),a=this.option("highlightChanges"),o=this.addWidgetPrefix(MW);i.forEach(function(s,l){var u=n.eq(s),d=r.eq(l);u.replaceWith(d),a&&!d.hasClass("dx-command-expand")&&d.addClass(o)}),$W(e.get(0),t.get(0))},_setCellAriaAttributes:function(e,t){if(t.rowType!=="freeSpace"){this.setAria("role","gridcell",e);var i=this._columnsController.getColumnIndexOffset(),n=t.columnIndex+i+1;this.setAria("colindex",n,e)}},_renderCell:function(e,t){var i=this._getCellOptions(t);if(t.columnIndices){if(t.row.cells){var n=t.row.cells.findIndex(a=>a.columnIndex===i.columnIndex);t.row.cells[n]=i}}else t.row.cells.push(i);var r=this._createCell(i);return this._setCellAriaAttributes(r,i),this._renderCellContent(r,i),e.get(0).appendChild(r.get(0)),r},_renderCellContent:function(e,t){var i=this._getCellTemplate(t);Ae(!i||this.renderTemplate(e,i,t)).done(()=>{this._updateCell(e,t)})},_getCellTemplate:function(){},_getRows:function(){return[]},_getCellOptions:function(e){var t={column:e.column,columnIndex:e.columnIndex,rowType:e.row.rowType,isAltRow:this._isAltRow(e.row)};return this._addWatchMethod(t),t},_addWatchMethod:function(e,t){if(this.option("repaintChangesOnly")){var i=[];return t=t||e,t.watch=t.watch||function(n,r,a){var o=n(t.data),s=function(l){l&&a&&a(l);var u=n(t.data);JSON.stringify(o)!==JSON.stringify(u)&&(l&&r(u),o=u)};return i.push(s),function(){var l=i.indexOf(s);l>=0&&i.splice(l,1)}},t.update=t.update||function(n,r){n&&(this.data=e.data=n.data,this.rowIndex=e.rowIndex=n.rowIndex,this.dataIndex=e.dataIndex=n.dataIndex,this.isExpanded=e.isExpanded=n.isExpanded,e.row&&!r&&(e.row=n)),i.forEach(function(a){a(n)})},t!==e&&(e.watch=t.watch.bind(t)),e}},_cellPrepared:function(e,t){t.cellElement=Fe(v(e)),this.executeAction("onCellPrepared",t)},_rowPrepared:function(e,t){Mt(e.get(0),"options",t),t.rowElement=Fe(e),this.executeAction("onRowPrepared",t)},_columnOptionChanged:function(e){var t=e.optionNames;if(xe.checkChanges(t,["width","visibleWidth"])){var i=this._columnsController.getVisibleColumns(),n=Jt(i,function(r){var a=r.visibleWidth||r.width;return E(a)?a:"auto"});this.setColumnWidths({widths:n,optionNames:t});return}this._requireReady||this.render()},getCellIndex:function(e){var t=e.length?e[0].cellIndex:-1;return t},getTableElements:function(){return this._tableElement||v()},getTableElement:function(){return this._tableElement},setTableElement:function(e){this._tableElement=e},optionChanged:function(e){switch(this.callBase(e),e.name){case"cellHintEnabled":case"onCellPrepared":case"onRowPrepared":case"onCellHoverChanged":this._invalidate(!0,!0),e.handled=!0}},init:function(){var e=this;e._scrollLeft=-1,e._columnsController=e.getController("columns"),e._dataController=e.getController("data"),e._delayedTemplates=[],e._templatesCache={},e.createAction("onCellClick"),e.createAction("onRowClick"),e.createAction("onCellDblClick"),e.createAction("onRowDblClick"),e.createAction("onCellHoverChanged",{excludeValidators:["disabled","readOnly"]}),e.createAction("onCellPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),e.createAction("onRowPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering",afterExecute:function(t){e._afterRowPrepared(t)}}),e._columnsController.columnsChanged.add(e._columnOptionChanged.bind(e)),e._dataController&&e._dataController.changed.add(e._handleDataChanged.bind(e))},_afterRowPrepared:ee,_handleDataChanged:function(){},callbackNames:function(){return["scrollChanged"]},_updateScrollLeftPosition:function(){var e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))},scrollTo:function(e){var t=this.element(),i=t&&t.children("."+this.addWidgetPrefix(V0)).not("."+this.addWidgetPrefix(BW));E(e)&&E(e.left)&&this._scrollLeft!==e.left&&(this._scrollLeft=e.left,i&&i.scrollLeft(e.left))},_wrapTableInScrollContainer:function(e){var t=v("<div>"),i=this.option("scrolling.useNative");return(i===!1||i==="auto"&&!po)&&t.addClass(this.addWidgetPrefix(AW)),D.on(t,"scroll",()=>{var n=t.scrollLeft();n!==this._scrollLeft&&this.scrollChanged.fire({left:n},this.name)}),t.addClass(this.addWidgetPrefix(OW)).addClass(this.addWidgetPrefix(V0)).append(e).appendTo(this.element()),this.setAria("role","presentation",t),t},_updateContent:function(e){this.setTableElement(e),this._wrapTableInScrollContainer(e)},_findContentElement:ee,_getWidths:function(e){var t=[],i;return e&&F(e,function(n,r){if(i=r.offsetWidth,r.getBoundingClientRect){var a=Gt(r);a.width>i-1&&(i=a.width)}t.push(i)}),t},getColumnWidths:function(e){var t=[],i,n;if((this.option("forceApplyBindings")||ee)(),e=e||this.getTableElement(),e){i=e.children("tbody:not(.dx-header)").children();for(var r=0;r<i.length;r++){var a=i.eq(r),o=a.get(0).style.display!=="none"&&!a.hasClass("dx-state-invisible");if(!a.is("."+tp)&&!a.is("."+ip)&&!a.is("."+FW)&&o){n=a.children("td");break}}t=this._getWidths(n)}return t},getVisibleColumnIndex:function(e,t){return e},setColumnWidths:function(e){var{widths:t,$tableElement:i,columns:n,fixed:r}=e,a,o,s,l,u=this.option("columnAutoWidth");if(i=i||this.getTableElement(),i&&i.length&&t){l=0,a=i.children("colgroup").children("col"),Ef(a,"auto"),n=n||this.getColumns(null,i);for(var d=0;d<n.length;d++){if(u&&!r&&(o=n[d].width,o&&!n[d].command)){o=n[d].visibleWidth||o,o=vd(o),s=vd(n[d].minWidth||o);for(var c=c||i.children().children(".dx-row").not("."+ip),h=0;h<c.length;h++){var f=c[h],p=void 0,g=this.getVisibleColumnIndex(d,h);f.classList.contains(tp)?p=f.querySelector("td[aria-colindex='".concat(g+1,"']:not(.").concat(LW,")")):p=f.cells[g],p&&(H0(p,n[d],o),p.style.minWidth=s)}}if(n[d].colspan){l+=n[d].colspan;continue}o=t[l],o==="adaptiveHidden"&&(o=N0),typeof o=="number"&&(o=o.toFixed(3)+"px"),Ef(a.eq(l),E(o)?o:"auto"),l++}}},getCellElements:function(e){return this._getCellElementsCore(e)},_getCellElementsCore:function(e){var t=this._getRowElements().eq(e);return t.children()},_getCellElement:function(e,t){var i,n=this.getCellElements(e),r=this._getVisibleColumnIndex(n,e,t);if(n.length&&r>=0&&(i=n.eq(r)),i&&i.length)return i},_getRowElement:function(e){var t=this,i=v(),n=t.getTableElements();if(F(n,function(r,a){i=i.add(t._getRowElements(v(a)).eq(e))}),i.length)return i},getCellElement:function(e,t){return Fe(this._getCellElement(e,t))},getRowElement:function(e){var t=this._getRowElement(e),i=[];if(t&&!Fe(t).get)for(var n=0;n<t.length;n++)i.push(t[n]);else i=t;return i},_getVisibleColumnIndex:function(e,t,i){if(Me(i)){var n=this._columnsController.columnOption(i,"index");return this._columnsController.getVisibleIndex(n)}return i},getColumnElements:function(){},getColumns:function(e){return this._columnsController.getVisibleColumns(e)},getCell:function(e,t){var i=t||this._getRowElements(),n;if(i.length>0&&e.rowIndex>=0&&(this.option("scrolling.mode")!=="virtual"&&this.option("scrolling.rowRenderingMode")!=="virtual"&&(e.rowIndex=e.rowIndex<i.length?e.rowIndex:i.length-1),n=this.getCellElements(e.rowIndex),n&&n.length>0))return n.eq(n.length>e.columnIndex?e.columnIndex:n.length-1)},getRowsCount:function(){var e=this.getTableElement();return e&&e.length===1?e[0].rows.length:0},_getRowElementsCore:function(e){if(e=e||this.getTableElement(),e){var t=this.option().rowTemplate||this.option("dataRowTemplate"),i=t&&e.find("> tbody."+il);return i&&i.length?i:e.find("> tbody > ."+il+", > ."+il)}return v()},_getRowElements:function(e){return this._getRowElementsCore(e)},getRowIndex:function(e){return this._getRowElements().index(e)},getBoundingRect:function(){},getName:function(){},setScrollerSpacing:function(e){var t=this.element(),i=this.option("rtlEnabled");t&&t.css({paddingLeft:i?e:"",paddingRight:i?"":e})},isScrollbarVisible:function(e){var t=this.element(),i=this._tableElement;return t&&i?e?lt(i)-$e(t)>0:at(i)-je(t)>0:!1}}),Y_="dx-state-focused",WW="dx-cell-focus-disabled",zW=".dx-row-focused",zA=".dx-datagrid-rowsview .dx-row",$0="".concat(zA," > td"),GA=".dx-treelist-rowsview .dx-row",W0="".concat(GA," > td"),z0={groupPanel:[".dx-datagrid-group-panel .dx-group-panel-item[tabindex]"],columnHeaders:[".dx-datagrid-headers .dx-header-row > td.dx-datagrid-action",".dx-treelist-headers .dx-header-row > td.dx-treelist-action"],filterRow:[".dx-datagrid-headers .dx-datagrid-filter-row .dx-editor-cell .dx-texteditor-input",".dx-treelist-headers .dx-treelist-filter-row .dx-editor-cell .dx-texteditor-input"],rowsView:["".concat(zW),"".concat(zA,"[tabindex]"),"".concat($0,"[tabindex]"),"".concat($0),"".concat(GA,"[tabindex]"),"".concat(W0,"[tabindex]"),"".concat(W0)],footer:[".dx-datagrid-total-footer .dx-datagrid-summary-item",".dx-treelist-total-footer .dx-treelist-summary-item"],filterPanel:[".dx-datagrid-filter-panel .dx-icon-filter",".dx-treelist-filter-panel .dx-icon-filter"],pager:[".dx-datagrid-pager [tabindex]",".dx-treelist-pager [tabindex]"]},rp=!1,th=!1,us=null;function GW(e,t,i,n,r,a){var o=jW(t,i.originalEvent,a);if(!o){var s=Nt(i);s==="enter"||s==="space"?(UW(i.target,t),n&&n({event:i})):s==="tab"?r.addClass(Y_):Fm(e,t,i)}}function UW(e,t){var i=v(e),n=i.attr("aria-label"),r=UA(n,t.element()),a=r.index(i);us=O({},{ariaLabel:n,index:a},{viewInstance:t})}function UA(e,t){var i=v(t),n;return e?n=i.find('[aria-label="'.concat(e,'"][tabindex]')):n=i.find("[tabindex]"),n}function KW(e){for(var t in e){var i=e[t],n=v(i).first();if(n.length)return n}}function jW(e,t,i){var n={event:t,handled:!1};return i?i(n):e._createActionByOption("onKeyDown")(n),n.handled}function KA(){th=fe.getDocument().visibilityState==="visible"}function qW(){D.on(fe.getDocument(),"visibilitychange",KA)}function YW(){D.off(fe.getDocument(),"visibilitychange",KA)}function XW(e){th=!0,e.focus(),th=!1}function jA(e,t,i,n,r,a){if(t.option("useLegacyKeyboardNavigation"))return ee;var o=()=>v(t.element()),s=d=>GW(e,t,d,r,o(),a),l=()=>{rp=!0,o().removeClass(Y_)},u=()=>{var d=!rp&&!th;d&&o().addClass(Y_),rp=!1};return D.on(i,"keydown",n,s),D.on(i,"mousedown",n,l),D.on(i,"focusin",n,u),()=>{D.off(i,"keydown",n,s),D.off(i,"mousedown",n,l),D.off(i,"focusin",n,u)}}function Pm(e){if(!e.option("useLegacyKeyboardNavigation")&&us){var t=us.viewInstance;if(t){var i=UA(us.ariaLabel,t.element()),n=i.eq(us.index);us=null,D.trigger(n,"focus")}}}function Fm(e,t,i){var n=Nt(i);if(i.ctrlKey&&(n==="upArrow"||n==="downArrow"))for(var r=Object.keys(z0),a=r.indexOf(e);a>=0&&a<r.length;){a=n==="upArrow"?--a:++a;var o=r[a],s=z0[o],l=KW(s);if(l&&l.length){l.attr("tabindex",t.option("tabindex")||0),D.trigger(l,"focus"),l.removeClass(WW);break}}}function ZW(e,t){e.option("useLegacyKeyboardnavigation")||t.attr("tabindex",e.option("tabindex")||0)}var Kl=function(e,t,i,n,r){var a=t.getController("keyboardNavigation");t.option("useLegacyKeyboardNavigation")||a&&!a.isKeyboardEnabled()||(t.createAction("onKeyDown"),jA(e,t,i,n,r,o=>{t.executeAction("onKeyDown",o)}))},ap="text-content",QW="headers",JW="nowrap",ez=".dx-row",G0="dx-header-row",tz="dx-column-lines",iz="context-menu-sort-asc",nz="context-menu-sort-desc",rz="context-menu-sort-none",az="dx-cell-focus-disabled",op="dx-visibility-hidden",U0="dx-text-content-alignment-",oz="dx-sort-indicator",sz="dx-sort-index-indicator",lz=".dx-header-filter",uz="dx-header-filter-indicator",dz="dx-header-multi-row",qA={defaultOptions:function(){return{showColumnHeaders:!0,cellHintEnabled:!0}},views:{columnHeadersView:Vu.inherit(function(){var e=function(i,n,r){var a=v("<div>").addClass(i.addWidgetPrefix(ap));i.setAria("role","presentation",a),t(i,n,r.column,a);var o=i.option("showColumnLines"),s=i.getController("columns").getHeaderContentAlignment(r.column.alignment);return a[o||s==="right"?"appendTo":"prependTo"](n)};function t(i,n,r,a){var o=i._getIndicatorElements(n,!0),s=i._getIndicatorElements(n),l=o&&o.length,u=i._getColumnAlignment(r.alignment),d=".".concat(i._getIndicatorClassName("sort")),c=".".concat(i._getIndicatorClassName("sortIndex")),h=s.filter(d),f=s.children().filter(c);a=a||n.children("."+i.addWidgetPrefix(ap)),a.toggleClass(U0+u,l>0).toggleClass(U0+(u==="left"?"right":"left"),l>0&&r.alignment==="center").toggleClass(oz,!!h.length).toggleClass(sz,!!f.length).toggleClass(uz,!!s.filter("."+i._getIndicatorClassName("headerFilter")).length)}return{_createTable:function(){var i=this.callBase.apply(this,arguments);return D.on(i,"mousedown selectstart",this.createAction(function(n){var r=n.event;r.shiftKey&&r.preventDefault()})),i},_isLegacyKeyboardNavigation(){return this.option("useLegacyKeyboardNavigation")},_getDefaultTemplate:function(i){var n=this;return function(r,a){var o=i.command?r:e(n,r,a),s=i.command!=="expand"&&i.caption;s?o.text(s):i.command&&r.html("&nbsp;")}},_getHeaderTemplate:function(i){return i.headerCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(i)}},_processTemplate:function(i,n){var r=this,a,o=n.column,s=r.callBase(i);return n.rowType==="header"&&s&&o.headerCellTemplate&&!o.command?a={render:function(l){var u=e(r,l.container,l.model);s.render(O({},l,{container:u}))}}:a=s,a},_handleDataChanged:function(i){i.changeType==="refresh"&&(this._isGroupingChanged||this._requireReady)&&(this._isGroupingChanged=!1,this.render())},_renderCell:function(i,n){var r=this.callBase(i,n);return n.row.rowType==="header"&&(r.addClass(az),this._isLegacyKeyboardNavigation()||n.column&&!n.column.type&&r.attr("tabindex",this.option("tabindex")||0)),r},_setCellAriaAttributes:function(i,n){this.callBase(i,n),n.rowType==="header"&&(this.setAria("role","columnheader",i),n.column&&!n.column.command&&!n.column.isBand&&(i.attr("id",n.column.headerId),this.setAria("label",ue.format("dxDataGrid-ariaColumn")+" "+n.column.caption,i)))},_createRow:function(i){var n=this.callBase.apply(this,arguments);return n.toggleClass(tz,this.option("showColumnLines")),i.rowType==="header"&&(n.addClass(G0),this._isLegacyKeyboardNavigation()||Kl("columnHeaders",this,n,"td",this._handleActionKeyDown.bind(this))),n},_handleActionKeyDown:function(i){var n=i.event,r=v(n.target);if(this._lastActionElement=n.target,r.is(lz)){var a=this.getController("headerFilter"),o=r.closest("td"),s=this.getColumnIndexByElement(o);s>=0&&a.showHeaderFilterMenu(s,!1)}else{var l=r.closest(ez);this._processHeaderAction(n,l)}n.preventDefault()},_renderCore:function(){var i=this,n=i.element();i._tableElement&&!i._dataController.isLoaded()&&!i._hasRowElements||(n.addClass(i.addWidgetPrefix(QW)).toggleClass(i.addWidgetPrefix(JW),!i.option("wordWrapEnabled")).empty(),i.setAria("role","presentation",n),i._updateContent(i._renderTable()),i.getRowCount()>1&&n.addClass(dz),i.callBase.apply(i,arguments))},_renderRows:function(){var i=this;(i._dataController.isLoaded()||i._hasRowElements)&&(i.callBase.apply(i,arguments),i._hasRowElements=!0)},_getRowVisibleColumns:function(i){return this._columnsController.getVisibleColumns(i)},_renderRow:function(i,n){n.columns=this._getRowVisibleColumns(n.row.rowIndex),this.callBase(i,n)},_createCell:function(i){var n=i.column,r=this.callBase.apply(this,arguments);return n.rowspan>1&&i.rowType==="header"&&r.attr("rowSpan",n.rowspan),r},_getRows:function(){var i=[],n=this.getRowCount();if(this.option("showColumnHeaders"))for(var r=0;r<n;r++)i.push({rowType:"header",rowIndex:r});return i},_getCellTemplate:function(i){if(i.rowType==="header")return this._getHeaderTemplate(i.column)},_columnOptionChanged:function(i){var n=i.changeTypes,r=i.optionNames;if(n.grouping||n.groupExpanding){n.grouping&&(this._isGroupingChanged=!0);return}this.callBase(i),(r.width||r.visible)&&this.resizeCompleted.fire()},_isElementVisible:function(i){return i&&i.visible},_alignCaptionByCenter:function(i){var n=this._getIndicatorContainer(i,!0);n&&n.length&&(n.filter("."+op).remove(),n=this._getIndicatorContainer(i),n.clone().addClass(op).css("float","").insertBefore(i.children("."+this.addWidgetPrefix(ap))))},_updateCell:function(i,n){n.rowType==="header"&&n.column.alignment==="center"&&this._alignCaptionByCenter(i),this.callBase.apply(this,arguments)},_updateIndicator:function(i,n,r){var a=this.callBase.apply(this,arguments);return n.alignment==="center"&&this._alignCaptionByCenter(i),t(this,i,n),a},_getIndicatorContainer:function(i,n){var r=this.callBase(i);return n?r:r.filter(":not(."+op+")")},_isSortableElement:function(){return!0},getHeadersRowHeight:function(){var i=this.getTableElement(),n=i&&i.find("."+G0);return n&&n.toArray().reduce(function(r,a){return r+je(a)},0)||0},getHeaderElement:function(i){var n=this.getColumnElements();return n&&n.eq(i)},getColumnElements:function(i,n){var r=this,a,o=r._columnsController,s=r.getRowCount();if(r.option("showColumnHeaders")){if(s>1&&(!E(i)||E(n))){var l=[],u=E(n)?o.getChildrenByBandColumn(n,!0):o.getVisibleColumns();return F(u,function(d,c){var h=E(i)?i:o.getRowIndex(c.index);a=r._getCellElement(h,o.getVisibleIndex(c.index,h)),a&&l.push(a.get(0))}),v(l)}else if(!i||i<s)return r.getCellElements(i||0)}},getColumnIndexByElement:function(i){var n=this.getCellIndex(i),r=i.closest(".dx-row"),a=r[0].rowIndex,o=this.getColumns(a)[n];return o?o.index:-1},getVisibleColumnIndex:function(i,n){var r=this.getColumns()[i];return r?this._columnsController.getVisibleIndex(r.index,n):-1},getColumnWidths:function(){var i=this.getColumnElements();return i&&i.length?this._getWidths(i):this.callBase.apply(this,arguments)},allowDragging:function(i,n,r){var a,o=0,s=i&&this._columnsController.getRowIndex(i.index),l=this.getColumns(s===0?0:null),u=(i==null?void 0:i.allowHiding)&&l.length>1,d=function(h){return h.allowReordering||h.allowGrouping||h.allowHiding};for(a=0;a<l.length;a++)d(l[a])&&o++;if(o<=1&&!u)return!1;if(!r)return(this.option("allowColumnReordering")||this._columnsController.isColumnOptionUsed("allowReordering"))&&i&&i.allowReordering;for(a=0;a<r.length;a++){var c=r[a];if(c&&c.allowDragging(i,n))return!0}return!1},getBoundingRect:function(){var i=this.getColumnElements();if(i&&i.length){var n=this.getTableElement().offset();return{top:n.top}}return null},getName:function(){return"headers"},getColumnCount:function(){var i=this.getColumnElements();return i?i.length:0},isVisible:function(){return this.option("showColumnHeaders")},optionChanged:function(i){switch(i.name){case"showColumnHeaders":case"wordWrapEnabled":case"showColumnLines":this._invalidate(!0,!0),i.handled=!0;break;default:this.callBase(i)}},getHeight:function(){return this.getElementHeight()},getContextMenuItems:function(i){var n=this,r=i.column;if(i.row&&(i.row.rowType==="header"||i.row.rowType==="detailAdaptive")){var a=n.option("sorting");if(a&&a.mode!=="none"&&r&&r.allowSorting){var o=function(s){setTimeout(function(){n._columnsController.changeSortOrder(r.index,s.itemData.value)})};return[{text:a.ascendingText,value:"asc",disabled:r.sortOrder==="asc",icon:iz,onItemClick:o},{text:a.descendingText,value:"desc",disabled:r.sortOrder==="desc",icon:nz,onItemClick:o},{text:a.clearText,value:"none",disabled:!r.sortOrder,icon:rz,onItemClick:o}]}}},getRowCount:function(){return this._columnsController&&this._columnsController.getRowCount()},setRowsOpacity:function(i,n,r){var a=this,o,s,l=a.getRowCount(),u=a._columnsController.getColumns(),d=u&&u[i],c=d&&d.isBand&&d.index,h=function(f,p){p.ownerBand===c&&(s.eq(f).css({opacity:n}),p.isBand&&a.setRowsOpacity(p.index,n,o+1))};if(E(c))for(r=r||0,o=r;o<l;o++)s=a.getCellElements(o),F(a.getColumns(o),h)}}}())}};qA.views.columnHeadersView;De.registerModule("columnHeaders",qA);var YA="number",XA="yyyy/MM/dd",cz="yyyy/MM/dd HH:mm:ss",ZA=/^(\d{4,})(-)?(\d{2})(-)?(\d{2})(?:T(\d{2})(:)?(\d{2})?(:)?(\d{2}(?:\.(\d{1,3})\d*)?)?)?(Z|([+-])(\d{2})(:)?(\d{2})?)?$/,QA=/^(\d{2}):(\d{2})(:(\d{2}))?$/,K0=["","yyyy","","MM","","dd","THH","","mm","","ss",".SSS"],hz=/^(\d{4})\/(\d{2})\/(\d{2})$/,fz=3,JA=function(e,t){var i;return Me(e)&&!t&&(i=vz(e)),i||pz(e)};function Li(e){return+e||0}function pz(e){var t=eD(e)===XA,i=!Mi(e)&&Date.parse(e);if(!i&&t){var n=e.match(hz);if(n){var r=new Date(Li(n[1]),Li(n[2]),Li(n[3]));return r.setFullYear(Li(n[1])),r.setMonth(Li(n[2])-1),r.setDate(Li(n[3])),r}}return xt(i)?new Date(i):e}function vz(e){var t=e.match(ZA);if(!t)return t=e.match(QA),t?new Date(0,0,0,Li(t[1]),Li(t[2]),Li(t[4])):void 0;var i=Li(t[1]),n=--t[3],r=t[5],a=0,o=0,s=h=>(i<100&&h.setFullYear(i),h);a=Li(t[14]),o=Li(t[16]),t[13]==="-"&&(a=-a,o=-o);var l=Li(t[6])-a,u=Li(t[8])-o,d=Li(t[10]),c=function(h){return h=h||"",Li(h)*Math.pow(10,fz-h.length)}(t[11]);return t[12]?s(new Date(Date.UTC(i,n,r,l,u,d,c))):s(new Date(i,n,r,l,u,d,c))}var _z=function(e,t){var i=e.match(ZA),n="";if(!i)return i=e.match(QA),i?i[3]?"HH:mm:ss":"HH:mm":void 0;for(var r=1;r<K0.length;r++)i[r]&&(n+=K0[r]||i[r]);return i[12]==="Z"&&(n+="'Z'"),i[14]&&(i[15]?n+="xxx":i[16]?n+="xx":n+="x"),n},gz=function(e){return typeof e=="number"?new Date(e):JA(e,!It().forceIsoDateParsing)},mz=function(e,t){return t?Mi(e)?t===YA?e&&e.valueOf?e.valueOf():null:mA(t,Ol)(e):null:e},eD=function(e){if(typeof e=="number")return YA;if(Me(e)){var t;return It().forceIsoDateParsing&&(t=_z(e)),t||(e.indexOf(":")>=0?cz:XA)}else if(e)return null};const li={dateParser:JA,deserializeDate:gz,serializeDate:mz,getDateSerializationFormat:eD};var tD=["filterValues","filterType","fixed","fixedPosition"],_d=["visibleIndex","dataField","name","dataType","width","visible","sortOrder","lastSortOrder","sortIndex","groupIndex","filterValue","selectedFilterOperation","added"].concat(tD),Cz={visibleWidth:!0,bestFitWidth:!0,bufferedFilterValue:!0},yz="dx-command-expand",j0=Number.MAX_SAFE_INTEGER||9007199254740991,Yr="groupExpand",sp=/columns\[(\d+)\]\.?/gi,xz=1,q0={defaultOptions:function(){return{commonColumnSettings:{allowFiltering:!0,allowHiding:!0,allowSorting:!0,allowEditing:!0,encodeHtml:!0,trueText:ue.format("dxDataGrid-trueText"),falseText:ue.format("dxDataGrid-falseText")},allowColumnReordering:!1,allowColumnResizing:!1,columnResizingMode:"nextColumn",columnMinWidth:void 0,columnWidth:void 0,adaptColumnWidthByRatio:!0,columns:void 0,regenerateColumnsByVisibleItems:!1,customizeColumns:null,dateSerializationFormat:void 0}},controllers:{columns:Tt.Controller.inherit(function(){var e={visible:!0,showInColumnChooser:!0},t={number:["=","<>","<",">","<=",">=","between"],string:["contains","notcontains","startswith","endswith","=","<>"],date:["=","<>","<",">","<=",">=","between"],datetime:["=","<>","<",">","<=",">=","between"]},i={visibleIndex:!0,groupIndex:!0,grouped:!0,sortIndex:!0,sortOrder:!0},n=function(y){y.filterOperations=y.defaultFilterOperations},r=function(y,I,S,B){var N={};if(I){Me(I)&&(I={dataField:I}),y.setName(I);var G={};if(I.command)G=Jn(N,I);else{N=y.getCommonSettings(I),S&&S.name&&S.dataField&&(I=O({},I,{dataField:S.dataField}));var W=y._createCalculatedColumnOptions(I,B);I.type||(G={headerId:"dx-col-".concat(xz++)}),G=Jn(G,e),Jn(G,N),Jn(G,W),Jn(G,I),Jn(G,{selector:null})}return I.filterOperations===I.defaultFilterOperations&&n(G),G}},a=function y(I,S,B){var N=[];return S&&F(S,function(G,W){var ie=I._columnsUserState&&x(W,I._columnsUserState[G])&&I._columnsUserState[G],re=r(I,W,ie,B);re&&(B&&(re.ownerBand=B),N.push(re),re.columns&&(N=N.concat(y(I,re.columns,re)),delete re.columns,re.hasColumns=!0))}),N},o=function(y,I){for(var S=[],B=I[y];B;)S.unshift(B),y=B.index,B=I[y];return S},s=function(y,I,S){var B=[],N=I[y];if(N)for(var G=0;G<N.length;G++){var W=N[G];(!E(W.groupIndex)||W.showWhenGrouped)&&(B.push(W),S&&W.isBand&&(B=B.concat(s(W.index,I,S))))}return B},l=function(y,I){var S=[],B,N=y.getBandColumnsCache(),G=function(ie){return ie.ownerBand===I.ownerBand};if(N.isPlain){var W=y._columns.indexOf(I);W>=0&&(S=["columns[".concat(W,"]")])}else for(B=y._columns.filter(G);B.length&&B.indexOf(I)!==-1;)S.unshift("columns[".concat(B.indexOf(I),"]")),I=N.columnParentByIndex[I.index],B=I?y._columns.filter(G):[];return S.join(".")},u=function y(I,S){var B=0,N=I.getChildrenByBandColumn(S,!0);return F(N,function(G,W){W.isBand?(W.colspan=W.colspan||y(I,W.index),B+=W.colspan||1):B+=1}),B},d=function(y){var I=On(y);return I!=="string"&&I!=="boolean"&&I!=="number"&&I!=="date"&&I!=="object"&&(I=void 0),I},c=function(y,I){switch(y){case"date":case"datetime":return li.getDateSerializationFormat(I);case"number":if(Me(I))return"string";if(xt(I))return null}},h=function(y,I){y.deserializeValue||(xe.isDateType(I)&&(y.deserializeValue=function(S){return li.deserializeDate(S)},y.serializeValue=function(S){return Me(S)?S:li.serializeDate(S,this.serializationFormat)}),I==="number"&&(y.deserializeValue=function(S){var B=parseFloat(S);return isNaN(B)?S:B},y.serializeValue=function(S,B){return B==="filter"?S:E(S)&&this.serializationFormat==="string"?S.toString():S}))},f=function(y){return y.value===!0?this.trueText||"true":y.value===!1?this.falseText||"false":y.valueText||""},p=function(y){if(y==="boolean")return f},g=function(y){F(y._columns,function(I,S){S.index=I}),F(y._columns,function(I,S){He(S.ownerBand)&&(S.ownerBand=S.ownerBand.index)}),F(y._commandColumns,function(I,S){S.index=-(I+1)})},m=function(y,I){Il(y._columns,"groupIndex",I,function(S){var B=S.grouped;return delete S.grouped,B})},C=function(y,I,S){var B=He(I)?I.rowIndex:null,N=S==="group"?y.getGroupColumns():S==="columnChooser"?y.getChooserColumns():y.getVisibleColumns(B),G;return I=He(I)?I.columnIndex:I,G=N[I],G&&G.type===Yr&&(G=y._columns.filter(W=>G.type===W.type)[0]||G),G&&E(G.index)?G.index:-1};function x(y,I){return y&&I&&I.name===(y.name||y.dataField)&&(I.dataField===y.dataField||y.name)}var T=function(y){var I=y._columnsUserState,S=y._ignoreColumnOptionNames||[],B=y._columns,N={},G=[],W=!0,ie=[],re,_e,oe;function Re(L,P){if(P)for(var Y=0;Y<_d.length;Y++){var de=_d[Y];S.includes(de)||(de==="dataType"?L[de]=L[de]||P[de]:tD.includes(de)?de in P&&(L[de]=P[de]):(de==="selectedFilterOperation"&&P[de]&&(L.defaultSelectedFilterOperation=L[de]||null),L[de]=P[de]))}}function w(L,P){for(var Y=P.name||P.dataField,de=N[Y]||0,Ce=0;Ce<L.length;Ce++)if(x(P,L[Ce]))if(de)de--;else return N[Y]=N[Y]||0,N[Y]++,Ce;return-1}if(I){for(oe=0;oe<B.length;oe++)_e=w(I,B[oe]),W=W&&_e>=0,ie.push(_e);for(oe=0;oe<B.length;oe++)re=B[oe],_e=ie[oe],(y._hasUserState||W)&&Re(re,I[_e]),_e>=0&&E(I[_e].initialIndex)?G[_e]=re:G.push(re);var he=!1;for(oe=0;oe<I.length;oe++){var se=I[oe];se.added&&w(B,se)<0&&(re=r(y,se.added),Re(re,se),G.push(re),se.added.columns&&(he=!0))}he&&(g(y),G=a(y,G)),H(y,G)}},R=function(y,I){g(y),m(y,I),function(S,B){F(S._columns,function(N,G){E(G.sortIndex)&&!M(G.sortOrder)&&delete G.sortIndex}),Il(S._columns,"sortIndex",B,function(N){return!E(N.groupIndex)&&M(N.sortOrder)})}(y,I),Q(y),function(S,B){for(var N,G,W={},ie=[],re=S.getBandColumnsCache(),_e=S._columns.filter(he=>!he.command),oe=0;oe<_e.length;oe++){G=_e[oe];var Re=o(oe,re.columnParentByIndex);if(Re.length){var w=Re[Re.length-1].index;W[w]=W[w]||[],W[w].push(G)}else ie.push(G)}for(N in W)Il(W[N],"visibleIndex",B);Il(ie,"visibleIndex",B)}(y,I)},A=function(y){y.resetColumnsCache()};function H(y,I){y._columns=I,A(y),y.updateColumnDataTypes()}var $=function(y,I,S,B){var N=y._columnChanges||{optionNames:{length:0},changeTypes:{length:0},columnIndex:B};S=S||"all",S=S.split(".")[0];var G=N.changeTypes;I&&!G[I]&&(G[I]=!0,G.length++);var W=N.optionNames;S&&!W[S]&&(W[S]=!0,W.length++),(B===void 0||B!==N.columnIndex)&&delete N.columnIndex,y._columnChanges=N,A(y)},V=function(y){var I=y.option("onColumnsChanging"),S=y._columnChanges,B=["dataField","lookup","dataType","columns"];y.isInitialized()&&!y._updateLockCount&&S&&(I&&(y._updateLockCount++,I(O({component:y.component},S)),y._updateLockCount--),y._columnChanges=void 0,N=S.optionNames,N&&B.some(G=>N[G])?y.reinit():y.columnsChanged.fire(S));var N},U=function(y,I,S,B){var N=B>=0;if(S>=0)N||(I.lastSortOrder=I.sortOrder);else{var G=y.option("sorting.mode"),W=I.lastSortOrder;if(G==="single"){var ie=y._columns.some(re=>re!==I&&E(re.sortIndex));ie&&(W=void 0)}I.sortOrder=W}},K=function(y,I){var S=I.value,B=I.optionName,N=I.prevValue,G=I.fullOptionName,W="".concat(G,".").concat(B);!Cz[B]&&y._skipProcessingColumnsChange!==W&&(y._skipProcessingColumnsChange=W,y.component._notifyOptionChanged(W,S,N),y._skipProcessingColumnsChange=!1)},X=function(y,I,S,B,N){var G=mt(S),W=I.index,ie,re,_e;if(arguments.length===3)return G(I,{functionsAsIs:!0});var oe=G(I,{functionsAsIs:!0});if(oe!==B){S==="groupIndex"||S==="calculateGroupValue"?(re="grouping",U(y,I,B,oe)):S==="sortIndex"||S==="sortOrder"||S==="calculateSortValue"?re="sorting":re="columns";var Re=Hg(S);Re(I,B,{functionsAsIs:!0});var w=l(y,I);i[S]&&(R(y,I),B=G(I)),(S==="name"||S==="allowEditing")&&y._checkColumns(),!E(oe)&&!E(B)&&S.indexOf("buffer")!==0&&(N=!0),N?A(y):(!_d.includes(S)&&S!=="visibleWidth"&&(ie=y.option("columns"),_e=y.getColumnByPath(w,ie),Me(_e)&&(_e=ie[W]={dataField:_e}),_e&&x(_e,I)&&Re(_e,B,{functionsAsIs:!0})),$(y,re,S,W)),w&&K(y,{fullOptionName:w,optionName:S,value:B,prevValue:oe})}};function M(y){return y==="asc"||y==="desc"}var q=function(y,I){var S=this.dataField.split("."),B=S.length-1;this.serializeValue&&(I=this.serializeValue(I));for(var N=0;N<B;N++){var G=S[N];y=y[G]=y[G]||{}}y[S[B]]=I},b=(y,I)=>!!y._columns.filter(S=>S.type===I.type).length,j=function(y,I){var S=y.option("rtlEnabled");return I.command&&!b(y,I)||!I.fixedPosition?S?"right":"left":I.fixedPosition},ne=function(y,I,S,B){var N,G=this.getRowCount(),W=y[B]&&y[B].rowspan,ie=I.filter(re=>re.type===S);return y.forEach((re,_e)=>{re.type===S&&(N=_e,W=y[_e+1]?y[_e+1].rowspan:G)}),W>1&&(ie=Jt(ie,function(re){return O({},re,{rowspan:W})})),ie.unshift.apply(ie,E(N)?[N,1]:[B,0]),y.splice.apply(y,ie),W||1},J=function(y,I){for(var S=y?y.toString():"0";S.length<I;)S="0"+S;return S},pe=(y,I,S,B)=>{for(var N,G,W=I.slice().map(he=>O({},he)),ie=y._isColumnFixing(),re=S.slice().map(he=>O({fixed:ie},he)),_e=he=>S.reduce((se,L,P)=>{var Y=B&&he.type===Yr?"expand":he.type;return L.type===Y||L.command===he.command?P:se},-1),oe=he=>he.command!==S[G].command,Re=0;Re<I.length;Re++)if(N=I[Re],G=N&&(N.type||N.command)?_e(N):-1,G>=0)if(B)W[Re]=O({fixed:ie},S[G],N),N.type!==Yr&&(re=re.filter(oe));else{var w={visibleIndex:N.visibleIndex,index:N.index,headerId:N.headerId,allowFixing:N.groupIndex===0,allowReordering:N.groupIndex===0,groupIndex:N.groupIndex};W[Re]=O({},N,S[G],N.type===Yr&&w)}return I.length&&B&&re.length&&(W=W.concat(re)),W},le=(y,I)=>E(I.fixed)||!I.type?I.fixed:y._isColumnFixing(),Q=y=>{y._bandColumnsCache=void 0},z=(y,I)=>{var S=Me(I)&&I.substr(0,I.indexOf(":")),B;if(I!==void 0)return S&&(I=I.substr(S.length+1)),S?B=y.filter(N=>""+N[S]===I)[0]:["index","name","dataField","caption"].some(N=>(B=y.filter(G=>G[N]===I)[0],!!B)),B};return{_getExpandColumnOptions:function(){return{type:"expand",command:"expand",width:"auto",cssClass:yz,allowEditing:!1,allowGrouping:!1,allowSorting:!1,allowResizing:!1,allowReordering:!1,allowHiding:!1}},_getFirstItems:function(y){var I,S=[];return y&&y.items().length>0&&(I=xe.normalizeSortingInfo(y.group()).length,S=function B(N,G){if(!N||!G)return N;for(var W=0;W<N.length;W++){var ie=B(N[W].items||N[W].collapsedItems,G-1);if(ie&&ie.length)return ie}}(y.items(),I)||[]),S},_endUpdateCore:function(){!this._skipProcessingColumnsChange&&V(this)},init:function(){var y=this.option("columns");this._commandColumns=this._commandColumns||[],this._columns=this._columns||[],this._isColumnsFromOptions=!!y,this._isColumnsFromOptions?(H(this,y?a(this,y):[]),T(this)):H(this,this._columnsUserState?a(this,this._columnsUserState):this._columns),function(I){var S=I._getExpandColumnOptions();I.addCommandColumn(S)}(this),this._dataSourceApplied?this.applyDataSource(this._dataSource,!0):R(this),this._checkColumns()},callbackNames:function(){return["columnsChanged"]},getColumnByPath:function(y,I){var S,B=[];return y.replace(sp,function(N,G){return B.push(parseInt(G)),""}),B.length&&(I?S=B.reduce(function(N,G){return N&&N.columns&&N.columns[G]},{columns:I}):S=function(N,G){var W,ie,re=N.getBandColumnsCache(),_e=function(Re){var w=W?W.index:void 0;return Re.ownerBand===w};if(re.isPlain)W=N._columns[G[0]];else{ie=N._columns.filter(_e);for(var oe=0;oe<G.length;oe++)W=ie[G[oe]],W&&(ie=N._columns.filter(_e))}return W}(this,B)),S},optionChanged:function(y){var I;switch(y.name){case"adaptColumnWidthByRatio":y.handled=!0;break;case"dataSource":y.value!==y.previousValue&&!this.option("columns")&&(!Array.isArray(y.value)||!Array.isArray(y.previousValue))&&(this._columns=[]);break;case"columns":I=this._skipProcessingColumnsChange,y.handled=!0,this._skipProcessingColumnsChange||(y.name===y.fullName?(this._columnsUserState=null,this._ignoreColumnOptionNames=null,this.init()):(this._columnOptionChanged(y),I=!0)),I&&this._updateRequireResize(y);break;case"commonColumnSettings":case"columnAutoWidth":case"allowColumnResizing":case"allowColumnReordering":case"columnFixing":case"grouping":case"groupPanel":case"regenerateColumnsByVisibleItems":case"customizeColumns":case"columnHidingEnabled":case"dateSerializationFormat":case"columnResizingMode":case"columnMinWidth":case"columnWidth":y.handled=!0;var S=y.fullName==="columnWidth"&&["width"];this.reinit(S);break;case"rtlEnabled":this.reinit();break;default:this.callBase(y)}},_columnOptionChanged:function(y){var I={},S=this.getColumnByPath(y.fullName),B=y.fullName.replace(sp,"");S&&(B?I[B]=y.value:I=y.value,this._skipProcessingColumnsChange=y.fullName,this.columnOption(S.index,I),this._skipProcessingColumnsChange=!1)},_updateRequireResize:function(y){var I=this.component;y.fullName.replace(sp,"")==="width"&&I._updateLockCount&&(I._requireResize=!0)},publicMethods:function(){return["addColumn","deleteColumn","columnOption","columnCount","clearSorting","clearGrouping","getVisibleColumns","getVisibleColumnIndex"]},applyDataSource:function(y,I){var S=y&&y.isLoaded();if(this._dataSource=y,!this._dataSourceApplied||this._dataSourceColumnsCount===0||I||this.option("regenerateColumnsByVisibleItems"))if(S){if(!this._isColumnsFromOptions){var B=function(N,G){for(var W=N._getFirstItems(G),ie,re={},_e=[],oe=0;oe<W.length;oe++)if(W[oe])for(ie in W[oe])(!Ee(W[oe][ie])||Fi.isWrapped(W[oe][ie]))&&(re[ie]=!0);for(ie in re)if(ie.indexOf("__")!==0){var Re=r(N,ie);_e.push(Re)}return _e}(this,y);B.length&&(H(this,B),this._dataSourceColumnsCount=this._columns.length,T(this))}return this.updateColumns(y,I)}else this._dataSourceApplied=!1,R(this);else if(S&&!this.isAllDataTypesDefined(!0)&&this.updateColumnDataTypes(y))return $(this,"columns"),V(this),new te().reject().promise()},reset:function(){this._dataSource=null,this._dataSourceApplied=!1,this._dataSourceColumnsCount=void 0,this.reinit()},resetColumnsCache:function(){this._visibleColumns=void 0,this._fixedColumns=void 0,this._rowCount=void 0,Q(this)},reinit:function(y){this._columnsUserState=this.getUserState(),this._ignoreColumnOptionNames=y||null,this.init(),y&&(this._ignoreColumnOptionNames=null)},isInitialized:function(){return!!this._columns.length||!!this.option("columns")},isDataSourceApplied:function(){return this._dataSourceApplied},getCommonSettings:function(y){var I=(!y||!y.type)&&this.option("commonColumnSettings")||{},S=this.option("grouping")||{},B=this.option("groupPanel")||{};return O({allowFixing:this.option("columnFixing.enabled"),allowResizing:this.option("allowColumnResizing")||void 0,allowReordering:this.option("allowColumnReordering"),minWidth:this.option("columnMinWidth"),width:this.option("columnWidth"),autoExpandGroup:S.autoExpandAll,allowCollapsing:S.allowCollapsing,allowGrouping:B.allowColumnDragging&&B.visible||S.contextMenuEnabled},I)},isColumnOptionUsed:function(y){for(var I=0;I<this._columns.length;I++)if(this._columns[I][y])return!0},isAllDataTypesDefined:function(y){var I=this._columns;if(!I.length)return!1;for(var S=0;S<I.length;S++)if(!(!I[S].dataField&&I[S].calculateCellValue===I[S].defaultCalculateCellValue)&&(!I[S].dataType||y&&I[S].deserializeValue&&I[S].serializationFormat===void 0))return!1;return!0},getColumns:function(){return this._columns},isBandColumnsUsed:function(){return this.getColumns().some(function(y){return y.isBand})},getGroupColumns:function(){var y=[];return F(this._columns,function(){E(this.groupIndex)&&(y[this.groupIndex]=this)}),y},getVisibleColumns:function(y){return this._visibleColumns=this._visibleColumns||this._getVisibleColumnsCore(),y=E(y)?y:this._visibleColumns.length-1,this._visibleColumns[y]||[]},getFixedColumns:function(y){return this._fixedColumns=this._fixedColumns||this._getFixedColumnsCore(),y=E(y)?y:this._fixedColumns.length-1,this._fixedColumns[y]||[]},getFilteringColumns:function(){return this.getColumns().filter(y=>(y.dataField||y.name)&&(y.allowFiltering||y.allowHeaderFiltering)).map(y=>{var I=O(!0,{},y);return E(I.dataField)||(I.dataField=I.name),I.filterOperations=y.filterOperations!==y.defaultFilterOperations?I.filterOperations:null,I})},getColumnIndexOffset:function(){return 0},_getFixedColumnsCore:function(){var y=[],I=this.getRowCount(),S=this._isColumnFixing(),B={command:"transparent"},N=0,G,W,ie;if(S)for(var re=0;re<=I;re++){G=0,ie=null,W=null;for(var _e=this.getVisibleColumns(re,!0),oe=0;oe<_e.length;oe++){var Re=_e[oe-1],w=_e[oe];w.fixed?Re&&Re.fixed&&j(this,Re)!==j(this,w)?E(W)||(W=oe):ie=w.fixedPosition:(re===0&&(w.isBand&&w.colspan?N+=w.colspan:N++),G++,E(W)||(W=oe))}if(re===0&&(G===0||G>=_e.length))return[];E(W)||(W=ie==="right"?0:_e.length),y[re]=_e.slice(0),B.colspan||(B.colspan=N),y[re].splice(W,G,B)}return y.map(he=>he.map(se=>{var L=be({},se);return L.headerId&&(L.headerId+="-fixed"),L}))},_isColumnFixing:function(){var y=this.option("columnFixing.enabled");return!y&&F(this._columns,function(I,S){if(S.fixed)return y=!0,!1}),y},_getExpandColumnsCore:function(){return this.getGroupColumns()},getExpandColumns:function(){var y=this._getExpandColumnsCore(),I,S=y.filter(W=>W.groupIndex===0)[0],B=S&&S.fixed,N=this._isColumnFixing(),G=this.option("rtlEnabled");return y.length&&(I=this.columnOption("command:expand")),y=Jt(y,W=>O({},W,{visibleWidth:null,minWidth:null,cellTemplate:E(W.groupIndex)?null:W.cellTemplate,headerCellTemplate:null,fixed:!E(W.groupIndex)||!B?N:!0,fixedPosition:G?"right":"left"},I,{index:W.index,type:W.type||Yr})),y},getBandColumnsCache:function(){if(!this._bandColumnsCache){var y=this._columns,I={},S={},B=!0;y.forEach(function(N){var G=N.ownerBand,W=He(G)?G.index:G,ie=y[W];N.hasColumns&&(B=!1),N.colspan&&(N.colspan=void 0),N.rowspan&&(N.rowspan=void 0),ie?S[N.index]=ie:W=-1,I[W]=I[W]||[],I[W].push(N)}),this._bandColumnsCache={isPlain:B,columnChildrenByIndex:I,columnParentByIndex:S}}return this._bandColumnsCache},_isColumnVisible:function(y){return y.visible&&this.isParentColumnVisible(y.index)},_getVisibleColumnsCore:function(){var y=this,I,S=[],B=0,N=0,G=y.getRowCount(),W=[],ie=[],re=0,_e,oe=y.option("rtlEnabled"),Re=y.getBandColumnsCache(),w=pe(y,y.getExpandColumns(),y._columns),he=pe(y,y._columns,y._commandColumns,!0),se=function(L){var P;for(P=0;L>1;P++)L/=10;return P}(he.length);for(function(L,P,Y){for(var de,Ce=0;Ce<P.length;Ce++){var ae=P[Ce];(ae.visible||ae.command)&&(ae.isBand&&(ae.colspan=ae.colspan||u(L,ae.index)),(!ae.isBand||!ae.colspan)&&(de=L.getRowCount(),!ae.command&&(!E(ae.groupIndex)||ae.showWhenGrouped)&&(de-=o(ae.index,Y.columnParentByIndex).length),de>1&&(ae.rowspan=de)))}}(y,he,Re),I=0;I<G;I++)S[I]=[],ie[I]=[{}],W[I]=[{},{},{}];return F(he,function(){var L=this.visibleIndex,P,Y=o(this.index,Re.columnParentByIndex),de=y._isColumnVisible(this);if(de&&(!E(this.groupIndex)||this.showWhenGrouped)){var Ce=Y.length;if(L<0?(L=-L,P=ie[Ce]):(this.fixed=Y.length?Y[0].fixed:this.fixed,this.fixedPosition=Y.length?Y[0].fixedPosition:this.fixedPosition,this.fixed?(_e=this.fixedPosition==="right",oe&&(!this.command||b(y,this))&&(_e=!_e),_e?P=W[Ce][2]:P=W[Ce][0]):P=W[Ce][1]),Y.length)for(L=J(L,se),I=Y.length-1;I>=0;I--)L=J(Y[I].visibleIndex,se)+L;P[L]=P[L]||[],P[L].push(this),re++}}),F(S,function(L){u_(ie[L],function(Y,de){S[L].unshift.apply(S[L],de)});var P=S[L].length;F(W[L],function(Y,de){u_(de,function(Ce,ae){S[L].push.apply(S[L],ae)})}),N<L+1&&(N+=ne.call(y,S[L],w,"detailExpand",P)),B<L+1&&(B+=ne.call(y,S[L],w,Yr,P))}),S.push(function L(P,Y,de){var Ce=[];return Y=Y||0,P[Y]&&F(P[Y],function(ae,we){(we.ownerBand===de||we.type===Yr)&&(!we.isBand||!we.colspan?(!we.command||Y<1)&&Ce.push(we):Ce.push.apply(Ce,L(P,Y+1,we.index)))}),Ce}(S)),!re&&y._columns.length&&S[G].push({command:"empty"}),S},getInvisibleColumns:function(y,I){var S=this,B=[],N;return y=y||S._columns,F(y,function(G,W){if(W.ownerBand===I){if(W.isBand){W.visible?N=S.getInvisibleColumns(S.getChildrenByBandColumn(W.index),W.index):N=S.getChildrenByBandColumn(W.index),N.length&&(B.push(W),B=B.concat(N));return}W.visible||B.push(W)}}),B},getChooserColumns:function(y){var I=y?this.getColumns():this.getInvisibleColumns(),S=I.filter(N=>N.showInColumnChooser),B=this.option("columnChooser.sortOrder");return((N,G)=>{if(G!=="asc"&&G!=="desc")return N;var W=G==="asc"?1:-1;return N.sort(function(ie,re){var _e=ie.caption||"",oe=re.caption||"";return W*_e.localeCompare(oe)}),N})(S,B)},allowMoveColumn:function(y,I,S,B){var N=C(this,y,S),G=this._columns[N];return G&&(G.allowReordering||G.allowGrouping||G.allowHiding)?S===B?S==="columnChooser"?!1:(y=He(y)?y.columnIndex:y,I=He(I)?I.columnIndex:I,y!==I&&y+1!==I):S==="group"&&B!=="columnChooser"||B==="group"?G&&G.allowGrouping:S==="columnChooser"||B==="columnChooser"?G&&G.allowHiding:!0:!1},moveColumn:function(y,I,S,B){var N={},G,W=C(this,y,S),ie=C(this,I,B),re;if(W>=0){var _e=this._columns[W];if(I=He(I)?I.columnIndex:I,re=ie>=0?this._columns[ie].groupIndex:-1,E(_e.groupIndex)&&S==="group"&&(re>_e.groupIndex&&re--,B!=="group"?N.groupIndex=void 0:(G=_e.groupIndex,delete _e.groupIndex,m(this))),B==="group")N.groupIndex=function(w,he,se){var L=w.getGroupColumns(),P;if(se>=0)for(P=0;P<L.length;P++)L[P].groupIndex>=se&&L[P].groupIndex++;else for(se=0,P=0;P<L.length;P++)se=Math.max(se,L[P].groupIndex+1);return se}(this,0,re),_e.groupIndex=G;else if(I>=0){var oe=this._columns[ie];!oe||_e.ownerBand!==oe.ownerBand||le(this,_e)^le(this,oe)?N.visibleIndex=j0:N.visibleIndex=oe.visibleIndex}var Re=B!=="columnChooser";_e.visible!==Re&&(N.visible=Re),this.columnOption(_e.index,N)}},changeSortOrder:function(y,I){var S={},B=this.option("sorting"),N=B&&B.mode,G=N==="single"||!I,W=N==="single"||N==="multiple",ie=this._columns[y];W&&ie&&ie.allowSorting&&(G&&!E(ie.groupIndex)&&F(this._columns,function(re){re!==y&&this.sortOrder&&(E(this.groupIndex)||delete this.sortOrder,delete this.sortIndex)}),M(I)?ie.sortOrder!==I&&(S.sortOrder=I):I==="none"?ie.sortOrder&&(S.sortIndex=void 0,S.sortOrder=void 0):function(re){if(I==="ctrl"){if(!("sortOrder"in re&&"sortIndex"in re))return!1;S.sortOrder=void 0,S.sortIndex=void 0}else E(re.groupIndex)||E(re.sortIndex)?S.sortOrder=re.sortOrder==="desc"?"asc":"desc":S.sortOrder="asc";return!0}(ie)),this.columnOption(ie.index,S)},getSortDataSourceParameters:function(y){var I=[],S=[];return F(this._columns,function(){(this.dataField||this.selector||this.calculateCellValue)&&E(this.sortIndex)&&!E(this.groupIndex)&&(I[this.sortIndex]=this)}),F(I,function(){var B=this&&this.sortOrder;if(M(B)){var N={selector:this.calculateSortValue||this.displayField||this.calculateDisplayValue||y&&this.selector||this.dataField||this.calculateCellValue,desc:this.sortOrder==="desc"};this.sortingMethod&&(N.compare=this.sortingMethod.bind(this)),S.push(N)}}),S.length>0?S:null},getGroupDataSourceParameters:function(y){var I=[];return F(this.getGroupColumns(),function(){var S=this.calculateGroupValue||this.displayField||this.calculateDisplayValue||y&&this.selector||this.dataField||this.calculateCellValue;if(S){var B={selector:S,desc:this.sortOrder==="desc",isExpanded:!!this.autoExpandGroup};this.sortingMethod&&(B.compare=this.sortingMethod.bind(this)),I.push(B)}}),I.length>0?I:null},refresh:function(y){var I=[];return F(this._columns,function(){var S=this.lookup;if(S&&!this.calculateDisplayValue){if(y&&S.valueMap)return;S.update&&I.push(S.update())}}),Ae.apply(v,I).done(A.bind(null,this))},_updateColumnOptions:function(y,I){y.selector=y.selector||function(N){return y.calculateCellValue(N)},F(["calculateSortValue","calculateGroupValue","calculateDisplayValue"],function(N,G){var W=y[G];if(Ee(W))if(W.originalCallback)y[G].context.column=y;else{var ie={column:y};y[G]=function(re){return W.call(ie.column,re)},y[G].originalCallback=W,y[G].columnIndex=I,y[G].context=ie}}),Me(y.calculateDisplayValue)&&(y.displayField=y.calculateDisplayValue,y.calculateDisplayValue=mt(y.displayField)),y.calculateDisplayValue&&(y.displayValueMap=y.displayValueMap||{}),h(y,y.dataType);var S=y.lookup;S&&h(S,S.dataType);var B=S?S.dataType:y.dataType;B&&(y.alignment=y.alignment||function(N,G){switch(N){case"number":return"right";case"boolean":return"center";default:return wa(G)}}(B,this.option("rtlEnabled")),y.format=y.format||xe.getFormatByDataType(B),y.customizeText=y.customizeText||p(B),y.defaultFilterOperations=y.defaultFilterOperations||!S&&t[B]||[],E(y.filterOperations)||n(y),y.defaultFilterOperation=y.filterOperations&&y.filterOperations[0]||"=",y.showEditorAlways=E(y.showEditorAlways)?y.showEditorAlways:B==="boolean"&&!y.cellTemplate&&!y.lookup)},updateColumnDataTypes:function(y){var I=this,S=I.option("dateSerializationFormat"),B=I._getFirstItems(y),N=!1;return F(I._columns,function(G,W){var ie,re,_e,oe,Re,w=W.lookup;if(xe.isDateType(W.dataType)&&W.serializationFormat===void 0&&(W.serializationFormat=S),w&&xe.isDateType(w.dataType)&&W.serializationFormat===void 0&&(w.serializationFormat=S),W.calculateCellValue&&B.length){if(!W.dataType||w&&!w.dataType){for(ie=0;ie<B.length;ie++)re=W.calculateCellValue(B[ie]),W.dataType||(Re=d(re),_e=_e||Re,_e&&Re&&_e!==Re&&(_e="string")),w&&!w.dataType&&(Re=d(xe.getDisplayValue(W,re,B[ie])),oe=oe||Re,oe&&Re&&oe!==Re&&(oe="string"));(_e||oe)&&(_e&&(W.dataType=_e),w&&oe&&(w.dataType=oe),N=!0)}if(W.serializationFormat===void 0||w&&w.serializationFormat===void 0)for(ie=0;ie<B.length;ie++)re=W.calculateCellValue(B[ie],!0),W.serializationFormat===void 0&&(W.serializationFormat=c(W.dataType,re)),w&&w.serializationFormat===void 0&&(w.serializationFormat=c(w.dataType,w.calculateCellValue(re,!0)))}I._updateColumnOptions(W,G)}),N},_customizeColumns:function(y){var I=this.option("customizeColumns");if(I){var S=y.some(function(B){return He(B.ownerBand)});S&&R(this),I(y),H(this,a(this,y))}},updateColumns:function(y,I){if(I||this.updateSortingGrouping(y),!y||y.isLoaded()){var S=y?y.sort()||[]:this.getSortDataSourceParameters(),B=y?y.group()||[]:this.getGroupDataSourceParameters(),N=y==null?void 0:y.lastLoadOptions().filter;this._customizeColumns(this._columns),R(this);var G=this._columns;return Ae(this.refresh(!0)).always(()=>{this._columns===G&&(this._updateChanges(y,{sorting:S,grouping:B,filtering:N}),V(this))})}},_updateChanges:function(y,I){y&&(this.updateColumnDataTypes(y),this._dataSourceApplied=!0),xe.equalSortParameters(I.sorting,this.getSortDataSourceParameters())||$(this,"sorting"),xe.equalSortParameters(I.grouping,this.getGroupDataSourceParameters())||$(this,"grouping");var S=this.getController("data");S&&!xe.equalFilterParameters(I.filtering,S.getCombinedFilter())&&$(this,"filtering"),$(this,"columns")},updateSortingGrouping:function(y,I){var S=this,B,N,G=function(Re,w,he){F(Re,function(se,L){if(delete L[he],w)for(var P=0;P<w.length;P++){var Y=w[P].selector,de=w[P].isExpanded;if(Y===L.dataField||Y===L.name||Y===L.selector||Y===L.calculateCellValue||Y===L.calculateGroupValue||Y===L.calculateDisplayValue){L.sortOrder=L.sortOrder||(w[P].desc?"desc":"asc"),de!==void 0&&(L.autoExpandGroup=de),L[he]=P;break}}})};if(y){B=xe.normalizeSortingInfo(y.sort());var W=xe.normalizeSortingInfo(y.group()),ie=S.getGroupDataSourceParameters(),re=S.getSortDataSourceParameters(),_e=!xe.equalSortParameters(W,ie,!0),oe=!_e&&!xe.equalSortParameters(W,ie);S._columns.length||(F(W,function(Re,w){S._columns.push(w.selector)}),F(B,function(Re,w){Ee(w.selector)||S._columns.push(w.selector)}),H(S,a(S,S._columns))),(I||!ie&&!S._hasUserState)&&(_e||oe)&&(G(S._columns,W,"groupIndex"),I&&(_e&&$(S,"grouping"),oe&&$(S,"groupExpanding"),N=!0)),(I||!re&&!S._hasUserState)&&!xe.equalSortParameters(B,re)&&(G(S._columns,B,"sortIndex"),I&&($(S,"sorting"),N=!0)),N&&V(S)}},updateFilter:function(y,I,S,B){if(!Array.isArray(y))return y;if(y=O([],y),S=y.columnIndex!==void 0?y.columnIndex:S,B=y.filterValue!==void 0?y.filterValue:B,Me(y[0])&&y[0]!=="!"){var N=this.columnOption(y[0]);I?It().forceIsoDateParsing&&N&&N.serializeValue&&y.length>1&&(y[y.length-1]=N.serializeValue(y[y.length-1],"filter")):N&&N.selector&&(y[0]=N.selector,y[0].columnIndex=N.index)}else Ee(y[0])&&(y[0].columnIndex=S,y[0].filterValue=B);for(var G=0;G<y.length;G++)y[G]=this.updateFilter(y[G],I,S,B);return y},columnCount:function(){return this._columns?this._columns.length:0},columnOption:function(y,I,S,B){var N=this,G=N._columns.concat(N._commandColumns),W=z(G,y);if(W){if(arguments.length===1)return O({},W);if(Me(I)){if(arguments.length===2)return X(N,W,I);X(N,W,I,S,B)}else He(I)&&F(I,function(ie,re){X(N,W,ie,re,B)});V(N)}},clearSorting:function(){var y=this.columnCount();this.beginUpdate();for(var I=0;I<y;I++)this.columnOption(I,"sortOrder",void 0);this.endUpdate()},clearGrouping:function(){var y=this.columnCount();this.beginUpdate();for(var I=0;I<y;I++)this.columnOption(I,"groupIndex",void 0);this.endUpdate()},getVisibleIndex:function(y,I){for(var S=this.getVisibleColumns(I),B=S.length-1;B>=0;B--)if(S[B].index===y)return B;return-1},getVisibleIndexByColumn:function(y,I){var S=this.getVisibleColumns(I),B=S.filter(N=>N.index===y.index&&N.command===y.command)[0];return S.indexOf(B)},getVisibleColumnIndex:function(y,I){var S=this.columnOption(y,"index");return this.getVisibleIndex(S,I)},addColumn:function(y){var I=r(this,y),S=this._columns.length;this._columns.push(I),I.isBand&&(this._columns=a(this,this._columns),I=this._columns[S]),I.added=y,R(this,I),this.updateColumns(this._dataSource),this._checkColumns()},deleteColumn:function(y){var I=this.columnOption(y);if(I&&I.index>=0){if(B=this._columns,B.forEach(N=>{E(N.ownerBand)&&(N.ownerBand=B[N.ownerBand])}),this._columns.splice(I.index,1),I.isBand){var S=this.getChildrenByBandColumn(I.index).map(N=>N.index);this._columns=this._columns.filter(N=>S.indexOf(N.index)<0)}R(this),this.updateColumns(this._dataSource)}var B},addCommandColumn:function(y){var I=this._commandColumns.filter(S=>S.command===y.command)[0];I||(I=y,this._commandColumns.push(I))},getUserState:function(){var y=this._columns,I=[],S;function B(N,G){y[S][G]!==void 0&&(I[S][G]=y[S][G])}for(S=0;S<y.length;S++)I[S]={},F(_d,B);return I},setName:function(y){y.name=y.name||y.dataField||y.type},setUserState:function(y){var I=this._dataSource,S=this.option("stateStoring.ignoreColumnOptionNames");if(y==null||y.forEach(this.setName),!S){S=[];var B=this.getCommonSettings();this.option("columnChooser.enabled")||S.push("visible"),this.option("sorting.mode")==="none"&&S.push("sortIndex","sortOrder"),B.allowGrouping||S.push("groupIndex"),B.allowFixing||S.push("fixed","fixedPosition"),B.allowResizing||S.push("width","visibleWidth");var N=!this.option("filterPanel.visible");!this.option("filterRow.visible")&&N&&S.push("filterValue","selectedFilterOperation"),!this.option("headerFilter.visible")&&N&&S.push("filterValues","filterType")}this._columnsUserState=y,this._ignoreColumnOptionNames=S,this._hasUserState=!!y,$(this,"filtering"),this.init(),I&&(I.sort(this.getSortDataSourceParameters()),I.group(this.getGroupDataSourceParameters()))},_checkColumns:function(){var y={},I=!1,S=[];this._columns.forEach(B=>{var N,G=B.name,W=(N=B.columns)===null||N===void 0?void 0:N.length,ie=B.allowEditing&&(B.dataField||B.setCellValue)&&!W;G?(y[G]&&S.push('"'.concat(G,'"')),y[G]=!0):ie&&(I=!0)}),S.length&&Je.log("E1059",S.join(", ")),I&&Je.log("E1060")},_createCalculatedColumnOptions:function(y,I){var S={},B=y.dataField;if((Array.isArray(y.columns)&&y.columns.length||y.isBand)&&(S.isBand=!0,B=null),B){if(Me(B)){var N=mt(B);S={caption:uo(B),calculateCellValue:function(G,W){var ie=N(G);return this.deserializeValue&&!W?this.deserializeValue(ie):ie},setCellValue:q,parseValue:function(G){var W,ie;return this.dataType==="number"?Me(G)&&this.format?W=function(re,_e){var oe=yt.parse(re);if(xt(oe)){var Re=yt.format(oe,_e),w=yt.format(oe,"decimal");if(Re===re||w===re)return oe}}(G.trim(),this.format):E(G)&&xt(G)&&(W=Number(G)):this.dataType==="boolean"?G===this.trueText?W=!0:G===this.falseText&&(W=!1):xe.isDateType(this.dataType)?(ie=Ze.parse(G,this.format),ie&&(W=ie)):W=G,W}}}S.allowFiltering=!0}else S.allowFiltering=!!y.calculateFilterExpression;return S.calculateFilterExpression=function(){return As.defaultCalculateFilterExpression.apply(this,arguments)},S.createFilterExpression=function(G){var W;return this.calculateFilterExpression&&(W=this.calculateFilterExpression.apply(this,arguments)),Ee(W)&&(W=[W,"=",!0]),W&&(W.columnIndex=this.index,W.filterValue=G),W},(!B||!Me(B))&&O(!0,S,{allowSorting:!1,allowGrouping:!1,calculateCellValue:function(){return null}}),I&&(S.allowFixing=!1),y.dataType&&(S.userDataType=y.dataType),y.selectedFilterOperation&&!("defaultSelectedFilterOperation"in S)&&(S.defaultSelectedFilterOperation=y.selectedFilterOperation),y.lookup&&(S.lookup={calculateCellValue:function(G,W){return this.valueExpr&&(G=this.valueMap&&this.valueMap[G]),this.deserializeValue&&!W?this.deserializeValue(G):G},updateValueMap:function(){if(this.valueMap={},this.items)for(var G=mt(this.valueExpr),W=mt(this.displayExpr),ie=0;ie<this.items.length;ie++){var re=this.items[ie],_e=W(re);this.valueMap[G(re)]=_e,this.dataType=this.dataType||d(_e)}},update:function(){var G=this,W=G.dataSource;if(W)if(Ee(W)&&!Fi.isWrapped(W)&&(W=W({})),Ye(W)||W instanceof or||Array.isArray(W)){if(G.valueExpr){var ie=Ws(W);return ie.paginate=!1,W=new lr(ie),W.load().done(function(re){G.items=re,G.updateValueMap&&G.updateValueMap()})}}else Je.log("E1016");else G.updateValueMap&&G.updateValueMap()}}),S.resizedCallbacks=dt(),y.resized&&S.resizedCallbacks.add(y.resized.bind(y)),F(S,function(G){if(Ee(S[G])&&G.indexOf("default")!==0){var W="default"+G.charAt(0).toUpperCase()+G.substr(1);S[W]=S[G]}}),S},getRowCount:function(){return this._rowCount=this._rowCount||function(y){var I=1,S=y.getBandColumnsCache(),B=S.columnParentByIndex;return y._columns.forEach(function(N){var G=o(N.index,B),W=G.filter(function(ie){return!ie.visible});N.visible&&!W.length&&(I=Math.max(I,G.length+1))}),I}(this),this._rowCount},getRowIndex:function(y,I){var S=this._columns[y],B=this.getBandColumnsCache();return S&&(I||S.visible&&!(S.command||E(S.groupIndex)))?o(y,B.columnParentByIndex).length:0},getChildrenByBandColumn:function(y,I){var S=this.getBandColumnsCache(),B=s(y,S.columnChildrenByIndex,!I);return I?B.filter(function(N){return N.visible&&!N.command}).sort(function(N,G){return N.visibleIndex-G.visibleIndex}):B},isParentBandColumn:function(y,I){var S=!1,B=this._columns[y],N=this.getBandColumnsCache(),G=B&&o(y,N.columnParentByIndex);return G&&F(G,function(W,ie){if(ie.index===I)return S=!0,!1}),S},isParentColumnVisible:function(y){var I=!0,S=this.getBandColumnsCache(),B=y>=0&&o(y,S.columnParentByIndex);return B&&F(B,function(N,G){return I=I&&G.visible,I}),I},getColumnId:function(y){return y.command&&y.type===Yr?b(this,y)?"type:"+y.type:"command:"+y.command:y.index},getCustomizeTextByDataType:p,getHeaderContentAlignment:function(y){var I=this.option("rtlEnabled");return I?y==="left"?"right":"left":y}}}())}};De.registerModule("columns",{defaultOptions:function(){return O(!0,{},q0.defaultOptions(),{commonColumnSettings:{allowExporting:!0}})},controllers:q0.controllers});const bz=De.Controller.inherit(function(){function e(o,s){if(o&&(o=o.slice(0),s))for(var l=0;l<o.length;l++)o[l]=O({key:o[l].key},o[l]),o[l].items=e(o[l].items,s-1);return o}function t(o,s,l){var u={reload:!0,fullReload:!0};return s&&(u={sorting:!De.equalSortParameters(o.sort,s.sort),grouping:!De.equalSortParameters(o.group,s.group,!0),groupExpanding:!De.equalSortParameters(o.group,s.group)||s.groupExpand,filtering:!De.equalFilterParameters(o.filter,s.filter),pageIndex:o.pageIndex!==s.pageIndex,skip:o.skip!==s.skip,take:o.take!==s.take,pageSize:o.pageSize!==s.pageSize,fullReload:l},u.reload=l||u.sorting||u.grouping||u.filtering,u.paging=u.pageIndex||u.pageSize||u.take),u}function i(o,s){var l=De.normalizeSortingInfo(o.group||o.storeLoadOptions.group||o.loadOptions.group).length,u=[];if(n(u,o,l))return u;s&&function(d,c,h){var f=d.length,{storeLoadOptions:p}=c;if(p.skip!==void 0&&p.take&&!h){var g=[];n(g,c,h,!0);var m=g.length;if(f||m){var C,x;c.skip=(C=c.skip)!==null&&C!==void 0?C:p.skip,c.take=(x=c.take)!==null&&x!==void 0?x:p.take}f&&(p.skip+=f,p.take-=f,c.cachedDataPartBegin=d),m&&(p.take-=m,c.cachedDataPartEnd=g.reverse())}}(u,o,l)}function n(o,s,l,u){var d,c,h,{storeLoadOptions:f}=s,p=(d=(c=s.take)!==null&&c!==void 0?c:f.take)!==null&&d!==void 0?d:0,g=(h=s.cachedData)===null||h===void 0?void 0:h.items;if(p&&g){for(var m,C,x=(m=(C=s.skip)!==null&&C!==void 0?C:f.skip)!==null&&m!==void 0?m:0,T=0;T<p;T++){var R=u?p-1-T:T,A=R+x,H=g[A];if(H===void 0&&A in g)return!0;var $=r(s,H,l,R,p);if($)o.push($);else return!1}return!0}return!1}function r(o,s,l,u,d){if(l&&s){var c=u===0&&o.skips||[],h=u===d-1&&o.takes||[];return function f(p,g,m,C){if(g&&p){var x=be({},p),T=m[0]||0,R=C[0],A=p.items;if(A){if(R===void 0&&!A[T])return;x.items=[],m.length&&(x.isContinuation=!0),C.length&&(x.isContinuationOnNextPage=!0);for(var H=0;R===void 0?A[H+T]:H<R;H++){var $=A[H+T],V=H+1===R,U=f($,g-1,H===0?m.slice(1):[],V?C.slice(1):[]);if(U!==void 0)x.items.push(U);else return}}return x}return p}(s,l,c,h)}else return s}function a(o,s,l,u){if(l&&s){var d=be({},s);delete d.isContinuation,delete d.isContinuationOnNextPage;var c=u[0]||0;return s.items&&(d.items=(o==null?void 0:o.items)||{},s.items.forEach((h,f)=>{var p=f+c,g=f===0?u.slice(1):[];d.items[p]=a(d.items[p],h,l-1,g)})),d}return s}return{init:function(o,s){var l=this;l._dataSource=o,l._remoteOperations=s||{},l._isLastPage=!o.isLastPage(),l._hasLastPage=!1,l._currentTotalCount=0,l._cachedData={items:{}},l._lastOperationTypes={},l._eventsStrategy=o._eventsStrategy,l._totalCountCorrection=0,l._isLoadingAll=!1,l.changed=dt(),l.loadingChanged=dt(),l.loadError=dt(),l.customizeStoreLoadOptions=dt(),l.changing=dt(),l.pushed=dt(),l._dataChangedHandler=l._handleDataChanged.bind(l),l._customizeStoreLoadOptionsHandler=l._handleCustomizeStoreLoadOptions.bind(l),l._dataLoadedHandler=l._handleDataLoaded.bind(l),l._loadingChangedHandler=l._handleLoadingChanged.bind(l),l._loadErrorHandler=l._handleLoadError.bind(l),l._pushHandler=l._handlePush.bind(l),l._changingHandler=l._handleChanging.bind(l),o.on("changed",l._dataChangedHandler),o.on("customizeStoreLoadOptions",l._customizeStoreLoadOptionsHandler),o.on("customizeLoadResult",l._dataLoadedHandler),o.on("loadingChanged",l._loadingChangedHandler),o.on("loadError",l._loadErrorHandler),o.on("changing",l._changingHandler),o.store().on("beforePush",l._pushHandler),F(o,function(u,d){!l[u]&&Ee(d)&&(l[u]=function(){return this._dataSource[u].apply(this._dataSource,arguments)})})},remoteOperations:function(){return this._remoteOperations},dispose:function(o){var s=this._dataSource,l=s.store();s.off("changed",this._dataChangedHandler),s.off("customizeStoreLoadOptions",this._customizeStoreLoadOptionsHandler),s.off("customizeLoadResult",this._dataLoadedHandler),s.off("loadingChanged",this._loadingChangedHandler),s.off("loadError",this._loadErrorHandler),s.off("changing",this._changingHandler),l&&l.off("beforePush",this._pushHandler),o||s.dispose()},refresh:function(o,s){var l=this._dataSource;s.reload&&(this.resetCurrentTotalCount(),this._isLastPage=!l.paginate(),this._hasLastPage=this._isLastPage)},resetCurrentTotalCount:function(){this._currentTotalCount=0,this._totalCountCorrection=0},resetCache:function(){this._cachedStoreData=void 0,this._cachedPagingData=void 0},resetPagesCache:function(){this._cachedData={items:{}}},_needClearStoreDataCache:function(){var o=this.remoteOperations(),s=t(this._lastLoadOptions||{},{}),l=Object.keys(o).every(u=>!s[u]||!o[u]);return!l},push:function(o,s){var l=this.store();this._needClearStoreDataCache()&&(this._cachedStoreData=void 0),this._cachedPagingData=void 0,this.resetPagesCache(!0),this._cachedStoreData&&Cs({keyInfo:l,data:this._cachedStoreData,changes:o}),s||this._applyBatch(o),this.pushed.fire(o)},getDataIndexGetter:function(){if(!this._dataIndexGetter){var o,s,l=this.store();this._dataIndexGetter=u=>{var d=s&&s!==this._cachedStoreData;if(!o||d){s=this._cachedStoreData||[],o={};for(var c=0;c<s.length;c++)o[Wn(l.keyOf(s[c]))]=c}return o[Wn(l.keyOf(u))]}}return this._dataIndexGetter},_getKeyInfo:function(){return this.store()},_applyBatch:function(o){var s=this._getKeyInfo(),l=this._dataSource,u=De.normalizeSortingInfo(this.group()).length,d=this.totalCount(),c=this.option("scrolling.mode")==="virtual";o=o.filter(function(p){return!l.paginate()||p.type!=="insert"||p.index!==void 0});var h=()=>u?this.itemsCount():this.items().length,f=h();Cs({keyInfo:s,data:this._items,changes:o,groupCount:u,useInsertIndex:!0}),Cs({keyInfo:s,data:l.items(),changes:o,groupCount:u,useInsertIndex:!0}),(this._currentTotalCount>0||c&&d===f)&&(this._totalCountCorrection+=h()-f),o.splice(0,o.length)},_handlePush:function(o){var{changes:s}=o;this.push(s,!0)},_handleChanging:function(o){this.changing.fire(o),this._applyBatch(o.changes)},_needCleanCacheByOperation:function(o,s){var l=["filtering","sorting","paging"],u=l.indexOf(o),d=u>=0?l.slice(u):[o];return d.some(c=>s[c])},_customizeRemoteOperations:function(o,s){var l=this._cachedStoreData,u=this._cachedPagingData,d=this._cachedData;(o.storeLoadOptions.filter&&!o.remoteOperations.filtering||o.storeLoadOptions.sort&&!o.remoteOperations.sorting)&&(o.remoteOperations={filtering:o.remoteOperations.filtering,summary:o.remoteOperations.summary}),s.fullReload?(l=void 0,u=void 0,d={items:{}}):(s.reload?(u=void 0,d={items:{}}):s.groupExpanding&&(d={items:{}}),F(s,(c,h)=>{h&&this._needCleanCacheByOperation(c,o.remoteOperations)&&(l=void 0,u=void 0)})),u&&(o.remoteOperations.paging=!1),o.cachedStoreData=l,o.cachedPagingData=u,o.cachedData=d,o.isCustomLoading||(this._cachedStoreData=l,this._cachedPagingData=u,this._cachedData=d)},_handleCustomizeStoreLoadOptions(o){var s;this._handleDataLoading(o),((s=o.data)===null||s===void 0?void 0:s.length)!==0&&(o.data=i(o,!0)||o.cachedStoreData)},_handleDataLoading:function(o){var s=this._dataSource,l=this._lastLoadOptions;this.customizeStoreLoadOptions.fire(o),o.delay=this.option("loadingTimeout"),o.originalStoreLoadOptions=o.storeLoadOptions,o.remoteOperations=O({},this.remoteOperations());var u=!this.isLoaded()&&!this._isRefreshing;this.option("integrationOptions.renderedOnServer")&&!this.isLoaded()&&(o.delay=void 0);var d=O({pageIndex:this.pageIndex(),pageSize:this.pageSize()},o.storeLoadOptions),c=t(d,l,u);if(this._customizeRemoteOperations(o,c),!o.isCustomLoading){var h=this._isRefreshing;o.pageIndex=s.pageIndex(),o.lastLoadOptions=d,o.operationTypes=c,this._loadingOperationTypes=c,this._isRefreshing=!0,Ae(h||this._isRefreshed||this.refresh(o,c)).done(()=>{this._lastOperationId===o.operationId&&(this._isRefreshed=!0,this.load().always(()=>{this._isRefreshed=!1}))}).fail(()=>{s.cancel(o.operationId)}).always(()=>{this._isRefreshing=!1}),s.cancel(this._lastOperationId),this._lastOperationId=o.operationId,this._isRefreshing&&s.cancel(this._lastOperationId)}this._handleDataLoadingCore(o)},_handleDataLoadingCore:function(o){var s=o.remoteOperations;o.loadOptions={};var l=o.cachedData.extra,u={filter:!s.filtering,sort:!s.sorting,group:!s.grouping,summary:!s.summary,skip:!s.paging,take:!s.paging,requireTotalCount:l&&"totalCount"in l||!s.paging};F(o.storeLoadOptions,function(d,c){u[d]&&(o.loadOptions[d]=c,delete o.storeLoadOptions[d])}),l&&(o.extra=l)},_handleDataLoaded:function(o){var s=o.loadOptions,l=o.remoteOperations&&!o.remoteOperations.paging,u=o.cachedData,d=o.storeLoadOptions,c=this.option("cacheEnabled")!==!1&&d,h=c&&!o.isCustomLoading&&u&&(!l||d.group),f=c&&l,p=f&&!o.isCustomLoading;if(!s){this._dataSource.cancel(o.operationId);return}l&&(o.skip=s.skip,o.take=s.take,delete s.skip,delete s.take),s.group&&(s.group=o.group||s.group);var g=De.normalizeSortingInfo(o.group||d.group||s.group).length;o.cachedDataPartBegin&&(o.data=o.cachedDataPartBegin.concat(o.data)),o.cachedDataPartEnd&&(o.data=o.data.concat(o.cachedDataPartEnd)),(!h||!i(o))&&(f&&o.cachedPagingData?o.data=e(o.cachedPagingData,g):(p&&(this._cachedStoreData?o.mergeStoreLoadData&&(o.data=this._cachedStoreData=this._cachedStoreData.concat(o.data)):this._cachedStoreData=e(o.data,De.normalizeSortingInfo(d.group).length)),new $s(o.data).load(s).done(m=>{o.data=m,p&&(this._cachedPagingData=e(o.data,g))}).fail(m=>{o.data=new te().reject(m)})),s.requireTotalCount&&l&&(o.extra=Ye(o.extra)?o.extra:{},o.extra.totalCount=o.data.length),o.extra&&o.extra.totalCount>=0&&(d.requireTotalCount===!1||s.requireTotalCount===!1)&&(o.extra.totalCount=-1),this._handleDataLoadedCore(o),h&&(u.extra=u.extra||O({},o.extra),Ae(o.data).done(m=>{(function(C,x,T){for(var R,A,H,$,{storeLoadOptions:V}=C,U=(R=(A=C.skip)!==null&&A!==void 0?A:V.skip)!==null&&R!==void 0?R:0,K=(H=($=C.take)!==null&&$!==void 0?$:V.take)!==null&&H!==void 0?H:0,X=0;X<K;X++){var M=X+U,q=C.cachedData.items,b=X===0&&C.skips||[];q[M]=a(q[M],x[X],T,b)}})(o,m,g)}))),Ae(o.data).done(()=>{o.lastLoadOptions&&(this._lastLoadOptions=o.lastLoadOptions,Object.keys(o.operationTypes).forEach(m=>{this._lastOperationTypes[m]=this._lastOperationTypes[m]||o.operationTypes[m]}))}),o.storeLoadOptions=o.originalStoreLoadOptions},_handleDataLoadedCore:function(o){o.remoteOperations&&!o.remoteOperations.paging&&Array.isArray(o.data)&&(o.skip!==void 0&&(o.data=o.data.slice(o.skip)),o.take!==void 0&&(o.data=o.data.slice(0,o.take)))},_handleLoadingChanged:function(o){this.loadingChanged.fire(o)},_handleLoadError:function(o){this.loadError.fire(o),this.changed.fire({changeType:"loadError",error:o})},_loadPageSize:function(){return this.pageSize()},_handleDataChanged:function(o){var s,l=this._dataSource,u=!1,d=!o||E(o.changeType),c=this.itemsCount();d&&(this._isLastPage=!c||!this._loadPageSize()||c<this._loadPageSize(),this._isLastPage&&(this._hasLastPage=!0)),l.totalCount()>=0?l.pageIndex()>=this.pageCount()&&(l.pageIndex(this.pageCount()-1),this.pageIndex(l.pageIndex()),this.resetPagesCache(),l.load(),u=!0):d&&(s=l.pageIndex()*this.pageSize()+c,s>this._currentTotalCount&&(this._currentTotalCount=s,(l.pageIndex()===0||!this.option("scrolling.legacyMode"))&&(this._totalCountCorrection=0)),c===0&&l.pageIndex()>=this.pageCount()&&(l.pageIndex(this.pageCount()-1),this.option("scrolling.mode")!=="infinite"&&(l.load(),u=!0))),u||(this._operationTypes=this._lastOperationTypes,this._lastOperationTypes={},this.component._optionCache={},this.changed.fire(o),this.component._optionCache=void 0)},_scheduleCustomLoadCallbacks:function(o){var s=this;s._isCustomLoading=!0,o.always(function(){s._isCustomLoading=!1})},loadingOperationTypes:function(){return this._loadingOperationTypes},operationTypes:function(){return this._operationTypes},lastLoadOptions:function(){return this._lastLoadOptions||{}},isLastPage:function(){return this._isLastPage},_dataSourceTotalCount:function(){return this._dataSource.totalCount()},totalCount:function(){return parseInt((this._currentTotalCount||this._dataSourceTotalCount())+this._totalCountCorrection)},totalCountCorrection:function(){return this._totalCountCorrection},itemsCount:function(){return this._dataSource.items().length},totalItemsCount:function(){return this.totalCount()},pageSize:function(){var o=this._dataSource;return!arguments.length&&!o.paginate()?0:o.pageSize.apply(o,arguments)},pageCount:function(){var o=this.totalItemsCount()-this._totalCountCorrection,s=this.pageSize();return s&&o>0?Math.max(1,Math.ceil(o/s)):1},hasKnownLastPage:function(){return this._hasLastPage||this._dataSource.totalCount()>=0},loadFromStore:function(o,s){var l=this._dataSource,u=new te;if(l)return s=s||l.store(),s.load(o).done(function(d,c){d&&!Array.isArray(d)&&Array.isArray(d.data)&&(c=d,d=d.data),u.resolve(d,c)}).fail(u.reject),u},isCustomLoading:function(){return!!this._isCustomLoading},load:function(o){var s=this,l=s._dataSource,u=new te;if(o){var d=l.store(),c=l.loadOptions(),h={storeLoadOptions:o,isCustomLoading:!0};return F(d._customLoadOptions()||[],function(f,p){p in h.storeLoadOptions||(h.storeLoadOptions[p]=c[p])}),this._isLoadingAll=o.isLoadingAll,s._scheduleCustomLoadCallbacks(u),l._scheduleLoadCallbacks(u),s._handleCustomizeStoreLoadOptions(h),function(f,p){E(p)?Th(f,p):f()}(function(){if(!l.store())return u.reject("canceled");Ae(h.data||s.loadFromStore(h.storeLoadOptions)).done(function(f,p){h.data=f,h.extra=p||{},s._handleDataLoaded(h),o.requireTotalCount&&h.extra.totalCount===void 0&&(h.extra.totalCount=d.totalCount(h.storeLoadOptions)),Ae(h.data,h.extra.totalCount).done(function(g,m){h.extra.totalCount=m,u.resolve(g,h.extra)}).fail(u.reject)}).fail(u.reject)},s.option("loadingTimeout")),u.fail(function(){s._eventsStrategy.fireEvent("loadError",arguments)}).always(()=>{this._isLoadingAll=!1}).promise()}else return l.load()},reload:function(o){return o?this._dataSource.reload():this._dataSource.load()},getCachedStoreData:function(){return this._cachedStoreData}}}());var lp=bz;const Nu={extend:function(e){lp=lp.inherit(e)},create:function(e){return new lp(e)}};var Y0="_dataSourceOptions",X0="_dataSourceChangedHandler",Z0="_dataSourceLoadErrorHandler",Q0="_dataSourceLoadingChangedHandler",J0="_dataSourceFromUrlLoadMode",ex="_getSpecificDataSourceOption",tx="_normalizeDataSource",Hu={postCtor:function(){this.on("disposing",(function(){this._disposeDataSource()}).bind(this))},_refreshDataSource:function(){this._initDataSource(),this._loadDataSource()},_initDataSource:function(){var e=ex in this?this[ex]():this.option("dataSource"),t,i;this._disposeDataSource(),e&&(e instanceof lr?(this._isSharedDataSource=!0,this._dataSource=e):(t=Y0 in this?this[Y0]():{},i=this._dataSourceType?this._dataSourceType():lr,e=Ws(e,{fromUrlLoadMode:J0 in this&&this[J0]()}),this._dataSource=new i(O(!0,{},t,e))),tx in this&&(this._dataSource=this[tx](this._dataSource)),this._addDataSourceHandlers())},_addDataSourceHandlers:function(){X0 in this&&this._addDataSourceChangeHandler(),Z0 in this&&this._addDataSourceLoadErrorHandler(),Q0 in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()},_addReadyWatcher:function(){this._dataSource.on("loadingChanged",(function(e){this._ready&&this._ready(!e)}).bind(this))},_addDataSourceChangeHandler:function(){var e=this._dataSource;this._proxiedDataSourceChangedHandler=(function(t){this[X0](e.items(),t)}).bind(this),e.on("changed",this._proxiedDataSourceChangedHandler)},_addDataSourceLoadErrorHandler:function(){this._proxiedDataSourceLoadErrorHandler=this[Z0].bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)},_addDataSourceLoadingChangedHandler:function(){this._proxiedDataSourceLoadingChangedHandler=this[Q0].bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)},_loadDataSource:function(){if(this._dataSource){var e=this._dataSource;e.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():e.load()}},_loadSingle:function(e,t){return e=e==="this"?this._dataSource.key()||"this":e,this._dataSource.loadSingle(e,t)},_isLastPage:function(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize},_isDataSourceLoading:function(){return this._dataSource&&this._dataSource.isLoading()},_disposeDataSource:function(){this._dataSource&&(this._isSharedDataSource?(delete this._isSharedDataSource,this._proxiedDataSourceChangedHandler&&this._dataSource.off("changed",this._proxiedDataSourceChangedHandler),this._proxiedDataSourceLoadErrorHandler&&this._dataSource.off("loadError",this._proxiedDataSourceLoadErrorHandler),this._proxiedDataSourceLoadingChangedHandler&&this._dataSource.off("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)},getDataSource:function(){return this._dataSource||null}},Cc=function(e,t){var i=t(e);if(He(i))try{return JSON.stringify(i)}catch{return i}return i},Sz=function(e,t,i,n){var r=Cc(e,n);return t[i[r]]},Ez=function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0},iD=function(e,t,i,n){var r={},a={},o=0,s=0,l=[];e.forEach(function(x,T){var R=Cc(x,i);r[R]=T}),t.forEach(function(x,T){var R=Cc(x,i);a[R]=T});for(var u=Math.max(e.length,t.length),d=0;d<u+o;d++){var c=t[d],h=d-o+s,f=e[h],p=!c||f&&!Sz(f,t,a,i);if(p)f&&(l.push({type:"remove",key:i(f),index:d,oldItem:f}),s++,d--);else{var g=Cc(c,i),m=r[g],C=e[m];if(!C)o++,l.push({type:"insert",data:c,index:d});else if(m===h)n(C,c)||l.push({type:"update",data:c,key:i(c),index:d,oldItem:C});else return}}return l},nD={defaultOptions:function(){return{loadingTimeout:0,dataSource:null,cacheEnabled:!0,repaintChangesOnly:!1,highlightChanges:!1,onDataErrorOccurred:null,remoteOperations:"auto",paging:{enabled:!0,pageSize:void 0,pageIndex:void 0}}},controllers:{data:Tt.Controller.inherit({}).include(Hu).inherit(function(){var e=function(i,n,r){var a=i._dataSource;if(a){if(r!==void 0){var o=i._getPagingOptionValue(n);if(o!==r){n==="pageSize"&&a.pageIndex(0),a[n](r),i._skipProcessingPagingChange=!0,i.option("paging."+n,r),i._skipProcessingPagingChange=!1;var s=a.pageIndex();return i._isPaging=n==="pageIndex",a[n==="pageIndex"?"load":"reload"]().done(()=>{i._isPaging=!1,i.pageChanged.fire(s)})}return te().resolve().promise()}return a[n]()}return 0},t={init:function(){var i=this;i._items=[],i._cachedProcessedItems=null,i._columnsController=i.getController("columns"),i._isPaging=!1,i._currentOperationTypes=null,i._dataChangedHandler=n=>{i._currentOperationTypes=this._dataSource.operationTypes(),i._handleDataChanged(n),i._currentOperationTypes=null},i._columnsChangedHandler=i._handleColumnsChanged.bind(i),i._loadingChangedHandler=i._handleLoadingChanged.bind(i),i._loadErrorHandler=i._handleLoadError.bind(i),i._customizeStoreLoadOptionsHandler=i._handleCustomizeStoreLoadOptions.bind(i),i._changingHandler=i._handleChanging.bind(i),i._dataPushedHandler=i._handleDataPushed.bind(i),i._columnsController.columnsChanged.add(i._columnsChangedHandler),i._isLoading=!1,i._isCustomLoading=!1,i._repaintChangesOnly=void 0,i._changes=[],i.createAction("onDataErrorOccurred"),i.dataErrorOccurred.add(function(n){return i.executeAction("onDataErrorOccurred",{error:n})}),i._refreshDataSource()},_getPagingOptionValue:function(i){return this._dataSource[i]()},callbackNames:function(){return["changed","loadingChanged","dataErrorOccurred","pageChanged","dataSourceChanged","pushed"]},callbackFlags:function(i){if(i==="dataErrorOccurred")return{stopOnFalse:!0}},publicMethods:function(){return["beginCustomLoading","endCustomLoading","refresh","filter","clearFilter","getCombinedFilter","keyOf","byKey","getDataByKeys","pageIndex","pageSize","pageCount","totalCount","_disposeDataSource","getKeyByRowIndex","getRowIndexByKey","getDataSource","getVisibleRows","repaintRows"]},reset:function(){this._columnsController.reset(),this._items=[],this._refreshDataSource()},_handleDataSourceChange(i){if(i.value===i.previousValue||this.option("columns")&&Array.isArray(i.value)&&Array.isArray(i.previousValue)){var n=i.value!==i.previousValue;if(n){var r=this.store();r&&(r._array=i.value)}return this.needToRefreshOnDataSourceChange(i)&&this.refresh(this.option("repaintChangesOnly")),!0}return!1},needToRefreshOnDataSourceChange:function(i){return!0},optionChanged:function(i){var n=this,r;function a(){i.handled=!0}if(i.name==="dataSource"&&i.name===i.fullName&&this._handleDataSourceChange(i)){a();return}switch(i.name){case"cacheEnabled":case"repaintChangesOnly":case"highlightChanges":case"loadingTimeout":a();break;case"remoteOperations":case"keyExpr":case"dataSource":case"scrolling":a(),n.reset();break;case"paging":if(r=n.dataSource(),r&&n._setPagingOptions(r)){var o=r.pageIndex();r.load().done(()=>n.pageChanged.fire(o))}a();break;case"rtlEnabled":n.reset();break;case"columns":r=n.dataSource(),r&&r.isLoading()&&i.name===i.fullName&&(this._useSortingGroupingFromColumns=!0,r.load());break;default:n.callBase(i)}},isReady:function(){return!this._isLoading},getDataSource:function(){return this._dataSource&&this._dataSource._dataSource},getCombinedFilter:function(i){return this.combinedFilter(void 0,i)},combinedFilter:function(i,n){var r=this._dataSource,a=this._columnsController;if(r){i===void 0&&(i=r.filter());var o=this._calculateAdditionalFilter();o&&(a.isDataSourceApplied()||a.isAllDataTypesDefined())&&(i=xe.combineFilters([o,i])),i=a.updateFilter(i,n||r.remoteOperations().filtering)}return i},waitReady:function(){return this._updateLockCount?(this._readyDeferred=new te,this._readyDeferred):Ae()},_endUpdateCore:function(){var i=this._changes;if(i.length){this._changes=[];var n=i.every(r=>r.repaintChangesOnly);this.updateItems(i.length===1?i[0]:{repaintChangesOnly:n})}this._readyDeferred&&(this._readyDeferred.resolve(),this._readyDeferred=null)},_handleCustomizeStoreLoadOptions:function(i){var n,r=this._columnsController,a=this._dataSource,o=i.storeLoadOptions;i.isCustomLoading&&!o.isLoadingAll||(o.filter=this.combinedFilter(o.filter),((n=o.filter)===null||n===void 0?void 0:n.length)===1&&o.filter[0]==="!"&&(i.data=[],i.extra=i.extra||{},i.extra.totalCount=0),r.isDataSourceApplied()||r.updateColumnDataTypes(a),this._columnsUpdating=!0,r.updateSortingGrouping(a,!this._useSortingGroupingFromColumns),this._columnsUpdating=!1,o.sort=r.getSortDataSourceParameters(),o.group=r.getGroupDataSourceParameters(),a.sort(o.sort),a.group(o.group),o.sort=r.getSortDataSourceParameters(!a.remoteOperations().sorting),i.group=r.getGroupDataSourceParameters(!a.remoteOperations().grouping))},_handleColumnsChanged:function(i){var n=this,r=i.changeTypes,a=i.optionNames,o,s,l;if(r.sorting||r.grouping)n._dataSource&&!n._columnsUpdating&&(n._dataSource.group(n._columnsController.getGroupDataSourceParameters()),n._dataSource.sort(n._columnsController.getSortDataSourceParameters()),n.reload());else if(r.columns&&(s=n._columnsController.columnOption(i.columnIndex,"filterValues"),(a.filterValues||a.filterType&&Array.isArray(s)||a.filterValue||a.selectedFilterOperation||a.allowFiltering)&&(o=n._columnsController.columnOption(i.columnIndex,"filterValue"),(Array.isArray(s)||i.columnIndex===void 0||E(o)||!a.selectedFilterOperation||a.filterValue)&&(n._applyFilter(),l=!0)),!n._needApplyFilter&&!xe.checkChanges(a,["width","visibleWidth","filterValue","bufferedFilterValue","selectedFilterOperation","filterValues","filterType"])&&n._columnsController.columnsChanged.add(function d(c){var h;n._columnsController.columnsChanged.remove(d),n.updateItems({repaintChangesOnly:!1,virtualColumnsScrolling:c==null||(h=c.changeTypes)===null||h===void 0?void 0:h.virtualColumnsScrolling})}),E(a.visible))){var u=n._columnsController.columnOption(i.columnIndex);u&&(E(u.filterValue)||E(u.filterValues))&&(n._applyFilter(),l=!0)}!l&&r.filtering&&n.reload()},_handleDataChanged:function(i){var n=this,r=n._dataSource,a=n._columnsController,o=!1;this._useSortingGroupingFromColumns=!1,r&&!n._isDataSourceApplying&&(n._isDataSourceApplying=!0,Ae(n._columnsController.applyDataSource(r)).done(function(){n._isLoading&&n._handleLoadingChanged(!1),o&&i&&i.isDelayed&&(i.isDelayed=!1),n._isDataSourceApplying=!1;var s=n._needApplyFilter;n._needApplyFilter=!1,s&&!n._isAllDataTypesDefined&&(l=n._calculateAdditionalFilter(),l&&l.length)?(Je.log("W1005",n.component.NAME),n._applyFilter()):n.updateItems(i,!0);var l}).fail(function(){n._isDataSourceApplying=!1}),n._isDataSourceApplying&&(o=!0,n._handleLoadingChanged(!0)),n._needApplyFilter=!n._columnsController.isDataSourceApplied(),n._isAllDataTypesDefined=a.isAllDataTypesDefined())},_handleLoadingChanged:function(i){this._isLoading=i,this._fireLoadingChanged()},_handleLoadError:function(i){this.dataErrorOccurred.fire(i)},_handleDataPushed:function(i){this.pushed.fire(i)},fireError:function(){this.dataErrorOccurred.fire(Je.Error.apply(Je,arguments))},_setPagingOptions:function(i){var n=this.option("paging.pageIndex"),r=this.option("paging.pageSize"),a=this.option("paging.enabled"),o=this.option("scrolling.mode"),s=o==="infinite",l=o==="virtual",u=a||l||s,d=!1;return i.requireTotalCount(!s),a!==void 0&&i.paginate()!==u&&(i.paginate(u),d=!0),r!==void 0&&i.pageSize()!==r&&(i.pageSize(r),d=!0),n!==void 0&&i.pageIndex()!==n&&(i.pageIndex(n),d=!0),d},_getSpecificDataSourceOption:function(){var i=this.option("dataSource");return Array.isArray(i)?{store:{type:"array",data:i,key:this.option("keyExpr")}}:i},_initDataSource:function(){var i=this.option("dataSource"),n=this._dataSource;this.callBase(),i=this._dataSource,this._useSortingGroupingFromColumns=!0,this._cachedProcessedItems=null,i?(this._setPagingOptions(i),this.setDataSource(i)):n&&this.updateItems()},_loadDataSource:function(){var i=this._dataSource,n=new te;return Ae(this._columnsController.refresh(!0)).always(function(){i?i.load().done(n.resolve).fail(n.reject):n.resolve()}),n.promise()},_beforeProcessItems:function(i){return i.slice(0)},getRowIndexDelta:function(){return 0},_processItems:function(i,n){var r=this,a=r.getRowIndexDelta(),o=n.changeType,s=r._columnsController.getVisibleColumns(null,o==="loadingAll"),l=r._items,u=o==="append"&&l.length>0?l[l.length-1]:null,d=E(u==null?void 0:u.dataIndex)?u.dataIndex+1:0,c={visibleColumns:s,dataIndex:d},h=[];return F(i,function(f,p){E(p)&&(c.rowIndex=f-a,p=r._processItem(p,c),h.push(p))}),h},_processItem:function(i,n){return i=this._generateDataItem(i,n),i=this._processDataItem(i,n),i.dataIndex=n.dataIndex++,i},_generateDataItem:function(i){return{rowType:"data",data:i,key:this.keyOf(i)}},_processDataItem:function(i,n){return i.values=this.generateDataValues(i.data,n.visibleColumns),i},generateDataValues:function(i,n,r){for(var a=[],o,s=0;s<n.length;s++){var l=n[s];o=r?void 0:null,l.command||(l.calculateCellValue?o=l.calculateCellValue(i):l.dataField&&(o=i[l.dataField])),a.push(o)}return a},_applyChange:function(i){i.changeType==="update"?this._applyChangeUpdate(i):this.items().length&&i.repaintChangesOnly&&i.changeType==="refresh"?this._applyChangesOnly(i):i.changeType==="refresh"&&this._applyChangeFull(i)},_applyChangeFull:function(i){this._items=i.items.slice(0)},_getRowIndices:function(i){var n=i.rowIndices.slice(0),r=this.getRowIndexDelta();n.sort(function(s,l){return s-l});for(var a=0;a<n.length;a++){var o=n[a];i.allowInvisibleRowIndices&&(o+=r),o<0&&(n.splice(a,1),a--)}return n},_applyChangeUpdate:function(i){var n=this,r=i.items,a=n._getRowIndices(i),o=n.getRowIndexDelta(),s=n.option("repaintChangesOnly"),l=-1,u=0,d;i.items=[],i.rowIndices=[],i.columnIndices=[],i.changeTypes=[];var c=function(h,f,p){var g=h&&f&&kt(h.key,f.key);return g&&p&&(g=h.rowType===f.rowType&&(f.rowType!=="detail"||h.isEditing===f.isEditing)),g};F(a,function(h,f){var p;if(f+=u+o,l!==f){l=f;var g=n._items[f],m=n._items[f+1],C=r[f],x=r[f+1],T=c(g,m)||c(C,x);if(C&&(C.rowIndex=f,i.items.push(C)),g&&C&&c(g,C,T))d="update",n._items[f]=C,g.visible!==C.visible?i.items.splice(-1,1,{visible:C.visible}):s&&!i.isFullUpdate&&(p=n._partialUpdateRow(g,C,f-o));else if(C&&!g||x&&c(g,x,T))d="insert",n._items.splice(f,0,C),u++;else if(g&&!C||m&&c(C,m,T))d="remove",n._items.splice(f,1),u--,l=-1;else if(C)d="update",n._items[f]=C;else return;i.rowIndices.push(f-o),i.changeTypes.push(d),i.columnIndices.push(p)}})},_isCellChanged:function(i,n,r,a,o){if(JSON.stringify(i.values[a])!==JSON.stringify(n.values[a]))return!0;function s(l,u){return l.modifiedValues?l.modifiedValues[u]!==void 0:!1}return s(i,a)!==s(n,a)},_getChangedColumnIndices:function(i,n,r,a){var o;if(i.rowType===n.rowType){if(n.rowType!=="group"&&n.rowType!=="groupFooter"&&(o=[],n.rowType!=="detail"))for(var s=0;s<i.values.length;s++)this._isCellChanged(i,n,r,s,a)&&o.push(s);n.rowType==="group"&&n.isExpanded===i.isExpanded&&i.cells&&(o=i.cells.map((l,u)=>{var d;return((d=l.column)===null||d===void 0?void 0:d.type)!=="groupExpand"?u:-1}).filter(l=>l>=0))}return o},_partialUpdateRow:function(i,n,r,a){var o,s=this._getChangedColumnIndices(i,n,r,a);return(o=s)!==null&&o!==void 0&&o.length&&this.option("dataRowTemplate")&&(s=void 0),s&&(i.cells&&i.cells.forEach(function(l,u){var d=s.indexOf(u)>=0;!d&&l&&l.update&&l.update(n)}),n.update=i.update,n.watch=i.watch,n.cells=i.cells,a&&(n.oldValues=i.values),i.update&&i.update(n)),s},_isItemEquals:function(i,n){if(JSON.stringify(i.values)!==JSON.stringify(n.values)||["modified","isNewRow","removed","isEditing"].some(c=>i[c]!==n[c]))return!1;if(i.rowType==="group"||i.rowType==="groupFooter"){var r,a,o,s,l=i.isExpanded===n.isExpanded,u=JSON.stringify(i.summaryCells)===JSON.stringify(n.summaryCells),d=((r=i.data)===null||r===void 0?void 0:r.isContinuation)===((a=n.data)===null||a===void 0?void 0:a.isContinuation)&&((o=i.data)===null||o===void 0?void 0:o.isContinuationOnNextPage)===((s=n.data)===null||s===void 0?void 0:s.isContinuationOnNextPage);if(!l||!u||!d)return!1}return!0},_applyChangesOnly:function(i){var n,r=[],a=[],o=[],s=[],l={},u=(n=i==null?void 0:i.isLiveUpdate)!==null&&n!==void 0?n:!0;function d(p){if(p)return p.rowType+","+JSON.stringify(p.key)}var c=this._items,h=c.slice();i.items.forEach(function(p,g){var m=d(p);l[m]=g,p.rowIndex=g});var f=iD(h,i.items,d,(p,g)=>this._isItemEquals(p,g)?(p.cells&&(p.update&&p.update(g),p.cells.forEach(function(m){m&&m.update&&m.update(g,!0)})),!0):!1);if(!f){this._applyChangeFull(i);return}f.forEach(p=>{switch(p.type){case"update":var g=p.index,m=p.data,C=p.oldItem,x=this._partialUpdateRow(C,m,g,u);r.push(g),o.push("update"),s.push(m),c[g]=m,a.push(x);break;case"insert":r.push(p.index),o.push("insert"),s.push(p.data),a.push(void 0),c.splice(p.index,0,p.data);break;case"remove":r.push(p.index),o.push("remove"),c.splice(p.index,1),s.push(p.oldItem),a.push(void 0)}}),i.repaintChangesOnly=!0,i.changeType="update",i.rowIndices=r,i.columnIndices=a,i.changeTypes=o,i.items=s,h.length&&(i.isLiveUpdate=!0),this._correctRowIndices(p=>{var g=this._rowIndexOffset||0,m=this.getRowIndexOffset(),C=h[p-g],x=d(C),T=l[x];return T>=0?T+m-p:0})},_correctRowIndices:ee,_afterProcessItems:function(i){return i},_updateItemsCore:function(i){var n,r=this._dataSource,a=i.changeType||"refresh";if(i.changeType=a,r){var o=this._cachedProcessedItems;i.useProcessedItemsCache&&o?n=o:(n=i.items||r.items(),n=this._beforeProcessItems(n),n=this._processItems(n,i),this._cachedProcessedItems=n),n=this._afterProcessItems(n,i),i.items=n;var s=this._items.length===n.length&&this._items;this._applyChange(i);var l=this.getRowIndexDelta();F(this._items,(u,d)=>{d.rowIndex=u-l,s&&(d.cells=s[u].cells||[]);var c=n[u];c&&(d.loadIndex=c.loadIndex)}),this._rowIndexOffset=this.getRowIndexOffset()}else this._items=[]},_handleChanging:function(i){var n=this.getVisibleRows(),r=this.dataSource();r&&i.changes.forEach(function(a){if(a.type==="insert"&&a.index>=0){for(var o=0,s=0;s<a.index;s++){var l=n[s];l&&(l.rowType==="data"||l.rowType==="group")&&o++}a.index=o}})},updateItems:function(i,n){if(i=i||{},this._repaintChangesOnly!==void 0){var r;i.repaintChangesOnly=(r=i.repaintChangesOnly)!==null&&r!==void 0?r:this._repaintChangesOnly,i.needUpdateDimensions=i.needUpdateDimensions||this._needUpdateDimensions}else if(i.changes)i.repaintChangesOnly=this.option("repaintChangesOnly");else if(n){var a=this.dataSource().operationTypes();i.repaintChangesOnly=a&&!a.grouping&&!a.filtering&&this.option("repaintChangesOnly"),i.isDataChanged=!0,a&&(a.reload||a.paging||a.groupExpanding)&&(i.needUpdateDimensions=!0)}if(this._updateLockCount&&!i.cancel){this._changes.push(i);return}this._updateItemsCore(i),!i.cancel&&this._fireChanged(i)},loadingOperationTypes:function(){var i=this.dataSource();return i&&i.loadingOperationTypes()||{}},_fireChanged:function(i){this._currentOperationTypes&&(i.operationTypes=this._currentOperationTypes,this._currentOperationTypes=null),Zt(()=>{this.changed.fire(i)})},isLoading:function(){return this._isLoading||this._isCustomLoading},_fireLoadingChanged:function(){this.loadingChanged.fire(this.isLoading(),this._loadingText)},_calculateAdditionalFilter:function(){return null},_applyFilter:function(){var i=this._dataSource;if(i)return i.pageIndex(0),this._isFilterApplying=!0,this.reload().done(()=>{this._isFilterApplying&&this.pageChanged.fire()})},resetFilterApplying:function(){this._isFilterApplying=!1},filter:function(i){var n=this._dataSource,r=n&&n.filter();if(arguments.length===0)return r;i=arguments.length>1?Array.prototype.slice.call(arguments,0):i,!xe.equalFilterParameters(r,i)&&(n&&n.filter(i),this._applyFilter())},clearFilter:function(i){var n=this,r=n._columnsController,a=function(o){for(var s=r.columnCount(),l=0;l<s;l++)r.columnOption(l,o,void 0)};if(n.component.beginUpdate(),arguments.length>0)switch(i){case"dataSource":n.filter(null);break;case"search":n.searchByText("");break;case"header":a("filterValues");break;case"row":a("filterValue")}else n.filter(null),n.searchByText(""),a("filterValue"),a("bufferedFilterValue"),a("filterValues");n.component.endUpdate()},_fireDataSourceChanged:function(){var i=this;i.changed.add(function n(){i.changed.remove(n),i.dataSourceChanged.fire()})},_getDataSourceAdapter:ee,_createDataSourceAdapterCore:function(i,n){var r=this._getDataSourceAdapter(),a=r.create(this.component);return a.init(i,n),a},isLocalStore:function(i){return i=i||this.store(),i instanceof $s},isCustomStore:function(i){return i=i||this.store(),i instanceof Os},_createDataSourceAdapter:function(i){var n=this.option("remoteOperations"),r=i.store(),a={filtering:!0,sorting:!0,paging:!0,grouping:!0,summary:!0};return n&&n.groupPaging&&(n=O({},a,n)),n==="auto"&&(n=this.isLocalStore(r)||this.isCustomStore(r)?{}:{filtering:!0,sorting:!0,paging:!0}),n===!0&&(n=a),this._createDataSourceAdapterCore(i,n)},setDataSource:function(i){var n=this._dataSource;!i&&n&&(n.cancelAll(),n.changed.remove(this._dataChangedHandler),n.loadingChanged.remove(this._loadingChangedHandler),n.loadError.remove(this._loadErrorHandler),n.customizeStoreLoadOptions.remove(this._customizeStoreLoadOptionsHandler),n.changing.remove(this._changingHandler),n.pushed.remove(this._dataPushedHandler),n.dispose(this._isSharedDataSource)),i&&(i=this._createDataSourceAdapter(i)),this._dataSource=i,i&&(this._fireDataSourceChanged(),this._isLoading=!i.isLoaded(),this._needApplyFilter=!0,this._isAllDataTypesDefined=this._columnsController.isAllDataTypesDefined(),i.changed.add(this._dataChangedHandler),i.loadingChanged.add(this._loadingChangedHandler),i.loadError.add(this._loadErrorHandler),i.customizeStoreLoadOptions.add(this._customizeStoreLoadOptionsHandler),i.changing.add(this._changingHandler),i.pushed.add(this._dataPushedHandler))},items:function(){return this._items},isEmpty:function(){return!this.items().length},pageCount:function(){return this._dataSource?this._dataSource.pageCount():1},dataSource:function(){return this._dataSource},store:function(){var i=this._dataSource;return i&&i.store()},loadAll:function(i){var n=this,r=new te,a=n._dataSource;if(a)if(i){var o={data:i,isCustomLoading:!0,storeLoadOptions:{isLoadingAll:!0},loadOptions:{filter:n.getCombinedFilter(),group:a.group(),sort:a.sort()}};a._handleDataLoaded(o),Ae(o.data).done(function(l){l=n._beforeProcessItems(l),r.resolve(n._processItems(l,{changeType:"loadingAll"}),o.extra&&o.extra.summary)}).fail(r.reject)}else if(a.isLoading())r.reject();else{var s=O({},a.loadOptions(),{isLoadingAll:!0,requireTotalCount:!1});a.load(s).done(function(l,u){l=n._beforeProcessItems(l),l=n._processItems(l,{changeType:"loadingAll"}),r.resolve(l,u&&u.summary)}).fail(r.reject)}else r.resolve([]);return r},getKeyByRowIndex:function(i,n){var r=this.items(n)[i];if(r)return r.key},getRowIndexByKey:function(i,n){return xe.getIndexByKey(i,this.items(n))},keyOf:function(i){var n=this.store();if(n)return n.keyOf(i)},byKey:function(i){var n=this.store(),r=this.getRowIndexByKey(i),a;if(n)return r>=0&&(a=new te().resolve(this.items()[r].data)),a||n.byKey(i)},key:function(){var i=this.store();if(i)return i.key()},getRowIndexOffset:function(){return 0},getDataByKeys:function(i){var n=this,r=new te,a=[],o=[];return F(i,function(s,l){a.push(n.byKey(l).done(function(u){o[s]=u}))}),Ae.apply(v,a).always(function(){r.resolve(o)}),r},pageIndex:function(i){return e(this,"pageIndex",i)},pageSize:function(i){return e(this,"pageSize",i)},beginCustomLoading:function(i){this._isCustomLoading=!0,this._loadingText=i||"",this._fireLoadingChanged()},endCustomLoading:function(){this._isCustomLoading=!1,this._loadingText=void 0,this._fireLoadingChanged()},refresh:function(i){i===!0?i={reload:!0,changesOnly:!0}:i||(i={lookup:!0,selection:!0,reload:!0});var n=this,r=n.getDataSource(),a=i.changesOnly,o=new te,s=function(){n._repaintChangesOnly=!!a};return Ae(!i.lookup||n._columnsController.refresh()).always(function(){i.load||i.reload?(r&&r.on("customizeLoadResult",s),Ae(n.reload(i.reload,a)).always(function(){r&&r.off("customizeLoadResult",s),n._repaintChangesOnly=void 0}).done(o.resolve).fail(o.reject)):(n.updateItems({repaintChangesOnly:i.changesOnly}),o.resolve())}),o.promise()},getVisibleRows:function(){return this.items()},_disposeDataSource:function(){this.setDataSource(null)},dispose:function(){this._disposeDataSource(),this.callBase.apply(this,arguments)},repaintRows:function(i,n){i=Array.isArray(i)?i:[i],(i.length>1||E(i[0]))&&this.updateItems({changeType:"update",rowIndices:i,isFullUpdate:!n})},skipProcessingPagingChange:function(i){return this._skipProcessingPagingChange&&(i==="paging.pageIndex"||i==="paging.pageSize")},getUserState:function(){return{searchText:this.option("searchPanel.text"),pageIndex:this.pageIndex(),pageSize:this.pageSize()}},getCachedStoreData:function(){return this._dataSource&&this._dataSource.getCachedStoreData()},isLastPageLoaded:function(){var i=this.pageIndex(),n=this.pageCount();return i===n-1}};return xe.proxyMethod(t,"load"),xe.proxyMethod(t,"reload"),xe.proxyMethod(t,"push"),xe.proxyMethod(t,"itemsCount",0),xe.proxyMethod(t,"totalItemsCount",0),xe.proxyMethod(t,"hasKnownLastPage",!0),xe.proxyMethod(t,"isLoaded",!0),xe.proxyMethod(t,"totalCount",0),t}())}},wz=nD.controllers.data.inherit({_getDataSourceAdapter:function(){return Nu},_getSpecificDataSourceOption:function(){var e=this.option("dataSource");return e&&!Array.isArray(e)&&this.option("keyExpr")&&Je.log("W1011"),this.callBase()}});De.registerModule("data",{defaultOptions:nD.defaultOptions,controllers:{data:wz}});var ix="dx-sort",nx="dx-sort-none",Iz="dx-sort-up",Tz="dx-sort-down",Az="dx-sort-index",rx="dx-sort-index-icon",Dz="action";const rD={_applyColumnState:function(e){var t,i,n=this.option("sorting.mode"),r=e.rootElement,a=e.column,o=this._getIndicatorContainer(r);if(e.name==="sort"){r.find("."+ix).remove(),!o.children().length&&o.remove();var s=n!=="none"&&a.allowSorting;if(!E(a.groupIndex)&&(s||E(a.sortOrder))){t=a.sortOrder==="asc"?"ascending":"descending",i=this.callBase(e).toggleClass(Iz,a.sortOrder==="asc").toggleClass(Tz,a.sortOrder==="desc");var l=this.getController&&!!this.getController("columns").columnOption("sortIndex:1");l&&this.option("sorting.showSortIndexes")&&a.sortIndex>=0&&(v("<span>").addClass(rx).text(a.sortIndex+1).appendTo(i),i.addClass(Az)),s&&e.rootElement.addClass(this.addWidgetPrefix(Dz))}return E(a.sortOrder)?this.setAria("sort",t,r):this.setAria("sort","none",r),i}else return this.callBase(e)},_getIndicatorClassName:function(e){return e==="sort"?ix:e==="sortIndex"?rx:this.callBase(e)},_renderIndicator:function(e){var t=e.column,i=e.container,n=e.indicator;if(e.name==="sort"){var r=this.option("rtlEnabled");if(E(t.sortOrder)||n&&n.addClass(nx),i.children().length&&(!r&&e.columnAlignment==="left"||r&&e.columnAlignment==="right")){i.prepend(n);return}}this.callBase(e)},_updateIndicator:function(e,t,i){if(!(i==="sort"&&E(t.groupIndex)))return this.callBase.apply(this,arguments)},_getIndicatorElements:function(e,t){var i=this.callBase(e);return t?i:i&&i.not("."+nx)}};var Oz="dxDataGridColumnHeadersView",Rz=O({},rD,{_createRow(e){var t=this.callBase(e);return e.rowType==="header"&&D.on(t,me(ct,Oz),"td",this.createAction(i=>{this._processHeaderAction(i.event,t)})),t},_processHeaderAction:function(e,t){if(v(e.currentTarget).parent().get(0)===t.get(0)){var i=this,n=null,r=v(e.currentTarget),a=r.parent().index(),o=-1;[].slice.call(i.getCellElements(a)).some((h,f)=>{if(h===r.get(0))return o=f,!0});var s=i._columnsController.getVisibleColumns(a),l=s[o],u=i.getController("editing"),d=i.option("editing.mode"),c=u&&u.isEditing()&&(d==="batch"||d==="cell");c||!i._isSortableElement(v(e.target))||l&&!E(l.groupIndex)&&!l.command&&(e.shiftKey?n="shift":fi(e)&&(n="ctrl"),setTimeout(()=>{i._columnsController.changeSortOrder(l.index,n)}))}},_renderCellContent(e,t){var i=t.column;!i.command&&t.rowType==="header"&&this._applyColumnState({name:"sort",rootElement:e,column:i,showColumnLines:this.option("showColumnLines")}),this.callBase(e,t)},_columnOptionChanged(e){var t=e.changeTypes;if(t.length===1&&t.sorting){this._updateIndicators("sort");return}this.callBase(e)},optionChanged(e){switch(e.name){case"sorting":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}}}),kz=O({},rD,{_createGroupPanelItem(e,t){var i=this,n=i.callBase(...arguments);return D.on(n,me(ct,"dxDataGridHeaderPanel"),i.createAction(()=>{i._processGroupItemAction(t.index)})),i._applyColumnState({name:"sort",rootElement:n,column:{alignment:i.option("rtlEnabled")?"right":"left",allowSorting:t.allowSorting,sortOrder:t.sortOrder==="desc"?"desc":"asc"},showColumnLines:!0}),n},_processGroupItemAction(e){setTimeout(()=>this.getController("columns").changeSortOrder(e))},optionChanged(e){switch(e.name){case"sorting":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}}}),Bz={defaultOptions:()=>({sorting:{mode:"single",ascendingText:ue.format("dxDataGrid-sortingAscendingText"),descendingText:ue.format("dxDataGrid-sortingDescendingText"),clearText:ue.format("dxDataGrid-sortingClearText"),showSortIndexes:!0}}),extenders:{views:{columnHeadersView:Rz,headerPanel:kz}}};De.registerModule("sorting",Bz);var Lz=nt.abstract,Pz=Oe.real(),aD="scroll",Mm="dxscrollinit",Vm="dxscrollstart",Nm="dxscroll",Hm="dxscrollend",$m="dxscrollstop",Wm="dxscrollcancel",oD=nt.inherit(function(){var e=me(aD,"dxScrollEmitter");return{ctor:function(t){this._element=t,this._locked=!1,this._proxiedScroll=i=>{this._disposed||this._scroll(i)},D.on(this._element,e,this._proxiedScroll)},_scroll:Lz,check:function(t,i){this._locked&&i()},dispose:function(){this._disposed=!0,D.off(this._element,e,this._proxiedScroll)}}}()),sD=oD.inherit({ctor:function(e,t){this.callBase(e),this._timeout=t},_scroll:function(){this._prepare(),this._forget()},_prepare:function(){this._timer&&this._clearTimer(),this._locked=!0},_clearTimer:function(){clearTimeout(this._timer),this._locked=!1,this._timer=null},_forget:function(){var e=this;this._timer=setTimeout(function(){e._clearTimer()},this._timeout)},dispose:function(){this.callBase(),this._clearTimer()}}),ax=sD.inherit({ctor:function(e){this.callBase(e,400),this._lastWheelDirection=null},check:function(e,t){this._checkDirectionChanged(e),this.callBase(e,t)},_checkDirectionChanged:function(e){if(!zi(e)){this._lastWheelDirection=null;return}var t=e.shiftKey||!1,i=this._lastWheelDirection!==null&&t!==this._lastWheelDirection;this._lastWheelDirection=t,this._locked=this._locked&&!i}}),X_=sD.inherit({ctor:function(e){this.callBase(e,400)}});(function(){var{ios:e,android:t}=Pz;(e||t)&&(X_=oD.inherit({_scroll:function(){this._locked=!0;var i=this;rr(this._scrollFrame),this._scrollFrame=ru(function(){i._locked=!1})},check:function(i,n){rr(this._scrollFrame),rr(this._checkFrame);var r=this,a=this.callBase;this._checkFrame=ru(function(){a.call(r,i,n),r._locked=!1})},dispose:function(){this.callBase(),rr(this._scrollFrame),rr(this._checkFrame)}}))})();var Fz=ku.inherit(function(){var e=Math.round(16.666666666666668);return{ctor:function(t){this.callBase.apply(this,arguments),this.direction="both",this._pointerLocker=new X_(t),this._wheelLocker=new ax(t)},validate:function(){return!0},configure:function(t){t.scrollTarget&&(this._pointerLocker.dispose(),this._wheelLocker.dispose(),this._pointerLocker=new X_(t.scrollTarget),this._wheelLocker=new ax(t.scrollTarget)),this.callBase(t)},_init:function(t){this._wheelLocker.check(t,(function(){zi(t)&&this._accept(t)}).bind(this)),this._pointerLocker.check(t,(function(){var i=this.isNative&&ho(t);!zi(t)&&!i&&this._accept(t)}).bind(this)),this._fireEvent(Mm,t),this._prevEventData=zt(t)},move:function(t){this.callBase.apply(this,arguments),t.isScrollingEvent=this.isNative||t.isScrollingEvent},_start:function(t){this._savedEventData=zt(t),this._fireEvent(Vm,t),this._prevEventData=zt(t)},_move:function(t){var i=zt(t);this._fireEvent(Nm,t,{delta:Xa(this._prevEventData,i)});var n=Xa(this._savedEventData,i);n.time>200&&(this._savedEventData=this._prevEventData),this._prevEventData=zt(t)},_end:function(t){var i=Xa(this._prevEventData,zt(t)),n={x:0,y:0};if(!zi(t)&&i.time<100){var r=Xa(this._savedEventData,this._prevEventData),a=e/r.time;n={x:r.x*a,y:r.y*a}}this._fireEvent(Hm,t,{velocity:n})},_stop:function(t){this._fireEvent($m,t)},cancel:function(t){this.callBase.apply(this,arguments),this._fireEvent(Wm,t)},dispose:function(){this.callBase.apply(this,arguments),this._pointerLocker.dispose(),this._wheelLocker.dispose()},_clearSelection:function(){if(!this.isNative)return this.callBase.apply(this,arguments)},_toggleGestureCover:function(){if(!this.isNative)return this.callBase.apply(this,arguments)}}}());Hs({emitter:Fz,events:[Mm,Vm,Nm,Hm,$m,Wm]});const zo={init:Mm,start:Vm,move:Nm,end:Hm,stop:$m,cancel:Wm,scroll:aD};var Mz=nt.abstract,lD=nt.inherit({ctor:function(){this._finished=!0,this._stopped=!1,this._proxiedStepCore=this._stepCore.bind(this)},start:function(){this._stopped=!1,this._finished=!1,this._stepCore()},stop:function(){this._stopped=!0,rr(this._stepAnimationFrame)},_stepCore:function(){if(this._isStopped()){this._stop();return}if(this._isFinished()){this._finished=!0,this._complete();return}this._step(),this._stepAnimationFrame=ru(this._proxiedStepCore)},_step:Mz,_isFinished:ee,_stop:ee,_complete:ee,_isStopped:function(){return this._stopped},inProgress:function(){return!(this._stopped||this._finished)}}),Z_="dxScrollbar",uD="dx-scrollable-scrollbar",ox="".concat(uD,"-active"),Vz="dx-scrollable-scroll",Nz="dx-scrollable-scroll-content",Hz="dx-scrollbar-hoverable",sx="horizontal",$z=15,gr={onScroll:"onScroll",onHover:"onHover",always:"always",never:"never"},fs=null,dD=pi.inherit({_getDefaultOptions:function(){return O(this.callBase(),{direction:null,visible:!1,activeStateEnabled:!1,visibilityMode:gr.onScroll,containerSize:0,contentSize:0,expandable:!0,scaleRatio:1})},_init:function(){this.callBase(),this._isHovered=!1},_initMarkup:function(){this._renderThumb(),this.callBase()},_render:function(){this.callBase(),this._renderDirection(),this._update(),this._attachPointerDownHandler(),this.option("hoverStateEnabled",this._isHoverMode()),this.$element().toggleClass(Hz,this.option("hoverStateEnabled"))},_renderThumb:function(){this._$thumb=v("<div>").addClass(Vz),v("<div>").addClass(Nz).appendTo(this._$thumb),this.$element().addClass(uD).append(this._$thumb)},isThumb:function(e){return!!this.$element().find(e).length},_isHoverMode:function(){var e=this.option("visibilityMode");return(e===gr.onHover||e===gr.always)&&this.option("expandable")},_renderDirection:function(){var e=this.option("direction");this.$element().addClass("dx-scrollbar-"+e),this._dimension=e===sx?"width":"height",this._prop=e===sx?"left":"top"},_attachPointerDownHandler:function(){D.on(this._$thumb,me(ut.down,Z_),this.feedbackOn.bind(this))},feedbackOn:function(){this.$element().addClass(ox),fs=this},feedbackOff:function(){this.$element().removeClass(ox),fs=null},cursorEnter:function(){this._isHovered=!0,this._needScrollbar()&&this.option("visible",!0)},cursorLeave:function(){this._isHovered=!1,this.option("visible",!1)},_renderDimensions:function(){this._$thumb.css({width:this.option("width"),height:this.option("height")})},_toggleVisibility:function(e){this.option("visibilityMode")===gr.onScroll&&this._$thumb.css("opacity"),e=this._adjustVisibility(e),this.option().visible=e,this._$thumb.toggleClass("dx-state-invisible",!e)},_adjustVisibility:function(e){if(this._baseContainerToContentRatio&&!this._needScrollbar())return!1;switch(this.option("visibilityMode")){case gr.onScroll:break;case gr.onHover:e=e||!!this._isHovered;break;case gr.never:e=!1;break;case gr.always:e=!0}return e},moveTo:function(e){if(!this._isHidden()){Ye(e)&&(e=e[this._prop]||0);var t={};t[this._prop]=this._calculateScrollBarPosition(e),ti(this._$thumb,t)}},_calculateScrollBarPosition:function(e){return-e*this._thumbRatio},_update:function(){var e=Math.round(this.option("containerSize")),t=Math.round(this.option("contentSize")),i=Math.round(this.option("baseContainerSize")),n=Math.round(this.option("baseContentSize"));isNaN(i)&&(i=e,n=t),this._baseContainerToContentRatio=n?i/n:i,this._realContainerToContentRatio=t?e/t:e;var r=Math.round(Math.max(Math.round(e*this._realContainerToContentRatio),$z));this._thumbRatio=(e-r)/(this.option("scaleRatio")*(t-e)),this.option(this._dimension,r/this.option("scaleRatio")),this.$element().css("display",this._needScrollbar()?"":"none")},_isHidden:function(){return this.option("visibilityMode")===gr.never},_needScrollbar:function(){return!this._isHidden()&&this._baseContainerToContentRatio<1},containerToContentRatio:function(){return this._realContainerToContentRatio},_normalizeSize:function(e){return Ye(e)?e[this._dimension]||0:e},_clean:function(){this.callBase(),this===fs&&(fs=null),D.off(this._$thumb,"."+Z_)},_optionChanged:function(e){if(!this._isHidden())switch(e.name){case"containerSize":case"contentSize":this.option()[e.name]=this._normalizeSize(e.value),this._update();break;case"baseContentSize":case"baseContainerSize":this._update();break;case"visibilityMode":case"direction":this._invalidate();break;case"scaleRatio":this._update();break;default:this.callBase.apply(this,arguments)}},update:to(function(){this._adjustVisibility()&&this.option("visible",!0)})});cr.add(function(){D.subscribeGlobal(fe.getDocument(),me(ut.up,Z_),function(){fs&&fs.feedbackOff()})});var cD="dxSimulatedScrollable",Wz="dxScrollableStrategy",gd=cD+"Cursor",up=cD+"Keyboard",dp="dx-scrollable-simulated",zz="dx-scrollable-scrollbars-alwaysvisible",Gz="dx-scrollable-scrollbar",jn="vertical",ki="horizontal",ih=.92,hD=.5,fD=1,Uz=Math.round(1e3/60),Kz=40,jz=500,qz=fD/5,Yz=400,Xz=Yz/Uz,Zz=(1-Math.pow(ih,Xz))/(1-ih),mr={PAGE_UP:"pageUp",PAGE_DOWN:"pageDown",END:"end",HOME:"home",LEFT:"leftArrow",UP:"upArrow",RIGHT:"rightArrow",DOWN:"downArrow",TAB:"tab"},pD=lD.inherit({ctor:function(e){this.callBase(),this.scroller=e},VELOCITY_LIMIT:fD,_isFinished:function(){return Math.abs(this.scroller._velocity)<=this.VELOCITY_LIMIT},_step:function(){this.scroller._scrollStep(this.scroller._velocity),this.scroller._velocity*=this._acceleration()},_acceleration:function(){return this.scroller._inBounds()?ih:hD},_complete:function(){this.scroller._scrollComplete()}}),Qz=pD.inherit({VELOCITY_LIMIT:qz,_isFinished:function(){return this.scroller._crossBoundOnNextStep()||this.callBase()},_acceleration:function(){return ih},_complete:function(){this.scroller._move(this.scroller._bounceLocation),this.callBase()}}),vD=nt.inherit({ctor:function(e){this._initOptions(e),this._initAnimators(),this._initScrollbar()},_initOptions:function(e){this._location=0,this._topReached=!1,this._bottomReached=!1,this._axis=e.direction===ki?"x":"y",this._prop=e.direction===ki?"left":"top",this._dimension=e.direction===ki?"width":"height",this._scrollProp=e.direction===ki?"scrollLeft":"scrollTop",F(e,(t,i)=>{this["_"+t]=i})},_initAnimators:function(){this._inertiaAnimator=new pD(this),this._bounceAnimator=new Qz(this)},_initScrollbar:function(){this._scrollbar=new dD(v("<div>").appendTo(this._$container),{direction:this._direction,visible:this._scrollByThumb,visibilityMode:this._visibilityModeNormalize(this._scrollbarVisible),expandable:this._scrollByThumb}),this._$scrollbar=this._scrollbar.$element()},_visibilityModeNormalize:function(e){return e===!0?"onScroll":e===!1?"never":e},_scrollStep:function(e){var t=this._location;this._location+=e,this._suppressBounce(),this._move(),!(Math.abs(t-this._location)<1)&&D.triggerHandler(this._$container,{type:"scroll"})},_suppressBounce:function(){this._bounceEnabled||this._inBounds(this._location)||(this._velocity=0,this._location=this._boundLocation())},_boundLocation:function(e){return e=e!==void 0?e:this._location,Math.max(Math.min(e,this._maxOffset),this._minOffset)},_move:function(e){this._location=e!==void 0?e*this._getScaleRatio():this._location,this._moveContent(),this._moveScrollbar()},_moveContent:function(){var e=this._location;this._$container[this._scrollProp](-e/this._getScaleRatio()),this._moveContentByTranslator(e)},_getScaleRatio:function(){if(Ke()&&!this._scaleRatio){var e=this._$element.get(0),t=this._getRealDimension(e,this._dimension),i=this._getBaseDimension(e,this._dimension);this._scaleRatio=Math.round(t/i*100)/100}return this._scaleRatio||1},_getRealDimension:function(e,t){return Math.round(Gt(e)[t])},_getBaseDimension:function(e,t){var i="offset"+Hc(t);return e[i]},_moveContentByTranslator:function(e){var t,i=-this._maxScrollPropValue;if(e>0?t=e:e<=i?t=e-i:t=e%1,this._translateOffset!==t){var n={};if(n[this._prop]=t,this._translateOffset=t,t===0){Ru(this._$content);return}ti(this._$content,n)}},_moveScrollbar:function(){this._scrollbar.moveTo(this._location)},_scrollComplete:function(){this._inBounds()&&(this._hideScrollbar(),this._completeDeferred&&this._completeDeferred.resolve()),this._scrollToBounds()},_scrollToBounds:function(){this._inBounds()||(this._bounceAction(),this._setupBounce(),this._bounceAnimator.start())},_setupBounce:function(){var e=this._bounceLocation=this._boundLocation(),t=e-this._location;this._velocity=t/Zz},_inBounds:function(e){return e=e!==void 0?e:this._location,this._boundLocation(e)===e},_crossBoundOnNextStep:function(){var e=this._location,t=e+this._velocity;return e<this._minOffset&&t>=this._minOffset||e>this._maxOffset&&t<=this._maxOffset},_initHandler:function(e){this._stopScrolling(),this._prepareThumbScrolling(e)},_stopScrolling:to(function(){this._hideScrollbar(),this._inertiaAnimator.stop(),this._bounceAnimator.stop()}),_prepareThumbScrolling:function(e){if(!zi(e.originalEvent)){var t=v(e.originalEvent.target),i=this._isScrollbar(t);i&&this._moveToMouseLocation(e),this._thumbScrolling=i||this._isThumb(t),this._crossThumbScrolling=!this._thumbScrolling&&this._isAnyThumbScrolling(t),this._thumbScrolling&&this._scrollbar.feedbackOn()}},_isThumbScrollingHandler:function(e){return this._isThumb(e)},_moveToMouseLocation:function(e){var t=e["page"+this._axis.toUpperCase()]-this._$element.offset()[this._prop],i=this._location+t/this._containerToContentRatio()-je(this._$container)/2;this._scrollStep(-Math.round(i))},_startHandler:function(){this._showScrollbar()},_moveHandler:function(e){this._crossThumbScrolling||(this._thumbScrolling&&(e[this._axis]=-Math.round(e[this._axis]/this._containerToContentRatio())),this._scrollBy(e))},_scrollBy:function(e){e=e[this._axis],this._inBounds()||(e*=hD),this._scrollStep(e)},_scrollByHandler:function(e){this._scrollBy(e),this._scrollComplete()},_containerToContentRatio:function(){return this._scrollbar.containerToContentRatio()},_endHandler:function(e){return this._completeDeferred=new te,this._velocity=e[this._axis],this._inertiaHandler(),this._resetThumbScrolling(),this._completeDeferred.promise()},_inertiaHandler:function(){this._suppressInertia(),this._inertiaAnimator.start()},_suppressInertia:function(){(!this._inertiaEnabled||this._thumbScrolling)&&(this._velocity=0)},_resetThumbScrolling:function(){this._thumbScrolling=!1,this._crossThumbScrolling=!1},_stopHandler:function(){this._thumbScrolling&&this._scrollComplete(),this._resetThumbScrolling(),this._scrollToBounds()},_disposeHandler:function(){this._stopScrolling(),this._$scrollbar.remove()},_updateHandler:function(){this._update(),this._moveToBounds()},_update:function(){return this._stopScrolling(),Bi(()=>{this._resetScaleRatio(),this._updateLocation(),this._updateBounds(),this._updateScrollbar(),Zt(()=>{this._moveScrollbar(),this._scrollbar.update()})})},_resetScaleRatio:function(){this._scaleRatio=null},_updateLocation:function(){this._location=(In(this._$content)[this._prop]-this._$container[this._scrollProp]())*this._getScaleRatio()},_updateBounds:function(){this._maxOffset=this._getMaxOffset(),this._minOffset=this._getMinOffset()},_getMaxOffset:function(){return 0},_getMinOffset:function(){return this._maxScrollPropValue=Math.max(this._contentSize()-this._containerSize(),0),-this._maxScrollPropValue},_updateScrollbar:d_(function(){var e=this._containerSize(),t=this._contentSize(),i=this._getBaseDimension(this._$container.get(0),this._dimension),n=this._getBaseDimension(this._$content.get(0),this._dimension);Zt(()=>{this._scrollbar.option({containerSize:e,contentSize:t,baseContainerSize:i,baseContentSize:n,scaleRatio:this._getScaleRatio()})})}),_moveToBounds:to(d_(to(function(){var e=this._boundLocation(),t=e!==this._location;this._location=e,this._move(),t&&this._scrollAction()}))),_createActionsHandler:function(e){this._scrollAction=e.scroll,this._bounceAction=e.bounce},_showScrollbar:function(){this._scrollbar.option("visible",!0)},_hideScrollbar:function(){this._scrollbar.option("visible",!1)},_containerSize:function(){return this._getRealDimension(this._$container.get(0),this._dimension)},_contentSize:function(){var e=this._$content.css("overflow"+this._axis.toUpperCase())==="hidden",t=this._getRealDimension(this._$content.get(0),this._dimension);if(!e){var i=this._$content[0]["scroll"+Hc(this._dimension)]*this._getScaleRatio();t=Math.max(i,t)}return t},_validateEvent:function(e){var t=v(e.originalEvent.target);return this._isThumb(t)||this._isScrollbar(t)},_isThumb:function(e){return this._scrollByThumb&&this._scrollbar.isThumb(e)},_isScrollbar:function(e){return this._scrollByThumb&&e&&e.is(this._$scrollbar)},_reachedMin:function(){return Math.round(this._location-this._minOffset)<=0},_reachedMax:function(){return Math.round(this._location-this._maxOffset)>=0},_cursorEnterHandler:function(){this._resetScaleRatio(),this._updateScrollbar(),this._scrollbar.cursorEnter()},_cursorLeaveHandler:function(){this._scrollbar.cursorLeave()},dispose:ee}),Pn,Go,_D=nt.inherit({ctor:function(e){this._init(e)},_init:function(e){this._component=e,this._$element=e.$element(),this._$container=v(e.container()),this._$wrapper=e._$wrapper,this._$content=e.$content(),this.option=e.option.bind(e),this._createActionByOption=e._createActionByOption.bind(e),this._isLocked=e._isLocked.bind(e),this._isDirection=e._isDirection.bind(e),this._allowedDirection=e._allowedDirection.bind(e),this._getMaxOffset=e._getMaxOffset.bind(e)},render:function(){this._$element.addClass(dp),this._createScrollers(),this.option("useKeyboard")&&this._$container.prop("tabIndex",0),this._attachKeyboardHandler(),this._attachCursorHandlers()},_createScrollers:function(){this._scrollers={},this._isDirection(ki)&&this._createScroller(ki),this._isDirection(jn)&&this._createScroller(jn),this._$element.toggleClass(zz,this.option("showScrollbar")==="always")},_createScroller:function(e){this._scrollers[e]=new vD(this._scrollerOptions(e))},_scrollerOptions:function(e){return{direction:e,$content:this._$content,$container:this._$container,$wrapper:this._$wrapper,$element:this._$element,scrollByThumb:this.option("scrollByThumb"),scrollbarVisible:this.option("showScrollbar"),bounceEnabled:this.option("bounceEnabled"),inertiaEnabled:this.option("inertiaEnabled"),isAnyThumbScrolling:this._isAnyThumbScrolling.bind(this)}},_applyScaleRatio:function(e){for(var t in this._scrollers){var i=this._getPropByDirection(t);if(E(e[i])){var n=this._scrollers[t];e[i]*=n._getScaleRatio()}}return e},_isAnyThumbScrolling:function(e){var t=!1;return this._eventHandler("isThumbScrolling",e).done(function(i,n){t=i||n}),t},handleInit:function(e){this._suppressDirections(e),this._eventForUserAction=e,this._eventHandler("init",e)},_suppressDirections:function(e){if(zi(e.originalEvent)){this._prepareDirections(!0);return}this._prepareDirections(),this._eachScroller(function(t,i){var n=v(e.originalEvent.target),r=t._validateEvent(e)||this.option("scrollByContent")&&this._isContent(n);this._validDirections[i]=r})},_isContent:function(e){return!!e.closest(this._$element).length},_prepareDirections:function(e){e=e||!1,this._validDirections={},this._validDirections[ki]=e,this._validDirections[jn]=e},_eachScroller:function(e){e=e.bind(this),F(this._scrollers,function(t,i){e(i,t)})},handleStart:function(e){this._eventForUserAction=e,this._eventHandler("start").done(this._startAction)},_saveActive:function(){Go=this},_resetActive:function(){Go===this&&(Go=null)},handleMove:function(e){if(this._isLocked()){e.cancel=!0,this._resetActive();return}this._saveActive(),e.preventDefault&&e.preventDefault(),this._adjustDistance(e,e.delta),this._eventForUserAction=e,this._eventHandler("move",e.delta)},_adjustDistance:function(e,t){t.x*=this._validDirections[ki],t.y*=this._validDirections[jn];var i=this._tryGetDevicePixelRatio();i&&zi(e.originalEvent)&&(t.x=Math.round(t.x/i*100)/100,t.y=Math.round(t.y/i*100)/100)},_tryGetDevicePixelRatio:function(){if(Ke())return qe().devicePixelRatio},handleEnd:function(e){return this._resetActive(),this._refreshCursorState(e.originalEvent&&e.originalEvent.target),this._adjustDistance(e,e.velocity),this._eventForUserAction=e,this._eventHandler("end",e.velocity).done(this._endAction)},handleCancel:function(e){return this._resetActive(),this._eventForUserAction=e,this._eventHandler("end",{x:0,y:0})},handleStop:function(){this._resetActive(),this._eventHandler("stop")},handleScroll:function(){this._updateRtlConfig(),this._scrollAction()},_attachKeyboardHandler:function(){D.off(this._$element,".".concat(up)),!this.option("disabled")&&this.option("useKeyboard")&&D.on(this._$element,me("keydown",up),this._keyDownHandler.bind(this))},_keyDownHandler:function(e){if(clearTimeout(this._updateHandlerTimeout),this._updateHandlerTimeout=setTimeout(()=>{Nt(e)===mr.TAB&&this._eachScroller(i=>{i._updateHandler()})}),!!this._$container.is(fe.getActiveElement())){var t=!0;switch(Nt(e)){case mr.DOWN:this._scrollByLine({y:1});break;case mr.UP:this._scrollByLine({y:-1});break;case mr.RIGHT:this._scrollByLine({x:1});break;case mr.LEFT:this._scrollByLine({x:-1});break;case mr.PAGE_DOWN:this._scrollByPage(1);break;case mr.PAGE_UP:this._scrollByPage(-1);break;case mr.HOME:this._scrollToHome();break;case mr.END:this._scrollToEnd();break;default:t=!1}t&&(e.stopPropagation(),e.preventDefault())}},_scrollByLine:function(e){var t=this._tryGetDevicePixelRatio(),i=Kz;t&&(i=Math.abs(i/t*100)/100),this.scrollBy({top:(e.y||0)*-i,left:(e.x||0)*-i})},_scrollByPage:function(e){var t=this._wheelProp(),i=this._dimensionByProp(t),n={},r=i==="width"?$e:je;n[t]=e*-r(this._$container),this.scrollBy(n)},_dimensionByProp:function(e){return e==="left"?"width":"height"},_getPropByDirection:function(e){return e===ki?"left":"top"},_scrollToHome:function(){var e=this._wheelProp(),t={};t[e]=0,this._component.scrollTo(t)},_scrollToEnd:function(){var e=this._wheelProp(),t=this._dimensionByProp(e),i={},n=t==="width"?$e:je;i[e]=n(this._$content)-n(this._$container),this._component.scrollTo(i)},createActions:function(){this._startAction=this._createActionHandler("onStart"),this._endAction=this._createActionHandler("onEnd"),this._updateAction=this._createActionHandler("onUpdated"),this._createScrollerActions()},_createScrollerActions:function(){this._scrollAction=this._createActionHandler("onScroll"),this._bounceAction=this._createActionHandler("onBounce"),this._eventHandler("createActions",{scroll:this._scrollAction,bounce:this._bounceAction})},_createActionHandler:function(e){var t=this._createActionByOption(e);return()=>{t(O(this._createActionArgs(),arguments))}},_createActionArgs:function(){var{horizontal:e,vertical:t}=this._scrollers,i=this._getScrollOffset();return this._scrollOffset={top:t&&i.top,left:e&&i.left},{event:this._eventForUserAction,scrollOffset:this._scrollOffset,reachedLeft:e&&e._reachedMax(),reachedRight:e&&e._reachedMin(),reachedTop:t&&t._reachedMax(),reachedBottom:t&&t._reachedMin()}},_getScrollOffset(){return{top:-this.location().top,left:-this.location().left}},_eventHandler:function(e){var t=[].slice.call(arguments).slice(1),i=Jt(this._scrollers,n=>n["_"+e+"Handler"].apply(n,t));return Ae.apply(v,i).promise()},location:function(){var e=In(this._$content);return e.top-=this._$container.scrollTop(),e.left-=this._$container.scrollLeft(),e},disabledChanged:function(){this._attachCursorHandlers()},_attachCursorHandlers:function(){D.off(this._$element,".".concat(gd)),!this.option("disabled")&&this._isHoverMode()&&(D.on(this._$element,me("mouseenter",gd),this._cursorEnterHandler.bind(this)),D.on(this._$element,me("mouseleave",gd),this._cursorLeaveHandler.bind(this)))},_isHoverMode:function(){return this.option("showScrollbar")==="onHover"},_cursorEnterHandler:function(e){e=e||{},e.originalEvent=e.originalEvent||{},!(Go||e.originalEvent._hoverHandled)&&(Pn&&Pn._cursorLeaveHandler(),Pn=this,this._eventHandler("cursorEnter"),e.originalEvent._hoverHandled=!0)},_cursorLeaveHandler:function(e){Pn!==this||Go===Pn||(this._eventHandler("cursorLeave"),Pn=null,this._refreshCursorState(e&&e.relatedTarget))},_refreshCursorState:function(e){if(!(!this._isHoverMode()&&(!e||Go))){var t=v(e),i=t.closest(".".concat(dp,":not(.dx-state-disabled)")),n=i.length&&i.data(Wz);Pn&&Pn!==n&&Pn._cursorLeaveHandler(),n&&n._cursorEnterHandler()}},update:function(){var e=this._eventHandler("update").done(this._updateAction);return Ae(e,Bi(()=>{var t=this._allowedDirections();return Zt(()=>{var i=t.vertical?"pan-x":"";i=t.horizontal?"pan-y":i,i=t.vertical&&t.horizontal?"none":i,this._$container.css("touchAction",i)}),Ae().promise()}))},_allowedDirections:function(){var e=this.option("bounceEnabled"),t=this._scrollers[jn],i=this._scrollers[ki];return{vertical:t&&(t._minOffset<0||e),horizontal:i&&(i._minOffset<0||e)}},_updateBounds:function(){this._scrollers[ki]&&this._scrollers[ki]._updateBounds()},_isHorizontalAndRtlEnabled:function(){return this.option("rtlEnabled")&&this.option("direction")!==jn},updateRtlPosition:function(e){e&&(this._rtlConfig={scrollRight:0,clientWidth:this._$container.get(0).clientWidth,windowPixelRatio:this._getWindowDevicePixelRatio()}),this._updateBounds(),this._isHorizontalAndRtlEnabled()&&Bi(()=>{var t=this._getMaxOffset().left-this._rtlConfig.scrollRight;t<=0&&(t=0,this._rtlConfig.scrollRight=this._getMaxOffset().left),Zt(()=>{this._getScrollOffset().left!==t&&(this._rtlConfig.skipUpdating=!0,this._component.scrollTo({left:t}),this._rtlConfig.skipUpdating=!1)})})},_updateRtlConfig:function(){if(this._isHorizontalAndRtlEnabled()&&!this._rtlConfig.skipUpdating){var{clientWidth:e,scrollLeft:t}=this._$container.get(0),i=this._getWindowDevicePixelRatio();this._rtlConfig.windowPixelRatio===i&&this._rtlConfig.clientWidth===e&&(this._rtlConfig.scrollRight=this._getMaxOffset().left-t),this._rtlConfig.clientWidth=e,this._rtlConfig.windowPixelRatio=i}},_getWindowDevicePixelRatio:function(){return Ke()?qe().devicePixelRatio:1},scrollBy:function(e){var t=this._scrollers[jn],i=this._scrollers[ki];t&&(e.top=t._boundLocation(e.top+t._location)-t._location),i&&(e.left=i._boundLocation(e.left+i._location)-i._location),this._prepareDirections(!0),this._startAction(),this._eventHandler("scrollBy",{x:e.left,y:e.top}),this._endAction(),this._updateRtlConfig()},validate:function(e){return zi(e)&&fi(e)||this.option("disabled")?!1:this.option("bounceEnabled")?!0:zi(e)?this._validateWheel(e):this._validateMove(e)},_validateWheel:function(e){var t=this._scrollers[this._wheelDirection(e)],i=t._reachedMin(),n=t._reachedMax(),r=!i||!n,a=!i&&!n,o=i&&e.delta>0,s=n&&e.delta<0,l=r&&(a||o||s);return l=l||this._validateWheelTimer!==void 0,l&&(clearTimeout(this._validateWheelTimer),this._validateWheelTimer=setTimeout(()=>{this._validateWheelTimer=void 0},jz)),l},_validateMove:function(e){return!this.option("scrollByContent")&&!v(e.target).closest(".".concat(Gz)).length?!1:this._allowedDirection()},getDirection:function(e){return zi(e)?this._wheelDirection(e):this._allowedDirection()},_wheelProp:function(){return this._wheelDirection()===ki?"left":"top"},_wheelDirection:function(e){switch(this.option("direction")){case ki:return ki;case jn:return jn;default:return e&&e.shiftKey?ki:jn}},dispose:function(){this._resetActive(),Pn===this&&(Pn=null),this._eventHandler("dispose"),this._detachEventHandlers(),this._$element.removeClass(dp),this._eventForUserAction=null,clearTimeout(this._validateWheelTimer),clearTimeout(this._updateHandlerTimeout)},_detachEventHandlers:function(){D.off(this._$element,".".concat(gd)),D.off(this._$container,".".concat(up))}}),lx="dxNativeScrollable",cp="dx-scrollable-native",Jz="dx-scrollable-scrollbar-simulated",e3="dx-scrollable-scrollbars-hidden",nl="vertical",md="horizontal",t3=500,zm=nt.inherit({ctor:function(e){this._init(e)},_init:function(e){this._component=e,this._$element=e.$element(),this._$container=v(e.container()),this._$content=e.$content(),this._direction=e.option("direction"),this._useSimulatedScrollbar=e.option("useSimulatedScrollbar"),this.option=e.option.bind(e),this._createActionByOption=e._createActionByOption.bind(e),this._isLocked=e._isLocked.bind(e),this._isDirection=e._isDirection.bind(e),this._allowedDirection=e._allowedDirection.bind(e),this._getMaxOffset=e._getMaxOffset.bind(e),this._isRtlNativeStrategy=e._isRtlNativeStrategy.bind(e)},render:function(){var e=Oe.real(),t=e.platform;this._$element.addClass(cp).addClass(cp+"-"+t).toggleClass(e3,!this._isScrollbarVisible()),this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._renderScrollbars()},updateRtlPosition:function(e){e&&this.option("rtlEnabled")&&this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._moveScrollbars()},_renderScrollbars:function(){this._scrollbars={},this._hideScrollbarTimeout=0,this._$element.addClass(Jz),this._renderScrollbar(nl),this._renderScrollbar(md)},_renderScrollbar:function(e){this._isDirection(e)&&(this._scrollbars[e]=new dD(v("<div>").appendTo(this._$element),{direction:e,expandable:this._component.option("scrollByThumb")}))},handleInit:ee,handleStart:ee,handleMove:function(e){if(this._isLocked()){e.cancel=!0;return}this._allowedDirection()&&(e.originalEvent.isScrollingEvent=!0)},handleEnd:ee,handleCancel:ee,handleStop:ee,_eachScrollbar:function(e){e=e.bind(this),F(this._scrollbars||{},function(t,i){e(i,t)})},createActions:function(){this._scrollAction=this._createActionByOption("onScroll"),this._updateAction=this._createActionByOption("onUpdated")},_createActionArgs:function(){var{left:e,top:t}=this.location();return{event:this._eventForUserAction,scrollOffset:this._getScrollOffset(),reachedLeft:this._isRtlNativeStrategy()?this._isReachedRight(-e):this._isReachedLeft(e),reachedRight:this._isRtlNativeStrategy()?this._isReachedLeft(-Math.abs(e)):this._isReachedRight(e),reachedTop:this._isDirection(nl)?Math.round(t)>=0:void 0,reachedBottom:this._isDirection(nl)?Math.round(Math.abs(t)-this._getMaxOffset().top)>=0:void 0}},_getScrollOffset:function(){var{top:e,left:t}=this.location();return{top:-e,left:this._normalizeOffsetLeft(-t)}},_normalizeOffsetLeft(e){return this._isRtlNativeStrategy()?this._getMaxOffset().left+e:e},_isReachedLeft:function(e){return this._isDirection(md)?Math.round(e)>=0:void 0},_isReachedRight:function(e){return this._isDirection(md)?Math.round(Math.abs(e)-this._getMaxOffset().left)>=0:void 0},_isScrollbarVisible:function(){var{showScrollbar:e}=this.option();return e!=="never"&&e!==!1},handleScroll:function(e){this._eventForUserAction=e,this._moveScrollbars(),this._scrollAction(this._createActionArgs())},_moveScrollbars:function(){var{top:e,left:t}=this._getScrollOffset();this._eachScrollbar(function(i){i.moveTo({top:-e,left:-t}),i.option("visible",!0)}),this._hideScrollbars()},_hideScrollbars:function(){clearTimeout(this._hideScrollbarTimeout),this._hideScrollbarTimeout=setTimeout((function(){this._eachScrollbar(function(e){e.option("visible",!1)})}).bind(this),t3)},location:function(){return{left:-this._$container.scrollLeft(),top:-this._$container.scrollTop()}},disabledChanged:ee,update:function(){this._update(),this._updateAction(this._createActionArgs())},_update:function(){this._updateDimensions(),this._updateScrollbars()},_updateDimensions:function(){this._containerSize={height:je(this._$container),width:$e(this._$container)},this._componentContentSize={height:je(this._component.$content()),width:$e(this._component.$content())},this._contentSize={height:je(this._$content),width:$e(this._$content)}},_updateScrollbars:function(){this._eachScrollbar(function(e,t){var i=t===nl?"height":"width";e.option({containerSize:this._containerSize[i],contentSize:this._componentContentSize[i]}),e.update()})},_allowedDirections:function(){return{vertical:this._isDirection(nl)&&this._contentSize.height>this._containerSize.height,horizontal:this._isDirection(md)&&this._contentSize.width>this._containerSize.width}},dispose:function(){var e=this._$element.get(0).className,t=new RegExp(cp+"\\S*","g");t.test(e)&&this._$element.removeClass(e.match(t).join(" ")),D.off(this._$element,"."+lx),D.off(this._$container,"."+lx),this._removeScrollbars(),clearTimeout(this._hideScrollbarTimeout)},_removeScrollbars:function(){this._eachScrollbar(function(e){e.$element().remove()})},scrollBy:function(e){var t=this.location();this._$container.scrollTop(Math.round(-t.top-e.top)),this._$container.scrollLeft(Math.round(-t.left-e.left))},validate:function(e){return this.option("disabled")||zi(e)&&this._isScrolledInMaxDirection(e)?!1:!!this._allowedDirection()},_isScrolledInMaxDirection(e){var t=this._$container.get(0),i;return e.delta>0?i=e.shiftKey?!t.scrollLeft:!t.scrollTop:e.shiftKey?i=t.scrollLeft>=this._getMaxOffset().left:i=t.scrollTop>=this._getMaxOffset().top,i},getDirection:function(){return this._allowedDirection()}}),gD=function(){return[{device:function(){return!po},options:{useNative:!1}},{device:function(e){return!Oe.isSimulator()&&Oe.real().deviceType==="desktop"&&e.platform==="generic"},options:{bounceEnabled:!1,scrollByThumb:!0,scrollByContent:fo,showScrollbar:"onHover"}}]};function mD(e,t){for(var i={left:0,top:0},n=t;(r=n)!==null&&r!==void 0&&r.offsetParent&&!n.classList.contains(e);){var r,a=n.offsetParent,o=n.getBoundingClientRect(),s=a.getBoundingClientRect();i.left+=o.left-s.left,i.top+=o.top-s.top,n=n.offsetParent}return i}var nh="vertical",CD="horizontal",hp="both",yD="dx-scrollable-content";function i3(e,t,i,n,r){var a=be({top:0,left:0,right:0,bottom:0},r),o=t===nh,s=o?"top":"left",l=o?"bottom":"right",u=o?"height":"width",d=i["offset".concat(Hc(u))],c=i["client".concat(Hc(u))],h=i.getBoundingClientRect()[u],f=e.getBoundingClientRect()[u],p=1;Math.abs(h-d)>1&&(p=h/d);var g=mD(yD,e)[s]/p,m=n[s],C=m-g+a[s],x=m-g-f/p+c-a[l];return C<=0&&x>=0?m:m-(Math.abs(C)>Math.abs(x)?x:C)}var Xn="dxScrollable",n3="dxScrollableStrategy",ux="dx-scrollable",r3="dx-scrollable-disabled",a3="dx-scrollable-container",o3="dx-scrollable-wrapper",dx="dx-scrollable-content",qn="vertical",Cr="horizontal",fp="both",cn=hr.inherit({_getDefaultOptions:function(){return O(this.callBase(),{disabled:!1,onScroll:null,direction:qn,showScrollbar:"onScroll",useNative:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,onUpdated:null,onStart:null,onEnd:null,onBounce:null,useSimulatedScrollbar:!1,useKeyboard:!0,inertiaEnabled:!0,updateManually:!1})},_defaultOptionsRules:function(){return this.callBase().concat(gD(),[{device:function(){return po&&Oe.real().platform==="android"&&!Bt.mozilla},options:{useSimulatedScrollbar:!0}}])},_initOptions:function(e){this.callBase(e),"useSimulatedScrollbar"in e||this._setUseSimulatedScrollbar()},_setUseSimulatedScrollbar:function(){this.initialOption("useSimulatedScrollbar")||this.option("useSimulatedScrollbar",!this.option("useNative"))},_init:function(){this.callBase(),this._initScrollableMarkup(),this._locked=!1},_visibilityChanged:function(e){e?(this.update(),this._updateRtlPosition(),this._savedScrollOffset&&this.scrollTo(this._savedScrollOffset),delete this._savedScrollOffset):this._savedScrollOffset=this.scrollOffset()},_initScrollableMarkup:function(){var e=this.$element().addClass(ux),t=this._$container=v("<div>").addClass(a3),i=this._$wrapper=v("<div>").addClass(o3),n=this._$content=v("<div>").addClass(dx);n.append(e.contents()).appendTo(t),t.appendTo(i),i.appendTo(e)},_dimensionChanged:function(){this.update(),this._updateRtlPosition()},_initMarkup:function(){this.callBase(),this._renderDirection()},_render:function(){this._renderStrategy(),this._attachEventHandlers(),this._renderDisabledState(),this._createActions(),this.update(),this.callBase(),this._updateRtlPosition(!0)},_updateRtlPosition:function(e){this._strategy.updateRtlPosition(e)},_getMaxOffset:function(){var{scrollWidth:e,clientWidth:t,scrollHeight:i,clientHeight:n}=v(this.container()).get(0);return{left:e-t,top:i-n}},_attachEventHandlers:function(){var e=this._strategy,t={getDirection:e.getDirection.bind(e),validate:this._validate.bind(this),isNative:this.option("useNative"),scrollTarget:this._$container};D.off(this._$wrapper,"."+Xn),D.on(this._$wrapper,me(zo.init,Xn),t,this._initHandler.bind(this)),D.on(this._$wrapper,me(zo.start,Xn),e.handleStart.bind(e)),D.on(this._$wrapper,me(zo.move,Xn),e.handleMove.bind(e)),D.on(this._$wrapper,me(zo.end,Xn),e.handleEnd.bind(e)),D.on(this._$wrapper,me(zo.cancel,Xn),e.handleCancel.bind(e)),D.on(this._$wrapper,me(zo.stop,Xn),e.handleStop.bind(e)),D.off(this._$container,"."+Xn),D.on(this._$container,me("scroll",Xn),e.handleScroll.bind(e))},_validate:function(e){return this._isLocked()?!1:(this._updateIfNeed(),this._moveIsAllowed(e))},_moveIsAllowed(e){return this._strategy.validate(e)},handleMove(e){this._strategy.handleMove(e)},_prepareDirections(e){this._strategy._prepareDirections(e)},_initHandler:function(){var e=this._strategy;e.handleInit.apply(e,arguments)},_renderDisabledState:function(){this.$element().toggleClass(r3,this.option("disabled")),this.option("disabled")?this._lock():this._unlock()},_renderDirection:function(){this.$element().removeClass("dx-scrollable-"+Cr).removeClass("dx-scrollable-"+qn).removeClass("dx-scrollable-"+fp).addClass("dx-scrollable-"+this.option("direction"))},_renderStrategy:function(){this._createStrategy(),this._strategy.render(),this.$element().data(n3,this._strategy)},_createStrategy:function(){this._strategy=this.option("useNative")?new zm(this):new _D(this)},_createActions:function(){this._strategy&&this._strategy.createActions()},_clean:function(){this._strategy&&this._strategy.dispose()},_optionChanged:function(e){switch(e.name){case"onStart":case"onEnd":case"onUpdated":case"onScroll":case"onBounce":this._createActions();break;case"direction":this._resetInactiveDirection(),this._invalidate();break;case"useNative":this._setUseSimulatedScrollbar(),this._invalidate();break;case"inertiaEnabled":case"scrollByThumb":case"bounceEnabled":case"useKeyboard":case"showScrollbar":case"useSimulatedScrollbar":this._invalidate();break;case"disabled":this._renderDisabledState(),this._strategy&&this._strategy.disabledChanged();break;case"updateManually":case"scrollByContent":break;case"width":this.callBase(e),this._updateRtlPosition();break;default:this.callBase(e)}},_resetInactiveDirection:function(){var e=this._getInactiveProp();if(!(!e||!Ke())){var t=this.scrollOffset();t[e]=0,this.scrollTo(t)}},_getInactiveProp:function(){var e=this.option("direction");if(e===qn)return"left";if(e===Cr)return"top"},_location:function(){return this._strategy.location()},_normalizeLocation:function(e){if(Ye(e)){var t=Ft(e.left,e.x),i=Ft(e.top,e.y);return{left:E(t)?-t:void 0,top:E(i)?-i:void 0}}else{var n=this.option("direction");return{left:n!==qn?-e:void 0,top:n!==Cr?-e:void 0}}},_isLocked:function(){return this._locked},_lock:function(){this._locked=!0},_unlock:function(){this.option("disabled")||(this._locked=!1)},_isDirection:function(e){var t=this.option("direction");return e===qn?t!==Cr:e===Cr?t!==qn:t===e},_updateAllowedDirection:function(){var e=this._strategy._allowedDirections();this._isDirection(fp)&&e.vertical&&e.horizontal?this._allowedDirectionValue=fp:this._isDirection(Cr)&&e.horizontal?this._allowedDirectionValue=Cr:this._isDirection(qn)&&e.vertical?this._allowedDirectionValue=qn:this._allowedDirectionValue=null},_allowedDirection:function(){return this._allowedDirectionValue},$content:function(){return this._$content},content:function(){return Fe(this._$content)},container:function(){return Fe(this._$container)},scrollOffset:function(){return this._strategy._getScrollOffset()},_isRtlNativeStrategy:function(){var{useNative:e,rtlEnabled:t}=this.option();return e&&t},scrollTop:function(){return this.scrollOffset().top},scrollLeft:function(){return this.scrollOffset().left},clientHeight:function(){return je(this._$container)},scrollHeight:function(){return at(this.$content())},clientWidth:function(){return $e(this._$container)},scrollWidth:function(){return lt(this.$content())},update:function(){if(this._strategy)return Ae(this._strategy.update()).done((function(){this._updateAllowedDirection()}).bind(this))},scrollBy:function(e){e=this._normalizeLocation(e),!(!e.top&&!e.left)&&(this._updateIfNeed(),this._strategy.scrollBy(e))},scrollTo:function(e){e=this._normalizeLocation(e),this._updateIfNeed();var t=this._location();this.option("useNative")||(e=this._strategy._applyScaleRatio(e),t=this._strategy._applyScaleRatio(t)),this._isRtlNativeStrategy()&&(t.left=t.left-this._getMaxOffset().left);var i=this._normalizeLocation({left:t.left-Ft(e.left,t.left),top:t.top-Ft(e.top,t.top)});!i.top&&!i.left||this._strategy.scrollBy(i)},scrollToElement:function(e,t){var i=v(e),n=this.$content().find(e).length,r=i.parents("."+ux).length-i.parents("."+dx).length===0;if(!(!n||!r)){var a={top:0,left:0},o=this.option("direction");o!==qn&&(a.left=this.getScrollElementPosition(i,Cr,t)),o!==Cr&&(a.top=this.getScrollElementPosition(i,qn,t)),this.scrollTo(a)}},getScrollElementPosition:function(e,t,i){var n=this.scrollOffset();return i3(e.get(0),t,v(this.container()).get(0),n,i)},_updateIfNeed:function(){this.option("updateManually")||this.update()},_useTemplates:function(){return!1},isRenovated:function(){return!!cn.IS_RENOVATED_WIDGET}});tt(Xn,cn);var s3="rowsview",l3="content",u3="nowrap",pp="dx-group-row",cx="dx-group-cell",d3="dx-data-row",Cd="dx-freespace-row",c3="dx-row-lines",hx="dx-column-lines",fx="dx-row-alt",px="dx-last-row-border",h3="dx-empty",f3="row-inserted-animation",p3=200;function vx(e){return e?Math.round(e.scrollWidth()-e.clientWidth()):0}var xD={defaultOptions:function(){return{hoverStateEnabled:!1,scrolling:{useNative:"auto"},loadPanel:{enabled:"auto",text:ue.format("Loading"),width:200,height:90,showIndicator:!0,indicatorSrc:"",showPane:!0},dataRowTemplate:null,columnAutoWidth:!1,noDataText:ue.format("dxDataGrid-noDataText"),wordWrapEnabled:!1,showColumnLines:!0,showRowLines:!1,rowAlternationEnabled:!1,activeStateEnabled:!1,twoWayBindingEnabled:!0}},views:{rowsView:Vu.inherit(function(){var e=function(t,i){var n=$l(i.text)&&i.rowType==="data",r=i.text,a=t.get(0);n?xe.setEmptyText(t):i.column.encodeHtml?a.textContent=r:a.innerHTML=r};return{_getDefaultTemplate:function(t){switch(t.command){case"empty":return function(i){i.html("&nbsp;")};default:return e}},_getDefaultGroupTemplate:function(t){var i=this.option("summary.texts");return function(n,r){var a=r.data,o=r.column.caption+": "+r.text,s=n.get(0);r.summaryItems&&r.summaryItems.length&&(o+=" "+xe.getGroupRowSummaryText(r.summaryItems,i)),a&&(r.groupContinuedMessage&&r.groupContinuesMessage?o+=" ("+r.groupContinuedMessage+". "+r.groupContinuesMessage+")":r.groupContinuesMessage?o+=" ("+r.groupContinuesMessage+")":r.groupContinuedMessage&&(o+=" ("+r.groupContinuedMessage+")")),n.addClass(cx),t.encodeHtml?s.textContent=o:s.innerHTML=o}},_update:function(){},_getCellTemplate:function(t){var i=t.column,n;return t.rowType==="group"&&E(i.groupIndex)&&!i.showWhenGrouped&&!i.command?n=i.groupCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultGroupTemplate(i)}:(t.rowType==="data"||i.command)&&i.cellTemplate?n=i.cellTemplate:n={allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(i)},n},_createRow:function(t){var i=this.callBase.apply(this,arguments);if(t){var n=t.rowType==="group",r=t.rowType==="data";if(r&&i.addClass(d3),r&&this.option("showRowLines")&&i.addClass(c3),this.option("showColumnLines")&&i.addClass(hx),t.visible===!1&&i.hide(),n){i.addClass(pp);var a=t.isExpanded;this.setAria("role","row",i),this.setAria("expanded",E(a)&&a.toString(),i)}}return i},_rowPrepared:function(t,i,n){i.rowType==="data"&&(this.option("rowAlternationEnabled")&&(this._isAltRow(n)&&t.addClass(fx),i.watch&&i.watch(()=>this._isAltRow(n),r=>{t.toggleClass(fx,r)})),this._setAriaRowIndex(i,t),i.watch&&i.watch(()=>i.rowIndex,()=>this._setAriaRowIndex(i,t))),this.callBase.apply(this,arguments)},_setAriaRowIndex:function(t,i){var n=this.component,r=n.option("scrolling.mode")==="standard"&&!xe.isVirtualRowRendering(n),a=t.rowIndex+1;r?a=n.pageIndex()*n.pageSize()+a:a+=this._dataController.getRowIndexOffset(),this.setAria("rowindex",a,i)},_afterRowPrepared:function(t){var i=t.args[0],n=this._dataController,r=n.getVisibleRows()[i.rowIndex],a=this.option("integrationOptions.watchMethod");if(!(!i.data||i.rowType!=="data"||i.isNewRow||!this.option("twoWayBindingEnabled")||!a||!r)){var o=a(()=>n.generateDataValues(i.data,i.columns),()=>{n.repaintRows([r.rowIndex],this.option("repaintChangesOnly"))},{deep:!0,skipImmediate:!0});D.on(i.rowElement,dr,o)}},_renderScrollable:function(t){var i=this.element();if(i.children().length||i.append("<div>"),(t||!this._loadPanel)&&this._renderLoadPanel(i,i.parent(),this._dataController.isLocalStore()),(t||!this.getScrollable())&&this._dataController.isLoaded()){for(var n=this.getColumns(),r=!0,a=0;a<n.length;a++)if(!n[a].width&&!n[a].minWidth){r=!1;break}(this.option("columnAutoWidth")||this._hasHeight||r||this._columnsController._isColumnFixing())&&this._renderScrollableCore(i)}},_handleScroll:function(t){var i=this.option("rtlEnabled"),n=t.component.option("useNative");this._scrollTop=t.scrollOffset.top,this._scrollLeft=t.scrollOffset.left;var r=t.scrollOffset.left;i&&(this._scrollRight=vx(t.component)-this._scrollLeft,n&&(r=-this._scrollRight),this.isScrollbarVisible(!0)||(this._scrollLeft=-1)),this.scrollChanged.fire(be({},t.scrollOffset,{left:r}),this.name)},_renderScrollableCore:function(t){var i=this._createScrollableOptions(),n=this._handleScroll.bind(this);i.onScroll=n,this._scrollable=this._createComponent(t,cn,i),this._scrollableContainer=this._scrollable&&v(this._scrollable.container())},_renderLoadPanel:xe.renderLoadPanel,_renderContent:function(t,i){return t.empty().append(i),this._findContentElement()},_updateContent:function(t,i){var n=this,r=n.getTableElement(),a=n._findContentElement(),o=i&&i.changeType,s=[],l=this.option("highlightChanges"),u=this.addWidgetPrefix(f3);switch(o){case"update":F(i.rowIndices,function(d,c){var h=n._getRowElements(t).eq(d),f=i.changeTypes&&i.changeTypes[d],p=i.items&&i.items[d];s.push(function(){var g=n._getRowElements(),m=g.eq(c);switch(f){case"update":if(p){var C=i.columnIndices&&i.columnIndices[d];E(p.visible)&&p.visible!==m.is(":visible")?m.toggle(p.visible):C?n._updateCells(m,h,C):m.replaceWith(h)}break;case"insert":if(g.length)m.length?h.insertBefore(m):h.insertAfter(g.last());else if(r){var x=h.is("tbody")?r:r.children("tbody");h.prependTo(x)}l&&i.isLiveUpdate&&h.addClass(u);break;case"remove":m.remove()}})}),F(s,function(){this()}),t.remove();break;default:n.setTableElement(t),a.addClass(n.addWidgetPrefix(l3)),n._renderContent(a,t)}},_createEmptyRow:function(t,i,n){var r,a=this._createRow(),o=i?this.getFixedColumns():this.getColumns();a.addClass(t).toggleClass(hx,this.option("showColumnLines"));for(var s=0;s<o.length;s++)r=this._createCell({column:o[s],rowType:"freeSpace",columnIndex:s,columns:o}),xt(n)&&r.css("height",n),a.append(r);return this.setAria("role","presentation",a),a},_appendEmptyRow:function(t,i,n){var r=this._getBodies(t),a=!r.length||i.is("tbody"),o=a?t:r;if(n==="top"){if(o.first().prepend(i),a){var s=o.children("colgroup");o.prepend(s)}}else o.last().append(i)},_renderFreeSpaceRow:function(t,i){var n=this._createEmptyRow(Cd);n=this._wrapRowIfNeed(t,n,(i==null?void 0:i.changeType)==="refresh"),this._appendEmptyRow(t,n)},_checkRowKeys:function(t){var i=this,n=i._getRows(t),r=i._dataController.store()&&i._dataController.store().key();r&&n.some(function(a){if(a.rowType==="data"&&a.key===void 0)return i._dataController.fireError("E1046",r),!0})},_needUpdateRowHeight:function(t){return t>0&&!this._rowHeight},_getRowsHeight:function(t){var i=t.children("tbody").children().not(".dx-virtual-row").not("."+Cd);return i.toArray().reduce(function(n,r){return n+Gt(r).height},0)},_updateRowHeight:function(){var t=this.getTableElement(),i=this._dataController.items().length;if(t&&this._needUpdateRowHeight(i)){var n=this._getRowsHeight(t);this._rowHeight=n/i}},_findContentElement:function(){var t=this.element(),i=this.getScrollable();if(t)return i&&(t=v(i.content())),t.children().first()},_getRowElements:function(t){var i=this.callBase(t);return i&&i.not("."+Cd)},_getFreeSpaceRowElements:function(t){var i=t||this.getTableElements();return i&&i.children("tbody").children("."+Cd)},_getNoDataText:function(){return this.option("noDataText")},_rowClick:function(t){var i=this._dataController.items()[t.rowIndex]||{};this.executeAction("onRowClick",O({evaluate:function(n){var r=mt(n);return r(i.data)}},t,i))},_rowDblClick:function(t){var i=this._dataController.items()[t.rowIndex]||{};this.executeAction("onRowDblClick",O({},t,i))},_getColumnsCountBeforeGroups:function(t){for(var i=0;i<t.length;i++)if(t[i].type==="groupExpand")return i;return 0},_getGroupCellOptions:function(t){var i=this._getColumnsCountBeforeGroups(t.columns),n=(t.row.groupIndex||0)+i;return{columnIndex:n,colspan:t.columns.length-n-1}},_renderCells:function(t,i){i.row.rowType==="group"?this._renderGroupedCells(t,i):i.row.values&&this.callBase(t,i)},_renderGroupedCells:function(t,i){for(var n=i.row,r,a=i.columns,o=n.rowIndex,s,l=this._getGroupCellOptions(i),u=0;u<=l.columnIndex;u++)u===l.columnIndex&&a[u].allowCollapsing&&i.scrollingMode!=="infinite"?(s=!!n.isExpanded,r=a[u]):(s=null,r={command:"expand",cssClass:a[u].cssClass}),this._needRenderCell(u,i.columnIndices)&&this._renderCell(t,{value:s,row:n,rowIndex:o,column:r,columnIndex:u,columnIndices:i.columnIndices});var d=wa(this.option("rtlEnabled")),c=O({},a[l.columnIndex],{command:null,type:null,cssClass:null,width:null,showWhenGrouped:!1,alignment:d});l.colspan>1&&(c.colspan=l.colspan),this._needRenderCell(l.columnIndex+1,i.columnIndices)&&this._renderCell(t,{value:n.values[n.groupIndex],row:n,rowIndex:o,column:c,columnIndex:l.columnIndex+1,columnIndices:i.columnIndices})},_renderRows:function(t,i){var n=this.option("scrolling.mode");this.callBase(t,O({scrollingMode:n},i)),this._checkRowKeys(i.change),this._renderFreeSpaceRow(t,i.change),this._hasHeight||this.updateFreeSpaceRowHeight(t)},_renderDataRowByTemplate(t,i,n){var r=i.row,a=O({columns:i.columns},r),o=this._createRow(r,"tbody");o.appendTo(t),this.renderTemplate(o,n,a,!0,i.change),this._rowPrepared(o,a,i.row)},_renderRow:function(t,i){var n=i.row,r=this.option().rowTemplate,a=this.option("dataRowTemplate");n.rowType==="data"&&a?this._renderDataRowByTemplate(t,i,a):(n.rowType==="data"||n.rowType==="group")&&!E(n.groupIndex)&&r?this.renderTemplate(t,r,O({columns:i.columns},n),!0):this.callBase(t,i)},_renderTable:function(t){var i=this,n=i.callBase(t);return E(i.getTableElement())?i._renderScrollable():(i.setTableElement(n),i._renderScrollable(!0),i.resizeCompleted.add(function r(){var a=i.getScrollable();a&&i.element().closest(qe().document).length&&(i.resizeCompleted.remove(r),a._visibilityChanged(!0))})),n},_createTable:function(){var t=this.callBase.apply(this,arguments);return(this.option().rowTemplate||this.option().dataRowTemplate)&&t.appendTo(this.component.$element()),t},_renderCore:function(t){var i=this.element();i.addClass(this.addWidgetPrefix(s3)).toggleClass(this.addWidgetPrefix(u3),!this.option("wordWrapEnabled")),i.toggleClass(h3,this._dataController.isEmpty()),this.setAria("role","presentation",i);var n=this._renderTable({change:t});this._updateContent(n,t),this.callBase(t),this._lastColumnWidths=null},_getRows:function(t){return t&&t.items||this._dataController.items()},_getCellOptions:function(t){var i=t.column,n=t.row,r=n.data,a=n&&n.summaryCells,o=t.value,s=xe.getDisplayValue(i,o,r,n.rowType),l=this.callBase(t);if(l.value=o,l.oldValue=t.oldValue,l.displayValue=s,l.row=n,l.key=n.key,l.data=r,l.rowType=n.rowType,l.values=n.values,l.text=i.command?"":xe.formatValue(s,i),l.rowIndex=n.rowIndex,l.summaryItems=a&&a[t.columnIndex],l.resized=i.resizedCallbacks,E(i.groupIndex)&&!i.command){var u=this.option("grouping.texts"),d=this.option("scrolling.mode");d!=="virtual"&&d!=="infinite"&&(l.groupContinuesMessage=r&&r.isContinuationOnNextPage&&u&&u.groupContinuesMessage,l.groupContinuedMessage=r&&r.isContinuation&&u&&u.groupContinuedMessage)}return l},_setRowsOpacityCore:function(t,i,n,r){var a=this._columnsController,o=a.getColumns(),s=o&&o[n],l=s&&s.isBand&&s.index;F(t,function(u,d){if(!v(d).hasClass(pp))for(var c=0;c<i.length&&!((xt(l)&&a.isParentBandColumn(i[c].index,l)||i[c].index===n)&&(t.eq(u).children().eq(c).css({opacity:r}),!xt(l)));c++);})},_getDevicePixelRatio:function(){return qe().devicePixelRatio},renderNoDataText:xe.renderNoDataText,getCellOptions:function(t,i){var n=this._dataController.items()[t],r,a;return n&&(Me(i)?a=this._columnsController.columnOption(i):a=this._columnsController.getVisibleColumns()[i],a&&(r=this._getCellOptions({value:a.calculateCellValue(n.data),rowIndex:n.rowIndex,row:n,column:a}))),r},getRow:function(t){if(t>=0){var i=this._getRowElements();if(i.length>t)return v(i[t])}},updateFreeSpaceRowHeight:function(t){var i=this._dataController,n=i.items(!0).length,r=this._findContentElement(),a=this._getFreeSpaceRowElements(t);if(a&&r&&i.totalCount()>=0){var o=!1;if(n>0)if(this._hasHeight)a.hide(),Bi(()=>{var u=this.getScrollbarWidth(!0),d=je(this.element())-u,c=at(r),h=d-c>0,f=this._getRowsHeight(r.children().first()),p=t||this.getTableElements(),g=Math.ceil(parseFloat(p.css("borderTopWidth"))),m=this._getHeightCorrection(),C=d-f-g-m;h&&Zt(()=>{a.css("height",C),o=!0,a.show()}),Zt(()=>this._updateLastRowBorder(o))});else{var s=i.pageSize()-n,l=this.option("scrolling.mode");s>0&&i.pageCount()>1&&l!=="virtual"&&l!=="infinite"&&(wf(a,s*this._rowHeight),o=!0),!o&&t?wf(a,0):a.toggle(o),this._updateLastRowBorder(o)}else a.css("height",0),a.show(),this._updateLastRowBorder(!0)}},_getHeightCorrection:function(){var t=Bt.webkit&&this._getDevicePixelRatio()>=2,i=Bt.chrome&&Bt.version>=91,n=Bt.mozilla&&Bt.version>=70&&!this.option("showRowLines");return t||n||i?1:0},_columnOptionChanged:function(t){var i=t.optionNames;t.changeTypes.grouping||(i.width||i.visibleWidth)&&(this.callBase(t),this._fireColumnResizedCallbacks())},getScrollable:function(){return this._scrollable},init:function(){var t=this,i=t.getController("data");t.callBase(),t._editorFactoryController=t.getController("editorFactory"),t._rowHeight=0,t._scrollTop=0,t._scrollLeft=-1,t._scrollRight=0,t._hasHeight=!1,i.loadingChanged.add(function(n,r){t.setLoading(n,r)}),i.dataSourceChanged.add(function(){t._scrollLeft>=0&&t._handleScroll({component:t.getScrollable(),scrollOffset:{top:t._scrollTop,left:t._scrollLeft}})})},_handleDataChanged:function(t){switch(t.changeType){case"refresh":case"prepend":case"append":case"update":this.render(null,t);break;default:this._update(t)}},publicMethods:function(){return["isScrollbarVisible","getTopVisibleRowData","getScrollbarWidth","getCellElement","getRowElement","getScrollable"]},contentWidth:function(){return $e(this.element())-this.getScrollbarWidth()},getScrollbarWidth:function(t){var i=this._scrollableContainer&&this._scrollableContainer.get(0),n=0;i&&(t?(n=i.clientHeight?i.offsetHeight-i.clientHeight:0,n+=(r=this,a=r.getScrollable(),a?Math.ceil(parseFloat(v(a.content()).css("paddingBottom"))):0)):n=i.clientWidth?i.offsetWidth-i.clientWidth:0);var r,a;return n>0?n:0},_fireColumnResizedCallbacks:function(){for(var t=this._lastColumnWidths||[],i=[],n=this.getColumns(),r=0;r<n.length;r++)i[r]=n[r].visibleWidth,n[r].resizedCallbacks&&!E(n[r].groupIndex)&&t[r]!==i[r]&&n[r].resizedCallbacks.fire(i[r]);this._lastColumnWidths=i},_updateLastRowBorder:function(t){this.option("showBorders")&&this.option("showRowLines")&&!t?this.element().addClass(px):this.element().removeClass(px)},_updateScrollable:function(){var t=cn.getInstance(this.element());t&&(t.update(),this._updateHorizontalScrollPosition())},_updateHorizontalScrollPosition:function(){var t=this.getScrollable(),i=t&&t.scrollOffset().left,n=this.option("rtlEnabled");if(n){var r=vx(t),a=r-i;a!==this._scrollRight&&(this._scrollLeft=r-this._scrollRight)}this._scrollLeft>=0&&i!==this._scrollLeft&&t.scrollTo({x:this._scrollLeft})},_resizeCore:function(){var t=this;t._fireColumnResizedCallbacks(),t._updateRowHeight(),Zt(function(){t._renderScrollable(),t.renderNoDataText(),t.updateFreeSpaceRowHeight(),Bi(function(){t._updateScrollable()})})},scrollTo:function(t){var i=this.element(),n=i&&cn.getInstance(i);n&&n.scrollTo(t)},height:function(t,i){var n=this,r=this.element();if(arguments.length===0)return r?at(r,!0):0;n._hasHeight=i===void 0?t!=="auto":i,E(t)&&r&&wf(r,t)},setLoading:function(t,i){var n=this._loadPanel,r=this._dataController,a=this.option("loadPanel")||{},o=r.isLoaded()?a.animation:null,s=this.element();if(Ke()&&(!n&&i!==void 0&&r.isLocalStore()&&a.enabled==="auto"&&s&&(this._renderLoadPanel(s,s.parent()),n=this._loadPanel),n)){var l={message:i||a.text,animation:o,visible:t};t&&(l.position=xe.calculateLoadPanelPosition(s)),clearTimeout(this._hideLoadingTimeoutID),n.option("visible")&&!t?this._hideLoadingTimeoutID=setTimeout(function(){n.option(l)},p3):n.option(l)}},setRowsOpacity:function(t,i){var n=this._getRowElements().not("."+pp)||[];this._setRowsOpacityCore(n,this.getColumns(),t,i)},_getCellElementsCore:function(t){var i=this.callBase.apply(this,arguments);if(i){var n=i.filter("."+cx).index();if(n>=0&&i.length>n+1)return i.slice(0,n+1)}return i},_getBoundaryVisibleItemIndex:function(t,i){var n=0,r=0,a=0,o=this._scrollTop,s=this._findContentElement(),l=s&&s.offset().top,u=this.getController("data"),d=u.items(),c=this.getTableElement();if(d.length&&c){var h=this._getRowElements(c).filter(":visible");if(!t){var f=at(this._hasHeight?this.element():qe());o+=f}for(n=0;n<d.length;n++){r=a;var p=v(h).eq(n);if(p.length&&(a=p.offset(),a=(t?a.top:a.top+at(p))-l,a>o)){n&&(i||2*o<Math.round(a+r))&&n--;break}}n&&n===d.length&&n--}return n},getTopVisibleItemIndex:function(t){return this._getBoundaryVisibleItemIndex(!0,t)},getBottomVisibleItemIndex:function(t){return this._getBoundaryVisibleItemIndex(!1,t)},getTopVisibleRowData:function(){var t=this.getTopVisibleItemIndex(),i=this._dataController.items();if(i[t])return i[t].data},_scrollToElement:function(t,i){var n=this.getScrollable();n&&n.scrollToElement(t,i)},optionChanged:function(t){switch(this.callBase(t),t.name){case"wordWrapEnabled":case"showColumnLines":case"showRowLines":case"rowAlternationEnabled":case"rowTemplate":case"dataRowTemplate":case"twoWayBindingEnabled":this._invalidate(!0,!0),t.handled=!0;break;case"scrolling":this._rowHeight=null,this._tableElement=null,t.handled=!0;break;case"rtlEnabled":this._rowHeight=null,this._tableElement=null;break;case"loadPanel":this._tableElement=null,this._invalidate(!0,t.fullName!=="loadPanel.enabled"),t.handled=!0;break;case"noDataText":this.renderNoDataText(),t.handled=!0}},dispose:function(){clearTimeout(this._hideLoadingTimeoutID),this._scrollable&&this._scrollable.dispose()},setScrollerSpacing:function(){},_restoreErrorRow:function(){}}}())}};xD.views.rowsView;De.registerModule("rows",xD);var _x="dx-inkripple",gx="dx-inkripple-wave",bD="dx-inkripple-showing",SD="dx-inkripple-hiding",v3=2,_3=4e3,vp=300,g3=1e3,ED=0,wD=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{useHoldAnimation:t,waveSizeCoefficient:i,isCentered:n,wavesNumber:r}=e;return{waveSizeCoefficient:i||v3,isCentered:n||!1,wavesNumber:r||1,durations:x3(t??!0)}},Gm=function(e){var t=wD(e);return{showWave:TD.bind(this,t),hideWave:DD.bind(this,t)}},m3=function(e){var t=e.children("."+_x);return t.length===0&&(t=v("<div>").addClass(_x).appendTo(e)),t},ID=function(e,t){for(var i=m3(v(e)),n=i.children("."+gx).toArray(),r=n.length;r<t;r++){var a=v("<div>").appendTo(i).addClass(gx);n.push(a[0])}return v(n)},C3=function(e,t){var i=v(t.element),n=lt(i),r=at(i),a=parseInt(Math.sqrt(n*n+r*r)),o=Math.min(_3,parseInt(a*e.waveSizeCoefficient)),s,l;if(e.isCentered)s=(n-o)/2,l=(r-o)/2;else{var u=t.event,d=i.offset(),c=u.pageX-d.left,h=u.pageY-d.top;s=c-o/2,l=h-o/2}return{left:s,top:l,height:o,width:o}};function TD(e,t){var i=ID(t.element,e.wavesNumber).eq(t.wave||ED);e.hidingTimeout&&clearTimeout(e.hidingTimeout),AD(i),i.css(C3(e,t)),e.showingTimeout=setTimeout(y3.bind(this,e,i),0)}function y3(e,t){var i=e.durations.showingScale+"ms";t.addClass(bD).css("transitionDuration",i)}function x3(e){return{showingScale:e?g3:vp,hidingScale:vp,hidingOpacity:vp}}function AD(e){e.removeClass(SD).css("transitionDuration","")}function DD(e,t){e.showingTimeout&&clearTimeout(e.showingTimeout);var i=ID(t.element,t.wavesNumber).eq(t.wave||ED),n=e.durations,r=n.hidingScale+"ms, "+n.hidingOpacity+"ms";i.addClass(SD).removeClass(bD).css("transitionDuration",r);var a=Math.max(n.hidingScale,n.hidingOpacity);e.hidingTimeout=setTimeout(AD.bind(this,i),a)}var rl="dx-icon",b3="dx-svg-icon",$u=e=>!e||typeof e!="string"?!1:/^\s*<svg[^>]*>(.|\r?\n)*?<\/svg>\s*$/i.test(e)?"svg":/data:.*base64|\.|[^<\s]\//.test(e)?"image":/^[\w-_]+$/.test(e)?"dxIcon":/^\s?([\w-_]\s?)+$/.test(e)?"fontIcon":!1,mo=e=>{switch($u(e)){case"image":return v("<img>").attr("src",e).addClass(rl);case"fontIcon":return v("<i>").addClass("".concat(rl," ").concat(e));case"dxIcon":return v("<i>").addClass("".concat(rl," ").concat(rl,"-").concat(e));case"svg":return v("<i>").addClass("".concat(rl," ").concat(b3)).append(e);default:return null}};function S3(e){return class{constructor(){throw new Error("Module '".concat(e,"' not found"))}static getInstance(){}}}var mx=S3("TextBox");const Co={_getDefaultOptions:function(){return O(this.callBase(),{searchMode:"",searchExpr:null,searchValue:"",searchEnabled:!1,searchEditorOptions:{}})},_initMarkup:function(){this._renderSearch(),this.callBase()},_renderSearch:function(){var e=this.$element(),t=this.option("searchEnabled"),i=this._addWidgetPrefix("search"),n=this._addWidgetPrefix("with-search");if(!t){e.removeClass(n),this._removeSearchBox();return}var r=this._getSearchEditorOptions();this._searchEditor?this._searchEditor.option(r):(e.addClass(n),this._$searchEditorElement=v("<div>").addClass(i).prependTo(e),this._searchEditor=this._createComponent(this._$searchEditorElement,mx,r))},_removeSearchBox:function(){this._$searchEditorElement&&this._$searchEditorElement.remove(),delete this._$searchEditorElement,delete this._searchEditor},_getSearchEditorOptions:function(){var e=this,t=e.option("searchEditorOptions"),i=ue.format("Search");return O({mode:"search",placeholder:i,tabIndex:e.option("tabIndex"),value:e.option("searchValue"),valueChangeEvent:"input",inputAttr:{"aria-label":i},onValueChanged:function(n){var r=e.option("searchTimeout");e._valueChangeDeferred=new te,clearTimeout(e._valueChangeTimeout),e._valueChangeDeferred.done((function(){this.option("searchValue",n.value)}).bind(e)),n.event&&n.event.type==="input"&&r?e._valueChangeTimeout=setTimeout(function(){e._valueChangeDeferred.resolve()},r):e._valueChangeDeferred.resolve()}},t)},_getAriaTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.$element()},_focusTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_updateFocusState:function(e,t){this.option("searchEnabled")&&this._toggleFocusClass(t,this.$element()),this.callBase(e,t)},getOperationBySearchMode:function(e){return e==="equals"?"=":e},_cleanAria:function(e){this.setAria({role:null,activedescendant:null},e),e.attr("tabIndex",null)},_optionChanged:function(e){switch(e.name){case"searchEnabled":case"searchEditorOptions":this._cleanAria(this.option("searchEnabled")?this.$element():this._itemContainer()),this._invalidate();break;case"searchExpr":case"searchMode":case"searchValue":if(!this._dataSource){Je.log("W1009");return}e.name==="searchMode"?this._dataSource.searchOperation(this.getOperationBySearchMode(e.value)):this._dataSource[e.name](e.value),this._dataSource.load();break;case"searchTimeout":break;default:this.callBase(e)}},focus:function(){if(!this.option("focusedElement")&&this.option("searchEnabled")){this._searchEditor&&this._searchEditor.focus();return}this.callBase()},_refresh:function(){this._valueChangeDeferred&&this._valueChangeDeferred.resolve(),this.callBase()},setEditorClass:function(e){mx=e}};var{ios:E3,mac:w3}=Oe.real(),I3=E3||w3,T3=function(e){var t;try{t={start:e.selectionStart,end:e.selectionEnd}}catch{t={start:0,end:0}}return t},A3=function(e,t){if(fe.getBody().contains(e))try{e.selectionStart=t.start,e.selectionEnd=t.end}catch{}},OD=function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e=v(e).get(0),!E(t))return T3(e);!i&&I3&&fe.getActiveElement()!==e||A3(e,t)};function D3(){var{android:e,version:t}=Oe.real();return e&&t[0]>4}function O3(){return"onbeforeinput"in fe.createElement("input")||D3()}var ds=" ",RD=nt.inherit({ctor:function(e){this._value=ds,O(this,e)},next:function(e){if(!arguments.length)return this._next;this._next=e},text:ee,value:ee,rawValue:ee,handle:ee,_prepareHandlingArgs:function(e,t){var i,n,r;t=t||{};var a=Object.prototype.hasOwnProperty.call(e,"value")?"value":"text";return e[a]=(i=t.str)!==null&&i!==void 0?i:e[a],e.start=(n=t.start)!==null&&n!==void 0?n:e.start,e.length=(r=t.length)!==null&&r!==void 0?r:e.length,e.index=e.index+1,e},reset:ee,clear:ee,first:function(e){return e=e||0,this.next().first(e+1)},isAccepted:function(){return!1},adjustedCaret:function(e,t,i){return t?this._adjustedForward(e,0,i):this._adjustedBackward(e,0,i)},_adjustedForward:ee,_adjustedBackward:ee,isValid:ee}),R3=RD.inherit({next:ee,handle:function(){return 0},text:function(){return""},value:function(){return""},first:function(){return 0},rawValue:function(){return""},adjustedCaret:function(){return 0},isValid:function(){return!0}}),kD=RD.inherit({text:function(){return(this._value!==ds?this._value:this.maskChar)+this.next().text()},value:function(){return this._value+this.next().value()},rawValue:function(){return this._value+this.next().rawValue()},handle:function(e){var t=Object.prototype.hasOwnProperty.call(e,"value")?e.value:e.text;if(!t||!t.length||!e.length)return 0;if(e.start)return this.next().handle(this._prepareHandlingArgs(e,{start:e.start-1}));var i=t[0],n=t.substring(1);return this._tryAcceptChar(i,e),this._accepted()?this.next().handle(this._prepareHandlingArgs(e,{str:n,length:e.length-1}))+1:this.handle(this._prepareHandlingArgs(e,{str:n,length:e.length-1}))},clear:function(e){this._tryAcceptChar(ds,e),this.next().clear(this._prepareHandlingArgs(e))},reset:function(){this._accepted(!1),this.next().reset()},_tryAcceptChar:function(e,t){if(this._accepted(!1),!!this._isAllowed(e,t)){var i=e===ds?this.maskChar:e;t.fullText=t.fullText.substring(0,t.index)+i+t.fullText.substring(t.index+1),this._accepted(!0),this._value=e}},_accepted:function(e){if(!arguments.length)return!!this._isAccepted;this._isAccepted=!!e},first:function(e){return this._value===ds?e||0:this.callBase(e)},_isAllowed:function(e,t){return e===ds?!0:this._isValid(e,t)},_isValid:function(e,t){var i=this.allowedChars;return i instanceof RegExp?i.test(e):Ee(i)?i(e,t.index,t.fullText):Array.isArray(i)?i.includes(e):i===e},isAccepted:function(e){return e===0?this._accepted():this.next().isAccepted(e-1)},_adjustedForward:function(e,t,i){return t>=e?t:this.next()._adjustedForward(e,t+1,i)||t+1},_adjustedBackward:function(e,t){return t>=e-1?e:this.next()._adjustedBackward(e,t+1)||t+1},isValid:function(e){return this._isValid(this._value,e)&&this.next().isValid(this._prepareHandlingArgs(e))}}),Cx=kD.inherit({value:function(){return this.next().value()},handle:function(e){var t=Object.prototype.hasOwnProperty.call(e,"value"),i=t?e.value:e.text;if(!i.length||!e.length)return 0;if(e.start||t)return this.next().handle(this._prepareHandlingArgs(e,{start:e.start&&e.start-1}));var n=i[0],r=i.substring(1);this._tryAcceptChar(n);var a=this._isAllowed(n)?this._prepareHandlingArgs(e,{str:r,length:e.length-1}):e;return this.next().handle(a)+1},clear:function(e){this._accepted(!1),this.next().clear(this._prepareHandlingArgs(e))},_tryAcceptChar:function(e){this._accepted(this._isValid(e))},_isValid:function(e){return e===this.maskChar},first:function(e){return e=e||0,this.next().first(e+1)},_adjustedForward:function(e,t,i){return t>=e&&i===this.maskChar?t:e===t+1&&this._accepted()?e:this.next()._adjustedForward(e,t+1,i)},_adjustedBackward:function(e,t){return t>=e-1?0:this.next()._adjustedBackward(e,t+1)},isValid:function(e){return this.next().isValid(this._prepareHandlingArgs(e))}}),ei={valid:"valid",invalid:"invalid",pending:"pending"};class Ia{constructor(){this.NAME="base"}defaultMessage(t){return ue.getFormatter("validation-".concat(this.NAME))(t)}defaultFormattedMessage(t){return ue.getFormatter("validation-".concat(this.NAME,"-formatted"))(t)}_isValueEmpty(t){return!Wu.required.validate(t,{})}validate(t,i){var n=Array.isArray(t)?t:[t],r=!0;return n.length?n.every(a=>(r=this._validate(a,i),r)):r=this._validate(null,i),r}}class k3 extends Ia{constructor(){super(),this.NAME="required"}_validate(t,i){return!E(t)||t===!1?!1:(t=String(t),(i.trim||!E(i.trim))&&(t=t.trim()),t!=="")}}class B3 extends Ia{constructor(){super(),this.NAME="numeric"}_validate(t,i){return i.ignoreEmptyValue!==!1&&this._isValueEmpty(t)?!0:i.useCultureSettings&&Me(t)?!isNaN(yt.parse(t)):xt(t)}}class L3 extends Ia{constructor(){super(),this.NAME="range"}_validate(t,i){if(i.ignoreEmptyValue!==!1&&this._isValueEmpty(t))return!0;var n=Wu.numeric.validate(t,i),r=E(t)&&t!=="",a=n?parseFloat(t):r&&t.valueOf(),o=i.min,s=i.max;if(!(n||Mi(t))&&!r)return!1;if(E(o))return E(s)?a>=o&&a<=s:a>=o;if(E(s))return a<=s;throw _t.Error("E0101")}}class P3 extends Ia{constructor(){super(),this.NAME="stringLength"}_validate(t,i){var n;return t=String((n=t)!==null&&n!==void 0?n:""),(i.trim||!E(i.trim))&&(t=t.trim()),i.ignoreEmptyValue&&this._isValueEmpty(t)?!0:Wu.range.validate(t.length,O({},i))}}class BD extends Ia{constructor(){super(),this.NAME="custom"}validate(t,i){if(i.ignoreEmptyValue&&this._isValueEmpty(t))return!0;var n=i.validator,r=n&&Ee(n.option)&&n.option("dataGetter"),a=Ee(r)&&r(),o={value:t,validator:n,rule:i};return a&&O(o,a),i.validationCallback(o)}}class F3 extends BD{constructor(){super(),this.NAME="async"}validate(t,i){if(E(i.reevaluate)||O(i,{reevaluate:!0}),i.ignoreEmptyValue&&this._isValueEmpty(t))return!0;var n=i.validator,r=n&&Ee(n.option)&&n.option("dataGetter"),a=Ee(r)&&r(),o={value:t,validator:n,rule:i};a&&O(o,a);var s=i.validationCallback(o);if(!xu(s))throw _t.Error("E0103");return this._getWrappedPromise(gi(s).promise())}_getWrappedPromise(t){var i=new te;return t.then(function(n){i.resolve(n)},function(n){var r={isValid:!1};E(n)&&(Me(n)?r.message=n:He(n)&&E(n.message)&&Me(n.message)&&(r.message=n.message)),i.resolve(r)}),i.promise()}}class M3 extends Ia{constructor(){super(),this.NAME="compare"}_validate(t,i){if(!i.comparisonTarget)throw _t.Error("E0102");if(i.ignoreEmptyValue&&this._isValueEmpty(t))return!0;O(i,{reevaluate:!0});var n=i.comparisonTarget(),r=i.comparisonType||"==";switch(r){case"==":return t==n;case"!=":return t!=n;case"===":return t===n;case"!==":return t!==n;case">":return t>n;case">=":return t>=n;case"<":return t<n;case"<=":return t<=n}}}class V3 extends Ia{constructor(){super(),this.NAME="pattern"}_validate(t,i){if(i.ignoreEmptyValue!==!1&&this._isValueEmpty(t))return!0;var n=i.pattern;return Me(n)&&(n=new RegExp(n)),n.test(t)}}class N3 extends Ia{constructor(){super(),this.NAME="email"}_validate(t,i){return i.ignoreEmptyValue!==!1&&this._isValueEmpty(t)?!0:Wu.pattern.validate(t,O({},i,{pattern:/^[\d\w._-]+@[\d\w._-]+\.[\w]+$/i}))}}var Wu={required:new k3,numeric:new B3,range:new L3,stringLength:new P3,custom:new BD,async:new F3,compare:new M3,pattern:new V3,email:new N3},H3=nt.inherit({ctor(e){this.group=e,this.validators=[],this._pendingValidators=[],this._onValidatorStatusChanged=this._onValidatorStatusChanged.bind(this),this._resetValidationInfo(),this._eventsStrategy=new wo(this)},validate(){var e={isValid:!0,brokenRules:[],validators:[],status:ei.valid,complete:null};return this._unsubscribeFromAllChangeEvents(),this._pendingValidators=[],this._resetValidationInfo(),F(this.validators,(t,i)=>{var n=i.validate();e.isValid=e.isValid&&n.isValid,n.brokenRules&&(e.brokenRules=e.brokenRules.concat(n.brokenRules)),e.validators.push(i),n.status===ei.pending&&this._addPendingValidator(i),this._subscribeToChangeEvents(i)}),this._pendingValidators.length?e.status=ei.pending:(e.status=e.isValid?ei.valid:ei.invalid,this._unsubscribeFromAllChangeEvents(),this._raiseValidatedEvent(e)),this._updateValidationInfo(e),O({},this._validationInfo.result)},_subscribeToChangeEvents(e){e.on("validating",this._onValidatorStatusChanged),e.on("validated",this._onValidatorStatusChanged)},_unsubscribeFromChangeEvents(e){e.off("validating",this._onValidatorStatusChanged),e.off("validated",this._onValidatorStatusChanged)},_unsubscribeFromAllChangeEvents(){F(this.validators,(e,t)=>{this._unsubscribeFromChangeEvents(t)})},_updateValidationInfo(e){this._validationInfo.result=e,e.status===ei.pending&&(this._validationInfo.deferred||(this._validationInfo.deferred=new te,this._validationInfo.result.complete=this._validationInfo.deferred.promise()))},_addPendingValidator(e){var t=Vi(this._pendingValidators,function(i){return i===e})[0];t||this._pendingValidators.push(e)},_removePendingValidator(e){var t=this._pendingValidators.indexOf(e);t>=0&&this._pendingValidators.splice(t,1)},_orderBrokenRules(e){var t=[];return F(this.validators,function(i,n){var r=Vi(e,function(a){return a.validator===n});r.length&&(t=t.concat(r))}),t},_updateBrokenRules(e){if(this._validationInfo.result){var t=this._validationInfo.result.brokenRules,i=Vi(t,function(n){return n.validator!==e.validator});e.brokenRules&&(t=i.concat(e.brokenRules)),this._validationInfo.result.brokenRules=this._orderBrokenRules(t)}},_onValidatorStatusChanged(e){if(e.status===ei.pending){this._addPendingValidator(e.validator);return}this._resolveIfComplete(e)},_resolveIfComplete(e){if(this._removePendingValidator(e.validator),this._updateBrokenRules(e),!this._pendingValidators.length){if(this._unsubscribeFromAllChangeEvents(),!this._validationInfo.result)return;this._validationInfo.result.status=this._validationInfo.result.brokenRules.length===0?ei.valid:ei.invalid,this._validationInfo.result.isValid=this._validationInfo.result.status===ei.valid;var t=O({},this._validationInfo.result,{complete:null}),i=this._validationInfo.deferred;this._validationInfo.deferred=null,this._raiseValidatedEvent(t),i&&setTimeout(()=>{i.resolve(t)})}},_raiseValidatedEvent(e){this._eventsStrategy.fireEvent("validated",[e])},_resetValidationInfo(){this._validationInfo={result:null,deferred:null}},_synchronizeValidationInfo(){this._validationInfo.result&&(this._validationInfo.result.validators=this.validators)},removeRegisteredValidator(e){var t=this.validators.indexOf(e);t>-1&&(this.validators.splice(t,1),this._synchronizeValidationInfo(),this._resolveIfComplete({validator:e}))},registerValidator(e){this.validators.includes(e)||(this.validators.push(e),this._synchronizeValidationInfo())},reset(){F(this.validators,function(e,t){t.reset()}),this._pendingValidators=[],this._resetValidationInfo()},on(e,t){return this._eventsStrategy.on(e,t),this},off(e,t){return this._eventsStrategy.off(e,t),this}}),pt={groups:[],getGroupConfig(e){var t=Vi(this.groups,function(i){return i.group===e});if(t.length)return t[0]},findGroup(e,t){var i=e.parents(".dx-validationgroup").first();return i.length?i.dxValidationGroup("instance"):t},initGroups(){this.groups=[],this.addGroup()},addGroup(e){var t=this.getGroupConfig(e);return t||(t=new H3(e),this.groups.push(t)),t},removeGroup(e){var t=this.getGroupConfig(e),i=this.groups.indexOf(t);return i>-1&&this.groups.splice(i,1),t},_setDefaultMessage(e){var{rule:t,validator:i,name:n}=e;E(t.message)||(i.defaultFormattedMessage&&E(n)?t.message=i.defaultFormattedMessage(n):t.message=i.defaultMessage())},_addBrokenRule(e){var{result:t,rule:i}=e;t.brokenRule||(t.brokenRule=i),t.brokenRules||(t.brokenRules=[]),t.brokenRules.push(i)},validate(e,t,i){var n,r={name:i,value:e,brokenRule:null,brokenRules:null,isValid:!0,validationRules:t,pendingRules:null,status:ei.valid,complete:null},a=t==null||(n=t[0])===null||n===void 0?void 0:n.validator,o=[];return F(t||[],(s,l)=>{var u=Wu[l.type],d;if(u){if(E(l.isValid)&&l.value===e&&!l.reevaluate)return l.isValid?!0:(r.isValid=!1,this._addBrokenRule({result:r,rule:l}),!1);if(l.value=e,l.type==="async")return o.push({rule:l,ruleValidator:u}),!0;if(d=u.validate(e,l),l.isValid=d,d||(r.isValid=!1,this._setDefaultMessage({rule:l,validator:u,name:i}),this._addBrokenRule({result:r,rule:l})),!l.isValid)return!1}else throw _t.Error("E0100")}),r.isValid&&!r.brokenRules&&o.length&&(r=this._validateAsyncRules({value:e,items:o,result:r,name:i})),this._synchronizeGroupValidationInfo(a,r),r.status=r.pendingRules?ei.pending:r.isValid?ei.valid:ei.invalid,r},_synchronizeGroupValidationInfo(e,t){var i;if(e){var n=pt.getGroupConfig(e._validationGroup);n._updateBrokenRules.call(n,{validator:e,brokenRules:(i=t.brokenRules)!==null&&i!==void 0?i:[]})}},_validateAsyncRules(e){var{result:t,value:i,items:n,name:r}=e,a=[];return F(n,(o,s)=>{var l=s.ruleValidator.validate(i,s.rule);if(!xu(l))this._updateRuleConfig({rule:s.rule,ruleResult:this._getPatchedRuleResult(l),validator:s.ruleValidator,name:r});else{t.pendingRules||(t.pendingRules=[]),t.pendingRules.push(s.rule);var u=l.then(d=>{var c=this._getPatchedRuleResult(d);return this._updateRuleConfig({rule:s.rule,ruleResult:c,validator:s.ruleValidator,name:r}),c});a.push(u)}}),a.length&&(t.complete=Promise.all(a).then(o=>this._getAsyncRulesResult({result:t,values:o}))),t},_updateRuleConfig(e){var{rule:t,ruleResult:i,validator:n,name:r}=e;t.isValid=i.isValid,i.isValid||(E(i.message)&&Me(i.message)&&i.message.length?t.message=i.message:this._setDefaultMessage({rule:t,validator:n,name:r}))},_getPatchedRuleResult(e){var t;return He(e)?(t=O({},e),E(t.isValid)||(t.isValid=!0)):t={isValid:Ss(e)?e:!0},t},_getAsyncRulesResult(e){var{values:t,result:i}=e;return F(t,(n,r)=>{if(r.isValid===!1){i.isValid=r.isValid;var a=i.pendingRules[n];this._addBrokenRule({result:i,rule:a})}}),i.pendingRules=null,i.complete=null,i.status=i.isValid?ei.valid:ei.invalid,i},registerValidatorInGroup(e,t){var i=pt.addGroup(e);i.registerValidator.call(i,t)},_shouldRemoveGroup(e,t){var i=e===void 0,n=e&&e.NAME==="dxValidationGroup";return!i&&!n&&!t.length},removeRegisteredValidator(e,t){var i=pt.getGroupConfig(e);if(i){i.removeRegisteredValidator.call(i,t);var n=i.validators;this._shouldRemoveGroup(e,n)&&this.removeGroup(e)}},initValidationOptions(e){var t={};return e&&["isValid","validationStatus","validationError","validationErrors"].forEach(i=>{i in e&&O(t,this.synchronizeValidationOptions({name:i,value:e[i]},e))}),t},synchronizeValidationOptions(e,t){var{name:i,value:n}=e;switch(i){case"validationStatus":var r=n===ei.valid||n===ei.pending;return t.isValid!==r?{isValid:r}:{};case"isValid":var{validationStatus:a}=t,o=a;return n&&a===ei.invalid?o=ei.valid:!n&&a!==ei.invalid&&(o=ei.invalid),o!==a?{validationStatus:o}:{};case"validationErrors":var s=!n||!n.length?null:n[0];return t.validationError!==s?{validationError:s}:{};case"validationError":var{validationErrors:l}=t;if(!n&&l)return{validationErrors:null};if(n&&!l)return{validationErrors:[n]};if(n&&l&&n!==l[0])return l[0]=n,{validationErrors:l.slice()}}return{}},validateGroup(e){var t=pt.getGroupConfig(e);if(!t)throw _t.Error("E0110");return t.validate()},resetGroup(e){var t=pt.getGroupConfig(e);if(!t)throw _t.Error("E0110");return t.reset()}};pt.initGroups();var yd="dx-invalid-message",$3="dx-invalid-message-auto",W3="dx-invalid-message-always",z3="dx-invalid-message-content",G3=100,Um=zn.inherit({_getDefaultOptions(){return O(this.callBase(),{integrationOptions:{},templatesRenderAsynchronously:!1,shading:!1,width:"auto",height:"auto",hideOnOutsideClick:!1,animation:null,visible:!0,propagateOutsideClick:!0,_checkParentVisibility:!1,rtlEnabled:!1,contentTemplate:this._renderInnerHtml,maxWidth:"100%",container:this.$element(),target:void 0,mode:"auto",validationErrors:void 0,positionRequest:void 0,boundary:void 0,offset:{h:0,v:0},contentId:void 0})},_init(){this.callBase(),this.updateMaxWidth(),this._updatePosition()},_initMarkup(){this.callBase(),this._ensureMessageNotEmpty(),this._updatePositionByTarget(),this._toggleModeClass(),this._updateContentId()},_updatePositionByTarget:function(){var{target:e}=this.option();this.option("position.of",e)},_ensureMessageNotEmpty:function(){this._textMarkup=this._getTextMarkup();var e=this.option("visible")&&this._textMarkup;this._toggleVisibilityClasses(e)},_toggleVisibilityClasses:function(e){e?(this.$element().addClass(yd),this.$wrapper().addClass(yd)):(this.$element().removeClass(yd),this.$wrapper().removeClass(yd))},_updateContentId(){var{container:e,contentId:t}=this.option(),i=t??v(e).attr("aria-describedby");this.$content().addClass(z3).attr("id",i)},_renderInnerHtml(e){var t=e&&v(e);t==null||t.html(this._textMarkup)},_getTextMarkup(){var e,t=(e=this.option("validationErrors"))!==null&&e!==void 0?e:[],i="";return t.forEach(n=>{var r,a=i?"<br />":"";i+=a+Vg((r=n==null?void 0:n.message)!==null&&r!==void 0?r:"")}),i},_toggleModeClass(){var e=this.option("mode");this.$wrapper().toggleClass($3,e==="auto").toggleClass(W3,e==="always")},updateMaxWidth(){var e=this.option("target"),t=lt(e),i="100%";t&&(i=Math.max(t,G3)),this.option({maxWidth:i})},_updatePosition:function(){var{positionRequest:e,rtlEnabled:t,offset:i,boundary:n}=this.option(),r=wa(t),a=e==="below"?[" top"," bottom"]:[" bottom"," top"];t&&(i.h=-i.h),e!=="below"&&(i.v=-i.v),this.option("position",{offset:i,boundary:n,my:r+a[0],at:r+a[1],collision:"none flip"})},_optionChanged(e){var{name:t,value:i}=e;switch(t){case"target":this._updatePositionByTarget(),this.updateMaxWidth(),this.callBase(e);break;case"boundary":this.option("position.boundary",i);break;case"mode":this._toggleModeClass(i);break;case"rtlEnabled":case"offset":case"positionRequest":this._updatePosition();break;case"container":this._updateContentId(),this.callBase(e);break;case"contentId":this._updateContentId();break;case"validationErrors":this._ensureMessageNotEmpty(),this._renderInnerHtml(this.$content());break;default:this.callBase(e)}}});tt("dxValidationMessage",Um);var yx="dx-invalid-message-auto",U3="dx-state-readonly",K3="dx-invalid",j3="dx-show-invalid-badge",xx="dx-validation-target",q3="valid",bx="invalid",Y3="editorReadOnly",X3=["outlined","filled","underlined"],Sx={validationMessageMode:"mode",validationMessageOffset:"offset",validationBoundary:"boundary"},Gn=pi.inherit({ctor:function(){this.showValidationMessageTimeout=null,this.validationRequest=dt(),this.callBase.apply(this,arguments)},_createElement:function(e){this.callBase(e);var t=this.$element();t&&Mt(t[0],xx,this)},_initOptions:function(e){this.callBase.apply(this,arguments),this.option(pt.initValidationOptions(e))},_init:function(){this.callBase(),this._options.cache("validationTooltipOptions",this.option("validationTooltipOptions"));var e=this.$element();e.addClass(j3)},_getDefaultOptions:function(){return O(this.callBase(),{value:null,name:"",onValueChanged:null,readOnly:!1,isValid:!0,validationError:null,validationErrors:null,validationStatus:q3,validationMessageMode:"auto",validationBoundary:void 0,validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})},_attachKeyboardEvents:function(){this.option("readOnly")||this.callBase()},_setOptionsByReference:function(){this.callBase(),O(this._optionsByReference,{validationError:!0})},_createValueChangeAction:function(){this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})},_suppressValueChangeAction:function(){this._valueChangeActionSuppressed=!0},_resumeValueChangeAction:function(){this._valueChangeActionSuppressed=!1},_initMarkup:function(){var e;this._toggleReadOnlyState(),this._setSubmitElementName(this.option("name")),this.callBase(),this._renderValidationState(),(e=this.option("_onMarkupRendered"))===null||e===void 0||e()},_raiseValueChangeAction:function(e,t){this._valueChangeAction||this._createValueChangeAction(),this._valueChangeAction(this._valueChangeArgs(e,t))},_valueChangeArgs:function(e,t){return{value:e,previousValue:t,event:this._valueChangeEventInstance}},_saveValueChangeEvent:function(e){this._valueChangeEventInstance=e},_focusInHandler:function(e){var t=this.option("validationMessageMode")==="auto";if(this._canValueBeChangedByClick()&&t){var i,n=(i=this._validationMessage)===null||i===void 0?void 0:i.$wrapper();n==null||n.removeClass(yx),clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>n==null?void 0:n.addClass(yx),150)}return this.callBase(e)},_canValueBeChangedByClick:function(){return!1},_getStylingModePrefix:function(){return"dx-editor-"},_renderStylingMode:function(){var e=this.option("stylingMode"),t=this._getStylingModePrefix(),i=X3.map(o=>t+o);i.forEach(o=>this.$element().removeClass(o));var n=t+e;if(i.indexOf(n)===-1){var r=this._getDefaultOptions().stylingMode,a=this._convertRulesToOptions(this._defaultOptionsRules()).stylingMode;n=t+(a||r)}this.$element().addClass(n)},_getValidationErrors:function(){var e=this.option("validationErrors");return!e&&this.option("validationError")&&(e=[this.option("validationError")]),e},_disposeValidationMessage:function(){this._$validationMessage&&(this._$validationMessage.remove(),this.setAria("describedby",null),this._$validationMessage=void 0,this._validationMessage=void 0)},_toggleValidationClasses:function(e){this.$element().toggleClass(K3,e),this.setAria(bx,e||void 0)},_renderValidationState:function(){var e=this.option("isValid")&&this.option("validationStatus")!==bx,t=this._getValidationErrors(),i=this.$element();if(this._toggleValidationClasses(!e),!!Ke()&&(this._disposeValidationMessage(),!e&&t)){var{validationMessageMode:n,validationMessageOffset:r,validationBoundary:a,rtlEnabled:o}=this.option();this._$validationMessage=v("<div>").appendTo(i);var s="dx-".concat(new ri);this.setAria("describedby",s),this._validationMessage=new Um(this._$validationMessage,O({validationErrors:t,rtlEnabled:o,target:this._getValidationMessageTarget(),visualContainer:i,mode:n,positionRequest:"below",offset:r,boundary:a,contentId:s},this._options.cache("validationTooltipOptions"))),this._bindInnerWidgetOptions(this._validationMessage,"validationTooltipOptions")}},_getValidationMessageTarget:function(){return this.$element()},_toggleReadOnlyState:function(){var e=this.option("readOnly");this._toggleBackspaceHandler(e),this.$element().toggleClass(U3,!!e),this.setAria("readonly",e||void 0)},_toggleBackspaceHandler:function(e){var t=this._keyboardEventBindingTarget(),i=me("keydown",Y3);D.off(t,i),e&&D.on(t,i,n=>{Nt(n)==="backspace"&&n.preventDefault()})},_dispose:function(){var e=this.$element()[0];Mt(e,xx,null),clearTimeout(this.showValidationMessageTimeout),this._disposeValidationMessage(),this.callBase()},_setSubmitElementName:function(e){var t=this._getSubmitElement();t&&(e.length>0?t.attr("name",e):t.removeAttr("name"))},_getSubmitElement:function(){return null},_setValidationMessageOption:function(e){var t,{name:i,value:n}=e,r=Sx[i]?Sx[i]:i;(t=this._validationMessage)===null||t===void 0||t.option(r,n)},_hasActiveElement:ee,_optionChanged:function(e){var t;switch(e.name){case"onValueChanged":this._createValueChangeAction();break;case"readOnly":this._toggleReadOnlyState(),this._refreshFocusState();break;case"value":e.value!=e.previousValue&&this.validationRequest.fire({value:e.value,editor:this}),this._valueChangeActionSuppressed||(this._raiseValueChangeAction(e.value,e.previousValue),this._saveValueChangeEvent(void 0));break;case"width":this.callBase(e),(t=this._validationMessage)===null||t===void 0||t.updateMaxWidth();break;case"name":this._setSubmitElementName(e.value);break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(pt.synchronizeValidationOptions(e,this.option())),this._renderValidationState();break;case"validationBoundary":case"validationMessageMode":case"validationMessageOffset":this._setValidationMessageOption(e);break;case"rtlEnabled":this._setValidationMessageOption(e),this.callBase(e);break;case"validationTooltipOptions":this._innerWidgetOptionChanged(this._validationMessage,e);break;default:this.callBase(e)}},blur:function(){this._hasActiveElement()&&Ns()},reset:function(){var e=this._getDefaultOptions();this.option("value",e.value)}});Gn.isEditor=e=>e instanceof Gn;class Gh{constructor(t,i,n){this.instance=null,this.$container=null,this.$placeMarker=null,this.editor=i,this.name=t,this.options=n||{}}_addPlaceMarker(t){this.$placeMarker=v("<div>").appendTo(t)}_addToContainer(t){var{$placeMarker:i,$container:n}=this;i?i.replaceWith(t):t.appendTo(n)}_attachEvents(){throw"Not implemented"}_create(){throw"Not implemented"}_isRendered(){return!!this.instance}_isVisible(){var{editor:t,options:i}=this;return i.visible||!t.option("readOnly")}_isDisabled(){throw"Not implemented"}_shouldRender(){return this._isVisible()&&!this._isRendered()}dispose(){var{instance:t,$placeMarker:i}=this;t&&(t.dispose?t.dispose():t.remove(),this.instance=null),i&&i.remove()}render(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.$container;if(this.$container=t,this._isVisible()){var{instance:i,$element:n}=this._create();this.instance=i,this._attachEvents(i,n)}else this._addPlaceMarker(t)}update(){return this._shouldRender()&&this.render(),!!this.instance}}var Z3=ut.down,Q3="dx-state-invisible",J3="dx-clear-button-area",e5="dx-icon-clear",t5="dx-icon",i5="dx-show-clear-button";class n5 extends Gh{_create(){var t=v("<span>").addClass(J3).append(v("<span>").addClass(t5).addClass(e5));return this._addToContainer(t),this.update(!0),{instance:t,$element:t}}_isVisible(){var{editor:t}=this;return t._isClearButtonVisible()}_attachEvents(t,i){var{editor:n}=this,r=n.NAME;D.on(i,me(Z3,r),a=>{a.preventDefault(),a.pointerType!=="mouse"&&n._clearValueHandler(a)}),D.on(i,me(ct,r),a=>n._clearValueHandler(a))}_legacyRender(t,i){t.toggleClass(i5,i)}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;!t&&super.update();var{editor:i,instance:n}=this,r=i.$element(),a=this._isVisible();n&&n.toggleClass(Q3,!a),this._legacyRender(r,a)}}var lu=Array.isArray;function rh(e){var t=typeof e;return t==="string"||t==="number"}function vt(e){return e==null}function uu(e){return e===null||e===!1||e===!0||e===void 0}function Ut(e){return typeof e=="function"}function du(e){return typeof e=="string"}function r5(e){return typeof e=="number"}function Ui(e){return e===null}function a5(e){return e===void 0}function Ta(e,t){var i={};if(e)for(var n in e)i[n]=e[n];if(t)for(var r in t)i[r]=t[r];return i}function Km(e){return!Ui(e)&&typeof e=="object"}var Ci={},o5="$F";function jm(e){return e.substr(2).toLowerCase()}function LD(e,t){e.appendChild(t)}function qm(e,t,i){Ui(i)?LD(e,t):e.insertBefore(t,i)}function s5(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function l5(e,t,i){e.replaceChild(t,i)}function PD(e,t){e.removeChild(t)}function FD(e){for(var t=0;t<e.length;t++)e[t]()}function u5(e,t,i){var n=e.children;return i&4?n.$LI:i&8192?e.childFlags===2?n:n[t?0:n.length-1]:n}function An(e,t){for(var i;e;){if(i=e.flags,i&2033)return e.dom;e=u5(e,t,i)}return null}function zu(e,t){do{var i=e.flags;if(i&2033){PD(t,e.dom);return}var n=e.children;if(i&4&&(e=n.$LI),i&8&&(e=n),i&8192)if(e.childFlags===2)e=n;else{for(var r=0,a=n.length;r<a;++r)zu(n[r],t);return}}while(e)}function MD(e,t,i){do{var n=e.flags;if(n&2033){qm(t,e.dom,i);return}var r=e.children;if(n&4&&(e=r.$LI),n&8&&(e=r),n&8192)if(e.childFlags===2)e=r;else{for(var a=0,o=r.length;a<o;++a)MD(r[a],t,i);return}}while(e)}function VD(e,t,i){return e.constructor.getDerivedStateFromProps?Ta(i,e.constructor.getDerivedStateFromProps(t,i)):i}var cu={v:!1},Ex={componentComparator:null,createVNode:null,renderComplete:null};function jl(e,t){e.textContent=t}function ND(e,t){return Km(e)&&e.event===t.event&&e.data===t.data}function HD(e,t){for(var i in t)a5(e[i])&&(e[i]=t[i]);return e}function Ym(e,t){return!!Ut(e)&&(e(t),!0)}var ql="$";function Uh(e,t,i,n,r,a,o,s){this.childFlags=e,this.children=t,this.className=i,this.dom=null,this.flags=n,this.key=r===void 0?null:r,this.props=a===void 0?null:a,this.ref=o===void 0?null:o,this.type=s}function qt(e,t,i,n,r,a,o,s){var l=r===void 0?1:r,u=new Uh(l,n,i,e,o,a,s,t);return l===0&&WD(u,u.children),u}function d5(e,t,i){if(e&4)return i;var n=(e&32768?t.render:t).defaultHooks;return vt(n)?i:vt(i)?n:HD(i,n)}function c5(e,t,i){var n=(e&32768?t.render:t).defaultProps;return vt(n)?i:vt(i)?Ta(n,null):HD(i,n)}function h5(e,t){return e&12?e:t.prototype&&t.prototype.render?4:t.render?32776:8}function Et(e,t,i,n,r){e=h5(e,t);var a=new Uh(1,null,null,e,n,c5(e,t,i),d5(e,t,r),t);return a}function Gu(e,t){return new Uh(1,vt(e)||e===!0||e===!1?"":e,null,16,t,null,null,null)}function jr(e,t,i){var n=qt(8192,8192,null,e,t,null,i,null);switch(n.childFlags){case 1:n.children=Kh(),n.childFlags=2;break;case 16:n.children=[Gu(e)],n.childFlags=4;break}return n}function nn(e){var t=e.props;if(t){var i=e.flags;i&481&&(t.children!==void 0&&vt(e.children)&&WD(e,t.children),t.className!==void 0&&(vt(e.className)&&(e.className=t.className||null),t.className=void 0)),t.key!==void 0&&(e.key=t.key,t.key=void 0),t.ref!==void 0&&(i&8?e.ref=Ta(e.ref,t.ref):e.ref=t.ref,t.ref=void 0)}return e}function f5(e){var t=e.children,i=e.childFlags;return jr(i===2?yi(t):t.map(yi),i,e.key)}function yi(e){var t=e.flags&-16385,i=e.props;if(t&14&&!Ui(i)){var n=i;i={};for(var r in n)i[r]=n[r]}return t&8192?f5(e):new Uh(e.childFlags,e.children,e.className,t,e.key,i,e.ref,e.type)}function Kh(){return Gu("",null)}function $D(e,t,i,n){for(var r=e.length;i<r;i++){var a=e[i];if(!uu(a)){var o=n+ql+i;if(lu(a))$D(a,t,0,o);else{if(rh(a))a=Gu(a,o);else{var s=a.key,l=du(s)&&s[0]===ql;(a.flags&81920||l)&&(a=yi(a)),a.flags|=65536,l?s.substring(0,n.length)!==n&&(a.key=n+s):Ui(s)?a.key=o:a.key=n+s}t.push(a)}}}}function p5(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case o5:return 8192;default:return 1}}function WD(e,t){var i,n=1;if(uu(t))i=t;else if(rh(t))n=16,i=t;else if(lu(t)){for(var r=t.length,a=0;a<r;++a){var o=t[a];if(uu(o)||lu(o)){i=i||t.slice(0,a),$D(t,i,a,"");break}else if(rh(o))i=i||t.slice(0,a),i.push(Gu(o,ql+a));else{var s=o.key,l=(o.flags&81920)>0,u=Ui(s),d=du(s)&&s[0]===ql;l||u||d?(i=i||t.slice(0,a),(l||d)&&(o=yi(o)),(u||d)&&(o.key=ql+a),i.push(o)):i&&i.push(o),o.flags|=65536}}i=i||t,i.length===0?n=1:n=8}else i=t,i.flags|=65536,t.flags&81920&&(i=yi(t)),n=2;return e.children=i,e.childFlags=n,e}function jh(e){return uu(e)||rh(e)?Gu(e,null):lu(e)?jr(e,0,null):e.flags&16384?yi(e):e}var Fa="http://www.w3.org/1999/xlink",_p="http://www.w3.org/XML/1998/namespace",wx={"xlink:actuate":Fa,"xlink:arcrole":Fa,"xlink:href":Fa,"xlink:role":Fa,"xlink:show":Fa,"xlink:title":Fa,"xlink:type":Fa,"xml:base":_p,"xml:lang":_p,"xml:space":_p};function qh(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var zD=qh(0),Q_=qh(null),GD=qh(!0);function Ix(e,t){var i=t.$EV;return i||(i=t.$EV=qh(null)),i[e]||++zD[e]===1&&(Q_[e]=b5(e)),i}function UD(e,t){var i=t.$EV;i&&i[e]&&(--zD[e]===0&&(document.removeEventListener(jm(e),Q_[e]),Q_[e]=null),i[e]=null)}function v5(e,t,i,n){if(Ut(i))Ix(e,n)[e]=i;else if(Km(i)){if(ND(t,i))return;Ix(e,n)[e]=i}else UD(e,n)}function _5(e){return Ut(e.composedPath)?e.composedPath()[0]:e.target}function KD(e,t,i,n){var r=_5(e);do{if(t&&r.disabled)return;var a=r.$EV;if(a){var o=a[i];if(o&&(n.dom=r,o.event?o.event(o.data,e):o(e),e.cancelBubble))return}r=r.parentNode}while(!Ui(r))}function g5(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function m5(){return this.defaultPrevented}function C5(){return this.cancelBubble}function jD(e){var t={dom:document};return e.isDefaultPrevented=m5,e.isPropagationStopped=C5,e.stopPropagation=g5,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function y5(e){return function(t){if(t.button!==0){t.stopPropagation();return}KD(t,!0,e,jD(t))}}function x5(e){return function(t){KD(t,!1,e,jD(t))}}function b5(e){var t=e==="onClick"||e==="onDblClick"?y5(e):x5(e);return document.addEventListener(jm(e),t),t}function S5(e,t){var i=document.createElement("i");return i.innerHTML=t,i.innerHTML===e.innerHTML}function Tx(e,t,i){if(e[t]){var n=e[t];n.event?n.event(n.data,i):n(i)}else{var r=t.toLowerCase();e[r]&&e[r](i)}}function Uu(e,t){var i=function(n){var r=this.$V;if(r){var a=r.props||Ci,o=r.dom;if(du(e))Tx(a,e,n);else for(var s=0;s<e.length;++s)Tx(a,e[s],n);if(Ut(t)){var l=this.$V,u=l.props||Ci;t(u,o,!1,l)}}};return Object.defineProperty(i,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),i}function oo(e,t,i){var n="$"+t,r=e[n];if(r){if(r[1].wrapped)return;e.removeEventListener(r[0],r[1]),e[n]=null}Ut(i)&&(e.addEventListener(t,i),e[n]=[t,i])}function Xm(e){return e==="checkbox"||e==="radio"}var E5=Uu("onInput",Zm),w5=Uu(["onClick","onChange"],Zm);function qD(e){e.stopPropagation()}qD.wrapped=!0;function I5(e,t){Xm(t.type)?(oo(e,"change",w5),oo(e,"click",qD)):oo(e,"input",E5)}function Zm(e,t){var i=e.type,n=e.value,r=e.checked,a=e.multiple,o=e.defaultValue,s=!vt(n);i&&i!==t.type&&t.setAttribute("type",i),!vt(a)&&a!==t.multiple&&(t.multiple=a),!vt(o)&&!s&&(t.defaultValue=o+""),Xm(i)?(s&&(t.value=n),vt(r)||(t.checked=r)):s&&t.value!==n?(t.defaultValue=n,t.value=n):vt(r)||(t.checked=r)}function Rl(e,t){if(e.type==="option")T5(e,t);else{var i=e.children,n=e.flags;if(n&4)Rl(i.$LI,t);else if(n&8)Rl(i,t);else if(e.childFlags===2)Rl(i,t);else if(e.childFlags&12)for(var r=0,a=i.length;r<a;++r)Rl(i[r],t)}}function T5(e,t){var i=e.props||Ci,n=e.dom;n.value=i.value,i.value===t||lu(t)&&t.indexOf(i.value)!==-1?n.selected=!0:(!vt(t)||!vt(i.selected))&&(n.selected=i.selected||!1)}var A5=Uu("onChange",YD);function D5(e){oo(e,"change",A5)}function YD(e,t,i,n){var r=!!e.multiple;!vt(e.multiple)&&r!==t.multiple&&(t.multiple=r);var a=e.selectedIndex;a===-1&&(t.selectedIndex=-1);var o=n.childFlags;if(o!==1){var s=e.value;r5(a)&&a>-1&&t.options[a]&&(s=t.options[a].value),i&&vt(s)&&(s=e.defaultValue),Rl(n,s)}}var O5=Uu("onInput",XD),R5=Uu("onChange");function k5(e,t){oo(e,"input",O5),t.onChange&&oo(e,"change",R5)}function XD(e,t,i){var n=e.value,r=t.value;if(vt(n)){if(i){var a=e.defaultValue;!vt(a)&&a!==r&&(t.defaultValue=a,t.value=a)}}else r!==n&&(t.defaultValue=n,t.value=n)}function ZD(e,t,i,n,r,a){e&64?Zm(n,i):e&256?YD(n,i,r,t):e&128&&XD(n,i,r),a&&(i.$V=t)}function B5(e,t,i){e&64?I5(t,i):e&256?D5(t):e&128&&k5(t,i)}function QD(e){return e.type&&Xm(e.type)?!vt(e.checked):!vt(e.value)}function xi(){return{current:null}}function ah(e){e&&!Ym(e,null)&&e.current&&(e.current=null)}function Ku(e,t,i){e&&(Ut(e)||e.current!==void 0)&&i.push(function(){!Ym(e,t)&&e.current!==void 0&&(e.current=t)})}function Hn(e,t){Pr(e),zu(e,t)}function Pr(e){var t=e.flags,i=e.children,n;if(t&481){n=e.ref;var r=e.props;ah(n);var a=e.childFlags;if(!Ui(r))for(var o=Object.keys(r),s=0,l=o.length;s<l;s++){var u=o[s];GD[u]&&UD(u,e.dom)}a&12?hu(i):a===2&&Pr(i)}else i&&(t&4?(Ut(i.componentWillUnmount)&&i.componentWillUnmount(),ah(e.ref),i.$UN=!0,Pr(i.$LI)):t&8?(n=e.ref,!vt(n)&&Ut(n.onComponentWillUnmount)&&n.onComponentWillUnmount(An(e,!0),e.props||Ci),Pr(i)):t&1024?Hn(i,e.ref):t&8192&&e.childFlags&12&&hu(i))}function hu(e){for(var t=0,i=e.length;t<i;++t)Pr(e[t])}function yc(e){e.textContent=""}function xc(e,t,i){hu(i),t.flags&8192?zu(t,e):yc(e)}function L5(e){var t=e.event;return function(i){t(e.data,i)}}function P5(e,t,i,n){if(Km(i)){if(ND(t,i))return;i=L5(i)}oo(n,jm(e),i)}function F5(e,t,i){if(vt(t)){i.removeAttribute("style");return}var n=i.style,r,a;if(du(t)){n.cssText=t;return}if(!vt(e)&&!du(e)){for(r in t)a=t[r],a!==e[r]&&n.setProperty(r,a);for(r in e)vt(t[r])&&n.removeProperty(r)}else for(r in t)a=t[r],n.setProperty(r,a)}function M5(e,t,i,n){var r=e&&e.__html||"",a=t&&t.__html||"";r!==a&&!vt(a)&&!S5(n,a)&&(Ui(i)||(i.childFlags&12?hu(i.children):i.childFlags===2&&Pr(i.children),i.children=null,i.childFlags=1),n.innerHTML=a)}function J_(e,t,i,n,r,a,o){switch(e){case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":case"selectedIndex":break;case"autoFocus":n.autofocus=!!i;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":n[e]=!!i;break;case"defaultChecked":case"value":case"volume":if(a&&e==="value")break;var s=vt(i)?"":i;n[e]!==s&&(n[e]=s);break;case"style":F5(t,i,n);break;case"dangerouslySetInnerHTML":M5(t,i,o,n);break;default:GD[e]?v5(e,t,i,n):e.charCodeAt(0)===111&&e.charCodeAt(1)===110?P5(e,t,i,n):vt(i)?n.removeAttribute(e):r&&wx[e]?n.setAttributeNS(wx[e],e,i):n.setAttribute(e,i);break}}function JD(e,t,i,n,r){var a=!1,o=(t&448)>0;o&&(a=QD(i),a&&B5(t,n,i));for(var s in i)J_(s,null,i[s],n,r,a,null);o&&ZD(t,e,n,i,!0,a)}function eO(e,t,i){var n=jh(e.render(t,e.state,i)),r=i;return Ut(e.getChildContext)&&(r=Ta(i,e.getChildContext())),e.$CX=r,n}function tO(e,t,i,n,r,a){var o=new t(i,n),s=o.$N=!!(t.getDerivedStateFromProps||o.getSnapshotBeforeUpdate);if(o.$SVG=r,o.$L=a,e.children=o,o.$BS=!1,o.context=n,o.props===Ci&&(o.props=i),s)o.state=VD(o,i,o.state);else if(Ut(o.componentWillMount)){o.$BR=!0,o.componentWillMount();var l=o.$PS;if(!Ui(l)){var u=o.state;if(Ui(u))o.state=l;else for(var d in l)u[d]=l[d];o.$PS=null}o.$BR=!1}return o.$LI=eO(o,i,n),o}function Qm(e,t){var i=e.props||Ci;return e.flags&32768?e.type.render(i,e.ref,t):e.type(i,t)}function bi(e,t,i,n,r,a){var o=e.flags|=16384;o&481?nO(e,t,i,n,r,a):o&4?H5(e,t,i,n,r,a):o&8?($5(e,t,i,n,r,a),aO(e,a)):o&512||o&16?iO(e,t,r):o&8192?N5(e,i,t,n,r,a):o&1024&&V5(e,i,t,r,a)}function V5(e,t,i,n,r){bi(e.children,e.ref,t,!1,null,r);var a=Kh();iO(a,i,n),e.dom=a.dom}function N5(e,t,i,n,r,a){var o=e.children,s=e.childFlags;s&12&&o.length===0&&(s=e.childFlags=2,o=e.children=Kh()),s===2?bi(o,i,t,n,r,a):so(o,i,t,n,r,a)}function iO(e,t,i){var n=e.dom=document.createTextNode(e.children);Ui(t)||qm(t,n,i)}function nO(e,t,i,n,r,a){var o=e.flags,s=e.props,l=e.className,u=e.childFlags,d=e.dom=s5(e.type,n=n||(o&32)>0),c=e.children;if(!vt(l)&&l!==""&&(n?d.setAttribute("class",l):d.className=l),u===16)jl(d,c);else if(u!==1){var h=n&&e.type!=="foreignObject";u===2?(c.flags&16384&&(e.children=c=yi(c)),bi(c,d,i,h,null,a)):(u===8||u===4)&&so(c,d,i,h,null,a)}Ui(t)||qm(t,d,r),Ui(s)||JD(e,o,s,d,n),Ku(e.ref,d,a)}function so(e,t,i,n,r,a){for(var o=0;o<e.length;++o){var s=e[o];s.flags&16384&&(e[o]=s=yi(s)),bi(s,t,i,n,r,a)}}function H5(e,t,i,n,r,a){var o=tO(e,e.type,e.props||Ci,i,n,a);bi(o.$LI,t,o.$CX,n,r,a),rO(e.ref,o,a)}function $5(e,t,i,n,r,a){bi(e.children=jh(Qm(e,i)),t,i,n,r,a)}function W5(e){return function(){e.componentDidMount()}}function rO(e,t,i){Ku(e,t,i),Ut(t.componentDidMount)&&i.push(W5(t))}function z5(e,t){return function(){e.onComponentDidMount(An(t,!0),t.props||Ci)}}function aO(e,t){var i=e.ref;vt(i)||(Ym(i.onComponentWillMount,e.props||Ci),Ut(i.onComponentDidMount)&&t.push(z5(i,e)))}function G5(e,t,i,n,r,a){Pr(e),t.flags&e.flags&2033?(bi(t,null,n,r,null,a),l5(i,t.dom,e.dom)):(bi(t,i,n,r,An(e,!0),a),zu(e,i))}function zr(e,t,i,n,r,a,o){var s=t.flags|=16384;e.flags!==s||e.type!==t.type||e.key!==t.key||s&2048?e.flags&16384?G5(e,t,i,n,r,o):bi(t,i,n,r,a,o):s&481?Y5(e,t,n,r,s,o):s&4?Q5(e,t,i,n,r,a,o):s&8?J5(e,t,i,n,r,a,o):s&16?e6(e,t):s&512?t.dom=e.dom:s&8192?j5(e,t,i,n,r,o):q5(e,t,n,o)}function U5(e,t,i){e!==t&&(e!==""?i.firstChild.nodeValue=t:jl(i,t))}function K5(e,t){e.textContent!==t&&(e.textContent=t)}function j5(e,t,i,n,r,a){var o=e.children,s=t.children,l=e.childFlags,u=t.childFlags,d=null;u&12&&s.length===0&&(u=t.childFlags=2,s=t.children=Kh());var c=(u&2)!==0;if(l&12){var h=o.length;(l&8&&u&8||c||!c&&s.length>h)&&(d=An(o[h-1],!1).nextSibling)}Jm(l,u,o,s,i,n,r,d,e,a)}function q5(e,t,i,n){var r=e.ref,a=t.ref,o=t.children;if(Jm(e.childFlags,t.childFlags,e.children,o,r,i,!1,null,e,n),t.dom=e.dom,r!==a&&!uu(o)){var s=o.dom;PD(r,s),LD(a,s)}}function Y5(e,t,i,n,r,a){var o=t.dom=e.dom,s=e.props,l=t.props,u=!1,d=!1,c;if(n=n||(r&32)>0,s!==l){var h=s||Ci;if(c=l||Ci,c!==Ci){u=(r&448)>0,u&&(d=QD(c));for(var f in c){var p=h[f],g=c[f];p!==g&&J_(f,p,g,o,n,d,e)}}if(h!==Ci)for(var m in h)vt(c[m])&&!vt(h[m])&&J_(m,h[m],null,o,n,d,e)}var C=t.children,x=t.className;e.className!==x&&(vt(x)?o.removeAttribute("class"):n?o.setAttribute("class",x):o.className=x),r&4096?K5(o,C):Jm(e.childFlags,t.childFlags,e.children,C,o,i,n&&t.type!=="foreignObject",null,e,a),u&&ZD(r,t,o,c,!1,d);var T=t.ref,R=e.ref;R!==T&&(ah(R),Ku(T,o,a))}function X5(e,t,i,n,r,a){Pr(e),so(t,i,n,r,An(e,!0),a),zu(e,i)}function Jm(e,t,i,n,r,a,o,s,l,u){switch(e){case 2:switch(t){case 2:zr(i,n,r,a,o,s,u);break;case 1:Hn(i,r);break;case 16:Pr(i),jl(r,n);break;default:X5(i,n,r,a,o,u);break}break;case 1:switch(t){case 2:bi(n,r,a,o,s,u);break;case 1:break;case 16:jl(r,n);break;default:so(n,r,a,o,s,u);break}break;case 16:switch(t){case 16:U5(i,n,r);break;case 2:yc(r),bi(n,r,a,o,s,u);break;case 1:yc(r);break;default:yc(r),so(n,r,a,o,s,u);break}break;default:switch(t){case 16:hu(i),jl(r,n);break;case 2:xc(r,l,i),bi(n,r,a,o,s,u);break;case 1:xc(r,l,i);break;default:var d=i.length|0,c=n.length|0;d===0?c>0&&so(n,r,a,o,s,u):c===0?xc(r,l,i):t===8&&e===8?i6(i,n,r,a,o,d,c,s,l,u):t6(i,n,r,a,o,d,c,s,u);break}break}}function Z5(e,t,i,n,r){r.push(function(){e.componentDidUpdate(t,i,n)})}function oO(e,t,i,n,r,a,o,s,l){var u=e.state,d=e.props,c=!!e.$N,h=Ut(e.shouldComponentUpdate);if(c&&(t=VD(e,i,t!==u?Ta(u,t):t)),o||!h||h&&e.shouldComponentUpdate(i,t,r)){!c&&Ut(e.componentWillUpdate)&&e.componentWillUpdate(i,t,r),e.props=i,e.state=t,e.context=r;var f=null,p=eO(e,i,r);c&&Ut(e.getSnapshotBeforeUpdate)&&(f=e.getSnapshotBeforeUpdate(d,u)),zr(e.$LI,p,n,e.$CX,a,s,l),e.$LI=p,Ut(e.componentDidUpdate)&&Z5(e,d,u,f,l)}else e.props=i,e.state=t,e.context=r}function Q5(e,t,i,n,r,a,o){var s=t.children=e.children;if(!Ui(s)){s.$L=o;var l=t.props||Ci,u=t.ref,d=e.ref,c=s.state;if(!s.$N){if(Ut(s.componentWillReceiveProps)){if(s.$BR=!0,s.componentWillReceiveProps(l,n),s.$UN)return;s.$BR=!1}Ui(s.$PS)||(c=Ta(c,s.$PS),s.$PS=null)}oO(s,c,l,i,n,r,!1,a,o),d!==u&&(ah(d),Ku(u,s,o))}}function J5(e,t,i,n,r,a,o){var s=!0,l=t.props||Ci,u=t.ref,d=e.props,c=!vt(u),h=e.children;if(c&&Ut(u.onComponentShouldUpdate)&&(s=u.onComponentShouldUpdate(d,l)),s!==!1){c&&Ut(u.onComponentWillUpdate)&&u.onComponentWillUpdate(d,l);var f=jh(Qm(t,n));zr(h,f,i,n,r,a,o),t.children=f,c&&Ut(u.onComponentDidUpdate)&&u.onComponentDidUpdate(d,l)}else t.children=h}function e6(e,t){var i=t.children,n=t.dom=e.dom;i!==e.children&&(n.nodeValue=i)}function t6(e,t,i,n,r,a,o,s,l){for(var u=a>o?o:a,d=0,c,h;d<u;++d)c=t[d],h=e[d],c.flags&16384&&(c=t[d]=yi(c)),zr(h,c,i,n,r,s,l),e[d]=c;if(a<o)for(d=u;d<o;++d)c=t[d],c.flags&16384&&(c=t[d]=yi(c)),bi(c,i,n,r,s,l);else if(a>o)for(d=u;d<a;++d)Hn(e[d],i)}function i6(e,t,i,n,r,a,o,s,l,u){var d=a-1,c=o-1,h=0,f=e[h],p=t[h],g,m;e:{for(;f.key===p.key;){if(p.flags&16384&&(t[h]=p=yi(p)),zr(f,p,i,n,r,s,u),e[h]=p,++h,h>d||h>c)break e;f=e[h],p=t[h]}for(f=e[d],p=t[c];f.key===p.key;){if(p.flags&16384&&(t[c]=p=yi(p)),zr(f,p,i,n,r,s,u),e[d]=p,d--,c--,h>d||h>c)break e;f=e[d],p=t[c]}}if(h>d){if(h<=c)for(g=c+1,m=g<o?An(t[g],!0):s;h<=c;)p=t[h],p.flags&16384&&(t[h]=p=yi(p)),++h,bi(p,i,n,r,m,u)}else if(h>c)for(;h<=d;)Hn(e[h++],i);else n6(e,t,n,a,o,d,c,h,i,r,s,l,u)}function n6(e,t,i,n,r,a,o,s,l,u,d,c,h){var f,p,g,m=0,C=s,x=s,T=a-s+1,R=o-s+1,A=new Int32Array(R+1),H=T===n,$=!1,V=0,U=0;if(r<4||(T|R)<32)for(m=C;m<=a;++m)if(f=e[m],U<R){for(s=x;s<=o;s++)if(p=t[s],f.key===p.key){if(A[s-x]=m+1,H)for(H=!1;C<m;)Hn(e[C++],l);V>s?$=!0:V=s,p.flags&16384&&(t[s]=p=yi(p)),zr(f,p,l,i,u,d,h),++U;break}!H&&s>o&&Hn(f,l)}else H||Hn(f,l);else{var K={};for(m=x;m<=o;++m)K[t[m].key]=m;for(m=C;m<=a;++m)if(f=e[m],U<R)if(s=K[f.key],s!==void 0){if(H)for(H=!1;m>C;)Hn(e[C++],l);A[s-x]=m+1,V>s?$=!0:V=s,p=t[s],p.flags&16384&&(t[s]=p=yi(p)),zr(f,p,l,i,u,d,h),++U}else H||Hn(f,l);else H||Hn(f,l)}if(H)xc(l,c,e),so(t,l,i,u,d,h);else if($){var X=r6(A);for(s=X.length-1,m=R-1;m>=0;m--)A[m]===0?(V=m+x,p=t[V],p.flags&16384&&(t[V]=p=yi(p)),g=V+1,bi(p,l,i,u,g<r?An(t[g],!0):d,h)):s<0||m!==X[s]?(V=m+x,p=t[V],g=V+1,MD(p,l,g<r?An(t[g],!0):d)):s--}else if(U!==R)for(m=R-1;m>=0;m--)A[m]===0&&(V=m+x,p=t[V],p.flags&16384&&(t[V]=p=yi(p)),g=V+1,bi(p,l,i,u,g<r?An(t[g],!0):d,h))}var yr,xd,Ax=0;function r6(e){var t=0,i=0,n=0,r=0,a=0,o=0,s=0,l=e.length;for(l>Ax&&(Ax=l,yr=new Int32Array(l),xd=new Int32Array(l));i<l;++i)if(t=e[i],t!==0){if(n=yr[r],e[n]<t){xd[i]=n,yr[++r]=i;continue}for(a=0,o=r;a<o;)s=a+o>>1,e[yr[s]]<t?a=s+1:o=s;t<e[yr[a]]&&(a>0&&(xd[i]=yr[a-1]),yr[a]=i)}a=r+1;var u=new Int32Array(a);for(o=yr[a-1];a-- >0;)u[a]=o,o=xd[o],yr[a]=0;return u}var a6=typeof document<"u";a6&&window.Node&&(Node.prototype.$EV=null,Node.prototype.$V=null);function o6(e,t,i,n){var r=[],a=t.$V;cu.v=!0,vt(a)?vt(e)||(e.flags&16384&&(e=yi(e)),bi(e,t,n,!1,null,r),t.$V=e,a=e):vt(e)?(Hn(a,t),t.$V=null):(e.flags&16384&&(e=yi(e)),zr(a,e,t,n,!1,null,r),a=t.$V=e),FD(r),cu.v=!1,Ut(i)&&i(),Ut(Ex.renderComplete)&&Ex.renderComplete(a,t)}function Yh(e,t,i,n){i===void 0&&(i=null),n===void 0&&(n=Ci),o6(e,t,i,n)}var bc=[],s6=typeof Promise<"u"?Promise.resolve().then.bind(Promise.resolve()):function(e){window.setTimeout(e,0)},eg=!1;function sO(e,t,i,n){var r=e.$PS;if(Ut(t)&&(t=t(r?Ta(e.state,r):e.state,e.props,e.context)),vt(r))e.$PS=t;else for(var a in t)r[a]=t[a];if(e.$BR)Ut(i)&&e.$L.push(i.bind(e));else{if(!cu.v&&bc.length===0){uO(e,n),Ut(i)&&i.call(e);return}if(bc.indexOf(e)===-1&&bc.push(e),n&&(e.$F=!0),eg||(eg=!0,s6(lO)),Ut(i)){var o=e.$QU;o||(o=e.$QU=[]),o.push(i)}}}function l6(e){for(var t=e.$QU,i=0;i<t.length;++i)t[i].call(e);e.$QU=null}function lO(){var e;for(eg=!1;e=bc.shift();)if(!e.$UN){var t=e.$F;e.$F=!1,uO(e,t),e.$QU&&l6(e)}}function uO(e,t){if(t||!e.$BR){var i=e.$PS;e.$PS=null;var n=[];cu.v=!0,oO(e,Ta(e.state,i),e.props,An(e.$LI,!0).parentNode,e.context,e.$SVG,t,null,n),FD(n),cu.v=!1}else e.state=e.$PS,e.$PS=null}var ju=function(t,i){this.state=null,this.$BR=!1,this.$BS=!0,this.$PS=null,this.$LI=null,this.$UN=!1,this.$CX=null,this.$QU=null,this.$N=!1,this.$L=null,this.$SVG=!1,this.$F=!1,this.props=t||Ci,this.context=i||Ci};ju.prototype.forceUpdate=function(t){this.$UN||sO(this,{},t,!0)};ju.prototype.setState=function(t,i){this.$UN||this.$BS||sO(this,t,i,!1)};ju.prototype.render=function(t,i,n){return null};process.env.NODE_ENV!=="production"&&console.warn("You are running production build of Inferno in development mode. Use dev:module entry point.");const ra={lockCount:0,lock(){this.lockCount++},callbacks:[],callEffects(){if(this.lockCount--,this.lockCount<0)throw new Error("Unexpected Effect Call");if(this.lockCount===0){const e=this.callbacks;this.callbacks=[],e.forEach(t=>t())}}},gp=(e,t)=>{if(!(e instanceof Object&&t instanceof Object))return e===t;const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:!n.some(o=>e[o]!==t[o])};class Ln extends ju{constructor(){super(...arguments),this._pendingContext=this.context}componentWillReceiveProps(t,i){this._pendingContext=i??{}}shouldComponentUpdate(t,i){return!gp(this.props,t)||!gp(this.state,i)||!gp(this.context,this._pendingContext)}}class fr extends Ln{constructor(){super(...arguments),this._effects=[]}createEffects(){return[]}updateEffects(){}componentWillMount(){ra.lock()}componentWillUpdate(t,i,n){ra.lock()}componentDidMount(){ra.callbacks.push(()=>{this._effects=this.createEffects()}),ra.callEffects()}componentDidUpdate(){ra.callbacks.push(()=>this.updateEffects()),ra.callEffects()}destroyEffects(){this._effects.forEach(t=>t.dispose())}componentWillUnmount(){this.destroyEffects()}}class qu extends fr{constructor(){super(...arguments),this.vDomElement=null}vDomUpdateClasses(){const t=this.vDomElement,i=t.className.length?t.className.split(" "):[],n=i.filter(a=>t.dxClasses.previous.indexOf(a)<0),r=t.dxClasses.previous.filter(a=>i.indexOf(a)<0);n.forEach(a=>{const o=t.dxClasses.removed.indexOf(a);o>-1?t.dxClasses.removed.splice(o,1):t.dxClasses.added.includes(a)||t.dxClasses.added.push(a)}),r.forEach(a=>{const o=t.dxClasses.added.indexOf(a);o>-1?t.dxClasses.added.splice(o,1):t.dxClasses.removed.includes(a)||t.dxClasses.removed.push(a)})}componentDidMount(){const t=An(this.$LI,!0);this.vDomElement=t,super.componentDidMount(),t.dxClasses=t.dxClasses||{removed:[],added:[],previous:[]},t.dxClasses.previous=t!=null&&t.className.length?t.className.split(" "):[]}componentDidUpdate(){super.componentDidUpdate();const t=this.vDomElement;t!==null&&(t.dxClasses.added.forEach(i=>t.classList.add(i)),t.dxClasses.removed.forEach(i=>t.classList.remove(i)),t.dxClasses.previous=t.className.length?t.className.split(" "):[])}shouldComponentUpdate(t,i){const n=super.shouldComponentUpdate(t,i);return n&&this.vDomUpdateClasses(),n}}let u6=0;const dO=function(e){const t=u6++;return{id:t,defaultValue:e,Provider:class extends ju{getChildContext(){return Object.assign(Object.assign({},this.context),{[t]:this.props.value||e})}render(){return this.props.children}}}};class Rt{constructor(t,i){this.dependency=i,this.effect=t,this.destroy=t()}update(t){const i=this.dependency;t&&(this.dependency=t),(!t||t.some((n,r)=>i[r]!==n))&&(this.dispose(),this.destroy=this.effect())}dispose(){this.destroy&&this.destroy()}}const Yu=()=>new Rt(()=>{lO()},[]),d6="a runtime error occured! Use Inferno in development environment to find the error.";function c6(e){return e==null}function h6(e){return e===null||e===!1||e===!0||e===void 0}function ps(e){return e===null}function f6(e){throw e||(e=d6),new Error(`Inferno Error: ${e}`)}function p6(e,t){const i=document.createElement("i");return i.innerHTML=t,i.innerHTML===e.innerHTML}function v6(e){let t,i;for(;e;){if(t=e.flags,t&2033)return e.dom;i=e.children,t&8192?e=e.childFlags===2?i:i[i.length-1]:t&4?e=i.$LI:e=i}return null}function _6(e,t){return!!(t&&t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html&&p6(e,t.dangerouslySetInnerHTML.__html))}function g6(e,t,i,n,r,a,o){const s=e.type,l=e.ref,u=e.props||Ci;let d;if(a){const c=tO(e,s,u,n,r,o),h=c.$LI;d=fu(h,t,i,c.$CX,r,o),rO(l,c,o)}else{const c=jh(Qm(e,n));d=fu(c,t,i,n,r,o),e.children=c,aO(e,o)}return d}function cO(e,t,i,n,r,a){const o=e.childFlags,s=e.children,l=e.props,u=e.flags;if(o!==1){if(o===2)ps(i)?bi(s,t,n,r,null,a):(i=fu(s,t,i,n,r,a),i=i?i.nextSibling:null);else if(o===16)ps(i)?t.appendChild(document.createTextNode(s)):t.childNodes.length!==1||i.nodeType!==3?t.textContent=s:i.nodeValue!==s&&(i.nodeValue=s),i=null;else if(o&12){let d=!1;for(let c=0,h=s.length;c<h;++c){const f=s[c];ps(i)||d&&(f.flags&16)>0?bi(f,t,n,r,i,a):(i=fu(f,t,i,n,r,a),i=i?i.nextSibling:null),d=(f.flags&16)>0}}if(!(u&8192)){let d=null;for(;i;)d=i.nextSibling,t.removeChild(i),i=d}}else!ps(t.firstChild)&&!_6(t,l)&&(t.textContent="",u&448&&(t.defaultValue=""))}function m6(e,t,i,n,r,a){const o=e.props,s=e.className,l=e.flags,u=e.ref;return r=r||(l&32)>0,i.nodeType!==1?(nO(e,null,n,r,null,a),t.replaceChild(e.dom,i)):(e.dom=i,cO(e,i,i.firstChild,n,r,a),ps(o)||JD(e,l,o,i,r),c6(s)?i.className!==""&&i.removeAttribute("class"):r?i.setAttribute("class",s):i.className=s,Ku(u,i,a)),e.dom}function hO(e,t,i){if(i.nodeType!==3)t.replaceChild(e.dom=document.createTextNode(e.children),i);else{const n=e.children;i.nodeValue!==n&&(i.nodeValue=n),e.dom=i}return e.dom}function C6(e,t,i,n,r,a){const o=e.children;return e.childFlags===2?(hO(o,t,i),o.dom):(cO(e,t,i,n,r,a),v6(o[o.length-1]))}function fu(e,t,i,n,r,a){const o=e.flags|=16384;return o&14?g6(e,t,i,n,r,(o&4)>0,a):o&481?m6(e,t,i,n,r,a):o&16?hO(e,t,i):o&512?e.dom=i:o&8192?C6(e,t,i,n,r,a):(f6(),null)}function y6(e,t,i){let n=t.firstChild;if(ps(n))Yh(e,t,i);else{const r=[];for(h6(e)||(n=fu(e,t,n,{},!1,r));n&&(n=n.nextSibling);)t.removeChild(n);if(r.length>0){let a;for(;(a=r.shift())!==void 0;)a()}}t.$V=e}function Dx(e){return e==null}function x6(e){return typeof e=="string"}function Ox(e){return e===void 0}var b6={onComponentDidMount:1,onComponentDidUpdate:1,onComponentShouldUpdate:1,onComponentWillMount:1,onComponentWillUnmount:1,onComponentWillUpdate:1};function Sc(e,t,i){var n=arguments,r,a=null,o=null,s=null,l=0,u,d=arguments.length-2;if(d===1)r=i;else if(d>1)for(r=[];d-- >0;)r[d]=n[d+2];if(x6(e)){if(l=p5(e),!Dx(t)){u={};for(var c in t)c==="className"||c==="class"?s=t[c]:c==="key"?o=t.key:c==="children"&&Ox(r)?r=t.children:c==="ref"?a=t.ref:(c==="contenteditable"&&(l|=4096),u[c]=t[c])}}else{if(l=2,Ox(r)||(t||(t={}),t.children=r),!Dx(t)){u={};for(var h in t)h==="key"?o=t.key:h==="ref"?a=t.ref:b6[h]===1?(a||(a={}),a[h]=t[h]):u[h]=t[h]}return Et(l,e,u,o,a)}return l&8192?jr(d===1?[r]:r,0,o):qt(l,e,s,r,0,u,o,a)}const S6=e=>{var t,i;return((t=e.container)===null||t===void 0?void 0:t.get(0))||((i=e.item)===null||i===void 0?void 0:i.get(0))};function E6(e,t,i){setTimeout(()=>{Yh(Sc(e,t),S6(t))},0)}const w6=(e,t,i)=>{const n=t[e];return!!n&&typeof n!="string"},I6=new Set(["animationIterationCount","borderImageOutset","borderImageSlice","border-imageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","fillOpacity","flex","flexGrow","flexNegative","flexOrder","flexPositive","flexShrink","floodOpacity","fontWeight","gridColumn","gridRow","lineClamp","lineHeight","opacity","order","orphans","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),T6=e=>typeof e=="number"?!0:!Number.isNaN(Number(e)),A6=(e,t)=>I6.has(e)?t:`${t}px`,D6=/[A-Z]/g,O6=e=>e.replace(D6,"-$&").toLowerCase();function eC(e){if(e instanceof Object)return Object.entries(e).reduce((t,[i,n])=>(t[O6(i)]=T6(n)?A6(i,n):n,t),{})}var Rx=e=>{var{parentNode:t}=e;t&&(Eu(e),t.$V=e.$V,Yh(null,t),t.appendChild(e),e.innerHTML="",delete t.$V),delete e.$V};const Uo=kn({createElement:(e,t)=>Sc(e,t),remove:Rx,onAfterRender:()=>{ra.callEffects()},onPreRender:()=>{ra.lock()},render:(e,t,i,n)=>{if(n)Yh(Sc(e,t),i);else{var{parentNode:r}=i,a=i==null?void 0:i.nextSibling,o=fe.createElement("div");o.appendChild(i);var s=fe.createDocumentFragment().appendChild(o),l=!!i.$V;l&&Rx(i),y6(Sc(e,t),s),i.$V=s.$V,r&&r.insertBefore(i,a)}}});var R6=(e,t)=>Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(i=>e[i]===t[i]),k6=(e,t)=>{F(t,(i,n)=>{var r=!1;F(e,(a,o)=>{n===o&&(r=!0)}),!r&&n.parentNode&&n.parentNode.removeChild(n)})};class kx extends fr{constructor(t){super(t),this.renderTemplate=this.renderTemplate.bind(this)}renderTemplate(){var t,i=An(this.$LI,!0),n=i.parentNode,r=v(n),a=r.contents(),{data:o,index:s}=(t=this.props.model)!==null&&t!==void 0?t:{data:{}};o&&Object.keys(o).forEach(u=>{o[u]&&fe.isNode(o[u])&&(o[u]=Fe(v(o[u])))});var l=v(this.props.template.render(be({container:Fe(r),transclude:this.props.transclude},{renovated:this.props.renovated},this.props.transclude?{}:{model:o},!this.props.transclude&&Number.isFinite(s)?{index:s}:{})));return NV(v(i),l),()=>{k6(a,r.contents()),n.appendChild(i)}}shouldComponentUpdate(t){var{model:i,template:n}=this.props,{model:r,template:a}=t,o=n===a;if(!o)return!0;if(E(i)&&E(r)){var{data:s,index:l}=i,{data:u,index:d}=r;return l!==d||!R6(s,u)}var c=i===r;return!c}createEffects(){return[new Rt(this.renderTemplate,[this.props.template,this.props.model])]}updateEffects(){this._effects[0].update([this.props.template,this.props.model])}componentWillUnmount(){}render(){return null}}function mp(e){return Array.isArray(e)?[...e]:be({},e)}function fO(e,t,i){var n=i.length>0&&t&&e!==t?mp(t):mp(e),r=i[0];return i.length>1?n[r]=fO(e[r],t==null?void 0:t[r],i.slice(1)):r&&(Ye(e[r])?n[r]=mp(e[r]):n[r]=e[r]),n}function B6(e,t,i,n){var r=t[i],a=e[i],o=e;Ye(r)||i!==n&&Array.isArray(r)?o[i]=fO(r,a,So(n).slice(1)):o[i]=r}var Cp=(e,t)=>i=>{Object.prototype.hasOwnProperty.call(e,i)&&e[i]===void 0&&(e[i]=t(i))};class Xu extends hr{constructor(t,i){super(t,i),this._shouldRaiseContentReady=!1,this.validateKeyDownHandler()}get _propsInfo(){return{allowNull:[],twoWay:[],elements:[],templates:[],props:[]}}validateKeyDownHandler(){var t=this.getSupportedKeyNames(),i=t.length>0,n=typeof this._viewComponent.prototype.keyDown=="function";if(i&&!n)throw Error("Component's declaration must have 'keyDown' method.")}get viewRef(){var t;return(t=this._viewRef)===null||t===void 0?void 0:t.current}_checkContentReadyOption(t){var i=this._getContentReadyOptions().reduce((n,r)=>(n[r]=!0,n),{});return this._checkContentReadyOption=n=>!!i[n],this._checkContentReadyOption(t)}_getContentReadyOptions(){return["rtlEnabled"]}_fireContentReady(){this._actionsMap.onContentReady({})}_getDefaultOptions(){return O(!0,super._getDefaultOptions(),this._viewComponent.defaultProps,this._propsInfo.twoWay.reduce((t,i)=>{var[n,r,a]=i;return be({},t,{[n]:this._viewComponent.defaultProps[r],[a]:o=>this.option(n,o)})},{}),this._propsInfo.templates.reduce((t,i)=>be({},t,{[i]:null}),{}))}_initializeComponent(){var t;super._initializeComponent(),(t=this._templateManager)===null||t===void 0||t.addDefaultTemplates(this.getDefaultTemplates()),this._props=this._optionsWithDefaultTemplates(this.option()),this._propsInfo.templates.forEach(i=>{this._componentTemplates[i]=this._createTemplateComponent(this._props[i])}),Object.keys(this._getActionConfigsFull()).forEach(i=>this._addAction(i)),this._viewRef=xi(),this.defaultKeyHandlers=this._createDefaultKeyHandlers()}_initMarkup(){var t=this.getProps();this._renderWrapper(t)}_renderWrapper(t){var i=this.$element()[0];this._isNodeReplaced||Uo.onPreRender(),Uo.render(this._viewComponent,t,i,this._isNodeReplaced),this._isNodeReplaced||(this._isNodeReplaced=!0,Uo.onAfterRender(),this._shouldRaiseContentReady=!0),this._shouldRaiseContentReady&&(this._fireContentReady(),this._shouldRaiseContentReady=!1)}_silent(t,i){this._options.silent(t,i)}_render(){}_removeWidget(){Uo.remove(this.$element()[0])}_dispose(){this._removeWidget(),super._dispose()}get elementAttr(){if(!this._elementAttr){var{attributes:t}=this.$element()[0],i=Array.from(t).filter(o=>{var s;return!this._propsInfo.templates.includes(o.name)&&((s=t[o.name])===null||s===void 0?void 0:s.specified)}).reduce((o,s)=>{var{name:l,value:u}=s,d=o;return d[l]=u===""?"true":u,d},{});this._elementAttr=i,this._storedClasses=this.$element()[0].getAttribute("class")||""}for(var n=this.$element()[0].style,r={},a=0;a<n.length;a+=1)r[n[a]]=n.getPropertyValue(n[a]);return this._elementAttr.style=r,this._elementAttr.class=this._storedClasses,this._elementAttr}_getAdditionalActionConfigs(){return{onContentReady:{excludeValidators:["disabled","readOnly"]}}}_getAdditionalProps(){return[]}_patchOptionValues(t){var{allowNull:i,elements:n,props:r,twoWay:a}=this._propsInfo,o=Object.keys(this._viewComponent.defaultProps),s=this._getDefaultOptions(),{children:l,onKeyboardHandled:u,ref:d}=t,c=u?(f,p)=>{u(p)}:void 0,h={ref:d,children:l,onKeyDown:c};return[...r,...this._getAdditionalProps()].forEach(f=>{Object.prototype.hasOwnProperty.call(t,f)&&(h[f]=t[f])}),i.forEach(Cp(h,()=>null)),o.forEach(Cp(h,f=>s[f])),a.forEach(f=>{var[p,g]=f;Cp(h,()=>s[g])(p)}),n.forEach(f=>{if(f in h){var p=h[f];hn(p)&&(h[f]=this._patchElementParam(p))}}),h}getSupportedKeyNames(){return[]}prepareStyleProp(t){return typeof t.style=="string"?be({},t,{style:{},cssText:t.style}):t}getProps(){var t,i,{elementAttr:n}=this.option(),r=this._patchOptionValues(be({},this._props,{ref:this._viewRef,children:this._extractDefaultSlot(),aria:this._aria}));return this._propsInfo.templates.forEach(a=>{r[a]=this._componentTemplates[a]}),this.prepareStyleProp(be({},r,this.elementAttr,n,{className:[...((t=this.elementAttr.class)!==null&&t!==void 0?t:"").split(" "),...((i=n==null?void 0:n.class)!==null&&i!==void 0?i:"").split(" ")].filter((a,o,s)=>a&&s.indexOf(a)===o).join(" ").trim(),class:""},this._actionsMap))}_getActionConfigs(){return{}}_getActionConfigsFull(){return be({},this._getActionConfigs(),this._getAdditionalActionConfigs())}getDefaultTemplates(){var t=Object.values(this._templatesInfo),i={};return t.forEach(n=>{i[n]="dx-renovation-template-mock"}),i}get _templatesInfo(){return{}}_optionsWithDefaultTemplates(t){var i=Object.entries(this._templatesInfo).reduce((n,r)=>{var a,[o,s]=r;return be({},n,{[o]:(a=t[o])!==null&&a!==void 0?a:s})},{});return be({},t,i)}_init(){super._init(),this.customKeyHandlers={},this._actionsMap={},this._aria={},this._componentTemplates={}}_createDefaultKeyHandlers(){var t={},i=this.getSupportedKeyNames();return i.forEach(n=>{t[n]=r=>this.viewRef.keyDown(am.createKeyDownOptions(r))}),t}_addAction(t,i){var n=i;if(!n){var r=this._createActionByOption(t,this._getActionConfigsFull()[t]);n=a=>(Object.keys(a).forEach(o=>{E(a[o])&&fe.isNode(a[o])&&(a[o]=Fe(v(a[o])))}),r(a))}this._actionsMap[t]=n}_optionChanged(t){var{fullName:i,name:n,previousValue:r,value:a}=t;B6(this._props,this.option(),n,i),this._propsInfo.templates.includes(n)&&a!==r&&(this._componentTemplates[n]=this._createTemplateComponent(a)),n&&this._getActionConfigsFull()[n]&&this._addAction(n),this._shouldRaiseContentReady=this._shouldRaiseContentReady||this._checkContentReadyOption(i),super._optionChanged(t),this._invalidate()}_extractDefaultSlot(){return this.option("_hasAnonymousTemplateContent")?Uo.createElement(kx,{template:this._getTemplate(this._templateManager.anonymousTemplateName),transclude:!0,renovated:!0}):null}_createTemplateComponent(t){if(t){var i=this._getTemplate(t);if(!(Me(i)&&i==="dx-renovation-template-mock"))return n=>Uo.createElement(kx,{template:i,model:n})}}_wrapKeyDownHandler(t){return i=>{var{keyName:n,originalEvent:r,which:a}=i,o=this.customKeyHandlers,s=o[n]||o[a];if(s!==void 0){var l=s.bind(this),u=l(r,i);if(!u)return r.cancel=!0,r}return t==null?void 0:t(r,i)}}_toPublicElement(t){return Fe(v(t))}_patchElementParam(t){try{var i=v(t),n=i==null?void 0:i.get(0);return n!=null&&n.nodeType?n:t}catch{return t}}repaint(){this._isNodeReplaced=!1,this._shouldRaiseContentReady=!0,this._removeWidget(),this._refresh()}_supportedKeys(){return be({},this.defaultKeyHandlers,this.customKeyHandlers)}registerKeyHandler(t,i){this.customKeyHandlers[t]=i}setAria(t,i){this._aria[t]=i,this._initMarkup()}}Xu.IS_RENOVATED_WIDGET=!1;Xu.IS_RENOVATED_WIDGET=!0;class L6 extends Xu{get _validationGroupConfig(){return pt.getGroupConfig(this._findGroup())}getDefaultTemplateNames(){return["content"]}getSupportedKeyNames(){return["space","enter"]}getProps(){var t=super.getProps();t.onClick=n=>{var{event:r}=n;this._clickAction({event:r,validationGroup:this._validationGroupConfig})};var i=$u(t.icon);return i==="svg"&&(t.iconTemplate=this._createTemplateComponent(()=>t.icon)),t}get _templatesInfo(){return{template:"content"}}_toggleActiveState(t,i){var n=this.viewRef;i?n.activate():n.deactivate()}_getSubmitAction(){var t=!0,i="valid";return this._createAction(n=>{var{event:r,submitInput:a}=n;if(t){var o=this._validationGroupConfig;if(o!==void 0&&o!==""){var s=o.validate();i=s.status,s.status==="pending"&&(t=!1,this.option("disabled",!0),s.complete.then(l=>{var{status:u}=l;this.option("disabled",!1),i=u,i==="valid"&&a.click(),t=!0}))}}i!=="valid"&&r.preventDefault(),r.stopPropagation()})}_initializeComponent(){super._initializeComponent(),this._addAction("onSubmit",this._getSubmitAction()),this._clickAction=this._createClickAction()}_initMarkup(){super._initMarkup();var t=this.$element().find(".dx-button-content"),i=t.children().filter(".dx-template-wrapper"),n=t.children().filter(".dx-button-submit-input");i.length&&(i.addClass("dx-button-content"),i.append(n),t.replaceWith(i))}_patchOptionValues(t){return super._patchOptionValues(be({},t,{templateData:t._templateData}))}_findGroup(){var t=this.$element(),i=this.option("validationGroup");return i!==void 0&&i!==""?i:pt.findGroup(t,this._modelByElement(t))}_createClickAction(){return this._createActionByOption("onClick",{excludeValidators:["readOnly"]})}_optionChanged(t){switch(t.name){case"onClick":this._clickAction=this._createClickAction()}super._optionChanged(t)}}function Tn(e){return Object.keys(e).filter(t=>e[t]).join(" ")}var P6=["iconTemplate","position","source"],F6=e=>{var{iconClassName:t,props:{iconTemplate:i,source:n},sourceType:r}=e;return jr([r==="dxIcon"&&qt(1,"i",t),r==="fontIcon"&&qt(1,"i",t),r==="image"&&qt(1,"img",t,null,1,{alt:"",src:n}),i&&qt(1,"i",t,i({}),0)],0)},M6={position:"left",source:""},V6=e=>e&&(e.defaultProps?t=>nn(Et(2,e,be({},t))):e);class pO extends Ln{constructor(t){super(t),this.state={}}get sourceType(){return $u(this.props.source)}get cssClass(){return this.props.position!=="left"?"dx-icon-right":""}get iconClassName(){var t={"dx-icon":!0,[this.cssClass]:!!this.cssClass},{source:i}=this.props;return this.sourceType==="dxIcon"?Tn(be({},t,{["dx-icon-".concat(i)]:!0})):this.sourceType==="fontIcon"?Tn(be({},t,{[String(i)]:!!i})):this.sourceType==="image"?Tn(t):this.sourceType==="svg"?Tn(be({},t,{"dx-svg-icon":!0})):""}get restAttributes(){var t=this.props,i=Lt(t,P6);return i}render(){var t=this.props;return F6({props:be({},t,{iconTemplate:V6(t.iconTemplate)}),sourceType:this.sourceType,cssClass:this.cssClass,iconClassName:this.iconClassName,restAttributes:this.restAttributes})}}pO.defaultProps=M6;var N6=["config"],H6=e=>nn(qt(1,"div","dx-inkripple",null,1,be({},e.restAttributes))),$6={config:Object.freeze({})};class vO extends Ln{constructor(t){super(t),this.state={},this.__getterCache={},this.hideWave=this.hideWave.bind(this),this.showWave=this.showWave.bind(this)}get getConfig(){return this.__getterCache.getConfig!==void 0?this.__getterCache.getConfig:this.__getterCache.getConfig=(()=>{var{config:t}=this.props;return wD(t)})()}get restAttributes(){var t=this.props,i=Lt(t,N6);return i}hideWave(t){DD(this.getConfig,t)}showWave(t){TD(this.getConfig,t)}componentWillUpdate(t,i,n){this.props.config!==t.config&&(this.__getterCache.getConfig=void 0)}render(){var t=this.props;return H6({props:be({},t),getConfig:this.getConfig,restAttributes:this.restAttributes})}}vO.defaultProps=$6;function Ao(e){return(t,i,n,r)=>{var a=r?me(e,r):e;if(i)return D.on(t,a,n,i),()=>{D.off(t,a,i)}}}var W6=Ao(ct),z6=Ao("dxactive"),G6=Ao("dxinactive"),U6=Ao("dxhoverstart"),K6=Ao("dxhoverend"),j6=Ao("focusin"),q6=Ao("focusout"),Xh={className:"",activeStateEnabled:!1,disabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,tabIndex:0,visible:!0},Zh=dO(void 0),Y6=["children","rtlEnabled"],X6=e=>e.props.children,Z6={};class _O extends Ln{constructor(t){super(t),this.state={},this.__getterCache={}}getChildContext(){return be({},this.context,{ConfigContext:this.config})}get config(){return this.__getterCache.config!==void 0?this.__getterCache.config:this.__getterCache.config={rtlEnabled:this.props.rtlEnabled}}get restAttributes(){var t=this.props,i=Lt(t,Y6);return i}componentWillUpdate(t,i,n){this.props.rtlEnabled!==t.rtlEnabled&&(this.__getterCache.config=void 0)}render(){var t=this.props;return X6({props:be({},t),config:this.config,restAttributes:this.restAttributes})}}_O.defaultProps=Z6;function Q6(e,t){return e!==void 0?e:(t==null?void 0:t.rtlEnabled)!==void 0?t.rtlEnabled:It().rtlEnabled}function J6(e,t){var i=E(e),n=E(It().rtlEnabled)&&!i&&!E(t==null?void 0:t.rtlEnabled);return i&&e!==(t==null?void 0:t.rtlEnabled)||n}var eG=["_feedbackHideTimeout","_feedbackShowTimeout","accessKey","activeStateEnabled","activeStateUnit","addWidgetClass","aria","children","className","classes","cssText","disabled","focusStateEnabled","height","hint","hoverStateEnabled","name","onActive","onClick","onDimensionChanged","onFocusIn","onFocusOut","onHoverEnd","onHoverStart","onInactive","onKeyDown","onRootElementRendered","onVisibilityChange","rootElementRef","rtlEnabled","tabIndex","visible","width"],tG=400,iG=30,nG=e=>Object.keys(e).reduce((t,i)=>e[i]?be({},t,{[i==="role"||i==="id"?i:"aria-".concat(i)]:String(e[i])}):t,{}),rG=e=>{var t=nn(qt(1,"div",e.cssClasses,e.props.children,0,be({},e.attributes,{tabIndex:e.tabIndex,title:e.props.hint,style:eC(e.styles)}),null,e.widgetElementRef));return e.shouldRenderConfigProvider?Et(2,_O,{rtlEnabled:e.rtlEnabled,children:t}):t},oh=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(Xh),Object.getOwnPropertyDescriptors({_feedbackHideTimeout:tG,_feedbackShowTimeout:iG,cssText:"",aria:Object.freeze({}),classes:"",name:"",addWidgetClass:!0})));class Qh extends qu{constructor(t){super(t),this.widgetElementRef=xi(),this.state={active:!1,focused:!1,hovered:!1},this.setRootElementRef=this.setRootElementRef.bind(this),this.activeEffect=this.activeEffect.bind(this),this.inactiveEffect=this.inactiveEffect.bind(this),this.clickEffect=this.clickEffect.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.focusInEffect=this.focusInEffect.bind(this),this.focusOutEffect=this.focusOutEffect.bind(this),this.hoverStartEffect=this.hoverStartEffect.bind(this),this.hoverEndEffect=this.hoverEndEffect.bind(this),this.keyboardEffect=this.keyboardEffect.bind(this),this.resizeEffect=this.resizeEffect.bind(this),this.windowResizeEffect=this.windowResizeEffect.bind(this),this.visibilityEffect=this.visibilityEffect.bind(this),this.checkDeprecation=this.checkDeprecation.bind(this),this.applyCssTextEffect=this.applyCssTextEffect.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:Zh}createEffects(){return[new Rt(this.setRootElementRef,[]),new Rt(this.activeEffect,[this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),new Rt(this.inactiveEffect,[this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),new Rt(this.clickEffect,[this.props.disabled,this.props.name,this.props.onClick]),new Rt(this.focusInEffect,[this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),new Rt(this.focusOutEffect,[this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),new Rt(this.hoverStartEffect,[this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),new Rt(this.hoverEndEffect,[this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),new Rt(this.keyboardEffect,[this.props.focusStateEnabled,this.props.onKeyDown]),new Rt(this.resizeEffect,[this.props.name,this.props.onDimensionChanged]),new Rt(this.windowResizeEffect,[this.props.onDimensionChanged]),new Rt(this.visibilityEffect,[this.props.name,this.props.onVisibilityChange]),new Rt(this.checkDeprecation,[this.props.height,this.props.width]),new Rt(this.applyCssTextEffect,[this.props.cssText]),Yu()]}updateEffects(){var t,i,n,r,a,o,s,l,u,d,c,h,f;(t=this._effects[1])===null||t===void 0||t.update([this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),(i=this._effects[2])===null||i===void 0||i.update([this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),(n=this._effects[3])===null||n===void 0||n.update([this.props.disabled,this.props.name,this.props.onClick]),(r=this._effects[4])===null||r===void 0||r.update([this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),(a=this._effects[5])===null||a===void 0||a.update([this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),(o=this._effects[6])===null||o===void 0||o.update([this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),(s=this._effects[7])===null||s===void 0||s.update([this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),(l=this._effects[8])===null||l===void 0||l.update([this.props.focusStateEnabled,this.props.onKeyDown]),(u=this._effects[9])===null||u===void 0||u.update([this.props.name,this.props.onDimensionChanged]),(d=this._effects[10])===null||d===void 0||d.update([this.props.onDimensionChanged]),(c=this._effects[11])===null||c===void 0||c.update([this.props.name,this.props.onVisibilityChange]),(h=this._effects[12])===null||h===void 0||h.update([this.props.height,this.props.width]),(f=this._effects[13])===null||f===void 0||f.update([this.props.cssText])}setRootElementRef(){var{onRootElementRendered:t,rootElementRef:i}=this.props;i&&(i.current=this.widgetElementRef.current),t==null||t(this.widgetElementRef.current)}activeEffect(){var{_feedbackShowTimeout:t,activeStateEnabled:i,activeStateUnit:n,disabled:r,onActive:a}=this.props,o=n;if(i&&!r)return z6(this.widgetElementRef.current,s=>{this.setState(l=>({active:!0})),a==null||a(s)},{timeout:t,selector:o},"UIFeedback")}inactiveEffect(){var{_feedbackHideTimeout:t,activeStateEnabled:i,activeStateUnit:n,onInactive:r}=this.props,a=n;if(i)return G6(this.widgetElementRef.current,o=>{this.state.active&&(this.setState(s=>({active:!1})),r==null||r(o))},{timeout:t,selector:a},"UIFeedback")}clickEffect(){var{disabled:t,name:i,onClick:n}=this.props,r=i;if(n&&!t)return Ey.on(this.widgetElementRef.current,n,{namespace:r}),()=>Ey.off(this.widgetElementRef.current,{namespace:r})}focusInEffect(){var{disabled:t,focusStateEnabled:i,name:n,onFocusIn:r}=this.props,a="".concat(n,"Focus");if(i&&!t)return j6(this.widgetElementRef.current,o=>{o.isDefaultPrevented()||(this.setState(s=>({focused:!0})),r==null||r(o))},null,a)}focusOutEffect(){var{focusStateEnabled:t,name:i,onFocusOut:n}=this.props,r="".concat(i,"Focus");if(t)return q6(this.widgetElementRef.current,a=>{!a.isDefaultPrevented()&&this.state.focused&&(this.setState(o=>({focused:!1})),n==null||n(a))},null,r)}hoverStartEffect(){var{activeStateUnit:t,disabled:i,hoverStateEnabled:n,onHoverStart:r}=this.props,a=t;if(n&&!i)return U6(this.widgetElementRef.current,o=>{!this.state.active&&this.setState(s=>({hovered:!0})),r==null||r(o)},{selector:a},"UIFeedback")}hoverEndEffect(){var{activeStateUnit:t,hoverStateEnabled:i,onHoverEnd:n}=this.props,r=t;if(i)return K6(this.widgetElementRef.current,a=>{this.state.hovered&&(this.setState(o=>({hovered:!1})),n==null||n(a))},{selector:r},"UIFeedback")}keyboardEffect(){var{focusStateEnabled:t,onKeyDown:i}=this.props;if(t&&i){var n=ha.on(this.widgetElementRef.current,this.widgetElementRef.current,r=>i(r));return()=>ha.off(n)}}resizeEffect(){var t="".concat(this.props.name,"VisibilityChange"),{onDimensionChanged:i}=this.props;if(i)return Uc.on(this.widgetElementRef.current,i,{namespace:t}),()=>Uc.off(this.widgetElementRef.current,{namespace:t})}windowResizeEffect(){var{onDimensionChanged:t}=this.props;if(t)return co.add(t),()=>{co.remove(t)}}visibilityEffect(){var{name:t,onVisibilityChange:i}=this.props,n="".concat(t,"VisibilityChange");if(i)return Kc.on(this.widgetElementRef.current,()=>i(!0),()=>i(!1),{namespace:n}),()=>Kc.off(this.widgetElementRef.current,{namespace:n})}checkDeprecation(){var{height:t,width:i}=this.props;Ee(i)&&_t.log("W0017","width"),Ee(t)&&_t.log("W0017","height")}applyCssTextEffect(){var{cssText:t}=this.props;t!==""&&(this.widgetElementRef.current.style.cssText=t)}get shouldRenderConfigProvider(){var{rtlEnabled:t}=this.props;return J6(t,this.config)}get rtlEnabled(){var{rtlEnabled:t}=this.props;return Q6(t,this.config)}get attributes(){var{aria:t,disabled:i,focusStateEnabled:n,visible:r}=this.props,a=n&&!i&&this.props.accessKey;return be({},O({},this.restAttributes,a&&{accessKey:a}),nG(be({},t,{disabled:i,hidden:!r})))}get styles(){var{height:t,width:i}=this.props,n=this.restAttributes.style||{},r=ws("width",Ee(i)?i():i),a=ws("height",Ee(t)?t():t);return be({},n,{height:a??n.height,width:r??n.width})}get cssClasses(){var{activeStateEnabled:t,addWidgetClass:i,className:n,classes:r,disabled:a,focusStateEnabled:o,hoverStateEnabled:s,onVisibilityChange:l,visible:u}=this.props,d=!!o&&!a,c=!!s&&!a,h=!!t&&!a,f={"dx-widget":!!i,[String(r)]:!!r,[String(n)]:!!n,"dx-state-disabled":!!a,"dx-state-invisible":!u,"dx-state-focused":!!this.state.focused&&d,"dx-state-active":!!this.state.active&&h,"dx-state-hover":!!this.state.hovered&&c&&!this.state.active,"dx-rtl":!!this.rtlEnabled,"dx-visibility-change-handler":!!l};return Tn(f)}get tabIndex(){var{disabled:t,focusStateEnabled:i,tabIndex:n}=this.props,r=i&&!t;return r?n:void 0}get restAttributes(){var t=this.props,i=Lt(t,eG);return i}focus(){_c.trigger(this.widgetElementRef.current)}blur(){var t=fe.getActiveElement();this.widgetElementRef.current===t&&t.blur()}activate(){this.setState(t=>({active:!0}))}deactivate(){this.setState(t=>({active:!1}))}render(){var t=this.props;return rG({props:be({},t),active:this.state.active,focused:this.state.focused,hovered:this.state.hovered,widgetElementRef:this.widgetElementRef,config:this.config,shouldRenderConfigProvider:this.shouldRenderConfigProvider,rtlEnabled:this.rtlEnabled,attributes:this.attributes,styles:this.styles,cssClasses:this.cssClasses,tabIndex:this.tabIndex,restAttributes:this.restAttributes})}}Qh.defaultProps=oh;var aG=["accessKey","activeStateEnabled","children","className","disabled","focusStateEnabled","height","hint","hoverStateEnabled","icon","iconPosition","iconTemplate","onClick","onKeyDown","onSubmit","pressed","rtlEnabled","stylingMode","tabIndex","template","templateData","text","type","useInkRipple","useSubmitBehavior","visible","width"],oG=["outlined","text","contained"],sG=e=>{var{icon:t,iconPosition:i,stylingMode:n,text:r,type:a}=e,o=n&&oG.includes(n),s={"dx-button":!0,["dx-button-mode-".concat(o?n:"contained")]:!0,["dx-button-".concat(a??"normal")]:!0,"dx-button-has-text":!!r,"dx-button-has-icon":!!t,"dx-button-icon-right":i!=="left"};return Tn(s)},lG=e=>{var{children:t,iconPosition:i,iconTemplate:n,template:r,text:a}=e.props,o=!e.props.template&&!t&&a!=="",s=i==="left",l=!e.props.template&&!t&&(e.iconSource||e.props.iconTemplate)&&Et(2,pO,{source:e.iconSource,position:i,iconTemplate:n});return nn(Et(2,Qh,be({accessKey:e.props.accessKey,activeStateEnabled:e.props.activeStateEnabled,aria:e.aria,className:e.props.className,classes:e.cssClasses,disabled:e.props.disabled,focusStateEnabled:e.props.focusStateEnabled,height:e.props.height,hint:e.props.hint,hoverStateEnabled:e.props.hoverStateEnabled,onActive:e.onActive,onClick:e.onWidgetClick,onInactive:e.onInactive,onKeyDown:e.keyDown,rtlEnabled:e.props.rtlEnabled,tabIndex:e.props.tabIndex,visible:e.props.visible,width:e.props.width},e.restAttributes,{children:qt(1,"div","dx-button-content",[e.props.template&&r({data:e.buttonTemplateData}),!e.props.template&&t,s&&l,o&&qt(1,"span","dx-button-text",a,0),!s&&l,e.props.useSubmitBehavior&&qt(64,"input","dx-button-submit-input",null,1,{type:"submit",tabIndex:-1},null,e.submitInputRef),e.props.useInkRipple&&Et(2,vO,{config:e.inkRippleConfig},null,e.inkRippleRef)],0,null,null,e.contentRef)}),null,e.widgetRef))},uG=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(Xh),Object.getOwnPropertyDescriptors({activeStateEnabled:!0,hoverStateEnabled:!0,icon:"",iconPosition:"left",stylingMode:"contained",text:"",type:"normal",useInkRipple:!1,useSubmitBehavior:!1,templateData:Object.freeze({})}))),gO=OV([{device:()=>Oe.real().deviceType==="desktop"&&!Oe.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>Qt(Un()),options:{useInkRipple:!0}}]),Bx=e=>e&&(e.defaultProps?t=>nn(Et(2,e,be({},t))):e);let sh=class extends qu{constructor(t){super(t),this.state={},this.contentRef=xi(),this.inkRippleRef=xi(),this.submitInputRef=xi(),this.widgetRef=xi(),this.__getterCache={},this.focus=this.focus.bind(this),this.activate=this.activate.bind(this),this.deactivate=this.deactivate.bind(this),this.submitEffect=this.submitEffect.bind(this),this.onActive=this.onActive.bind(this),this.onInactive=this.onInactive.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this)}createEffects(){return[new Rt(this.submitEffect,[this.props.onSubmit,this.props.useSubmitBehavior]),Yu()]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props.onSubmit,this.props.useSubmitBehavior])}submitEffect(){var{onSubmit:t,useSubmitBehavior:i}=this.props;if(i&&t)return wy.on(this.submitInputRef.current,n=>t({event:n,submitInput:this.submitInputRef.current}),{namespace:"UIFeedback"}),()=>wy.off(this.submitInputRef.current,{namespace:"UIFeedback"})}onActive(t){var{useInkRipple:i}=this.props;i&&this.inkRippleRef.current.showWave({element:this.contentRef.current,event:t})}onInactive(t){var{useInkRipple:i}=this.props;i&&this.inkRippleRef.current.hideWave({element:this.contentRef.current,event:t})}onWidgetClick(t){var{onClick:i,useSubmitBehavior:n}=this.props;i==null||i({event:t}),n&&this.submitInputRef.current.click()}keyDown(t){var{onKeyDown:i}=this.props,{keyName:n,originalEvent:r,which:a}=t,o=i==null?void 0:i(t);if(o!=null&&o.cancel)return o;(n==="space"||a==="space"||n==="enter"||a==="enter")&&(r.preventDefault(),this.onWidgetClick(r))}get aria(){var{icon:t,text:i}=this.props,n=(i??"")||t;return!i&&t&&$u(t)==="image"&&(n=t.includes("base64")?"Base64":t.replace(/.+\/([^.]+)\..+$/,"$1")),be({role:"button"},n?{label:n}:{})}get cssClasses(){return sG(this.props)}get iconSource(){var{icon:t,type:i}=this.props;return t||i==="back"?(t??"")||"back":""}get inkRippleConfig(){return this.__getterCache.inkRippleConfig!==void 0?this.__getterCache.inkRippleConfig:this.__getterCache.inkRippleConfig=(()=>{var{icon:t,text:i,type:n}=this.props;return!i&&t||n==="back"?{isCentered:!0,useHoldAnimation:!1,waveSizeCoefficient:1}:{}})()}get buttonTemplateData(){var{icon:t,templateData:i,text:n}=this.props;return be({icon:t,text:n},i)}get restAttributes(){var t=this.props,i=Lt(t,aG);return i}focus(){this.widgetRef.current.focus()}activate(){this.widgetRef.current.activate()}deactivate(){this.widgetRef.current.deactivate()}componentWillUpdate(t,i,n){super.componentWillUpdate(),(this.props.icon!==t.icon||this.props.text!==t.text||this.props.type!==t.type)&&(this.__getterCache.inkRippleConfig=void 0)}render(){var t=this.props;return lG({props:be({},t,{template:Bx(t.template),iconTemplate:Bx(t.iconTemplate)}),contentRef:this.contentRef,submitInputRef:this.submitInputRef,inkRippleRef:this.inkRippleRef,widgetRef:this.widgetRef,onActive:this.onActive,onInactive:this.onInactive,onWidgetClick:this.onWidgetClick,keyDown:this.keyDown,aria:this.aria,cssClasses:this.cssClasses,iconSource:this.iconSource,inkRippleConfig:this.inkRippleConfig,buttonTemplateData:this.buttonTemplateData,restAttributes:this.restAttributes})}};sh.defaultProps=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(uG),Object.getOwnPropertyDescriptors(be({},Is(gO)))));var Lx=[];function dG(e){Lx.push(e),sh.defaultProps=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(sh.defaultProps),Object.getOwnPropertyDescriptors(Is(gO)),Object.getOwnPropertyDescriptors(Is(Lx))))}let Si=class extends L6{getProps(){var t=super.getProps();return t.onKeyDown=this._wrapKeyDownHandler(t.onKeyDown),t}focus(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.focus(...arguments)}activate(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.activate(...arguments)}deactivate(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.deactivate(...arguments)}_getActionConfigs(){return{onClick:{excludeValidators:["readOnly"]},onSubmit:{}}}get _propsInfo(){return{twoWay:[],allowNull:[],elements:["onSubmit"],templates:["template","iconTemplate"],props:["activeStateEnabled","hoverStateEnabled","icon","iconPosition","onClick","onSubmit","pressed","stylingMode","template","iconTemplate","text","type","useInkRipple","useSubmitBehavior","templateData","className","accessKey","disabled","focusStateEnabled","height","hint","onKeyDown","rtlEnabled","tabIndex","visible","width"]}}get _viewComponent(){return sh}};tt("dxButton",Si);Si.defaultOptions=dG;var Px="dx-custom-button-hovered";class cG extends Gh{_attachEvents(t,i){var{editor:n}=this;D.on(i,cm,()=>{n.$element().addClass(Px)}),D.on(i,Mh,()=>{n.$element().removeClass(Px)}),D.on(i,ct,r=>{r.stopPropagation()})}_create(){var{editor:t}=this,i=v("<div>");this._addToContainer(i);var n=t._createComponent(i,Si,O({},this.options,{ignoreParentReadOnly:!0,disabled:this._isDisabled(),integrationOptions:this._prepareIntegrationOptions(t)}));return{$element:i,instance:n}}_prepareIntegrationOptions(t){return O({},t.option("integrationOptions"),{skipTemplates:["content"]})}update(){var t=super.update();return this.instance&&this.instance.option("disabled",this._isDisabled()),t}_isVisible(){var{editor:t}=this;return t.option("visible")}_isDisabled(){var t=this.options.disabled!==void 0;return t?this.instance?this.instance.option("disabled"):this.options.disabled:this.editor.option("readOnly")}}var hG="dx-texteditor-buttons-container";function fG(e){(()=>{if(!e||typeof e!="object"||Array.isArray(e))throw Je.Error("E1053")})(),(()=>{if(!("name"in e))throw Je.Error("E1054")})(),(()=>{var{name:t}=e;if(typeof t!="string")throw Je.Error("E1055")})(),(()=>{var{location:t}=e;"location"in e&&t!=="after"&&t!=="before"&&(e.location="after")})()}function Fx(e,t){if(e.indexOf(t)!==-1)throw Je.Error("E1055",t);e.push(t)}function pG(e,t){return!!t.find(i=>i.name===e)}class vG{constructor(t,i){this.buttons=[],this.defaultButtonsInfo=i,this.editor=t}_compileButtonInfo(t){var i=[];return t.map(n=>{var r=typeof n=="string";r||fG(n);var a=r||pG(n.name,this.defaultButtonsInfo);if(a){var o=this.defaultButtonsInfo.find(l=>{var{name:u}=l;return u===n||u===n.name});if(!o)throw Je.Error("E1056",this.editor.NAME,n);return Fx(i,n),o}else{var{name:s}=n;return Fx(i,s),O(n,{Ctor:cG})}})}_createButton(t){var{Ctor:i,options:n,name:r}=t,a=new i(r,this.editor,n);return this.buttons.push(a),a}_renderButtons(t,i,n){var r=null,a=t?this._compileButtonInfo(t):this.defaultButtonsInfo;return a.forEach(o=>{var{location:s="after"}=o;s===n&&this._createButton(o).render((r=r||v("<div>").addClass(hG),n==="before"?i.prepend(r):i.append(r),r))}),r}clean(){this.buttons.forEach(t=>t.dispose()),this.buttons=[]}getButton(t){var i=this.buttons.find(n=>{var{name:r}=n;return r===t});return i&&i.instance}renderAfterButtons(t,i){return this._renderButtons(t,i,"after")}renderBeforeButtons(t,i){return this._renderButtons(t,i,"before")}updateButtons(t){this.buttons.forEach(i=>{(!t||t.indexOf(i.name)!==-1)&&i.update()})}}var Mx="dx-texteditor-label",Vx="dx-texteditor-with-label",Nx="dx-texteditor-with-floating-label",Hx="dx-texteditor-with-before-buttons",_G="dx-label-before",gG="dx-label",mG="dx-label-after";class CG{constructor(t){var{$editor:i,text:n,mode:r,mark:a,containsButtonsBefore:o,containerWidth:s,beforeWidth:l}=t;this._props={$editor:i,text:n,mode:r,mark:a,containsButtonsBefore:o,containerWidth:s,beforeWidth:l},this._id="".concat(Mx,"-").concat(new ri),this._render(),this._toggleMarkupVisibility()}_isVisible(){return!!this._props.text&&this._props.mode!=="hidden"}_render(){this._$before=v("<div>").addClass(_G),this._$labelSpan=v("<span>"),this._$label=v("<div>").addClass(gG).append(this._$labelSpan),this._$after=v("<div>").addClass(mG),this._$root=v("<div>").addClass(Mx).attr("id",this._id).append(this._$before).append(this._$label).append(this._$after),this._updateMark(),this._updateText(),this._updateBeforeWidth(),this._updateMaxWidth()}_toggleMarkupVisibility(){var t=this._isVisible();this._updateEditorBeforeButtonsClass(t),this._updateEditorLabelClass(t),t?this._$root.appendTo(this._props.$editor):this._$root.detach()}_updateEditorLabelClass(t){if(this._props.$editor.removeClass(Nx).removeClass(Vx),t){var i=this._props.mode==="floating"?Nx:Vx;this._props.$editor.addClass(i)}}_updateEditorBeforeButtonsClass(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._isVisible();if(this._props.$editor.removeClass(Hx),t){var i=this._props.containsButtonsBefore?Hx:"";this._props.$editor.addClass(i)}}_updateMark(){this._$labelSpan.attr("data-mark",this._props.mark)}_updateText(){this._$labelSpan.text(this._props.text)}_updateBeforeWidth(){this._$before.css({width:this._props.beforeWidth})}_updateMaxWidth(){this._$label.css({maxWidth:this._props.containerWidth})}$element(){return this._$root}isVisible(){return this._isVisible()}getId(){if(this._isVisible())return this._id}updateMode(t){this._props.mode=t,this._toggleMarkupVisibility()}updateText(t){this._props.text=t,this._updateText(),this._toggleMarkupVisibility()}updateMark(t){this._props.mark=t,this._updateMark()}updateContainsButtonsBefore(t){this._props.containsButtonsBefore=t,this._updateEditorBeforeButtonsClass()}updateBeforeWidth(t){this._props.beforeWidth=t,this._updateBeforeWidth()}updateMaxWidth(t){this._props.containerWidth=t,this._updateMaxWidth()}}var $x=qe(),yG={observe:ee,unobserve:ee,disconnect:ee};class xG{constructor(){if(!Ke()||!$x.ResizeObserver)return yG;this._callbacksMap=new Map,this._observer=new $x.ResizeObserver(t=>{t.forEach(i=>{var n;(n=this._callbacksMap.get(i.target))===null||n===void 0||n(i)})})}observe(t,i){this._callbacksMap.set(t,i),this._observer.observe(t)}unobserve(t){this._callbacksMap.delete(t),this._observer.unobserve(t)}disconnect(){this._callbacksMap.clear(),this._observer.disconnect()}}var lh=new xG,bG="dx-texteditor",SG="dx-texteditor-input-container",mO="dx-texteditor-input",EG="."+mO,wG="dx-texteditor-container",IG="dx-texteditor-buttons-container",Wx="dx-placeholder",TG="dx-texteditor-empty",AG="dx-state-invisible",DG="dx-pending-indicator",zx="dx-validation-pending",OG="dx-valid",bd=["KeyDown","KeyPress","KeyUp","Change","Cut","Copy","Paste","Input"],RG=["tab","enter","shift","control","alt","escape","pageUp","pageDown","end","home","leftArrow","upArrow","rightArrow","downArrow"],kG=CG;function Gx(e){if(E(e)&&!Array.isArray(e))throw Je.Error("E1053")}var BG=Gn.inherit({ctor:function(e,t){t&&Gx(t.buttons),this._buttonCollection=new vG(this,this._getDefaultButtons()),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._labelContainerElement=null,this.callBase.apply(this,arguments)},_getDefaultOptions:function(){return O(this.callBase(),{buttons:void 0,value:"",spellcheck:!1,showClearButton:!1,valueChangeEvent:"change",placeholder:"",inputAttr:{},onFocusIn:null,onFocusOut:null,onKeyDown:null,onKeyUp:null,onChange:null,onInput:null,onCut:null,onCopy:null,onPaste:null,onEnterKey:null,mode:"text",hoverStateEnabled:!0,focusStateEnabled:!0,text:void 0,displayValueFormatter:function(e){return E(e)&&e!==!1?e:""},stylingMode:It().editorStylingMode||"outlined",showValidationMark:!0,label:"",labelMode:"static",labelMark:""})},_defaultOptionsRules:function(){var e=Un();return this.callBase().concat([{device:function(){return Qt(e)},options:{stylingMode:It().editorStylingMode||"filled",labelMode:"floating"}}])},_getDefaultButtons:function(){return[{name:"clear",Ctor:n5}]},_isClearButtonVisible:function(){return this.option("showClearButton")&&!this.option("readOnly")},_input:function(){return this.$element().find(EG).first()},_isFocused:function(){return _a(this._input())||this.callBase()},_inputWrapper:function(){return this.$element()},_buttonsContainer:function(){return this._inputWrapper().find("."+IG).eq(0)},_isControlKey:function(e){return RG.indexOf(e)!==-1},_renderStylingMode:function(){this.callBase(),this._updateButtonsStyling(this.option("stylingMode"))},_initMarkup:function(){this.$element().addClass(bG),this._renderInput(),this._renderStylingMode(),this._renderInputType(),this._renderPlaceholder(),this._renderProps(),this.callBase(),this._renderValue(),this._renderLabel()},_render:function(){this.callBase(),this._refreshValueChangeEvent(),this._renderEvents(),this._renderEnterKeyAction(),this._renderEmptinessEvent()},_renderInput:function(){this._$buttonsContainer=this._$textEditorContainer=v("<div>").addClass(wG).appendTo(this.$element()),this._$textEditorInputContainer=v("<div>").addClass(SG).appendTo(this._$textEditorContainer),this._$textEditorInputContainer.append(this._createInput()),this._renderButtonContainers()},_getInputContainer(){return this._$textEditorInputContainer},_renderPendingIndicator:function(){this.$element().addClass(zx);var e=this._getInputContainer(),t=v("<div>").addClass(DG).appendTo(e);this._pendingIndicator=this._createComponent(t,dn)},_disposePendingIndicator:function(){this._pendingIndicator&&(this._pendingIndicator.dispose(),this._pendingIndicator.$element().remove(),this._pendingIndicator=null,this.$element().removeClass(zx))},_renderValidationState:function(){this.callBase();var e=this.option("validationStatus")==="pending",t=this.$element();e?(!this._pendingIndicator&&this._renderPendingIndicator(),this._showValidMark=!1):(this.option("validationStatus")==="invalid"&&(this._showValidMark=!1),!this._showValidMark&&this.option("showValidationMark")===!0&&(this._showValidMark=this.option("validationStatus")==="valid"&&!!this._pendingIndicator),this._disposePendingIndicator()),t.toggleClass(OG,!!this._showValidMark)},_renderButtonContainers:function(){var e=this.option("buttons");this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(e,this._$buttonsContainer),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(e,this._$buttonsContainer)},_cleanButtonContainers:function(){var e,t;(e=this._$beforeButtonsContainer)===null||e===void 0||e.remove(),(t=this._$afterButtonsContainer)===null||t===void 0||t.remove(),this._buttonCollection.clean()},_clean(){this._buttonCollection.clean(),this._disposePendingIndicator(),this._unobserveLabelContainerResize(),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._$textEditorContainer=null,this._$buttonsContainer=null,this.callBase()},_createInput:function(){var e=v("<input>");return this._applyInputAttributes(e,this.option("inputAttr")),e},_setSubmitElementName:function(e){var t=this.option("inputAttr.name");return this.callBase(e||t||"")},_applyInputAttributes:function(e,t){var i=O(this._getDefaultAttributes(),t);e.attr(i).addClass(mO).css("minHeight",this.option("height")?"0":"")},_getDefaultAttributes:function(){var e={autocomplete:"off"},{ios:t,mac:i}=Oe.real();return(t||i)&&(e.placeholder=" "),e},_updateButtons:function(e){this._buttonCollection.updateButtons(e)},_updateButtonsStyling:function(e){F(this.option("buttons"),(t,i)=>{var{options:n,name:r}=i;if(n&&!n.stylingMode&&this.option("visible")){var a=this.getButton(r);a.option&&a.option("stylingMode",e==="underlined"?"text":"contained")}})},_renderValue:function(){var e=this._renderInputValue();return e.promise()},_renderInputValue:function(e){var t;e=(t=e)!==null&&t!==void 0?t:this.option("value");var i=this.option("text"),n=this.option("displayValue"),r=this.option("displayValueFormatter");return n!==void 0&&e!==null?i=r(n):E(i)||(i=r(e)),this.option("text",i),this._input().val()!==(E(i)?i:"")?this._renderDisplayText(i):this._toggleEmptinessEventHandler(),new te().resolve()},_renderDisplayText:function(e){this._input().val(e),this._toggleEmptinessEventHandler()},_isValueValid:function(){if(this._input().length){var e=this._input().get(0).validity;if(e)return e.valid}return!0},_toggleEmptiness:function(e){this.$element().toggleClass(TG,e),this._togglePlaceholder(e)},_togglePlaceholder:function(e){this.$element().find(".".concat(Wx)).eq(0).toggleClass(AG,!e)},_renderProps:function(){this._toggleReadOnlyState(),this._toggleSpellcheckState(),this._toggleTabIndex()},_toggleDisabledState:function(e){this.callBase.apply(this,arguments);var t=this._input();t.prop("disabled",e)},_toggleTabIndex:function(){var e=this._input(),t=this.option("disabled"),i=this.option("focusStateEnabled");t||!i?e.attr("tabIndex",-1):e.removeAttr("tabIndex")},_toggleReadOnlyState:function(){this._input().prop("readOnly",this._readOnlyPropValue()),this.callBase()},_readOnlyPropValue:function(){return this.option("readOnly")},_toggleSpellcheckState:function(){this._input().prop("spellcheck",this.option("spellcheck"))},_unobserveLabelContainerResize:function(){this._labelContainerElement&&(lh.unobserve(this._labelContainerElement),this._labelContainerElement=null)},_getLabelContainer:function(){return this._input()},_getLabelContainerWidth:function(){return $e(this._getLabelContainer())},_getLabelBeforeWidth:function(){var e=this._$beforeButtonsContainer&&$e(this._$beforeButtonsContainer);return e??0},_updateLabelWidth:function(){this._label.updateBeforeWidth(this._getLabelBeforeWidth()),this._label.updateMaxWidth(this._getLabelContainerWidth())},_setLabelContainerAria:function(){this.setAria("labelledby",this._label.getId(),this._getLabelContainer())},_renderLabel:function(){this._unobserveLabelContainerResize(),this._labelContainerElement=v(this._getLabelContainer()).get(0);var{label:e,labelMode:t,labelMark:i}=this.option(),n={$editor:this.$element(),text:e,mark:i,mode:t,containsButtonsBefore:!!this._$beforeButtonsContainer,containerWidth:this._getLabelContainerWidth(),beforeWidth:this._getLabelBeforeWidth()};this._label=new kG(n),this._setLabelContainerAria(),this._labelContainerElement&&lh.observe(this._labelContainerElement,this._updateLabelWidth.bind(this))},_renderPlaceholder:function(){this._renderPlaceholderMarkup(),this._attachPlaceholderEvents()},_renderPlaceholderMarkup:function(){this._$placeholder&&(this._$placeholder.remove(),this._$placeholder=null);var e=this._input(),t=this.option("placeholder"),i=this._$placeholder=v("<div>").attr("data-dx_placeholder",t);i.insertAfter(e),i.addClass(Wx)},_attachPlaceholderEvents:function(){var e=me(ut.up,this.NAME);D.on(this._$placeholder,e,()=>{D.trigger(this._input(),"focus")}),this._toggleEmptinessEventHandler()},_placeholder:function(){return this._$placeholder||v()},_clearValueHandler:function(e){var t=this._input();e.stopPropagation(),this._saveValueChangeEvent(e),this._clearValue(),!this._isFocused()&&D.trigger(t,"focus"),D.trigger(t,"input")},_clearValue:function(){this.reset()},_renderEvents:function(){var e=this._input();F(bd,(t,i)=>{if(this.hasActionSubscription("on"+i)){var n=this._createActionByOption("on"+i,{excludeValidators:["readOnly"]});D.on(e,me(i.toLowerCase(),this.NAME),r=>{this._disposed||n({event:r})})}})},_refreshEvents:function(){var e=this._input();F(bd,(t,i)=>{D.off(e,me(i.toLowerCase(),this.NAME))}),this._renderEvents()},_keyPressHandler:function(){this.option("text",this._input().val())},_keyDownHandler:function(e){var t=this._input(),i=e.ctrlKey&&Nt(e)==="enter",n=t.val()!==this.option("value");i&&n&&D.trigger(t,"change")},_renderValueChangeEvent:function(){var e=me(this._renderValueEventName(),"".concat(this.NAME,"TextChange")),t=me(this.option("valueChangeEvent"),"".concat(this.NAME,"ValueChange")),i=me("keydown","".concat(this.NAME,"TextChange")),n=this._input();D.on(n,e,this._keyPressHandler.bind(this)),D.on(n,t,this._valueChangeEventHandler.bind(this)),D.on(n,i,this._keyDownHandler.bind(this))},_cleanValueChangeEvent:function(){var e=".".concat(this.NAME,"ValueChange"),t=".".concat(this.NAME,"TextChange");D.off(this._input(),e),D.off(this._input(),t)},_refreshValueChangeEvent:function(){this._cleanValueChangeEvent(),this._renderValueChangeEvent()},_renderValueEventName:function(){return"input change keypress"},_focusTarget:function(){return this._input()},_focusEventTarget:function(){return this.element()},_isInput:function(e){return e===this._input().get(0)},_preventNestedFocusEvent:function(e){if(e.isDefaultPrevented())return!0;var t=this._isNestedTarget(e.relatedTarget);return e.type==="focusin"?t=t&&this._isNestedTarget(e.target)&&!this._isInput(e.target):t||this._toggleFocusClass(!1,this.$element()),t&&e.preventDefault(),t},_isNestedTarget:function(e){return!!this.$element().find(e).length},_focusClassTarget:function(){return this.$element()},_focusInHandler:function(e){this._preventNestedFocusEvent(e),this.callBase.apply(this,arguments)},_focusOutHandler:function(e){this._preventNestedFocusEvent(e),this.callBase.apply(this,arguments)},_toggleFocusClass:function(e,t){this.callBase(e,this._focusClassTarget(t))},_hasFocusClass:function(e){return this.callBase(v(e||this.$element()))},_renderEmptinessEvent:function(){var e=this._input();D.on(e,"input blur",this._toggleEmptinessEventHandler.bind(this))},_toggleEmptinessEventHandler:function(){var e=this._input().val(),t=(e===""||e===null)&&this._isValueValid();this._toggleEmptiness(t)},_valueChangeEventHandler:function(e,t){this.option("readOnly")||(this._saveValueChangeEvent(e),this.option("value",arguments.length>1?t:this._input().val()),this._saveValueChangeEvent(void 0))},_renderEnterKeyAction:function(){this._enterKeyAction=this._createActionByOption("onEnterKey",{excludeValidators:["readOnly"]}),D.off(this._input(),"keyup.onEnterKey.dxTextEditor"),D.on(this._input(),"keyup.onEnterKey.dxTextEditor",this._enterKeyHandlerUp.bind(this))},_enterKeyHandlerUp:function(e){this._disposed||Nt(e)==="enter"&&this._enterKeyAction({event:e})},_updateValue:function(){this._options.silent("text",null),this._renderValue()},_dispose:function(){this._enterKeyAction=void 0,this.callBase()},_getSubmitElement:function(){return this._input()},_hasActiveElement:function(){return this._input().is(fe.getActiveElement())},_optionChanged:function(e){var{name:t,fullName:i,value:n}=e,r=t.replace("on","");if(bd.includes(r)){this._refreshEvents();return}switch(t){case"valueChangeEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onValueChanged":this._createValueChangeAction();break;case"focusStateEnabled":this.callBase(e),this._toggleTabIndex();break;case"spellcheck":this._toggleSpellcheckState();break;case"mode":this._renderInputType();break;case"onEnterKey":this._renderEnterKeyAction();break;case"placeholder":this._renderPlaceholder();break;case"label":this._label.updateText(n),this._setLabelContainerAria();break;case"labelMark":this._label.updateMark(n);break;case"labelMode":this._label.updateMode(n),this._setLabelContainerAria();break;case"width":this.callBase(e),this._label.updateMaxWidth(this._getLabelContainerWidth());break;case"readOnly":case"disabled":this._updateButtons(),this.callBase(e);break;case"showClearButton":this._updateButtons(["clear"]);break;case"text":break;case"value":this._updateValue(),this.callBase(e);break;case"inputAttr":this._applyInputAttributes(this._input(),this.option(t));break;case"stylingMode":this._renderStylingMode(),this._updateLabelWidth();break;case"buttons":i===t&&Gx(n),this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")),this._updateLabelWidth(),this._label.updateContainsButtonsBefore(!!this._$beforeButtonsContainer);break;case"visible":this.callBase(e),n&&this.option("buttons")&&(this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")));break;case"displayValueFormatter":this._invalidate();break;case"showValidationMark":break;default:this.callBase(e)}},_renderInputType:function(){this._setInputType(this.option("mode"))},_setInputType:function(e){var t=this._input();e==="search"&&(e="text");try{t.prop("type",e)}catch{t.prop("type","text")}},getButton(e){return this._buttonCollection.getButton(e)},focus:function(){D.trigger(this._input(),"focus")},reset:function(){this._showValidMark&&(this._showValidMark=!1,this._renderValidationState());var e=this._getDefaultOptions();this.option("value")===e.value?(this._options.silent("text",""),this._renderValue()):this.option("value",e.value)},on:function(e,t){var i=this.callBase(e,t),n=e.charAt(0).toUpperCase()+e.substr(1);return bd.indexOf(n)>=0&&this._refreshEvents(),i}}),yp="dxMask",LG="blur beforedeactivate",PG=" ";class CO{constructor(t){this.editor=t,this.DIRECTION={FORWARD:"forward",BACKWARD:"backward"},this.NAME=this._getStrategyName()}_getStrategyName(){return"base"}editorOption(){return this.editor.option(...arguments)}editorInput(){return this.editor._input()}editorCaret(t){if(!t)return this.editor._caret();this.editor._caret(t)}getHandler(t){var i=this["_".concat(t,"Handler")]||function(){};return i.bind(this)}attachEvents(){var t=this.editorInput();this.getHandleEventNames().forEach(i=>{var n=me(i.toLowerCase(),yp);D.on(t,n,this.getEventHandler(i))}),this._attachChangeEventHandlers()}getHandleEventNames(){return["focusIn","focusOut","keyDown","input","paste","cut","drop"]}getEventHandler(t){return this["_".concat(t,"Handler")].bind(this)}detachEvents(){D.off(this.editorInput(),".".concat(yp))}_attachChangeEventHandlers(){this.editorOption("valueChangeEvent").split(" ").includes("change")&&D.on(this.editorInput(),me(LG,yp),(function(t){this._suppressCaretChanging(this._changeHandler,[t]),this._changeHandler(t)}).bind(this.editor))}_focusInHandler(){if(this.editor._showMaskPlaceholder(),this.editor._direction(this.DIRECTION.FORWARD),!this.editor._isValueEmpty()&&this.editorOption("isValid"))this.editor._adjustCaret();else{var t=this.editor._maskRulesChain.first();this._caretTimeout=setTimeout((function(){this._caret({start:t,end:t})}).bind(this.editor),0)}}_focusOutHandler(t){this.editor._changeHandler(t),this.editorOption("showMaskMode")==="onFocus"&&this.editor._isValueEmpty()&&(this.editorOption("text",""),this.editor._renderDisplayText(""))}_cutHandler(t){var i=this.editorCaret(),n=this.editorInput().val().substring(i.start,i.end);this.editor._maskKeyHandler(t,()=>m_(t,n))}_dropHandler(){this._clearDragTimer(),this._dragTimer=setTimeout((function(){this.option("value",this._convertToValue(this._input().val()))}).bind(this.editor))}_clearDragTimer(){clearTimeout(this._dragTimer)}_keyDownHandler(){this._keyPressHandled=!1}_pasteHandler(t){var{editor:i}=this;this._keyPressHandled=!0;var n=this.editorCaret();i._maskKeyHandler(t,()=>{var r=m_(t),a=i._maskRulesChain.text().substring(n.end),o=i._handleChain({text:r,start:n.start,length:r.length}),s=n.start+o;i._handleChain({text:a,start:s,length:a.length}),i._caret({start:s,end:s})})}_autoFillHandler(t){var{editor:i}=this,n=this.editorInput().val();this._inputHandlerTimer=setTimeout(()=>{this._keyPressHandled=!0,this._isAutoFill()&&(this._keyPressHandled=!0,i._maskKeyHandler(t,()=>{i._handleChain({text:n,start:0,length:n.length})}),i._validateMask())})}_isAutoFill(){var t=this.editor._input(),i=!1;if(Bt.webkit){var n=t.get(0);i=n&&n.matches(":-webkit-autofill")}return i}runWithoutEventProcessing(t){var i=this._keyPressHandled;this._keyPressHandled=!0,t(),this._keyPressHandled=i}_backspaceHandler(){}_delHandler(t){var{editor:i}=this;this._keyPressHandled=!0,i._maskKeyHandler(t,()=>!i._hasSelection()&&i._handleKey(PG))}clean(){this._clearDragTimer(),clearTimeout(this._backspaceHandlerTimeout),clearTimeout(this._caretTimeout),clearTimeout(this._inputHandlerTimer)}}var FG="deleteContentBackward",MG=" ";class VG extends CO{_getStrategyName(){return"default"}getHandleEventNames(){return[...super.getHandleEventNames(),"keyPress"]}_keyPressHandler(t){if(!this._keyPressHandled&&(this._keyPressHandled=!0,!this.editor._isControlKeyFired(t))){var{editor:i}=this;i._maskKeyHandler(t,()=>i._handleKey(Gc(t)))}}_inputHandler(t){if(this._backspaceInputHandled(t.originalEvent&&t.originalEvent.inputType)&&this._handleBackspaceInput(t),t.originalEvent&&this._autoFillHandler(t),!this._keyPressHandled){this._keyPressHandled=!0;var i=this.editorInput().val(),n=this.editorCaret();if(n.end){n.start=n.end-1;var r=i.substring(0,n.start)+i.substring(n.end),a=i[n.start],{editor:o}=this;this.editorInput().val(r),o._caret({start:n.start,end:n.start}),o._maskKeyHandler(t,()=>o._handleKey(a))}}}_backspaceHandler(t){var{editor:i}=this;this._keyPressHandled=!0;var n=(r,a)=>{r&&(i._direction(this.DIRECTION.FORWARD),i._adjustCaret());var o=this.editorCaret();return new Promise(s=>{clearTimeout(this._backspaceHandlerTimeout),this._backspaceHandlerTimeout=setTimeout(function(){a(o),s()})})};i._maskKeyHandler(t,()=>i._hasSelection()?n(!0,r=>{i._displayMask(r),i._maskRulesChain.reset()}):i._tryMoveCaretBackward()?n(!1,r=>{this.editorCaret(r)}):(i._handleKey(MG,this.DIRECTION.BACKWARD),n(!0,r=>{i._displayMask(r),i._maskRulesChain.reset()})))}_backspaceInputHandled(t){return t===FG&&!this._keyPressHandled}_handleBackspaceInput(t){var{start:i,end:n}=this.editorCaret();this.editorCaret({start:i+1,end:n+1}),this._backspaceHandler(t)}}var NG="deleteContentBackward";class HG extends CO{_getStrategyName(){return"inputEvents"}getHandleEventNames(){return[...super.getHandleEventNames(),"beforeInput"]}_beforeInputHandler(){this._prevCaret=this.editorCaret()}_inputHandler(t){var{originalEvent:i}=t;if(i){var{inputType:n,data:r}=i,a=this.editorCaret();if(n===NG){var o=this._prevCaret.end-this._prevCaret.start||1;this.editor.setBackwardDirection(),this._updateEditorMask({start:a.start,length:o,text:this._getEmptyString(o)})}else{var s,l,u;if(!a.end)return;this._autoFillHandler(i),this.editorCaret(a);var d=((s=this._prevCaret)===null||s===void 0?void 0:s.end)-((l=this._prevCaret)===null||l===void 0?void 0:l.start),c=r+(d?this._getEmptyString(d-r.length):"");this.editor.setForwardDirection();var h=this._updateEditorMask({start:(u=this._prevCaret)===null||u===void 0?void 0:u.start,length:d||c.length,text:c});h||this.editorCaret(this._prevCaret)}}}_getEmptyString(t){return Array(t+1).join(" ")}_updateEditorMask(t){var i=t.text.length,n=this.editor._handleChain(t);if(this.editor.isForwardDirection()){var{start:r,end:a}=this.editorCaret(),o=n-i;r<=n&&n>1&&this.editorCaret({start:r+o,end:a+o}),this.editor.isForwardDirection()&&this.editor._adjustCaret()}return this.editor._displayMask(),!!n}}var $G=function(){return{}},Sd=OD,Ux=" ",WG="\\",Kx="dx-texteditor-masked",xp="forward",zG="backward",GG={0:/[0-9]/,9:/[0-9\s]/,"#":/[-+0-9\s]/,L:function(e){return Ed(e)},l:function(e){return Ed(e)||qx(e)},C:/\S/,c:/./,A:function(e){return Ed(e)||jx(e)},a:function(e){return Ed(e)||jx(e)||qx(e)}};function jx(e){return/[0-9]/.test(e)}function Ed(e){var t=e.charCodeAt();return 64<t&&t<91||96<t&&t<123||t>127}function qx(e){return e===" "}var tC=BG.inherit({_getDefaultOptions:function(){return O(this.callBase(),{mask:"",maskChar:"_",maskRules:{},maskInvalidMessage:ue.format("validation-mask"),useMaskedValue:!1,showMaskMode:"always"})},_supportedKeys:function(){var e=this,t={backspace:e._maskStrategy.getHandler("backspace"),del:e._maskStrategy.getHandler("del"),enter:e._changeHandler},i=e.callBase();return F(t,function(n,r){var a=i[n];i[n]=function(o){e.option("mask")&&r.call(e,o),a&&a(o)}}),i},_getSubmitElement:function(){return this.option("mask")?this._$hiddenElement:this.callBase()},_init:function(){this.callBase(),this._initMaskStrategy()},_initMaskStrategy:function(){this._maskStrategy=O3()?new HG(this):new VG(this)},_initMarkup:function(){this._renderHiddenElement(),this.callBase()},_attachMouseWheelEventHandlers:function(){var e=this._onMouseWheel!==ee;if(e){var t=this._input(),i=me(Du,this.NAME),n=this._createAction((function(r){var{event:a}=r;_a(t)&&!fi(a)&&(this._onMouseWheel(a),a.preventDefault(),a.stopPropagation())}).bind(this));D.off(t,i),D.on(t,i,function(r){n({event:r})})}},_onMouseWheel:ee,_render:function(){this._renderMask(),this.callBase(),this._attachMouseWheelEventHandlers()},_renderHiddenElement:function(){this.option("mask")&&(this._$hiddenElement=v("<input>").attr("type","hidden").appendTo(this._inputWrapper()))},_removeHiddenElement:function(){this._$hiddenElement&&this._$hiddenElement.remove()},_renderMask:function(){this.$element().removeClass(Kx),this._maskRulesChain=null,this._maskStrategy.detachEvents(),this.option("mask")&&(this.$element().addClass(Kx),this._maskStrategy.attachEvents(),this._parseMask(),this._renderMaskedValue())},_suppressCaretChanging:function(e,t){Sd=$G;try{e.apply(this,t)}finally{Sd=OD}},_changeHandler:function(e){var t=this._input(),i=t.val();if(i!==this._changedValue){this._changedValue=i;var n=ro(e,{type:"change"});D.trigger(t,n)}},_parseMask:function(){this._maskRules=O({},GG,this.option("maskRules")),this._maskRulesChain=this._parseMaskRule(0)},_parseMaskRule:function(e){var t=this.option("mask");if(e>=t.length)return new R3;var i=t[e],n=i===WG,r=n?new Cx({maskChar:t[e+1]}):this._getMaskRule(i);return r.next(this._parseMaskRule(e+1+n)),r},_getMaskRule:function(e){var t;return F(this._maskRules,function(i,n){if(i===e)return t={pattern:i,allowedChars:n},!1}),E(t)?new kD(O({maskChar:this.option("maskChar")},t)):new Cx({maskChar:e})},_renderMaskedValue:function(){if(this._maskRulesChain){var e=this.option("value")||"";this._maskRulesChain.clear(this._normalizeChainArguments());var t={length:e.length};t[this._isMaskedValueMode()?"text":"value"]=e,this._handleChain(t),this._displayMask()}},_replaceSelectedText:function(e,t,i){if(i===void 0)return e;var n=e.slice(0,t.start),r=e.slice(t.end),a=n+i+r;return a},_isMaskedValueMode:function(){return this.option("useMaskedValue")},_displayMask:function(e){e=e||this._caret(),this._renderValue(),this._caret(e)},_isValueEmpty:function(){return $l(this._value)},_shouldShowMask:function(){var e=this.option("showMaskMode");return e==="onFocus"?_a(this._input())||!this._isValueEmpty():!0},_showMaskPlaceholder:function(){if(this._shouldShowMask()){var e=this._maskRulesChain.text();this.option("text",e),this.option("showMaskMode")==="onFocus"&&this._renderDisplayText(e)}},_renderValue:function(){if(this._maskRulesChain&&(this._showMaskPlaceholder(),this._$hiddenElement)){var e=this._maskRulesChain.value(),t=$l(e)?"":this._getPreparedValue();this._$hiddenElement.val(t)}return this.callBase()},_getPreparedValue:function(){return this._convertToValue().replace(/\s+$/,"")},_valueChangeEventHandler:function(e){if(!this._maskRulesChain){this.callBase.apply(this,arguments);return}this._saveValueChangeEvent(e),this.option("value",this._getPreparedValue())},_isControlKeyFired:function(e){return this._isControlKey(Nt(e))||fi(e)},_handleChain:function(e){var t=this._maskRulesChain.handle(this._normalizeChainArguments(e));return this._value=this._maskRulesChain.value(),this._textValue=this._maskRulesChain.text(),t},_normalizeChainArguments:function(e){return e=e||{},e.index=0,e.fullText=this._maskRulesChain.text(),e},_convertToValue:function(e){return this._isMaskedValueMode()?e=this._replaceMaskCharWithEmpty(e||this._textValue||""):e=e||this._value||"",e},_replaceMaskCharWithEmpty:function(e){return e.replace(new RegExp(this.option("maskChar"),"g"),Ux)},_maskKeyHandler:function(e,t){if(!this.option("readOnly")){this.setForwardDirection(),e.preventDefault(),this._handleSelection();var i=this._input().val(),n=()=>{i!==this._input().val()&&this._maskStrategy.runWithoutEventProcessing(()=>D.trigger(this._input(),"input"))},r=t();r?r.then(n):(this.setForwardDirection(),this._adjustCaret(),this._displayMask(),this._maskRulesChain.reset(),n())}},_handleKey:function(e,t){this._direction(t||xp),this._adjustCaret(e),this._handleKeyChain(e),this._moveCaret()},_handleSelection:function(){if(this._hasSelection()){var e=this._caret(),t=new Array(e.end-e.start+1).join(Ux);this._handleKeyChain(t)}},_handleKeyChain:function(e){var t=this._caret(),i=this.isForwardDirection()?t.start:t.start-1,n=this.isForwardDirection()?t.end:t.end-1,r=i===n?1:n-i;this._handleChain({text:e,start:i,length:r})},_tryMoveCaretBackward:function(){this.setBackwardDirection();var e=this._caret().start;return this._adjustCaret(),!e||e!==this._caret().start},_adjustCaret:function(e){var t=this._caret().start,i=this.isForwardDirection(),n=this._maskRulesChain.adjustedCaret(t,i,e);this._caret({start:n,end:n})},_moveCaret:function(){var e=this._caret().start,t=e+(this.isForwardDirection()?0:-1),i=this._maskRulesChain.isAccepted(t)?e+(this.isForwardDirection()?1:-1):e;this._caret({start:i,end:i})},_caret:function(e,t){var i=this._input();if(i.length){if(!arguments.length)return Sd(i);Sd(i,e,t)}},_hasSelection:function(){var e=this._caret();return e.start!==e.end},_direction:function(e){if(!arguments.length)return this._typingDirection;this._typingDirection=e},setForwardDirection:function(){this._direction(xp)},setBackwardDirection:function(){this._direction(zG)},isForwardDirection:function(){return this._direction()===xp},_clean:function(){this._maskStrategy&&this._maskStrategy.clean(),this.callBase()},_validateMask:function(){if(this._maskRulesChain){var e=$l(this.option("value"))||this._maskRulesChain.isValid(this._normalizeChainArguments());this.option({isValid:e,validationError:e?null:{editorSpecific:!0,message:this.option("maskInvalidMessage")}})}},_updateHiddenElement:function(){this._removeHiddenElement(),this.option("mask")&&(this._input().removeAttr("name"),this._renderHiddenElement()),this._setSubmitElementName(this.option("name"))},_updateMaskOption:function(){this._updateHiddenElement(),this._renderMask(),this._validateMask()},_processEmptyMask:function(e){if(!e){var t=this.option("value");this.option({text:t,isValid:!0}),this.validationRequest.fire({value:t,editor:this}),this._renderValue()}},_optionChanged:function(e){switch(e.name){case"mask":this._updateMaskOption(),this._processEmptyMask(e.value);break;case"maskChar":case"maskRules":case"useMaskedValue":this._updateMaskOption();break;case"value":this._renderMaskedValue(),this._validateMask(),this.callBase(e),this._changedValue=this._input().val();break;case"maskInvalidMessage":break;case"showMaskMode":this.option("text",""),this._renderValue();break;default:this.callBase(e)}}});tt("dxTextEditor",tC);var UG=qe(),KG=["backspace","tab","enter","pageUp","pageDown","end","home","leftArrow","rightArrow","downArrow","upArrow","del"],jG="dx-textbox",Yx="dx-searchbox",qG="dx-icon",YG="dx-icon-search",Zu=tC.inherit({ctor:function(e,t){t&&(this._showClearButton=t.showClearButton),this.callBase.apply(this,arguments)},_getDefaultOptions:function(){return O(this.callBase(),{value:"",mode:"text",maxLength:null})},_initMarkup:function(){this.$element().addClass(jG),this.callBase(),this.setAria("role","textbox")},_renderInputType:function(){this.callBase(),this._renderSearchMode()},_useTemplates:function(){return!1},_renderProps:function(){this.callBase(),this._toggleMaxLengthProp()},_toggleMaxLengthProp:function(){var e=this._getMaxLength();e&&e>0?this._input().attr("maxLength",e):this._input().removeAttr("maxLength")},_renderSearchMode:function(){var e=this._$element;this.option("mode")==="search"?(e.addClass(Yx),this._renderSearchIcon(),this._showClearButton===void 0&&(this._showClearButton=this.option("showClearButton"),this.option("showClearButton",!0))):(e.removeClass(Yx),this._$searchIcon&&this._$searchIcon.remove(),this.option("showClearButton",this._showClearButton===void 0?this.option("showClearButton"):this._showClearButton),delete this._showClearButton)},_renderSearchIcon:function(){var e=v("<div>").addClass(qG).addClass(YG);e.prependTo(this._input().parent()),this._$searchIcon=e},_getLabelContainerWidth:function(){if(this._$searchIcon){var e=this._input().parent();return $e(e)-this._getLabelBeforeWidth()}return this.callBase()},_getLabelBeforeWidth:function(){var e=this.callBase();return this._$searchIcon&&(e+=lt(this._$searchIcon)),e},_optionChanged:function(e){switch(e.name){case"maxLength":this._toggleMaxLengthProp();break;case"mode":this.callBase(e),this._updateLabelWidth();break;case"mask":this.callBase(e),this._toggleMaxLengthProp();break;default:this.callBase(e)}},_onKeyDownCutOffHandler:function(e){var t=this._getMaxLength();if(t&&!e.ctrlKey&&!this._hasSelection()){var i=v(e.target),n=Nt(e);return this._cutOffExtraChar(i),i.val().length<t||KG.includes(n)||UG.getSelection().toString()!==""}else return!0},_onChangeCutOffHandler:function(e){var t=v(e.target);this.option("maxLength")&&this._cutOffExtraChar(t)},_cutOffExtraChar:function(e){var t=this._getMaxLength(),i=e.val();t&&i.length>t&&e.val(i.substr(0,t))},_getMaxLength:function(){var e=!!this.option("mask");return e?null:this.option("maxLength")}});tt("dxTextBox",Zu);var XG=nt.inherit({ctor:function(){this._dataStructure=[],this._itemsCount=0,this._visibleItemsCount=0},_indexByKey:{},_convertItemsToNodes:function(e,t){var i=this;F(e,function(n,r){var a=E(t)?t:i._getParentId(r),o=i._convertItemToNode(r,a);i._dataStructure.push(o),i._checkForDuplicateId(o.internalFields.key),i._indexByKey[o.internalFields.key]=i._dataStructure.length-1,i._itemHasChildren(r)&&i._convertItemsToNodes(i._dataAccessors.getters.items(r),o.internalFields.key)})},_checkForDuplicateId:function(e){if(E(this._indexByKey[e]))throw Je.Error("E1040",e)},_getParentId:function(e){return this._dataType==="plain"?this._dataAccessors.getters.parentKey(e):void 0},_itemHasChildren:function(e){if(this._dataType!=="plain"){var t=this._dataAccessors.getters.items(e);return t&&t.length}},_getUniqueKey:function(e){var t=this._dataAccessors.getters.key,i=t(e),n=t&&(i||i===0)&&Hl(i);return n?i:this.getItemsCount()},_convertItemToNode:function(e,t){this._itemsCount++,e.visible!==!1&&this._visibleItemsCount++;var i={internalFields:{disabled:this._dataAccessors.getters.disabled(e,{defaultValue:!1}),expanded:this._dataAccessors.getters.expanded(e,{defaultValue:!1}),selected:this._dataAccessors.getters.selected(e,{defaultValue:!1}),key:this._getUniqueKey(e),parentKey:E(t)?t:this._rootValue,item:this._makeObjectFromPrimitive(e),childrenKeys:[]}};return O(i,e),delete i.items,i},setChildrenKeys:function(){var e=this;F(this._dataStructure,function(t,i){if(i.internalFields.parentKey!==e._rootValue){var n=e.getParentNode(i);n&&n.internalFields.childrenKeys.push(i.internalFields.key)}})},_makeObjectFromPrimitive:function(e){if(Hl(e)){var t=e;e={},this._dataAccessors.setters.key(e,t)}return e},_convertToPublicNode:function(e,t){if(!e)return null;var i={text:this._dataAccessors.getters.display(e),key:e.internalFields.key,selected:e.internalFields.selected,expanded:e.internalFields.expanded,disabled:e.internalFields.disabled,parent:t||null,itemData:e.internalFields.item,children:[],items:[]};return i.parent&&(i.parent.children.push(i),i.parent.items.push(i)),i},convertToPublicNodes:function(e,t){if(!e.length)return[];var i=this,n=[];return F(e,function(r,a){a=Hl(a)?i._getByKey(a):a;var o=i._convertToPublicNode(a,t);o.children=i.convertToPublicNodes(a.internalFields.childrenKeys,o),n.push(o),a.internalFields.publicNode=o}),n},setDataAccessors:function(e){this._dataAccessors=e},_getByKey:function(e){return this._dataStructure[this.getIndexByKey(e)]||null},getParentNode:function(e){return this._getByKey(e.internalFields.parentKey)},getByKey:function(e,t){if(t==null)return null;var i=null,n=this,r=function(a,o){return F(a,function(s,l){var u=l.internalFields&&l.internalFields.key||n._dataAccessors.getters.key(l);if(u.toString()===o.toString())return i=l,!1}),i};return r(e,t)},getItemsCount:function(){return this._itemsCount},getVisibleItemsCount:function(){return this._visibleItemsCount},updateIndexByKey:function(){var e=this;this._indexByKey={},F(this._dataStructure,function(t,i){e._checkForDuplicateId(i.internalFields.key),e._indexByKey[i.internalFields.key]=t})},updateChildrenKeys:function(){this._indexByKey={},this.removeChildrenKeys(),this.updateIndexByKey(),this.setChildrenKeys()},removeChildrenKeys:function(){this._indexByKey={},F(this._dataStructure,function(e,t){t.internalFields.childrenKeys=[]})},getIndexByKey:function(e){return this._indexByKey[e]},createPlainStructure:function(e,t,i){return this._itemsCount=0,this._visibleItemsCount=0,this._rootValue=t,this._dataType=i,this._indexByKey={},this._convertItemsToNodes(e),this.setChildrenKeys(),this._dataStructure}}),Ko="expanded",Ma="selected",ZG="disabled";Co.setEditorClass(Zu);var QG=nt.inherit({ctor:function(e){this.options={},O(this.options,this._defaultOptions(),e),this.options.dataConverter.setDataAccessors(this.options.dataAccessors),this._selectedNodesKeys=[],this._expandedNodesKeys=[],this._dataStructure=[],this._createInternalDataStructure(),this.getTreeNodes()},setOption:function(e,t){this.options[e]=t,e==="recursiveSelection"&&this._updateSelection()},_defaultOptions:function(){return{dataAccessors:void 0,items:[],multipleSelection:!0,recursiveSelection:!1,recursiveExpansion:!1,rootValue:0,searchValue:"",dataType:"tree",searchMode:"contains",dataConverter:new XG,onNodeChanged:ee,sort:null}},_createInternalDataStructure:function(){this._initialDataStructure=this.options.dataConverter.createPlainStructure(this.options.items,this.options.rootValue,this.options.dataType),this._dataStructure=this.options.searchValue.length?this.search(this.options.searchValue):this._initialDataStructure,this.options.dataConverter._dataStructure=this._dataStructure,this._updateSelection(),this._updateExpansion()},_updateSelection:function(){this.options.recursiveSelection&&(this._setChildrenSelection(),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(Ma)},_updateExpansion:function(e){this.options.recursiveExpansion&&(e?this._updateOneBranch(e):this._setParentExpansion()),this._expandedNodesKeys=this._updateNodesKeysArray(Ko)},_updateNodesKeysArray:function(e){var t=this,i=[];return F(t._getDataBySelectionMode(),function(n,r){t._isNodeVisible(r)&&r.internalFields[e]&&(e===Ko||t.options.multipleSelection?i.push(r.internalFields.key):(i.length&&t.toggleSelection(i[0],!1,!0),i=[r.internalFields.key]))}),i},_getDataBySelectionMode:function(){return this.options.multipleSelection?this.getData():this.getFullData()},_isNodeVisible:function(e){return e.internalFields.item.visible!==!1},_getByKey:function(e,t){return e===this._dataStructure?this.options.dataConverter._getByKey(t):this.options.dataConverter.getByKey(e,t)},_setChildrenSelection:function(){var e=this;F(this._dataStructure,function(t,i){if(i.internalFields.childrenKeys.length){var n=i.internalFields.selected;n===!0&&e._toggleChildrenSelection(i,n)}})},_setParentSelection:function(){var e=this;F(this._dataStructure,function(t,i){var n=e.options.dataConverter.getParentNode(i);n&&i.internalFields.parentKey!==e.options.rootValue&&e._iterateParents(i,function(r){var a=e._calculateSelectedState(r);e._setFieldState(r,Ma,a)})})},_setParentExpansion:function(){var e=this;F(this._dataStructure,function(t,i){i.internalFields.expanded&&e._updateOneBranch(i.internalFields.key)})},_updateOneBranch:function(e){var t=this,i=this.getNodeByKey(e);t._iterateParents(i,function(n){t._setFieldState(n,Ko,!0)})},_iterateChildren:function(e,t,i,n){if(Ee(i)){var r=this,a=e.internalFields.key;n=n||[],n.indexOf(a)===-1&&(n.push(a),F(e.internalFields.childrenKeys,function(o,s){var l=r.getNodeByKey(s);i(l),l.internalFields.childrenKeys.length&&t&&r._iterateChildren(l,t,i,n)}))}},_iterateParents:function(e,t,i){if(!(e.internalFields.parentKey===this.options.rootValue||!Ee(t))){i=i||[];var n=e.internalFields.key;if(i.indexOf(n)===-1){i.push(n);var r=this.options.dataConverter.getParentNode(e);r&&(t(r),r.internalFields.parentKey!==this.options.rootValue&&this._iterateParents(r,t,i))}}},_calculateSelectedState:function(e){for(var t=e.internalFields.childrenKeys.length,i=0,n=0,r=!1,a=0;a<=t-1;a++){var o=this.getNodeByKey(e.internalFields.childrenKeys[a]),s=o.internalFields.item.visible===!1,l=o.internalFields.selected;if(s){n++;continue}l?i++:l===void 0&&(i+=.5)}return i&&(r=i===t-n?!0:void 0),r},_toggleChildrenSelection:function(e,t){var i=this;this._iterateChildren(e,!0,function(n){i._isNodeVisible(n)&&i._setFieldState(n,Ma,t)})},_setFieldState:function(e,t,i){e.internalFields[t]!==i&&(e.internalFields[t]=i,e.internalFields.publicNode&&(e.internalFields.publicNode[t]=i),this.options.dataAccessors.setters[t](e.internalFields.item,i),this.options.onNodeChanged(e))},_markChildren:function(e){var t=this;F(e,function(i,n){var r=t.getIndexByKey(n),a=t.getNodeByKey(n);t._dataStructure[r]=0,a.internalFields.childrenKeys.length&&t._markChildren(a.internalFields.childrenKeys)})},_removeNode:function(e){var t=this.getNodeByKey(e);this._dataStructure[this.getIndexByKey(e)]=0,this._markChildren(t.internalFields.childrenKeys);var i=this,n=0,r=O([],this._dataStructure);F(r,function(a,o){o||(i._dataStructure.splice(a-n,1),n++)})},_addNode:function(e){var t=this.options.dataConverter,i=t._convertItemToNode(e,this.options.dataAccessors.getters.parentKey(e));this._dataStructure=this._dataStructure.concat(i),this._initialDataStructure=this._initialDataStructure.concat(i),t._dataStructure=t._dataStructure.concat(i)},_updateFields:function(){this.options.dataConverter.updateChildrenKeys(),this._updateSelection(),this._updateExpansion()},getSelectedNodesKeys:function(){return this._selectedNodesKeys},getExpandedNodesKeys:function(){return this._expandedNodesKeys},getData:function(){return this._dataStructure},getFullData:function(){return this._initialDataStructure},getNodeByItem:function(e){var t=null;return F(this._dataStructure,function(i,n){if(n.internalFields.item===e)return t=n,!1}),t},getNodesByItems:function(e){var t=this,i=[];return F(e,function(n,r){var a=t.getNodeByItem(r);a&&i.push(a)}),i},getNodeByKey:function(e,t){return this._getByKey(t||this._getDataBySelectionMode(),e)},getTreeNodes:function(){return this.options.dataConverter.convertToPublicNodes(this.getRootNodes())},getItemsCount:function(){return this.options.dataConverter.getItemsCount()},getVisibleItemsCount:function(){return this.options.dataConverter.getVisibleItemsCount()},getPublicNode:function(e){return e.internalFields.publicNode},getRootNodes:function(){return this.getChildrenNodes(this.options.rootValue)},getChildrenNodes:function(e){return Gi(this._dataStructure).filter(["internalFields.parentKey",e]).toArray()},getIndexByKey:function(e){return this.options.dataConverter.getIndexByKey(e)},addItem:function(e){this._addNode(e),this._updateFields()},removeItem:function(e){this._removeNode(e),this._updateFields()},toggleSelection:function(e,t,i){var n=this._isSingleModeUnselect(t),r=this._getByKey(i||n?this._initialDataStructure:this._dataStructure,e);this._setFieldState(r,Ma,t),this.options.recursiveSelection&&!i&&(t?this._setChildrenSelection():this._toggleChildrenSelection(r,t),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(Ma)},_isSingleModeUnselect:function(e){return!this.options.multipleSelection&&!e},toggleNodeDisabledState:function(e,t){var i=this.getNodeByKey(e);this._setFieldState(i,ZG,t)},toggleSelectAll:function(e){if(E(e)){var t=this,i=t._selectedNodesKeys[t._selectedNodesKeys.length-1],n=t._isSingleModeUnselect(e)?this._initialDataStructure:this._dataStructure;F(n,function(r,a){t._isNodeVisible(a)&&t._setFieldState(a,Ma,e)}),t._selectedNodesKeys=t._updateNodesKeysArray(Ma),!e&&t.options.selectionRequired&&t.toggleSelection(i,!0)}},isAllSelected:function(){return this.getSelectedNodesKeys().length?this.getSelectedNodesKeys().length===this.getVisibleItemsCount()?!0:void 0:!1},toggleExpansion:function(e,t){var i=this.getNodeByKey(e);this._setFieldState(i,Ko,t),t&&this._updateExpansion(e),this._expandedNodesKeys=this._updateNodesKeysArray(Ko)},isFiltered:function(e){return!this.options.searchValue.length||!!this._filterDataStructure(this.options.searchValue,[e]).length},_createCriteria:function(e,t,i){var n=[];return Array.isArray(e)?(F(e,function(r,a){n.push([a,i,t],"or")}),n.pop(),n):[e,i,t]},_filterDataStructure:function(e,t){var i=this.options.searchExpr||this.options.dataAccessors.getters.display,n=Co.getOperationBySearchMode(this.options.searchMode),r=this._createCriteria(i,e,n);return t=t||this._initialDataStructure,Gi(t).filter(r).toArray()},search:function(e){var t=this,i=this._filterDataStructure(e),n=this.options.dataConverter;return function r(a,o){for(var s=a.length;o<s;){var l=a[o];if(l.internalFields.parentKey===t.options.rootValue){o++;continue}var u=n.getParentNode(l);if(!u){Je.log("W1007",l.internalFields.parentKey,l.internalFields.key),o++;continue}if(u.internalFields.expanded||t._setFieldState(u,Ko,!0),a.includes(u)){o++;continue}a.splice(o,0,u),r(a,o)}}(i,0),this.options.sort&&(i=Wr.queryByOptions(Gi(i),{sort:this.options.sort}).toArray()),n._indexByKey={},F(i,function(r,a){a.internalFields.childrenKeys=[],n._indexByKey[a.internalFields.key]=r}),n._dataStructure=i,n.setChildrenKeys(),n._dataStructure}}),JG="dx-state-invisible",eU="dx-state-disabled",tU="dx-item-content-placeholder",iU=function(e,t,i){var n=function(a){r!==a&&(i(a,r),r=a)},r;return{dispose:e(t,n),force:function(){n(t())}}},Do=nt.inherit({ctor:function(e,t,i){this._$element=e,this._options=t,this._rawData=i,tT(e,this,this._dispose),this._render()},_render:function(){var e=v("<div>").addClass(tU);this._$element.append(e),this._watchers=[],this._renderWatchers()},_renderWatchers:function(){this._startWatcher("disabled",this._renderDisabled.bind(this)),this._startWatcher("visible",this._renderVisible.bind(this))},_startWatcher:function(e,t){var i=this._rawData,n=this._options.fieldGetter(e),r=iU(this._options.watchMethod(),function(){return n(i)},(function(a,o){this._dirty=!0,t(a,o)}).bind(this));this._watchers.push(r)},setDataField:function(){if(this._dirty=!1,F(this._watchers,function(e,t){t.force()}),this._dirty)return!0},_renderDisabled:function(e,t){this._$element.toggleClass(eU,!!e),this._updateOwnerFocus(e)},_updateOwnerFocus:function(e){var t=this._options.owner;t&&e&&t._resetItemFocus(this._$element)},_renderVisible:function(e,t){this._$element.toggleClass(JG,e!==void 0&&!e)},_dispose:function(){F(this._watchers,function(e,t){t.dispose()})}});Do.getInstance=function(e){return iT(e,this)};var Xx=Math.abs,iC="dxhold",nU=750,Zx=5,rU=Fh.inherit({start:function(e){this._startEventData=zt(e),this._startTimer(e)},_startTimer:function(e){var t="timeout"in this?this.timeout:nU;this._holdTimer=setTimeout((function(){this._requestAccept(e),this._fireEvent(iC,e,{target:e.target}),this._forgetAccept()}).bind(this),t)},move:function(e){this._touchWasMoved(e)&&this._cancel(e)},_touchWasMoved:function(e){var t=Xa(this._startEventData,zt(e));return Xx(t.x)>Zx||Xx(t.y)>Zx},end:function(){this._stopTimer()},_stopTimer:function(){clearTimeout(this._holdTimer)},cancel:function(){this._stopTimer()},dispose:function(){this._stopTimer()}});Hs({emitter:rU,bubble:!0,events:[iC]});const ma={name:iC};var nC="dxContexMenu",aU=me("contextmenu",nC),oU=me(ma.name,nC),rC="dxcontextmenu",sU=nt.inherit({setup:function(e){var t=v(e);D.on(t,aU,this._contextMenuHandler.bind(this)),(fo||Oe.isSimulator())&&D.on(t,oU,this._holdHandler.bind(this))},_holdHandler:function(e){ho(e)&&!Oe.isSimulator()||this._fireContextMenu(e)},_contextMenuHandler:function(e){this._fireContextMenu(e)},_fireContextMenu:function(e){return Sa({type:rC,originalEvent:e})},teardown:function(e){D.off(e,"."+nC)}});Bn(rC,new sU);var yO=rC,lU=function(e,t,i,n,r){var a,o=((s,l,u)=>l(()=>s,u))(e,t,function(s){if(a&&a(),Hl(s)){r(s);return}a=function(l,u,d,c,h){var f={},p=d.slice(),g=d.map(function(m){var C=c[m];return u(C?()=>C(l):()=>l[m],function(x){if(f[m]=x,p.length){var T=p.indexOf(m);T>=0&&p.splice(T,1)}p.length||h(f)})});return function(){g.forEach(m=>m())}}(s,t,i,n,r)});return function(){a&&a(),o&&o()}};class Oo extends To{constructor(t,i,n,r){super(),this._render=t,this._fields=i,this._fieldsMap=r||{},this._watchMethod=n}_renderCore(t){var i=v(t.container),n=lU(t.model,this._watchMethod,this._fields,this._fieldsMap,r=>{i.empty(),this._render(i,r,t.model)});return D.on(i,dr,n),i.contents()}}var uU="dx-collection",wd="dx-item",Qx="-content",Jx="dx-item-content-placeholder",dU="dxItemData",cU="dxItemIndex",hU="tmpl-",fU="dxItem",pU="dx-item-selected",vU="dx-item-response-wait",_U="dx-empty-collection",eb="dx-template-wrapper",gU=/^([^.]+\[\d+\]\.)+([\w.]+)$/,mU="item",bp="up",Sp="down",tb="left",ib="right",CU="pageup",yU="pagedown",nb="last",rb="first",xO=pi.inherit({_activeStateUnit:"."+wd,_supportedKeys:function(){var e=function(i){var n=v(this.option("focusedElement"));n.length&&this._itemClickHandler(O({},i,{target:n.get(0),currentTarget:n.get(0)}))},t=function(i,n){fi(n)||(n.preventDefault(),n.stopPropagation(),this._moveFocus(i,n))};return O(this.callBase(),{space:function(i){i.preventDefault(),e.call(this,i)},enter:e,leftArrow:t.bind(this,tb),rightArrow:t.bind(this,ib),upArrow:t.bind(this,bp),downArrow:t.bind(this,Sp),pageUp:t.bind(this,bp),pageDown:t.bind(this,Sp),home:t.bind(this,rb),end:t.bind(this,nb)})},_getDefaultOptions:function(){return O(this.callBase(),{selectOnFocus:!1,loopItemFocus:!0,items:[],itemTemplate:"item",onItemRendered:null,onItemClick:null,onItemHold:null,itemHoldTimeout:750,onItemContextMenu:null,onFocusedItemChanged:null,noDataText:ue.format("dxCollectionWidget-noDataText"),dataSource:null,_itemAttributes:{},itemTemplateProperty:"template",focusOnSelectedItem:!0,focusedElement:null,displayExpr:void 0,disabledExpr:function(e){return e?e.disabled:void 0},visibleExpr:function(e){return e?e.visible:void 0}})},_init:function(){this._compileDisplayGetter(),this.callBase(),this._cleanRenderedItems(),this._refreshDataSource()},_compileDisplayGetter:function(){var e=this.option("displayExpr");this._displayGetter=e?mt(this.option("displayExpr")):void 0},_initTemplates:function(){this._initItemsFromMarkup(),this._initDefaultItemTemplate(),this.callBase()},_getAnonymousTemplateName:function(){return mU},_initDefaultItemTemplate:function(){var e=this._getFieldsMap();this._templateManager.addDefaultTemplates({item:new Oo((function(t,i){Ye(i)?this._prepareDefaultItemTemplate(i,t):(e&&Ee(e.text)&&(i=e.text(i)),t.text(String(Ft(i,""))))}).bind(this),this._getBindableFields(),this.option("integrationOptions.watchMethod"),e)})},_getBindableFields:function(){return["text","html"]},_getFieldsMap:function(){if(this._displayGetter)return{text:this._displayGetter}},_prepareDefaultItemTemplate:function(e,t){E(e.text)&&t.text(e.text),E(e.html)&&t.html(e.html)},_initItemsFromMarkup:function(){var e=uT(this.$element(),fU);if(!(!e.length||this.option("items").length)){var t=e.map(i=>{var{element:n,options:r}=i,a=/\S/.test(n.innerHTML)&&!r.template;return a?r.template=this._prepareItemTemplate(n):v(n).remove(),r});this.option("items",t)}},_prepareItemTemplate:function(e){var t=hU+new ri,i=v(e).detach().clone().removeAttr("data-options").addClass(eb);return this._saveTemplate(t,i),t},_dataSourceOptions:function(){return{paginate:!1}},_cleanRenderedItems:function(){this._renderedItemsCount=0},_focusTarget:function(){return this.$element()},_focusInHandler:function(e){if(this.callBase.apply(this,arguments),!!this._isFocusTarget(e.target)){var t=v(this.option("focusedElement"));if(t.length)this._setFocusedItem(t);else{var i=this._getActiveItem();i.length&&this.option("focusedElement",Fe(i))}}},_focusOutHandler:function(){this.callBase.apply(this,arguments);var e=v(this.option("focusedElement"));this._updateFocusedItemState(e,!1)},_getActiveItem:function(e){var t=v(this.option("focusedElement"));if(t.length)return t;var i=this.option("focusOnSelectedItem")?this.option("selectedIndex"):0,n=this._getActiveElement(),r=n.length-1;return i<0&&(i=e?r:0),n.eq(i)},_moveFocus:function(e){var t=this._getAvailableItems(),i;switch(e){case CU:case bp:i=this._prevItem(t);break;case yU:case Sp:i=this._nextItem(t);break;case ib:i=this.option("rtlEnabled")?this._prevItem(t):this._nextItem(t);break;case tb:i=this.option("rtlEnabled")?this._nextItem(t):this._prevItem(t);break;case rb:i=t.first();break;case nb:i=t.last();break;default:return!1}i.length!==0&&this.option("focusedElement",Fe(i))},_getVisibleItems:function(e){return e=e||this._itemElements(),e.filter(":visible")},_getAvailableItems:function(e){return this._getVisibleItems(e).not(".dx-state-disabled")},_prevItem:function(e){var t=this._getActiveItem(),i=e.index(t),n=e.last(),r=v(e[i-1]),a=this.option("loopItemFocus");return r.length===0&&a&&(r=n),r},_nextItem:function(e){var t=this._getActiveItem(!0),i=e.index(t),n=e.first(),r=v(e[i+1]),a=this.option("loopItemFocus");return r.length===0&&a&&(r=n),r},_selectFocusedItem:function(e){this.selectItem(e)},_updateFocusedItemState:function(e,t,i){var n=v(e);n.length&&(this._refreshActiveDescendant(),this._refreshItemId(n,i),this._toggleFocusClass(t,n)),this._updateParentActiveDescendant()},_refreshActiveDescendant:function(e){this.setAria("activedescendant",E(this.option("focusedElement"))?this.getFocusedItemId():null,e)},_refreshItemId:function(e,t){!t&&this.option("focusedElement")?this.setAria("id",this.getFocusedItemId(),e):this.setAria("id",null,e)},_setFocusedItem:function(e){!e||!e.length||(this._updateFocusedItemState(e,!0),this.onFocusedItemChanged(this.getFocusedItemId()),this.option("selectOnFocus")&&this._selectFocusedItem(e))},_findItemElementByItem:function(e){var t=v(),i=this;return this.itemElements().each(function(){var n=v(this);if(n.data(i._itemDataKey())===e)return t=n,!1}),t},_getIndexByItem:function(e){return this.option("items").indexOf(e)},_itemOptionChanged:function(e,t,i,n){var r=this._findItemElementByItem(e);if(r.length){this.constructor.ItemClass.getInstance(r).setDataField(t,i)||this._refreshItem(r,e);var a=t==="disabled"&&i;a&&this._resetItemFocus(r)}},_resetItemFocus(e){e.is(this.option("focusedElement"))&&this.option("focusedElement",null)},_refreshItem:function(e){var t=this._getItemData(e),i=e.data(this._itemIndexKey());this._renderItem(this._renderedItemsCount+i,t,null,e)},_updateParentActiveDescendant:ee,_optionChanged:function(e){if(e.name==="items"){var t=e.fullName.match(gU);if(t&&t.length){var i=t[t.length-1],n=e.fullName.replace("."+i,""),r=this.option(n);this._itemOptionChanged(r,i,e.value,e.previousValue);return}}switch(e.name){case"items":case"_itemAttributes":case"itemTemplateProperty":case"useItemTextAsTitle":this._cleanRenderedItems(),this._invalidate();break;case"dataSource":this._refreshDataSource(),this._renderEmptyMessage();break;case"noDataText":this._renderEmptyMessage();break;case"itemTemplate":this._invalidate();break;case"onItemRendered":this._createItemRenderAction();break;case"onItemClick":break;case"onItemHold":case"itemHoldTimeout":this._attachHoldEvent();break;case"onItemContextMenu":this._attachContextMenuEvent();break;case"onFocusedItemChanged":this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged");break;case"selectOnFocus":case"loopItemFocus":case"focusOnSelectedItem":break;case"focusedElement":this._updateFocusedItemState(e.previousValue,!1,!0),this._setFocusedItem(v(e.value));break;case"displayExpr":this._compileDisplayGetter(),this._initDefaultItemTemplate(),this._invalidate();break;case"visibleExpr":case"disabledExpr":this._invalidate();break;default:this.callBase(e)}},_invalidate:function(){return this.option("focusedElement",null),this.callBase.apply(this,arguments)},_loadNextPage:function(){var e=this._dataSource;return this._expectNextPageLoading(),e.pageIndex(1+e.pageIndex()),e.load()},_expectNextPageLoading:function(){this._startIndexForAppendedItems=0},_expectLastItemLoading:function(){this._startIndexForAppendedItems=-1},_forgetNextPageLoading:function(){this._startIndexForAppendedItems=null},_dataSourceChangedHandler:function(e){var t=this.option("items");this._initialized&&t&&this._shouldAppendItems()?(this._renderedItemsCount=t.length,(!this._isLastPage()||this._startIndexForAppendedItems!==-1)&&(this.option().items=t.concat(e.slice(this._startIndexForAppendedItems))),this._forgetNextPageLoading(),this._refreshContent()):this.option("items",e.slice())},_refreshContent:function(){this._prepareContent(),this._renderContent()},_dataSourceLoadErrorHandler:function(){this._forgetNextPageLoading(),this.option("items",this.option("items"))},_shouldAppendItems:function(){return this._startIndexForAppendedItems!=null&&this._allowDynamicItemsAppend()},_allowDynamicItemsAppend:function(){return!1},_clean:function(){this._cleanFocusState(),this._cleanItemContainer()},_cleanItemContainer:function(){v(this._itemContainer()).empty()},_dispose:function(){this.callBase(),clearTimeout(this._itemFocusTimeout)},_refresh:function(){this._cleanRenderedItems(),this.callBase.apply(this,arguments)},_itemContainer:function(){return this.$element()},_itemClass:function(){return wd},_itemContentClass:function(){return this._itemClass()+Qx},_selectedItemClass:function(){return pU},_itemResponseWaitClass:function(){return vU},_itemSelector:function(){return"."+this._itemClass()},_itemDataKey:function(){return dU},_itemIndexKey:function(){return cU},_itemElements:function(){return this._itemContainer().find(this._itemSelector())},_initMarkup:function(){this.callBase(),this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged"),this.$element().addClass(uU),this._prepareContent()},_prepareContent:to(function(){this._renderContentImpl()}),_renderContent:function(){this._fireContentReadyAction()},_render:function(){this.callBase(),this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent()},_attachClickEvent:function(){var e=this._itemSelector(),t=me(ct,this.NAME),i=me(ut.down,this.NAME),n=this,r=new en(function(a){var o=a.event;n._itemPointerDownHandler(o)});D.off(this._itemContainer(),t,e),D.off(this._itemContainer(),i,e),D.on(this._itemContainer(),t,e,(function(a){this._itemClickHandler(a)}).bind(this)),D.on(this._itemContainer(),i,e,function(a){r.execute({element:v(a.target),event:a})})},_itemClickHandler:function(e,t,i){this._itemDXEventHandler(e,"onItemClick",t,i)},_itemPointerDownHandler:function(e){this.option("focusStateEnabled")&&(this._itemFocusHandler=(function(){if(clearTimeout(this._itemFocusTimeout),this._itemFocusHandler=null,!e.isDefaultPrevented()){var t=v(e.target),i=t.closest(this._itemElements()),n=this._closestFocusable(t);i.length&&this._isFocusTarget(n==null?void 0:n.get(0))&&this.option("focusedElement",Fe(i))}}).bind(this),this._itemFocusTimeout=setTimeout(this._forcePointerDownFocus.bind(this)))},_closestFocusable:function(e){if(e.is(y_))return e;for(e=e.parent();e.length&&!fe.isDocument(e.get(0));){if(e.is(y_))return e;e=e.parent()}},_forcePointerDownFocus:function(){this._itemFocusHandler&&this._itemFocusHandler()},_updateFocusState:function(){this.callBase.apply(this,arguments),this._forcePointerDownFocus()},_attachHoldEvent:function(){var e=this._itemContainer(),t=this._itemSelector(),i=me(ma.name,this.NAME);D.off(e,i,t),D.on(e,i,t,{timeout:this._getHoldTimeout()},this._itemHoldHandler.bind(this))},_getHoldTimeout:function(){return this.option("itemHoldTimeout")},_shouldFireHoldEvent:function(){return this.hasActionSubscription("onItemHold")},_itemHoldHandler:function(e){this._shouldFireHoldEvent()?this._itemDXEventHandler(e,"onItemHold"):e.cancel=!0},_attachContextMenuEvent:function(){var e=this._itemContainer(),t=this._itemSelector(),i=me(yO,this.NAME);D.off(e,i,t),D.on(e,i,t,this._itemContextMenuHandler.bind(this))},_shouldFireContextMenuEvent:function(){return this.hasActionSubscription("onItemContextMenu")},_itemContextMenuHandler:function(e){this._shouldFireContextMenuEvent()?this._itemDXEventHandler(e,"onItemContextMenu"):e.cancel=!0},_renderContentImpl:function(){var e=this.option("items")||[];this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e)},_renderItems:function(e){e.length&&F(e,(function(t,i){this._renderItem(this._renderedItemsCount+t,i)}).bind(this)),this._renderEmptyMessage()},_renderItem:function(e,t,i,n){var r,a=(r=e==null?void 0:e.item)!==null&&r!==void 0?r:e;i=i||this._itemContainer();var o=this._renderItemFrame(a,t,i,n);this._setElementData(o,t,a),o.attr(this.option("_itemAttributes")),this._attachItemClickEvent(t,o);var s=this._getItemContent(o),l=this._renderItemContent({index:a,itemData:t,container:Fe(s),contentClass:this._itemContentClass(),defaultTemplateName:this.option("itemTemplate")}),u=this;return Ae(l).done(function(d){u._postprocessRenderItem({itemElement:o,itemContent:d,itemData:t,itemIndex:a}),u._executeItemRenderAction(e,t,Fe(o))}),o},_getItemContent:function(e){var t=e.find("."+Jx);return t.removeClass(Jx),t},_attachItemClickEvent:function(e,t){!e||!e.onClick||D.on(t,ct,(function(i){this._itemEventHandlerByHandler(t,e.onClick,{event:i})}).bind(this))},_renderItemContent:function(e){var t=this._getItemTemplateName(e),i=this._getTemplate(t);this._addItemContentClasses(e);var n=v(this._createItemByTemplate(i,e));return n.hasClass(eb)?this._renderItemContentByNode(e,n):e.container},_renderItemContentByNode:function(e,t){return v(e.container).replaceWith(t),e.container=Fe(t),this._addItemContentClasses(e),t},_addItemContentClasses:function(e){var t=[wd+Qx,e.contentClass];v(e.container).addClass(t.join(" "))},_appendItemToContainer:function(e,t,i){t.appendTo(e)},_renderItemFrame:function(e,t,i,n){var r=v("<div>");if(new this.constructor.ItemClass(r,this._itemOptions(),t||{}),n&&n.length?n.replaceWith(r):this._appendItemToContainer.call(this,i,r,e),this.option("useItemTextAsTitle")){var a=this._displayGetter?this._displayGetter(t):t;r.attr("title",a)}return r},_itemOptions:function(){var e=this;return{watchMethod:function(){return e.option("integrationOptions.watchMethod")},owner:e,fieldGetter:function(t){var i=e.option(t+"Expr"),n=mt(i);return n}}},_postprocessRenderItem:ee,_executeItemRenderAction:function(e,t,i){this._getItemRenderAction()({itemElement:i,itemIndex:e,itemData:t})},_setElementData:function(e,t,i){e.addClass([wd,this._itemClass()].join(" ")).data(this._itemDataKey(),t).data(this._itemIndexKey(),i)},_createItemRenderAction:function(){return this._itemRenderAction=this._createActionByOption("onItemRendered",{element:this.element(),excludeValidators:["disabled","readOnly"],category:"rendering"})},_getItemRenderAction:function(){return this._itemRenderAction||this._createItemRenderAction()},_getItemTemplateName:function(e){var t=e.itemData,i=e.templateProperty||this.option("itemTemplateProperty"),n=t&&t[i];return n||e.defaultTemplateName},_createItemByTemplate:function(e,t){return e.render({model:t.itemData,container:t.container,index:t.index})},_emptyMessageContainer:function(){return this._itemContainer()},_renderEmptyMessage:function(e){e=e||this.option("items");var t=this.option("noDataText"),i=!t||e&&e.length||this._isDataSourceLoading();i&&this._$noData&&(this._$noData.remove(),this._$noData=null,this.setAria("label",void 0)),i||(this._$noData=this._$noData||v("<div>").addClass("dx-empty-message"),this._$noData.appendTo(this._emptyMessageContainer()).html(t),this.setAria("label",t)),this.$element().toggleClass(_U,!i)},_itemDXEventHandler:function(e,t,i,n){this._itemEventHandler(e.target,t,O(i,{event:e}),n)},_itemEventHandler:function(e,t,i,n){var r=this._createActionByOption(t,O({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(e,r,i)},_itemEventHandlerByHandler:function(e,t,i,n){var r=this._createAction(t,O({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(e,r,i)},_itemEventHandlerImpl:function(e,t,i){var n=this._closestItemElement(v(e)),r=O({},i);return t(O(i,this._extendActionArgs(n),r))},_extendActionArgs:function(e){return{itemElement:Fe(e),itemIndex:this._itemElements().index(e),itemData:this._getItemData(e)}},_closestItemElement:function(e){return v(e).closest(this._itemSelector())},_getItemData:function(e){return v(e).data(this._itemDataKey())},_getSummaryItemsWidth:function(e,t){var i=0;return e&&F(e,function(n,r){i+=lt(r,t||!1)}),i},getFocusedItemId:function(){return this._focusedItemId||(this._focusedItemId="dx-"+new ri),this._focusedItemId},itemElements:function(){return this._itemElements()},itemsContainer:function(){return this._itemContainer()}}).include(Hu);xO.ItemClass=Do;var Yi=nt.abstract,xU=nt.inherit({ctor:function(e){this._collectionWidget=e},getIndexByItemData:Yi,getItemDataByIndex:Yi,getKeysByItems:Yi,getItemsByKeys:Yi,itemsGetter:Yi,getKeyByIndex:function(e){var t=this._denormalizeItemIndex(e);return this.getKeysByItems([this.getItemDataByIndex(t)])[0]},_equalKeys:function(e,t){return this._collectionWidget._isKeySpecified()?kt(e,t):e===t},beginCache:function(){this._cache={}},endCache:function(){this._cache=null},getIndexByKey:Yi,getNormalizedIndex:function(e){return this._isNormalizedItemIndex(e)?e:this._isItemIndex(e)?this._normalizeItemIndex(e):this._isNode(e)?this._getNormalizedItemIndex(e):this._normalizeItemIndex(this.getIndexByItemData(e))},getIndex:function(e){return this._isNormalizedItemIndex(e)?this._denormalizeItemIndex(e):this._isItemIndex(e)?e:this._isNode(e)?this._denormalizeItemIndex(this._getNormalizedItemIndex(e)):this.getIndexByItemData(e)},getItemElement:function(e){if(this._isNormalizedItemIndex(e))return this._getItemByNormalizedIndex(e);if(this._isItemIndex(e))return this._getItemByNormalizedIndex(this._normalizeItemIndex(e));if(this._isNode(e))return v(e);var t=this._normalizeItemIndex(this.getIndexByItemData(e));return this._getItemByNormalizedIndex(t)},_isNode:e=>fe.isNode(e&&hn(e)?e.get(0):e),deleteItemAtIndex:Yi,itemPlacementFunc:function(e,t){return this._itemsFromSameParent(e,t)&&e<t?"after":"before"},moveItemAtIndexToIndex:Yi,_isNormalizedItemIndex:function(e){return typeof e=="number"&&Math.round(e)===e},_isItemIndex:Yi,_getNormalizedItemIndex:Yi,_normalizeItemIndex:Yi,_denormalizeItemIndex:Yi,_getItemByNormalizedIndex:Yi,_itemsFromSameParent:Yi}),aC=xU.inherit({_getPlainItems:function(){return this._collectionWidget.option("items")||[]},getIndexByItemData:function(e){var t=this._collectionWidget.keyOf.bind(this._collectionWidget);return t?this.getIndexByKey(t(e)):this._getPlainItems().indexOf(e)},getItemDataByIndex:function(e){return this._getPlainItems()[e]},deleteItemAtIndex:function(e){this._getPlainItems().splice(e,1)},itemsGetter:function(){return this._getPlainItems()},getKeysByItems:function(e){var t=this._collectionWidget.keyOf.bind(this._collectionWidget),i=e;if(t){i=[];for(var n=0;n<e.length;n++)i.push(t(e[n]))}return i},getIndexByKey:function(e){var t=this._cache,i=t&&t.keys||this.getKeysByItems(this._getPlainItems());if(t&&!t.keys&&(t.keys=i),typeof e=="object"){for(var n=0,r=i.length;n<r;n++)if(this._equalKeys(e,i[n]))return n}else return i.indexOf(e);return-1},getItemsByKeys:function(e,t){return(t||e).slice()},moveItemAtIndexToIndex:function(e,t){var i=this._getPlainItems(),n=i[e];i.splice(e,1),i.splice(t,0,n)},_isItemIndex:function(e){return typeof e=="number"&&Math.round(e)===e},_getNormalizedItemIndex:function(e){return this._collectionWidget._itemElements().index(e)},_normalizeItemIndex:function(e){return e},_denormalizeItemIndex:function(e){return e},_getItemByNormalizedIndex:function(e){return e>-1?this._collectionWidget._itemElements().eq(e):null},_itemsFromSameParent:function(){return!0}});const bO=nt.inherit({ctor:function(e){this.options=e,this._setOption("disabledItemKeys",[]),this._clearItemKeys()},_clearItemKeys:function(){this._setOption("addedItemKeys",[]),this._setOption("removedItemKeys",[]),this._setOption("removedItems",[]),this._setOption("addedItems",[])},validate:ee,_setOption:function(e,t){this.options[e]=t},onSelectionChanged:function(){var e=this.options.addedItemKeys,t=this.options.removedItemKeys,i=this.options.addedItems,n=this.options.removedItems,r=this.options.selectedItems,a=this.options.selectedItemKeys,o=this.options.onSelectionChanged||ee;this._clearItemKeys(),o({selectedItems:r,selectedItemKeys:a,addedItemKeys:e,removedItemKeys:t,addedItems:i,removedItems:n})},equalKeys:function(e,t){return this.options.equalByReference&&He(e)&&He(t)?e===t:kt(e,t)},getSelectableItems:function(e){return e.filter(function(t){return!(t!=null&&t.disabled)})},_clearSelection:function(e,t,i,n){return e=e||[],e=Array.isArray(e)?e:[e],this.validate(),this.selectedItemKeys(e,t,i,n)},_removeTemplateProperty:function(e){return Array.isArray(e)?e.map(t=>this._removeTemplateProperty(t)):(He(e)&&delete e.template,e)},_loadFilteredData:function(e,t,i,n){var r=encodeURI(JSON.stringify(this._removeTemplateProperty(e))).length,a=this.options.maxFilterLengthInRequest&&r>this.options.maxFilterLengthInRequest,o=new te,s={filter:a?void 0:e,select:a?this.options.dataFields():i||this.options.dataFields()};return e&&e.length===0?o.resolve([]):this.options.load(s).done(function(l){var u=Ye(l)?l.data:l;t&&!n?u=u.filter(t):a&&(u=Gi(u).filter(e).toArray()),o.resolve(u)}).fail(o.reject.bind(o)),o},updateSelectedItemKeyHash:function(e){for(var t=0;t<e.length;t++){var i=Wn(e[t]);if(!He(i)){this.options.keyHashIndices[i]=this.options.keyHashIndices[i]||[];var n=this.options.keyHashIndices[i];n.push(t)}}},_isAnyItemSelected:function(e){for(var t=0;t<e.length;t++)if(this.options.isItemSelected(e[t]))return;return!1},_getFullSelectAllState:function(){var e=this.options.plainItems(),t=this.options.filter(),i=this.options.ignoreDisabledItems?this.options.selectedItems:this.options.selectedItems.filter(a=>!(a!=null&&a.disabled));t&&(i=Gi(i).filter(t).toArray());var n=i.length,r=e.length-this.getSelectableItems(e).length;if(!n)return this._isAnyItemSelected(e);if(n>=this.options.totalCount()-r)return!0},_getVisibleSelectAllState:function(){for(var e=this.getSelectableItems(this.options.plainItems()),t=!1,i=!1,n=0;n<e.length;n++){var r=e[n],a=this.options.getItemData(r),o=this.options.keyOf(a);this.options.isSelectableItem(r)&&(this.isItemKeySelected(o)?t=!0:i=!0)}return t?i?void 0:!0:!1}}),bU=bO.inherit({getSelectedItems:function(){return this._loadFilteredData(this.options.selectionFilter)},getSelectedItemKeys:function(){var e=new te,t=this,i=this.options.key(),n=Me(i)?[i]:i;return this._loadFilteredData(this.options.selectionFilter,null,n).done(function(r){var a=r.map(function(o){return t.options.keyOf(o)});e.resolve(a)}).fail(e.reject),e.promise()},selectedItemKeys:function(e,t,i,n){if(n){var r=this.options.filter(),a=!r||JSON.stringify(r)===JSON.stringify(this.options.selectionFilter)&&i;a?this._setOption("selectionFilter",i?[]:null):this._addSelectionFilter(i,r,n)}else{t||this._setOption("selectionFilter",[]);for(var o=0;o<e.length;o++)i?this.removeSelectedItem(e[o]):this.addSelectedItem(e[o])}return this.onSelectionChanged(),new te().resolve()},setSelectedItems:function(e){this._setOption("selectionFilter",null);for(var t=0;t<e.length;t++)this.addSelectedItem(e[t])},isItemDataSelected:function(e){return this.isItemKeySelected(e)},isItemKeySelected:function(e){var t=this.options.selectionFilter;return t?!!Gi([e]).filter(t).toArray().length:!0},_getKeyExpr:function(){var e=this.options.key();return Array.isArray(e)&&e.length===1?e[0]:e},_normalizeKey:function(e){var t=this.options.key();return Array.isArray(t)&&t.length===1?e[t[0]]:e},_getFilterByKey:function(e){var t=this._getKeyExpr(),i=[t,"=",this._normalizeKey(e)];if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i.push([t[n],"=",e[t[n]]]),n!==t.length-1&&i.push("and")}return i},addSelectedItem:function(e){var t=this._getFilterByKey(e);this._addSelectionFilter(!1,t)},removeSelectedItem:function(e){var t=this._getFilterByKey(e);this._addSelectionFilter(!0,t)},validate:function(){var e=this.options.key;if(e&&e()===void 0)throw Je.Error("E1042","Deferred selection")},_findSubFilter:function(e,t){if(!e)return-1;for(var i=JSON.stringify(t),n=0;n<e.length;n++){var r=e[n];if(r&&JSON.stringify(r)===i)return n}return-1},_isLastSubFilter:function(e,t){return e&&t?this._findSubFilter(e,t)===e.length-1||this._findSubFilter([e],t)===0:!1},_addFilterOperator:function(e,t){return e.length>1&&Me(e[1])&&e[1]!==t&&(e=[e]),e.length&&e.push(t),e},_denormalizeFilter:function(e){return e&&Me(e[0])&&(e=[e]),e},_isOnlyNegativeFiltersLeft:function(e){return e.every((t,i)=>i%2===0?Array.isArray(t)&&t[0]==="!":t==="and")},_addSelectionFilter:function(e,t,i){var n=e?["!",t]:t,r=e?"and":"or",a=!0,o=this.options.selectionFilter||[];if(o=this._denormalizeFilter(o),o&&o.length){var s=this._removeSameFilter(o,t,e,i),l=this._removeSameFilter(o,t,!e),u=e&&(s!==-1||l!==-1)&&this._isOnlyNegativeFiltersLeft(o);u&&(o=[]);var d=this._isKeyFilter(t)&&this._hasKeyFiltersOnlyStartingFromIndex(o,l);a=t.length&&!d,a&&(o=this._addFilterOperator(o,r))}a&&o.push(n),o=this._normalizeFilter(o),this._setOption("selectionFilter",!e&&!o.length?null:o)},_normalizeFilter:function(e){return e&&e.length===1&&(e=e[0]),e},_removeFilterByIndex:function(e,t,i){var n=e[1];t>0?e.splice(t-1,2):e.splice(t,2),i&&n==="and"&&e.splice(0,e.length)},_isSimpleKeyFilter:function(e,t){return e.length===3&&e[0]===t&&e[1]==="="},_isKeyFilter:function(e){if(e.length===2&&e[0]==="!")return this._isKeyFilter(e[1]);var t=this._getKeyExpr();if(Array.isArray(t)){if(e.length!==2*t.length-1)return!1;for(var i=0;i<t.length;i++)if(i>0&&e[2*i-1]!=="and"||!this._isSimpleKeyFilter(e[2*i],t[i]))return!1;return!0}return this._isSimpleKeyFilter(e,t)},_hasKeyFiltersOnlyStartingFromIndex:function(e,t){if(t>=0){for(var i=t;i<e.length;i++)if(typeof e[i]!="string"&&!this._isKeyFilter(e[i]))return!1;return!0}return!1},_removeSameFilter:function(e,t,i,n){if(t=i?["!",t]:t,JSON.stringify(t)===JSON.stringify(e))return e.splice(0,e.length),0;var r=this._findSubFilter(e,t);if(r>=0)return this._removeFilterByIndex(e,r,n),r;for(var a=0;a<e.length;a++)if(Array.isArray(e[a])&&e[a].length>2){var o=this._removeSameFilter(e[a],t,!1,n);if(o>=0)return e[a].length?e[a].length===1&&(e[a]=e[a][0]):this._removeFilterByIndex(e,a,n),o}return-1},getSelectAllState:function(){var e=this.options.filter(),t=this.options.selectionFilter;if(!t)return!0;if(!t.length)return!1;if(!(!e||!e.length)){if(t=this._denormalizeFilter(t),this._isLastSubFilter(t,e))return!0;if(this._isLastSubFilter(t,["!",e]))return!1}}});var SU=function(e,t){this.getLocalFilter=function(o,s,l,u){return s=s===void 0?kt:s,r.bind(this,s,o,l,u)},this.getExpr=function(o){if(o){var s;return e.forEach(function(l,u){s=s||[];var d;u>0&&s.push(t?"and":"or"),Me(o)?d=a(o,l):d=function(c,h){for(var f=[],p=0,g=c.length;p<g;p++){var m=c[p],C=h&&h[m],x=a(m,C);if(!x)break;p>0&&f.push(t?"or":"and"),f.push(x)}return f}(o,l),s.push(d)}),s&&s.length===1&&(s=s[0]),s}},this.getCombinedFilter=function(o,s){var l=this.getExpr(o),u=l;return t&&s&&(l?(u=[],u.push(l),u.push(s)):u=s),u};var i,n=function(o,s,l){return Array.isArray(l)?o.map(u=>s(u)):o};function r(o,s,l,u,d){var c=s(d),h,f;if(!l&&(h=Wn(c),!He(h))){var p=function(g,m){if(!i){i={};for(var C=n(e,g,m),x=0;x<C.length;x++)i[Wn(C[x])]=!0}return i}(s,u);return p[h]?!t:!!t}for(f=0;f<e.length;f++)if(o(e[f],c))return!t;return!!t}function a(o,s){if(s!==void 0)return[o,t?"<>":"=",s]}};const EU=bO.inherit({ctor:function(e){this.callBase(e),this._initSelectedItemKeyHash()},_initSelectedItemKeyHash:function(){this._setOption("keyHashIndices",this.options.equalByReference?null:{})},getSelectedItemKeys:function(){return this.options.selectedItemKeys.slice(0)},getSelectedItems:function(){return this.options.selectedItems.slice(0)},_preserveSelectionUpdate:function(e,t){var i=this.options.keyOf,n,r,a;if(i){var o=t&&e.length>1&&!this.options.equalByReference;for(o&&(n={}),a=0;a<e.length;a++){var s=e[a],l=i(s);t?(r=this.removeSelectedItem(l,n,s==null?void 0:s.disabled),n&&r>=0&&(n[r]=!0)):this.addSelectedItem(l,s)}o&&this._batchRemoveSelectedItems(n)}},_batchRemoveSelectedItems:function(e){var t=this.options.selectedItemKeys.slice(0),i=this.options.selectedItems.slice(0);this.options.selectedItemKeys.length=0,this.options.selectedItems.length=0;for(var n=0;n<t.length;n++)e[n]||(this.options.selectedItemKeys.push(t[n]),this.options.selectedItems.push(i[n]));this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(this.options.selectedItemKeys)},_loadSelectedItemsCore:function(e,t,i,n){var r=new te,a=this.options.key();if(!e.length&&!i)return r.resolve([]),r;if(i&&t&&!n)return r.resolve(this.getSelectedItems()),r;var o=new SU(e,i),s=o.getCombinedFilter(a,n),l=[];if(t){var u=this.options.selectedItems;l=s&&e.length!==u.length?Gi(u).filter(s).toArray():u.slice(0)}var d=l.length?l:this.options.plainItems(!0).filter(this.options.isSelectableItem).map(this.options.getItemData),c=o.getLocalFilter(this.options.keyOf,this.equalKeys.bind(this),this.options.equalByReference,a);return d=d.filter(c),l.length||!i&&d.length===e.length?r.resolve(d):r=this._loadFilteredData(s,c,null,i),r},_replaceSelectionUpdate:function(e){var t=[],i=this.options.keyOf;if(i){for(var n=0;n<e.length;n++){var r=e[n],a=i(r);t.push(a)}this.setSelectedItems(t,e)}},_warnOnIncorrectKeys:function(e){for(var t=this.options.allowNullValue,i=0;i<e.length;i++){var n=e[i];(!t||n!==null)&&!this.isItemKeySelected(n)&&Je.log("W1002",n)}},_isMultiSelectEnabled:function(){var e=this.options.mode;return e==="all"||e==="multiple"},_requestInProgress:function(){var e;return((e=this._lastLoadDeferred)===null||e===void 0?void 0:e.state())==="pending"},_concatRequestsItems:function(e,t,i,n){var r,a=t?e:[];return n?r=n:r=_y(e,this.options.selectedItemKeys),{addedItems:i.added.concat(r),removedItems:i.removed.concat(a),keys:e}},_collectLastRequestData:function(e,t,i,n){var r=t&&i,a={added:[],removed:[]},o=this._isMultiSelectEnabled(),s=o?this._lastRequestData:{};return o&&(this._shouldMergeWithLastRequest&&(r?(this._lastLoadDeferred.reject(),s={}):Ez(e,this.options.selectedItemKeys)||(a.added=s.addedItems,a.removed=s.removedItems,t||this._lastLoadDeferred.reject())),s=this._concatRequestsItems(e,t,a,this._shouldMergeWithLastRequest?void 0:n)),s},_updateKeysByLastRequestData:function(e,t,i){var n=e;if(this._isMultiSelectEnabled()&&this._shouldMergeWithLastRequest&&!t&&!i){var r,a;n=_y(e.concat((r=this._lastRequestData)===null||r===void 0?void 0:r.addedItems),(a=this._lastRequestData)===null||a===void 0?void 0:a.removedItems),n=UV(n)}return n},_loadSelectedItems:function(e,t,i,n){var r=this,a=new te,o=r.options.filter();return this._shouldMergeWithLastRequest=this._requestInProgress(),this._lastRequestData=this._collectLastRequestData(e,t,i,n),Ae(r._lastLoadDeferred).always(function(){var s=r._updateKeysByLastRequestData(e,t,i);r._shouldMergeWithLastRequest=!1,r._loadSelectedItemsCore(s,t,i,o).done(a.resolve).fail(a.reject)}),r._lastLoadDeferred=a,a},selectedItemKeys:function(e,t,i,n,r){var a=this,o=a._loadSelectedItems(e,i,n,r);return o.done(function(s){t?a._preserveSelectionUpdate(s,i):a._replaceSelectionUpdate(s),a.onSelectionChanged()}),o},addSelectedItem:function(e,t){if(E(t)&&!this.options.ignoreDisabledItems&&t.disabled){this.options.disabledItemKeys.indexOf(e)===-1&&this.options.disabledItemKeys.push(e);return}var i=this._getKeyHash(e);this._indexOfSelectedItemKey(i)===-1&&(!He(i)&&this.options.keyHashIndices&&(this.options.keyHashIndices[i]=[this.options.selectedItemKeys.length]),this.options.selectedItemKeys.push(e),this.options.addedItemKeys.push(e),this.options.addedItems.push(t),this.options.selectedItems.push(t))},_getSelectedIndexByKey:function(e,t){for(var i=this.options.selectedItemKeys,n=0;n<i.length;n++)if((!t||!t[n])&&this.equalKeys(i[n],e))return n;return-1},_getSelectedIndexByHash:function(e,t){var i=this.options.keyHashIndices[e];return i&&i.length>1&&t&&(i=i.filter(function(n){return!t[n]})),i&&i[0]>=0?i[0]:-1},_indexOfSelectedItemKey:function(e,t){var i;return this.options.equalByReference?i=this.options.selectedItemKeys.indexOf(e):He(e)?i=this._getSelectedIndexByKey(e,t):i=this._getSelectedIndexByHash(e,t),i},_shiftSelectedKeyIndices:function(e){for(var t=e;t<this.options.selectedItemKeys.length;t++){var i=this.options.selectedItemKeys[t],n=Wn(i),r=this.options.keyHashIndices[n];if(r)for(var a=0;a<r.length;a++)r[a]>e&&r[a]--}},removeSelectedItem:function(e,t,i){if(!(!this.options.ignoreDisabledItems&&i)){var n=this._getKeyHash(e),r=!!t,a=this._indexOfSelectedItemKey(n,t);if(a<0||(this.options.removedItemKeys.push(e),this.options.removedItems.push(this.options.selectedItems[a]),r)||(this.options.selectedItemKeys.splice(a,1),this.options.selectedItems.splice(a,1),He(n)||!this.options.keyHashIndices))return a;var o=this.options.keyHashIndices[n];return o&&(o.shift(),o.length||delete this.options.keyHashIndices[n],this._shiftSelectedKeyIndices(a)),a}},_updateAddedItemKeys:function(e,t){for(var i=0;i<e.length;i++)this.isItemKeySelected(e[i])||(this.options.addedItemKeys.push(e[i]),this.options.addedItems.push(t[i]))},_updateRemovedItemKeys:function(e,t,i){for(var n=0;n<t.length;n++)this.isItemKeySelected(t[n])||(this.options.removedItemKeys.push(t[n]),this.options.removedItems.push(i[n]))},_isItemSelectionInProgress:function(e,t){var i=t&&this._lastRequestData&&this._requestInProgress();if(i){var n,r=(n=this._lastRequestData.addedItems)!==null&&n!==void 0?n:[];return r.includes(e)}else return!1},_getKeyHash:function(e){return this.options.equalByReference?e:Wn(e)},setSelectedItems:function(e,t){this._updateAddedItemKeys(e,t);var i=this.options.selectedItemKeys,n=this.options.selectedItems;this.options.equalByReference||(this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(e)),this._setOption("selectedItemKeys",e),this._setOption("selectedItems",t),this._updateRemovedItemKeys(e,i,n)},isItemDataSelected:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.options.keyOf(e);return this.isItemKeySelected(i,t)},isItemKeySelected:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this._isItemSelectionInProgress(e,t.checkPending);if(!i){var n=this._getKeyHash(e),r=this._indexOfSelectedItemKey(n);i=r!==-1}return i},getSelectAllState:function(e){return e?this._getVisibleSelectAllState():this._getFullSelectAllState()}}),SO=nt.inherit({ctor:function(e){this.options=O(this._getDefaultOptions(),e,{selectedItemKeys:e.selectedKeys||[]}),this._selectionStrategy=this.options.deferred?new bU(this.options):new EU(this.options),this._focusedItemIndex=-1,this.options.equalByReference||this._selectionStrategy.updateSelectedItemKeyHash(this.options.selectedItemKeys)},_getDefaultOptions:function(){return{allowNullValue:!1,deferred:!1,equalByReference:!1,mode:"multiple",selectedItems:[],selectionFilter:[],maxFilterLengthInRequest:0,onSelectionChanged:ee,key:ee,keyOf:function(e){return e},load:function(){return new te().resolve([])},totalCount:function(){return-1},isSelectableItem:function(){return!0},isItemSelected:function(){return!1},getItemData:function(e){return e},dataFields:ee,filter:ee}},validate:function(){this._selectionStrategy.validate()},getSelectedItemKeys:function(){return this._selectionStrategy.getSelectedItemKeys()},getSelectedItems:function(){return this._selectionStrategy.getSelectedItems()},selectionFilter:function(e){if(e===void 0)return this.options.selectionFilter;var t=this.options.selectionFilter!==e&&JSON.stringify(this.options.selectionFilter)!==JSON.stringify(e);this.options.selectionFilter=e,t&&this.onSelectionChanged()},setSelection:function(e,t){return this.selectedItemKeys(e,!1,!1,!1,t)},select:function(e){return this.selectedItemKeys(e,!0)},deselect:function(e){return this.selectedItemKeys(e,!0,!0)},selectedItemKeys:function(e,t,i,n,r){var a;return e=(a=e)!==null&&a!==void 0?a:[],e=Array.isArray(e)?e:[e],this.validate(),this._selectionStrategy.selectedItemKeys(e,t,i,n,r)},clearSelection:function(){return this.selectedItemKeys([])},_addSelectedItem:function(e,t){this._selectionStrategy.addSelectedItem(t,e)},_removeSelectedItem:function(e){this._selectionStrategy.removeSelectedItem(e)},_setSelectedItems:function(e,t){this._selectionStrategy.setSelectedItems(e,t)},onSelectionChanged:function(){this._selectionStrategy.onSelectionChanged()},changeItemSelection:function(e,t,i){var n,r,a,o=this.options.plainItems(),s=o[e],l,u=(n=(r=this.options).allowLoadByRange)===null||n===void 0?void 0:n.call(r),d,c=!1,h=!1,f=x=>x>=0&&!o.filter(T=>T.loadIndex===x).length;if(u&&(d=s.loadIndex-e,e=s.loadIndex,c=f(this._focusedItemIndex),E(this._shiftFocusedItemIndex)&&(h=f(this._shiftFocusedItemIndex))),!this.isSelectable()||!this.isDataItem(s))return!1;var p=this.options.getItemData(s),g=this.options.keyOf(p);if(t=t||{},t.shift&&this.options.mode==="multiple"&&this._focusedItemIndex>=0)c||h?(a=e!==this._shiftFocusedItemIndex||this._focusedItemIndex!==this._shiftFocusedItemIndex,a&&(l=this.changeItemSelectionWhenShiftKeyInVirtualPaging(e))):a=this.changeItemSelectionWhenShiftKeyPressed(e,o,d);else if(t.control){if(this._resetItemSelectionWhenShiftKeyPressed(),!i){var m=this._selectionStrategy.isItemDataSelected(p);this.options.mode==="single"&&this.clearSelectedItems(),m?this._removeSelectedItem(g):this._addSelectedItem(p,g)}a=!0}else{this._resetItemSelectionWhenShiftKeyPressed();var C=this._selectionStrategy.equalKeys(this.options.selectedItemKeys[0],g);(this.options.selectedItemKeys.length!==1||!C)&&(this._setSelectedItems([g],[p]),a=!0)}if(a)return Ae(l).done(()=>{this._focusedItemIndex=e,!i&&this.onSelectionChanged()}),!0},isDataItem:function(e){return this.options.isSelectableItem(e)},isSelectable:function(){return this.options.mode==="single"||this.options.mode==="multiple"},isItemDataSelected:function(e){return this._selectionStrategy.isItemDataSelected(e,{checkPending:!0})},isItemSelected:function(e,t){return this._selectionStrategy.isItemKeySelected(e,t)},_resetItemSelectionWhenShiftKeyPressed:function(){delete this._shiftFocusedItemIndex},_resetFocusedItemIndex:function(){this._focusedItemIndex=-1},changeItemSelectionWhenShiftKeyInVirtualPaging:function(e){var t=this.options.getLoadOptions(e,this._focusedItemIndex,this._shiftFocusedItemIndex),i=new te,n=t.skip;return this.options.load(t).done(r=>{this.changeItemSelectionWhenShiftKeyPressed(e,r,n),i.resolve()}),i.promise()},changeItemSelectionWhenShiftKeyPressed:function(e,t,i){var n=!1,r,a=E(i),o=a?this._focusedItemIndex-i:this._focusedItemIndex,s=this.options.keyOf,l=t[o],u=this.options.getItemData(l),d=s(u),c=l&&this.isItemDataSelected(u);E(this._shiftFocusedItemIndex)||(this._shiftFocusedItemIndex=this._focusedItemIndex);var h,f,p,g;if(this._shiftFocusedItemIndex!==this._focusedItemIndex)for(r=this._focusedItemIndex<this._shiftFocusedItemIndex?1:-1,p=a?this._focusedItemIndex-i:this._focusedItemIndex,g=a?this._shiftFocusedItemIndex-i:this._shiftFocusedItemIndex,o=p;o!==g;o+=r)(a||this.isDataItem(t[o]))&&(f=s(this.options.getItemData(t[o])),this._removeSelectedItem(f),n=!0);if(e!==this._shiftFocusedItemIndex)for(r=e<this._shiftFocusedItemIndex?1:-1,p=a?e-i:e,g=a?this._shiftFocusedItemIndex-i:this._shiftFocusedItemIndex,o=p;o!==g;o+=r)(a||this.isDataItem(t[o]))&&(h=this.options.getItemData(t[o]),f=s(h),this._addSelectedItem(h,f),n=!0);return(a||this.isDataItem(l))&&!c&&(this._addSelectedItem(u,d),n=!0),n},clearSelectedItems:function(){this._setSelectedItems([],[])},selectAll:function(e){return this._resetFocusedItemIndex(),e?this._onePageSelectAll(!1):this.selectedItemKeys([],!0,!1,!0)},deselectAll:function(e){return this._resetFocusedItemIndex(),e?this._onePageSelectAll(!0):this.selectedItemKeys([],!0,!0,!0)},_onePageSelectAll:function(e){for(var t=this._selectionStrategy.getSelectableItems(this.options.plainItems()),i=0;i<t.length;i++){var n=t[i];if(this.isDataItem(n)){var r=this.options.getItemData(n),a=this.options.keyOf(r),o=this.isItemSelected(a);!o&&!e&&this._addSelectedItem(r,a),o&&e&&this._removeSelectedItem(a)}}return this.onSelectionChanged(),new te().resolve()},getSelectAllState:function(e){return this._selectionStrategy.getSelectAllState(e)}});var Ep="dxItemDeleting",Ec=-1,Fn=function(e){return e!==Ec},Ro=xO.inherit({_setOptionsByReference:function(){this.callBase(),O(this._optionsByReference,{selectedItem:!0})},_getDefaultOptions:function(){return O(this.callBase(),{selectionMode:"none",selectionRequired:!1,selectionByClick:!0,selectedItems:[],selectedItemKeys:[],maxFilterLengthInRequest:1500,keyExpr:null,selectedIndex:Ec,selectedItem:null,onSelectionChanged:null,onItemReordered:null,onItemDeleting:null,onItemDeleted:null})},ctor:function(e,t){this._userOptions=t||{},this.callBase(e,t)},_init:function(){this._initEditStrategy(),this.callBase(),this._initKeyGetter(),this._initSelectionModule()},_initKeyGetter:function(){this._keyGetter=mt(this.option("keyExpr"))},_getKeysByItems:function(e){return this._editStrategy.getKeysByItems(e)},_getItemsByKeys:function(e,t){return this._editStrategy.getItemsByKeys(e,t)},_getKeyByIndex:function(e){return this._editStrategy.getKeyByIndex(e)},_getIndexByKey:function(e){return this._editStrategy.getIndexByKey(e)},_getIndexByItemData:function(e){return this._editStrategy.getIndexByItemData(e)},_isKeySpecified:function(){return!!(this._dataSource&&this._dataSource.key())},_getCombinedFilter:function(){return this._dataSource&&this._dataSource.filter()},key:function(){return this.option("keyExpr")?this.option("keyExpr"):this._dataSource&&this._dataSource.key()},keyOf:function(e){var t=e,i=this._dataSource&&this._dataSource.store();return this.option("keyExpr")?t=this._keyGetter(e):i&&(t=i.keyOf(e)),t},_nullValueSelectionSupported:function(){return!1},_initSelectionModule:function(){var e=this,t=e._editStrategy.itemsGetter;this._selection=new SO({allowNullValue:this._nullValueSelectionSupported(),mode:this.option("selectionMode"),maxFilterLengthInRequest:this.option("maxFilterLengthInRequest"),equalByReference:!this._isKeySpecified(),onSelectionChanged:function(i){(i.addedItemKeys.length||i.removedItemKeys.length)&&(e.option("selectedItems",e._getItemsByKeys(i.selectedItemKeys,i.selectedItems)),e._updateSelectedItems(i))},filter:e._getCombinedFilter.bind(e),totalCount:function(){var i=e.option("items"),n=e._dataSource;return n&&n.totalCount()>=0?n.totalCount():e._getItemsCount(i)},key:e.key.bind(e),keyOf:e.keyOf.bind(e),load:function(i){if(e._dataSource){var n=e._dataSource.loadOptions();i.customQueryParams=n.customQueryParams,i.userData=e._dataSource._userData}var r=e._dataSource&&e._dataSource.store();return r?r.load(i).done(function(a){if(!e._disposed){var o=VA(a).data;e._dataSource._applyMapFunction(o)}}):new te().resolve(this.plainItems())},dataFields:function(){return e._dataSource&&e._dataSource.select()},plainItems:t.bind(e._editStrategy)})},_getItemsCount:function(e){return e.reduce((t,i)=>t+(i.items?this._getItemsCount(i.items):1),0)},_initEditStrategy:function(){var e=aC;this._editStrategy=new e(this)},_getSelectedItemIndices:function(e){var t=this,i=[];return e=e||this._selection.getSelectedItemKeys(),t._editStrategy.beginCache(),F(e,function(n,r){var a=t._getIndexByKey(r);Fn(a)&&i.push(a)}),t._editStrategy.endCache(),i},_initMarkup:function(){this._rendering=!0,(!this._dataSource||!this._dataSource.isLoading())&&this._syncSelectionOptions().done(()=>this._normalizeSelectedItems()),this.callBase()},_render:function(){this.callBase(),this._rendering=!1},_fireContentReadyAction:function(){this._rendering=!1,this._rendered=!0,this.callBase.apply(this,arguments)},_syncSelectionOptions:function(e){e=e||this._chooseSelectOption();var t,i,n,r;switch(e){case"selectedIndex":t=this._editStrategy.getItemDataByIndex(this.option("selectedIndex")),E(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedItem",t),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedItem",null));break;case"selectedItems":if(r=this.option("selectedItems")||[],i=r.length?this._editStrategy.getIndexByItemData(r[0]):Ec,this.option("selectionRequired")&&!Fn(i))return this._syncSelectionOptions("selectedIndex");this._setOptionWithoutOptionChange("selectedItem",r[0]),this._setOptionWithoutOptionChange("selectedIndex",i),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems(r));break;case"selectedItem":if(t=this.option("selectedItem"),i=this._editStrategy.getIndexByItemData(t),this.option("selectionRequired")&&!Fn(i))return this._syncSelectionOptions("selectedIndex");E(t)?(this._setOptionWithoutOptionChange("selectedItems",[t]),this._setOptionWithoutOptionChange("selectedIndex",i),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([t]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedIndex",Ec));break;case"selectedItemKeys":if(n=this.option("selectedItemKeys"),this.option("selectionRequired")){var a=this._getIndexByKey(n[0]);if(!Fn(a))return this._syncSelectionOptions("selectedIndex")}return this._selection.setSelection(n)}return new te().resolve().promise()},_chooseSelectOption:function(){var e="selectedIndex",t=(function(i){var n=this.option(i),r=E(n)&&n.length;return r||i in this._userOptions}).bind(this);return t("selectedItems")?e="selectedItems":t("selectedItem")?e="selectedItem":t("selectedItemKeys")&&(e="selectedItemKeys"),e},_compareKeys:function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<t.length;i++)if(e[i]!==t[i])return!1;return!0},_normalizeSelectedItems:function(){if(this.option("selectionMode")==="none")this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems");else if(this.option("selectionMode")==="single"){var e=this.option("selectedItems");if(e.length>1||!e.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length){var t=this._selection.getSelectedItems(),i=e[0]===void 0?t[0]:e[0];return i===void 0&&(i=this._editStrategy.itemsGetter()[0]),this.option("grouped")&&i&&i.items&&(i.items=[i.items[0]]),this._selection.setSelection(this._getKeysByItems([i])),this._setOptionWithoutOptionChange("selectedItems",[i]),this._syncSelectionOptions("selectedItems")}else this._selection.setSelection(this._getKeysByItems(e))}else{var n=this._getKeysByItems(this.option("selectedItems")),r=this._selection.getSelectedItemKeys();this._compareKeys(r,n)||this._selection.setSelection(n)}return new te().resolve().promise()},_itemClickHandler:function(e){var t=new te().resolve(),i=this.callBase;this._createAction((function(n){var r;t=(r=this._itemSelectHandler(n.event))!==null&&r!==void 0?r:t}).bind(this),{validatingTargetName:"itemElement"})({itemElement:v(e.currentTarget),event:e}),t.always(()=>{i.apply(this,arguments)})},_itemSelectHandler:function(e){var t,i;if(this.option("selectionByClick")){var n=e.currentTarget;return this.isItemSelected(n)?this.unselectItem(e.currentTarget):i=this.selectItem(e.currentTarget),(t=i)===null||t===void 0?void 0:t.promise()}},_selectedItemElement:function(e){return this._itemElements().eq(e)},_postprocessRenderItem:function(e){if(this.option("selectionMode")!=="none"){var t=v(e.itemElement),i=this._editStrategy.getNormalizedIndex(t),n=this._isItemSelected(i);this._processSelectableItem(t,n)}},_processSelectableItem:function(e,t){e.toggleClass(this._selectedItemClass(),t),this._setAriaSelected(e,String(t))},_updateSelectedItems:function(e){var t=this,i=e.addedItemKeys,n=e.removedItemKeys;if(t._rendered&&(i.length||n.length)){var r=t._selectionChangePromise;if(!t._rendering){var a=[],o,s=[];t._editStrategy.beginCache();for(var l=0;l<i.length;l++)o=t._getIndexByKey(i[l]),a.push(o),t._addSelection(o);for(var u=0;u<n.length;u++)o=t._getIndexByKey(n[u]),s.push(o),t._removeSelection(o);t._editStrategy.endCache(),t._updateSelection(a,s)}Ae(r).done(function(){t._fireSelectionChangeEvent(e.addedItems,e.removedItems)})}},_fireSelectionChangeEvent:function(e,t){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:e,removedItems:t})},_updateSelection:ee,_setAriaSelected:function(e,t){this.setAria("selected",t,e)},_removeSelection:function(e){var t=this._editStrategy.getItemElement(e);Fn(e)&&(this._processSelectableItem(t,!1),D.triggerHandler(t,"stateChanged",!1))},_addSelection:function(e){var t=this._editStrategy.getItemElement(e);Fn(e)&&(this._processSelectableItem(t,!0),D.triggerHandler(t,"stateChanged",!0))},_isItemSelected:function(e){var t=this._getKeyByIndex(e);return this._selection.isItemSelected(t,{checkPending:!0})},_optionChanged:function(e){switch(e.name){case"selectionMode":this._invalidate();break;case"dataSource":(!e.value||Array.isArray(e.value)&&!e.value.length)&&this.option("selectedItemKeys",[]),this.callBase(e);break;case"selectedIndex":case"selectedItem":case"selectedItems":case"selectedItemKeys":this._syncSelectionOptions(e.name).done(()=>this._normalizeSelectedItems());break;case"keyExpr":this._initKeyGetter();break;case"selectionRequired":this._normalizeSelectedItems();break;case"selectionByClick":case"onSelectionChanged":case"onItemDeleting":case"onItemDeleted":case"onItemReordered":case"maxFilterLengthInRequest":break;default:this.callBase(e)}},_clearSelectedItems:function(){this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems")},_waitDeletingPrepare:function(e){if(e.data(Ep))return new te().resolve().promise();e.data(Ep,!0);var t=new te,i={cancel:!1},n=this._itemEventHandler(e,"onItemDeleting",i,{excludeValidators:["disabled","readOnly"]});return Ae(n).always((function(r){var a=!n,o=!a&&n.state()==="resolved",s=!!arguments.length,l=a||o&&!s||o&&r;Ae(gi(i.cancel)).always(function(){e.data(Ep,!1)}).done(function(u){l&&!u?t.resolve():t.reject()}).fail(t.reject)}).bind(this)),t.promise()},_deleteItemFromDS:function(e){if(!this._dataSource)return new te().resolve().promise();var t=new te,i=this.option("disabled"),n=this._dataSource.store();if(this.option("disabled",!0),!n.remove)throw Je.Error("E1011");return n.remove(n.keyOf(this._getItemData(e))).done(function(r){r!==void 0?t.resolve():t.reject()}).fail(function(){t.reject()}),t.always((function(){this.option("disabled",i)}).bind(this)),t},_tryRefreshLastPage:function(){var e=new te;return this._isLastPage()||this.option("grouped")?e.resolve():this._refreshLastPage().done(function(){e.resolve()}),e.promise()},_refreshLastPage:function(){return this._expectLastItemLoading(),this._dataSource.load()},_updateSelectionAfterDelete:function(e){var t=this._getKeyByIndex(e);this._selection.deselect([t])},_updateIndicesAfterIndex:function(e){for(var t=this._itemElements(),i=e+1;i<t.length;i++)v(t[i]).data(this._itemIndexKey(),i-1)},_simulateOptionChange:function(e){var t=this.option(e);t instanceof lr||this._optionChangedAction({name:e,fullName:e,value:t})},isItemSelected:function(e){return this._isItemSelected(this._editStrategy.getNormalizedIndex(e))},selectItem:function(e){if(this.option("selectionMode")!=="none"){var t=this._editStrategy.getNormalizedIndex(e);if(Fn(t)){var i=this._getKeyByIndex(t);if(!this._selection.isItemSelected(i)){if(this.option("selectionMode")==="single")return this._selection.setSelection([i]);var n=this.option("selectedItemKeys")||[];return this._selection.setSelection([...n,i],[i])}}}},unselectItem:function(e){var t=this._editStrategy.getNormalizedIndex(e);if(Fn(t)){var i=this._selection.getSelectedItemKeys();if(!(this.option("selectionRequired")&&i.length<=1)){var n=this._getKeyByIndex(t);this._selection.isItemSelected(n,{checkPending:!0})&&this._selection.deselect([n])}}},_deleteItemElementByIndex:function(e){this._updateSelectionAfterDelete(e),this._updateIndicesAfterIndex(e),this._editStrategy.deleteItemAtIndex(e)},_afterItemElementDeleted:function(e,t){var i=this._dataSource?"dataSource":"items";this._simulateOptionChange(i),this._itemEventHandler(e,"onItemDeleted",t,{beforeExecute:function(){e.remove()},excludeValidators:["disabled","readOnly"]}),this._renderEmptyMessage()},deleteItem:function(e){var t=this,i=new te,n=this._editStrategy.getItemElement(e),r=this._editStrategy.getNormalizedIndex(e),a=this._itemResponseWaitClass();return Fn(r)?this._waitDeletingPrepare(n).done(function(){n.addClass(a);var o=t._extendActionArgs(n);t._deleteItemFromDS(n).done(function(){t._deleteItemElementByIndex(r),t._afterItemElementDeleted(n,o),t._tryRefreshLastPage().done(function(){i.resolveWith(t)})}).fail(function(){n.removeClass(a),i.rejectWith(t)})}).fail(function(){i.rejectWith(t)}):i.rejectWith(t),i.promise()},reorderItem:function(e,t){var i=new te,n=this,r=this._editStrategy,a=r.getItemElement(e),o=r.getItemElement(t),s=r.getNormalizedIndex(e),l=r.getNormalizedIndex(t),u=this._dataSource?"dataSource":"items",d=Fn(s)&&Fn(l)&&s!==l;return d?i.resolveWith(this):i.rejectWith(this),i.promise().done(function(){o[r.itemPlacementFunc(s,l)](a),r.moveItemAtIndexToIndex(s,l),this._updateIndicesAfterIndex(s),n.option("selectedItems",n._getItemsByKeys(n._selection.getSelectedItemKeys(),n._selection.getSelectedItems())),u==="items"&&n._simulateOptionChange(u),n._itemEventHandler(a,"onItemReordered",{fromIndex:r.getIndex(s),toIndex:r.getIndex(l)},{excludeValidators:["disabled","readOnly"]})})}}),wU="dx-state-disabled",EO=Ro.inherit({_getDefaultOptions:function(){return O(this.callBase(),{keyExpr:"id",displayExpr:"text",selectedExpr:"selected",disabledExpr:"disabled",itemsExpr:"items",hoverStateEnabled:!0,parentIdExpr:"parentId",expandedExpr:"expanded"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}}])},_init:function(){this.callBase(),this._initAccessors(),this._initDataAdapter(),this._initDynamicTemplates()},_initDataSource:function(){this.callBase(),this._dataSource&&this._dataSource.paginate(!1)},_initDataAdapter:function(){var e=this._createDataAdapterAccessors();this._dataAdapter=new QG(O({dataAccessors:{getters:e.getters,setters:e.setters},items:this.option("items")},this._getDataAdapterOptions()))},_getDataAdapterOptions:ee,_initDynamicTemplates:function(){var e=this;this._templateManager.addDefaultTemplates({item:new Oo((function(t,i){t.html(i.html).append(this._getIconContainer(i)).append(this._getTextContainer(i)).append(this._getPopoutContainer(i)),e._addContentClasses(i,t.parent())}).bind(this),["text","html","items","icon"],this.option("integrationOptions.watchMethod"),{text:this._displayGetter,items:this._itemsGetter})})},_getIconContainer:function(e){return e.icon?mo(e.icon):void 0},_getTextContainer:function(e){return v("<span>").text(e.text)},_getPopoutContainer:ee,_addContentClasses:ee,_initAccessors:function(){var e=this;F(this._getAccessors(),function(t,i){e._compileAccessor(i)}),this._compileDisplayGetter()},_getAccessors:function(){return["key","selected","items","disabled","parentId","expanded"]},_getChildNodes:function(e){var t=this,i=[];return F(e.internalFields.childrenKeys,function(n,r){var a=t._dataAdapter.getNodeByKey(r);i.push(a)}),i},_hasChildren:function(e){return e&&e.internalFields.childrenKeys.length},_compileAccessor:function(e){var t="_"+e+"Getter",i="_"+e+"Setter",n=this.option(e+"Expr");if(n){if(Ee(n)){this[i]=function(r,a){r[n()]=a},this[t]=function(r){return r[n()]};return}}else{this[t]=ee,this[i]=ee;return}this[t]=mt(n),this[i]=Hg(n)},_createDataAdapterAccessors:function(){var e=this,t={getters:{},setters:{}};return F(this._getAccessors(),function(i,n){var r="_"+n+"Getter",a="_"+n+"Setter",o=n==="parentId"?"parentKey":n;t.getters[o]=e[r],t.setters[o]=e[a]}),t.getters.display=this._displayGetter?this._displayGetter:i=>i.text,t},_initMarkup:function(){this.callBase(),this._addWidgetClass()},_addWidgetClass:function(){this._focusTarget().addClass(this._widgetClass())},_widgetClass:ee,_renderItemFrame:function(e,t){var i=this.callBase.apply(this,arguments);return i.toggleClass(wU,!!this._disabledGetter(t)),i},_optionChanged:function(e){switch(e.name){case"displayExpr":case"keyExpr":this._initAccessors(),this._initDynamicTemplates(),this.repaint();break;case"itemsExpr":case"selectedExpr":case"disabledExpr":case"expandedExpr":case"parentIdExpr":this._initAccessors(),this._initDataAdapter(),this.repaint();break;case"items":this._initDataAdapter(),this.callBase(e);break;default:this.callBase(e)}}});class IU extends aC{_getPlainItems(){return Jt(this._collectionWidget.option("items"),function t(i){return i.items?[i].concat(Jt(i.items,t)):i})}_stringifyItem(t){return JSON.stringify(t,(i,n)=>i==="template"?this._getTemplateString(n):n)}_getTemplateString(t){var i;return typeof t=="object"?i=v(t).text():i=t.toString(),i}}var Qu="dx-menu",TU=Qu+"-no-icons",AU="dx-menu-base",Dn=Qu+"-item",DU=Dn+"-content",wp=Dn+"-selected",ab=Dn+"-wrapper",OU=Qu+"-items-container",RU=Dn+"-expanded",kU=Qu+"-separator",BU=Qu+"-last-group-item",LU=Dn+"-has-text",PU=Dn+"-has-icon",FU=Dn+"-has-submenu",wO=Dn+"-popout",MU=wO+"-container",VU=Dn+"-text",NU="single",HU={show:50,hide:300};class oC extends EO{_getDefaultOptions(){return O(super._getDefaultOptions(),{items:[],cssClass:"",activeStateEnabled:!0,showSubmenuMode:{name:"onHover",delay:{show:50,hide:300}},animation:{show:{type:"fade",from:0,to:1,duration:100},hide:{type:"fade",from:1,to:0,duration:100}},selectByClick:!1,focusOnSelectedItem:!1,keyExpr:null,_itemAttributes:{role:"menuitem"},useInkRipple:!1})}_itemDataKey(){return"dxMenuItemDataKey"}_itemClass(){return Dn}_setAriaSelected(){}_selectedItemClass(){return wp}_widgetClass(){return AU}_focusTarget(){return this._itemContainer()}_clean(){this.option("focusedElement",null),super._clean()}_supportedKeys(){return O(super._supportedKeys(),{space:()=>{var t=v(this.option("focusedElement"));!t.length||!this._isSelectionEnabled()||this.selectItem(t[0])},pageUp:ee,pageDown:ee})}_isSelectionEnabled(){return this.option("selectionMode")===NU}_init(){this._activeStateUnit=".".concat(Dn),super._init(),this._renderSelectedItem(),this._initActions()}_getTextContainer(t){var i=t.text,n=v("<span>").addClass(VU),r=Ye(t)?i:String(t);return i&&n.text(r)}_getPopoutContainer(t){var i=t.items,n;if(i&&i.length){var r=v("<div>").addClass(wO);n=v("<span>").addClass(MU).append(r)}return n}_getDataAdapterOptions(){return{rootValue:0,multipleSelection:!1,recursiveSelection:!1,recursiveExpansion:!1,searchValue:""}}_selectByItem(t){if(t){var i=this._dataAdapter.getNodeByItem(t);this._dataAdapter.toggleSelection(i.internalFields.key,!0)}}_renderSelectedItem(){var t=this._dataAdapter.getSelectedNodesKeys(),i=t.length&&t[0],n=this.option("selectedItem");if(!i){this._selectByItem(n);return}var r=this._dataAdapter.getNodeByKey(i);if(r.selectable!==!1){if(!n){this.option("selectedItem",r.internalFields.item);return}n!==r.internalFields.item&&(this._dataAdapter.toggleSelection(i,!1),this._selectByItem(n))}}_initActions(){}_initMarkup(){super._initMarkup(),this.option("useInkRipple")&&this._renderInkRipple()}_renderInkRipple(){this._inkRipple=Gm()}_toggleActiveState(t,i,n){if(super._toggleActiveState.apply(this,arguments),!!this._inkRipple){var r={element:t,event:n};i?this._inkRipple.showWave(r):this._inkRipple.hideWave(r)}}_getShowSubmenuMode(){var t=this.option("showSubmenuMode");return t=He(t)?t.name:t,this._isDesktopDevice()?t:"onClick"}_initSelectedItems(){}_isDesktopDevice(){return Oe.real().deviceType==="desktop"}_initEditStrategy(){var t=IU;this._editStrategy=new t(this)}_addCustomCssClass(t){t.addClass(this.option("cssClass"))}_itemWrapperSelector(){return".".concat(ab)}_hoverStartHandler(t){var i=this._getItemElementByEventArgs(t);!i||this._isItemDisabled(i)||(t.stopPropagation(),this._getShowSubmenuMode()==="onHover"&&(clearTimeout(this._showSubmenusTimeout),this._showSubmenusTimeout=setTimeout(this._showSubmenu.bind(this,i),this._getSubmenuDelay("show"))))}_getAvailableItems(t){return super._getAvailableItems(t).filter(function(){return v(this).css("visibility")!=="hidden"})}_isItemDisabled(t){return this._disabledGetter(t.data(this._itemDataKey()))}_showSubmenu(t){this._addExpandedClass(t)}_addExpandedClass(t){v(t).addClass(RU)}_getSubmenuDelay(t){var{delay:i}=this.option("showSubmenuMode");return E(i)?He(i)?i[t]:i:HU[t]}_getItemElementByEventArgs(t){var i=v(t.target);if(i.hasClass(this._itemClass())||i.get(0)===t.currentTarget)return i;for(;!i.hasClass(this._itemClass());)if(i=i.parent(),i.hasClass("dx-submenu"))return null;return i}_hoverEndHandler(){clearTimeout(this._showSubmenusTimeout)}_hasSubmenu(t){return t&&t.internalFields.childrenKeys.length}_renderContentImpl(){this._renderItems(this._dataAdapter.getRootNodes())}_renderItems(t,i){if(t.length){this.hasIcons=!1;var n=this._renderContainer(this.$element(),i),r=-1,a=-1;F(t,(o,s)=>{var l=s.visible!==!1;l&&r<0&&(r=o);var u=r<o&&(s.beginGroup||o===a);u&&(a=l?o:o+1),o===a&&r<o&&this._renderSeparator(n),this._renderItem(o,s,n)}),this.hasIcons||n.addClass(TU)}}_renderContainer(t){var i=v("<ul>");return this.setAria("role","none",i),i.appendTo(t).addClass(OU)}_createDOMElement(t){var i=v("<li>");return this.setAria("role","none",i),i.appendTo(t).addClass(ab)}_renderItem(t,i,n,r){var a=this.option("items"),o=r||this._createDOMElement(n);a[t+1]&&a[t+1].beginGroup&&o.addClass(BU);var s=super._renderItem(t,i.internalFields.item,o);i.internalFields.item===this.option("selectedItem")&&s.addClass(wp),s.attr("tabIndex",-1),this._hasSubmenu(i)&&this.setAria("haspopup","true",s)}_renderItemFrame(t,i,n){var r=n.children(".".concat(Dn));return r.length?r:super._renderItemFrame.apply(this,arguments)}_refreshItem(t,i){var n=this._dataAdapter.getNodeByItem(i),r=t.data(this._itemIndexKey()),a=t.closest("ul"),o=t.closest("li");this._renderItem(r,n,a,o)}_addContentClasses(t,i){var n=t.text?!!t.text.length:!1,r=!!t.icon,a=t.items?!!t.items.length:!1;i.toggleClass(LU,n),i.toggleClass(PU,r),this.hasIcons||(this.hasIcons=r),i.toggleClass(FU,a)}_getItemContent(t){var i=super._getItemContent(t);return i.length||(i=t.children(".".concat(DU))),i}_postprocessRenderItem(t){var i=v(t.itemElement),n=this._dataAdapter.getSelectedNodesKeys();if(!n.length||!this._selectedGetter(t.itemData)||!this._isItemSelectable(t.itemData)){this._setAriaSelected(i,"false");return}var r=this._dataAdapter.getNodeByItem(t.itemData);r.internalFields.key===n[0]?(i.addClass(this._selectedItemClass()),this._setAriaSelected(i,"true")):this._setAriaSelected(i,"false")}_isItemSelectable(t){return t.selectable!==!1}_renderSeparator(t){v("<li>").appendTo(t).addClass(kU)}_itemClickHandler(t){if(!t._skipHandling){var i=this._createAction(this._updateSubmenuVisibilityOnClick.bind(this));this._itemDXEventHandler(t,"onItemClick",{},{afterExecute:i.bind(this)}),t._skipHandling=!0}}_updateSubmenuVisibilityOnClick(t){this._updateSelectedItemOnClick(t),this._getShowSubmenuMode()==="onClick"&&this._addExpandedClass(t.args[0].itemElement)}_updateSelectedItemOnClick(t){var i=t.args?t.args[0]:t;if(this._isItemSelectionAllowed(i.itemData)){var n=this._dataAdapter.getSelectedNodesKeys(),r=n.length&&this._dataAdapter.getNodeByKey(n[0]);r&&this._toggleItemSelection(r,!1),!r||r.internalFields.item!==i.itemData?this.selectItem(i.itemData):(this._fireSelectionChangeEvent(null,this.option("selectedItem")),this._setOptionWithoutOptionChange("selectedItem",null))}}_isItemSelectionAllowed(t){var i=this._isSelectionEnabled()&&this.option("selectByClick");return!this._isContainerEmpty()&&i&&this._isItemSelectable(t)&&!this._itemsGetter(t)}_isContainerEmpty(){return this._itemContainer().is(":empty")}_syncSelectionOptions(){return Wg()}_optionChanged(t){switch(t.name){case"showSubmenuMode":break;case"selectedItem":var i=this._dataAdapter.getNodeByItem(t.value),n=this._dataAdapter.getSelectedNodesKeys()[0];if(i&&i.internalFields.key!==n){if(i.selectable===!1)break;n&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(n),!1),this._toggleItemSelection(i,!0),this._updateSelectedItems()}break;case"cssClass":case"position":case"selectByClick":case"animation":case"useInkRipple":this._invalidate();break;default:super._optionChanged(t)}}_toggleItemSelection(t,i){var n=this._getElementByItem(t.internalFields.item);n&&v(n).toggleClass(wp),this._dataAdapter.toggleSelection(t.internalFields.key,i)}_getElementByItem(t){var i;return F(this._itemElements(),(n,r)=>v(r).data(this._itemDataKey())!==t?!0:(i=r,!1)),i}_updateSelectedItems(t,i){(t||i)&&this._fireSelectionChangeEvent(i,t)}_fireSelectionChangeEvent(t,i){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:[t],removedItems:[i]})}selectItem(t){var i=t.nodeType?this._getItemData(t):t,n=this._dataAdapter.getSelectedNodesKeys()[0],r=this.option("selectedItem"),a=this._dataAdapter.getNodeByItem(i);a.internalFields.key!==n&&(n&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(n),!1),this._toggleItemSelection(a,!0),this._updateSelectedItems(r,i),this._setOptionWithoutOptionChange("selectedItem",i))}unselectItem(t){var i=t.nodeType?this._getItemData(t):t,n=this._dataAdapter.getNodeByItem(i),r=this.option("selectedItem");n.internalFields.selected&&(this._toggleItemSelection(n,!1),this._updateSelectedItems(r,null),this._setOptionWithoutOptionChange("selectedItem",null))}}oC.ItemClass=Do;var IO="dx-menu",Yl=IO+"-item",jo=Yl+"-expanded",$U="dx-menu-phone-overlay",Id=IO+"-items-container",ob=Yl+"-wrapper",Xi="dx-submenu",WU="dx-context-menu",zU="dx-has-context-menu",GU="dx-state-disabled",UU="dx-state-focused",sb="dx-state-hover",KU="dx-overlay-content",TO="up",AO="down",jU="left",qU="right",DO="first",OO="last",lb=["onShowing","onShown","onSubmenuCreated","onHiding","onHidden","onPositioning","onLeftFirstItem","onLeftLastItem","onCloseRootSubmenu","onExpandLastSubmenu"],YU=[TO,AO,DO,OO],ub="dxcontextmenu";class sC extends oC{getShowEvent(t){var i=null;return He(t)?t.name!==null&&(i=t.name||ub):i=t,i}getShowDelay(t){return He(t)&&t.delay}_getDefaultOptions(){return O(super._getDefaultOptions(),{showEvent:ub,hideOnOutsideClick:!0,position:{at:"top left",my:"top left"},onShowing:null,onShown:null,onSubmenuCreated:null,onHiding:null,onHidden:null,onPositioning:null,submenuDirection:"auto",visible:!1,target:void 0,onLeftFirstItem:null,onLeftLastItem:null,onCloseRootSubmenu:null,onExpandLastSubmenu:null})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>!Ke(),options:{animation:null}}])}_setDeprecatedOptions(){super._setDeprecatedOptions(),O(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.2",alias:"hideOnOutsideClick"}})}_initActions(){this._actions={},F(lb,(t,i)=>{this._actions[i]=this._createActionByOption(i)||ee})}_setOptionsByReference(){super._setOptionsByReference(),O(this._optionsByReference,{animation:!0,selectedItem:!0})}_focusInHandler(){}_itemContainer(){return this._overlay?this._overlay.$content():v()}_eventBindingTarget(){return this._itemContainer()}itemsContainer(){return this._overlay?this._overlay.$content():void 0}_supportedKeys(){return O(super._supportedKeys(),{space:()=>{var t=v(this.option("focusedElement"));this.hide(),!(!t.length||!this._isSelectionEnabled())&&this.selectItem(t[0])},escape:this.hide})}_getActiveItem(){var t=this._getAvailableItems(),i=t.filter(".".concat(UU)),n=t.filter(".".concat(sb)),r=n.closest(".".concat(Id));return r.find(".".concat(Yl)).index(i)>=0?i:n.length?n:super._getActiveItem()}_moveFocus(t){var i=this._getItemsByLocation(t),n=this._getActiveItem(!0),r=this.itemsContainer().find(".".concat(sb)),a=v(this.option("focusedElement")),o=!!(a.length||r.length),s;switch(t){case TO:s=o?this._prevItem(i):n,this._setFocusedElement(s),n.is(i.first())&&this._actions.onLeftFirstItem(n);break;case AO:s=o?this._nextItem(i):n,this._setFocusedElement(s),n.is(i.last())&&this._actions.onLeftLastItem(n);break;case qU:s=this.option("rtlEnabled")?this._hideSubmenuHandler():this._expandSubmenuHandler(i,t),this._setFocusedElement(s);break;case jU:s=this.option("rtlEnabled")?this._expandSubmenuHandler(i,t):this._hideSubmenuHandler(),this._setFocusedElement(s);break;case DO:s=i.first(),this._setFocusedElement(s);break;case OO:s=i.last(),this._setFocusedElement(s);break;default:return super._moveFocus(t)}}_setFocusedElement(t){t&&t.length!==0&&this.option("focusedElement",Fe(t))}_getItemsByLocation(t){var i=this._getActiveItem(!0),n;return YU.includes(t)&&(n=i.closest(".".concat(Id)).children().children()),n=this._getAvailableItems(n),n}_getAriaTarget(){return this.$element()}_refreshActiveDescendant(){if(E(this._overlay)){var t=this._overlay.$content();super._refreshActiveDescendant(t)}}_hideSubmenuHandler(){var t=this._getActiveItem(!0),i=t.parents(".".concat(jo)).first();return i.length?(this._hideSubmenusOnSameLevel(i),this._hideSubmenu(t.closest(".".concat(Xi))),i):(this._actions.onCloseRootSubmenu(t),t)}_expandSubmenuHandler(t,i){var n=this._getActiveItem(!0),r=this._getItemData(n),a=this._dataAdapter.getNodeByItem(r),o=this._hasSubmenu(a),s=n.children(".".concat(Xi));if(o&&!n.hasClass(GU))return(!s.length||s.css("visibility")==="hidden")&&this._showSubmenu(n),this._nextItem(this._getItemsByLocation(i));this._actions.onExpandLastSubmenu(n)}_clean(){this._overlay&&(this._overlay.$element().remove(),this._overlay=null),this._detachShowContextMenuEvents(this._getTarget()),super._clean()}_initMarkup(){this.$element().addClass(zU),super._initMarkup()}_render(){super._render(),this._renderVisibility(this.option("visible")),this._addWidgetClass()}_renderContentImpl(){this._detachShowContextMenuEvents(this._getTarget()),this._attachShowContextMenuEvents()}_attachKeyboardEvents(){!this._keyboardListenerId&&this._focusTarget().length&&super._attachKeyboardEvents()}_renderContextMenuOverlay(){if(!this._overlay){var t=this._getOverlayOptions();this._overlay=this._createComponent(v("<div>").appendTo(this._$element),zn,t);var i=this._overlay.$content();i.addClass(WU),this._addCustomCssClass(i),this._addPlatformDependentClass(i),this._attachContextMenuEvent()}}preventShowingDefaultContextMenuAboveOverlay(){var t=this._itemContainer(),i=me(yO,this.NAME);D.off(t,i,".".concat(Xi)),D.on(t,i,".".concat(Xi),(n=>{n.stopPropagation(),n.preventDefault(),D.off(t,i,".".concat(Xi))}).bind(this))}_itemContextMenuHandler(t){super._itemContextMenuHandler(t),t.stopPropagation()}_addPlatformDependentClass(t){Oe.current().phone&&t.addClass($U)}_detachShowContextMenuEvents(t){var i=this.getShowEvent(this.option("showEvent"));if(i){var n=me(i,this.NAME);this._showContextMenuEventHandler?D.off(fe.getDocument(),n,t,this._showContextMenuEventHandler):D.off(v(t),n)}}_attachShowContextMenuEvents(){var t=this._getTarget(),i=this.getShowEvent(this.option("showEvent"));if(i){var n=me(i,this.NAME),r=this._createAction(o=>{var s=this.getShowDelay(this.option("showEvent"));s?setTimeout(()=>this._show(o.event),s):this._show(o.event)},{validatingTargetName:"target"}),a=o=>r({event:o,target:v(o.currentTarget)});r=this._createAction(r),hn(t)||t.nodeType||Yt(t)?(this._showContextMenuEventHandler=void 0,D.on(t,n,a)):(this._showContextMenuEventHandler=a,D.on(fe.getDocument(),n,t,this._showContextMenuEventHandler))}}_hoverEndHandler(t){super._hoverEndHandler(t),t.stopPropagation()}_renderDimensions(){}_renderContainer(t,i){var n=i||this._itemContainer();t=v("<div>"),t.appendTo(n).addClass(Xi).css("visibility",i?"hidden":"visible"),t.parent().hasClass(KU)||this._addCustomCssClass(t);var r=super._renderContainer(t);return i?r:this.option("width")?r.css("minWidth",this.option("width")):this.option("height")?r.css("minHeight",this.option("height")):r}_renderSubmenuItems(t,i){this._renderItems(this._getChildNodes(t),i),this._actions.onSubmenuCreated({itemElement:Fe(i),itemData:t.internalFields.item,submenuElement:Fe(i.children(".".concat(Xi)))})}_getOverlayOptions(){var t=this.option("position"),i={focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),innerOverlay:!0,hideOnOutsideClick:n=>this._hideOnOutsideClickHandler(n),propagateOutsideClick:!0,hideOnParentScroll:!0,deferRendering:!1,position:{at:t.at,my:t.my,of:this._getTarget(),collision:"flipfit"},shading:!1,showTitle:!1,height:"auto",width:"auto",onShown:this._overlayShownActionHandler.bind(this),onHiding:this._overlayHidingActionHandler.bind(this),onHidden:this._overlayHiddenActionHandler.bind(this)};return i}_overlayShownActionHandler(t){this._actions.onShown(t)}_overlayHidingActionHandler(t){this._actions.onHiding(t),t.cancel||(this._hideAllShownSubmenus(),this._setOptionWithoutOptionChange("visible",!1))}_overlayHiddenActionHandler(t){this._actions.onHidden(t)}_shouldHideOnOutsideClick(t){var{closeOnOutsideClick:i,hideOnOutsideClick:n}=this.option();return Ee(n)?n(t):Ee(i)?i(t):n||i}_hideOnOutsideClickHandler(t){if(!this._shouldHideOnOutsideClick(t))return!1;if(fe.isDocument(t.target))return!0;var i=this._getActiveItemsContainer(t.target),n=this._getItemsContainers(),r=this._searchActiveItem(t.target),a=this.$element().parents(".".concat(Yl)),o=r[0]===a[0]&&r.length&&a.length,s=this._isIncludeOverlay(i,n)&&r.length;return s||o?(this._getShowSubmenuMode()==="onClick"&&this._hideAllShownChildSubmenus(r),!1):!0}_getActiveItemsContainer(t){return v(t).closest(".".concat(Id))}_getItemsContainers(){return this._overlay.$content().find(".".concat(Id))}_searchActiveItem(t){return v(t).closest(".".concat(Yl)).eq(0)}_isIncludeOverlay(t,i){var n=!1;return F(i,(r,a)=>{t.is(a)&&!n&&(n=!0)}),n}_hideAllShownChildSubmenus(t){var i=t.find(".".concat(Xi)),n=O([],this._shownSubmenus);i.length>0&&F(n,(r,a)=>{var o=this._searchActiveItem(a.context).parent();o.parent().is(t.parent().parent())&&!o.is(t.parent())&&this._hideSubmenu(a)})}_showSubmenu(t){var i=this._dataAdapter.getNodeByItem(this._getItemData(t));if(this._hideSubmenusOnSameLevel(t),!!this._hasSubmenu(i)){var n=t.children(".".concat(Xi)),r=n.length;super._showSubmenu(t),r||this._renderSubmenuItems(i,t),this._isSubmenuVisible(n)||this._drawSubmenu(t)}}_hideSubmenusOnSameLevel(t){var i=t.parent(".".concat(ob)).siblings().find(".".concat(jo));i.length&&(i.removeClass(jo),this._hideSubmenu(i.find(".".concat(Xi))))}_hideSubmenuGroup(t){this._isSubmenuVisible(t)&&this._hideSubmenuCore(t)}_isSubmenuVisible(t){return t.css("visibility")==="visible"}_drawSubmenu(t){var i=this.option("animation")?this.option("animation").show:{},n=t.children(".".concat(Xi)),r=this._getSubmenuPosition(t);this._overlay&&this._overlay.option("visible")&&(E(this._shownSubmenus)||(this._shownSubmenus=[]),this._shownSubmenus.includes(n)||this._shownSubmenus.push(n),i&&$t.stop(n),mi.setup(n,r),i&&(Ye(i.to)&&(i.to.position=r),this._animate(n,i)),n.css("visibility","visible"))}_animate(t,i){$t.animate(t,i)}_getSubmenuPosition(t){var i=this.option("submenuDirection").toLowerCase(),n=t.parent(".".concat(ob)),r={collision:"flip",of:n,offset:{h:0,v:-1}};switch(i){case"left":r.at="left top",r.my="right top";break;case"right":r.at="right top",r.my="left top";break;default:this.option("rtlEnabled")?(r.at="left top",r.my="right top"):(r.at="right top",r.my="left top")}return r}_updateSubmenuVisibilityOnClick(t){if(t.args.length){var i=t.args[0].itemData,n=this._dataAdapter.getNodeByItem(i);if(n){var r=v(t.args[0].itemElement),a=r.find(".".concat(Xi)),o=this._hasSubmenu(n)&&!a.length;if(o&&(this._renderSubmenuItems(n,r),a=r.find(".".concat(Xi))),!(r.context===a.context&&a.css("visibility")==="visible")){this._updateSelectedItemOnClick(t);var s=i&&i.closeMenuOnClick===!1;if(!(!i||i.disabled||s))if(a.length===0){var l=v(r.parents(".".concat(Xi))[0]);this._hideSubmenu(l),!t.canceled&&this._overlay&&this._overlay.option("visible")&&this.option("visible",!1)}else this._shownSubmenus&&this._shownSubmenus.length>0&&this._shownSubmenus[0].is(a)&&this._hideSubmenu(a),this._showSubmenu(r)}}}}_hideSubmenu(t){var i=O([],this._shownSubmenus);F(i,(n,r)=>{(t.is(r)||ca(t[0],r[0]))&&(r.parent().removeClass(jo),this._hideSubmenuCore(r))})}_hideSubmenuCore(t){var i=this._shownSubmenus.indexOf(t),n=this.option("animation")?this.option("animation").hide:null;i>=0&&this._shownSubmenus.splice(i,1),this._stopAnimate(t),n&&this._animate(t,n),t.css("visibility","hidden")}_stopAnimate(t){$t.stop(t,!0)}_hideAllShownSubmenus(){var t=O([],this._shownSubmenus),i=this._overlay.$content().find(".".concat(jo));i.removeClass(jo),F(t,(n,r)=>{this._hideSubmenu(r)})}_visibilityChanged(t){t&&this._renderContentImpl()}_optionChanged(t){if(lb.includes(t.name)){this._initActions();return}switch(t.name){case"visible":this._renderVisibility(t.value);break;case"showEvent":case"position":case"submenuDirection":this._invalidate();break;case"target":t.previousValue&&this._detachShowContextMenuEvents(t.previousValue),this._invalidate();break;case"closeOnOutsideClick":case"hideOnOutsideClick":break;default:super._optionChanged(t)}}_renderVisibility(t){return t?this._show():this._hide()}_toggleVisibility(){}_show(t){var i={jQEvent:t},n=new te().reject().promise();if(this._actions.onShowing(i),i.cancel)return n;var r=this._positionContextMenu(t);if(r){var a;this._overlay||(this._renderContextMenuOverlay(),this._overlay.$content().addClass(this._widgetClass()),this._renderFocusState(),this._attachHoverEvents(),this._attachClickEvent(),this._renderItems(this._dataAdapter.getRootNodes())),this._setOptionWithoutOptionChange("visible",!0),this._overlay.option("position",r),n=this._overlay.show(),t&&t.stopPropagation(),this._setAriaAttributes(),(t==null||(a=t.originalEvent)===null||a===void 0?void 0:a.type)===ma.name&&this.preventShowingDefaultContextMenuAboveOverlay()}return n}_setAriaAttributes(){this._overlayContentId="dx-".concat(new ri),this.setAria("owns",this._overlayContentId),this.setAria({id:this._overlayContentId,role:"menu"},this._overlay.$content())}_cleanAriaAttributes(){this._overlay&&this.setAria("id",null,this._overlay.$content()),this.setAria("owns",void 0)}_getTarget(){return this.option("target")||this.option("position").of||v(fe.getDocument())}_getContextMenuPosition(){return O({},this.option("position"),{of:this._getTarget()})}_positionContextMenu(t){var i=this._getContextMenuPosition(),n=this._isInitialOptionValue("position"),r=this._createActionByOption("onPositioning",a);t&&t.preventDefault&&n&&(i.of=t);var a={position:i,event:t};return r(a),a.cancel?i=null:a.event&&(a.event.cancel=!0,t.preventDefault()),i}_refresh(){if(!Ke())super._refresh();else if(this._overlay){var t=this._overlay.option("position");super._refresh(),this._overlay&&this._overlay.option("position",t)}else super._refresh()}_hide(){var t;return this._overlay&&(t=this._overlay.hide(),this._setOptionWithoutOptionChange("visible",!1)),this._cleanAriaAttributes(),this.option("focusedElement",null),t||new te().reject().promise()}toggle(t){var i=this.option("visible");return t=t===void 0?!i:t,this._renderVisibility(t)}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}}tt("dxContextMenu",sC);var XU="dx-context-menu",ZU={columnHeadersView:"header",rowsView:"content",footerView:"footer",headerPanel:"headerPanel"},QU=["columnHeadersView","rowsView","footerView","headerPanel"],JU=Tt.ViewController.inherit({init:function(){this.createAction("onContextMenuPreparing")},getContextMenuItems:function(e){if(!e)return!1;var t=this,i=v(e.target),n,r,a,o;return F(QU,function(){var s=t.getView(this);if(n=s&&s.element(),n&&(n.is(i)||n.find(i).length)){var l,u;a=i.closest(".dx-row > td, .dx-row > tr"),r=a.parent();var d=s.getRowIndex(r),c=a[0]&&a[0].cellIndex,h=r.data("options"),f={event:e,targetElement:Fe(i),target:ZU[this],rowIndex:d,row:s._getRows()[d],columnIndex:c,column:h==null||(l=h.cells)===null||l===void 0||(u=l[c])===null||u===void 0?void 0:u.column};if(f.items=s.getContextMenuItems&&s.getContextMenuItems(f),t.executeAction("onContextMenuPreparing",f),t._contextMenuPrepared(f),o=f.items,o)return!1}}),o},_contextMenuPrepared:ee}),eK=Tt.View.inherit({_renderCore:function(){var e=this,t=e.element().addClass(XU);this.setAria("role","presentation",t),this._createComponent(t,sC,{onPositioning:function(i){var n=i.event,r=i.component,a=e.getController("contextMenu").getContextMenuItems(n);a?(r.option("items",a),n.stopPropagation()):i.cancel=!0},onItemClick:function(i){i.itemData.onItemClick&&i.itemData.onItemClick(i)},cssClass:e.getWidgetContainerClass(),target:e.component.$element()})}}),tK={defaultOptions:function(){return{onContextMenuPreparing:null}},controllers:{contextMenu:JU},views:{contextMenuView:eK}};De.registerModule("contextMenu",tK);var al="dx-error-row",db="dx-error-message",iK="dx-closebutton",nK="action",rK=Tt.ViewController.inherit({init:function(){this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView")},_createErrorRow:function(e,t){var i=this,n,r,a=this._renderErrorMessage(e);return t?(n=v("<tr>").addClass(al),r=v("<div>").addClass(iK).addClass(i.addWidgetPrefix(nK)),D.on(r,ct,i.createAction(function(o){var s=o.event,l,u=v(s.currentTarget).closest("."+al).index();s.stopPropagation(),F(t,function(d,c){l=v(c).children("tbody").children("tr").eq(u),i.removeErrorRow(l)}),i.getController("resizing")&&i.getController("resizing").fireContentReadyAction()})),v("<td>").attr({colSpan:i.getController("columns").getVisibleColumns().length,role:"presentation"}).prepend(r).append(a).appendTo(n),n):a},_renderErrorMessage:function(e){var t=e.url?e.message.replace(e.url,""):e.message||e,i=v("<div>").addClass(db).text(t);return e.url&&v("<a>").attr("href",e.url).text(e.url).appendTo(i),i},renderErrorRow:function(e,t,i){var n=this,r,a;if(i)return i.find("."+db).remove(),r=n._createErrorRow(e),i.prepend(r),r;var o=t>=0||!n._columnHeadersView.isVisible()?n._rowsView:n._columnHeadersView,s=o.getTableElements();F(s,function(u,d){if(r=n._createErrorRow(e,s),a=a||r,t>=0){var c=o._getRowElements(v(d)).eq(t);n.removeErrorRow(c.next()),r.insertAfter(c)}else{var h=v(d).children("tbody"),f=h.children("tr");n._columnHeadersView.isVisible()?(n.removeErrorRow(f.last()),v(d).append(r)):(n.removeErrorRow(f.first()),h.first().prepend(r))}});var l=n.getController("resizing");return l&&l.fireContentReadyAction(),a},removeErrorRow:function(e){if(!e){var t=this._columnHeadersView&&this._columnHeadersView.element();if(e=t&&t.find("."+al),!e||!e.length){var i=this._rowsView.element();e=i&&i.find("."+al)}}e&&e.hasClass(al)&&e.remove()},optionChanged:function(e){switch(e.name){case"errorRowEnabled":e.handled=!0;break;default:this.callBase(e)}}}),aK={defaultOptions:function(){return{errorRowEnabled:!0}},controllers:{errorHandling:rK},extenders:{controllers:{data:{init:function(){var e=this,t=e.getController("errorHandling");e.callBase(),e.dataErrorOccurred.add(function(i,n){e.option("errorRowEnabled")&&t.renderErrorRow(i,void 0,n)}),e.changed.add(function(i){if(!(i&&i.changeType==="loadError")){var n=e.getController("errorHandling"),r=e.getController("editing");r&&!r.hasChanges()&&n&&n.removeErrorRow()}})}}}}};De.registerModule("errorHandling",aK);var cb="borders",oK="table-fixed",sK="important-margin",RO="dx-gridbase-container",Td="adaptiveHidden",lC=["columnsSeparatorView","blockSeparatorView","trackerView","headerPanel","columnHeadersView","rowsView","footerView","columnChooserView","filterPanelView","pagerView","draggingHeaderView","contextMenuView","errorView","headerFilterView","filterBuilderView"],ol=function(e){return Me(e)&&e.slice(-1)==="%"},lK=function(e){return Me(e)&&e.slice(-2)==="px"},uK=function(e){var t=e.get(0).clientHeight,i=parseFloat(e.css("paddingTop")),n=parseFloat(e.css("paddingBottom"));return t-i-n},kO=function(e,t){var i=e._rowsView.contentWidth(),n=e._getTotalWidth(t,i);return i-n},dK=function(e,t,i,n){return kO(e,n.map(function(r,a){return a===t?i:r}))},cK=function(e,t){XW(e),xe.setSelectionRange(e,t)},hK=Tt.ViewController.inherit({_initPostRenderHandlers:function(){var e=this._dataController;this._refreshSizesHandler||(this._refreshSizesHandler=t=>{e.changed.remove(this._refreshSizesHandler);var i=t&&t.templateDeferreds||[];Ae.apply(this,i).done(()=>{this._refreshSizes(t)})},e.changed.add(()=>{e.changed.add(this._refreshSizesHandler)}))},_refreshSizes:function(e){var t,i=this,n=e&&e.changeType,r=e&&e.isDelayed,a=i._dataController.items();if(!e||n==="refresh"||n==="prepend"||n==="append")r||(t=i.resize());else if(n==="update"){var o;if(((o=e.changeTypes)===null||o===void 0?void 0:o.length)===0)return;(a.length>1||e.changeTypes[0]!=="insert")&&!(a.length===0&&e.changeTypes[0]==="remove")&&!e.needUpdateDimensions?Bi(()=>Zt(()=>Bi(()=>{i._setScrollerSpacing(i._hasHeight),i._rowsView.resize()}))):t=i.resize()}n&&n!=="updateSelection"&&n!=="updateFocusedRow"&&n!=="pageIndex"&&!r&&Ae(t).done(function(){i._setAriaRowColCount(),i.fireContentReadyAction()})},fireContentReadyAction:function(){this.component._fireContentReadyAction()},_setAriaRowColCount:function(){var e=this.component;e.setAria({rowCount:this._dataController.totalItemsCount(),colCount:e.columnCount()},e.$element().children("."+RO))},_getBestFitWidths:function(){var e,t=this._rowsView,i=this._columnHeadersView,n=t.getColumnWidths();if(!((e=n)!==null&&e!==void 0&&e.length)){var r,a=i.getTableElement();i.setTableElement((r=t.getTableElement())===null||r===void 0?void 0:r.children(".dx-header")),n=i.getColumnWidths(),i.setTableElement(a)}return n},_setVisibleWidths:function(e,t){var i=this._columnsController;i.beginUpdate(),F(e,function(n,r){var a=i.getColumnId(r);i.columnOption(a,"visibleWidth",t[n])}),i.endUpdate()},_toggleBestFitModeForView:function(e,t,i){if(!(!e||!e.isVisible())){var n=this._rowsView.getTableElements(),r=e.getTableElements();F(n,(a,o)=>{var s,l=v(o),u=r.eq(a);u&&u.length&&(i?s=u.children("tbody").appendTo(l):s=l.children("."+t).appendTo(u),s.toggleClass(t,i),s.toggleClass(this.addWidgetPrefix("best-fit"),i))})}},_toggleBestFitMode:function(e){var t=this._rowsView.getTableElement(),i=this._rowsView.getTableElements().eq(1);t&&(t.css("tableLayout",e?"auto":"fixed"),t.children("colgroup").css("display",e?"none":""),i.toggleClass(this.addWidgetPrefix(oK),!e),this._toggleBestFitModeForView(this._columnHeadersView,"dx-header",e),this._toggleBestFitModeForView(this._footerView,"dx-footer",e),this._toggleContentMinHeight(e),this._needStretch()&&(t.get(0).style.width=e?"auto":""))},_toggleContentMinHeight:function(e){if(this.option("wordWrapEnabled")){var t=this._rowsView.getScrollable(),i=this._rowsView._findContentElement();(t==null?void 0:t.option("useNative"))===!1&&i.css({minHeight:e?xe.getContentHeightLimit(Bt):""})}},_synchronizeColumns:function(){var e=this._columnsController,t=e.getVisibleColumns(),i=this.option("columnAutoWidth"),n=this._needBestFit(),r=!1,a,o=!1,s=[],l,u;!n&&F(t,function(c,h){if(h.width==="auto")return n=!0,!1}),F(t,function(c,h){if(h.minWidth)return r=!0,!1}),this._setVisibleWidths(t,[]),n&&(l=fe.getActiveElement(),u=xe.getSelectionRange(l),this._toggleBestFitMode(!0),a=!0);var d=this.component.$element();d&&d[0]&&this._maxWidth&&(delete this._maxWidth,d[0].style.maxWidth=""),Bi(()=>{if(n?(s=this._getBestFitWidths(),F(t,function(h,f){var p=e.getColumnId(f);e.columnOption(p,"bestFitWidth",s[h],!0)})):r&&(s=this._getBestFitWidths()),F(t,function(h){var f=this.width;f!=="auto"&&(E(f)?s[h]=xt(f)||lK(f)?parseFloat(f):f:i||(s[h]=void 0))}),a&&(this._toggleBestFitMode(!1),a=!1,l&&l!==fe.getActiveElement())){var c=Gt(l).bottom<0;c||cK(l,u)}o=this._correctColumnWidths(s,t),i&&(function(){var h;F(t,function(f,p){p.type==="groupExpand"&&(h=s[f])}),F(t,function(f,p){p.type==="groupExpand"&&h&&(s[f]=h)})}(),this._needStretch()&&this._processStretch(s,t)),Zt(()=>{(n||o)&&this._setVisibleWidths(t,s)})})},_needBestFit:function(){return this.option("columnAutoWidth")},_needStretch:function(){return this._columnsController.getVisibleColumns().some(e=>e.width==="auto"&&!e.command)},_getAverageColumnsWidth:function(e){var t=kO(this,e),i=e.filter(function(n){return n===void 0}).length;return t/i},_correctColumnWidths:function(e,t){var i=this,n,r=!1,a=!1,o=!1,s=i.component.$element(),l=i._hasWidth,u=function(){var m=n,C=t[m],x=e[m]===Td,T=e[m],R=C.minWidth;if(R){if(T===void 0){var A=i._getAverageColumnsWidth(e);T=A}else if(ol(T)){var H=dK(i,m,R,e);H<0&&(T=-1)}}var $=i._getRealColumnWidth(m,e.map(function(V,U){return m===U?T:V}));R&&!x&&$<R&&(e[m]=R,o=!0,n=-1),E(C.width)||(a=!0),ol(C.width)&&(r=!0)};for(n=0;n<t.length;n++)u();if(!a&&e.length){var d=i._rowsView.element(),c=i._rowsView.contentWidth(),h=i._rowsView.getScrollbarWidth(),f=i._getTotalWidth(e,c);if(f<c){var p=xe.getLastResizableColumnIndex(t,e);if(p>=0&&(e[p]="auto",o=!0,l===!1&&!r)){var g=i.option("showBorders")?Math.ceil(lt(d)-p_(d)):0;i._maxWidth=f+h+g,s.css("maxWidth",i._maxWidth)}}}return o},_processStretch:function(e,t){var i=this._rowsView.contentWidth(),n=this._getTotalWidth(e,i),r={length:0};if(e.length){F(t,function(u){(this.width||e[u]===Td)&&(r[u]=!0,r.length++)});var a=i-n,o=Math.floor(a/(e.length-r.length)),s=a-o*(e.length-r.length);if(a>=0)for(var l=0;l<e.length;l++)r[l]||(e[l]+=o,s>0&&(s<1?(e[l]+=s,s=0):(e[l]++,s--)))}},_getRealColumnWidth:function(e,t,i){var n=1,r=t[e];if(!ol(r))return parseFloat(r);var a=t.reduce((u,d,c)=>ol(d)?u+parseFloat(d):u,0),o=t.reduce((u,d)=>!d||d===Td||ol(d)?u:u+parseFloat(d),0);i=i||this._rowsView.contentWidth();var s=i-o,l=a*i/100;return o>0&&l+o>=i&&(n=l>s?s/l:1),parseFloat(r)*i*n/100},_getTotalWidth:function(e,t){for(var i=0,n=0;n<e.length;n++){var r=e[n];r&&r!==Td&&(i+=this._getRealColumnWidth(n,e,t))}return Math.ceil(i)},updateSize:function(e){var t,i,n=v(e),r=this.addWidgetPrefix(sK);this._hasHeight===void 0&&n&&n.is(":visible")&&$e(n)&&(t=n.children("."+this.getWidgetContainerClass()),t.length&&t.detach(),this._hasHeight=!!uK(n),i=$e(n),n.addClass(r),this._hasWidth=$e(n)===i,n.removeClass(r),t.length&&t.appendTo(n))},publicMethods:function(){return["resize","updateDimensions"]},resize:function(){return!this.component._requireResize&&this.updateDimensions()},updateDimensions:function(e){var t=this;if(t._initPostRenderHandlers(),!!t._checkSize(e)){var i=t._resizeDeferred,n=t._resizeDeferred=new te;return Ae(i).always(function(){Zt(function(){t._dataController.isLoaded()&&t._synchronizeColumns(),t._resetGroupElementHeight(),Bi(function(){Zt(function(){Bi(function(){t._updateDimensionsCore()})})})}).done(n.resolve).fail(n.reject)}),n.promise()}},_resetGroupElementHeight:function(){var e=this.component.$element().children().get(0),t=this._rowsView.getScrollable();e&&e.style.height&&(!t||!t.scrollTop())&&(e.style.height="")},_checkSize:function(e){var t=this.component.$element();return!(e&&(this._lastWidth===$e(t)&&this._lastHeight===je(t)&&this._devicePixelRatio===qe().devicePixelRatio||!t.is(":visible")))},_setScrollerSpacingCore:function(e){var t=this,i=e?t._rowsView.getScrollbarWidth():0,n=t._rowsView.getScrollbarWidth(!0);Zt(function(){t._columnHeadersView&&t._columnHeadersView.setScrollerSpacing(i),t._footerView&&t._footerView.setScrollerSpacing(i),t._rowsView.setScrollerSpacing(i,n)})},_setScrollerSpacing:function(e){this.option("scrolling.useNative")===!0?Zt(()=>{Bi(()=>{this._setScrollerSpacingCore(e)})}):this._setScrollerSpacingCore(e)},_updateDimensionsCore:function(){var e=this,t=e._dataController,i=e._rowsView,n=e.component.$element(),r=n.children().get(0),a=n&&(n.get(0).clientHeight||je(n)),o=parseInt(n.css("maxHeight")),s=o&&a>=o,l=e.option("height")||n.get(0).style.height,u=e.getController("editorFactory"),d=s&&r.scrollHeight===r.offsetHeight,c;e.updateSize(n);var h=e._hasHeight||s;l&&e._hasHeight^l!=="auto"&&(c=v("<div>"),fn(c,l),c.appendTo(n),e._hasHeight=!!je(c),c.remove()),Zt(function(){if(i.height(null,h),s&&!d&&v(r).css("height",o),!t.isLoaded()){i.setLoading(t.isLoading());return}Bi(function(){e._updateLastSizes(n),e._setScrollerSpacing(h),F(lC,function(f,p){var g=e.getView(p);g&&g.resize()}),u&&u.resize()})})},_updateLastSizes:function(e){this._lastWidth=$e(e),this._lastHeight=je(e),this._devicePixelRatio=qe().devicePixelRatio},optionChanged:function(e){switch(e.name){case"width":case"height":this.component._renderDimensions(),this.resize();case"renderAsync":e.handled=!0;return;default:this.callBase(e)}},init:function(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._footerView=this.getView("footerView"),this._rowsView=this.getView("rowsView")}}),fK=Tt.ViewController.inherit({_scrollChangedHandler:function(e,t,i){for(var n=0;n<e.length;n++)e[n]&&e[n].name!==i&&e[n].scrollTo({left:t.left,top:t.top})},init:function(){for(var e=[this.getView("columnHeadersView"),this.getView("footerView"),this.getView("rowsView")],t=0;t<e.length;t++){var i=e[t];i&&i.scrollChanged.add(this._scrollChangedHandler.bind(this,e))}}}),pK=Tt.View.inherit({_endUpdateCore:function(){this.component._requireResize&&(this.component._requireResize=!1,this._resizingController.resize())},_getWidgetAriaLabel:function(){return"dxDataGrid-ariaDataGrid"},init:function(){this._resizingController=this.getController("resizing"),this._dataController=this.getController("data")},getView:function(e){return this.component._views[e]},element:function(){return this._groupElement},optionChanged:function(e){E(this._groupElement)&&e.name==="showBorders"?(this._groupElement.toggleClass(this.addWidgetPrefix(cb),!!e.value),e.handled=!0):this.callBase(e)},_renderViews:function(e){var t=this;F(lC,function(i,n){var r=t.getView(n);r&&r.render(e)})},_getTableRoleName:function(){return"grid"},render:function(e){var t=!this._groupElement,i=this._groupElement||v("<div>").addClass(this.getWidgetContainerClass());i.addClass(RO),i.toggleClass(this.addWidgetPrefix(cb),!!this.option("showBorders")),this.setAria("role","presentation",e),this.component.setAria({role:this._getTableRoleName(),label:ue.format(this._getWidgetAriaLabel())},i),this._rootElement=e||this._rootElement,t&&(this._groupElement=i,Ke()&&this.getController("resizing").updateSize(e),i.appendTo(e)),this._renderViews(i)},update:function(){var e=this._rootElement,t=this._groupElement,i=this.getController("resizing");e&&t&&(i.resize(),this._dataController.isLoaded()&&this._resizingController.fireContentReadyAction())}}),vK={defaultOptions:function(){return{showBorders:!1,renderAsync:!1}},controllers:{resizing:hK,synchronizeScrolling:fK},views:{gridView:pK},VIEW_NAMES:lC};De.registerModule("gridView",vK);var Jh="dxswipestart",ef="dxswipe",Ju="dxswipeend",_K={defaultItemSizeFunc:function(){return $e(this.getElement())},getBounds:function(){return[this._maxLeftOffset,this._maxRightOffset]},calcOffsetRatio:function(e){var t=zt(e);return(t.x-(this._savedEventData&&this._savedEventData.x||0))/this._itemSizeFunc().call(this,e)},isFastSwipe:function(e){var t=zt(e);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.x-this._tickData.x)>=t.time-this._tickData.time}},gK={defaultItemSizeFunc:function(){return je(this.getElement())},getBounds:function(){return[this._maxTopOffset,this._maxBottomOffset]},calcOffsetRatio:function(e){var t=zt(e);return(t.y-(this._savedEventData&&this._savedEventData.y||0))/this._itemSizeFunc().call(this,e)},isFastSwipe:function(e){var t=zt(e);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(t.y-this._tickData.y)>=t.time-this._tickData.time}},mK={horizontal:_K,vertical:gK},CK=ku.inherit({TICK_INTERVAL:300,FAST_SWIPE_SPEED_LIMIT:10,ctor:function(e){this.callBase(e),this.direction="horizontal",this.elastic=!0},_getStrategy:function(){return mK[this.direction]},_defaultItemSizeFunc:function(){return this._getStrategy().defaultItemSizeFunc.call(this)},_itemSizeFunc:function(){return this.itemSizeFunc||this._defaultItemSizeFunc},_init:function(e){this._tickData=zt(e)},_start:function(e){this._savedEventData=zt(e),e=this._fireEvent(Jh,e),e.cancel||(this._maxLeftOffset=e.maxLeftOffset,this._maxRightOffset=e.maxRightOffset,this._maxTopOffset=e.maxTopOffset,this._maxBottomOffset=e.maxBottomOffset)},_move:function(e){var t=this._getStrategy(),i=zt(e),n=t.calcOffsetRatio.call(this,e);n=this._fitOffset(n,this.elastic),i.time-this._tickData.time>this.TICK_INTERVAL&&(this._tickData=i),this._fireEvent(ef,e,{offset:n}),e.preventDefault()},_end:function(e){var t=this._getStrategy(),i=t.calcOffsetRatio.call(this,e),n=t.isFastSwipe.call(this,e),r=i,a=this._calcTargetOffset(i,n);r=this._fitOffset(r,this.elastic),a=this._fitOffset(a,!1),this._fireEvent(Ju,e,{offset:r,targetOffset:a})},_fitOffset:function(e,t){var i=this._getStrategy(),n=i.getBounds.call(this);return e<-n[0]?t?(-2*n[0]+e)/3:-n[0]:e>n[1]?t?(2*n[1]+e)/3:n[1]:e},_calcTargetOffset:function(e,t){var i;return t?(i=Math.ceil(Math.abs(e)),e<0&&(i=-i)):i=Math.round(e),i}});Hs({emitter:CK,events:[Jh,ef,Ju]});var hb="dx-list-item-badge-container",yK="dx-list-item-badge",xK="dx-badge",Ip="dx-list-item-chevron-container",bK="dx-list-item-chevron",SK=Do.inherit({_renderWatchers:function(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this)),this._startWatcher("showChevron",this._renderShowChevron.bind(this))},_renderBadge:function(e){if(this._$element.children("."+hb).remove(),!!e){var t=v("<div>").addClass(hb).append(v("<div>").addClass(yK).addClass(xK).text(e)),i=this._$element.children("."+Ip).first();i.length>0?t.insertBefore(i):t.appendTo(this._$element)}},_renderShowChevron:function(e){if(this._$element.children("."+Ip).remove(),!!e){var t=v("<div>").addClass(Ip),i=v("<div>").addClass(bK);t.append(i).appendTo(this._$element)}}}),fb="dx-scrollview-pull-down-loading",Tp="dx-scrollview-pull-down-ready",EK="dx-scrollview-pull-down-image",wK="dx-scrollview-pull-down-indicator",IK="dx-scrollview-pull-down-text",TK="dx-scrollview-pull-down-text-visible",Ad=0,sl=1,Dd=2,Ap=3,AK=400,DK=zm.inherit({_init:function(e){this.callBase(e),this._$topPocket=e._$topPocket,this._$pullDown=e._$pullDown,this._$refreshingText=e._$refreshingText,this._$scrollViewContent=v(e.content()),this._$container=v(e.container()),this._initCallbacks()},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},render:function(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown:function(){var e=v("<div>").addClass(EK),t=v("<div>").addClass(wK),i=new dn(v("<div>")).$element(),n=this._$pullDownText=v("<div>").addClass(IK);this._$pullingDownText=v("<div>").text(this.option("pullingDownText")).appendTo(n),this._$pulledDownText=v("<div>").text(this.option("pulledDownText")).appendTo(n),this._$refreshingText=v("<div>").text(this.option("refreshingText")).appendTo(n),this._$pullDown.empty().append(e).append(t.append(i)).append(n)},_releaseState:function(){this._state=Ad,this._refreshPullDownText()},_refreshPullDownText:function(){var e=this,t=[{element:this._$pullingDownText,visibleState:Ad},{element:this._$pulledDownText,visibleState:sl},{element:this._$refreshingText,visibleState:Dd}];F(t,function(i,n){var r=e._state===n.visibleState?"addClass":"removeClass";n.element[r](TK)})},update:function(){this.callBase(),this._setTopPocketOffset()},_updateDimensions:function(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;var e=this._$scrollViewContent.get(0),t=this._$container.get(0);this._bottomBoundary=Math.max(e.clientHeight-t.clientHeight,0)},_allowedDirections:function(){var e=this.callBase();return e.vertical=e.vertical||this._pullDownEnabled,e},_setTopPocketOffset:function(){this._$topPocket.css({top:-this._topPocketSize})},handleEnd:function(){this.callBase(),this._complete()},handleStop:function(){this.callBase(),this._complete()},_complete:function(){this._state===sl&&(this._setPullDownOffset(this._topPocketSize),clearTimeout(this._pullDownRefreshTimeout),this._pullDownRefreshTimeout=setTimeout((function(){this._pullDownRefreshing()}).bind(this),400))},_setPullDownOffset:function(e){ti(this._$topPocket,{top:e}),ti(this._$scrollViewContent,{top:e})},handleScroll:function(e){if(this.callBase(e),this._state!==Dd){var t=this.location().top,i=(this._location||0)-t;this._location=t,this._isPullDown()?this._pullDownReady():i>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()}},_isPullDown:function(){return this._pullDownEnabled&&this._location>=this._topPocketSize},_isReachBottom:function(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom:function(){this._state!==Ap&&(this._state=Ap,this.reachBottomCallbacks.fire())},_pullDownReady:function(){this._state!==sl&&(this._state=sl,this._$pullDown.addClass(Tp),this._refreshPullDownText())},_stateReleased:function(){this._state!==Ad&&(this._$pullDown.removeClass(fb).removeClass(Tp),this._releaseState())},_pullDownRefreshing:function(){this._state!==Dd&&(this._state=Dd,this._$pullDown.addClass(fb).removeClass(Tp),this._refreshPullDownText(),this.pullDownCallbacks.fire())},pullDownEnable:function(e){e&&(this._updateDimensions(),this._setTopPocketOffset()),this._pullDownEnabled=e},reachBottomEnable:function(e){this._reachBottomEnabled=e},pendingRelease:function(){this._state=sl},release:function(){var e=new te;return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._state===Ap&&(this._state=Ad),this._releaseTimeout=setTimeout((function(){this._setPullDownOffset(0),this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),e.resolve()}).bind(this),AK),e.promise()},dispose:function(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}}),pb="dx-scrollview-pull-down-loading",OK="dx-scrollview-pull-down-indicator",RK="dx-scrollview-pull-down-refreshing",kK="dx-icon-pulldown",Dp=0,BK=1,vb=2,Op=4,Od=5,LK=zm.inherit({_init:function(e){this.callBase(e),this._$topPocket=e._$topPocket,this._$pullDown=e._$pullDown,this._$scrollViewContent=v(e.content()),this._$container=v(e.container()),this._initCallbacks(),this._location=0},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},render:function(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown:function(){var e=v("<div>").addClass(OK),t=new dn(v("<div>")).$element();this._$icon=v("<div>").addClass(kK),this._$pullDown.empty().append(this._$icon).append(e.append(t))},_releaseState:function(){this._state=Dp,this._releasePullDown(),this._updateDimensions()},_releasePullDown:function(){this._$pullDown.css({opacity:0})},_updateDimensions:function(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;var e=this._$scrollViewContent.get(0),t=this._$container.get(0);this._bottomBoundary=Math.max(e.clientHeight-t.clientHeight,0)},_allowedDirections:function(){var e=this.callBase();return e.vertical=e.vertical||this._pullDownEnabled,e},handleInit:function(e){this.callBase(e),this._state===Dp&&this._location===0&&(this._startClientY=zt(e.originalEvent).y,this._state=Op)},handleMove:function(e){this.callBase(e),this._deltaY=zt(e.originalEvent).y-this._startClientY,this._state===Op&&(this._pullDownEnabled&&this._deltaY>0?this._state=Od:this._complete()),this._state===Od&&(e.preventDefault(),this._movePullDown())},_movePullDown:function(){var e=this._getPullDownHeight(),t=Math.min(3*e,this._deltaY+this._getPullDownStartPosition()),i=180*t/e/3;this._$pullDown.css({opacity:1}).toggleClass(RK,t<e),ti(this._$pullDown,{top:t}),this._$icon.css({transform:"rotate("+i+"deg)"})},_isPullDown:function(){return this._pullDownEnabled&&this._state===Od&&this._deltaY>=this._getPullDownHeight()-this._getPullDownStartPosition()},_getPullDownHeight:function(){return Math.round(.05*at(this._$element))},_getPullDownStartPosition:function(){return-Math.round(1.5*at(this._$pullDown))},handleEnd:function(){this._isPullDown()&&this._pullDownRefreshing(),this._complete()},handleStop:function(){this._complete()},_complete:function(){(this._state===Op||this._state===Od)&&this._releaseState()},handleScroll:function(e){if(this.callBase(e),this._state!==vb){var t=this.location().top,i=this._location-t;this._location=t,i>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()}},_isReachBottom:function(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom:function(){this.reachBottomCallbacks.fire()},_stateReleased:function(){this._state!==Dp&&(this._$pullDown.removeClass(pb),this._releaseState())},_pullDownRefreshing:function(){this._state=vb,this._pullDownRefreshHandler()},_pullDownRefreshHandler:function(){this._refreshPullDown(),this.pullDownCallbacks.fire()},_refreshPullDown:function(){this._$pullDown.addClass(pb),ti(this._$pullDown,{top:this._getPullDownHeight()})},pullDownEnable:function(e){this._$topPocket.toggle(e),this._pullDownEnabled=e},reachBottomEnable:function(e){this._reachBottomEnabled=e},pendingRelease:function(){this._state=BK},release:function(){var e=new te;return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._releaseTimeout=setTimeout((function(){this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),e.resolve()}).bind(this),800),e.promise()},dispose:function(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}}),PK=Math,_b="dx-scrollview-pull-down-loading",Rp="dx-scrollview-pull-down-ready",FK="dx-scrollview-pull-down-image",MK="dx-scrollview-pull-down-indicator",VK="dx-scrollview-pull-down-text",NK="dx-scrollview-pull-down-text-visible",ll=0,ul=1,kp=2,Bp=3,HK=vD.inherit({ctor:function(){this._topPocketSize=0,this._bottomPocketSize=0,this.callBase.apply(this,arguments),this._initCallbacks(),this._releaseState()},_releaseState:function(){this._state=ll,this._refreshPullDownText()},_refreshPullDownText:function(){var e=this,t=[{element:this._$pullingDownText,visibleState:ll},{element:this._$pulledDownText,visibleState:ul},{element:this._$refreshingText,visibleState:kp}];F(t,function(i,n){var r=e._state===n.visibleState?"addClass":"removeClass";n.element[r](NK)})},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},_updateBounds:function(){var e=this._direction!=="horizontal";if(e){this._topPocketSize=this._$topPocket.get(0).clientHeight,this._bottomPocketSize=this._$bottomPocket.get(0).clientHeight;var t=this._$container.get(0),i=this._$content.get(0),n=Math.max(i.clientHeight-t.clientHeight,0);this._bottomBoundary=n-this._topPocketSize-this._bottomPocketSize}this.callBase()},_updateScrollbar:function(){this._scrollbar.option({containerSize:this._containerSize(),contentSize:this._contentSize()-this._topPocketSize-this._bottomPocketSize,scaleRatio:this._getScaleRatio()})},_moveContent:function(){this.callBase(),this._isPullDown()?this._pullDownReady():this._isReachBottom()?this._reachBottomReady():this._state!==ll&&this._stateReleased()},_moveScrollbar:function(){this._scrollbar.moveTo(this._topPocketSize+this._location)},_isPullDown:function(){return this._pullDownEnabled&&this._location>=0},_isReachBottom:function(){var e=this._$container.get(0);return this._reachBottomEnabled&&Math.round(this._bottomBoundary-Math.ceil(e.scrollTop))<=1},_scrollComplete:function(){this._inBounds()&&this._state===ul?this._pullDownRefreshing():this._inBounds()&&this._state===Bp?this._reachBottomLoading():this.callBase()},_reachBottomReady:function(){this._state!==Bp&&(this._state=Bp,this._minOffset=this._getMinOffset())},_getMaxOffset:function(){return-this._topPocketSize},_getMinOffset:function(){return PK.min(this.callBase(),-this._topPocketSize)},_reachBottomLoading:function(){this.reachBottomCallbacks.fire()},_pullDownReady:function(){this._state!==ul&&(this._state=ul,this._maxOffset=0,this._$pullDown.addClass(Rp),this._refreshPullDownText())},_stateReleased:function(){this._state!==ll&&(this._releaseState(),this._updateBounds(),this._$pullDown.removeClass(_b).removeClass(Rp),this.releaseCallbacks.fire())},_pullDownRefreshing:function(){this._state!==kp&&(this._state=kp,this._$pullDown.addClass(_b).removeClass(Rp),this._refreshPullDownText(),this.pullDownCallbacks.fire())},_releaseHandler:function(){return this._state===ll&&this._moveToBounds(),this._update(),this._releaseTask&&this._releaseTask.abort(),this._releaseTask=Th(this._release.bind(this)),this._releaseTask.promise},_release:function(){this._stateReleased(),this._scrollComplete()},_reachBottomEnablingHandler:function(e){this._reachBottomEnabled!==e&&(this._reachBottomEnabled=e,this._updateBounds())},_pullDownEnablingHandler:function(e){this._pullDownEnabled!==e&&(this._pullDownEnabled=e,this._considerTopPocketChange(),this._updateHandler())},_considerTopPocketChange:function(){this._location-=je(this._$topPocket)||-this._topPocketSize,this._maxOffset=0,this._move()},_pendingReleaseHandler:function(){this._state=ul},dispose:function(){this._releaseTask&&this._releaseTask.abort(),this.callBase()}}),$K=_D.inherit({_init:function(e){this.callBase(e),this._$pullDown=e._$pullDown,this._$topPocket=e._$topPocket,this._$bottomPocket=e._$bottomPocket,this._initCallbacks()},_initCallbacks:function(){this.pullDownCallbacks=dt(),this.releaseCallbacks=dt(),this.reachBottomCallbacks=dt()},render:function(){this._renderPullDown(),this.callBase()},_renderPullDown:function(){var e=v("<div>").addClass(FK),t=v("<div>").addClass(MK),i=new dn(v("<div>")).$element(),n=this._$pullDownText=v("<div>").addClass(VK);this._$pullingDownText=v("<div>").text(this.option("pullingDownText")).appendTo(n),this._$pulledDownText=v("<div>").text(this.option("pulledDownText")).appendTo(n),this._$refreshingText=v("<div>").text(this.option("refreshingText")).appendTo(n),this._$pullDown.empty().append(e).append(t.append(i)).append(n)},pullDownEnable:function(e){this._eventHandler("pullDownEnabling",e)},reachBottomEnable:function(e){this._eventHandler("reachBottomEnabling",e)},_createScroller:function(e){var t=this,i=t._scrollers[e]=new HK(t._scrollerOptions(e));i.pullDownCallbacks.add(function(){t.pullDownCallbacks.fire()}),i.releaseCallbacks.add(function(){t.releaseCallbacks.fire()}),i.reachBottomCallbacks.add(function(){t.reachBottomCallbacks.fire()})},_scrollerOptions:function(e){return O(this.callBase(e),{$topPocket:this._$topPocket,$bottomPocket:this._$bottomPocket,$pullDown:this._$pullDown,$pullDownText:this._$pullDownText,$pullingDownText:this._$pullingDownText,$pulledDownText:this._$pulledDownText,$refreshingText:this._$refreshingText})},pendingRelease:function(){this._eventHandler("pendingRelease")},release:function(){return this._eventHandler("release").done(this._updateAction)},location:function(){var e=this.callBase();return e.top+=je(this._$topPocket),e},dispose:function(){F(this._scrollers,function(){this.dispose()}),this.callBase()}}),ko="dx-scrollview",WK=ko+"-content",zK=ko+"-top-pocket",GK=ko+"-bottom-pocket",UK=ko+"-pull-down",uC=ko+"-scrollbottom",KK=uC+"-indicator",jK=uC+"-text",qK=ko+"-loadpanel",YK={pullDown:DK,swipeDown:LK,simulated:$K},XK=!Ke(),ZK={finishLoading:ee,release:ee,refresh:ee,_optionChanged:function(e){if(e.name!=="onUpdated")return this.callBase.apply(this,arguments)}},dC=cn.inherit(XK?ZK:{_getDefaultOptions:function(){return O(this.callBase(),{pullingDownText:ue.format("dxScrollView-pullingDownText"),pulledDownText:ue.format("dxScrollView-pulledDownText"),refreshingText:ue.format("dxScrollView-refreshingText"),reachBottomText:ue.format("dxScrollView-reachBottomText"),onPullDown:null,onReachBottom:null,refreshStrategy:"pullDown"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){var e=Oe.real();return e.platform==="android"},options:{refreshStrategy:"swipeDown"}},{device:function(){return Qt()},options:{pullingDownText:"",pulledDownText:"",refreshingText:"",reachBottomText:""}}])},_init:function(){this.callBase(),this._loadingIndicatorEnabled=!0},_initScrollableMarkup:function(){this.callBase(),this.$element().addClass(ko),this._initContent(),this._initTopPocket(),this._initBottomPocket(),this._initLoadPanel()},_initContent:function(){var e=v("<div>").addClass(WK);this._$content.wrapInner(e)},_initTopPocket:function(){var e=this._$topPocket=v("<div>").addClass(zK),t=this._$pullDown=v("<div>").addClass(UK);e.append(t),this._$content.prepend(e)},_initBottomPocket:function(){var e=this._$bottomPocket=v("<div>").addClass(GK),t=this._$reachBottom=v("<div>").addClass(uC),i=v("<div>").addClass(KK),n=new dn(v("<div>")).$element(),r=this._$reachBottomText=v("<div>").addClass(jK);this._updateReachBottomText(),t.append(i.append(n)).append(r),e.append(t),this._$content.append(e)},_initLoadPanel:function(){var e=v("<div>").addClass(qK).appendTo(this.$element()),t={shading:!1,delay:400,message:this.option("refreshingText"),position:{of:this.$element()}};this._loadPanel=this._createComponent(e,bm,t)},_updateReachBottomText:function(){this._$reachBottomText.text(this.option("reachBottomText"))},_createStrategy:function(){var e=this.option("useNative")?this.option("refreshStrategy"):"simulated",t=YK[e];this._strategy=new t(this),this._strategy.pullDownCallbacks.add(this._pullDownHandler.bind(this)),this._strategy.releaseCallbacks.add(this._releaseHandler.bind(this)),this._strategy.reachBottomCallbacks.add(this._reachBottomHandler.bind(this))},_createActions:function(){this.callBase(),this._pullDownAction=this._createActionByOption("onPullDown"),this._reachBottomAction=this._createActionByOption("onReachBottom"),this._tryRefreshPocketState()},_tryRefreshPocketState:function(){this._pullDownEnable(this.hasActionSubscription("onPullDown")),this._reachBottomEnable(this.hasActionSubscription("onReachBottom"))},on:function(e){var t=this.callBase.apply(this,arguments);return(e==="pullDown"||e==="reachBottom")&&this._tryRefreshPocketState(),t},_pullDownEnable:function(e){if(arguments.length===0)return this._pullDownEnabled;this._$pullDown&&this._strategy&&(this._$pullDown.toggle(e),this._strategy.pullDownEnable(e),this._pullDownEnabled=e)},_reachBottomEnable:function(e){if(arguments.length===0)return this._reachBottomEnabled;this._$reachBottom&&this._strategy&&(this._$reachBottom.toggle(e),this._strategy.reachBottomEnable(e),this._reachBottomEnabled=e)},_pullDownHandler:function(){this._loadingIndicator(!1),this._pullDownLoading()},_loadingIndicator:function(e){if(arguments.length<1)return this._loadingIndicatorEnabled;this._loadingIndicatorEnabled=e},_pullDownLoading:function(){this.startLoading(),this._pullDownAction()},_reachBottomHandler:function(){this._loadingIndicator(!1),this._reachBottomLoading()},_reachBottomLoading:function(){this.startLoading(),this._reachBottomAction()},_releaseHandler:function(){this.finishLoading(),this._loadingIndicator(!0)},_optionChanged:function(e){switch(e.name){case"onPullDown":case"onReachBottom":this._createActions();break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"refreshStrategy":this._invalidate();break;case"reachBottomText":this._updateReachBottomText();break;default:this.callBase(e)}},content:function(){return Fe(this._$content.children().eq(1))},release:function(e){return e!==void 0&&this.toggleLoading(!e),this._strategy.release()},toggleLoading:function(e){this._reachBottomEnable(e)},refresh:function(){this.hasActionSubscription("onPullDown")&&(this._strategy.pendingRelease(),this._pullDownLoading())},startLoading:function(){this._loadingIndicator()&&this.$element().is(":visible")&&this._loadPanel.show(),this._lock()},finishLoading:function(){this._loadPanel.hide(),this._unlock()},_dispose:function(){this._strategy.dispose(),this.callBase(),this._loadPanel&&this._loadPanel.$element().remove()}});tt("dxScrollView",dC);var Rd="__dx_key__";const cC=Ro.inherit({_getDefaultOptions:function(){return O(this.callBase(),{repaintChangesOnly:!1})},ctor:function(){this.callBase.apply(this,arguments),this._customizeStoreLoadOptions=e=>{var t=this._dataSource;t&&!t.isLoaded()&&(this._correctionIndex=0),this._correctionIndex&&e.storeLoadOptions&&(e.storeLoadOptions.skip+=this._correctionIndex)},this._dataSource&&this._dataSource.on("customizeStoreLoadOptions",this._customizeStoreLoadOptions)},reload:function(){this._correctionIndex=0},_init:function(){this.callBase(),this._refreshItemsCache(),this._correctionIndex=0},_findItemElementByKey:function(e){var t=v(),i=this.key();return this.itemElements().each((n,r)=>{var a=v(r),o=this._getItemData(a);if(i?Bu(i,this.keyOf(o),e):this._isItemEquals(o,e))return t=a,!1}),t},_dataSourceChangedHandler:function(e,t){t!=null&&t.changes?this._modifyByChanges(t.changes):(this.callBase(e,t),this._refreshItemsCache())},_isItemEquals:function(e,t){e&&e[Rd]&&(e=e.data);try{return JSON.stringify(e)===JSON.stringify(t)}catch{return e===t}},_isItemStrictEquals:function(e,t){return this._isItemEquals(e,t)},_shouldAddNewGroup:function(e,t){var i=!1;return this.option("grouped")&&(e.length||(i=!0),F(e,(n,r)=>{r.type==="insert"&&(i=!0,F(t,(a,o)=>{if(r.data.key!==void 0&&r.data.key===o.key)return i=!1,!1}))})),i},_partialRefresh:function(){if(this.option("repaintChangesOnly")){var e=iD(this._itemsCache,this._editStrategy.itemsGetter(),t=>t&&t[Rd]!==void 0?t[Rd]:this.keyOf(t),this._isItemStrictEquals.bind(this));if(e&&this._itemsCache.length&&!this._shouldAddNewGroup(e,this._itemsCache))return this._modifyByChanges(e,!0),this._renderEmptyMessage(),!0;this._refreshItemsCache()}return!1},_refreshItemsCache:function(){if(this.option("repaintChangesOnly")){var e=this._editStrategy.itemsGetter();try{this._itemsCache=O(!0,[],e),this.key()||(this._itemsCache=this._itemsCache.map((t,i)=>({[Rd]:e[i],data:t})))}catch{this._itemsCache=O([],e)}}},_dispose:function(){this._dataSource&&this._dataSource.off("customizeStoreLoadOptions",this._customizeStoreLoadOptions),this.callBase()},_updateByChange:function(e,t,i,n){if(n)this._renderItem(i.index,i.data,null,this._findItemElementByKey(i.key));else{var r=t[go(e,t,i.key)];r&&Dm(e,t,i.key,i.data).done(()=>{this._renderItem(t.indexOf(r),r,null,this._findItemElementByKey(i.key))})}},_insertByChange:function(e,t,i,n){Ae(n||Om(e,t,i.data,i.index)).done(()=>{var r;this._beforeItemElementInserted(i);var a=this._getItemContainer(i.data);this._renderItem((r=i.index)!==null&&r!==void 0?r:t.length,i.data,a),this._afterItemElementInserted(),this._correctionIndex++})},_getItemContainer:function(e){return this._itemContainer()},_updateSelectionAfterRemoveByChange:function(e){var t=this.option("selectedIndex");t>e?this.option("selectedIndex",t-1):t===e&&this.option("selectedItems").length===1?this.option("selectedItems",[]):this._normalizeSelectedItems()},_beforeItemElementInserted:function(e){var t=this.option("selectedIndex");e.index<=t&&this.option("selectedIndex",t+1)},_afterItemElementInserted:ee,_removeByChange:function(e,t,i,n){var r=n?i.index:go(e,t,i.key),a=n?i.oldItem:t[r];if(a){var o=this._findItemElementByKey(i.key),s=this._extendActionArgs(o);this._waitDeletingPrepare(o).done(()=>{n?(this._updateIndicesAfterIndex(r-1),this._afterItemElementDeleted(o,s),this._updateSelectionAfterRemoveByChange(r)):(this._deleteItemElementByIndex(r),this._afterItemElementDeleted(o,s))}),this._correctionIndex--}},_modifyByChanges:function(e,t){var i=this._editStrategy.itemsGetter(),n={key:this.key.bind(this),keyOf:this.keyOf.bind(this)},r=this._dataSource,a=r&&r.paginate(),o=r&&r.group();(a||o)&&(e=e.filter(s=>s.type!=="insert"||s.index!==void 0)),e.forEach(s=>this["_".concat(s.type,"ByChange")](n,i,s,t)),this._renderedItemsCount=i.length,this._refreshItemsCache(),this._fireContentReadyAction()},_appendItemToContainer:function(e,t,i){var n=e.children(this._itemSelector()).get(i);fe.insertElement(e.get(0),t.get(0),n)},_optionChanged:function(e){switch(e.name){case"items":var t=this._partialRefresh(e.value);t||this.callBase(e);break;case"dataSource":(!this.option("repaintChangesOnly")||!e.value)&&this.option("items",[]),this.callBase(e);break;case"repaintChangesOnly":break;default:this.callBase(e)}}});var QK=e=>Array.isArray(e)&&e.every(t=>{var i=Object.keys(t).length===2,n="key"in t&&"items"in t;return i&&n&&Array.isArray(t.items)});const BO={_getSpecificDataSourceOption:function(){var e=this.option("dataSource"),t=!1,i={};return this._getGroupedOption()&&QK(e)&&(i=e.reduce((n,r)=>{var a=r.items.map(o=>(He(o)||(o={text:o},t=!0),"key"in o||(o.key=r.key),o));return n.concat(a)},[]),e={store:{type:"array",data:i},group:{selector:"key",keepInitialKeyOrder:!0}},t&&(e.searchExpr="text")),e}};var JK="dx-list",wc="dx-list-item",e8="."+wc,t8="dx-list-item-icon-container",i8="dx-list-item-icon",qo="dx-list-group",Lp="dx-list-group-header",kd="dx-list-group-body",n8="dx-list-collapsible-groups",gb="dx-list-group-collapsed",r8="dx-list-group-header-indicator",a8="dx-has-next",o8="dx-list-next-button",mb="dx-wrap-item-text",s8=".dx-list-select-all",l8="dxListItemData",Cb=70,u8=mt("items"),hC=cC.inherit({_activeStateUnit:[e8,s8].join(","),_supportedKeys:function(){var e=this,t=function(n){var r=i(n),a=r.is(e.option("focusedElement"));a&&(function(o,s){var l=o.position().top;s==="prev"&&(l=o.position().top-je(e.$element())+at(o)),e.scrollTo(l)}(r,n),r=i(n)),e.option("focusedElement",Fe(r)),e.scrollToItem(r)};function i(n){var r=e.scrollTop(),a=je(e.$element()),o=v(e.option("focusedElement")),s=!0;if(!o.length)return v();for(;s;){var l=o[n]();if(!l.length)break;var u=l.position().top+at(l)/2;s=u<a+r&&u>r,s&&(o=l)}return o}return O(this.callBase(),{leftArrow:ee,rightArrow:ee,pageUp:function(){return t("prev"),!1},pageDown:function(){return t("next"),!1}})},_getDefaultOptions:function(){return O(this.callBase(),{hoverStateEnabled:!0,pullRefreshEnabled:!1,scrollingEnabled:!0,showScrollbar:"onScroll",useNativeScrolling:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,pullingDownText:ue.format("dxList-pullingDownText"),pulledDownText:ue.format("dxList-pulledDownText"),refreshingText:ue.format("dxList-refreshingText"),pageLoadingText:ue.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:ue.format("dxList-nextButtonText"),onItemSwipe:null,grouped:!1,onGroupRendered:null,collapsibleGroups:!1,groupTemplate:"group",indicateLoading:!0,activeStateEnabled:!0,_itemAttributes:{role:"option"},_listAttributes:{role:"listbox"},useInkRipple:!1,wrapItemText:!1,_swipeEnabled:!0,_revertPageOnEmptyLoad:!1,showChevronExpr:function(e){return e?e.showChevron:void 0},badgeExpr:function(e){return e?e.badge:void 0}})},_defaultOptionsRules:function(){var e=Un();return this.callBase().concat(gD(),[{device:function(){return!po},options:{useNativeScrolling:!1}},{device:function(t){return!po&&!Oe.isSimulator()&&Oe.real().deviceType==="desktop"&&t.platform==="generic"},options:{showScrollbar:"onHover",pageLoadMode:"nextButton"}},{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return Qt(e)},options:{pullingDownText:"",pulledDownText:"",refreshingText:"",pageLoadingText:"",useInkRipple:!0}}])},_visibilityChanged:function(e){e&&this._updateLoadingState(!0)},_itemClass:function(){return wc},_itemDataKey:function(){return l8},_itemContainer:function(){return this._$container},_saveSelectionChangeEvent:function(e){this._selectionChangeEventInstance=e},_getSelectionChangeEvent:function(){return this._selectionChangeEventInstance},_refreshItemElements:function(){this.option("grouped")?this._itemElementsCache=this._itemContainer().children("."+qo).children("."+kd).children(this._itemSelector()):this._itemElementsCache=this._itemContainer().children(this._itemSelector())},_modifyByChanges:function(){this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},reorderItem:function(e,t){var i=this.callBase(e,t);return i.done(function(){this._refreshItemElements()})},deleteItem:function(e){var t=this.callBase(e);return t.done(function(){this._refreshItemElements()})},_itemElements:function(){return this._itemElementsCache},_itemSelectHandler:function(e){if(!(this.option("selectionMode")==="single"&&this.isItemSelected(e.currentTarget)))return this.callBase(e)},_allowDynamicItemsAppend:function(){return!0},_resetDataSourcePageIndex:function(){var e=this.getDataSource();e&&e.pageIndex()!==0&&(e.pageIndex(0),e.load())},_init:function(){this.callBase(),this._resetDataSourcePageIndex(),this._$container=this.$element(),this._initScrollView(),this._feedbackShowTimeout=Cb,this._createGroupRenderAction()},_scrollBottomMode:function(){return this.option("pageLoadMode")==="scrollBottom"},_nextButtonMode:function(){return this.option("pageLoadMode")==="nextButton"},_dataSourceOptions:function(){var e=this._scrollBottomMode(),t=this._nextButtonMode();return O(this.callBase(),{paginate:Ft(e||t,!0)})},_getGroupedOption:function(){return this.option("grouped")},_getGroupContainerByIndex:function(e){return this._itemContainer().find(".".concat(qo)).eq(e).find(".".concat(kd))},_dataSourceFromUrlLoadMode:function(){return"raw"},_initScrollView:function(){var e=this.option("scrollingEnabled"),t=e&&this.option("pullRefreshEnabled"),i=e&&this._scrollBottomMode()&&!!this._dataSource;this._scrollView=this._createComponent(this.$element(),d8(),{height:this.option("height"),width:this.option("width"),disabled:this.option("disabled")||!e,onScroll:this._scrollHandler.bind(this),onPullDown:t?this._pullDownHandler.bind(this):null,onReachBottom:i?this._scrollBottomHandler.bind(this):null,showScrollbar:this.option("showScrollbar"),useNative:this.option("useNativeScrolling"),bounceEnabled:this.option("bounceEnabled"),scrollByContent:this.option("scrollByContent"),scrollByThumb:this.option("scrollByThumb"),pullingDownText:this.option("pullingDownText"),pulledDownText:this.option("pulledDownText"),refreshingText:this.option("refreshingText"),reachBottomText:this.option("pageLoadingText"),useKeyboard:!1}),this._$container=v(this._scrollView.content()),this.option("wrapItemText")&&this._$container.addClass(mb),this._createScrollViewActions()},_createScrollViewActions:function(){this._scrollAction=this._createActionByOption("onScroll"),this._pullRefreshAction=this._createActionByOption("onPullRefresh"),this._pageLoadingAction=this._createActionByOption("onPageLoading")},_scrollHandler:function(e){this._scrollAction&&this._scrollAction(e)},_initTemplates:function(){this._templateManager.addDefaultTemplates({group:new Oo(function(e,t){Ye(t)?t.key&&e.text(t.key):e.text(String(t))},["key"],this.option("integrationOptions.watchMethod"))}),this.callBase()},_prepareDefaultItemTemplate:function(e,t){if(this.callBase(e,t),e.icon){var i=mo(e.icon).addClass(i8),n=v("<div>").addClass(t8);n.append(i),t.prepend(n)}},_getBindableFields:function(){return["text","html","icon"]},_updateLoadingState:function(e){var t=!e||this._isLastPage(),i=this._scrollBottomMode(),n=t||!i,r=n&&!this._isDataSourceLoading();n||this._scrollViewIsFull()?(this._scrollView.release(r),this._toggleNextButton(this._shouldRenderNextButton()&&!this._isLastPage()),this._loadIndicationSuppressed(!1)):this._infiniteDataLoading()},_shouldRenderNextButton:function(){return this._nextButtonMode()&&this._dataSource&&this._dataSource.isLoaded()},_isDataSourceFirstLoadCompleted:function(e){return E(e)&&(this._isFirstLoadCompleted=e),this._isFirstLoadCompleted},_dataSourceLoadingChangedHandler:function(e){this._loadIndicationSuppressed()||(e&&this.option("indicateLoading")?this._showLoadingIndicatorTimer=setTimeout((function(){var t=!this._itemElements().length,i=!t||this._isDataSourceFirstLoadCompleted();if(i){var n;(n=this._scrollView)===null||n===void 0||n.startLoading()}}).bind(this)):(clearTimeout(this._showLoadingIndicatorTimer),this._scrollView&&this._scrollView.finishLoading()),e||this._isDataSourceFirstLoadCompleted(!1))},_dataSourceChangedHandler:function(){!this._shouldAppendItems()&&Ke()&&this._scrollView&&this._scrollView.scrollTo(0),this.callBase.apply(this,arguments),this._isDataSourceFirstLoadCompleted(!0)},_refreshContent:function(){this._prepareContent(),this._fireContentReadyAction()},_hideLoadingIfLoadIndicationOff:function(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_loadIndicationSuppressed:function(e){if(!arguments.length)return this._isLoadIndicationSuppressed;this._isLoadIndicationSuppressed=e},_scrollViewIsFull:function(){var e=this._scrollView;return!e||je(e.content())>je(e.container())},_pullDownHandler:function(e){this._pullRefreshAction(e),this._dataSource&&!this._isDataSourceLoading()?(this._clearSelectedItems(),this._dataSource.pageIndex(0),this._dataSource.reload()):this._updateLoadingState()},_infiniteDataLoading:function(){var e=this.$element().is(":visible");e&&!this._scrollViewIsFull()&&!this._isDataSourceLoading()&&!this._isLastPage()&&(clearTimeout(this._loadNextPageTimer),this._loadNextPageTimer=setTimeout(()=>{this._loadNextPage().done(this._setPreviousPageIfNewIsEmpty.bind(this))}))},_setPreviousPageIfNewIsEmpty:function(e){if(this.option("_revertPageOnEmptyLoad")){var t=this.getDataSource(),i=t==null?void 0:t.pageIndex();(e==null?void 0:e.length)===0&&i>0&&(this._fireContentReadyAction(),t.pageIndex(i-1))}},_scrollBottomHandler:function(e){this._pageLoadingAction(e),!this._isDataSourceLoading()&&!this._isLastPage()?this._loadNextPage():this._updateLoadingState()},_renderItems:function(e){this.option("grouped")?(F(e,this._renderGroup.bind(this)),this._attachGroupCollapseEvent(),this._renderEmptyMessage(),Qt()&&this.attachGroupHeaderInkRippleEvents()):this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},_attachGroupCollapseEvent:function(){var e=me(ct,this.NAME),t="."+Lp,i=this.$element(),n=this.option("collapsibleGroups");i.toggleClass(n8,n),D.off(i,e,t),n&&D.on(i,e,t,(function(r){this._createAction((function(a){var o=v(a.event.currentTarget).parent();this._collapseGroupHandler(o),this.option("focusStateEnabled")&&this.option("focusedElement",Fe(o.find("."+wc).eq(0)))}).bind(this),{validatingTargetName:"element"})({event:r})}).bind(this))},_collapseGroupHandler:function(e,t){var i=new te;if(e.hasClass(gb)===t)return i.resolve();var n=e.children("."+kd),r=at(n),a=0;return r===0&&(fn(n,"auto"),a=at(n)),e.toggleClass(gb,t),$t.animate(n,{type:"custom",from:{height:r},to:{height:a},duration:200,complete:(function(){this.updateDimensions(),this._updateLoadingState(),i.resolve()}).bind(this)}),i.promise()},_dataSourceLoadErrorHandler:function(){this._forgetNextPageLoading(),this._initialized&&(this._renderEmptyMessage(),this._updateLoadingState())},_initMarkup:function(){this._itemElementsCache=v(),this.$element().addClass(JK),this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.setAria("role",this.option("_listAttributes").role)},_renderInkRipple:function(){this._inkRipple=Gm()},_toggleActiveState:function(e,t,i){this.callBase.apply(this,arguments);var n=this;if(this._inkRipple){var r={element:e,event:i};t?Qt()?this._inkRippleTimer=setTimeout(function(){n._inkRipple.showWave(r)},Cb/2):n._inkRipple.showWave(r):(clearTimeout(this._inkRippleTimer),this._inkRipple.hideWave(r))}},_postprocessRenderItem:function(e){this._refreshItemElements(),this.callBase.apply(this,arguments),this.option("_swipeEnabled")&&this._attachSwipeEvent(v(e.itemElement))},_attachSwipeEvent:function(e){var t=me(Ju,this.NAME);D.on(e,t,this._itemSwipeEndHandler.bind(this))},_itemSwipeEndHandler:function(e){this._itemDXEventHandler(e,"onItemSwipe",{direction:e.offset<0?"left":"right"})},_nextButtonHandler:function(e){this._pageLoadingAction(e);var t=this._dataSource;t&&!t.isLoading()&&(this._scrollView.toggleLoading(!0),this._$nextButton.detach(),this._loadIndicationSuppressed(!0),this._loadNextPage())},_renderGroup:function(e,t){var i=v("<div>").addClass(qo).appendTo(this._itemContainer()),n=v("<div>").addClass(Lp).appendTo(i),r=this.option("groupTemplate"),a=this._getTemplate(t.template||r,t,e,n),o={index:e,itemData:t,container:Fe(n)};this._createItemByTemplate(a,o),Qt()&&v("<div>").addClass(r8).prependTo(n),this._renderingGroupIndex=e;var s=v("<div>").addClass(kd).appendTo(i);F(u8(t)||[],(function(l,u){this._renderItem({group:e,item:l},u,s)}).bind(this)),this._groupRenderAction({groupElement:Fe(i),groupIndex:e,groupData:t})},downInkRippleHandler:function(e){this._toggleActiveState(v(e.currentTarget),!0,e)},upInkRippleHandler:function(e){this._toggleActiveState(v(e.currentTarget),!1)},attachGroupHeaderInkRippleEvents:function(){var e="."+Lp,t=this.$element();this._downInkRippleHandler=this._downInkRippleHandler||this.downInkRippleHandler.bind(this),this._upInkRippleHandler=this._upInkRippleHandler||this.upInkRippleHandler.bind(this);var i=[t,"dxpointerdown",e,this._downInkRippleHandler],n=[t,"dxpointerup dxpointerout",e,this._upInkRippleHandler];D.off(...i),D.on(...i),D.off(...n),D.on(...n)},_createGroupRenderAction:function(){this._groupRenderAction=this._createActionByOption("onGroupRendered")},_clean:function(){clearTimeout(this._inkRippleTimer),this._$nextButton&&(this._$nextButton.remove(),this._$nextButton=null),delete this._inkRipple,this.callBase.apply(this,arguments)},_dispose:function(){this._isDataSourceFirstLoadCompleted(!1),clearTimeout(this._holdTimer),clearTimeout(this._loadNextPageTimer),clearTimeout(this._showLoadingIndicatorTimer),this.callBase()},_toggleDisabledState:function(e){this.callBase(e),this._scrollView.option("disabled",e||!this.option("scrollingEnabled"))},_toggleNextButton:function(e){var t=this._dataSource,i=this._getNextButton();this.$element().toggleClass(a8,e),e&&t&&t.isLoaded()&&i.appendTo(this._itemContainer()),e||i.detach()},_getNextButton:function(){return this._$nextButton||(this._$nextButton=this._createNextButton()),this._$nextButton},_createNextButton:function(){var e=v("<div>").addClass(o8),t=v("<div>").appendTo(e);return this._createComponent(t,Si,{text:this.option("nextButtonText"),onClick:this._nextButtonHandler.bind(this),type:Qt()?"default":void 0,integrationOptions:{}}),e},_moveFocus:function(){this.callBase.apply(this,arguments),this.scrollToItem(this.option("focusedElement"))},_refresh:function(){if(!Ke())this.callBase();else{var e=this._scrollView.scrollTop();this.callBase(),e&&this._scrollView.scrollTo(e)}},_optionChanged:function(e){switch(e.name){case"pageLoadMode":this._toggleNextButton(e.value),this._initScrollView();break;case"dataSource":this.callBase(e),this._initScrollView(),this._isDataSourceFirstLoadCompleted(!1);break;case"items":this.callBase(e),this._isDataSourceFirstLoadCompleted(!1);break;case"pullingDownText":case"pulledDownText":case"refreshingText":case"pageLoadingText":case"showScrollbar":case"bounceEnabled":case"scrollByContent":case"scrollByThumb":case"useNativeScrolling":case"scrollingEnabled":case"pullRefreshEnabled":this._initScrollView(),this._updateLoadingState();break;case"nextButtonText":case"onItemSwipe":case"useInkRipple":this._invalidate();break;case"onScroll":case"onPullRefresh":case"onPageLoading":this._createScrollViewActions();break;case"grouped":case"collapsibleGroups":case"groupTemplate":this._invalidate();break;case"wrapItemText":this._$container.toggleClass(mb,e.value);break;case"onGroupRendered":this._createGroupRenderAction();break;case"width":case"height":this.callBase(e),this._scrollView.option(e.name,e.value),this._scrollView.update();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;case"visible":this.callBase(e),this._scrollView.update();break;case"rtlEnabled":this._initScrollView(),this.callBase(e);break;case"showChevronExpr":case"badgeExpr":this._invalidate();break;case"_swipeEnabled":case"_revertPageOnEmptyLoad":case"_listAttributes":break;default:this.callBase(e)}},_extendActionArgs:function(e){if(!this.option("grouped"))return this.callBase(e);var t=e.closest("."+qo),i=t.find("."+wc);return O(this.callBase(e),{itemIndex:{group:t.index(),item:i.index(e)}})},expandGroup:function(e){var t=new te,i=this._itemContainer().find("."+qo).eq(e);return this._collapseGroupHandler(i,!1).done((function(){t.resolveWith(this)}).bind(this)),t.promise()},collapseGroup:function(e){var t=new te,i=this._itemContainer().find("."+qo).eq(e);return this._collapseGroupHandler(i,!0).done((function(){t.resolveWith(this)}).bind(this)),t},updateDimensions:function(){var e=this,t=new te;return e._scrollView?e._scrollView.update().done(function(){!e._scrollViewIsFull()&&e._updateLoadingState(!0),t.resolveWith(e)}):t.resolveWith(e),t.promise()},reload:function(){this.callBase(),this.scrollTo(0),this._pullDownHandler()},repaint:function(){this.scrollTo(0),this.callBase()},scrollTop:function(){return this._scrollView.scrollOffset().top},clientHeight:function(){return this._scrollView.clientHeight()},scrollHeight:function(){return this._scrollView.scrollHeight()},scrollBy:function(e){this._scrollView.scrollBy(e)},scrollTo:function(e){this._scrollView.scrollTo(e)},scrollToItem:function(e){var t=this._editStrategy.getItemElement(e);this._scrollView.scrollToElement(t==null?void 0:t.get(0))},_dimensionChanged:function(){this.updateDimensions()}}).include(BO);hC.ItemClass=SK;function d8(){return dC}var Pp="dx-toolbar-menu-action",c8="dx-toolbar-hidden-button",h8="dx-toolbar-hidden-button-group",yb="dx-toolbar-menu-section",xb="dx-toolbar-menu-last-section",LO=hC.inherit({_activeStateUnit:"."+Pp,_initMarkup:function(){this._renderSections(),this.callBase()},_getSections:function(){return this._itemContainer().children()},_itemElements:function(){return this._getSections().children(this._itemSelector())},_renderSections:function(){var e=this,t=this._itemContainer();F(["before","center","after","menu"],function(){var i="_$"+this+"Section",n=e[i];n||(e[i]=n=v("<div>").addClass(yb)),n.appendTo(t)})},_renderItems:function(){this.callBase.apply(this,arguments),this._updateSections()},_updateSections:function(){var e=this.$element().find("."+yb);e.removeClass(xb),e.not(":empty").eq(-1).addClass(xb)},_renderItem:function(e,t,i,n){var r=t.location||"menu",a=this["_$"+r+"Section"],o=this.callBase(e,t,a,n);return this._getItemTemplateName({itemData:t})&&o.addClass("dx-toolbar-menu-custom"),(r==="menu"||t.widget==="dxButton"||t.widget==="dxButtonGroup"||t.isAction)&&o.addClass(Pp),t.widget==="dxButton"&&o.addClass(c8),t.widget==="dxButtonGroup"&&o.addClass(h8),o.addClass(t.cssClass),o},_getItemTemplateName:function(e){var t=this.callBase(e),i=e.itemData,n=i&&i.menuItemTemplate;return n||t},_itemClickHandler:function(e,t,i){v(e.target).closest("."+Pp).length&&this.callBase(e,t,i)},_clean:function(){this._getSections().empty(),this.callBase()}});tt("dxToolbarMenu",LO);var Bd=5;class f8{constructor(t){this.init(t)}init(t){var{dragEnabled:i,handle:n,draggableElement:r,positionController:a}=t;this._positionController=a,this._draggableElement=r,this._handle=n,this._dragEnabled=i,this.unsubscribe(),i&&this.subscribe()}moveDown(t){this._moveTo(Bd,0,t)}moveUp(t){this._moveTo(-Bd,0,t)}moveLeft(t){this._moveTo(0,-Bd,t)}moveRight(t){this._moveTo(0,Bd,t)}subscribe(){var t=this._getEventNames();D.on(this._handle,t.startEventName,i=>{this._dragStartHandler(i)}),D.on(this._handle,t.updateEventName,i=>{this._dragUpdateHandler(i)}),D.on(this._handle,t.endEventName,i=>{this._dragEndHandler(i)})}unsubscribe(){var t=this._getEventNames();D.off(this._handle,t.startEventName),D.off(this._handle,t.updateEventName),D.off(this._handle,t.endEventName)}_getEventNames(){var t=me(vo,"overlayDrag"),i=me(ga,"overlayDrag"),n=me(_o,"overlayDrag");return{startEventName:t,updateEventName:i,endEventName:n}}_dragStartHandler(t){var i=this._getAllowedOffsets();this._prevOffset={x:0,y:0},t.targetElements=[],t.maxTopOffset=i.top,t.maxBottomOffset=i.bottom,t.maxLeftOffset=i.left,t.maxRightOffset=i.right}_dragUpdateHandler(t){var i={top:t.offset.y-this._prevOffset.y,left:t.offset.x-this._prevOffset.x};this._moveByOffset(i),this._prevOffset=t.offset}_dragEndHandler(t){this._positionController.dragHandled(),this._positionController.detectVisualPositionChange(t)}_moveTo(t,i,n){if(this._dragEnabled){n.preventDefault(),n.stopPropagation();var r=this._fitOffsetIntoAllowedRange(t,i);this._moveByOffset(r),this._dragEndHandler(n)}}_fitOffsetIntoAllowedRange(t,i){var n=this._getAllowedOffsets();return{top:Di(t,-n.top,n.bottom),left:Di(i,-n.left,n.right)}}_getContainerDimensions(){var t=fe.getDocument(),i=this._positionController.$dragResizeContainer.get(0),n=lt(i),r=at(i);return Yt(i)&&(r=Math.max(t.body.clientHeight,r),n=Math.max(t.body.clientWidth,n)),{width:n,height:r}}_getContainerPosition(){var t=this._positionController.$dragResizeContainer.get(0);return Yt(t)?{top:0,left:0}:v_(t)}_getElementPosition(){return v_(this._draggableElement)}_getInnerDelta(){var t=this._getContainerDimensions(),i=this._getElementDimensions();return{x:t.width-i.width,y:t.height-i.height}}_getOuterDelta(){var{width:t,height:i}=this._getElementDimensions(),n=this._positionController.outsideDragFactor;return{x:t*n,y:i*n}}_getFullDelta(){var t=this._getInnerDelta(),i=this._getOuterDelta();return{x:t.x+i.x,y:t.y+i.y}}_getElementDimensions(){return{width:this._draggableElement.offsetWidth,height:this._draggableElement.offsetHeight}}_getAllowedOffsets(){var t=this._getFullDelta(),i=t.y>=0&&t.x>=0;if(!i)return{top:0,bottom:0,left:0,right:0};var n=this._getElementPosition(),r=this._getContainerPosition(),a=this._getOuterDelta();return{top:n.top-r.top+a.y,bottom:-n.top+r.top+t.y,left:n.left-r.left+a.x,right:-n.left+r.left+t.x}}_moveByOffset(t){var i=In(this._draggableElement),n={left:i.left+t.left,top:i.top+t.top};ti(this._draggableElement,n)}}var tf="dxResizable",p8="dx-resizable",v8="dx-resizable-resizing",Ld="dx-resizable-handle",_8="dx-resizable-handle-top",g8="dx-resizable-handle-bottom",m8="dx-resizable-handle-left",C8="dx-resizable-handle-right",Pd="dx-resizable-handle-corner",y8=me(vo,tf),x8=me(ga,tf),b8=me(_o,tf),S8={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},PO=hr.inherit({_getDefaultOptions:function(){return O(this.callBase(),{handles:"all",step:"1",stepPrecision:"simple",area:void 0,minWidth:30,maxWidth:1/0,minHeight:30,maxHeight:1/0,onResizeStart:null,onResize:null,onResizeEnd:null,roundStepValue:!0,keepAspectRatio:!0})},_init:function(){this.callBase(),this.$element().addClass(p8)},_initMarkup:function(){this.callBase(),this._renderHandles()},_render:function(){this.callBase(),this._renderActions()},_renderActions:function(){this._resizeStartAction=this._createActionByOption("onResizeStart"),this._resizeEndAction=this._createActionByOption("onResizeEnd"),this._resizeAction=this._createActionByOption("onResize")},_renderHandles:function(){this._handles=[];var e=this.option("handles");if(!(e==="none"||!e)){var t=e==="all"?["top","bottom","left","right"]:e.split(" "),i={};F(t,(n,r)=>{i[r]=!0,this._renderHandle(r)}),i.bottom&&i.right&&this._renderHandle("corner-bottom-right"),i.bottom&&i.left&&this._renderHandle("corner-bottom-left"),i.top&&i.right&&this._renderHandle("corner-top-right"),i.top&&i.left&&this._renderHandle("corner-top-left"),this._attachEventHandlers()}},_renderHandle:function(e){var t=v("<div>").addClass(Ld).addClass(Ld+"-"+e).appendTo(this.$element());this._handles.push(t)},_attachEventHandlers:function(){if(!this.option("disabled")){var e={};e[y8]=this._dragStartHandler.bind(this),e[x8]=this._dragHandler.bind(this),e[b8]=this._dragEndHandler.bind(this),this._handles.forEach(t=>{D.on(t,e,{direction:"both",immediate:!0})})}},_detachEventHandlers:function(){this._handles.forEach(e=>{D.off(e)})},_toggleEventHandlers:function(e){e?this._attachEventHandlers():this._detachEventHandlers()},_getElementSize:function(){var e=this.$element();return e.css("boxSizing")==="border-box"?{width:lt(e),height:at(e)}:{width:$e(e),height:je(e)}},_dragStartHandler:function(e){var t=this.$element();if(t.is(".dx-state-disabled, .dx-state-disabled *")){e.cancel=!0;return}this._toggleResizingClass(!0),this._movingSides=this._getMovingSides(e),this._elementLocation=In(t),this._elementSize=this._getElementSize(),this._renderDragOffsets(e),this._resizeStartAction({event:e,width:this._elementSize.width,height:this._elementSize.height,handles:this._movingSides}),e.targetElements=null},_toggleResizingClass:function(e){this.$element().toggleClass(v8,e)},_renderDragOffsets:function(e){var t=this._getArea();if(t){var i=v(e.target).closest("."+Ld),n=lt(i),r=at(i),a=i.offset(),o=t.offset,s=this._getAreaScrollOffset();e.maxLeftOffset=this._leftMaxOffset=a.left-o.left-s.scrollX,e.maxRightOffset=this._rightMaxOffset=o.left+t.width-a.left-n+s.scrollX,e.maxTopOffset=this._topMaxOffset=a.top-o.top-s.scrollY,e.maxBottomOffset=this._bottomMaxOffset=o.top+t.height-a.top-r+s.scrollY}},_getBorderWidth:function(e,t){if(Yt(e.get(0)))return 0;var i=e.css(S8[t]);return parseInt(i)||0},_proportionate:function(e,t){var i=this._elementSize,n=e==="x"?i.width/i.height:i.height/i.width;return t*n},_getProportionalDelta:function(e){var{x:t,y:i}=e,n=this._proportionate("y",t);if(n>=i)return{x:t,y:n};var r=this._proportionate("x",i);return r>=t?{x:r,y:i}:{x:0,y:0}},_getDirectionName:function(e){var t=this._movingSides;return e==="x"?t.left?"left":"right":t.top?"top":"bottom"},_fitIntoArea:function(e,t){var i,n=this._getDirectionName(e);return Math.min(t,(i=this["_".concat(n,"MaxOffset")])!==null&&i!==void 0?i:1/0)},_fitDeltaProportionally:function(e){var t=be({},e),i=this._elementSize,{minWidth:n,minHeight:r,maxWidth:a,maxHeight:o}=this.option(),s=()=>i.width+t.x,l=()=>i.height+t.y,u=p=>t[p]===this._fitIntoArea(p,t[p]),d=()=>Br(s(),n,a)&&u("x"),c=()=>Br(l(),r,o)&&u("y");if(!d()){var h=this._fitIntoArea("x",Di(s(),n,a)-i.width);t={x:h,y:this._proportionate("y",h)}}if(!c()){var f=this._fitIntoArea("y",Di(l(),r,o)-i.height);t={x:this._proportionate("x",f),y:f}}return d()&&c()?t:{x:0,y:0}},_fitDelta:function(e){var{x:t,y:i}=e,n=this._elementSize,{minWidth:r,minHeight:a,maxWidth:o,maxHeight:s}=this.option();return{x:Di(n.width+t,r,o)-n.width,y:Di(n.height+i,a,s)-n.height}},_getDeltaByOffset:function(e){var t=this._movingSides,i=this._isCornerHandler(t)&&this.option("keepAspectRatio"),n={x:e.x*(t.left?-1:1),y:e.y*(t.top?-1:1)};if(i){var r=this._getProportionalDelta(n),a=this._fitDeltaProportionally(r);n=a}else{var o=this._fitDelta(n),s=this._roundByStep(o);n=s}return n},_updatePosition:function(e,t){var{width:i,height:n}=t,r=this._elementLocation,a=this._movingSides,o=this.$element(),s=this._getElementSize(),l=e.y*(a.top?-1:1)-((s.height||n)-n),u=e.x*(a.left?-1:1)-((s.width||i)-i);ti(o,{top:r.top+(a.top?l:0),left:r.left+(a.left?u:0)})},_dragHandler:function(e){var t=this._getOffset(e),i=this._getDeltaByOffset(t),n=this._updateDimensions(i);this._updatePosition(i,n),this._triggerResizeAction(e,n)},_updateDimensions:function(e){var t=u=>u.substring(u.length-2)==="px",i=this.option("stepPrecision")==="strict",n=this._elementSize,r=n.width+e.x,a=n.height+e.y,o=this.$element().get(0).style,s=e.x||i||t(o.width),l=e.y||i||t(o.height);return s&&this.option({width:r}),l&&this.option({height:a}),{width:s?r:n.width,height:l?a:n.height}},_triggerResizeAction:function(e,t){var{width:i,height:n}=t;this._resizeAction({event:e,width:this.option("width")||i,height:this.option("height")||n,handles:this._movingSides}),nr(this.$element())},_isCornerHandler:e=>Object.values(e).reduce((t,i)=>t^i,0)===0,_getOffset:function(e){var t=e.offset,i=this._movingSides;return!i.left&&!i.right&&(t.x=0),!i.top&&!i.bottom&&(t.y=0),t},_roundByStep:function(e){return this.option("stepPrecision")==="strict"?this._roundStrict(e):this._roundNotStrict(e)},_getSteps:function(){return Dh(this.option("step"),!this.option("roundStepValue"))},_roundNotStrict:function(e){var t=this._getSteps();return{x:e.x-e.x%t.h,y:e.y-e.y%t.v}},_roundStrict:function(e){var t=this._movingSides,i={x:e.x*(t.left?-1:1),y:e.y*(t.top?-1:1)},n=this._getSteps(),r=this._elementLocation,a=this._elementSize,o=t.left?r.left:r.left+a.width,s=t.top?r.top:r.top+a.height,l=(o+i.x)%n.h,u=(s+i.y)%n.v,d=Math.sign||(C=>(C=+C,C===0||isNaN(C)?C:C>0?1:-1)),c=(C,x)=>(1+.2*d(x))%1*C,h=(C,x)=>Math.abs(C)<.2*x,f=i.x-l,p=i.y-u;l>c(n.h,i.x)&&(f+=n.h),u>c(n.v,i.y)&&(p+=n.v);var g=(t.left||t.right)&&!h(i.x,n.h)?f:0,m=(t.top||t.bottom)&&!h(i.y,n.v)?p:0;return{x:g*(t.left?-1:1),y:m*(t.top?-1:1)}},_getMovingSides:function(e){var t=v(e.target),i=t.hasClass(Pd+"-top-left"),n=t.hasClass(Pd+"-top-right"),r=t.hasClass(Pd+"-bottom-left"),a=t.hasClass(Pd+"-bottom-right");return{top:t.hasClass(_8)||i||n,left:t.hasClass(m8)||i||r,bottom:t.hasClass(g8)||r||a,right:t.hasClass(C8)||n||a}},_getArea:function(){var e=this.option("area");return Ee(e)&&(e=e.call(this)),Ye(e)?this._getAreaFromObject(e):this._getAreaFromElement(e)},_getAreaScrollOffset:function(){var e=this.option("area"),t=!Ee(e)&&!Ye(e),i={scrollY:0,scrollX:0};if(t){var n=v(e)[0];Yt(n)&&(i.scrollX=n.pageXOffset,i.scrollY=n.pageYOffset)}return i},_getAreaFromObject:function(e){var t={width:e.right-e.left,height:e.bottom-e.top,offset:{left:e.left,top:e.top}};return this._correctAreaGeometry(t),t},_getAreaFromElement:function(e){var t=v(e),i;return t.length&&(i={width:p_(t),height:Wc(t),offset:O({top:0,left:0},Yt(t[0])?{}:t.offset())},this._correctAreaGeometry(i,t)),i},_correctAreaGeometry:function(e,t){var i=t?this._getBorderWidth(t,"left"):0,n=t?this._getBorderWidth(t,"top"):0;e.offset.left+=i+this._getBorderWidth(this.$element(),"left"),e.offset.top+=n+this._getBorderWidth(this.$element(),"top"),e.width-=lt(this.$element())-p_(this.$element()),e.height-=at(this.$element())-Wc(this.$element())},_dragEndHandler:function(e){var t=this.$element();this._resizeEndAction({event:e,width:lt(t),height:at(t),handles:this._movingSides}),this._toggleResizingClass(!1)},_renderWidth:function(e){this.option("width",Di(e,this.option("minWidth"),this.option("maxWidth")))},_renderHeight:function(e){this.option("height",Di(e,this.option("minHeight"),this.option("maxHeight")))},_optionChanged:function(e){switch(e.name){case"disabled":this._toggleEventHandlers(!e.value),this.callBase(e);break;case"handles":this._invalidate();break;case"minWidth":case"maxWidth":Ke()&&this._renderWidth(lt(this.$element()));break;case"minHeight":case"maxHeight":Ke()&&this._renderHeight(at(this.$element()));break;case"onResize":case"onResizeStart":case"onResizeEnd":this._renderActions();break;case"area":case"stepPrecision":case"step":case"roundStepValue":case"keepAspectRatio":break;default:this.callBase(e)}},_clean:function(){this.$element().find("."+Ld).remove()},_useTemplates:function(){return!1}});tt(tf,PO);var E8=Ro.inherit({_initMarkup(){this._deferredItems=[],this.callBase()},_renderItemContent(e){var t=new te,i=new te;this._deferredItems[e.index]=i;var n=this.callBase.call(this,e);return i.done(()=>{t.resolve(n)}),t.promise()},_createItemByTemplate(e,t){return e.render({model:t.itemData,container:t.container,index:t.index,onRendered:()=>{this._deferredItems[t.index].resolve()}})},_postProcessRenderItems:ee,_renderItemsAsync(){var e=new te;return Ae.apply(this,this._deferredItems).done(()=>{this._postProcessRenderItems(),e.resolve()}),e.promise()},_clean(){this.callBase(),this._deferredItems=[]}}),FO="dx-toolbar",Fp="dx-toolbar-before",w8="dx-toolbar-center",bb="dx-toolbar-after",I8="dx-toolbar-mini",T8="dx-toolbar-item",MO="dx-toolbar-label",A8="dx-toolbar-button",D8="dx-toolbar-items-container",O8="dx-toolbar-group",Sb="dx-toolbar-compact",Fd="."+MO,Eb="dx-toolbar-multiline",wb="text",R8="default",k8="contained",B8="dxToolbarItemDataKey",VO=E8.inherit({compactMode:!1,ctor:function(e,t){this._userOptions=t||{},this.callBase(e,t),"height"in this._userOptions&&_t.log("W0001",this.NAME,"height","20.1","Functionality associated with this option is not intended for the Toolbar widget.")},_getSynchronizableOptionsForCreateComponent:function(){return this.callBase().filter(e=>e!=="disabled")},_initTemplates:function(){this.callBase();var e=new Oo((function(t,i,n){Ye(i)?(i.text&&t.text(i.text).wrapInner("<div>"),i.html&&t.html(i.html),i.widget==="dxDropDownButton"&&(i.options=i.options||{},E(i.options.stylingMode)||(i.options.stylingMode=this.option("useFlatButtons")?wb:k8)),i.widget==="dxButton"&&(this.option("useFlatButtons")&&(i.options=i.options||{},i.options.stylingMode=i.options.stylingMode||wb),this.option("useDefaultButtons")&&(i.options=i.options||{},i.options.type=i.options.type||R8))):t.text(String(i)),this._getTemplate("dx-polymorph-widget").render({container:t,model:n,parent:this})}).bind(this),["text","html","widget","options"],this.option("integrationOptions.watchMethod"));this._templateManager.addDefaultTemplates({item:e,menuItem:e})},_getDefaultOptions:function(){return O(this.callBase(),{renderAs:"topToolbar",grouped:!1,useFlatButtons:!1,useDefaultButtons:!1,multiline:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Qt()},options:{useFlatButtons:!0}}])},_itemContainer:function(){return this._$toolbarItemsContainer.find(["."+Fp,"."+w8,"."+bb].join(","))},_itemClass:function(){return T8},_itemDataKey:function(){return B8},_buttonClass:function(){return A8},_dimensionChanged:function(){this._arrangeItems(),this._applyCompactMode()},_initMarkup:function(){this._renderToolbar(),this._renderSections(),this.callBase(),this.setAria("role","toolbar")},_waitParentAnimationFinished:function(){var e=this.$element();return new Promise(t=>{var i=()=>{clearTimeout(this._waitParentAnimationTimeout),this._waitParentAnimationTimeout=setTimeout(()=>(()=>{var n=!0;return e.parents().each((r,a)=>{if($t.isAnimating(v(a)))return n=!1,!1}),n&&t(),n})()||i(),15)};i()})},_render:function(){this.callBase(),this._renderItemsAsync(),Qt()&&Promise.all([this._waitParentAnimationFinished(),this._checkWebFontForLabelsLoaded()]).then(this._dimensionChanged.bind(this))},_postProcessRenderItems:function(){this._arrangeItems()},_renderToolbar:function(){this.$element().addClass(FO).toggleClass(Eb,this.option("multiline")),this._$toolbarItemsContainer=v("<div>").addClass(D8).appendTo(this.$element())},_renderSections:function(){var e=this._$toolbarItemsContainer,t=this;F(["before","center","after"],function(){var i="dx-toolbar-"+this,n=e.find("."+i);n.length||(t["_$"+this+"Section"]=n=v("<div>").addClass(i).appendTo(e))})},_checkWebFontForLabelsLoaded:function(){var e=this.$element().find(Fd),t=[];return e.each((i,n)=>{var r=v(n).text(),a=v(n).css("fontWeight");t.push(lH(r,a))}),Promise.all(t)},_arrangeItems:function(e){e=e||$e(this.$element()),this._$centerSection.css({margin:"0 auto",float:"none"});var t=Gt(this._$beforeSection.get(0)),i=Gt(this._$afterSection.get(0));this._alignCenterSection(t,i,e);var n=this._$toolbarItemsContainer.find(Fd).eq(0),r=n.parent();if(n.length){var a=t.width?t.width:n.position().left,o=r.hasClass(Fp)?0:a,s=r.hasClass(bb)?0:i.width,l=0;r.children().not(Fd).each(function(){l+=lt(this)});var u=e-l,d=Math.max(u-o-s,0);if(r.hasClass(Fp))this._alignSection(this._$beforeSection,d);else{var c=lt(n)-$e(n);n.css("maxWidth",d-c)}}},_alignCenterSection:function(e,t,i){this._alignSection(this._$centerSection,i-e.width-t.width);var n=this.option("rtlEnabled"),r=n?t:e,a=n?e:t,o=Gt(this._$centerSection.get(0));(r.right>o.left||o.right>a.left)&&this._$centerSection.css({marginLeft:r.width,marginRight:a.width,float:r.width>a.width?"none":"right"})},_alignSection:function(e,t){var i=e.find(Fd),n=i.toArray();t-=this._getCurrentLabelsPaddings(n);var r=this._getCurrentLabelsWidth(n),a=Math.abs(r-t);t<r?(n=n.reverse(),this._alignSectionLabels(n,a,!1)):this._alignSectionLabels(n,a,!0)},_alignSectionLabels:function(e,t,i){for(var n=function(u){return Gt(u).width},r=0;r<e.length;r++){var a=v(e[r]),o=Math.ceil(n(e[r])),s=void 0;i&&a.css("maxWidth","inherit");var l=Math.ceil(i?n(e[r]):o);if(l<t)s=i?l:0,t-=l;else{s=i?o+t:o-t,a.css("maxWidth",s);break}a.css("maxWidth",s)}},_applyCompactMode:function(){var e=this.$element();e.removeClass(Sb),this.option("compactMode")&&this._getSummaryItemsWidth(this.itemElements(),!0)>$e(e)&&e.addClass(Sb)},_getCurrentLabelsWidth:function(e){var t=0;return e.forEach(function(i,n){t+=lt(i)}),t},_getCurrentLabelsPaddings:function(e){var t=0;return e.forEach(function(i,n){t+=lt(i)-$e(i)}),t},_renderItem:function(e,t,i,n){var r=t.location||"center",a=i||this["_$"+r+"Section"],o=!!(t.text||t.html),s=this.callBase(e,t,a,n);return s.toggleClass(this._buttonClass(),!o).toggleClass(MO,o).addClass(t.cssClass),s},_renderGroupedItems:function(){var e=this;F(this.option("items"),function(t,i){var n=i.items,r=v("<div>").addClass(O8),a=i.location||"center";!n||!n.length||(F(n,function(o,s){e._renderItem(o,s,r,null)}),e._$toolbarItemsContainer.find(".dx-toolbar-"+a).append(r))})},_renderItems:function(e){var t=this.option("grouped")&&e.length&&e[0].items;t?this._renderGroupedItems():this.callBase(e)},_getToolbarItems:function(){return this.option("items")||[]},_renderContentImpl:function(){var e=this._getToolbarItems();this.$element().toggleClass(I8,e.length===0),this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e),this._applyCompactMode()},_renderEmptyMessage:ee,_clean:function(){this._$toolbarItemsContainer.children().empty(),this.$element().empty()},_visibilityChanged:function(e){e&&this._arrangeItems()},_isVisible:function(){return $e(this.$element())>0&&je(this.$element())>0},_getIndexByItem:function(e){return this._getToolbarItems().indexOf(e)},_itemOptionChanged:function(e,t,i){this.callBase.apply(this,[e,t,i]),this._arrangeItems()},_optionChanged:function(e){var t=e.name;switch(t){case"width":this.callBase.apply(this,arguments),this._dimensionChanged();break;case"multiline":this.$element().toggleClass(Eb,e.value);break;case"renderAs":case"useFlatButtons":case"useDefaultButtons":this._invalidate();break;case"compactMode":this._applyCompactMode();break;case"grouped":break;default:this.callBase.apply(this,arguments)}},_dispose:function(){this.callBase(),clearTimeout(this._waitParentAnimationTimeout)}});tt("dxToolbarBase",VO);var L8=["fullScreen","forceApplyBindings","dragOutsideBoundary","dragAndResizeArea","outsideDragFactor"],Mp=qe();class P8 extends xm{constructor(t){var{fullScreen:i,forceApplyBindings:n,dragOutsideBoundary:r,dragAndResizeArea:a,outsideDragFactor:o}=t,s=Lt(t,L8);super(s),this._props=be({},this._props,{fullScreen:i,forceApplyBindings:n,dragOutsideBoundary:r,dragAndResizeArea:a,outsideDragFactor:o}),this._$dragResizeContainer=void 0,this._outsideDragFactor=void 0,this._lastPositionBeforeFullScreen=void 0,this._updateDragResizeContainer(),this._updateOutsideDragFactor()}set fullScreen(t){this._props.fullScreen=t,t?this._fullScreenEnabled():this._fullScreenDisabled()}get $dragResizeContainer(){return this._$dragResizeContainer}get outsideDragFactor(){return this._outsideDragFactor}set dragAndResizeArea(t){this._props.dragAndResizeArea=t,this._updateDragResizeContainer()}set dragOutsideBoundary(t){this._props.dragOutsideBoundary=t,this._updateDragResizeContainer(),this._updateOutsideDragFactor()}set outsideDragFactor(t){this._props.outsideDragFactor=t,this._updateOutsideDragFactor()}updateContainer(t){super.updateContainer(t),this._updateDragResizeContainer()}dragHandled(){this.restorePositionOnNextRender(!1)}resizeHandled(){this.restorePositionOnNextRender(!1)}positionContent(){if(this._props.fullScreen)ti(this._$content,{top:0,left:0}),this.detectVisualPositionChange();else{var t,i;(t=(i=this._props).forceApplyBindings)===null||t===void 0||t.call(i),!this._shouldRenderContentInitialPosition&&this._lastPositionBeforeFullScreen?(ti(this._$content,this._lastPositionBeforeFullScreen),this._lastPositionBeforeFullScreen=void 0,this.detectVisualPositionChange()):super.positionContent()}}_updateOutsideDragFactor(){this._outsideDragFactor=this._getOutsideDragFactor()}_getOutsideDragFactor(){return this._props.dragOutsideBoundary?1:this._props.outsideDragFactor}_updateDragResizeContainer(){this._$dragResizeContainer=this._getDragResizeContainer()}_getDragResizeContainer(){if(this._props.dragOutsideBoundary)return v(Mp);if(this._props.dragAndResizeArea)return v(this._props.dragAndResizeArea);var t=oT().get(0)||this._props.container;return t?this._$markupContainer:v(Mp)}_getVisualContainer(){return this._props.fullScreen?v(Mp):super._getVisualContainer()}_fullScreenEnabled(){this.restorePositionOnNextRender(!1),this._lastPositionBeforeFullScreen=this._visualPosition}_fullScreenDisabled(){this.restorePositionOnNextRender(!1)}}var F8=qe(),Vp="dx-popup",M8="dx-popup-wrapper",V8="dx-popup-fullscreen",N8="dx-popup-fullscreen-width",H8="dx-popup-normal",$8="dx-popup-content",W8="dx-state-disabled",z8="dx-popup-draggable",Ib="dx-popup-title",G8="dx-closebutton",Tb="dx-popup-bottom",U8="dx-has-close-button",K8="dx-template-wrapper",j8="dx-popup-flex-height",q8="dx-popup-inherit-height",Ab=["cancel","clear","done"],Y8="default",X8="normal",Z8="text",Q8="contained",J8=Bt.safari&&_T(Bt.version,[11])<0,Xr={static:"",inherit:q8,flex:j8},e9=e=>{var t=Oe.current(),i=t.platform,n="bottom",r="before";if(i==="ios")switch(e){case"cancel":n="top";break;case"clear":n="top",r="after";break;case"done":r="after"}else if(i==="android")switch(e){case"cancel":case"done":r="after"}return{toolbar:n,location:r}},pr=zn.inherit({_supportedKeys:function(){return O(this.callBase(),{upArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveUp(e)},downArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveDown(e)},leftArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveLeft(e)},rightArrow:e=>{var t;(t=this._drag)===null||t===void 0||t.moveRight(e)}})},_getDefaultOptions:function(){return O(this.callBase(),{fullScreen:!1,title:"",showTitle:!0,titleTemplate:"title",onTitleRendered:null,dragOutsideBoundary:!1,dragEnabled:!1,dragAndResizeArea:void 0,outsideDragFactor:0,onResizeStart:null,onResize:null,onResizeEnd:null,resizeEnabled:!1,toolbarItems:[],showCloseButton:!1,bottomTemplate:"bottom",useDefaultToolbarButtons:!1,useFlatToolbarButtons:!1,autoResizeEnabled:!0})},_defaultOptionsRules:function(){var e=Un();return this.callBase().concat([{device:{platform:"ios"},options:{animation:this._iosAnimation}},{device:{platform:"android"},options:{animation:this._androidAnimation}},{device:{platform:"generic"},options:{showCloseButton:!0}},{device:function(t){return Oe.real().deviceType==="desktop"&&t.platform==="generic"},options:{dragEnabled:!0}},{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return Qt(e)},options:{useDefaultToolbarButtons:!0,useFlatToolbarButtons:!0,showCloseButton:!1}}])},_iosAnimation:{show:{type:"slide",duration:400,from:{position:{my:"top",at:"bottom"}},to:{position:{my:"center",at:"center"}}},hide:{type:"slide",duration:400,from:{opacity:1,position:{my:"center",at:"center"}},to:{opacity:1,position:{my:"top",at:"bottom"}}}},_androidAnimation:function(){return this.option("fullScreen")?{show:{type:"slide",duration:300,from:{top:"30%",opacity:0},to:{top:0,opacity:1}},hide:{type:"slide",duration:300,from:{top:0,opacity:1},to:{top:"30%",opacity:0}}}:{show:{type:"fade",duration:400,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}}},_init:function(){this.callBase(),this._updateResizeCallbackSkipCondition(),this.$element().addClass(Vp),this.$wrapper().addClass(M8),this._$popupContent=this._$content.wrapInner(v("<div>").addClass($8)).children().eq(0)},_render:function(){var e=this.option("fullScreen");this._toggleFullScreenClass(e),this.callBase()},_toggleFullScreenClass:function(e){this.$overlayContent().toggleClass(V8,e).toggleClass(H8,!e)},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({title:new no,bottom:new no})},_getActionsList:function(){return this.callBase().concat(["onResizeStart","onResize","onResizeEnd"])},_contentResizeHandler:function(e){this._shouldSkipContentResize(e)||this._renderGeometry({shouldOnlyReposition:!0})},_doesShowAnimationChangeDimensions:function(){var e=this.option("animation");return["to","from"].some(t=>{var i,n=e==null||(i=e.show)===null||i===void 0?void 0:i[t];return He(n)&&("width"in n||"height"in n)})},_updateResizeCallbackSkipCondition(){var e=this._doesShowAnimationChangeDimensions();this._shouldSkipContentResize=t=>e&&this._showAnimationProcessing||this._areContentDimensionsRendered(t)},_observeContentResize:function(e){if(this.option("useResizeObserver")){var t=this._$content.get(0);e?lh.observe(t,i=>{this._contentResizeHandler(i)}):lh.unobserve(t)}},_renderContentImpl:function(){this._renderTitle(),this.callBase(),this._renderResize(),this._renderBottom()},_renderTitle:function(){var e=this._getToolbarItems("top"),t=this.option("title"),i=this.option("showTitle");if(i&&t&&e.unshift({location:Oe.current().ios?"center":"before",text:t}),i||e.length>0){this._$title&&this._$title.remove();var n=v("<div>").addClass(Ib).insertBefore(this.$content());this._$title=this._renderTemplateByType("titleTemplate",e,n).addClass(Ib),this._renderDrag(),this._executeTitleRenderAction(this._$title),this._$title.toggleClass(U8,this._hasCloseButton())}else this._$title&&this._$title.detach()},_renderTemplateByType:function(e,t,i,n){var{rtlEnabled:r,useDefaultToolbarButtons:a,useFlatToolbarButtons:o,disabled:s}=this.option(),l=this._getTemplateByOption(e),u=l instanceof no;if(u){var d=O({},this.option("integrationOptions"),{skipTemplates:["content","title"]}),c=O(n,{items:t,rtlEnabled:r,useDefaultButtons:a,useFlatButtons:o,disabled:s,integrationOptions:d});this._getTemplate("dx-polymorph-widget").render({container:i,model:{widget:"dxToolbarBase",options:c}});var h=i.children("div");return i.replaceWith(h),h}else{var f=v(l.render({container:Fe(i)}));return f.hasClass(K8)&&(i.replaceWith(f),i=f),i}},_renderVisibilityAnimate:function(e){return this._observeContentResize(e),this.callBase(e)},_executeTitleRenderAction:function(e){this._getTitleRenderAction()({titleElement:Fe(e)})},_getTitleRenderAction:function(){return this._titleRenderAction||this._createTitleRenderAction()},_createTitleRenderAction:function(){return this._titleRenderAction=this._createActionByOption("onTitleRendered",{element:this.element(),excludeValidators:["disabled","readOnly"]})},_getCloseButton:function(){return{toolbar:"top",location:"after",template:this._getCloseButtonRenderer()}},_getCloseButtonRenderer:function(){return(e,t,i)=>{var n=v("<div>").addClass(G8);this._createComponent(n,Si,{icon:"close",onClick:this._createToolbarItemAction(void 0),stylingMode:"text",integrationOptions:{}}),v(i).append(n)}},_getToolbarItems:function(e){var t=this.option("toolbarItems"),i=[];this._toolbarItemClasses=[];var n=Oe.current().platform,r=0;return F(t,(a,o)=>{var s=E(o.shortcut),l=s?e9(o.shortcut):o;if(s&&n==="ios"&&r<2&&(l.toolbar="top",r++),l.toolbar=o.toolbar||l.toolbar||"top",l&&l.toolbar===e){s&&O(l,{location:o.location},this._getToolbarItemByAlias(o));var u=n==="generic";o.shortcut==="done"&&u||o.shortcut==="cancel"&&!u?i.unshift(l):i.push(l)}}),e==="top"&&this._hasCloseButton()&&i.push(this._getCloseButton()),i},_hasCloseButton(){return this.option("showCloseButton")&&this.option("showTitle")},_getLocalizationKey:e=>e.toLowerCase()==="done"?"OK":Nc(e,!0),_getToolbarItemByAlias:function(e){var t=this,i=e.shortcut;if(!Ab.includes(i))return!1;var n=O({text:ue.format(this._getLocalizationKey(i)),onClick:this._createToolbarItemAction(e.onClick),integrationOptions:{},type:t.option("useDefaultToolbarButtons")?Y8:X8,stylingMode:t.option("useFlatToolbarButtons")?Z8:Q8},e.options||{}),r=Vp+"-"+i;return this._toolbarItemClasses.push(r),{template:function(a,o,s){var l=v("<div>").addClass(r).appendTo(s);t._createComponent(l,Si,n)}}},_createToolbarItemAction:function(e){return this._createAction(e,{afterExecute:function(t){t.component.hide()}})},_renderBottom:function(){var e=this._getToolbarItems("bottom");if(e.length){this._$bottom&&this._$bottom.remove();var t=v("<div>").addClass(Tb).insertAfter(this.$content());this._$bottom=this._renderTemplateByType("bottomTemplate",e,t,{compactMode:!0}).addClass(Tb),this._toggleClasses()}else this._$bottom&&this._$bottom.detach()},_toggleDisabledState:function(e){this.callBase(...arguments),this.$content().toggleClass(W8,!!e)},_toggleClasses:function(){var e=Ab;F(e,(t,i)=>{var n=Vp+"-"+i;this._toolbarItemClasses.includes(n)?(this.$wrapper().addClass(n+"-visible"),this._$bottom.addClass(n)):(this.$wrapper().removeClass(n+"-visible"),this._$bottom.removeClass(n))})},_toggleFocusClass(e,t){if(this.callBase(e,t),e&&!c$(this._zIndex)){var i=QT(this._zIndexInitValue());M_(this._zIndex),this._zIndex=i,this._$wrapper.css("zIndex",i),this._$content.css("zIndex",i)}},_getPositionControllerConfig(){var{fullScreen:e,forceApplyBindings:t,dragOutsideBoundary:i,dragAndResizeArea:n,outsideDragFactor:r}=this.option();return O({},this.callBase(),{fullScreen:e,forceApplyBindings:t,dragOutsideBoundary:i,dragAndResizeArea:n,outsideDragFactor:r})},_initPositionController(){this._positionController=new P8(this._getPositionControllerConfig())},_getDragTarget:function(){return this.topToolbar()},_renderGeometry:function(e){var{visible:t,useResizeObserver:i}=this.option();if(t&&Ke()){var n=this._showAnimationProcessing,r=n&&!(e!=null&&e.forceStopAnimation)&&i;this._isAnimationPaused=r||void 0,this._stopAnimation(),e!=null&&e.shouldOnlyReposition?this._positionController.positionContent():this._renderGeometryImpl(),r&&(this._animateShowing(),this._isAnimationPaused=void 0)}},_cacheDimensions:function(){this.option("useResizeObserver")&&(this._renderedDimensions={width:parseInt($e(this._$content),10),height:parseInt(je(this._$content),10)})},_renderGeometryImpl:function(){this._resetContentHeight(),this.callBase(),this._cacheDimensions(),this._setContentHeight()},_resetContentHeight:function(){var e=this._getOptionValue("height");e==="auto"&&this.$content().css({height:"auto",maxHeight:"none"})},_renderDrag:function(){var e=this._getDragTarget(),t=this.option("dragEnabled");if(e){var i={dragEnabled:t,handle:e.get(0),draggableElement:this._$content.get(0),positionController:this._positionController};this._drag?this._drag.init(i):this._drag=new f8(i),this.$overlayContent().toggleClass(z8,t)}},_renderResize:function(){this._resizable=this._createComponent(this._$content,PO,{handles:this.option("resizeEnabled")?"all":"none",onResizeEnd:e=>{this._resizeEndHandler(e),this._observeContentResize(!0)},onResize:e=>{this._setContentHeight(),this._actions.onResize(e)},onResizeStart:e=>{this._observeContentResize(!1),this._actions.onResizeStart(e)},minHeight:100,minWidth:100,area:this._positionController.$dragResizeContainer,keepAspectRatio:!1})},_resizeEndHandler:function(e){var t=this._resizable.option("width"),i=this._resizable.option("height");t&&this._setOptionWithoutOptionChange("width",t),i&&this._setOptionWithoutOptionChange("height",i),this._cacheDimensions(),this._positionController.resizeHandled(),this._positionController.detectVisualPositionChange(e.event),this._actions.onResizeEnd(e)},_setContentHeight:function(){(this.option("forceApplyBindings")||ee)();var e=this.$overlayContent().get(0),t=this._chooseHeightStrategy(e);this.$content().css(this._getHeightCssStyles(t,e)),this._setHeightClasses(this.$overlayContent(),t)},_heightStrategyChangeOffset:function(e,t){return e===Xr.flex?-t:0},_chooseHeightStrategy:function(e){var t=e.style.width==="auto"||e.style.width==="",i=Xr.static;return this._isAutoHeight()&&this.option("autoResizeEnabled")&&(t||J8?i=Xr.inherit:i=Xr.flex),i},_getHeightCssStyles:function(e,t){var i={},n=this._getOptionValue("maxHeight",t),r=this._getOptionValue("minHeight",t),a=this._splitPopupHeight(),o=a.header+a.footer+a.contentVerticalOffsets+a.popupVerticalOffsets+this._heightStrategyChangeOffset(e,a.popupVerticalPaddings);if(e===Xr.static){if(!this._isAutoHeight()||n||r){var s=this.option("fullScreen")?Math.min(Gt(t).height,qe().innerHeight):Gt(t).height,l=s-o;i={height:Math.max(0,l),minHeight:"auto",maxHeight:"auto"}}}else{var u=v(this._positionController.$visualContainer).get(0),d=sV(n,-o,u),c=lV(r,-o,u);i={height:"auto",minHeight:c,maxHeight:d}}return i},_setHeightClasses:function(e,t){var i="";for(var n in Xr)Xr[n]!==t&&(i+=" "+Xr[n]);e.removeClass(i).addClass(t)},_isAutoHeight:function(){return this.$overlayContent().get(0).style.height==="auto"},_splitPopupHeight:function(){var e=this.topToolbar(),t=this.bottomToolbar();return{header:iy(e&&e.get(0)),footer:iy(t&&t.get(0)),contentVerticalOffsets:Tf(this.$overlayContent().get(0),!0),popupVerticalOffsets:Tf(this.$content().get(0),!0),popupVerticalPaddings:Tf(this.$content().get(0),!1)}},_isAllWindowCovered:function(){return this.callBase()||this.option("fullScreen")},_renderDimensions:function(){this.option("fullScreen")?this.$overlayContent().css({width:"100%",height:"100%",minWidth:"",maxWidth:"",minHeight:"",maxHeight:""}):this.callBase(),Ke()&&this._renderFullscreenWidthClass()},_clean:function(){this.callBase(),this._observeContentResize(!1)},_renderFullscreenWidthClass:function(){this.$overlayContent().toggleClass(N8,lt(this.$overlayContent())===$e(F8))},refreshPosition:function(){this._renderPosition()},_optionChanged:function(e){var t,i=e.value;switch(e.name){case"disabled":this.callBase(e),this._renderTitle(),this._renderBottom();break;case"animation":this._updateResizeCallbackSkipCondition();break;case"showTitle":case"title":case"titleTemplate":this._renderTitle(),this._renderGeometry(),nr(this.$overlayContent());break;case"bottomTemplate":this._renderBottom(),this._renderGeometry(),nr(this.$overlayContent());break;case"container":if(this.callBase(e),this.option("resizeEnabled")){var n;(n=this._resizable)===null||n===void 0||n.option("area",this._positionController.$dragResizeContainer)}break;case"width":case"height":this.callBase(e),(t=this._resizable)===null||t===void 0||t.option(e.name,e.value);break;case"onTitleRendered":this._createTitleRenderAction(e.value);break;case"toolbarItems":case"useDefaultToolbarButtons":case"useFlatToolbarButtons":var r=!e.fullName.match(/^toolbarItems((\[\d+\])(\.(options|visible).*)?)?$/);this._renderTitle(),this._renderBottom(),r&&(this._renderGeometry(),nr(this.$overlayContent()));break;case"dragEnabled":this._renderDrag();break;case"dragAndResizeArea":this._positionController.dragAndResizeArea=i,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer),this._positionController.positionContent();break;case"dragOutsideBoundary":this._positionController.dragOutsideBoundary=i,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer);break;case"outsideDragFactor":this._positionController.outsideDragFactor=i;break;case"resizeEnabled":this._renderResize(),this._renderGeometry();break;case"autoResizeEnabled":this._renderGeometry(),nr(this.$overlayContent());break;case"fullScreen":this._positionController.fullScreen=e.value,this._toggleFullScreenClass(e.value),this._toggleSafariScrolling(),this._renderGeometry(),nr(this.$overlayContent());break;case"showCloseButton":this._renderTitle();break;default:this.callBase(e)}},bottomToolbar:function(){return this._$bottom},topToolbar:function(){return this._$title},$content:function(){return this._$popupContent},content:function(){return Fe(this.$content())},$overlayContent:function(){return this._$content}});tt("dxPopup",pr);var t9={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},i9=["shading","target","$arrow"],xr={left:-1,top:-1,center:0,right:1,bottom:1},NO={top:{my:"bottom center",at:"top center",collision:"fit flip"},bottom:{my:"top center",at:"bottom center",collision:"fit flip"},right:{my:"left center",at:"right center",collision:"flip fit"},left:{my:"right center",at:"left center",collision:"flip fit"}},n9={h:10,v:10};class r9 extends xm{constructor(t){var{shading:i,target:n,$arrow:r}=t,a=Lt(t,i9);super(a),this._props=be({},this._props,{shading:i,target:n}),this._$arrow=r,this._positionSide=void 0,this.updatePosition(this._props.position)}positionWrapper(){this._props.shading&&this._$wrapper.css({top:0,left:0})}updateTarget(t){this._props.target=t,this.updatePosition(this._props.position)}_renderBoundaryOffset(){}_getContainerPosition(){var t=Dh(this._position.offset||""),{h:i,v:n}=t,r=this._isVerticalSide(),a=this._isHorizontalSide();if(r||a){var o=this._isPopoverInside(),s=(o?-1:1)*xr[this._positionSide],l=r?je(this._$arrow):$e(this._$arrow),u=this._getContentBorderWidth(this._positionSide),d=s*(l-u);r?n+=d:i+=d}return O({},this._position,{offset:i+" "+n})}_getContentBorderWidth(t){var i=this._$content.css(t9[t]);return parseInt(i)||0}_isPopoverInside(){var t=mi.setup.normalizeAlign(this._position.my),i=mi.setup.normalizeAlign(this._position.at);return t.h===i.h&&t.v===i.v}_isVerticalSide(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._positionSide;return t==="top"||t==="bottom"}_isHorizontalSide(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._positionSide;return t==="left"||t==="right"}_getDisplaySide(t){var i=mi.setup.normalizeAlign(t.my),n=mi.setup.normalizeAlign(t.at),r=xr[i.h]===xr[n.h]&&xr[i.v]===xr[n.v]?-1:1,a=Math.abs(xr[i.h]-r*xr[n.h]),o=Math.abs(xr[i.v]-r*xr[n.v]);return a>o?n.h:n.v}_normalizePosition(t){var i={of:this._props.target,boundaryOffset:n9},n;return E(t)?n=O(!0,{},i,this._positionToObject(t)):n=i,this._positionSide=this._getDisplaySide(n),n}_positionToObject(t){return Me(t)?O({},NO[t]):t}}var a9="dx-popover",o9="dx-popover-wrapper",s9="dx-popover-arrow",l9="dx-popover-without-title",Db={left:"right",top:"bottom",right:"left",bottom:"top",center:"center"},HO=function(e){return He(e)?e.name:e},$O=function(e,t){var i=e.option(t);return HO(i)},u9=function(e,t){var i=e.option(t);return He(i)&&i.delay},Np=function(e,t){var{target:i,shading:n,disabled:r,hideEvent:a}=e.option(),o=Me(i),s=n&&t==="hide",l=s?null:$O(e,"".concat(t,"Event"));if(s&&a&&Je.log("W1020"),!(!l||r)){var u=me(l,e.NAME),d=e._createAction((function(){var p=u9(e,t+"Event");this._clearEventsTimeouts(),p?this._timeouts[t]=setTimeout(function(){e[t]()},p):e[t]()}).bind(e),{validatingTargetName:"target"}),c=function(p){d({event:p,target:v(p.currentTarget)})},h="_"+t+"EventHandler";if(o)e[h]=c,D.on(fe.getDocument(),u,i,c);else{var f=Fe(v(i));e[h]=void 0,D.on(f,u,c)}}},Hp=function(e,t,i,n){var r=n||$O(e,i+"Event");if(r){r=me(r,e.NAME);var a="_"+i+"EventHandler";e[a]?D.off(fe.getDocument(),r,t,e[a]):D.off(Fe(v(t)),r)}},WO=pr.inherit({_getDefaultOptions:function(){return O(this.callBase(),{target:void 0,shading:!1,position:O({},NO.bottom),hideOnOutsideClick:!0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",to:0}},showTitle:!1,width:"auto",height:"auto",dragEnabled:!1,resizeEnabled:!1,fullScreen:!1,hideOnParentScroll:!0,arrowPosition:"",arrowOffset:0,_fixWrapperPosition:!0})},_defaultOptionsRules:function(){return[{device:{platform:"ios"},options:{arrowPosition:{boundaryOffset:{h:20,v:-10},collision:"fit"}}},{device:function(){return!Ke()},options:{animation:null}}]},_init:function(){this.callBase(),this._renderArrow(),this._timeouts={},this.$element().addClass(a9),this.$wrapper().addClass(o9)},_render:function(){this.callBase.apply(this,arguments),this._detachEvents(this.option("target")),this._attachEvents()},_detachEvents:function(e){Hp(this,e,"show"),Hp(this,e,"hide")},_attachEvents:function(){Np(this,"show"),Np(this,"hide")},_renderArrow:function(){this._$arrow=v("<div>").addClass(s9).prependTo(this.$overlayContent())},_documentDownHandler:function(e){return this._isOutsideClick(e)?this.callBase(e):!0},_isOutsideClick:function(e){return!v(e.target).closest(this.option("target")).length},_animate:function(e){e&&e.to&&typeof e.to=="object"&&O(e.to,{position:this._getContainerPosition()}),this.callBase.apply(this,arguments)},_stopAnimation:function(){this.callBase.apply(this,arguments)},_renderTitle:function(){this.$wrapper().toggleClass(l9,!this.option("showTitle")),this.callBase()},_renderPosition:function(){this.callBase(),this._renderOverlayPosition(),this._actions.onPositioned()},_renderOverlayPosition:function(){this._resetOverlayPosition(),this._updateContentSize();var e=this._getContainerPosition(),t=mi.setup(this.$overlayContent(),e),i=this._getSideByLocation(t);this._togglePositionClass("dx-position-"+i),this._toggleFlippedClass(t.h.flip,t.v.flip);var n=this._isHorizontalSide()||this._isVerticalSide();n&&this._renderArrowPosition(i)},_resetOverlayPosition:function(){this._setContentHeight(!0),this._togglePositionClass("dx-position-"+this._positionController._positionSide),ti(this.$overlayContent(),{left:0,top:0}),this._$arrow.css({top:"auto",right:"auto",bottom:"auto",left:"auto"})},_updateContentSize:function(){if(this.$content()){var e=mi.calculate(this.$overlayContent(),this._getContainerPosition());if(e.h.oversize>0&&this._isHorizontalSide()&&!e.h.fit){var t=$e(this.$overlayContent())-e.h.oversize;wu(this.$overlayContent(),t)}if(e.v.oversize>0&&this._isVerticalSide()&&!e.v.fit){var i=je(this.$overlayContent())-e.v.oversize,n=je(this.$content())-e.v.oversize;fn(this.$overlayContent(),i),fn(this.$content(),n)}}},_getContainerPosition:function(){return this._positionController._getContainerPosition()},_hideOnParentScrollTarget:function(){return v(this._positionController._position.of||this.callBase())},_getSideByLocation:function(e){var t=e.v.flip,i=e.h.flip;return this._isVerticalSide()&&t||this._isHorizontalSide()&&i||this._isPopoverInside()?Db[this._positionController._positionSide]:this._positionController._positionSide},_togglePositionClass:function(e){this.$wrapper().removeClass("dx-position-left dx-position-right dx-position-top dx-position-bottom").addClass(e)},_toggleFlippedClass:function(e,t){this.$wrapper().toggleClass("dx-popover-flipped-horizontal",e).toggleClass("dx-popover-flipped-vertical",t)},_renderArrowPosition:function(e){var t=Gt(this._$arrow.get(0)),i=-(this._isVerticalSide(e)?t.height:t.width);this._$arrow.css(Db[e],i);var n=this._isVerticalSide(e)?"left":"top",r=this._isVerticalSide(e)?"width":"height",a=v(this._positionController._position.of),o=mi.offset(a)||{top:0,left:0},s=mi.offset(this.$overlayContent()),l=t[r],u=s[n],d=Gt(this.$overlayContent().get(0))[r],c=o[n],h=a.get(0),f=h&&!h.preventDefault?Gt(h)[r]:0,p=Math.max(u,c),g=Math.min(u+d,c+f),m;this.option("arrowPosition")==="start"?m=p-u:this.option("arrowPosition")==="end"?m=g-u-l:m=(p+g)/2-u-l/2;var C=this._positionController._getContentBorderWidth(e),x=Di(m-C+this.option("arrowOffset"),C,d-l-2*C);this._$arrow.css(n,x)},_isPopoverInside:function(){return this._positionController._isPopoverInside()},_setContentHeight:function(e){e&&this.callBase()},_getPositionControllerConfig(){var{shading:e,target:t}=this.option();return O({},this.callBase(),{target:t,shading:e,$arrow:this._$arrow})},_initPositionController(){this._positionController=new r9(this._getPositionControllerConfig())},_renderWrapperDimensions:function(){this.option("shading")&&this.$wrapper().css({width:"100%",height:"100%"})},_isVerticalSide:function(e){return this._positionController._isVerticalSide(e)},_isHorizontalSide:function(e){return this._positionController._isHorizontalSide(e)},_clearEventTimeout:function(e){clearTimeout(this._timeouts[e])},_clearEventsTimeouts:function(){this._clearEventTimeout("show"),this._clearEventTimeout("hide")},_clean:function(){this._detachEvents(this.option("target")),this.callBase.apply(this,arguments)},_optionChanged:function(e){switch(e.name){case"arrowPosition":case"arrowOffset":this._renderGeometry();break;case"fullScreen":e.value&&this.option("fullScreen",!1);break;case"target":e.previousValue&&this._detachEvents(e.previousValue),this._positionController.updateTarget(e.value),this._invalidate();break;case"showEvent":case"hideEvent":var t=e.name.substring(0,4),i=HO(e.previousValue);this.hide(),Hp(this,this.option("target"),t,i),Np(this,t);break;case"visible":this._clearEventTimeout(e.value?"show":"hide"),this.callBase(e);break;default:this.callBase(e)}},show:function(e){return e&&this.option("target",e),this.callBase()}});tt("dxPopover",WO);var d9="dx-list-item",Ob="dx-list-group",fC=20,c9=(1<<fC)-1,Rb=function(e){return(e.group<<fC)+e.item},Va=function(e){return{group:e>>fC,item:e&c9}},h9=aC.inherit({_groupElements:function(){return this._collectionWidget._itemContainer().find("."+Ob)},_groupItemElements:function(e){return e.find("."+d9)},getIndexByItemData:function(e){var t=this._collectionWidget.option("items"),i=!1;return e?(e.items&&e.items.length&&(e=e.items[0]),F(t,function(n,r){if(!r.items||(F(r.items,function(a,o){return o!==e?!0:(i={group:n,item:a},!1)}),i))return!1}),i):!1},getItemDataByIndex:function(e){var t=this._collectionWidget.option("items");return xt(e)?this.itemsGetter()[e]:e&&t[e.group]&&t[e.group].items[e.item]||null},itemsGetter:function(){for(var e=[],t=this._collectionWidget.option("items"),i=0;i<t.length;i++)t[i]&&t[i].items?e=e.concat(t[i].items):e.push(t[i]);return e},deleteItemAtIndex:function(e){var t=Va(e),i=this._collectionWidget.option("items")[t.group].items;i.splice(t.item,1)},getKeysByItems:function(e){var t=[],i;for(i=0;i<e.length;i++)e[i]&&e[i].items?t=t.concat(e[i].items):t.push(e[i]);var n=[];for(i=0;i<t.length;i++)n.push(this._collectionWidget.keyOf(t[i]));return n},getIndexByKey:function(e,t){var i=t||this._collectionWidget.option("items"),n=-1,r=this;return F(i,function(a,o){if(o.items&&(F(o.items,function(s,l){var u=r._collectionWidget.keyOf(l);if(r._equalKeys(u,e))return n={group:a,item:s},!1}),n!==-1))return!1}),n},_getGroups:function(e){var t=this._collectionWidget.getDataSource(),i=t&&t.group();return i?Wr.queryByOptions(Gi(e),{group:i}).toArray():this._collectionWidget.option("items")},getItemsByKeys:function(e,t){var i=[],n=this._getGroups(t),r={},a=o=>{var s=this.getIndexByKey(o,n),l=s&&n[s.group];if(l)return{groupKey:l.key,item:l.items[s.item]}};return F(e,function(o,s){var l=a(s);if(l){var u=l.groupKey,d=l.item,c=r[u];c||(c={key:u,items:[]},r[u]=c,i.push(c)),c.items.push(d)}}),i},moveItemAtIndexToIndex:function(e,t){var i=this._collectionWidget.option("items"),n=Va(e),r=Va(t),a=i[n.group].items,o=i[r.group].items,s=a[n.item];a.splice(n.item,1),o.splice(r.item,0,s)},_isItemIndex:function(e){return e&&xt(e.group)&&xt(e.item)},_getNormalizedItemIndex:function(e){var t=v(e),i=t.closest("."+Ob);return i.length?Rb({group:this._groupElements().index(i),item:this._groupItemElements(i).index(t)}):-1},_normalizeItemIndex:function(e){return Rb(e)},_denormalizeItemIndex:function(e){return Va(e)},_getItemByNormalizedIndex:function(e){var t=Va(e),i=this._groupElements().eq(t.group);return this._groupItemElements(i).eq(t.item)},_itemsFromSameParent:function(e,t){return Va(e).group===Va(t).group}}),zO={};function f9(e,t,i){var n=zO,r={};r[e]=n[e]?n[e]:{},r[e][t]=i,O(n,r)}var GO=[],nf=function(e,t,i){GO.push({enabled:e,decoratorType:t,decoratorSubType:i})};nf(function(){return this.option("menuItems").length},function(){return"menu"},function(){return this.option("menuMode")});nf(function(){return!this.option("menuItems").length&&this.option("allowItemDeleting")},function(){var e=this.option("itemDeleteMode");return e==="toggle"||e==="slideButton"||e==="swipe"||e==="static"?"delete":"menu"},function(){var e=this.option("itemDeleteMode");return e==="slideItem"&&(e="slide"),e});nf(function(){return this.option("selectionMode")!=="none"&&this.option("showSelectionControls")},function(){return"selection"},function(){return"default"});nf(function(){return this.option("itemDragging.allowReordering")||this.option("itemDragging.allowDropInsideItem")||this.option("itemDragging.group")},function(){return"reorder"},function(){return"default"});var p9="dx-list-item-before-bag",v9="dx-list-item-after-bag",_9="beforeBag",g9="afterBag",m9="modifyElement",C9="afterRender",y9="getExcludedSelectors",x9=nt.inherit({ctor:function(e){this._list=e,this._fetchRequiredDecorators()},dispose:function(){this._decorators&&this._decorators.length&&F(this._decorators,function(e,t){t.dispose()})},_fetchRequiredDecorators:function(){this._decorators=[],F(GO,(function(e,t){var i=t.enabled.call(this._list);if(i){var n=t.decoratorType.call(this._list),r=t.decoratorSubType.call(this._list),a=this._createDecorator(n,r);this._decorators.push(a)}}).bind(this))},_createDecorator:function(e,t){var i=this._findDecorator(e,t);return new i(this._list)},_findDecorator:function(e,t){var i,n=(i=zO[e])===null||i===void 0?void 0:i[t];if(!n)throw Je.Error("E1012",e,t);return n},modifyItemElement:function(e){var t=v(e.itemElement),i={$itemElement:t};this._prependBeforeBags(t,i),this._appendAfterBags(t,i),this._applyDecorators(m9,i)},afterItemsRendered:function(){this._applyDecorators(C9)},_prependBeforeBags:function(e,t){var i=this._collectDecoratorsMarkup(_9,t,p9);e.prepend(i)},_appendAfterBags:function(e,t){var i=this._collectDecoratorsMarkup(g9,t,v9);e.append(i)},_collectDecoratorsMarkup:function(e,t,i){var n=v("<div>");return F(this._decorators,function(){var r=v("<div>").addClass(i);this[e](O({$container:r},t)),r.children().length&&n.append(r)}),n.children()},_applyDecorators:function(e,t){F(this._decorators,function(){this[e](t)})},_handlerExists:function(e){if(!this._decorators)return!1;for(var t=this._decorators,i=t.length,n=0;n<i;n++)if(t[n][e]!==ee)return!0;return!1},_eventHandler:function(e,t,i){if(!this._decorators)return!1;for(var n=!1,r=this._decorators,a=r.length,o=0;o<a&&(n=r[o][e](t,i),!n);o++);return n},handleClick:function(e,t){return this._eventHandler("handleClick",e,t)},handleKeyboardEvents:function(e,t){return this._eventHandler("handleKeyboardEvents",e,t)},handleEnterPressing:function(e){return this._eventHandler("handleEnterPressing",e)},contextMenuHandlerExists:function(){return this._handlerExists("handleContextMenu")},handleContextMenu:function(e,t){return this._eventHandler("handleContextMenu",e,t)},getExcludedItemSelectors:function(){var e=[];return this._applyDecorators(y9,e),e.join(",")}}),b9="dx-list-item-selected",S9="dx-list-item-response-wait",E9=hC.inherit({_supportedKeys(){var e=this,t=this.callBase(),i=(n,r)=>{var a=this._editStrategy,o=this.option("focusedElement"),s=a.getNormalizedIndex(o),l=s===this._getLastItemIndex();if(!(l&&this._isDataSourceLoading()))if(n.shiftKey&&e.option("itemDragging.allowReordering")){var u=s+(r?-1:1),d=a.getItemElement(u);this.reorderItem(o,d),this.scrollToItem(o),n.preventDefault()}else{var c=this._editProvider,h=c.handleKeyboardEvents(s,r);h||(r?t.upArrow(n):t.downArrow(n))}};return O({},t,{del:n=>{e.option("allowItemDeleting")&&(n.preventDefault(),e.deleteItem(e.option("focusedElement")))},upArrow:n=>i(n,!0),downArrow:n=>i(n),enter:function(n){this._editProvider.handleEnterPressing(n)||t.enter.apply(this,arguments)},space:function(n){this._editProvider.handleEnterPressing(n)||t.space.apply(this,arguments)}})},_updateSelection(){this._editProvider.afterItemsRendered(),this.callBase()},_getLastItemIndex(){return this._itemElements().length-1},_refreshItemElements(){this.callBase();var e=this._editProvider.getExcludedItemSelectors();e.length&&(this._itemElementsCache=this._itemElementsCache.not(e))},_isItemStrictEquals:function(e,t){var i=e&&e.__dx_key__;return i&&!this.key()&&this._selection.isItemSelected(i)?!1:this.callBase(e,t)},_getDefaultOptions(){return O(this.callBase(),{showSelectionControls:!1,selectionMode:"none",selectAllMode:"page",onSelectAllValueChanged:null,selectAllText:ue.format("dxList-selectAll"),menuItems:[],menuMode:"context",allowItemDeleting:!1,itemDeleteMode:"static",itemDragging:{}})},_defaultOptionsRules(){return this.callBase().concat([{device:e=>e.platform==="ios",options:{menuMode:"slide",itemDeleteMode:"slideItem"}},{device:{platform:"android"},options:{itemDeleteMode:"swipe"}}])},_init(){this.callBase(),this._initEditProvider()},_initDataSource(){this.callBase(),this._isPageSelectAll()||this._dataSource&&this._dataSource.requireTotalCount(!0)},_isPageSelectAll(){return this.option("selectAllMode")==="page"},_initEditProvider(){this._editProvider=new x9(this)},_disposeEditProvider(){this._editProvider&&this._editProvider.dispose()},_refreshEditProvider(){this._disposeEditProvider(),this._initEditProvider()},_initEditStrategy(){this.option("grouped")?this._editStrategy=new h9(this):this.callBase()},_initMarkup(){this._refreshEditProvider(),this.callBase()},_renderItems(){this.callBase(...arguments),this._editProvider.afterItemsRendered()},_selectedItemClass:()=>b9,_itemResponseWaitClass:()=>S9,_itemClickHandler(e){var t=v(e.currentTarget);if(!t.is(".dx-state-disabled, .dx-state-disabled *")){var i=this._editProvider.handleClick(t,e);i||(this._saveSelectionChangeEvent(e),this.callBase(...arguments))}},_shouldFireContextMenuEvent(){return this.callBase(...arguments)||this._editProvider.contextMenuHandlerExists()},_itemHoldHandler(e){var t=v(e.currentTarget);if(!t.is(".dx-state-disabled, .dx-state-disabled *")){var i=Au(e)&&this._editProvider.handleContextMenu(t,e);if(i){e.handledByEditProvider=!0;return}this.callBase(...arguments)}},_getItemContainer:function(e){if(this.option("grouped")){var t,i=(t=this._editStrategy.getIndexByItemData(e))===null||t===void 0?void 0:t.group;return this._getGroupContainerByIndex(i)}else return this.callBase(e)},_itemContextMenuHandler(e){var t=v(e.currentTarget);if(!t.is(".dx-state-disabled, .dx-state-disabled *")){var i=!e.handledByEditProvider&&this._editProvider.handleContextMenu(t,e);if(i){e.preventDefault();return}this.callBase(...arguments)}},_postprocessRenderItem(e){this.callBase(...arguments),this._editProvider.modifyItemElement(e)},_clean(){this._disposeEditProvider(),this.callBase()},focusListItem(e){var t=this._editStrategy.getItemElement(e);this.option("focusedElement",t),this.focus(),this.scrollToItem(this.option("focusedElement"))},_optionChanged(e){switch(e.name){case"selectAllMode":this._initDataSource(),this._dataSource.pageIndex(0),this._dataSource.load();break;case"grouped":this._clearSelectedItems(),delete this._renderingGroupIndex,this._initEditStrategy(),this.callBase(e);break;case"showSelectionControls":case"menuItems":case"menuMode":case"allowItemDeleting":case"itemDeleteMode":case"itemDragging":case"selectAllText":this._invalidate();break;case"onSelectAllValueChanged":break;default:this.callBase(e)}},selectAll(){return this._selection.selectAll(this._isPageSelectAll())},unselectAll(){return this._selection.deselectAll(this._isPageSelectAll())},isSelectAll(){return this._selection.getSelectAllState(this._isPageSelectAll())},getFlatIndexByItemElement(e){return this._itemElements().index(e)},getItemElementByFlatIndex(e){var t=this._itemElements();return e<0||e>=t.length?v():t.eq(e)},getItemByIndex(e){return this._editStrategy.getItemDataByIndex(e)}}),Bo=E9.inherit(Co).inherit({_addWidgetPrefix:function(e){return"dx-list-"+e},_getCombinedFilter:function(){var e,t,i=this._dataSource;return i&&(t={filter:i.filter()},i._addSearchFilter(t),e=t.filter),e},_initDataSource:function(){var e=this.option("searchValue"),t=this.option("searchExpr"),i=this.option("searchMode");this.callBase(),this._dataSource&&(e&&e.length&&this._dataSource.searchValue(e),i.length&&this._dataSource.searchOperation(Co.getOperationBySearchMode(i)),t&&this._dataSource.searchExpr(t))}});tt("dxList",Bo);var w9="dx-buttongroup",I9=["dxAutocomplete","dxButton","dxCheckBox","dxDateBox","dxMenu","dxSelectBox","dxTabs","dxTextBox","dxButtonGroup","dxDropDownButton"],T9=function(e){var t=e.data&&e.data(),i=t&&t.dxComponents,n=i&&i[0];return n&&t[n]};function uh(e,t){var i;if(e){var n=e._findItemElementByItem(t);if(n.length){var r=e._getItemData(n),a=!!((i=r.options)!==null&&i!==void 0&&i.disabled||r.disabled||e.option("disabled")),{widget:o}=r;if(o&&I9.indexOf(o)!==-1){var s=n.find(o.toLowerCase().replace("dx",".dx-"));if(s.length){var l,u,d=T9(s),c=o==="dxDropDownButton"?d._focusTarget().find(".".concat(w9)):(d==null||(l=d._focusTarget)===null||l===void 0?void 0:l.call(d))||v(d.element()),h=(u=r.options)===null||u===void 0?void 0:u.tabIndex;a?c.attr("tabIndex",-1):c.attr("tabIndex",h||0)}}}}}var A9=qe(),D9="dx-dropdownmenu",O9="dx-dropdownmenu-popup",R9="dx-dropdownmenu-popup-wrapper",k9="dx-dropdownmenu-list",B9="dx-dropdownmenu-button",L9={popupWidth:"width",popupHeight:"height",popupMaxHeight:"maxHeight",popupAutoResizeEnabled:"autoResizeEnabled"},P9={buttonIcon:"icon",buttonText:"text",buttonWidth:"width",buttonHeight:"height",buttonTemplate:"template"},UO=pi.inherit({_supportedKeys:function(){var e={};return(!this.option("opened")||!this._list.option("focusedElement"))&&(e=this._button._supportedKeys()),O(this.callBase(),e,{tab:function(){this._popup&&this._popup.hide()}})},_getDefaultOptions:function(){return O(this.callBase(),{items:[],onItemClick:null,dataSource:null,itemTemplate:"item",buttonText:"",buttonIcon:"overflow",buttonWidth:void 0,buttonHeight:void 0,buttonTemplate:"content",onButtonClick:null,usePopover:!1,popupWidth:"auto",popupHeight:"auto",activeStateEnabled:!0,hoverStateEnabled:!0,opened:!1,selectionMode:"none",selectedItemKeys:[],deferRendering:!1,popupPosition:{my:"top center",at:"bottom center",collision:"fit flip",offset:{v:1}},popupAnimation:void 0,onItemRendered:null,menuWidget:Bo,popupMaxHeight:void 0,closeOnClick:!0,useInkRipple:!1,container:void 0,popupAutoResizeEnabled:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{usePopover:!0}},{device:{platform:"generic"},options:{popupPosition:{offset:{v:4}}}},{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}},{device:{platform:"android"},options:{popupPosition:{my:"top "+(this.option("rtlEnabled")?"left":"right"),at:"top "+(this.option("rtlEnabled")?"left":"right"),collision:"flipfit"},popupAnimation:{show:{type:"pop",duration:200,from:{scale:0},to:{scale:1}},hide:{type:"pop",duration:200,from:{scale:1},to:{scale:0}}}}},{device:function(){return Qt()},options:{useInkRipple:!0}}])},_initOptions:function(e){Oe.current().platform==="android"&&(e.popupPosition||(e.popupPosition={at:(e.usePopover?"bottom ":"top ")+(e.rtlEnabled?"left":"right")})),this.callBase(e)},_dataSourceOptions:function(){return{paginate:!1}},_init:function(){this.callBase(),this.$element().addClass(D9),this._initDataSource(),this._initItemClickAction(),this._initButtonClickAction()},_initItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_initButtonClickAction:function(){this._buttonClickAction=this._createActionByOption("onButtonClick")},_initTemplates:function(){this._templateManager.addDefaultTemplates({content:new Bh("content")}),this.callBase()},_initMarkup:function(){this._renderButton(),this.callBase()},_render:function(){this.callBase(),this.setAria({role:"menubar",haspopup:!0,expanded:this.option("opened")})},_renderContentImpl:function(){this.option("opened")&&this._renderPopup()},_clean:function(){this._cleanFocusState(),this._popup&&(this._popup.$element().remove(),delete this._$popup)},_renderButton:function(){var e=this.$element().addClass(B9),t=this._buttonOptions();this._button=this._createComponent(e,Si,t)},_toggleActiveState:function(e,t,i){this._button._toggleActiveState(e,t,i)},_buttonOptions:function(){return{text:this.option("buttonText"),icon:this.option("buttonIcon"),width:this.option("buttonWidth"),height:this.option("buttonHeight"),useInkRipple:this.option("useInkRipple"),template:this.option("buttonTemplate"),hoverStateEnabled:!1,focusStateEnabled:!1,onClick:(function(e){this.option("opened",!this.option("opened")),this._buttonClickAction(e)}).bind(this)}},_toggleMenuVisibility:function(e){var t=e===void 0?!this._popup.option("visible"):e;e&&this._renderPopup(),this._popup.toggle(t),this.setAria("expanded",t)},_renderPopup:function(){if(!this._$popup){var e=this._$popup=v("<div>").appendTo(this.$element()),t=this._popupOptions();this._popup=this._createComponent(e,WO,t)}},_popupOptions:function(){var e=!this.option("usePopover");return{onInitialized:function(t){t.component.$wrapper().addClass(R9).toggleClass(O9,e)},visible:this.option("opened"),deferRendering:!1,contentTemplate:(function(t){this._renderList(t)}).bind(this),position:this.option("popupPosition"),animation:this.option("popupAnimation"),onOptionChanged:(function(t){t.name==="visible"&&this.option("opened",t.value)}).bind(this),target:this.$element(),height:this.option("popupHeight"),width:this.option("popupWidth"),maxHeight:this.option("popupMaxHeight"),container:this.option("container"),autoResizeEnabled:this.option("popupAutoResizeEnabled")}},_renderList:function(e){var t=v(e),i=this._listOptions();t.addClass(k9),this._list=this._createComponent(t,this.option("menuWidget"),i),this._list._getAriaTarget=(function(){return this.$element()}).bind(this),this._setListDataSource();var n=.5*je(A9);je(t)>n&&fn(t,n)},_itemOptionChanged:function(e,t,i){var n;(n=this._list)===null||n===void 0||n._itemOptionChanged(e,t,i),uh(this._list,e)},_listOptions:function(){return{pageLoadMode:"scrollBottom",indicateLoading:!1,noDataText:"",selectionMode:this.option("selectionMode"),selectedItemKeys:this.option("selectedItemKeys"),itemTemplate:this.option("itemTemplate"),onItemClick:(function(e){this.option("closeOnClick")&&this.option("opened",!1),this._itemClickAction(e)}).bind(this),tabIndex:-1,focusStateEnabled:this.option("focusStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),onItemRendered:this.option("onItemRendered"),_itemAttributes:{role:"menuitem"}}},_setListDataSource:function(){this._list&&this._list.option("dataSource",this._dataSource||this.option("items")),delete this._deferRendering},_getKeyboardListeners(){return this.callBase().concat([this._list])},_toggleVisibility:function(e){this.callBase(e),this._button.option("visible",e)},_optionChanged:function(e){var t=e.name,i=e.value;switch(t){case"items":case"dataSource":this.option("deferRendering")&&!this.option("opened")?this._deferRendering=!0:(this._refreshDataSource(),this._setListDataSource());break;case"itemTemplate":this._list&&this._list.option(t,this._getTemplate(i));break;case"onItemClick":this._initItemClickAction();break;case"onButtonClick":this._buttonClickAction();break;case"buttonIcon":case"buttonText":case"buttonWidth":case"buttonHeight":case"buttonTemplate":this._button.option(P9[t],i),this._renderPopup();break;case"popupWidth":case"popupHeight":case"popupMaxHeight":case"popupAutoResizeEnabled":this._popup.option(L9[t],i);break;case"usePopover":case"menuWidget":case"useInkRipple":this._invalidate();break;case"focusStateEnabled":case"activeStateEnabled":this._list&&this._list.option(t,i),this.callBase(e);break;case"selectionMode":case"selectedItemKeys":case"onItemRendered":this._list&&this._list.option(t,i);break;case"opened":this._deferRendering&&(this._refreshDataSource(),this._setListDataSource()),this._toggleMenuVisibility(i),this._updateFocusableItemsTabIndex();break;case"deferRendering":case"popupPosition":case"closeOnClick":break;case"container":this._popup&&this._popup.option(e.name,e.value);break;case"disabled":this._list&&this._updateFocusableItemsTabIndex();break;default:this.callBase(e)}},_updateFocusableItemsTabIndex(){this.option("items").forEach(e=>uh(this._list,e))},open:function(){this.option("opened",!0)},close:function(){this.option("opened",!1)}}).include(Hu);tt("dxDropDownMenu",UO);var F9="dx-state-invisible",M9="dx-toolbar-menu-container",V9=10;class N9{constructor(t){this._toolbar=t}render(){if(this._hasVisibleMenuItems()){this._renderMenuButtonContainer();var t=v("<div>").appendTo(this._dropDownMenuContainer());this._dropDownMenu=this._toolbar._createComponent(t,UO,this._dropDownMenuOptions()),this.renderMenuItems()}}renderMenuItems(){this._dropDownMenu||this.render(),this._dropDownMenu&&this._dropDownMenu.option("items",this._getMenuItems()),this._dropDownMenu&&!this._dropDownMenu.option("items").length&&this._dropDownMenu.close()}_renderMenuButtonContainer(){var t=this._toolbar._$afterSection;this._$menuButtonContainer=v("<div>").appendTo(t).addClass(this._toolbar._buttonClass()).addClass(M9)}_getMenuItemTemplate(){return this._toolbar._getTemplateByOption("menuItemTemplate")}_dropDownMenuOptions(){var t=this._toolbar._createActionByOption("onItemClick"),i=2*V9;return{disabled:this._toolbar.option("disabled"),itemTemplate:this._getMenuItemTemplate.bind(this),onItemClick:(function(n){t(n)}).bind(this),deferRendering:!0,container:this._toolbar.option("menuContainer"),popupMaxHeight:Oe.current().platform==="android"?fe.getDocumentElement().clientHeight-i:void 0,menuWidget:LO,onOptionChanged:n=>{var{name:r,value:a}=n;r==="opened"&&this._toolbar.option("overflowMenuVisible",a),r==="items"&&this._updateMenuVisibility(a)},popupPosition:{at:"bottom right",my:"top right"}}}_updateMenuVisibility(t){var i=t||this._getMenuItems(),n=i.length&&this._hasVisibleMenuItems(i);this._toggleMenuVisibility(n)}_getMenuItems(){return this._toolbar._getMenuItems()}_hasVisibleMenuItems(t){var i=t||this._toolbar.option("items"),n=!1,r=mt("visible"),a=mt("locateInMenu");return F(i,function(o,s){var l=r(s,{functionsAsIs:!0}),u=a(s,{functionsAsIs:!0});(l!==!1&&(u==="auto"||u==="always")||s.location==="menu")&&(n=!0)}),n}_toggleMenuVisibility(t){this._dropDownMenuContainer()&&this._dropDownMenuContainer().toggleClass(F9,!t)}_dropDownMenuContainer(){return this._$menuButtonContainer}widgetOption(t,i){this._dropDownMenu&&this._dropDownMenu.option(t,i)}itemOption(t,i,n){if(i==="disabled"||i==="options.disabled"){var r;(r=this._dropDownMenu)===null||r===void 0||r._itemOptionChanged(t,i,n)}else this.renderMenuItems()}}var Md="dx-toolbar-item-auto-hide",H9="dx-toolbar-text-auto-hide",$p="dx-toolbar-item-invisible",KO=VO.inherit({_getDefaultOptions:function(){return O(this.callBase(),{menuItemTemplate:"menuItem",menuContainer:void 0,overflowMenuVisible:!1})},updateDimensions:function(){this._dimensionChanged()},_dimensionChanged:function(e){e!=="height"&&(this.callBase(),this._menu.renderMenuItems())},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({actionSheetItem:new Bh("item")})},_initMarkup:function(){this.callBase(),this._updateFocusableItemsTabIndex(),this._renderMenu()},_postProcessRenderItems:function(){this._hideOverflowItems(),this._menu._updateMenuVisibility(),this.callBase(),Zt(()=>{this._menu.renderMenuItems()})},_renderItem:function(e,t,i,n){var r=this.callBase(e,t,i,n);return t.locateInMenu==="auto"&&r.addClass(Md),t.widget==="dxButton"&&t.showText==="inMenu"&&r.toggleClass(H9),r},_getItemsWidth:function(){return this._getSummaryItemsWidth([this._$beforeSection,this._$centerSection,this._$afterSection])},_hideOverflowItems:function(e){var t=this.$element().find("."+Md);if(t.length){e=e||$e(this.$element()),v(t).removeClass($p);for(var i=this._getItemsWidth();t.length&&e<i;){var n=t.eq(-1);i-=lt(n),n.addClass($p),t.splice(-1,1)}}},_getMenuItems:function(){var e=this,t=Vi(this.option("items")||[],function(r){return e._isMenuItem(r)}),i=this._itemContainer().children("."+Md+"."+$p).not(".dx-state-invisible");this._restoreItems=this._restoreItems||[];var n=[].slice.call(i).map(r=>{var a=e._getItemData(r),o=v(r).children(),s=o.children();return O({menuItemTemplate:function(){e._restoreItems.push({container:o,item:s});var l=v("<div>").addClass(Md);return l.append(s)}},a)});return[...n,...t]},_getToolbarItems:function(){var e=this;return Vi(this.option("items")||[],function(t){return!e._isMenuItem(t)})},_renderMenu:function(){this._renderMenuStrategy(),Zt(()=>{this._menu.render()})},_renderMenuStrategy:function(){this._menu||(this._menu=new N9(this))},_arrangeItems:function(){if(!this.$element().is(":hidden")){this._$centerSection.css({margin:"0 auto",float:"none"}),F(this._restoreItems||[],function(t,i){v(i.container).append(i.item)}),this._restoreItems=[];var e=$e(this.$element());this._hideOverflowItems(e),this.callBase(e)}},_itemOptionChanged:function(e,t,i){this._isMenuItem(e)?this._menu.itemOption(e,t,i):this._isToolbarItem(e)?this.callBase(e,t,i):(this.callBase(e,t,i),this._menu.renderMenuItems()),(t==="disabled"||t==="options.disabled")&&uh(this,e),t==="location"&&this.repaint()},_updateFocusableItemsTabIndex(){this._getToolbarItems().forEach(e=>uh(this,e))},_isMenuItem:function(e){return e.location==="menu"||e.locateInMenu==="always"},_isToolbarItem:function(e){return e.location===void 0||e.locateInMenu==="never"},_optionChanged:function(e){var{name:t,value:i}=e;switch(t){case"menuItemTemplate":this._changeMenuOption("itemTemplate",this._getTemplate(i));break;case"onItemClick":this._changeMenuOption(t,i),this.callBase.apply(this,arguments);break;case"menuContainer":this._changeMenuOption("container",i);break;case"overflowMenuVisible":this._changeMenuOption("opened",i);break;case"disabled":this._changeMenuOption("disabled",i),this.callBase.apply(this,arguments),this._updateFocusableItemsTabIndex();break;default:this.callBase.apply(this,arguments)}},_changeMenuOption:function(e,t){this._menu.widgetOption(e,t)}});tt("dxToolbar",KO);var $9="header-panel",kb="toolbar-button",W9="-ariaToolbar",Bb=["addRowButton","applyFilterButton","columnChooserButton","exportButton","groupPanel","revertButton","saveButton","searchPanel"],z9=Vu.inherit({_getToolbarItems:function(){return[]},_getButtonContainer:function(){return v("<div>").addClass(this.addWidgetPrefix(kb))},_getToolbarButtonClass:function(e){var t=e?" "+e:"";return this.addWidgetPrefix(kb)+t},_getToolbarOptions:function(){var e=this.option("toolbar"),t={toolbarOptions:{items:this._getToolbarItems(),visible:e==null?void 0:e.visible,disabled:e==null?void 0:e.disabled,onItemRendered:function(r){var a=r.itemData.onItemRendered;a&&a(r)}}},i=e==null?void 0:e.items;if(t.toolbarOptions.items=this._normalizeToolbarItems(t.toolbarOptions.items,i),this.executeAction("onToolbarPreparing",t),t.toolbarOptions&&!E(t.toolbarOptions.visible)){var n=t.toolbarOptions.items;t.toolbarOptions.visible=!!(n!=null&&n.length)}return t.toolbarOptions},_normalizeToolbarItems(e,t){e.forEach(o=>{if(!Bb.includes(o.name))throw new Error("Default toolbar item '".concat(o.name,"' is not added to DEFAULT_TOOLBAR_ITEM_NAMES"))});var i={location:"after"},n=Array.isArray(t);if(!E(t))return e;n||(t=[t]);var r={};e.forEach(o=>{r[o.name]=o});var a=t.map(o=>(Me(o)&&(o={name:o}),E(o.name)&&(E(r[o.name])?o=O(!0,{},r[o.name],o):Bb.includes(o.name)&&(o=be({},o,{visible:!1}))),O(!0,{},i,o)));return n?a:a[0]},_renderCore:function(){if(this._toolbar)this._toolbar.option(this._toolbarOptions);else{var e=this.element();e.addClass(this.addWidgetPrefix($9));var t=ue.format(this.component.NAME+W9),i=v("<div>").attr("aria-label",t).appendTo(e);this._toolbar=this._createComponent(i,KO,this._toolbarOptions)}},_columnOptionChanged:ee,_handleDataChanged:function(){this._requireReady&&this.render()},init:function(){this.callBase(),this.createAction("onToolbarPreparing",{excludeValidators:["disabled","readOnly"]})},render:function(){this._toolbarOptions=this._getToolbarOptions(),this.callBase.apply(this,arguments)},setToolbarItemDisabled:function(e,t){var i=this._toolbar;if(i){var n=i.option("items")||[],r=n.indexOf(n.filter(function(o){return o.name===e})[0]);if(r>=0){var a="items["+r+"]";i.option(a+".options")?i.option(a+".options.disabled",t):i.option(a+".disabled",t)}}},updateToolbarDimensions:function(){var e;(e=this._toolbar)===null||e===void 0||e.updateDimensions()},getHeaderPanel:function(){return this.element()},getHeight:function(){return this.getElementHeight()},optionChanged:function(e){if(e.name==="onToolbarPreparing"&&(this._invalidate(),e.handled=!0),e.name==="toolbar"&&(e.handled=!0,this._toolbar)){var t=So(e.fullName),i=e.fullName.replace(/^toolbar\./,"");if(t.length===1){var n=this._getToolbarOptions();this._toolbar.option(n)}else if(t[1]==="items")if(t.length===2){var r=this._getToolbarOptions();this._toolbar.option("items",r.items)}else if(t.length===3){var a=this._normalizeToolbarItems(this._getToolbarItems(),e.value);this._toolbar.option(i,a)}else t.length>=4&&this._toolbar.option(i,e.value);else this._toolbar.option(i,e.value)}this.callBase(e)},isVisible:function(){return this._toolbarOptions&&this._toolbarOptions.visible},allowDragging:ee}),jO={defaultOptions:function(){return{}},views:{headerPanel:z9},extenders:{controllers:{resizing:{_updateDimensionsCore:function(){this.callBase.apply(this,arguments),this.getView("headerPanel").updateToolbarDimensions()}}}}};jO.views.headerPanel;De.registerModule("headerPanel",jO);var G9=".dx-row",U9="Specifying grid templates with the jQuery selector name is now deprecated. Use the DOM Node or the jQuery object that references this selector instead.";De.registerModulesOrder(["stateStoring","columns","selection","editorFactory","columnChooser","grouping","editing","editingRowBased","editingFormBased","editingCellBased","masterDetail","validating","adaptivity","data","virtualScrolling","columnHeaders","filterRow","headerPanel","headerFilter","sorting","search","rows","pager","columnsResizingReordering","contextMenu","keyboardNavigation","errorHandling","summary","columnFixing","export","gridView"]);var pC=pi.inherit({_activeStateUnit:G9,_getDefaultOptions:function(){var e=this.callBase();return F(De.modules,function(){Ee(this.defaultOptions)&&O(!0,e,this.defaultOptions())}),e},_setDeprecatedOptions:function(){this.callBase(),O(this._deprecatedOptions,{useKeyboard:{since:"19.2",alias:"keyboardNavigation.enabled"},rowTemplate:{since:"21.2",message:'Use the "dataRowTemplate" option instead'},onToolbarPreparing:{since:"21.2",message:'Use the "toolbar" option instead'}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{showRowLines:!0}},{device:function(){return Qt()},options:{showRowLines:!0,showColumnLines:!1,headerFilter:{height:315},editing:{useIcons:!0},selection:{showCheckBoxesMode:"always"}}},{device:function(){return Bt.webkit},options:{loadingTimeout:30,loadPanel:{animation:{show:{easing:"cubic-bezier(1, 0, 1, 0)",duration:500,from:{opacity:0},to:{opacity:1}}}}}},{device:function(e){return e.deviceType!=="desktop"},options:{grouping:{expandMode:"rowClick"}}}])},_init:function(){this.callBase(),De.processModules(this,De),De.callModuleItemsMethod(this,"init")},_clean:ee,_optionChanged:function(e){De.callModuleItemsMethod(this,"optionChanged",[e]),e.handled||this.callBase(e)},_dimensionChanged:function(){this.updateDimensions(!0)},_visibilityChanged:function(e){e&&this.updateDimensions()},_initMarkup:function(){this.callBase.apply(this,arguments),this.getView("gridView").render(this.$element())},_renderContentImpl:function(){this.getView("gridView").update()},_renderContent:function(){var e=this;Zt(function(){e._renderContentImpl()})},_getTemplate:function(e){var t=e;return Me(t)&&t[0]==="#"&&(t=v(e),bu.warn(U9)),this.callBase(t)},_dispose:function(){this.callBase(),De.callModuleItemsMethod(this,"dispose")},isReady:function(){return this.getController("data").isReady()},beginUpdate:function(){this.callBase(),De.callModuleItemsMethod(this,"beginUpdate")},endUpdate:function(){De.callModuleItemsMethod(this,"endUpdate"),this.callBase()},getController:function(e){return this._controllers[e]},getView:function(e){return this._views[e]},focus:function(e){this.getController("keyboardNavigation").focus(e)}});pC.registerModule=De.registerModule.bind(De);tt("dxDataGrid",pC);var K9=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/,j9=function e(t){t&&F(t,function(i,n){if(Ye(n)||Array.isArray(n))e(n);else if(typeof n=="string"){var r=K9.exec(n);r&&(t[i]=new Date(Date.UTC(+r[1],+r[2]-1,+r[3],+r[4],+r[5],+r[6])))}})},q9=Tt.ViewController.inherit(function(){var e=function(i){var n=i.type==="sessionStorage"?rT():qe().localStorage;if(!n)throw new Error("E1007");return n},t=function(i){return E(i.storageKey)?i.storageKey:"storage"};return{_loadState:function(){var i=this.option("stateStoring");if(i.type==="custom")return i.customLoad&&i.customLoad();try{return JSON.parse(e(i).getItem(t(i)))}catch(n){Je.log(n.message)}},_saveState:function(i){var n=this.option("stateStoring");if(n.type==="custom"){n.customSave&&n.customSave(i);return}try{e(n).setItem(t(n),JSON.stringify(i))}catch(r){Je.log(r.message)}},publicMethods:function(){return["state"]},isEnabled:function(){return this.option("stateStoring.enabled")},init:function(){var i=this;return i._state={},i._isLoaded=!1,i._isLoading=!1,i._windowUnloadHandler=function(){i._savingTimeoutID!==void 0&&i._saveState(i.state())},D.on(qe(),"unload",i._windowUnloadHandler),i},isLoaded:function(){return this._isLoaded},isLoading:function(){return this._isLoading},load:function(){this._isLoading=!0;var i=gi(this._loadState());return i.always(()=>{this._isLoaded=!0,this._isLoading=!1}).done(n=>{n!==null&&!Rn(n)&&this.state(n)}),i},state:function(i){var n=this;if(arguments.length)n._state=O({},i),j9(n._state);else return O(!0,{},n._state)},save:function(){var i=this;clearTimeout(i._savingTimeoutID),i._savingTimeoutID=setTimeout(function(){i._saveState(i.state()),i._savingTimeoutID=void 0},i.option("stateStoring.savingTimeout"))},optionChanged:function(i){switch(i.name){case"stateStoring":this.isEnabled()&&!this.isLoading()&&this.load(),i.handled=!0;break;default:this.callBase(i)}},dispose:function(){clearTimeout(this._savingTimeoutID),D.off(qe(),"unload",this._windowUnloadHandler)}}}()),Y9=e=>{var t=e.getView("pagerView"),i=e.getController("data"),n={allowedPageSizes:t?t.getPageSizes():void 0,filterPanel:{filterEnabled:e.option("filterPanel.filterEnabled")},filterValue:e.option("filterValue"),focusedRowKey:e.option("focusedRowEnabled")?e.option("focusedRowKey"):void 0};return O(n,i.getUserState())},X9=e=>{var t=e.getController("columns"),i=e.getController("selection"),n=e.getController("export"),r=e.getController("data");t&&t.columnsChanged.add(function(){e.updateState({columns:t.getUserState()})}),i&&i.selectionChanged.add(function(a){e.updateState({selectedRowKeys:a.selectedRowKeys,selectionFilter:a.selectionFilter})}),r&&(e._initialPageSize=e.option("paging.pageSize"),e._initialFilterValue=e.option("filterValue"),r.changed.add(function(){var a=Y9(e);e.updateState(a)})),n&&n.selectionOnlyChanged.add(function(){e.updateState({exportSelectionOnly:n.selectionOnly()})})},Z9=null,Q9=(e,t)=>{var i=e.getController("filterSync"),n=e.getController("columns"),r=t.columns||t.filterValue!==void 0;return i?r?t.filterValue||i.getFilterValueFromColumns(t.columns):e._initialFilterValue||i.getFilterValueFromColumns(n.getColumns()):Z9},J9={defaultOptions:function(){return{stateStoring:{enabled:!1,storageKey:null,type:"localStorage",customLoad:null,customSave:null,savingTimeout:2e3}}},controllers:{stateStoring:q9},extenders:{views:{rowsView:{init:function(){var e=this,t=e.getController("data");e.callBase(),t.stateLoaded.add(function(){if(t.isLoaded()&&!t.getDataSource()){e.setLoading(!1),e.renderNoDataText();var i=e.component.getView("columnHeadersView");i&&i.render(),e.component._fireContentReadyAction()}})}}},controllers:{stateStoring:{init:function(){this.callBase.apply(this,arguments),X9(this)},isLoading:function(){return this.callBase()||this.getController("data").isStateLoading()},state:function(e){var t=this.callBase.apply(this,arguments);return e!==void 0&&this.applyState(O({},e)),t},updateState:function(e){if(this.isEnabled()){var t=this.state(),i=O({},t,e),n=Wn(t),r=Wn(i);kt(n,r)||(O(this._state,e),this.save())}else O(this._state,e)},applyState:function(e){var t=e.allowedPageSizes,i=e.searchText,n=e.selectedRowKeys,r=e.selectionFilter,a=this.getController("export"),o=this.getController("columns"),s=this.getController("data"),l=this.option("scrolling.mode"),u=l==="virtual"||l==="infinite",d=this.option("pager.visible")===!0&&this.option("pager.showPageSizeSelector");this.component.beginUpdate(),o&&o.setUserState(e.columns),a&&a.selectionOnly(e.exportSelectionOnly),this.option("selection.deferred")||this.option("selectedRowKeys",n||[]),this.option("selectionFilter",r),t&&this.option("pager.allowedPageSizes")==="auto"&&(this.option("pager").allowedPageSizes=t),this.option("focusedRowEnabled")&&(this.option("focusedRowIndex",-1),this.option("focusedRowKey",e.focusedRowKey||null)),this.component.endUpdate(),this.option("searchPanel.text",i||""),this.option("filterValue",Q9(this,e)),this.option("filterPanel.filterEnabled",e.filterPanel?e.filterPanel.filterEnabled:!0),this.option("paging.pageIndex",e.pageIndex||0),this.option("paging.pageSize",(!u||d)&&E(e.pageSize)?e.pageSize:this._initialPageSize),s&&s.reset()}},columns:{getVisibleColumns:function(){var e=this.callBase.apply(this,arguments),t=this.getController("stateStoring");return t.isEnabled()&&!t.isLoaded()?[]:e}},data:{callbackNames:function(){return this.callBase().concat(["stateLoaded"])},_refreshDataSource:function(){var e=this.callBase,t=this.getController("stateStoring");if(t.isEnabled()&&!t.isLoaded()){clearTimeout(this._restoreStateTimeoutID);var i=new te;return this._restoreStateTimeoutID=setTimeout(()=>{t.load().always(()=>{this._restoreStateTimeoutID=null}).done(()=>{e.call(this),this.stateLoaded.fire(),i.resolve()}).fail(n=>{this.stateLoaded.fire(),this._handleLoadError(n||"Unknown error"),i.reject()})}),i.promise()}else this.isStateLoading()||e.call(this)},isLoading:function(){var e=this.getController("stateStoring");return this.callBase()||e.isLoading()},isStateLoading:function(){return E(this._restoreStateTimeoutID)},isLoaded:function(){return this.callBase()&&!this.isStateLoading()},dispose:function(){clearTimeout(this._restoreStateTimeoutID),this.callBase()}},selection:{_fireSelectionChanged:function(e){var t=this.getController("stateStoring"),i=this.option("selection.deferred");t.isLoading()&&i||this.callBase.apply(this,arguments)}}}}};De.registerModule("stateStoring",J9);var qO="dx-editor-cell",e7="dx-row",Lb="dx-selection",Na="dx-select-checkbox",t7="dx-select-checkboxes-hidden",YO="dx-command-select",i7="dx-selection-disabled",XO="dx-data-row",ar="selection.showCheckBoxesMode",Ic="selection.mode",Pb=function(e,t){var i=e.getController("selection"),n=e.getView("rowsView"),r=v(t.target).closest("."+XO),a=n.getRowIndex(r);a<0||(e.option(ar)==="onLongTap"?i.isSelectionWithCheckboxes()?i.stopSelectionWithCheckboxes():i.startSelectionWithCheckboxes():(e.option(ar)==="onClick"&&i.startSelectionWithCheckboxes(),e.option(ar)!=="always"&&i.changeItemSelection(a,{control:!0})))},n7=De.Controller.inherit(function(){var e=(i,n)=>{var r=n.component,a=r.getView("rowsView");r.option("renderAsync")&&!r.option("selection.deferred")&&(n.value=r.isRowSelected(n.row.key)),a.renderSelectCheckBoxContainer(v(i),n)},t=(i,n)=>{var r=n.column,a=v(i),o=n.component.getView("columnHeadersView");a.addClass(qO),o._renderSelectAllCheckBox(a,r),o._attachSelectAllCheckBoxClickEvent(a)};return{init:function(){var{deferred:i,selectAllMode:n,mode:r}=this.option("selection")||{};this.option("scrolling.mode")==="infinite"&&!i&&r==="multiple"&&n==="allPages"&&Je.log("W1018"),this._dataController=this.getController("data"),this._selectionMode=r,this._isSelectionWithCheckboxes=!1,this._selection=this._createSelection(),this._updateSelectColumn(),this.createAction("onSelectionChanged",{excludeValidators:["disabled","readOnly"]}),this._dataController&&this._dataController.pushed.add(this._handleDataPushed.bind(this))},_handleDataPushed:function(i){var n=i.filter(r=>r.type==="remove").map(r=>r.key);n.length&&this.deselectRows(n)},_getSelectionConfig:function(){var i=this._dataController,n=this.getController("columns"),r=this.option("selection")||{},a=r.deferred,o=this.option("scrolling.mode"),s=o==="virtual"||o==="infinite",l=this.option("selection.allowSelectAll"),u=this.option("scrolling.legacyMode");return{selectedKeys:this.option("selectedRowKeys"),mode:this._selectionMode,deferred:a,maxFilterLengthInRequest:r.maxFilterLengthInRequest,selectionFilter:this.option("selectionFilter"),ignoreDisabledItems:!0,allowLoadByRange:function(){var d=n.getGroupColumns().length>0;return s&&!u&&!d&&l&&!a},key:function(){return i==null?void 0:i.key()},keyOf:function(d){return i==null?void 0:i.keyOf(d)},dataFields:function(){var d;return(d=i.dataSource())===null||d===void 0?void 0:d.select()},load:function(d){var c;return((c=i.dataSource())===null||c===void 0?void 0:c.load(d))||new te().resolve([])},plainItems:function(){return i.items(!0)},isItemSelected:function(d){return d.selected},isSelectableItem:function(d){return(d==null?void 0:d.rowType)==="data"&&!d.isNewRow},getItemData:function(d){return(d==null?void 0:d.oldData)||(d==null?void 0:d.data)||d},filter:function(){return i.getCombinedFilter(a)},totalCount:()=>i.totalCount(),getLoadOptions:function(d,c,h){var f,p,{sort:g,filter:m}=(f=(p=i.dataSource())===null||p===void 0?void 0:p.lastLoadOptions())!==null&&f!==void 0?f:{},C=Math.min(d,c),x=Math.max(d,c);E(h)&&(C=Math.min(h,C),x=Math.max(h,x));var T=x-C+1;return{skip:C,take:T,filter:m,sort:g}},onSelectionChanged:this._updateSelectedItems.bind(this)}},_updateSelectColumn:function(){var i=this.getController("columns"),n=this.isSelectColumnVisible();i.addCommandColumn({type:"selection",command:"select",visible:n,visibleIndex:-1,dataType:"boolean",alignment:"center",cssClass:YO,width:"auto",cellTemplate:e,headerCellTemplate:t}),i.columnOption("command:select","visible",n)},_createSelection:function(){var i=this._getSelectionConfig();return new SO(i)},_fireSelectionChanged:function(i){var n=this.option("selection.deferred")?{selectionFilter:this.option("selectionFilter")}:{selectedRowKeys:this.option("selectedRowKeys")};this.selectionChanged.fire(n),i&&this.executeAction("onSelectionChanged",i)},_updateCheckboxesState:function(i){var n=i.isDeferredMode,r=i.selectionFilter,a=i.selectedItemKeys,o=i.removedItemKeys;this.option(ar)==="onClick"&&((n?r&&function(s,l){var u=0,d=s._dataController.store(),c=d&&d.key(),h=Array.isArray(c);if(!l.length)return!1;if(h&&Array.isArray(l[0])&&l[1]==="and"){for(var f=0;f<l.length;f++)if(Array.isArray(l[f])){if(l[f][0]!==c[u]||l[f][1]!=="=")return!0;u++}return!1}return c!==l[0]}(this,r):a.length>1)?this.startSelectionWithCheckboxes():(n?r&&!r.length:a.length===0&&o.length)&&this.stopSelectionWithCheckboxes())},_updateSelectedItems:function(i){var n,r=this.option("selection.deferred"),a=this._selection.selectionFilter(),o=this._dataController,s=o.items();if(s){var l=this.isSelectionWithCheckboxes(),u=this.getChangedItemIndexes(s);this._updateCheckboxesState({selectedItemKeys:i.selectedItemKeys,removedItemKeys:i.removedItemKeys,selectionFilter:a,isDeferredMode:r}),(u.length||l!==this.isSelectionWithCheckboxes())&&o.updateItems({changeType:"updateSelection",itemIndexes:u}),r?(this.option("selectionFilter",a),n={}):(i.addedItemKeys.length||i.removedItemKeys.length)&&(this._selectedItemsInternalChange=!0,this.option("selectedRowKeys",i.selectedItemKeys.slice(0)),this._selectedItemsInternalChange=!1,n={selectedRowsData:i.selectedItems.slice(0),selectedRowKeys:i.selectedItemKeys.slice(0),currentSelectedRowKeys:i.addedItemKeys.slice(0),currentDeselectedRowKeys:i.removedItemKeys.slice(0)}),this._fireSelectionChanged(n)}},getChangedItemIndexes:function(i){for(var n=[],r=this.option("selection.deferred"),a=0,o=i.length;a<o;a++){var s=i[a],l=this.isRowSelected(r?s.data:s.key);this._selection.isDataItem(s)&&s.isSelected!==l&&n.push(a)}return n},callbackNames:function(){return["selectionChanged"]},optionChanged:function(i){switch(this.callBase(i),i.name){case"selection":var n=this._selectionMode;if(this.init(),i.fullName!=="selection.showCheckBoxesMode"){var r=this._selectionMode,a=this.option("selectedRowKeys");n!==r&&(r==="single"?a.length>1&&(a=[a[0]]):r!=="multiple"&&(a=[])),this.selectRows(a).always(()=>{this._fireSelectionChanged()})}this.getController("columns").updateColumns(),i.handled=!0;break;case"selectionFilter":this._selection.selectionFilter(i.value),i.handled=!0;break;case"selectedRowKeys":var o=i.value||[];Array.isArray(o)&&!this._selectedItemsInternalChange&&(this.component.getDataSource()||!o.length)&&this.selectRows(o),i.handled=!0}},publicMethods:function(){return["selectRows","deselectRows","selectRowsByIndexes","getSelectedRowKeys","getSelectedRowsData","clearSelection","selectAll","deselectAll","startSelectionWithCheckboxes","stopSelectionWithCheckboxes","isRowSelected"]},isRowSelected:function(i){return this._selection.isItemSelected(i)},isSelectColumnVisible:function(){return this.option(Ic)==="multiple"&&(this.option(ar)==="always"||this.option(ar)==="onClick"||this._isSelectionWithCheckboxes)},_isOnePageSelectAll:function(){return this.option("selection.selectAllMode")==="page"},isSelectAll:function(){return this._selection.getSelectAllState(this._isOnePageSelectAll())},selectAll:function(){return this.option(ar)==="onClick"&&this.startSelectionWithCheckboxes(),this._selection.selectAll(this._isOnePageSelectAll())},deselectAll:function(){return this._selection.deselectAll(this._isOnePageSelectAll())},clearSelection:function(){return this.selectedItemKeys([])},refresh:function(){var i=this.option("selectedRowKeys")||[];return!this.option("selection.deferred")&&i.length?this.selectedItemKeys(i):new te().resolve().promise()},selectedItemKeys:function(i,n,r,a){return this._selection.selectedItemKeys(i,n,r,a)},getSelectedRowKeys:function(){return this._selection.getSelectedItemKeys()},selectRows:function(i,n){return this.selectedItemKeys(i,n)},deselectRows:function(i){return this.selectedItemKeys(i,!0,!0)},selectRowsByIndexes:function(i){var n=this._dataController.items(),r=[];return Array.isArray(i)||(i=Array.prototype.slice.call(arguments,0)),F(i,function(){var a=n[this];a&&a.rowType==="data"&&r.push(a.key)}),this.selectRows(r)},getSelectedRowsData:function(){return this._selection.getSelectedItems()},changeItemSelection:function(i,n,r){n=n||{},this.isSelectionWithCheckboxes()&&(n.control=!0);var a=i+this._dataController.getRowIndexOffset()-this._dataController.getRowIndexOffset(!0);return this._selection.changeItemSelection(a,n,r)},focusedItemIndex:function(i){if(E(i))this._selection._focusedItemIndex=i;else return this._selection._focusedItemIndex},isSelectionWithCheckboxes:function(){return this.option(Ic)==="multiple"&&(this.option(ar)==="always"||this._isSelectionWithCheckboxes)},startSelectionWithCheckboxes:function(){return this.option(Ic)==="multiple"&&!this.isSelectionWithCheckboxes()?(this._isSelectionWithCheckboxes=!0,this._updateSelectColumn(),!0):!1},stopSelectionWithCheckboxes:function(){return this._isSelectionWithCheckboxes?(this._isSelectionWithCheckboxes=!1,this._updateSelectColumn(),!0):!1}}}()),r7={defaultOptions:function(){return{selection:{mode:"none",showCheckBoxesMode:"onClick",allowSelectAll:!0,selectAllMode:"allPages",maxFilterLengthInRequest:1500,deferred:!1},selectionFilter:[],selectedRowKeys:[]}},controllers:{selection:n7},extenders:{controllers:{data:{init:function(){var e=this.getController("selection"),t=this.option("selection.deferred");this.callBase.apply(this,arguments),t&&e._updateCheckboxesState({isDeferredMode:!0,selectionFilter:this.option("selectionFilter")})},_loadDataSource:function(){var e=this;return e.callBase().done(function(){e.getController("selection").refresh()})},_processDataItem:function(e,t){var i=this,n=i.getController("selection"),r=n.isSelectColumnVisible(),a=t.isDeferredSelection=t.isDeferredSelection===void 0?this.option("selection.deferred"):t.isDeferredSelection,o=this.callBase.apply(this,arguments);if(o.isSelected=n.isRowSelected(a?o.data:o.key),r&&o.values){for(var s=0;s<t.visibleColumns.length;s++)if(t.visibleColumns[s].command==="select"){o.values[s]=o.isSelected;break}}return o},refresh:function(e){var t=this,i=new te;return this.callBase.apply(this,arguments).done(function(){!e||e.selection?t.getController("selection").refresh().done(i.resolve).fail(i.reject):i.resolve()}).fail(i.reject),i.promise()},_handleDataChanged:function(e){this.callBase.apply(this,arguments),(!e||e.changeType==="refresh")&&!this._repaintChangesOnly&&this.getController("selection").focusedItemIndex(-1)},_applyChange:function(e){if(e&&e.changeType==="updateSelection"){e.items.forEach((t,i)=>{var n=this._items[i];n&&(n.isSelected=t.isSelected,n.values=t.values)});return}return this.callBase.apply(this,arguments)},_endUpdateCore:function(){var e=this._changes,t=e.length>1&&e.every(n=>n.changeType==="updateSelection");if(t){var i=e.map(n=>n.itemIndexes||[]).reduce((n,r)=>n.concat(r));this._changes=[{changeType:"updateSelection",itemIndexes:i}]}this.callBase.apply(this,arguments)}},contextMenu:{_contextMenuPrepared:function(e){var t=e.event;t.originalEvent&&t.originalEvent.type!=="dxhold"||e.items&&e.items.length>0||Pb(this,t)}}},views:{columnHeadersView:{init:function(){this.callBase(),this.getController("selection").selectionChanged.add(this._updateSelectAllValue.bind(this))},_updateSelectAllValue:function(){var e=this.element(),t=e&&e.find("."+Na);if(e&&t.length&&this.option("selection.mode")==="multiple"){var i=this.getController("selection").isSelectAll(),n=i!==!1,r=this.option("selection.allowSelectAll")?!this.getController("data").isEmpty():n;t.dxCheckBox("instance").option({visible:r,value:i})}},_handleDataChanged:function(e){this.callBase(e),(!e||e.changeType==="refresh")&&this._updateSelectAllValue()},_renderSelectAllCheckBox:function(e,t){var i=this,n=i.getController("selection"),r=i.getController("data").isEmpty(),a=v("<div>").appendTo(e).addClass(Na);return i.setAria("label",ue.format("dxDataGrid-ariaSelectAll"),e),i.getController("editorFactory").createEditor(a,O({},t,{parentType:"headerRow",dataType:"boolean",value:n.isSelectAll(),editorOptions:{visible:!r&&(i.option("selection.allowSelectAll")||n.isSelectAll()!==!1)},tabIndex:i.option("useLegacyKeyboardNavigation")?-1:i.option("tabIndex")||0,setValue:function(o,s){var l=i.option("selection.allowSelectAll");s.component.option("visible",l||s.component.option("value")!==!1),!(!s.event||n.isSelectAll()===o)&&(s.value&&!l?s.component.option("value",!1):s.value?n.selectAll():n.deselectAll(),s.event.preventDefault())}})),a},_attachSelectAllCheckBoxClickEvent:function(e){D.on(e,ct,this.createAction(function(t){var i=t.event;v(i.target).closest("."+Na).length||D.trigger(v(i.currentTarget).children("."+Na),ct),i.preventDefault()}))}},rowsView:{renderSelectCheckBoxContainer:function(e,t){t.rowType==="data"&&!t.row.isNewRow?(e.addClass(qO),this._attachCheckBoxClickEvent(e),this.setAria("label",ue.format("dxDataGrid-ariaSelectRow"),e),this._renderSelectCheckBox(e,t)):xe.setEmptyText(e)},_renderSelectCheckBox:function(e,t){var i=v("<div>").addClass(Na).appendTo(e);return this.getController("editorFactory").createEditor(i,O({},t.column,{parentType:"dataRow",dataType:"boolean",lookup:null,value:t.value,setValue:function(n,r){var a;(r==null||(a=r.event)===null||a===void 0?void 0:a.type)==="keydown"&&D.trigger(r.element,ct,r)},row:t.row})),i},_attachCheckBoxClickEvent:function(e){D.on(e,ct,this.createAction(function(t){var i=this.getController("selection"),n=t.event,r=this.getRowIndex(v(n.currentTarget).closest("."+e7));r>=0&&(i.startSelectionWithCheckboxes(),i.changeItemSelection(r,{shift:n.shiftKey}),v(n.target).closest("."+Na).length&&this.getController("data").updateItems({changeType:"updateSelection",itemIndexes:[r]}))}))},_update:function(e){var t=this,i=t.getTableElements();e.changeType==="updateSelection"?i.length>0&&(F(i,function(n,r){F(e.itemIndexes||[],function(a,o){var s;if(e.items[o]&&(s=t._getRowElements(v(r)).eq(o),s.length)){var l=e.items[o].isSelected;s.toggleClass(Lb,l===void 0?!1:l).find("."+Na).dxCheckBox("option","value",l),t.setAria("selected",l,s)}})}),t._updateCheckboxesClass()):t.callBase(e)},_createTable:function(){var e=this,t=e.option("selection.mode"),i=e.callBase.apply(e,arguments);return t!=="none"&&((e.option(ar)==="onLongTap"||!fo)&&D.on(i,me(ma.name,"dxDataGridRowsView"),"."+XO,e.createAction(function(n){Pb(e.component,n.event),n.event.stopPropagation()})),D.on(i,"mousedown selectstart",e.createAction(function(n){var r=n.event;r.shiftKey&&r.preventDefault()}))),i},_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=e.isSelected;i&&t.addClass(Lb),this.setAria("selected",i,t)}return t},_rowClick:function(e){var t=e.event,i=v(t.target).closest("."+i7).length;this.isClickableElement(v(t.target))||(!i&&(this.option(Ic)!=="multiple"||this.option(ar)!=="always")&&this.getController("selection").changeItemSelection(e.rowIndex,{control:fi(t),shift:t.shiftKey})&&(t.preventDefault(),e.handled=!0),this.callBase(e))},isClickableElement:function(e){var t=e.closest("."+YO).length;return!!t},_renderCore:function(e){this.callBase(e),this._updateCheckboxesClass()},_updateCheckboxesClass:function(){var e=this.getTableElements(),t=this.getController("selection"),i=t.isSelectColumnVisible()&&!t.isSelectionWithCheckboxes();F(e,function(n,r){v(r).toggleClass(t7,i)})}}}}};De.registerModule("selection",r7);var Fb="dx-invalid-message-auto",Mb="dx-validation-target";let vC=class extends Xu{getProps(){var t=super.getProps();return t.onFocusIn=()=>{var i=this.option("validationMessageMode")==="auto";if(i){var n=v(".dx-invalid-message.dx-overlay-wrapper");n==null||n.removeClass(Fb),this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>{n==null||n.addClass(Fb)},150)}},t.saveValueChangeEvent=i=>{this._valueChangeEventInstance=i},t}_createElement(t){super._createElement(t),this.showValidationMessageTimeout=void 0,this.validationRequest=dt(),Mt(this.$element()[0],Mb,this)}_render(){var t;(t=this.option("_onMarkupRendered"))===null||t===void 0||t()}_initializeComponent(){super._initializeComponent(),this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})}_initOptions(t){super._initOptions(t),this.option(pt.initValidationOptions(t))}_getDefaultOptions(){return O(super._getDefaultOptions(),{validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})}_bindInnerWidgetOptions(t,i){var n=O({},t.option()),r=()=>this._silent(i,n);r(),t.on("optionChanged",r)}_raiseValidation(t,i){var n=!E(t)&&!E(i);t!==i&&!n&&this.validationRequest.fire({value:t,editor:this})}_raiseValueChangeAction(t,i){var n;(n=this._valueChangeAction)===null||n===void 0||n.call(this,{element:this.$element(),previousValue:i,value:t,event:this._valueChangeEventInstance}),this._valueChangeEventInstance=void 0}_optionChanged(t){var{name:i,previousValue:n,value:r}=t;switch(i&&this._getActionConfigs()[i]!==void 0&&this._addAction(i),i){case"value":this._raiseValidation(r,n),this._raiseValueChangeAction(r,n);break;case"onValueChanged":this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]});break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(pt.synchronizeValidationOptions(t,this.option()))}super._optionChanged(t)}reset(){var{value:t}=this._getDefaultOptions();this.option({value:t})}_dispose(){super._dispose(),Mt(this.element(),Mb,null),this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout)}};var a7=Gn.isEditor,ZO=e=>a7(e)||e instanceof vC;vC.isEditor=ZO;Gn.isEditor=ZO;let o7=class extends vC{_useTemplates(){return!1}_isFocused(){var t=this.$element()[0];return t.classList.contains("dx-state-focused")}getSupportedKeyNames(){return["space"]}getProps(){var t=super.getProps();return t.value!==null&&(t.value=!!t.value),t}};var s7=["dataSource","selectedRowKeys"],l7={integrationOptions:!0};function dl(e,t,i){return{path:e,value:t,previousValue:i}}function Vb(e,t,i,n,r,a){if(!l7[n]){var o=On(t),s=On(i);if(t!==i)if(o!==s)e.push(dl(n,i,t));else if(o==="object")if(!Ye(i))e.push(dl(n,i,t));else{var l=Nb(t,i,r,a);e.push(...l.map(c=>be({},c,{path:"".concat(n,".").concat(c.path)})))}else if(o==="array"){var u=a.some(c=>r.includes(c));if(u&&t!==i)e.push(dl(n,i,t));else if(t.length!==i.length)e.push(dl(n,i,t));else{var d=Nb(t,i,r,a);[].push.apply(e,d.map(c=>be({},c,{path:"".concat(n).concat(c.path)})))}}else e.push(dl(n,i,t))}}var QO=e=>(t,i,n,r)=>{var a=[],o=Array.isArray(t)?s=>{Vb(a,t[s],i[s],"[".concat(s,"]"),"".concat(n,".").concat(s),r)}:s=>{Vb(a,t[s],i[s],s,"".concat(n,".").concat(s),r)};return e(t).forEach(o),Object.keys(i).filter(s=>!Object.prototype.hasOwnProperty.call(t,s)&&t[s]!==i[s]).forEach(s=>{a.push({path:s,value:i[s],previousValue:t[s]})}),a},Nb=QO(e=>Object.keys(e)),u7={key:!0,ref:!0,children:!0,style:!0},d7=QO(e=>Object.keys(e).filter(t=>!u7[t]));function c7(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s7;return d7(e,t,"",i)}var h7=["valueChange"],f7=["componentProps","componentType","rootElementRef","templateNames"],JO=e=>Object.keys(e).reduce((t,i)=>(e[i]!==void 0&&(t[i]=e[i]),t),{}),p7=e=>{var{props:{componentProps:{className:t}},restAttributes:i,widgetRef:n}=e;return JO(qt(1,"div",t,null,1,be({},i),null,n))},v7={};class rf extends fr{constructor(t){super(t),this.state={},this.widgetRef=xi(),this.getInstance=this.getInstance.bind(this),this.setupWidget=this.setupWidget.bind(this),this.setRootElementRef=this.setRootElementRef.bind(this),this.updateWidget=this.updateWidget.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:Zh}createEffects(){return[new Rt(this.setupWidget,[]),new Rt(this.setRootElementRef,[]),new Rt(this.updateWidget,[this.props.componentProps,this.config,this.props.templateNames])]}updateEffects(){var t;(t=this._effects[2])===null||t===void 0||t.update([this.props.componentProps,this.config,this.props.templateNames])}setupWidget(){var t=new this.props.componentType(this.widgetRef.current,this.properties);return this.instance=t,()=>{t.dispose(),this.instance=null}}setRootElementRef(){var{rootElementRef:t}=this.props;t&&(t.current=this.widgetRef.current)}updateWidget(){var t=this.getInstance();if(t){var i=c7(this.prevProps||{},this.properties);i.length&&(t.beginUpdate(),i.forEach(n=>{var{path:r,value:a}=n;t.option(r,a)}),t.endUpdate()),this.prevProps=this.properties}}get properties(){var t,i=JO(this.props.componentProps),{valueChange:n}=i,r=Lt(i,h7),a=be({rtlEnabled:!!((t=this.config)!==null&&t!==void 0&&t.rtlEnabled),isRenovated:!0},r);n&&(a.onValueChanged=s=>{var{value:l}=s;return n(l)});var o=this.props.templateNames;return o.forEach(s=>{w6(s,a)&&(a[s]=(l,u,d)=>{E6(this.props.componentProps[s],{item:l,index:u,container:d})})}),a}get restAttributes(){var t=this.props,i=Lt(t,f7);return i}getInstance(){return this.instance}render(){var t=this.props;return p7({props:be({},t),widgetRef:this.widgetRef,config:this.config,properties:this.properties,restAttributes:this.restAttributes})}}rf.defaultProps=v7;var _7=["accessKey","activeStateEnabled","boundary","className","contentId","disabled","focusStateEnabled","height","hint","hoverStateEnabled","mode","offset","onClick","onKeyDown","positionRequest","rtlEnabled","tabIndex","target","validationErrors","visible","visualContainer","width"],g7=e=>{var{componentProps:t,restAttributes:i}=e;return nn(Et(2,rf,be({componentType:Um,componentProps:t,templateNames:[]},i)))},m7=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(Xh),Object.getOwnPropertyDescriptors({mode:"auto",offset:Object.freeze({h:0,v:0}),isReactComponentWrapper:!0})));class e1 extends Ln{constructor(t){super(t),this.state={}}get componentProps(){return this.props}get restAttributes(){var t=this.props,i=Lt(t,_7);return i}render(){var t=this.props;return g7({props:be({},t),componentProps:this.componentProps,restAttributes:this.restAttributes})}}e1.defaultProps=m7;var C7=["accessKey","activeStateEnabled","aria","children","className","classes","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","visible","width"],y7=e=>{var{classes:t,isValid:i,readOnly:n}=e,r={"dx-state-readonly":!!n,"dx-invalid":!i,["".concat(t)]:!!t};return Tn(r)},x7=e=>{var{aria:t,cssClasses:i,isValidationMessageVisible:n,onFocusIn:r,props:{accessKey:a,activeStateEnabled:o,children:s,className:l,disabled:u,focusStateEnabled:d,height:c,hint:h,hoverStateEnabled:f,onClick:p,onKeyDown:g,rtlEnabled:m,tabIndex:C,validationMessageMode:x,visible:T,width:R},restAttributes:A,rootElementRef:H,validationErrors:$,validationMessageGuid:V,validationMessageTarget:U,widgetRef:K}=e;return nn(Et(2,Qh,be({rootElementRef:H,aria:t,classes:i,activeStateEnabled:o,focusStateEnabled:d,hoverStateEnabled:f,accessKey:a,className:l,rtlEnabled:m,hint:h,disabled:u,height:c,width:R,onFocusIn:r,onClick:p,onKeyDown:g,tabIndex:C,visible:T},A,{children:jr([s,n&&Et(2,e1,{validationErrors:$,mode:x,positionRequest:"below",rtlEnabled:m,target:U,boundary:U,visualContainer:U,contentId:V})],0)}),null,K))},vi=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(Xh),Object.getOwnPropertyDescriptors({readOnly:!1,name:"",validationError:null,validationErrors:null,validationMessageMode:"auto",validationStatus:"valid",isValid:!0,defaultValue:null,valueChange:()=>{}}))),b7={get readOnly(){return vi.readOnly},get name(){return vi.name},get validationError(){return vi.validationError},get validationErrors(){return vi.validationErrors},get validationMessageMode(){return vi.validationMessageMode},get validationStatus(){return vi.validationStatus},get isValid(){return vi.isValid},get defaultValue(){return vi.defaultValue},get valueChange(){return vi.valueChange},get className(){return vi.className},get activeStateEnabled(){return vi.activeStateEnabled},get disabled(){return vi.disabled},get focusStateEnabled(){return vi.focusStateEnabled},get hoverStateEnabled(){return vi.hoverStateEnabled},get tabIndex(){return vi.tabIndex},get visible(){return vi.visible},get aria(){return oh.aria},get classes(){return oh.classes}};class t1 extends qu{constructor(t){super(t),this.widgetRef=xi(),this.rootElementRef=xi(),this.__getterCache={},this.state={validationMessageGuid:"dx-".concat(new ri),isValidationMessageVisible:!1,value:this.props.value!==void 0?this.props.value:this.props.defaultValue},this.updateValidationMessageVisibility=this.updateValidationMessageVisibility.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onFocusIn=this.onFocusIn.bind(this)}createEffects(){return[new Rt(this.updateValidationMessageVisibility,[this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors]),Yu()]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors])}updateValidationMessageVisibility(){this.setState(t=>({isValidationMessageVisible:this.shouldShowValidationMessage}))}onFocusIn(t){var{onFocusIn:i}=this.props;i==null||i(t)}get cssClasses(){return"".concat(y7(be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})))}get shouldShowValidationMessage(){var t,{isValid:i,validationStatus:n}=this.props,r=(t=this.validationErrors)!==null&&t!==void 0?t:[],a=i&&n!=="invalid";return!a&&r.length>0}get aria(){var{isValid:t,readOnly:i}=this.props,n={readonly:i?"true":"false",invalid:t?"false":"true"};return this.shouldShowValidationMessage&&(n.describedBy=this.state.validationMessageGuid),be({},n,this.props.aria)}get validationErrors(){return this.__getterCache.validationErrors!==void 0?this.__getterCache.validationErrors:this.__getterCache.validationErrors=(()=>{var{validationError:t,validationErrors:i}=this.props,n=i&&[...i];return!n&&t&&(n=[be({},t)]),n})()}get validationMessageTarget(){var t;return(t=this.rootElementRef)===null||t===void 0?void 0:t.current}get restAttributes(){var t=be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Lt(t,C7);return i}focus(){this.widgetRef.current.focus()}blur(){this.widgetRef.current.blur()}componentWillUpdate(t,i,n){super.componentWillUpdate(),(this.props.validationError!==t.validationError||this.props.validationErrors!==t.validationErrors)&&(this.__getterCache.validationErrors=void 0)}render(){var t=this.props;return x7({props:be({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),validationMessageGuid:this.state.validationMessageGuid,isValidationMessageVisible:this.state.isValidationMessageVisible,rootElementRef:this.rootElementRef,widgetRef:this.widgetRef,onFocusIn:this.onFocusIn,cssClasses:this.cssClasses,shouldShowValidationMessage:this.shouldShowValidationMessage,aria:this.aria,validationErrors:this.validationErrors,validationMessageTarget:this.validationMessageTarget,restAttributes:this.restAttributes})}}t1.defaultProps=b7;function i1(e){var t,i=qe();return e?(t=i.getComputedStyle)===null||t===void 0?void 0:t.call(i,e):null}var S7=[[22,16],[18,16]],E7=[[[12,8],[20,18]],[[16,10],[16,14]]];function n1(){var e=Un();return{isMaterialTheme:Qt(e),isCompactTheme:oH(e)}}function w7(){var{isCompactTheme:e,isMaterialTheme:t}=n1();return S7[+t][+e]}function I7(e){var{isCompactTheme:t,isMaterialTheme:i}=n1();return E7[+e][+i][+t]}function T7(e,t){var i=I7(t),n=w7(),r=i/n;return Math.ceil(r*e)}var A7=["isChecked","size"],D7=e=>{var{cssStyles:t,elementRef:i}=e;return qt(1,"span","dx-checkbox-icon",null,1,{style:eC(t)},null,i)},O7={isChecked:!1};class r1 extends fr{constructor(t){super(t),this.state={},this.elementRef=xi(),this.__getterCache={},this.updateFontSize=this.updateFontSize.bind(this),this.setIconFontSize=this.setIconFontSize.bind(this),this.getIconSize=this.getIconSize.bind(this),this.getComputedIconSize=this.getComputedIconSize.bind(this)}createEffects(){return[new Rt(this.updateFontSize,[this.props.isChecked,this.props.size])]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props.isChecked,this.props.size])}updateFontSize(){var{isChecked:t,size:i}=this.props;if(Ke()&&i){var n=this.getIconSize(i),r=T7(n,t);this.setIconFontSize(r)}}setIconFontSize(t){var i=this.elementRef.current;i.style.fontSize="".concat(t,"px")}getIconSize(t){return xt(t)?t:t.endsWith("px")?parseInt(t,10):this.getComputedIconSize()}getComputedIconSize(){var t=this.elementRef.current,i=i1(t),n=parseInt(i==null?void 0:i.width,10);return n}get cssStyles(){return this.__getterCache.cssStyles!==void 0?this.__getterCache.cssStyles:this.__getterCache.cssStyles=(()=>{var{size:t}=this.props,i=ws("width",t),n=ws("height",t);return{height:n,width:i}})()}get restAttributes(){var t=this.props,i=Lt(t,A7);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),this.props.size!==t.size&&(this.__getterCache.cssStyles=void 0)}render(){var t=this.props;return D7({props:be({},t),elementRef:this.elementRef,setIconFontSize:this.setIconFontSize,getIconSize:this.getIconSize,getComputedIconSize:this.getComputedIconSize,cssStyles:this.cssStyles,restAttributes:this.restAttributes})}}r1.defaultProps=O7;var R7=["accessKey","activeStateEnabled","aria","className","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","iconSize","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","saveValueChangeEvent","tabIndex","text","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","visible","width"],k7=e=>{var{text:t,value:i}=e,n=i,r=n===null,a={"dx-checkbox":!0,"dx-checkbox-checked":n===!0,"dx-checkbox-has-text":!!t,"dx-checkbox-indeterminate":r};return Tn(a)},B7=e=>{var{aria:t,cssClasses:i,editorRef:n,keyDown:r,onWidgetClick:a,props:{accessKey:o,activeStateEnabled:s,className:l,disabled:u,focusStateEnabled:d,height:c,hint:h,hoverStateEnabled:f,iconSize:p,isValid:g,name:m,onFocusIn:C,readOnly:x,rtlEnabled:T,tabIndex:R,text:A,validationError:H,validationErrors:$,validationMessageMode:V,validationStatus:U,value:K,visible:X,width:M},restAttributes:q}=e;return nn(Et(2,t1,be({aria:t,classes:i,onClick:a,onKeyDown:r,accessKey:o,activeStateEnabled:s,focusStateEnabled:d,hoverStateEnabled:f,className:l,disabled:u,readOnly:x,hint:h,height:c,width:M,rtlEnabled:T,tabIndex:R,visible:X,validationError:H,validationErrors:$,validationMessageMode:V,validationStatus:U,isValid:g,onFocusIn:C},q,{children:jr([nn(qt(64,"input",null,null,1,be({type:"hidden",value:"".concat(K)},m&&{name:m}))),qt(1,"div","dx-checkbox-container",[Et(2,r1,{size:p,isChecked:K===!0}),A&&qt(1,"span","dx-checkbox-text",A,0)],0)],4)}),null,n))},Ri=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(vi),Object.getOwnPropertyDescriptors({text:"",activeStateEnabled:!0,hoverStateEnabled:!0,get focusStateEnabled(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},defaultValue:!1,valueChange:()=>{}}))),L7={get text(){return Ri.text},get activeStateEnabled(){return Ri.activeStateEnabled},get hoverStateEnabled(){return Ri.hoverStateEnabled},get focusStateEnabled(){return Ri.focusStateEnabled},get defaultValue(){return Ri.defaultValue},get valueChange(){return Ri.valueChange},get readOnly(){return Ri.readOnly},get name(){return Ri.name},get validationError(){return Ri.validationError},get validationErrors(){return Ri.validationErrors},get validationMessageMode(){return Ri.validationMessageMode},get validationStatus(){return Ri.validationStatus},get isValid(){return Ri.isValid},get className(){return Ri.className},get disabled(){return Ri.disabled},get tabIndex(){return Ri.tabIndex},get visible(){return Ri.visible},get aria(){return oh.aria}};let dh=class extends qu{constructor(t){super(t),this.editorRef=xi(),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue},this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.onWidgetClick=this.onWidgetClick.bind(this),this.keyDown=this.keyDown.bind(this)}createEffects(){return[Yu()]}onWidgetClick(t){var i,{readOnly:n,saveValueChangeEvent:r}=this.props,a=(i=this.props.value!==void 0?this.props.value:this.state.value)!==null&&i!==void 0?i:!1;if(!n){r==null||r(t);var o;this.setState(s=>(o=!a,{value:o})),this.props.valueChange(o)}}keyDown(t){var{onKeyDown:i}=this.props,{keyName:n,originalEvent:r,which:a}=t,o=i==null?void 0:i(t);if(o!=null&&o.cancel)return o;(n==="space"||a==="space")&&(r.preventDefault(),this.onWidgetClick(r))}get cssClasses(){return k7(be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}))}get aria(){var t=(this.props.value!==void 0?this.props.value:this.state.value)===!0,i=(this.props.value!==void 0?this.props.value:this.state.value)===null,n={role:"checkbox",checked:i?"mixed":"".concat(t)};return be({},n,this.props.aria)}get restAttributes(){var t=be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Lt(t,R7);return i}focus(){this.editorRef.current.focus()}blur(){this.editorRef.current.blur()}render(){var t=this.props;return B7({props:be({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),editorRef:this.editorRef,onWidgetClick:this.onWidgetClick,keyDown:this.keyDown,cssClasses:this.cssClasses,aria:this.aria,restAttributes:this.restAttributes})}};function P7(e){var t=["value"];return Object.keys(e).reduce((i,n)=>{var r=e[n],a=t.some(o=>o===n)?"default"+n.charAt(0).toUpperCase()+n.slice(1):n;return i[a]=r,i},{})}dh.defaultProps=L7;var Hb=[];function F7(e){Hb.push(e),dh.defaultProps=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(dh.defaultProps),Object.getOwnPropertyDescriptors(P7(Is(Hb)))))}class yo extends o7{getProps(){var t=super.getProps();return t.onKeyDown=this._wrapKeyDownHandler(t.onKeyDown),t}focus(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.focus(...arguments)}blur(){var t;return(t=this.viewRef)===null||t===void 0?void 0:t.blur(...arguments)}_getActionConfigs(){return{onFocusIn:{},onClick:{}}}get _propsInfo(){return{twoWay:[["value","defaultValue","valueChange"]],allowNull:["defaultValue","validationError","validationErrors","value"],elements:[],templates:[],props:["text","iconSize","activeStateEnabled","hoverStateEnabled","focusStateEnabled","saveValueChangeEvent","defaultValue","valueChange","readOnly","name","validationError","validationErrors","validationMessageMode","validationStatus","isValid","onFocusIn","className","accessKey","disabled","height","hint","onClick","onKeyDown","rtlEnabled","tabIndex","visible","width","aria","value"]}}get _viewComponent(){return dh}}tt("dxCheckBox",yo);yo.defaultOptions=F7;var Aa="dx-treeview",$i="".concat(Aa,"-node"),br="".concat($i,"-container"),Wp="".concat($i,"-loadindicator"),Ha="".concat($i,"-container-opened"),cl="".concat($i,"-is-leaf"),Ti="".concat(Aa,"-item"),M7="".concat(Ti,"-with-checkbox"),V7="".concat(Ti,"-without-checkbox"),N7="".concat(Ti,"-data"),Yo="".concat(Aa,"-toggle-item-visibility"),H7="".concat(Aa,"-loadindicator"),$7="".concat(Aa,"-loadindicator-wrapper"),zp="".concat(Aa,"-toggle-item-visibility-opened"),Gp="".concat(Aa,"-select-all-item"),$b="dx-state-invisible",hl="dx-state-disabled",W7="dx-state-selected",Up="dxTreeView_expand",Vd="data-item-id",z7=EO.inherit({_supportedKeys:function(e){var t=r=>{var a=v(this.option("focusedElement"));if(a.length){r.target=a,r.currentTarget=a,this._itemClickHandler(r,a.children("."+Ti));var o=this._getEventNameByOption(this.option("expandEvent")),s=o===me(ct,Up);s&&this._expandEventHandler(r)}},i=r=>{r.preventDefault();var a=v(this.option("focusedElement")),o=this._getCheckBoxInstance(a);if(!o.option("disabled")){var s=o.option("value");this._updateItemSelection(!s,a.find("."+Ti).get(0),!0)}},n=function(r,a){if(this.option("expandAllEnabled")){a.preventDefault();var o=v(this.option("focusedElement"));if(o.length){var s=this._getItemData(o.find(".".concat(Ti)));this._toggleExpandedNestedItems([s],r)}}};return O(this.callBase(),{enter:this._showCheckboxes()?i:t,space:this._showCheckboxes()?i:t,asterisk:n.bind(this,!0),minus:n.bind(this,!1)})},_toggleExpandedNestedItems:function(e,t){if(e)for(var i=0,n=e.length;i<n;i++){var r=e[i],a=this._dataAdapter.getNodeByItem(r);this._toggleExpandedState(a,t),this._toggleExpandedNestedItems(r.items,t)}},_getNodeElement:function(e,t){var i=this._encodeString(e.internalFields.key);if(t)return t.$nodeByKey||(t.$nodeByKey={},this.$element().find(".".concat($i)).each(function(){var r=v(this),a=r.attr(Vd);t.$nodeByKey[a]=r})),t.$nodeByKey[i]||v();var n=this.$element().get(0).querySelector("[".concat(Vd,'="').concat(i,'"]'));return v(n)},_activeStateUnit:"."+Ti,_widgetClass:function(){return Aa},_getDefaultOptions:function(){var e=O(this.callBase(),{animationEnabled:!0,dataStructure:"tree",deferRendering:!0,expandAllEnabled:!1,hasItemsExpr:"hasItems",selectNodesRecursive:!0,expandNodesRecursive:!0,showCheckBoxesMode:"none",selectAllText:ue.format("dxList-selectAll"),onItemSelectionChanged:null,onItemExpanded:null,onItemCollapsed:null,scrollDirection:"vertical",useNativeScrolling:!0,virtualModeEnabled:!1,rootValue:0,focusStateEnabled:!1,selectionMode:"multiple",expandEvent:"dblclick",selectByClick:!1,createChildren:null,onSelectAllValueChanged:null});return O(!0,e,{integrationOptions:{useDeferUpdateForTemplates:!1}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return!po},options:{useNativeScrolling:!1}}])},_initSelectedItems:ee,_syncSelectionOptions:Wg,_fireSelectionChanged:function(){var e=this._selectionChangePromise;Ae(e).done((function(){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})()}).bind(this))},_createSelectAllValueChangedAction:function(){this._selectAllValueChangedAction=this._createActionByOption("onSelectAllValueChanged",{excludeValidators:["disabled","readOnly"]})},_fireSelectAllValueChanged:function(e){this._selectAllValueChangedAction({value:e})},_checkBoxModeChange:function(e,t){if(t==="none"||e==="none"){this.repaint();return}var i=this._$selectAllItem&&this._$selectAllItem.length;switch(e){case"selectAll":i||(this._createSelectAllValueChangedAction(),this._renderSelectAllItem());break;case"normal":i&&(this._$selectAllItem.remove(),delete this._$selectAllItem)}},_removeSelection:function(){var e=this;F(this._dataAdapter.getFullData(),function(t,i){e._hasChildren(i)&&e._dataAdapter.toggleSelection(i.internalFields.key,!1,!0)})},_optionChanged:function(e){var{name:t,value:i,previousValue:n}=e;switch(t){case"selectAllText":this._$selectAllItem&&this._$selectAllItem.dxCheckBox("instance").option("text",i);break;case"showCheckBoxesMode":this._checkBoxModeChange(i,n);break;case"scrollDirection":this.getScrollable().option("direction",i);break;case"useNativeScrolling":this.getScrollable().option("useNative",i);break;case"items":delete this._$selectAllItem,this.callBase(e);break;case"dataSource":this.callBase(e),this._initDataAdapter(),this._filter={};break;case"hasItemsExpr":this._initAccessors(),this.repaint();break;case"expandEvent":this._initExpandEvent();break;case"deferRendering":case"dataStructure":case"rootValue":case"createChildren":case"expandNodesRecursive":case"onItemSelectionChanged":case"onItemExpanded":case"onItemCollapsed":case"expandAllEnabled":case"animationEnabled":case"virtualModeEnabled":case"selectByClick":break;case"selectionMode":this._initDataAdapter(),this.callBase(e);break;case"onSelectAllValueChanged":this._createSelectAllValueChangedAction();break;case"selectNodesRecursive":this._dataAdapter.setOption("recursiveSelection",e.value),this.repaint();break;default:this.callBase(e)}},_initDataSource:function(){this._useCustomChildrenLoader()?this._loadChildrenByCustomLoader(null).done((function(e){e&&e.length&&this.option("items",e)}).bind(this)):(this.callBase(),this._isVirtualMode()&&this._initVirtualMode())},_initVirtualMode:function(){var e=this._filter;e.custom||(e.custom=this._dataSource.filter()),e.internal||(e.internal=[this.option("parentIdExpr"),this.option("rootValue")])},_useCustomChildrenLoader:function(){return Ee(this.option("createChildren"))&&this._isDataStructurePlain()},_loadChildrenByCustomLoader:function(e){var t=this.option("createChildren").call(this,e);return Array.isArray(t)?new te().resolve(t).promise():t&&Ee(t.then)?gi(t):new te().resolve([]).promise()},_combineFilter:function(){return!this._filter.custom||!this._filter.custom.length?this._filter.internal:[this._filter.custom,this._filter.internal]},_dataSourceLoadErrorHandler:function(){this._renderEmptyMessage()},_init:function(){this._filter={},this.callBase(),this._initStoreChangeHandlers()},_dataSourceChangedHandler:function(e){var t=this.option("items");this._initialized&&this._isVirtualMode()&&t.length||this.option("items",e)},_removeTreeViewLoadIndicator:function(){this._treeViewLoadIndicator&&(this._treeViewLoadIndicator.remove(),this._treeViewLoadIndicator=null)},_createTreeViewLoadIndicator:function(){return this._treeViewLoadIndicator=v("<div>").addClass(H7),this._createComponent(this._treeViewLoadIndicator,dn,{}),this._treeViewLoadIndicator},_dataSourceLoadingChangedHandler:function(e){var t;if(this._isVirtualMode()&&(t=this._combineFilter(),this._dataSource.filter(t)),e&&!this._dataSource.isLoaded()){this.option("items",[]);var i=v("<div>").addClass($7);this._createTreeViewLoadIndicator().appendTo(i),this.itemsContainer().append(i),this._isVirtualMode()&&this._dataSource.filter()!==t&&this._dataSource.filter([])}else this._removeTreeViewLoadIndicator()},_initStoreChangeHandlers:function(){this.option("dataStructure")==="plain"&&this._dataSource&&this._dataSource.store().on("inserted",e=>{this.option().items=this.option("items").concat(e),this._dataAdapter.addItem(e),this._dataAdapter.isFiltered(e)&&this._updateLevel(this._parentIdGetter(e))}).on("removed",e=>{var t=this._dataAdapter.getNodeByKey(e);E(t)&&(this.option("items")[this._dataAdapter.getIndexByKey(t.internalFields.key)]=0,this._markChildrenItemsToRemove(t),this._removeItems(),this._dataAdapter.removeItem(e),this._updateLevel(this._parentIdGetter(t)))})},_markChildrenItemsToRemove:function(e){var t=e.internalFields.childrenKeys;F(t,(i,n)=>{this.option("items")[this._dataAdapter.getIndexByKey(n)]=0,this._markChildrenItemsToRemove(this._dataAdapter.getNodeByKey(n))})},_removeItems:function(){var e=O(!0,[],this.option("items")),t=0;F(e,(i,n)=>{n||(this.option("items").splice(i-t,1),t++)})},_updateLevel:function(e){var t=this._getContainerByParentKey(e);this._renderItems(t,this._dataAdapter.getChildrenNodes(e))},_getOldContainer:function(e){if(e.length)return e.children(".".concat(br));var t=this.getScrollable();return t?v(t.content()).children():v()},_getContainerByParentKey:function(e){var t=this._dataAdapter.getNodeByKey(e),i=t?this._getNodeElement(t):[];this._getOldContainer(i).remove();var n=this._renderNodeContainer(i);if(this._isRootLevel(e)){var r=this.getScrollable();r||this._renderScrollableContainer(),v(r.content()).append(n)}return n},_isRootLevel:function(e){return e===this.option("rootValue")},_getAccessors:function(){var e=this.callBase();return e.push("hasItems"),e},_getDataAdapterOptions:function(){return{rootValue:this.option("rootValue"),multipleSelection:!this._isSingleSelection(),recursiveSelection:this._isRecursiveSelection(),recursiveExpansion:this.option("expandNodesRecursive"),selectionRequired:this.option("selectionRequired"),dataType:this.option("dataStructure"),sort:this._dataSource&&this._dataSource.sort()}},_initMarkup:function(){this._renderScrollableContainer(),this._renderEmptyMessage(this._dataAdapter.getRootNodes()),this.callBase(),this.setAria("role","tree")},_renderContentImpl:function(){var e=this._renderNodeContainer();v(this.getScrollable().content()).append(e),!(!this.option("items")||!this.option("items").length)&&(this._renderItems(e,this._dataAdapter.getRootNodes()),this._initExpandEvent(),this._selectAllEnabled()&&(this._createSelectAllValueChangedAction(),this._renderSelectAllItem(e)))},_isVirtualMode:function(){return this.option("virtualModeEnabled")&&this._isDataStructurePlain()&&!!this.option("dataSource")},_isDataStructurePlain:function(){return this.option("dataStructure")==="plain"},_fireContentReadyAction:function(){var e=this.getDataSource(),t=e&&!e.isLoaded(),i=this.getScrollable();i&&Ke()&&i.update(),t||this.callBase(),i&&Ke()&&i.update()},_renderScrollableContainer:function(){this._scrollable=this._createComponent(v("<div>").appendTo(this.$element()),cn,{useNative:this.option("useNativeScrolling"),direction:this.option("scrollDirection"),useKeyboard:!1})},_renderNodeContainer:function(e){var t=v("<ul>").addClass(br);if(this.setAria("role","group",t),e&&e.length){var i=this._getItemData(e.children("."+Ti));this._expandedGetter(i)&&t.addClass(Ha),t.appendTo(e)}return t},_createDOMElement:function(e,t){var i=v("<li>").addClass($i).attr(Vd,this._encodeString(t.internalFields.key)).prependTo(e);return this.setAria({role:"treeitem",label:this._displayGetter(t.internalFields.item)||"",expanded:t.internalFields.expanded||!1,level:this._getLevel(e)},i),i},_getLevel:function(e){var t=e.parent();return t.hasClass("dx-scrollable-content")?1:parseInt(t.attr("aria-level"))+1},_showCheckboxes:function(){return this.option("showCheckBoxesMode")!=="none"},_selectAllEnabled:function(){return this.option("showCheckBoxesMode")==="selectAll"&&!this._isSingleSelection()},_renderItems:function(e,t){for(var i=t.length-1,n=i;n>=0;n--)this._renderItem(n,t[n],e);this._renderedItemsCount+=t.length},_renderItem:function(e,t,i){var n=this._createDOMElement(i,t),r=t.internalFields,a=this._showCheckboxes();n.addClass(a?M7:V7),n.toggleClass($b,r.item.visible===!1),a&&this._renderCheckBox(n,t),this.setAria("selected",r.selected,n),this._toggleSelectedClass(n,r.selected),this.callBase(this._renderedItemsCount+e,r.item,n),r.item.visible!==!1&&this._renderChildren(n,t)},_setAriaSelected:function(){},_renderChildren:function(e,t){if(!this._hasChildren(t)){this._addLeafClass(e);return}this._renderToggleItemVisibilityIcon(e,t),!(this.option("deferRendering")&&!t.internalFields.expanded)&&this._loadSublevel(t).done(i=>{this._renderSublevel(e,this._getActualNode(t),i)})},_getActualNode:function(e){return this._dataAdapter.getNodeByKey(e.internalFields.key)},_hasChildren:function(e){return this._isVirtualMode()||this._useCustomChildrenLoader()?this._hasItemsGetter(e.internalFields.item)!==!1:this.callBase(e)},_loadSublevel:function(e){var t=new te,i=this._getChildNodes(e);return i.length?t.resolve(i):this._loadNestedItems(e).done(n=>{t.resolve(this._dataAdapter.getNodesByItems(n))}),t.promise()},_renderSublevel:function(e,t,i){var n=this._renderNodeContainer(e,t),r=i.filter(o=>t.internalFields.childrenKeys.indexOf(o.internalFields.key)!==-1);if(this._renderItems(n,r),r.length&&!t.internalFields.selected){var a=r[0];this._updateParentsState(a,this._getNodeElement(a))}this._normalizeIconState(e,r.length),t.internalFields.expanded&&n.addClass(Ha)},_executeItemRenderAction:function(e,t,i){var n=this._getNode(i);this._getItemRenderAction()({itemElement:i,itemIndex:e,itemData:t,node:this._dataAdapter.getPublicNode(n)})},_addLeafClass:function(e){e.addClass(cl)},_expandEventHandler:function(e){var t=v(e.currentTarget.parentNode);t.hasClass(cl)||this._toggleExpandedState(e.currentTarget,void 0,e)},_initExpandEvent:function(){var e=this._getEventNameByOption(this.option("expandEvent")),t=this._itemContainer(),i=this._itemSelector();D.off(t,"."+Up,i),D.on(t,e,i,this._expandEventHandler.bind(this))},_getEventNameByOption:function(e){var t=e==="click"?ct:Mu;return me(t,Up)},_getNode:function(e){if(!E(e))return null;if(e.internalFields)return e;if(Hl(e))return this._dataAdapter.getNodeByKey(e);var t=v(e).get(0);return t?fe.isElementNode(t)?this._getNodeByElement(t):this._dataAdapter.getNodeByItem(t):null},_getNodeByElement:function(e){var t=v(e).closest("."+$i),i=this._decodeString(t.attr(Vd));return this._dataAdapter.getNodeByKey(i)},_toggleExpandedState:function(e,t,i){var n=this._getNode(e);if(!n)return new te().reject().promise();if(n.internalFields.disabled)return new te().reject().promise();var r=n.internalFields.expanded;if(r===t)return new te().resolve().promise();if(this._hasChildren(n)){var a=this._getNodeElement(n);if(a.find(".".concat(Wp,":not(.").concat($b,")")).length)return new te().reject().promise();this._createLoadIndicator(a)}return E(t)||(t=!r),this._dataAdapter.toggleExpansion(n.internalFields.key,t),this._updateExpandedItemsUI(n,t,i)},_createLoadIndicator:function(e){var t=e.children("."+Yo),i=e.children(".".concat(br));t.hasClass(zp)||i.not(":empty").length||(this._createComponent(v("<div>").addClass(Wp),dn,{}).$element().appendTo(e),t.hide())},_renderToggleItemVisibilityIcon:function(e,t){var i=v("<div>").addClass(Yo).appendTo(e);t.internalFields.expanded&&(i.addClass(zp),e.parent().addClass(Ha)),t.internalFields.disabled&&i.addClass(hl),this._renderToggleItemVisibilityIconClick(i,t)},_renderToggleItemVisibilityIconClick:function(e,t){var i=me(ct,this.NAME);D.off(e,i),D.on(e,i,n=>{this._toggleExpandedState(t.internalFields.key,void 0,n)})},_updateExpandedItemsUI:function(e,t,i){var n=this._getNodeElement(e),r=!n.length||t&&n.is(":hidden");if(this.option("expandNodesRecursive")&&r){var a=this._getNode(e.internalFields.parentKey);a&&this._updateExpandedItemsUI(a,t,i)}var o=n.children("."+Yo),s=n.children(".".concat(br));o.toggleClass(zp,t);var l=s.length>0,u=new te;return!t||l&&!s.is(":empty")?(this._animateNodeContainer(e,t,i,u),u.promise()):e.internalFields.childrenKeys.length===0&&(this._isVirtualMode()||this._useCustomChildrenLoader())?(this._loadNestedItemsWithUpdate(e,t,i,u),u.promise()):(this._renderSublevel(n,e,this._getChildNodes(e)),this._fireContentReadyAction(),this._animateNodeContainer(e,t,i,u),u.promise())},_loadNestedItemsWithUpdate:function(e,t,i,n){var r=this._getNodeElement(e);this._loadNestedItems(e).done(a=>{var o=this._getActualNode(e);this._renderSublevel(r,o,this._dataAdapter.getNodesByItems(a)),!(!a||!a.length)&&(this._fireContentReadyAction(),this._animateNodeContainer(o,t,i,n))})},_loadNestedItems:function(e){if(this._useCustomChildrenLoader()){var t=this._dataAdapter.getPublicNode(e);return this._loadChildrenByCustomLoader(t).done(i=>{this._areNodesExists(i)||this._appendItems(i)})}return this._isVirtualMode()?(this._filter.internal=[this.option("parentIdExpr"),e.internalFields.key],this._dataSource.filter(this._combineFilter()),this._dataSource.load().done(i=>{this._areNodesExists(i)||this._appendItems(i)})):new te().resolve([]).promise()},_areNodesExists:function(e,t){var i=this.keyOf(e[0]),n=this._dataAdapter.getFullData();return!!this._dataAdapter.getNodeByKey(i,n)},_appendItems:function(e){this.option().items=this.option("items").concat(e),this._initDataAdapter()},_animateNodeContainer:function(e,t,i,n){var r=this._getNodeElement(e),a=r.children(".".concat(br));e&&n&&a.length===0&&n.resolve(),a.addClass(Ha);var o=je(a);$t.stop(a,!0),$t.animate(a,{type:"custom",duration:this.option("animationEnabled")?400:0,from:{maxHeight:t?0:o},to:{maxHeight:t?o:0},complete:(function(){a.css("maxHeight","none"),a.toggleClass(Ha,t),this.setAria("expanded",t,r),this.getScrollable().update(),this._fireExpandedStateUpdatedEvent(t,e,i),n&&n.resolve()}).bind(this)})},_fireExpandedStateUpdatedEvent:function(e,t,i){if(this._hasChildren(t)){var n=e?"onItemExpanded":"onItemCollapsed";if(E(i))this._itemDXEventHandler(i,n,{node:this._dataAdapter.getPublicNode(t)});else{var r=this._getNodeElement(t);this._itemEventHandler(r,n,{event:i,node:this._dataAdapter.getPublicNode(t)})}}},_normalizeIconState:function(e,t){var i=e.find(".".concat(Wp));if(i.length&&dn.getInstance(i).option("visible",!1),t){var n=e.find("."+Yo);n.show();return}e.find("."+Yo).removeClass(Yo),e.addClass(cl)},_emptyMessageContainer:function(){var e=this.getScrollable();return e?v(e.content()):this.callBase()},_renderContent:function(){var e=this.option("items");e&&e.length&&(this._contentAlreadyRendered=!0),this.callBase()},_renderSelectAllItem:function(e){e=e||this.$element().find(".".concat(br)).first(),this._$selectAllItem=v("<div>").addClass(Gp);var t=this._dataAdapter.isAllSelected();this._createComponent(this._$selectAllItem,yo,{value:t,text:this.option("selectAllText"),onValueChanged:this._onSelectAllCheckboxValueChanged.bind(this)}),this._toggleSelectedClass(this._$selectAllItem,t),e.before(this._$selectAllItem)},_onSelectAllCheckboxValueChanged:function(e){this._toggleSelectAll(e),this._fireSelectAllValueChanged(e.value)},_toggleSelectAll:function(e){this._dataAdapter.toggleSelectAll(e.value),this._updateItemsUI(),this._fireSelectionChanged()},_renderCheckBox:function(e,t){var i=v("<div>").appendTo(e);this._createComponent(i,yo,{value:t.internalFields.selected,onValueChanged:this._changeCheckboxValue.bind(this),focusStateEnabled:!1,disabled:this._disabledGetter(t)})},_toggleSelectedClass:function(e,t){e.toggleClass(W7,!!t)},_toggleNodeDisabledState:function(e,t){var i=this._getNodeElement(e),n=i.find("."+Ti).eq(0);if(this._dataAdapter.toggleNodeDisabledState(e.internalFields.key,t),n.toggleClass(hl,!!t),this._showCheckboxes()){var r=this._getCheckBoxInstance(i);r.option("disabled",!!t)}},_itemOptionChanged:function(e,t,i){var n=this._dataAdapter.getNodeByItem(e);t===this.option("disabledExpr")&&this._toggleNodeDisabledState(n,i)},_changeCheckboxValue:function(e){var t=v(e.element).parent("."+$i),i=t.children("."+Ti),n=this._getItemData(i),r=this._getNodeByElement(i),a=e.value;r&&r.internalFields.selected===a||this._updateItemSelection(a,n,e.event)},_isSingleSelection:function(){return this.option("selectionMode")==="single"},_isRecursiveSelection:function(){return this.option("selectNodesRecursive")&&this.option("selectionMode")!=="single"},_isLastSelectedBranch:function(e,t,i){var n=t.indexOf(e.key);return n>=0&&t.splice(n,1),i&&F(e.children,(function(r,a){this._isLastSelectedBranch(a,t,!0)}).bind(this)),e.parent&&this._isLastSelectedBranch(e.parent,t),t.length===0},_isLastRequired:function(e){var t=this.option("selectionRequired"),i=this._isSingleSelection(),n=this.getSelectedNodeKeys();if(t)return i?n.length===1:this._isLastSelectedBranch(e.internalFields.publicNode,n.slice(),!0)},_updateItemSelection:function(e,t,i){var n=this._getNode(t);if(!n||n.visible===!1)return!1;if(n.internalFields.selected===e)return!0;if(!e&&this._isLastRequired(n)){if(this._showCheckboxes()){var r=this._getNodeElement(n);this._getCheckBoxInstance(r).option("value",!0)}return!1}if(e&&this._isSingleSelection()){var a=this.getSelectedNodeKeys();F(a,(l,u)=>{this._dataAdapter.toggleSelection(u,!1),this._updateItemsUI(),this._fireItemSelectionChanged(this._getNode(u))})}this._dataAdapter.toggleSelection(n.internalFields.key,e);var o=this._dataAdapter.isAllSelected(),s=this._selectAllEnabled()&&this._$selectAllItem.dxCheckBox("instance").option("value")!==o;return this._updateItemsUI(),this._fireItemSelectionChanged(n,i),this._fireSelectionChanged(),s&&this._fireSelectAllValueChanged(o),!0},_fireItemSelectionChanged:function(e,t){var i=t||this._findItemElementByItem(e.internalFields.item),n=t?this._itemDXEventHandler:this._itemEventHandler;n.call(this,i,"onItemSelectionChanged",{node:this._dataAdapter.getPublicNode(e),itemData:e.internalFields.item})},_getCheckBoxInstance:function(e){return e.children(".dx-checkbox").dxCheckBox("instance")},_updateItemsUI:function(){var e={};if(F(this._dataAdapter.getData(),(i,n)=>{var r=this._getNodeElement(n,e),a=n.internalFields.selected;r.length&&(this._toggleSelectedClass(r,a),this.setAria("selected",a,r),this._showCheckboxes()&&this._getCheckBoxInstance(r).option("value",a))}),this._selectAllEnabled()){var t=this._$selectAllItem.dxCheckBox("instance");t.option("onValueChanged",void 0),t.option("value",this._dataAdapter.isAllSelected()),t.option("onValueChanged",this._onSelectAllCheckboxValueChanged.bind(this))}},_updateParentsState:function(e,t){if(t){var i=this._dataAdapter.getNodeByKey(e.internalFields.parentKey),n=v(t.parents("."+$i)[0]);if(this._showCheckboxes()){var r=i.internalFields.selected;this._getCheckBoxInstance(n).option("value",r),this._toggleSelectedClass(n,r)}i.internalFields.parentKey!==this.option("rootValue")&&this._updateParentsState(i,n)}},_itemEventHandlerImpl:function(e,t,i){var n=v(e).closest("."+$i).children("."+Ti);return t(O(this._extendActionArgs(n),i))},_itemContextMenuHandler:function(e){this._createEventHandler("onItemContextMenu",e)},_itemHoldHandler:function(e){this._createEventHandler("onItemHold",e)},_createEventHandler:function(e,t){var i=this._getNodeByElement(t.currentTarget);this._itemDXEventHandler(t,e,{node:this._dataAdapter.getPublicNode(i)})},_itemClass:function(){return Ti},_itemDataKey:function(){return N7},_attachClickEvent:function(){var e="."+this._itemClass(),t="."+$i+", ."+Gp,i=me(ct,this.NAME),n=me(ut.down,this.NAME),r=this._itemContainer(),a=this;D.off(r,i,e),D.off(r,n,t),D.on(r,i,e,function(o){a._itemClickHandler(o,v(this))}),D.on(r,n,t,function(o){a._itemPointerDownHandler(o)})},_itemClickHandler:function(e,t){var i=this._getItemData(t),n=this._getNodeByElement(t);this._itemDXEventHandler(e,"onItemClick",{node:this._dataAdapter.getPublicNode(n)}),this.option("selectByClick")&&!e.isDefaultPrevented()&&this._updateItemSelection(!n.internalFields.selected,i,e)},_updateSelectionToFirstItem:function(e,t){for(var i=t;i>=0;){var n=v(e[i]);this._updateItemSelection(!0,n.find("."+Ti).get(0)),i--}},_updateSelectionToLastItem:function(e,t){for(var i=e.length,n=t;n<i;){var r=v(e[n]);this._updateItemSelection(!0,r.find("."+Ti).get(0)),n++}},_focusInHandler:function(e){if(this._updateFocusState(e,!0),this.option("focusedElement")){clearTimeout(this._setFocusedItemTimeout),this._setFocusedItemTimeout=setTimeout(()=>{this._setFocusedItem(v(this.option("focusedElement")))});return}var t=this._getActiveItem();this.option("focusedElement",Fe(t.closest("."+$i)))},_setFocusedItem:function(e){!e||!e.length||e.children().hasClass(hl)||this.callBase(e)},_itemPointerDownHandler:function(e){if(this.option("focusStateEnabled")){var t=v(e.target).closest("."+$i+", ."+Gp);if(t.length){var i=t.hasClass(hl)?null:t;this.option("focusedElement",Fe(i))}}},_findNonDisabledNodes:function(e){return e.not(function(){return v(this).children("."+Ti).hasClass(hl)})},_moveFocus:function(e,t){var i="up",n="down",r="first",a="last",o=this.option("rtlEnabled")?"right":"left",s=this.option("rtlEnabled")?"left":"right";this.$element().find(".".concat(br)).each(function(){$t.stop(this,!0)});var l=this._findNonDisabledNodes(this._nodeElements());if(!(!l||!l.length))switch(e){case i:var u=this._prevItem(l);this.option("focusedElement",Fe(u));var d=this._getNodeItemElement(u);this.getScrollable().scrollToElement(d),t.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,d);break;case n:var c=this._nextItem(l);this.option("focusedElement",Fe(c));var h=this._getNodeItemElement(c);this.getScrollable().scrollToElement(h),t.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,h);break;case r:var f=l.first();t.shiftKey&&this._showCheckboxes()&&this._updateSelectionToFirstItem(l,l.index(this._prevItem(l))),this.option("focusedElement",Fe(f)),this.getScrollable().scrollToElement(this._getNodeItemElement(f));break;case a:var p=l.last();t.shiftKey&&this._showCheckboxes()&&this._updateSelectionToLastItem(l,l.index(this._nextItem(l))),this.option("focusedElement",Fe(p)),this.getScrollable().scrollToElement(this._getNodeItemElement(p));break;case s:this._expandFocusedContainer();break;case o:this._collapseFocusedContainer();break;default:this.callBase.apply(this,arguments);return}},_getNodeItemElement:function(e){return e.find("."+Ti).get(0)},_nodeElements:function(){return this.$element().find("."+$i).not(":hidden")},_expandFocusedContainer:function(){var e=v(this.option("focusedElement"));if(!(!e.length||e.hasClass(cl))){var t=e.find(".".concat(br)).eq(0);if(t.hasClass(Ha)){var i=this._nextItem(this._findNonDisabledNodes(this._nodeElements()));this.option("focusedElement",Fe(i)),this.getScrollable().scrollToElement(this._getNodeItemElement(i));return}var n=this._getNodeByElement(e.children("."+Ti));this._toggleExpandedState(n,!0)}},_getClosestNonDisabledNode:function(e){do e=e.parent().closest("."+$i);while(e.children(".dx-treeview-item.dx-state-disabled").length);return e},_collapseFocusedContainer:function(){var e=v(this.option("focusedElement"));if(e.length){var t=e.find(".".concat(br)).eq(0);if(!e.hasClass(cl)&&t.hasClass(Ha)){var i=this._getNodeByElement(e.children("."+Ti));this._toggleExpandedState(i,!1)}else{var n=this._getClosestNonDisabledNode(e);n.length&&this.option("focusedElement",Fe(n)),this.getScrollable().scrollToElement(this._getNodeItemElement(n))}}},_encodeString:function(e){return Me(e)?encodeURI(e):e},_decodeString:function(e){return Me(e)?decodeURI(e):e},getScrollable:function(){return this._scrollable},updateDimensions:function(){var e=new te,t=this.getScrollable();return t?t.update().done(()=>{e.resolveWith(this)}):e.resolveWith(this),e.promise()},selectItem:function(e){return this._updateItemSelection(!0,e)},unselectItem:function(e){return this._updateItemSelection(!1,e)},expandItem:function(e){return this._toggleExpandedState(e,!0)},collapseItem:function(e){return this._toggleExpandedState(e,!1)},getNodes:function(){return this._dataAdapter.getTreeNodes()},getSelectedNodes:function(){return this.getSelectedNodeKeys().map(e=>{var t=this._dataAdapter.getNodeByKey(e);return this._dataAdapter.getPublicNode(t)})},getSelectedNodesKeys:function(){return Je.log("W0002","dxTreeView","getSelectedNodesKeys","20.1","Use the 'getSelectedNodeKeys' method instead"),this.getSelectedNodeKeys()},getSelectedNodeKeys:function(){return this._dataAdapter.getSelectedNodesKeys()},selectAll:function(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!0):this._toggleSelectAll({value:!0})},unselectAll:function(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!1):this._toggleSelectAll({value:!1})},expandAll:function(){var e=this._dataAdapter;F(e.getData(),(t,i)=>e.toggleExpansion(i.internalFields.key,!0)),this.repaint()},collapseAll:function(){F(this._dataAdapter.getExpandedNodesKeys(),(function(e,t){this._toggleExpandedState(t,!1)}).bind(this))},scrollToItem:function(e){var t=this._getNode(e);if(!t)return new te().reject().promise();for(var i=[],n=t.internalFields.publicNode.parent;n!=null;)n.expanded||i.push(n.key),n=n.parent;var r=new te;return this._expandNodes(i.reverse()).always(()=>{var a=this._getNodeElement(t);a&&a.length?(this.scrollToElementTopLeft(a.get(0)),r.resolve()):r.reject()}),r.promise()},scrollToElementTopLeft:function(e){var t=this.getScrollable(),{scrollDirection:i,rtlEnabled:n}=this.option(),r={top:0,left:0},a=mD(yD,e);if(i!==nh){var o=v(t.container()).get(0);r.left=n?a.left+e.offsetWidth-o.clientWidth:a.left}i!==CD&&(r.top=a.top),t.scrollTo(r)},_expandNodes:function(e){if(!e||e.length===0)return new te().resolve().promise();var t=new te,i=e.map(n=>this.expandItem(n));return Ae.apply(v,i).done(()=>t.resolve()).fail(()=>t.reject()),t.promise()},_dispose:function(){this.callBase(),clearTimeout(this._setFocusedItemTimeout)}});Co.setEditorClass(Zu);var a1="dx-treeview",G7="".concat(a1,"-node-container"),ed=z7.inherit(Co).inherit({_addWidgetPrefix:function(e){return"".concat(a1,"-").concat(e)},_optionChanged:function(e){switch(e.name){case"searchValue":this._showCheckboxes()&&this._isRecursiveSelection()&&this._removeSelection(),this._initDataAdapter(),this._updateSearch(),this._repaintContainer(),this.option("focusedElement",null);break;case"searchExpr":this._initDataAdapter(),this.repaint();break;case"searchMode":this.option("expandNodesRecursive")?this._updateDataAdapter():this._initDataAdapter(),this.repaint();break;default:this.callBase(e)}},_updateDataAdapter:function(){this._setOptionWithoutOptionChange("expandNodesRecursive",!1),this._initDataAdapter(),this._setOptionWithoutOptionChange("expandNodesRecursive",!0)},_getDataAdapterOptions:function(){return O(this.callBase(),{searchValue:this.option("searchValue"),searchMode:this.option("searchMode")||"contains",searchExpr:this.option("searchExpr")})},_updateSearch:function(){if(this._searchEditor){var e=this._getSearchEditorOptions();this._searchEditor.option(e)}},_repaintContainer:function(){var e=this.$element().find(".".concat(G7)).first(),t;e.length&&(e.empty(),t=this._dataAdapter.getRootNodes(),this._renderEmptyMessage(t),this._renderItems(e,t),this._fireContentReadyAction())},_itemContainer:function(e){return this._scrollable&&e?v(this._scrollable.content()):this.callBase()},_addWidgetClass:function(){this.$element().addClass(this._widgetClass())},_clean:function(){this.callBase(),this._removeSearchBox()}});tt("dxTreeView",ed);var U7="column-chooser",o1="column-chooser-button",Wb="notouch-action",K7="column-chooser-list",j7="column-chooser-plain",q7="column-chooser-mode-drag",Y7="column-chooser-mode-select",s1="column-chooser",zb="dx-column-chooser-item",X7=".dx-treeview-node",Z7=".dx-checkbox",Q7=300,Gb=function(e,t){var i=[],n=e.option("columnChooser.mode")==="select";return t.length&&F(t,function(r,a){var o={text:a.caption,cssClass:a.cssClass,allowHiding:a.allowHiding,expanded:!0,id:a.index,disabled:!1,disableCheckBox:a.allowHiding===!1,parentId:E(a.ownerBand)?a.ownerBand:null};n&&(o.selected=a.visible),i.push(o)}),i},J7=Tt.ViewController.inherit({renderShowColumnChooserButton:function(e){var t=this,i=t.addWidgetPrefix(o1),n=t.option("columnChooser.enabled"),r=e.find("."+i),a;n?r.length?r.show():(a=v("<div>").addClass(i).appendTo(e),t._createComponent(a,Si,{icon:s1,onClick:function(){t.getView("columnChooserView").showColumnChooser()},hint:t.option("columnChooser.title"),integrationOptions:{}})):r.hide()},getPosition:function(){var e=this.getView("rowsView");return{my:"right bottom",at:"right bottom",of:e&&e.element(),collision:"fit",offset:"-2 -2",boundaryOffset:"2 2"}}}),ej=Vu.inherit({_resizeCore:ee,_isWinDevice:function(){return!!Oe.real().win},_updateList:function(e){var t,i=this._popupContainer.$content(),n=this.option("columnChooser.mode")==="select",r=this._columnChooserList,a=this._columnsController.getChooserColumns(n);if(n&&r&&e&&e.changeType==="selection"){t=Gb(this,a);for(var o=0;o<t.length;o++){var s=t[o].selected,l=t[o].id;l===e.columnIndex&&(s?r.selectItem(l,s):r.unselectItem(l,s))}}else(!n||!r||e==="full")&&(this._popupContainer.$wrapper().toggleClass(this.addWidgetPrefix(q7),!n).toggleClass(this.addWidgetPrefix(Y7),n),t=Gb(this,a),this._renderTreeView(i,t))},_initializePopupContainer:function(){var e=this,t=e.element().addClass(e.addWidgetPrefix(U7)),i=e.option("columnChooser"),n=Un(),r=NT(n),a=Qt(n),o={visible:!1,shading:!1,showCloseButton:!1,dragEnabled:!0,resizeEnabled:!0,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,toolbarItems:[{text:i.title,toolbar:"top",location:r||a?"before":"center"}],position:e.getController("columnChooser").getPosition(),width:i.width,height:i.height,rtlEnabled:e.option("rtlEnabled"),onHidden:function(){e._isWinDevice()&&v("body").removeClass(e.addWidgetPrefix(Wb))},container:i.container};r||a?O(o,{showCloseButton:!0}):o.toolbarItems[o.toolbarItems.length]={shortcut:"cancel"},E(this._popupContainer)?this._popupContainer.option(o):(e._popupContainer=e._createComponent(t,pr,o),e._popupContainer.on("optionChanged",function(s){s.name==="visible"&&e.renderCompleted.fire()}))},_renderCore:function(e){this._popupContainer&&this._updateList(e)},_renderTreeView:function(e,t){var i=this,n=this.option("columnChooser"),r=n.mode==="select",a={items:t,dataStructure:"plain",activeStateEnabled:!0,focusStateEnabled:!0,hoverStateEnabled:!0,itemTemplate:"item",showCheckBoxesMode:"none",rootValue:null,searchEnabled:n.allowSearch,searchTimeout:n.searchTimeout,onItemRendered:function(l){if(l.itemData.disableCheckBox){var u=v(l.itemElement).closest(X7),d;if(u.length&&(d=u.find(Z7),d.length)){var c=d.data("dxCheckBox");c&&c.option("disabled",!0)}}}},o=e.find(".dx-scrollable").data("dxScrollable"),s=o&&o.scrollTop();r&&!this._columnsController.isBandColumnsUsed()&&e.addClass(this.addWidgetPrefix(j7)),a.onContentReady=function(l){Bi(function(){if(s){var u=v(l.element).find(".dx-scrollable").data("dxScrollable");u&&u.scrollTo({y:s})}i.renderCompleted.fire()})},this._isWinDevice()&&(a.useNativeScrolling=!1),O(a,r?this._prepareSelectModeConfig():this._prepareDragModeConfig()),this._columnChooserList?(a.searchEnabled||(a.searchValue=""),this._columnChooserList.option(a)):(this._columnChooserList=this._createComponent(e,ed,a),e.addClass(this.addWidgetPrefix(K7)))},_prepareDragModeConfig:function(){var e=this.option("columnChooser");return{noDataText:e.emptyPanelText,activeStateEnabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,itemTemplate:function(t,i,n){v(n).text(t.text).parent().addClass(t.cssClass).addClass(zb)}}},_prepareSelectModeConfig:function(){var e=this;return{selectNodesRecursive:!1,showCheckBoxesMode:"normal",onItemSelectionChanged:function(t){var i=e._columnsController.getVisibleColumns().filter(function(r){return!r.command}),n=i.length===1&&!t.itemData.selected;n?t.component.selectItem(t.itemElement):setTimeout(function(){e._columnsController.columnOption(t.itemData.id,"visible",t.itemData.selected)},Q7)}}},_columnOptionChanged:function(e){var t=e.changeTypes,i=e.optionNames,n=this.option("columnChooser.mode")==="select";if(this.callBase(e),n){var r=i.visible&&i.length===1&&e.columnIndex!==void 0,a=i.showInColumnChooser||i.caption||i.visible||t.columns&&i.all;r?this.render(null,{changeType:"selection",columnIndex:e.columnIndex}):a&&this.render(null,"full")}},optionChanged:function(e){switch(e.name){case"columnChooser":this._initializePopupContainer(),this.render(null,"full");break;default:this.callBase(e)}},getColumnElements:function(){var e=[],t,i=this.option("columnChooser.mode")==="select",n=this._columnsController.getChooserColumns(i),r=this._popupContainer&&this._popupContainer.$content(),a=r&&r.find(".dx-treeview-node");return a&&n.forEach(function(o){t=a.filter("[data-item-id = '"+o.index+"']");var s=t.length?t.children("."+zb).get(0):null;e.push(s)}),v(e)},getName:function(){return"columnChooser"},getColumns:function(){return this._columnsController.getChooserColumns()},allowDragging:function(e,t){var i=e&&e.allowHiding&&(t!=="columnChooser"||!e.visible&&this._columnsController.isParentColumnVisible(e.index));return this.isColumnChooserVisible()&&i},getBoundingRect:function(){var e=this._popupContainer&&this._popupContainer.$overlayContent();if(e&&e.is(":visible")){var t=e.offset();return{left:t.left,top:t.top,right:t.left+lt(e),bottom:t.top+at(e)}}return null},showColumnChooser:function(){this._popupContainer||(this._initializePopupContainer(),this.render()),this._popupContainer.show(),this._isWinDevice()&&v("body").addClass(this.addWidgetPrefix(Wb))},hideColumnChooser:function(){this._popupContainer&&this._popupContainer.hide()},isColumnChooserVisible:function(){var e=this._popupContainer;return e&&e.option("visible")},publicMethods:function(){return["showColumnChooser","hideColumnChooser"]}}),_C={defaultOptions:function(){return{columnChooser:{enabled:!1,allowSearch:!1,searchTimeout:500,mode:"dragAndDrop",width:250,height:260,title:ue.format("dxDataGrid-columnChooserTitle"),emptyPanelText:ue.format("dxDataGrid-columnChooserEmptyText"),container:void 0}}},controllers:{columnChooser:J7},views:{columnChooserView:ej},extenders:{views:{headerPanel:{_getToolbarItems:function(){var e=this.callBase();return this._appendColumnChooserItem(e)},_appendColumnChooserItem:function(e){var t=this,i=t.option("columnChooser.enabled");if(i){var n=t.option("columnChooser.title"),r={widget:"dxButton",options:{icon:s1,onClick:function(){t.component.getView("columnChooserView").showColumnChooser()},hint:n,text:n,onInitialized:function(a){v(a.element).addClass(t._getToolbarButtonClass(t.addWidgetPrefix(o1)))}},showText:"inMenu",location:"after",name:"columnChooserButton",locateInMenu:"auto",sortIndex:40};e.push(r)}return e},optionChanged:function(e){switch(e.name){case"columnChooser":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}},isVisible:function(){var e=this.option("columnChooser.enabled");return this.callBase()||e}}},controllers:{columns:{allowMoveColumn:function(e,t,i,n){var r=this.option("columnChooser.mode"),a=r==="select"&&n==="columnChooser";return a?!1:this.callBase(e,t,i,n)}}}}};_C.controllers.columnChooser;_C.views.columnChooserView;De.registerModule("columnChooser",_C);function l1(e,t,i){for(var n=$r(t.group),r=[],a=i?e.length-1:0;a<e.length;a++){for(var o=[],s=0;s<=a;s++){var l=n[s].selector;if(a===s&&(e[s]===null||e[s]===!1||e[s]===!0))e[s]===!1?o.push([l,"=",n[s].desc?!0:null]):(e[s]?!n[s].desc:n[s].desc)?o.push([l,"<>",e[s]]):(o.push([l,"<>",null]),o.push([l,"=",null]));else{var u=[l,a===s?n[s].desc?">":"<":"=",e[s]];u[1]==="<"?o.push([u,"or",[l,"=",null]]):o.push(u)}}r.push(De.combineFilters(o))}return r=De.combineFilters(r,"or"),De.combineFilters([r,t.filter])}var u1=nt.inherit(function(){var e=function(i,n){var r=i.hash;return r&&r[JSON.stringify(n)]},t=function(i,n){var r=0,a=i.length-1;if(!i.length)return 0;do{var o=a+r>>1;i[o].offset>n?a=o:r=o}while(a-r>1);var s;for(s=r;s<=a&&!(i[s].offset>n);s++);return s};return{ctor:function(i){this._dataSource=i,this.reset()},reset:function(){this._groupsInfo=[],this._totalCountCorrection=0},totalCountCorrection:function(){return this._totalCountCorrection},updateTotalItemsCount:function(i){this._totalCountCorrection=i||0},isGroupItemCountable:function(i){return!this._isVirtualPaging()||!i.isContinuation},_isVirtualPaging:function(){var i=this._dataSource.option("scrolling.mode");return i==="virtual"||i==="infinite"},itemsCount:function(){var i=this._dataSource,n=i._dataSource,r=De.normalizeSortingInfo(n.group()||[]).length,a=function o(s,l,u){var d=0;if(l)if(!u)d=l.length;else for(var c=0;c<l.length;c++)s.isGroupItemCountable(l[c])&&d++,d+=o(s,l[c].items,u-1);return d}(this,n.items(),r);return a},foreachGroups:function(i,n,r,a,o){var s=this;return function l(u,d,c,h){var f=[];function p(T,R,A,H){var $=R&&T(R,A);return $&&H.push($),$}for(var g=0;g<u.length;g++){if(h.push(u[g].data),!c&&p(d,u[g].data,h,f)===!1)return!1;if(!u[g].data||u[g].data.isExpanded||r){var m=u[g].children,C=m.length&&l(m,d,c,h);if(C&&f.push(C),C===!1)return!1}if(c&&p(d,u[g].data,h,f)===!1)return!1;(!u[g].data||u[g].data.offset!==u[g].offset)&&(a=!0),h.pop()}var x=o&&h.slice(0);return a&&Ae.apply(v,f).always(function(){s._updateGroupInfoOffsets(u,x)})}(s._groupsInfo,i,n,[])},_updateGroupInfoOffsets:function(i,n){n=n||[];for(var r=0;r<i.length;r++){var a=i[r];if(a.data&&a.data.offset!==a.offset){a.offset=a.data.offset;for(var o=0;o<n.length;o++)n[o].offset=a.offset}}i.sort(function(s,l){return s.offset-l.offset})},findGroupInfo:function(i){for(var n,r=this._groupsInfo,a=0;r&&a<i.length;a++)n=e(r,i[a]),r=n&&n.children;return n&&n.data},addGroupInfo:function(i){for(var n,r=i.path,a=this._groupsInfo,o=0;o<r.length;o++){if(n=e(a,r[o]),!n){n={key:r[o],offset:i.offset,data:{offset:i.offset,isExpanded:!0,path:r.slice(0,o+1)},children:[]};var s=t(a,i.offset);a.splice(s,0,n),a.hash=a.hash||{},a.hash[JSON.stringify(n.key)]=n}o===r.length-1&&(n.data=i,n.offset!==i.offset&&this._updateGroupInfoOffsets(a)),a=n.children}},allowCollapseAll:function(){return!0},refresh:function(i){var n=i.storeLoadOptions,r=$r(n.group||[]),a="_group"in this?$r(this._group||[]):r,o=Math.min(a.length,r.length);this._group=n.group;for(var s=0;s<o;s++)if(a[s].selector!==r[s].selector){o=s;break}o?function l(u,d,c){for(var h=0;h<u.length;h++)d+1>=c?u[h].children=[]:l(u[h].children,d+1,c)}(this._groupsInfo,0,o):this.reset()},handleDataLoading:function(){},handleDataLoaded:function(i,n){n(i)},handleDataLoadedCore:function(i,n){n(i)}}}());function Za(e,t){for(var i=$r(t.group),n=[],r=0;r<e.length;r++)n.push([i[r].selector,"=",e[r]]);return t.filter&&n.push(t.filter),xe.combineFilters(n)}var Kp=function(e,t){var i=new te,n=O({skip:0,take:1,requireTotalCount:!0},t);return e.load(n).done(function(r,a){i.resolve(a&&a.totalCount)}).fail(i.reject.bind(i)),i},Ub=u1.inherit(function(){var e=function(a,o,s){return a.foreachGroups(function(l){if(!l.isExpanded)return o(l)},!1,!1,s,!0)},t=function(a,o){var s=0,l=o||0;return o&&(e(a,function(u){if(u.offset-s>=o)return!1;s+=u.count-1}),l+=s),l},i=function(a,o){if(a.length!==o.length)return!1;for(var s=0;s<a.length;s++)if(!Bu(null,a[s],o[s]))return!1;return!0},n=function a(o,s,l,u,d){if(s){for(var c=0;c<s.length;c++){var h=s[c];if("key"in h&&h.items!==void 0){l.push(h.key),d&&i(d.path,l)&&!h.isContinuation&&(d.offset=u);var f=o.findGroupInfo(l);f&&!h.isContinuation&&(f.offset=u),f&&!f.isExpanded?u+=f.count:u=a(o,h.items,l,u,d),l.pop()}else u++}return u}},r=function a(o,s){var l=o.count||o.items.length;if(!o.count&&s>1){l=0;for(var u=0;u<o.items.length;u++)l+=a(o.items[u],s-1)}return l};return{handleDataLoading:function(a){var o=a.storeLoadOptions,s=[],l=0,u=!1,d,c=a.loadOptions.group,h=0;if(function(p,g){if(g.group){var m=De.normalizeSortingInfo(g.group),C=De.normalizeSortingInfo(p.sort);p.sort=Wr.arrangeSortingInfo(m,C),delete g.group}}(o,a.loadOptions),a.group=a.group||c,!a.isCustomLoading){var f=O({},o);f.skip=t(this,o.skip),f.skip&&f.take&&c&&(f.skip--,f.take++,u=!0),f.take&&c&&(d=f.take,f.take++),e(this,function(p){if(p.offset>=f.skip+f.take+h)return!1;p.offset>=f.skip+h&&p.count&&(h+=p.count-1,s.push(p),l+=p.count)}),F(s,function(){f.filter=function(p,g,m){for(var C=De.normalizeSortingInfo(m||g.group),x=[],T=0;T<p.length;T++){for(var R=[],A=0;A<=T;A++)R.push([C[A].selector,T===A?"<>":"=",p[A]]);x.push(De.combineFilters(R))}return x=De.combineFilters(x,"or"),De.combineFilters([x,g.filter])}(this.path,f,c)}),a.storeLoadOptions=f,a.collapsedGroups=s,a.collapsedItemsCount=l,a.skip=f.skip||0,a.skipFirstItem=u,a.take=d}},handleDataLoaded:function(a,o){var s=a.collapsedGroups,l=De.normalizeSortingInfo(a.group),u=l.length;function d(p,g,m,C,x){if(!(!p||!g.length||!m.length)){var T,R,A=jt(g[0],!0);for(R=0;R<p.length&&(T=jt(p[R].key,!0),!(x>=C.offset||A===T));R++)x+=r(p[R],m.length);(!p.length||A!==T)&&p.splice(R,0,{key:g[0],items:[],count:g.length===1?C.count:void 0}),d(p[R].items,g.slice(1),m.slice(1),C,x)}}if(a.collapsedItemsCount&&a.extra&&a.extra.totalCount>=0&&(a.extra.totalCount+=a.collapsedItemsCount),o(a),u){var c=a.data,h=Gi(c);if(Wr.multiLevelGroup(h,l).enumerate().done(function(p){c=p}),s)for(var f=0;f<s.length;f++)d(c,s[f].path,l,s[f],a.skip);a.isCustomLoading||function p(g,m,C,x,T,R){for(var A=0,H=!1,$=0;$<m.length;$++){var V=m[$];if(V.items!==void 0){C.push(V.key);var U=g.findGroupInfo(C);if(U&&!U.isExpanded)V.collapsedItems=V.items,V.items=null,x+=U.count,R--,R<0&&A++,T&&(H=!0);else if(V.items){var K=p(g,V.items,C,x,T,R);T&&(K.offset-x>1?V.isContinuation=!0:H=!0),x=K.offset,R=K.take,R<0&&(V.items.length?V.isContinuationOnNextPage=!0:A++)}C.pop()}else T&&(H=!0),x++,R--,R<0&&A++;T=!1}return H&&m.splice(0,1),A&&m.splice(-A,A),{offset:x,take:R}}(this,c,[],a.skip,a.skipFirstItem,a.take),a.data=c}},isGroupItemCountable:function(a){return a.items===null},updateTotalItemsCount:function(){var a=0;e(this,function(o){o.count&&(a-=o.count-1)}),this.callBase(a)},changeRowExpand:function(a){var o=this,s=o._dataSource,l=s.beginPageIndex?s.beginPageIndex():s.pageIndex(),u=s.items(),d=t(o,l*s.pageSize()),c=o.findGroupInfo(a),h;return c&&!c.isExpanded?h=new te().resolve(c.count):h=Kp(s,{filter:Za(a,{filter:s.filter(),group:s.group()})}),Ae(h).done(function(f){f=parseInt(f.length?f[0]:f),c?(n(o,u,[],d),c.isExpanded=!c.isExpanded,c.count=f):(c={offset:-1,count:f,path:a,isExpanded:!1},n(o,u,[],d,c),c.offset>=0&&o.addGroupInfo(c)),o.updateTotalItemsCount()}).fail(function(){s._eventsStrategy.fireEvent("loadError",arguments)})},allowCollapseAll:function(){return!1},refresh:function(a,o){var s=this,l=a.storeLoadOptions,u=s._dataSource;if(this.callBase.apply(this,arguments),o.reload)return e(s,function(d){var c=Kp(u,{filter:Za(d.path,l)}),h=Kp(u,{filter:l1(d.path,l)});return Ae(h,c).done(function(f,p){f=parseInt(f.length?f[0]:f),p=parseInt(p.length?p[0]:p),d.offset=f,d.count!==p&&(d.count=p,s.updateTotalItemsCount())})},!0)}}}());function jp(e,t,i,n){if(n=n||0,t>1&&i>0){var r=e-Math.floor(e/t)*t||t;return r+=i-n-2,r<0&&(r+=t),Math.floor(r/(t-n-1))}return 0}var Kb=u1.inherit(function(){var e=function(c,h,f){return c.foreachGroups(function(p,g){if(p.isExpanded)return h(p,g)},!0,!1,f,f)},t=function c(h,f,p,g,m,C,x){var T;if(g.items=g.items||[],g.paths=g.paths||[],g.count=g.count||0,g.lastCount=g.lastCount||0,!!p)for(var R=0;R<f.length;R++){var A=f[R];if(A.items!==void 0){if(m.push(A.key),C)T=!0;else{var H=h.findGroupInfo(m);T=H&&H.isExpanded}T?A.items?c(h,A.items,p-1,g,m,C,x):p===1&&A.count&&(!C||x)&&(g.items.push(A),g.paths.push(m.slice(0)),g.count+=g.lastCount,g.lastCount=A.count):(A.collapsedItems=A.items,A.items=null),m.pop()}}},i=function(c,h,f,p,g){var m=c.findGroupInfo(p),C;m?(f?m.count=h.count>0?h.count:h.items&&h.items.length||0:h.count=m.count||h.count,m.offset=g):(f&&(C=h.count>0?h.count:h.items.length),c.addGroupInfo({isExpanded:c._isGroupExpanded(p.length-1),path:p.slice(0),offset:g,count:C||0}))},n=function c(h,f,p,g,m,C,x){var T=f.group?f.group.length:0,R=T===g,A=f.remoteOperations.paging,H=0,$=0,V;if(m=m||0,C=C||[],A&&!x&&(H=m===0?f.skip||0:f.skips[m-1]||0),m>=g)return p.length;for(var U=0;U<p.length;U++){var K=p[U];if(K){if(C.push(K.key),!K.count&&!K.items||K.items===void 0||(i(h,K,R,C,H+U),V=K.items?c(h,f,K.items,g,m+1,C,U):K.count||-1,V<0))return-1;$+=V,C.pop()}}return $},r=function(c,h){return c&&c.length&&c[h]&&!!c[h].isExpanded},a=function(c,h,f){for(var p,g=f,m=0;m<c.length;m++)p=c[m].offset+1,m>0&&(p+=c[m-1].childrenTotalCount,h&&(p+=jp(g,h,p,m-1)*m)),g+=p;return g};function o(c,h,f,p){var g=h.items[p],m=c.skips&&c.skips[f],C=c.takes&&c.takes[f],x=p===h.items.length-1,T=p===0,R=T&&m||0,A=g.count>C+R;T&&m!==void 0&&(g.isContinuation=!0),x&&C!==void 0&&A&&(g.isContinuationOnNextPage=!0)}function s(c){return!Array.isArray(c)}function l(c){s(c.data)||(c.data=new te)}function u(c,h,f,p,g,m){h.isCustomLoading||(p={},t(c,m,f,p,[]),function(x,T,R){var A=R-1,H=x.group?x.group.length:0;T.skip=x.skips&&x.skips[A],x.takes&&x.takes[A]!==void 0&&(H===R?T.take=T.count?T.count-(T.skip||0):0:T.take=0,T.take+=x.takes[A])}(h,p,f));var C=h.group?h.group.length:0;p.paths.length&&C-f>0?(l(h),function(x,T,R,A,H,$){var V=T.group||[],U=V[H+1],K=[];F(R.paths,function(X){var M={requireTotalCount:!1,requireGroupCount:!0,group:[U],groupSummary:T.storeLoadOptions.groupSummary,filter:Za(R.paths[X],{filter:T.storeLoadOptions.filter,group:V}),select:T.storeLoadOptions.select};X===0&&(M.skip=R.skip||0),X===R.paths.length-1&&(M.take=R.take);var q=M.take===0?[]:x._dataSource.loadFromStore(M);Ae(q).done(function(b){var j=R.items[X];o(T,R,H,X),j.items=b}),K.push(q)}),Ae.apply(null,K).done(function(){n(x,T,$,A+1),u(x,T,A+1,R,H+1,$)})}(c,h,p,f,g,m)):p.paths.length&&h.storeLoadOptions.group?(l(h),function(x,T,R,A){var H=[],$=T.group||[];F(R.paths,function(X,M){H.push(Za(M,{group:T.isCustomLoading?T.storeLoadOptions.group:$}))});var V=T.storeLoadOptions.filter;T.storeLoadOptions.isLoadingAll||(V=De.combineFilters([V,De.combineFilters(H,"or")]));var U=O({},T.storeLoadOptions,{requireTotalCount:!1,requireGroupCount:!1,group:null,sort:$.concat(De.normalizeSortingInfo(T.storeLoadOptions.sort||[])),filter:V}),K=x._dataSource.isLastLevelGroupItemsPagingLocal();K||(U.skip=R.skip,U.take=R.take),Ae(R.take===0?[]:x._dataSource.loadFromStore(U)).done(function(X,M){K&&(X=x._dataSource.sortLastLevelGroupItems(X,$,R.paths),X=R.skip?X.slice(R.skip):X,X=R.take?X.slice(0,R.take):X),F(R.items,function(q,b){var j=b.count-(q===0&&R.skip||0),ne=X.splice(0,j);o(T,R,$.length-1,q),b.items=ne}),T.data.resolve(A)}).fail(T.data.reject)}(c,h,p,m)):s(h.data)&&h.data.resolve(m)}var d=function(c,h){var f=new te,p=!!(h.group&&h.group.length),g=O({skip:0,take:1,requireGroupCount:p,requireTotalCount:!p},h,{group:p?h.group:null});return c.load(g).done(function(m,C){var x=C&&(p?C.groupCount:C.totalCount);if(!isFinite(x)){f.reject(ni.Error(p?"E4022":"E4021"));return}f.resolve(x)}).fail(f.reject.bind(f)),f};return{updateTotalItemsCount:function(c){var h=0,f=c.extra&&c.extra.totalCount||0,p=c.extra&&c.extra.groupCount||0,g=this._dataSource.pageSize(),m=this._isVirtualPaging();e(this,function(C){C.childrenTotalCount=0}),e(this,function(C,x){var T=a(x,m?0:g,h),R=C.count+C.childrenTotalCount;m||(R+=jp(T,g,R,x.length-1)),x[x.length-2]?x[x.length-2].childrenTotalCount+=R:h+=R}),this.callBase(h-f+p)},_isGroupExpanded:function(c){var h=this._dataSource.group();return r(h,c)},_updatePagingOptions:function(c,h){var f=this._isVirtualPaging(),p=this._dataSource.pageSize(),g=[],m=[],C=0,x=0;c.take&&(e(this,function(T){T.childrenTotalCount=0,T.skipChildrenTotalCount=0}),e(this,function(T,R){var A,H=0,$=0,V=a(R,f?0:p,x),U=0,K=0,X=T.count+T.childrenTotalCount,M=X;h&&h(T,V);var q=c.skip-V;V<=c.skip+c.take&&X&&(A=c.take,f||(U=jp(V,p,X,R.length-1),X+=U*R.length,M+=U,p&&q>=0&&(H=R.length,$=R.length-1,K=Math.floor(q/p))),q>=0?(V+X>c.skip&&g.unshift(q-K*H-T.skipChildrenTotalCount),V+X>=c.skip+A&&m.unshift(A-H-T.childrenTotalCount+T.skipChildrenTotalCount)):V+X>=c.skip+A&&m.unshift(A+q-T.childrenTotalCount)),V<=c.skip&&(R[R.length-2]?R[R.length-2].skipChildrenTotalCount+=Math.min(M,q+1-K*$):C+=Math.min(M,q+1)),V<=c.skip+A&&(X=Math.min(M,q+A-(K+1)*$),R[R.length-2]?R[R.length-2].childrenTotalCount+=X:x+=X)}),c.skip-=C,c.take-=x-C),c.skips=g,c.takes=m},changeRowExpand:function(c){var h=this.findGroupInfo(c),f=this._dataSource,p=f.remoteOperations().groupPaging,g=De.normalizeSortingInfo(f.group());return h?(h.isExpanded=!h.isExpanded,p&&h.isExpanded&&c.length<g.length?d(f,{filter:Za(c,{filter:f.lastLoadOptions().filter,group:f.group()}),group:[g[c.length]],select:f.select()}).done(function(m){h.count=m}):new te().resolve()):new te().reject()},handleDataLoading:function(c){var h=c.storeLoadOptions,f=De.normalizeSortingInfo(h.group||c.loadOptions.group);if(!(c.isCustomLoading||!f.length)){if(c.remoteOperations.grouping){var p=this._dataSource.remoteOperations().paging;h.group=De.normalizeSortingInfo(h.group),h.group.forEach(function(g,m){var C=m===h.group.length-1;g.isExpanded=!p||!C})}c.group=c.group||f,c.remoteOperations.paging?(c.skip=h.skip,c.take=h.take,h.requireGroupCount=!0,h.group=f.slice(0,1),this._updatePagingOptions(c),h.skip=c.skip,h.take=c.take):(c.skip=c.loadOptions.skip,c.take=c.loadOptions.take,this._updatePagingOptions(c))}},handleDataLoadedCore:function(c,h){var f=De.normalizeSortingInfo(c.storeLoadOptions.group||c.loadOptions.group).length,p=c.group?c.group.length:0,g,m={};if(c.isCustomLoading)h(c),t(this,c.data,f,m,[],c.isCustomLoading,c.storeLoadOptions.isLoadingAll);else{if(c.remoteOperations.paging||this.foreachGroups(function(C){C.count=0}),g=n(this,c,c.data,f),g<0){c.data=new te().reject(Je.Error("E1037"));return}if(c.remoteOperations.paging||f&&c.extra&&c.loadOptions.requireTotalCount&&(c.extra.totalCount=g,c.extra.groupCount=c.data.length),p&&c.storeLoadOptions.requireGroupCount&&!isFinite(c.extra.groupCount)){c.data=new te().reject(ni.Error("E4022"));return}this.updateTotalItemsCount(c),c.remoteOperations.paging||this._updatePagingOptions(c),h(c),c.remoteOperations.paging||this._processPaging(c,f)}u(this,c,f,m,0,c.data)},_processSkips:function(c,h,f){if(f){var p=c[0],g=h[0],m=p&&p.items;g!==void 0&&(p.isContinuation=!0,m&&(p.items=m.slice(g),this._processSkips(p.items,h.slice(1),f-1)))}},_processTakes:function(c,h,f,p,g){if(!(!p||!c)){g=g||[];var m=c[c.length-1],C=m&&m.items,x=f[0],T=h[0];if(m){var R=m.count-(m.isContinuation&&T||0)||C.length;x!==void 0&&R>x&&(m.isContinuationOnNextPage=!0,g.forEach(function(A){A.isContinuationOnNextPage=!0}),C&&(C=C.slice(0,x),m.items=C)),g.push(m),this._processTakes(C,h.slice(1),f.slice(1),p-1,g)}}},_processPaging:function(c,h){this._processSkips(c.data,c.skips,h),this._processTakes(c.data,c.skips,c.takes,h)},isLastLevelGroupItemsPagingLocal:function(){return!1},sortLastLevelGroupItems:function(c){return c},refresh:function(c,h){var f=this,p=f._dataSource,g=c.storeLoadOptions,m=c.group||c.storeLoadOptions.group,C=De.normalizeSortingInfo(f._group),x,T;function R(A,H){H.length===T+1&&(A.isExpanded=x)}for(T=0;T<C.length;T++)x=r(m,T),r(f._group,T)!==x&&f.foreachGroups(R);if(f.callBase.apply(this,arguments),m&&c.remoteOperations.paging&&h.reload)return e(f,function(A){var H=d(p,{filter:Za(A.path,{filter:g.filter,group:m}),group:m.slice(A.path.length),select:g.select}),$=d(p,{filter:l1(A.path,{filter:g.filter,group:m},!0),group:m.slice(A.path.length-1,A.path.length),select:g.select});return Ae($,H).done(function(V,U){V=parseInt(V.length?V[0]:V),U=parseInt(U.length?U[0]:U),A.offset=V,A.count!==U&&(A.count=U,f.updateTotalItemsCount(c))})},!0)}}}()),qp="dx-datagrid-group-panel",tj="dx-group-panel-message",Nd="dx-group-panel-item",ij="dx-toolbar-label",nj="dx-datagrid-expand",rj="dx-group-row",aj=".dx-header-filter",oj={init:function(){this.callBase.apply(this,arguments),this._initGroupingHelper()},_initGroupingHelper:function(e){var t=this._grouping,i=this.option("grouping.autoExpandAll"),n=this.option("focusedRowEnabled"),r=e?e.remoteOperations:this.remoteOperations(),a=r.filtering&&r.sorting&&r.paging;a&&!r.grouping&&(i||!n)?(!t||t instanceof Kb)&&(this._grouping=new Ub(this)):(!t||t instanceof Ub)&&(this._grouping=new Kb(this))},totalItemsCount:function(){var e=this.callBase();return e>0&&this._dataSource.group()&&this._dataSource.requireTotalCount()?e+this._grouping.totalCountCorrection():e},itemsCount:function(){return this._dataSource.group()?this._grouping.itemsCount()||0:this.callBase.apply(this,arguments)},allowCollapseAll:function(){return this._grouping.allowCollapseAll()},isGroupItemCountable:function(e){return this._grouping.isGroupItemCountable(e)},isRowExpanded:function(e){var t=this._grouping.findGroupInfo(e);return t?t.isExpanded:!this._grouping.allowCollapseAll()},collapseAll:function(e){return this._collapseExpandAll(e,!1)},expandAll:function(e){return this._collapseExpandAll(e,!0)},_collapseExpandAll:function(e,t){var i=this._dataSource,n=i.group(),r=De.normalizeSortingInfo(n||[]);if(r.length){for(var a=0;a<r.length;a++)e===void 0||e===a?r[a].isExpanded=t:n&&n[a]&&(r[a].isExpanded=n[a].isExpanded);i.group(r),this._grouping.foreachGroups(function(o,s){(e===void 0||e===s.length-1)&&(o.isExpanded=t)},!1,!0),this.resetPagesCache()}return!0},refresh:function(){return this.callBase.apply(this,arguments),this._grouping.refresh.apply(this._grouping,arguments)},changeRowExpand:function(e){var t=this._dataSource;if(t.group())return t.beginLoading(),this._lastLoadOptions&&(this._lastLoadOptions.groupExpand=!0),this._changeRowExpandCore(e).always(function(){t.endLoading()})},_changeRowExpandCore:function(e){return this._grouping.changeRowExpand(e)},_hasGroupLevelsExpandState:function(e,t){if(e&&Array.isArray(e)){for(var i=0;i<e.length;i++)if(e[i].isExpanded===t)return!0}},_customizeRemoteOperations:function(e,t){var i=e.remoteOperations;e.storeLoadOptions.group?(i.grouping&&!e.isCustomLoading&&(!i.groupPaging||this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!0))&&(i.paging=!1),!i.grouping&&(!i.sorting||!i.filtering||e.isCustomLoading||this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!1))&&(i.paging=!1)):!e.isCustomLoading&&i.paging&&t.grouping&&this.resetCache(),this.callBase.apply(this,arguments)},_handleDataLoading:function(e){return this.callBase(e),this._initGroupingHelper(e),this._grouping.handleDataLoading(e)},_handleDataLoaded:function(e){return this._grouping.handleDataLoaded(e,this.callBase.bind(this))},_handleDataLoadedCore:function(e){return this._grouping.handleDataLoadedCore(e,this.callBase.bind(this))}};Nu.extend(oj);var sj={init:function(){this.callBase(),this.createAction("onRowExpanding"),this.createAction("onRowExpanded"),this.createAction("onRowCollapsing"),this.createAction("onRowCollapsed")},_beforeProcessItems:function(e){var t=this._columnsController.getGroupColumns();return e=this.callBase(e),e.length&&t.length&&(e=this._processGroupItems(e,t.length)),e},_processItem:function(e,t){return E(e.groupIndex)&&Me(e.rowType)&&e.rowType.indexOf("group")===0?(e=this._processGroupItem(e,t),t.dataIndex=0):e=this.callBase.apply(this,arguments),e},_processGroupItem:function(e){return e},_processGroupItems:function(e,t,i){var n=this._columnsController.getGroupColumns(),r=n[n.length-t];if(!i){var a=this.option("scrolling.mode");i={collectContinuationItems:a!=="virtual"&&a!=="infinite",resultItems:[],path:[],values:[]}}var o=i.resultItems;if(i.data&&(i.collectContinuationItems||!i.data.isContinuation)&&o.push({rowType:"group",data:i.data,groupIndex:i.path.length-1,isExpanded:!!i.data.items,key:i.path.slice(0),values:i.values.slice(0)}),e)if(t===0)o.push.apply(o,e);else for(var s=0;s<e.length;s++){var l=e[s];l&&"items"in l?(i.data=l,i.path.push(l.key),i.values.push(r&&r.deserializeValue&&!r.calculateDisplayValue?r.deserializeValue(l.key):l.key),this._processGroupItems(l.items,t-1,i),i.data=void 0,i.path.pop(),i.values.pop()):o.push(l)}return o},publicMethods:function(){return this.callBase().concat(["collapseAll","expandAll","isRowExpanded","expandRow","collapseRow"])},collapseAll:function(e){var t=this._dataSource;t&&t.collapseAll(e)&&(t.pageIndex(0),t.reload())},expandAll:function(e){var t=this._dataSource;t&&t.expandAll(e)&&(t.pageIndex(0),t.reload())},changeRowExpand:function(e){var t=this,i=t.isRowExpanded(e),n={key:e,expanded:i};return t.executeAction(i?"onRowCollapsing":"onRowExpanding",n),n.cancel?new te().resolve():Ae(t._changeRowExpandCore(e)).done(function(){n.expanded=!i,t.executeAction(i?"onRowCollapsed":"onRowExpanded",n)})},_changeRowExpandCore:function(e){var t=this,i=this._dataSource,n=new te;return i?Ae(i.changeRowExpand(e)).done(function(){t.load().done(n.resolve).fail(n.reject)}).fail(n.reject):n.resolve(),n},isRowExpanded:function(e){var t=this._dataSource;return t&&t.isRowExpanded(e)},expandRow:function(e){return this.isRowExpanded(e)?new te().resolve():this.changeRowExpand(e)},collapseRow:function(e){return this.isRowExpanded(e)?this.changeRowExpand(e):new te().resolve()},optionChanged:function(e){e.name==="grouping"&&(e.name="dataSource"),this.callBase(e)}},gC=function(e,t){var i=this._columnsController;switch(t.itemData.value){case"group":var n=i._dataSource.group()||[];i.columnOption(e.dataField,"groupIndex",n.length);break;case"ungroup":i.columnOption(e.dataField,"groupIndex",-1);break;case"ungroupAll":this.component.clearGrouping()}},lj={_getToolbarItems:function(){var e=this.callBase();return this._appendGroupingItem(e)},_appendGroupingItem:function(e){if(this._isGroupPanelVisible()){var t=!1,i={template:()=>{var n=v("<div>").addClass(qp);return this._updateGroupPanelContent(n),Kl("groupPanel",this,n,void 0,this._handleActionKeyDown.bind(this)),n},name:"groupPanel",onItemRendered:()=>{t&&this.renderCompleted.fire(),t=!0},location:"before",locateInMenu:"never",sortIndex:1};e.push(i)}return e},_handleActionKeyDown:function(e){var t=e.event,i=v(t.target),n=i.closest(".".concat(Nd)).index(),r=this._columnsController.getGroupColumns()[n],a=r&&r.index;i.is(aj)?this.getController("headerFilter").showHeaderFilterMenu(a,!0):this._processGroupItemAction(a),t.preventDefault()},_isGroupPanelVisible:function(){var e=this.option("groupPanel"),t;return e&&(t=e.visible,t==="auto"&&(t=Oe.current().deviceType==="desktop")),t},_renderGroupPanelItems:function(e,t){var i=this;e.empty(),F(t,function(n,r){i._createGroupPanelItem(e,r)}),Pm(this)},_createGroupPanelItem:function(e,t){var i=v("<div>").addClass(t.cssClass).addClass(Nd).data("columnData",t).appendTo(e).text(t.caption);return ZW(this,i),i},_columnOptionChanged:function(e){if(!this._requireReady&&!De.checkChanges(e.optionNames,["width","visibleWidth"])){var t=this.element(),i=t&&t.find("."+qp);i&&i.length&&(this._updateGroupPanelContent(i),this.renderCompleted.fire())}this.callBase()},_updateGroupPanelContent:function(e){var t=this.getController("columns").getGroupColumns(),i=this.option("groupPanel");this._renderGroupPanelItems(e,t),i.allowColumnDragging&&!t.length&&(v("<div>").addClass(tj).text(i.emptyPanelText).appendTo(e),e.closest("."+ij).css("maxWidth","none"),this.updateToolbarDimensions())},allowDragging:function(e){var t=this.option("groupPanel");return this._isGroupPanelVisible()&&t.allowColumnDragging&&e&&e.allowGrouping},getColumnElements:function(){var e=this.element();return e&&e.find("."+Nd)},getColumns:function(){return this.getController("columns").getGroupColumns()},getBoundingRect:function(){var e=this.element();if(e&&e.find("."+qp).length){var t=e.offset();return{top:t.top,bottom:t.top+je(e)}}return null},getName:function(){return"group"},getContextMenuItems:function(e){var t=this.option("grouping.contextMenuEnabled"),i=v(e.targetElement).closest("."+Nd),n;if(i.length&&(e.column=i.data("columnData")),t&&e.column){var r=e.column,a=E(r.allowGrouping)?r.allowGrouping:!0;if(a){var o=E(r.groupIndex)&&r.groupIndex>-1,s=this.option("grouping.texts"),l=gC.bind(this,r);n=[{text:s.ungroup,value:"ungroup",disabled:!o,onItemClick:l},{text:s.ungroupAll,value:"ungroupAll",onItemClick:l}]}}return n},isVisible:function(){return this.callBase()||this._isGroupPanelVisible()},optionChanged:function(e){e.name==="groupPanel"?(this._invalidate(),e.handled=!0):this.callBase(e)}},uj={getContextMenuItems:function(e){var t=this.option("grouping.contextMenuEnabled"),i;if(t&&e.row&&e.row.rowType==="group"){var n=this._columnsController,r=n.columnOption("groupIndex:"+e.row.groupIndex);if(r&&r.allowGrouping){var a=this.option("grouping.texts"),o=gC.bind(this,r);i=[],i.push({text:a.ungroup,value:"ungroup",onItemClick:o},{text:a.ungroupAll,value:"ungroupAll",onItemClick:o})}}return i},_rowClick:function(e){var t=this.option("grouping.expandMode"),i=this.option("scrolling.mode"),n=i!=="infinite"&&t==="rowClick"&&v(e.event.target).closest("."+rj).length,r=v(e.event.target).closest("."+nj).length;(n||r)&&this._changeGroupRowState(e),this.callBase(e)},_changeGroupRowState:function(e){var t=this.getController("data"),i=t.items()[e.rowIndex],n=this._columnsController.columnOption("groupIndex:"+i.groupIndex,"allowCollapsing");(i.rowType==="data"||i.rowType==="group"&&n!==!1)&&(t.changeRowExpand(i.key,!0),e.event.preventDefault(),e.handled=!0)}},dj={getContextMenuItems:function(e){var t=this.option("grouping.contextMenuEnabled"),i=this.callBase(e);if(t&&e.row&&(e.row.rowType==="header"||e.row.rowType==="detailAdaptive")){var n=e.column;if(!n.command&&(!E(n.allowGrouping)||n.allowGrouping)){var r=this.option("grouping.texts"),a=E(n.groupIndex)&&n.groupIndex>-1,o=gC.bind(this,n);i=i||[],i.push({text:r.groupByThisColumn,value:"group",beginGroup:!0,disabled:a,onItemClick:o}),n.showWhenGrouped&&i.push({text:r.ungroup,value:"ungroup",disabled:!a,onItemClick:o}),i.push({text:r.ungroupAll,value:"ungroupAll",onItemClick:o})}}return i}};De.registerModule("grouping",{defaultOptions:function(){return{grouping:{autoExpandAll:!0,allowCollapsing:!0,contextMenuEnabled:!1,expandMode:"buttonClick",texts:{groupContinuesMessage:ue.format("dxDataGrid-groupContinuesMessage"),groupContinuedMessage:ue.format("dxDataGrid-groupContinuedMessage"),groupByThisColumn:ue.format("dxDataGrid-groupHeaderText"),ungroup:ue.format("dxDataGrid-ungroupHeaderText"),ungroupAll:ue.format("dxDataGrid-ungroupAllText")}},groupPanel:{visible:!1,emptyPanelText:ue.format("dxDataGrid-groupPanelEmptyText"),allowColumnDragging:!0}}},extenders:{controllers:{data:sj,columns:{_getExpandColumnOptions:function(){var e=this.callBase.apply(this,arguments);return e.cellTemplate=De.getExpandCellTemplate(),e}},editing:{_isProcessedItem:function(e){return E(e.groupIndex)&&Me(e.rowType)&&e.rowType.indexOf("group")===0}}},views:{headerPanel:lj,rowsView:uj,columnHeadersView:dj}}});var cj="dx-master-detail-cell",jb="dx-master-detail-row",hj="dx-cell-focus-disabled",fj="dx-row-lines",pj={defaultOptions:function(){return{masterDetail:{enabled:!1,autoExpandAll:!1,template:null}}},extenders:{controllers:{columns:{_getExpandColumnsCore:function(){var e=this.callBase();return this.option("masterDetail.enabled")&&e.push({type:"detailExpand",cellTemplate:xe.getExpandCellTemplate()}),e}},data:function(){var e=function(t){t._expandedItems=[],t._isExpandAll=t.option("masterDetail.autoExpandAll")};return{init:function(){e(this),this.callBase()},expandAll:function(t){var i=this;t<0?(i._isExpandAll=!0,i._expandedItems=[],i.updateItems()):i.callBase.apply(i,arguments)},collapseAll:function(t){var i=this;t<0?(i._isExpandAll=!1,i._expandedItems=[],i.updateItems()):i.callBase.apply(i,arguments)},isRowExpanded:function(t){var i=this,n=xe.getIndexByKey(t,i._expandedItems);return Array.isArray(t)?i.callBase.apply(i,arguments):!!(i._isExpandAll^(n>=0&&i._expandedItems[n].visible))},_getRowIndicesForExpand:function(t){var i=this.getRowIndexByKey(t);return[i,i+1]},_changeRowExpandCore:function(t){var i=this,n;if(Array.isArray(t))n=i.callBase.apply(i,arguments);else{var r=xe.getIndexByKey(t,i._expandedItems);if(r>=0){var a=i._expandedItems[r].visible;i._expandedItems[r].visible=!a}else i._expandedItems.push({key:t,visible:!0});i.updateItems({changeType:"update",rowIndices:i._getRowIndicesForExpand(t)}),n=new te().resolve()}return n},_processDataItem:function(t,i){var n=this,r=n.callBase.apply(n,arguments);return r.isExpanded=n.isRowExpanded(r.key),i.detailColumnIndex===void 0&&(i.detailColumnIndex=-1,F(i.visibleColumns,function(a,o){if(o.command==="expand"&&!E(o.groupIndex))return i.detailColumnIndex=a,!1})),i.detailColumnIndex>=0&&(r.values[i.detailColumnIndex]=r.isExpanded),r},_processItems:function(t,i){var n=this,r=i.changeType,a=[];return t=n.callBase.apply(n,arguments),r==="loadingAll"?t:(r==="refresh"&&(n._expandedItems=Vi(n._expandedItems,function(o){return o.visible})),F(t,function(o,s){a.push(s);var l=xe.getIndexByKey(s.key,n._expandedItems);s.rowType==="data"&&(s.isExpanded||l>=0)&&!s.isNewRow&&a.push({visible:s.isExpanded,rowType:"detail",key:s.key,data:s.data,values:[]})}),a)},optionChanged:function(t){var i,n;if(t.name==="masterDetail"){switch(t.name="dataSource",t.fullName){case"masterDetail":var r=t.value||{},a=t.previousValue||{};i=r.enabled!==a.enabled,n=r.autoExpandAll!==a.autoExpandAll;break;case"masterDetail.template":e(this);break;case"masterDetail.enabled":i=!0;break;case"masterDetail.autoExpandAll":n=!0}(i||n)&&e(this)}this.callBase(t)}}}(),resizing:{fireContentReadyAction:function(){this.callBase.apply(this,arguments),this._updateParentDataGrids(this.component.$element())},_updateParentDataGrids:function(e){var t=e.closest("."+jb);t.length&&Ae(this._updateMasterDataGrid(t,e)).done(()=>{this._updateParentDataGrids(t.parent())})},_updateMasterDataGrid:function(e,t){var i=v(e).data("options"),n=v(e).closest("."+this.getWidgetContainerClass()).parent().data("dxDataGrid");if(i&&n){if(n.getView("rowsView").isFixedColumns())return this._updateFixedMasterDetailGrids(n,i.rowIndex,t);if(n.option("scrolling.useNative")===!0)return n.updateDimensions();var r=n.getScrollable();return r==null?void 0:r.update()}},_updateFixedMasterDetailGrids:function(e,t,i){var n=v(e.getRowElement(t)),r=v(e.getView("rowsView").getTableElements()),a=(n==null?void 0:n.length)===2&&je(n.eq(0))!==je(n.eq(1)),o=(r==null?void 0:r.length)===2&&je(r.eq(0))!==je(r.eq(1));if(a||o){var s=$e(i);return e.updateDimensions().done(()=>{var l=this.option("columnAutoWidth")&&e.option("scrolling.useNative")===!0,u=l&&s!==$e(i);l&&u&&this.updateDimensions()})}},_toggleBestFitMode:function(e){if(this.callBase.apply(this,arguments),this.option("masterDetail.template")){var t=this._rowsView.getTableElement();t&&t.find(".dx-master-detail-cell").css("maxWidth",e?0:"")}}}},views:{rowsView:{_getCellTemplate:function(e){var t=this,i=e.column,n=t.getController("editing"),r=n&&n.isEditRow(e.rowIndex),a;return i.command==="detail"&&!r?a=t.option("masterDetail.template")||{allowRenderToDetachedContainer:!1,render:t._getDefaultTemplate(i)}:a=t.callBase.apply(t,arguments),a},_isDetailRow:function(e){return e&&e.rowType&&e.rowType.indexOf("detail")===0},_createRow:function(e){var t=this.callBase.apply(this,arguments);return e&&this._isDetailRow(e)&&(this.option("showRowLines")&&t.addClass(fj),t.addClass(jb),E(e.visible)&&t.toggle(e.visible)),t},_renderCells:function(e,t){var i=t.row,n,r=this._columnsController.getVisibleColumns();i.rowType&&this._isDetailRow(i)?this._needRenderCell(0,t.columnIndices)&&(n=this._renderCell(e,{value:null,row:i,rowIndex:i.rowIndex,column:{command:"detail"},columnIndex:0}),n.addClass(hj).addClass(cj).attr("colSpan",r.length)):this.callBase.apply(this,arguments)}}}}};De.registerModule("masterDetail",pj);var Tc=function(e){for(var t=0,i=0,n=0;n<e.length;++n)if(e[n]==="'"&&t++,e[n]==="."&&(++i,t%2===0))return{occurrence:i,index:n};return{occurrence:1,index:-1}},tg=function(e,t,i){for(var n=-1;i--&&n++<e.length;)n=e.indexOf(t,n);return n},ig=function(e,t){return t===-1?[e]:[e.slice(0,t),e.slice(t+1)]},vj=function(e,t){return e&&ZT(e/100,t)},ch=function(e,t){if(typeof t=="string"){var i=t.split(";"),n=yt.getSign(e,t);i[1]=i[1]||"-"+i[0],t=i[n<0?1:0],t=(o=t,o.replace(/'([^']*)'/g,s=>s.split("").map(()=>" ").join("").substr(2)));var r=/^[^#0.,]*/.exec(t)[0].length,a=/[^#0.,]*$/.exec(t)[0].length;return{start:r,end:e.length-a}}else return{start:0,end:e.length};var o},qb=function(e,t){var i=yt.getDecimalSeparator(),n=new RegExp("[^0-9"+Or(i)+"]","g"),r=t.slice(0,e);return r.replace(n,"").length},Yb=function(e){return e.split("").reverse().join("")},Xb=function(e,t){if(!e)return-1;for(var i=/[0-9]/g,n=1,r=null,a=i.exec(t);a;){if(r=a.index,n>=e)return r;n++,a=i.exec(t)}return r===null?t.length:r},_j=function(e){return e.replace(/[^0-9e]+$/,"")},Qa=function(e,t){return e.start===void 0&&(e={start:e,end:e}),{start:e.start+t,end:e.end+t}},gj=function(e,t,i,n){i=Qa(i,0);var r=yt.getDecimalSeparator(),a=mj(e),o=Tc(n).occurrence,s=a?0:tg(e,r,o),l=tg(t,r,o),u=ig(e,s),d=ig(t,l),c=s!==-1&&i.start>s;if(c){var h=i.start-s-1,f=qb(h,u[1]),p=d[1]?l+1+Xb(f,d[1])+1:t.length;return sa(p,t,n)}else{var g=_j(d[0]),m=u[0].length-i.start,C=qb(m,Yb(u[0])),x=Xb(C,Yb(g)),T=g.length-(x+1);return sa(T,t,n)}};function mj(e){return e.length===1&&!!e.match(/^[,.][0-9]*$/g)}var Cj=function(e,t,i){e=Qa(e,0);var n=sa(e,t,i);return e.start>=n.start&&e.end<=n.end};function sa(e,t,i){e=Qa(e,0);var n=ch(t,i),r={start:Di(e.start,n.start,n.end),end:Di(e.end,n.start,n.end)};return r}var yj=function(e,t,i){var n=ch(e,i),r=ch(t,i);return r.start-n.start},xj="dx-numberbox-spin",bj="dx-numberbox-spin-button",Sj=100,d1="dxNumberBox",Zb=me(ut.up,d1),Qb=me(ut.cancel,d1),Xo=pi.inherit({_getDefaultOptions:function(){return O(this.callBase(),{direction:"up",onChange:null,activeStateEnabled:!0,hoverStateEnabled:!0})},_initMarkup:function(){this.callBase();var e=xj+"-"+this.option("direction");this.$element().addClass(bj).addClass(e),this._spinIcon=v("<div>").addClass(e+"-icon").appendTo(this.$element())},_render:function(){this.callBase();var e=me(ut.down,this.NAME),t=this.$element();D.off(t,e),D.on(t,e,this._spinDownHandler.bind(this)),this._spinChangeHandler=this._createActionByOption("onChange")},_spinDownHandler:function(e){e.preventDefault(),this._clearTimer(),D.on(this.$element(),ma.name,(function(){this._feedBackDeferred=new te,VN(this._feedBackDeferred),this._spinChangeHandler({event:e}),this._holdTimer=setInterval(this._spinChangeHandler,Sj,{event:e})}).bind(this));var t=fe.getDocument();D.on(t,Zb,this._clearTimer.bind(this)),D.on(t,Qb,this._clearTimer.bind(this)),this._spinChangeHandler({event:e})},_dispose:function(){this._clearTimer(),this.callBase()},_clearTimer:function(){D.off(this.$element(),ma.name);var e=fe.getDocument();D.off(e,Zb),D.off(e,Qb),this._feedBackDeferred&&this._feedBackDeferred.resolve(),this._holdTimer&&clearInterval(this._holdTimer)},_optionChanged:function(e){switch(e.name){case"onChange":case"direction":this._invalidate();break;default:this.callBase(e)}}}),Ej="dx-numberbox-spin",wj="dx-numberbox-spin-container",Ij="dx-numberbox-spin-touch-friendly";class Tj extends Gh{_attachEvents(t,i){var{editor:n}=this,r=me(ut.down,n.NAME),a=i.children(),o=n._createAction(s=>n._spinButtonsPointerDownHandler(s));D.off(i,r),D.on(i,r,s=>o({event:s})),Xo.getInstance(a.eq(0)).option("onChange",s=>n._spinUpChangeHandler(s)),Xo.getInstance(a.eq(1)).option("onChange",s=>n._spinDownChangeHandler(s))}_create(){var{editor:t}=this,i=v("<div>").addClass(wj),n=v("<div>").appendTo(i),r=v("<div>").appendTo(i),a=this._getOptions();return this._addToContainer(i),t._createComponent(n,Xo,O({direction:"up"},a)),t._createComponent(r,Xo,O({direction:"down"},a)),this._legacyRender(t.$element(),this._isTouchFriendly(),a.visible),{instance:i,$element:i}}_getOptions(){var{editor:t}=this,i=this._isVisible(),n=t.option("disabled");return{visible:i,disabled:n}}_isVisible(){var{editor:t}=this;return super._isVisible()&&t.option("showSpinButtons")}_isTouchFriendly(){var{editor:t}=this;return t.option("showSpinButtons")&&t.option("useLargeSpinButtons")}_legacyRender(t,i,n){t.toggleClass(Ij,i),t.toggleClass(Ej,n)}update(){var t=super.update();if(t){var{editor:i,instance:n}=this,r=i.$element(),a=this._isVisible(),o=this._isTouchFriendly(),s=n.children(),l=Xo.getInstance(s.eq(0)),u=Xo.getInstance(s.eq(1)),d=this._getOptions();l.option(d),u.option(d),this._legacyRender(r,o,a)}}}var Aj=Math,Dj="dx-numberbox",Oj=["tab","del","backspace","leftArrow","rightArrow","home","end","enter"],Rj="NumberBoxForceValueChange",kj=tC.inherit({_supportedKeys:function(){return O(this.callBase(),{upArrow:function(e){fi(e)||(e.preventDefault(),e.stopPropagation(),this._spinUpChangeHandler(e))},downArrow:function(e){fi(e)||(e.preventDefault(),e.stopPropagation(),this._spinDownChangeHandler(e))},enter:function(){}})},_getDefaultOptions:function(){return O(this.callBase(),{value:0,min:void 0,max:void 0,step:1,showSpinButtons:!1,useLargeSpinButtons:!0,mode:"text",invalidValueMessage:ue.format("dxNumberBox-invalidValueMessage"),buttons:void 0})},_useTemplates:function(){return!1},_getDefaultButtons:function(){return this.callBase().concat([{name:"spins",Ctor:Tj}])},_isSupportInputMode:function(){var e=parseFloat(Bt.version);return Bt.chrome&&e>=66||Bt.safari&&e>=12},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Oe.real().generic&&!Oe.isSimulator()},options:{useLargeSpinButtons:!1}},{device:(function(){return Oe.real().deviceType!=="desktop"&&!this._isSupportInputMode()}).bind(this),options:{mode:"number"}}])},_initMarkup:function(){this._renderSubmitElement(),this.$element().addClass(Dj),this.callBase()},_getDefaultAttributes:function(){var e=this.callBase();return e.inputmode="decimal",e},_renderContentImpl:function(){this.option("isValid")&&this._validateValue(this.option("value")),this.setAria("role","spinbutton")},_renderSubmitElement:function(){this._$submitElement=v("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue:function(e){this._getSubmitElement().val(LI(e))},_getSubmitElement:function(){return this._$submitElement},_keyPressHandler:function(e){this.callBase(e);var t=Gc(e),i=/[\d.,eE\-+]/.test(t);if(!i){var n=Nt(e);return fi(e)||n&&Oj.includes(n)?void 0:(e.preventDefault(),!1)}this._keyPressed=!0},_onMouseWheel:function(e){e.delta>0?this._spinValueChange(1,e):this._spinValueChange(-1,e)},_renderValue:function(){var e=this._input().val(),t=this.option("value");(!e.length||Number(e)!==t)&&(this._forceValueRender(),this._toggleEmptinessEventHandler());var i=E(t)?null:ue.format("dxNumberBox-noDataText");return this.setAria({valuenow:Ft(t,""),valuetext:i}),this.option("text",this._input().val()),this._updateButtons(),new te().resolve()},_forceValueRender:function(){var e=this.option("value"),t=Number(e),i=isNaN(t)?"":this._applyDisplayValueFormatter(e);this._renderDisplayText(i)},_applyDisplayValueFormatter:function(e){return this.option("displayValueFormatter")(e)},_renderProps:function(){this._input().prop({min:this.option("min"),max:this.option("max"),step:this.option("step")}),this.setAria({valuemin:Ft(this.option("min"),""),valuemax:Ft(this.option("max"),"")})},_spinButtonsPointerDownHandler:function(){var e=this._input();!this.option("useLargeSpinButtons")&&fe.getActiveElement()!==e[0]&&D.trigger(e,"focus")},_spinUpChangeHandler:function(e){this.option("readOnly")||this._spinValueChange(1,e.event||e)},_spinDownChangeHandler:function(e){this.option("readOnly")||this._spinValueChange(-1,e.event||e)},_spinValueChange:function(e,t){var i=parseFloat(this.option("step"));if(i!==0){var n=parseFloat(this._normalizeInputValue())||0;n=this._correctRounding(n,i*e);var r=this.option("min"),a=this.option("max");E(r)&&(n=Math.max(r,n)),E(a)&&(n=Math.min(a,n)),this._saveValueChangeEvent(t),this.option("value",n)}},_correctRounding:function(e,t){var i=/[,.](.*)/,n=i.test(e),r=i.test(t);if(n||r){var a=n?i.exec(e)[0].length:0,o=r?i.exec(t)[0].length:0,s=Aj.max(a,o);return e=this._round(e+t,s),e}return e+t},_round:function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,e=Math.round(e)/i,e},_renderValueChangeEvent:function(){this.callBase();var e=me("focusout",Rj);D.off(this.element(),e),D.on(this.element(),e,this._forceRefreshInputValue.bind(this))},_forceRefreshInputValue:function(){if(this.option("mode")!=="number"){var e=this._input(),t=this._applyDisplayValueFormatter(this.option("value"));e.val(null),e.val(t)}},_valueChangeEventHandler:function(e){var t=this._input(),i=this._normalizeText(),n=this._parseValue(i),r=i!=="."&&i!=="-";if(this._isValueValid()&&!this._validateValue(n)){t.val(this._applyDisplayValueFormatter(n));return}r&&this.callBase(e,isNaN(n)?null:n),this._applyValueBoundaries(i,n),this.validationRequest.fire({value:n,editor:this})},_applyValueBoundaries:function(e,t){var i=this._isValueIncomplete(e),n=this._isValueInRange(e);!i&&!n&&t!==null&&Number(e)!==t&&this._input().val(this._applyDisplayValueFormatter(t))},_replaceCommaWithPoint:function(e){return e.replace(",",".")},_inputIsInvalid:function(){var e=this.option("mode")==="number",t=this._input().get(0).validity;return e&&t&&t.badInput},_renderDisplayText:function(e){this._inputIsInvalid()||this.callBase(e)},_isValueIncomplete:function(e){return/(^-$)|(^-?\d*\.$)|(\d+e-?$)/i.test(e)},_isValueInRange:function(e){return Br(e,this.option("min"),this.option("max"))},_isNumber:function(e){return this._parseValue(e)!==null},_validateValue:function(e){var t=this._normalizeText(),i=this._isValueValid(),n=!0,r=this._isNumber(t);return isNaN(Number(e))&&(n=!1),!e&&i?n=!0:!r&&!i&&(n=!1),this.option({isValid:n,validationError:n?null:{editorSpecific:!0,message:this.option("invalidValueMessage")}}),n},_normalizeInputValue:function(){return this._parseValue(this._normalizeText())},_normalizeText:function(){var e=this._input().val().trim();return this._replaceCommaWithPoint(e)},_parseValue:function(e){var t=parseFloat(e);return isNaN(t)?null:Di(t,this.option("min"),this.option("max"))},_clearValue:function(){this._inputIsInvalid()&&(this._input().val(""),this._validateValue()),this.callBase()},reset:function(){this.option("value")===null?(this.option("text",""),this._renderValue()):this.option("value",null)},_optionChanged:function(e){switch(e.name){case"value":this._validateValue(e.value),this._setSubmitValue(e.value),this.callBase(e),this._resumeValueChangeAction();break;case"step":this._renderProps();break;case"min":case"max":this._renderProps(),this.option("value",this._parseValue(this.option("value")));break;case"showSpinButtons":case"useLargeSpinButtons":this._updateButtons(["spins"]);break;case"invalidValueMessage":break;default:this.callBase(e)}}}),Yp="dxNumberFormatter",Hd=1,Xp=-1,Jb="-",fl="minus",Bj="input",eS=0,hh=kj.inherit({_getDefaultOptions:function(){return O(this.callBase(),{useMaskBehavior:!0,format:null})},_isDeleteKey:function(e){return e==="del"},_supportedKeys:function(){return this._useMaskBehavior()?O(this.callBase(),{minus:this._revertSign.bind(this),del:this._removeHandler.bind(this),backspace:this._removeHandler.bind(this),leftArrow:this._arrowHandler.bind(this,Xp),rightArrow:this._arrowHandler.bind(this,Hd),home:this._moveCaretToBoundaryEventHandler.bind(this,Hd),enter:this._updateFormattedValue.bind(this),end:this._moveCaretToBoundaryEventHandler.bind(this,Xp)}):this.callBase()},_getTextSeparatorIndex:function(e){var t=yt.getDecimalSeparator(),i=Tc(this.option("format")).occurrence;return tg(e,t,i)},_focusInHandler:function(e){this._preventNestedFocusEvent(e)||(this.clearCaretTimeout(),this._caretTimeout=setTimeout((function(){this._caretTimeout=void 0;var t=this._caret();if(t.start===t.end&&this._useMaskBehavior()){var i=this._getInputVal(),n=this._getTextSeparatorIndex(i);n>=0?this._caret({start:n,end:n}):this._moveCaretToBoundaryEventHandler(Xp,e)}}).bind(this),eS)),this.callBase(e)},_focusOutHandler:function(e){var t=!this._preventNestedFocusEvent(e);t&&(this._focusOutOccurs=!0,this._useMaskBehavior()&&this._updateFormattedValue()),this.callBase(e),t&&(this._focusOutOccurs=!1)},_hasValueBeenChanged(e){var t=this._getFormatPattern(),i=this.option("value"),n=this._format(i,t)||"";return n!==e},_updateFormattedValue:function(){var e=this._getInputVal();this._hasValueBeenChanged(e)&&(this._updateParsedValue(),this._adjustParsedValue(),this._setTextByParsedValue(),this._parsedValue!==this.option("value")&&D.trigger(this._input(),"change"))},_arrowHandler:function(e,t){if(this._useMaskBehavior()){var i=this._getInputVal(),n=this._getFormatPattern(),r=Qa(this._caret(),e);Cj(r,i,n)||(r=e===Hd?r.end:r.start,t.preventDefault(),this._caret(sa(r,i,n)))}},_moveCaretToBoundary:function(e){var t=ch(this._getInputVal(),this._getFormatPattern()),i=Qa(e===Hd?t.start:t.end,0);this._caret(i)},_moveCaretToBoundaryEventHandler:function(e,t){!this._useMaskBehavior()||t&&t.shiftKey||(this._moveCaretToBoundary(e),t&&t.preventDefault())},_shouldMoveCaret:function(e,t){var i=yt.getDecimalSeparator(),n=e.charAt(t.end)===i,r=(this._lastKey===i||this._lastKey===".")&&n;return r},_getInputVal:function(){return yt.convertDigits(this._input().val(),!0)},_keyboardHandler:function(e){if(this.clearCaretTimeout(),this._lastKey=yt.convertDigits(Gc(e),!0),this._lastKeyName=Nt(e),!this._shouldHandleKey(e.originalEvent))return this.callBase(e);var t=this._getInputVal(),i=this._caret(),n=this._lastKeyName===fl?"":this._lastKey,r=this._tryParse(t,i,n);return this._shouldMoveCaret(t,i)&&(this._moveCaret(1),e.originalEvent.preventDefault()),r===void 0?this._lastKeyName!==fl&&e.originalEvent.preventDefault():this._parsedValue=r,this.callBase(e)},_keyPressHandler:function(e){this._useMaskBehavior()||this.callBase(e)},_removeHandler:function(e){var t=this._caret(),i=this._getInputVal(),n=t.start,r=t.end;this._lastKey=Gc(e),this._lastKeyName=Nt(e);var a=this._isDeleteKey(this._lastKeyName),o=!a;if(n===r){var s=n,l=o&&s>0||a&&s<i.length;if(l)a&&r++,o&&n--;else{e.preventDefault();return}}var u=i.slice(n,r);if(this._isStub(u)){this._moveCaret(a?1:-1),(this._parsedValue<0||1/this._parsedValue===-1/0)&&(this._revertSign(e),this._setTextByParsedValue()),e.preventDefault();return}var d=yt.getDecimalSeparator();if(u===d){var c=i.indexOf(d);this._isNonStubAfter(c+1)&&(this._moveCaret(a?1:-1),e.preventDefault());return}if(r-n<i.length){var h=this._replaceSelectedText(i,{start:n,end:r},""),f=h.search(/[0-9]/)<0;if(f&&this._isValueInRange(0)){this._parsedValue=this._parsedValue<0||1/this._parsedValue===-1/0?-0:0;return}}var p=this._tryParse(i,{start:n,end:r},"");p===void 0?e.preventDefault():this._parsedValue=p},_isPercentFormat:function(){var e=this._getFormatPattern(),t=e.replace(/'[^']+'/g,"");return t.indexOf("%")!==-1},_parse:function(e,t){var i=this.option("format"),n=Ee(i.parser),r=n?i.parser:yt.parse,a=0;if(!n){var o=Tc(t).index,s=this._getTextSeparatorIndex(e),l=o!==-1?o:t.length,u=s!==-1?s:e.length;u>l&&t.indexOf("#")===-1&&(a=u-l)}return e=this._removeStubs(e,!0),e=e.substr(a),r(e,t)},_format:function(e,t){var i=this.option("format"),n=(i==null?void 0:i.formatter)||i,r=Ee(n)?n:yt.format,a=e===null?"":r(e,t);return a},_getFormatPattern:function(){return this._currentFormat||this._updateFormat(),this._currentFormat},_updateFormat:function(){var e=this.option("format"),t=Ee(e==null?void 0:e.parser),i=Me(e)&&(e.indexOf("0")>=0||e.indexOf("#")>=0);this._currentFormat=t||i?e:S2(n=>{var r=this._format(n,e);return yt.convertDigits(r,!0)})},_getFormatForSign:function(e){var t=this._getFormatPattern();if(Me(t)){var i=t.split(";"),n=yt.getSign(e,t);return i[1]=i[1]||"-"+i[0],n<0?i[1]:i[0]}else{var r=yt.getSign(e);return r<0?"-":""}},_removeStubs:function(e,t){var i=this._getFormatForSign(e),n=yt.getThousandsSeparator(),r=this._getStubs(i),a=e;if(r.length){var o=r[0],s=new RegExp("("+Or(r[1]||"")+")$","g"),l=new RegExp("[-"+Or(t?"":n)+"]","g");a=a.replace(o,"").replace(s,"").replace(l,"")}return a},_getStubs:function(e){var t=/[^']([#0.,]+)/g.exec(e),i=t&&t[0].trim();return e.split(i).map(function(n){return n.replace(/'/g,"")})},_truncateToPrecision:function(e,t){if(E(e)){var i=e.toString(),n=i.indexOf(".");if(i&&n>-1){var r=parseFloat(i.substr(0,n+t+1));return isNaN(r)?e:r}}return e},_tryParse:function(e,t,i){var n=this._replaceSelectedText(e,t,i),r=this._getFormatPattern(),a=t.start!==t.end,o=this._getParsedValue(n,r),s=!r.parser&&this._getPrecisionLimits(n).max,l=o!==this._parsedValue,u=yt.getDecimalSeparator(),d=i===u&&s===0,c=!a&&!l&&i!==Jb&&!this._isValueIncomplete(n)&&this._isStub(i);if(!(d||c)&&(this._removeStubs(n)===""&&(o=Math.abs(0*this._parsedValue)),!isNaN(o))){var h=o===null?this._parsedValue:o;return o=s?this._truncateToPrecision(h,s):o,!r.parser&&this._isPercentFormat()?vj(o,s):o}},_getParsedValue:function(e,t){var i=yt.getSign(e,(t==null?void 0:t.formatter)||t),n=this._parse(e,t),r=n<0?-1:1,a=xt(n)&&i!==r?i*n:n;return a},_isValueIncomplete:function(e){if(!this._useMaskBehavior())return this.callBase(e);var t=this._caret(),i=yt.getDecimalSeparator(),n=this._getTextSeparatorIndex(e),r=n>=0&&n<t.start,a=this._removeStubs(e,!0).split(i);if(!r||a.length!==2)return!1;var o=a[1].length,s=this._getFormatPattern(),l=!!s.parser,u=!l&&this._getPrecisionLimits(this._getFormatPattern(),e),d=l?!0:Br(o,u.min,u.max),c=a[1].charAt(o-1)==="0";return d&&(c||!o)},_isValueInRange:function(e){var t=Ft(this.option("min"),-1/0),i=Ft(this.option("max"),1/0);return Br(e,t,i)},_setInputText:function(e){var t=yt.convertDigits(e,!0),i=gj(this._getInputVal(),t,this._caret(),this._getFormatPattern());this._input().val(e),this._toggleEmptinessEventHandler(),this._formattedValue=e,this._focusOutOccurs||this._caret(i)},_useMaskBehavior:function(){return!!this.option("format")&&this.option("useMaskBehavior")},_renderInputType:function(){var e=this.option("mode")==="number",t=Oe.real().deviceType==="desktop";this._useMaskBehavior()&&e?this._setInputType(t||this._isSupportInputMode()?"text":"tel"):this.callBase()},_isChar:function(e){return Me(e)&&e.length===1},_moveCaret:function(e){if(e){var t=Qa(this._caret(),e),i=sa(t,this._getInputVal(),this._getFormatPattern());this._caret(i)}},_shouldHandleKey:function(e){var t=Nt(e),i=fi(e)||e.altKey||e.shiftKey||!this._isChar(t),n=t===fl,r=this._useMaskBehavior();return r&&!i&&!n},_renderInput:function(){this.callBase(),this._renderFormatter()},_renderFormatter:function(){this._clearCache(),this._detachFormatterEvents(),this._useMaskBehavior()&&this._attachFormatterEvents()},_detachFormatterEvents:function(){D.off(this._input(),"."+Yp)},_isInputFromPaste:function(e){var t=e.originalEvent&&e.originalEvent.inputType;return E(t)?t==="insertFromPaste":this._isValuePasted},_attachFormatterEvents:function(){var e=this._input();D.on(e,me(Bj,Yp),(function(t){this._formatValue(t),this._isValuePasted=!1}).bind(this)),D.on(e,me("dxclick",Yp),(function(){this._caretTimeout||(this._caretTimeout=setTimeout((function(){this._caretTimeout=void 0,this._caret(sa(this._caret(),this._getInputVal(),this._getFormatPattern()))}).bind(this),eS))}).bind(this)),D.on(e,"dxdblclick",(function(){this.clearCaretTimeout()}).bind(this))},clearCaretTimeout:function(){clearTimeout(this._caretTimeout),this._caretTimeout=void 0},_forceRefreshInputValue:function(){if(!this._useMaskBehavior())return this.callBase()},_isNonStubAfter:function(e){var t=this._getInputVal().slice(e);return t&&!this._isStub(t,!0)},_isStub:function(e,t){var i=Or(yt.getDecimalSeparator()),n="^[^0-9"+i+"]+$",r=new RegExp(n,"g");return r.test(e)&&(t||this._isChar(e))},_parseValue:function(e){return this._useMaskBehavior()?this._parsedValue:this.callBase(e)},_getPrecisionLimits:function(e){var t=this._getFormatForSign(e),i=Tc(t).index,n=(ig(t,i)[1]||"").replace(/[^#0]/g,""),r=n.replace(/^(0*)#*/,"$1").length,a=n.length;return{min:r,max:a}},_revertSign:function(e){if(this._useMaskBehavior()){var t=this._caret();if(t.start!==t.end)if(Nt(e)===fl){this._applyRevertedSign(e,t,!0);return}else this._caret(sa(0,this._getInputVal(),this._getFormatPattern()));this._applyRevertedSign(e,t)}},_applyRevertedSign:function(e,t,i){var n=-1*Ft(this._parsedValue,null);if(this._isValueInRange(n)&&(this._parsedValue=n,i)){var r=this._getFormatPattern(),a=this._getInputVal();this._setTextByParsedValue(),e.preventDefault();var o=this._getInputVal(),s=yj(a,o,r);t=Qa(t,s);var l=sa(t,o,r);this._caret(l)}},_removeMinusFromText:function(e,t){var i=this._lastKeyName===fl&&e.charAt(t.start-1)===Jb;return i?this._replaceSelectedText(e,{start:t.start-1,end:t.start},""):e},_setTextByParsedValue:function(){var e=this._getFormatPattern(),t=this._parseValue(),i=this._format(t,e)||"";this._setInputText(i)},_formatValue:function(e){var t=this._getInputVal(),i=this._caret(),n=this._removeMinusFromText(t,i),r=n!==t;if(t=n,!this._isInputFromPaste(e)&&this._isValueIncomplete(n)){this._formattedValue=t,r&&this._setTextByParsedValue();return}var a=yt.convertDigits(this._formattedValue,!0)!==t;if(a){var o=this._tryParse(t,i,"");E(o)&&(this._parsedValue=o)}this._setTextByParsedValue()},_renderDisplayText:function(){this._useMaskBehavior()?this._toggleEmptinessEventHandler():this.callBase.apply(this,arguments)},_renderValue:function(){return this._useMaskBehavior()&&(this._parsedValue=this.option("value"),this._setTextByParsedValue()),this.callBase()},_updateParsedValue:function(){var e=this._getInputVal();this._parsedValue=this._tryParse(e,this._caret())},_adjustParsedValue:function(){if(this._useMaskBehavior()){var e=this._removeStubs(this._getInputVal()),t=e?this._parseValue():null;if(!xt(t)){this._parsedValue=t;return}this._parsedValue=Di(t,this.option("min"),this.option("max"))}},_valueChangeEventHandler:function(e){if(!this._useMaskBehavior())return this.callBase(e);var t=this._caret();this._saveValueChangeEvent(e),this._lastKey=null,this._lastKeyName=null,this._updateParsedValue(),this._adjustParsedValue(),this.option("value",this._parsedValue),t&&this._caret(t)},_optionChanged:function(e){switch(e.name){case"format":case"useMaskBehavior":this._renderInputType(),this._updateFormat(),this._renderFormatter(),this._renderValue(),this._refreshValueChangeEvent(),this._refreshEvents();break;case"min":case"max":this._adjustParsedValue(),this.callBase(e);break;default:this.callBase(e)}},_clearCache:function(){delete this._formattedValue,delete this._lastKey,delete this._lastKeyName,delete this._parsedValue,delete this._focusOutOccurs,clearTimeout(this._caretTimeout),delete this._caretTimeout},_clean:function(){this._clearCache(),this.callBase()}});tt("dxNumberBox",hh);var Lj="dx-dropdowneditor-button",Pj="dx-dropdowneditor-button-visible",Fj="dxDropDownEditor-selectLabel";let Mj=class extends Gh{constructor(t,i,n){super(t,i,n),this.currentTemplate=null}_attachEvents(t){var{editor:i}=this;t.option("onClick",n=>{!i.option("openOnFieldClick")&&i._openHandler(n)}),D.on(t.$element(),"mousedown",n=>{i.$element().is(".dx-state-focused")&&n.preventDefault()})}_create(){var{editor:t}=this,i=v("<div>"),n=this._getOptions();this._addToContainer(i);var r=t._createComponent(i,Si,O({},n,{elementAttr:{"aria-label":ue.format(Fj)}}));return this._legacyRender(t.$element(),i,n.visible),{$element:i,instance:r}}_getOptions(){var{editor:t}=this,i=this._isVisible(),n=t.option("readOnly"),r={focusStateEnabled:!1,hoverStateEnabled:!1,activeStateEnabled:!1,useInkRipple:!1,disabled:n,visible:i};return this._addTemplate(r),r}_isVisible(){var{editor:t}=this;return super._isVisible()&&t.option("showDropDownButton")}_legacyRender(t,i,n){t.toggleClass(Pj,n),i&&i.removeClass("dx-button").addClass(Lj)}_isSameTemplate(){return this.editor.option("dropDownButtonTemplate")===this.currentTemplate}_addTemplate(t){this._isSameTemplate()||(t.template=this.editor._getTemplateByOption("dropDownButtonTemplate"),this.currentTemplate=this.editor.option("dropDownButtonTemplate"))}update(){var t=super.update();if(t){var{editor:i,instance:n}=this,r=i.$element(),a=this._getOptions();n==null||n.option(a),this._legacyRender(r,n==null?void 0:n.$element(),a.visible)}}};var fh=function(e){if(Ke())return lt(e)},mC=function(e){return e===null&&(e=void 0),typeof e=="function"&&(e=e()),e},Vj="dx-dropdowneditor",tS="dx-dropdowneditor-input-wrapper",Nj="dx-dropdowneditor-icon",$d="dx-dropdowneditor-overlay",iS="dx-dropdowneditor-overlay-flipped",Hj="dx-dropdowneditor-active",$j="dx-dropdowneditor-field-clickable",Wj="dx-dropdowneditor-field-template-wrapper",nS=Oe.current().platform==="ios",CC=Zu.inherit({_supportedKeys:function(){return O({},this.callBase(),{tab:function(e){if(this.option("opened")){if(this.option("applyValueMode")==="instantly"){this.close();return}var t=e.shiftKey?this._getLastPopupElement():this._getFirstPopupElement();t&&D.trigger(t,"focus"),e.preventDefault()}},escape:function(e){return this.option("opened")&&e.preventDefault(),this.close(),!0},upArrow:function(e){return!fi(e)&&(e.preventDefault(),e.stopPropagation(),e.altKey)?(this.close(),!1):!0},downArrow:function(e){return!fi(e)&&(e.preventDefault(),e.stopPropagation(),e.altKey)?(this._validatedOpening(),!1):!0},enter:function(e){return this.option("opened")&&(e.preventDefault(),this._valueChangeEventHandler(e)),!0}})},_getDefaultButtons:function(){return this.callBase().concat([{name:"dropDown",Ctor:Mj}])},_getDefaultOptions:function(){return O(this.callBase(),{value:null,onOpened:null,onClosed:null,opened:!1,acceptCustomValue:!0,applyValueMode:"instantly",deferRendering:!0,activeStateEnabled:!0,dropDownButtonTemplate:"dropDownButton",fieldTemplate:null,openOnFieldClick:!1,showDropDownButton:!0,buttons:void 0,dropDownOptions:{showTitle:!1},popupPosition:this._getDefaultPopupPosition(),onPopupInitialized:null,applyButtonText:ue.format("OK"),cancelButtonText:ue.format("Cancel"),buttonsLocation:"default",useHiddenSubmitElement:!1})},_useTemplates:function(){return!0},_getDefaultPopupPosition:function(e){var t=wa(e);return{offset:{h:0,v:-1},my:t+" top",at:t+" bottom",collision:"flip flip"}},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(e){var t=e.platform==="generic";return t},options:{popupPosition:{offset:{v:0}}}}])},_inputWrapper:function(){return this.$element().find("."+tS).first()},_init:function(){this.callBase(),this._initVisibilityActions(),this._initPopupInitializedAction(),this._updatePopupPosition(this.option("rtlEnabled")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_updatePopupPosition:function(e){var{my:t,at:i}=this._getDefaultPopupPosition(e),n=this.option("popupPosition");this.option("popupPosition",O({},n,{my:t,at:i}))},_initVisibilityActions:function(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]}),this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})},_initPopupInitializedAction:function(){this._popupInitializedAction=this._createActionByOption("onPopupInitialized",{excludeValidators:["disabled","readOnly"]})},_initMarkup:function(){this._renderSubmitElement(),this.callBase(),this.$element().addClass(Vj),this.setAria("role","combobox")},_render:function(){this.callBase(),this._renderOpenHandler(),this._attachFocusOutHandler(),this._renderOpenedState()},_renderContentImpl:function(){this.option("deferRendering")||this._createPopup()},_renderInput:function(){this.callBase(),this._wrapInput(),this._setDefaultAria()},_wrapInput:function(){this._$container=this.$element().wrapInner(v("<div>").addClass(tS)).children().eq(0)},_setDefaultAria:function(){this.setAria({haspopup:"true",autocomplete:"list"})},_readOnlyPropValue:function(){return!this._isEditable()||this.callBase()},_cleanFocusState:function(){this.callBase(),this.option("fieldTemplate")&&this._detachFocusEvents()},_getFieldTemplate:function(){return this.option("fieldTemplate")&&this._getTemplateByOption("fieldTemplate")},_renderMask:function(){this.option("fieldTemplate")||this.callBase()},_renderField:function(){var e=this._getFieldTemplate();e&&this._renderTemplatedField(e,this._fieldRenderData())},_renderPlaceholder:function(){var e=!!this._getFieldTemplate();e||this.callBase()},_renderValue:function(){this.option("useHiddenSubmitElement")&&this._setSubmitValue();var e=this.callBase();e.always(this._renderField.bind(this))},_renderTemplatedField:function(e,t){var i;this._fieldRenderQueueLength=((i=this._fieldRenderQueueLength)!==null&&i!==void 0?i:0)+1;var n=_a(this._input()),r=this._$container;this._detachKeyboardEvents(),this._refreshButtonsContainer(),this._detachWrapperContent(),this._detachFocusEvents(),r.empty();var a=v("<div>").addClass(Wj).appendTo(r);e.render({model:t,container:Fe(a),onRendered:()=>{if(this._fieldRenderQueueLength--,this._fieldRenderQueueLength===0){var o=this._input();if(!o.length)throw Je.Error("E1010");this._integrateInput(),n&&D.trigger(o,"focus")}}}),this._attachWrapperContent(r)},_detachWrapperContent(){var e,t,i,n=this.option("useHiddenSubmitElement");n&&((e=this._$submitElement)===null||e===void 0||e.detach());var r=(t=this._$beforeButtonsContainer)===null||t===void 0?void 0:t[0].parentNode,a=(i=this._$afterButtonsContainer)===null||i===void 0?void 0:i[0].parentNode;r==null||r.removeChild(this._$beforeButtonsContainer[0]),a==null||a.removeChild(this._$afterButtonsContainer[0])},_attachWrapperContent(e){var t,i=this.option("useHiddenSubmitElement");e.prepend(this._$beforeButtonsContainer),i&&((t=this._$submitElement)===null||t===void 0||t.appendTo(e)),e.append(this._$afterButtonsContainer)},_refreshButtonsContainer(){this._$buttonsContainer=this.$element().children().eq(0)},_integrateInput:function(){this._renderFocusState(),this._refreshValueChangeEvent(),this._refreshEvents(),this._refreshEmptinessEvent()},_refreshEmptinessEvent:function(){D.off(this._input(),"input blur",this._toggleEmptinessEventHandler),this._renderEmptinessEvent()},_fieldRenderData:function(){return this.option("value")},_initTemplates:function(){this._templateManager.addDefaultTemplates({dropDownButton:new Ts(function(e){var t=v("<div>").addClass(Nj);v(e.container).append(t)})}),this.callBase()},_renderOpenHandler:function(){var e=this._inputWrapper(),t=me(ct,this.NAME),i=this.option("openOnFieldClick");D.off(e,t),D.on(e,t,this._getInputClickHandler(i)),this.$element().toggleClass($j,i),i&&(this._openOnFieldClickAction=this._createAction(this._openHandler.bind(this)))},_attachFocusOutHandler:function(){nS&&(this._detachFocusOutEvents(),D.on(this._inputWrapper(),me("focusout",this.NAME),e=>{var t=e.relatedTarget,i=this.content?v(this.content()).closest("."+$d):this._$popup;if(t&&this.option("opened")){var n=v(t).closest("."+$d,i).length===0;n&&this.close()}}))},_detachFocusOutEvents:function(){nS&&D.off(this._inputWrapper(),me("focusout",this.NAME))},_getInputClickHandler:function(e){return e?t=>{this._executeOpenAction(t)}:t=>{this._focusInput()}},_openHandler:function(){this._toggleOpenState()},_executeOpenAction:function(e){this._openOnFieldClickAction({event:e})},_keyboardEventBindingTarget:function(){return this._input()},_focusInput:function(){return this.option("disabled")?!1:(this.option("focusStateEnabled")&&!_a(this._input())&&(this._resetCaretPosition(),D.trigger(this._input(),"focus")),!0)},_resetCaretPosition:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this._input().get(0);if(t){var{value:i}=t,n=E(i)&&(e||this._isEditable())?i.length:0;this._caret({start:n,end:n},!0)}},_isEditable:function(){return this.option("acceptCustomValue")},_toggleOpenState:function(e){this._focusInput()&&(this.option("readOnly")||(e=arguments.length?e:!this.option("opened"),this.option("opened",e)))},_renderOpenedState:function(){var e=this.option("opened");e&&this._createPopup(),this.$element().toggleClass(Hj,e),this._setPopupOption("visible",e),this.setAria({expanded:e}),this.setAria("owns",e?this._popupContentId:void 0,this.$element())},_createPopup:function(){this._$popup||(this._$popup=v("<div>").addClass($d).appendTo(this.$element()),this._renderPopup(),this._renderPopupContent())},_renderPopupContent:ee,_renderPopup:function(){var e=O(this._popupConfig(),this._options.cache("dropDownOptions"));this._popup=this._createComponent(this._$popup,pr,e),this._popup.on({showing:this._popupShowingHandler.bind(this),shown:this._popupShownHandler.bind(this),hiding:this._popupHidingHandler.bind(this),hidden:this._popupHiddenHandler.bind(this),contentReady:this._contentReadyHandler.bind(this)}),this._contentReadyHandler(),this._setPopupContentId(this._popup.$content()),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_setPopupContentId(e){this._popupContentId="dx-"+new ri,this.setAria("id",this._popupContentId,e)},_contentReadyHandler:ee,_popupConfig:function(){return{onInitialized:this._popupInitializedHandler(),position:O(this.option("popupPosition"),{of:this.$element()}),visualContainer:this.$element(),showTitle:this.option("dropDownOptions.showTitle"),_ignoreFunctionValueDeprecation:!0,width:()=>fh(this.$element()),height:"auto",shading:!1,wrapperAttr:{class:$d},hideOnParentScroll:!0,hideOnOutsideClick:e=>this._closeOutsideDropDownHandler(e),animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},deferRendering:!1,focusStateEnabled:!1,showCloseButton:!1,dragEnabled:!1,toolbarItems:this._getPopupToolbarItems(),onPositioned:this._popupPositionedHandler.bind(this),fullScreen:!1,contentTemplate:null}},_popupInitializedHandler:function(){return this.option("onPopupInitialized")?e=>{this._popupInitializedAction({popup:e.component})}:null},_dimensionChanged:function(){var e=mC(this.option("dropDownOptions.width"));e===void 0&&this._setPopupOption("width",()=>fh(this.$element()))},_popupPositionedHandler:function(e){e.position&&this._popup.$overlayContent().toggleClass(iS,e.position.v.flip)},_popupShowingHandler:ee,_popupHidingHandler:function(){this.option("opened",!1)},_popupShownHandler:function(){var e;this._openAction();var t=this._popup.$overlayContent(),i=In(t);if(this._label.isVisible()&&t.hasClass(iS)){var n=this._label.$element();ti(t,{top:i.top-parseInt(n.css("fontSize"))})}(e=this._validationMessage)===null||e===void 0||e.option("positionRequest",this._getValidationMessagePositionRequest())},_popupHiddenHandler:function(){var e;this._closeAction(),(e=this._validationMessage)===null||e===void 0||e.option("positionRequest",this._getValidationMessagePositionRequest())},_getValidationMessagePositionRequest:function(){var e="below";if(this._popup&&this._popup.option("visible")){var{top:t}=mi.setup(this.$element()),{top:i}=mi.setup(this._popup.$content());e=t+this.option("popupPosition").offset.v>i?"below":"above"}return e},_closeOutsideDropDownHandler:function(e){var{target:t}=e,i=v(t),n=this.getButton("dropDown"),r=n&&n.$element(),a=!!i.closest(this.$element()).length,o=!!i.closest(r).length,s=!a&&!o;return s},_clean:function(){delete this._openOnFieldClickAction,this._$popup&&(this._$popup.remove(),delete this._$popup,delete this._popup),this.callBase()},_setPopupOption:function(e,t){this._setWidgetOption("_popup",arguments)},_validatedOpening:function(){this.option("readOnly")||this._toggleOpenState(!0)},_getPopupToolbarItems:function(){return this.option("applyValueMode")==="useButtons"?this._popupToolbarItemsConfig():[]},_getFirstPopupElement:function(){return this._popup.$wrapper().find(".dx-popup-done.dx-button")},_getLastPopupElement:function(){return this._popup.$wrapper().find(".dx-popup-cancel.dx-button")},_popupElementTabHandler:function(e){var t=v(e.currentTarget);(e.shiftKey&&t.is(this._getFirstPopupElement())||!e.shiftKey&&t.is(this._getLastPopupElement()))&&(D.trigger(this._input(),"focus"),e.preventDefault())},_popupElementEscHandler:function(){D.trigger(this._input(),"focus"),this.close()},_popupButtonInitializedHandler:function(e){e.component.registerKeyHandler("tab",this._popupElementTabHandler.bind(this)),e.component.registerKeyHandler("escape",this._popupElementEscHandler.bind(this))},_popupToolbarItemsConfig:function(){var e=[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText"),onInitialized:this._popupButtonInitializedHandler.bind(this)}},{shortcut:"cancel",options:{onClick:this._cancelButtonHandler.bind(this),text:this.option("cancelButtonText"),onInitialized:this._popupButtonInitializedHandler.bind(this)}}];return this._applyButtonsLocation(e)},_applyButtonsLocation:function(e){var t=this.option("buttonsLocation"),i=e;if(t!=="default"){var n=Eo(t);F(i,function(r,a){O(a,{toolbar:n[0],location:n[1]})})}return i},_applyButtonHandler:function(){this.close(),this.option("focusStateEnabled")&&this.focus()},_cancelButtonHandler:function(){this.close(),this.option("focusStateEnabled")&&this.focus()},_popupOptionChanged:function(e){var t=pi.getOptionsFromContainer(e);this._setPopupOption(t);var i=Object.keys(t);(i.indexOf("width")!==-1||i.indexOf("height")!==-1)&&this._dimensionChanged()},_renderSubmitElement:function(){this.option("useHiddenSubmitElement")&&(this._$submitElement=v("<input>").attr("type","hidden").appendTo(this.$element()))},_setSubmitValue:function(){this._getSubmitElement().val(this.option("value"))},_getSubmitElement:function(){return this.option("useHiddenSubmitElement")?this._$submitElement:this.callBase()},_dispose:function(){this._detachFocusOutEvents(),this.callBase()},_optionChanged:function(e){var t;switch(e.name){case"width":case"height":this.callBase(e),(t=this._popup)===null||t===void 0||t.repaint();break;case"opened":this._renderOpenedState();break;case"onOpened":case"onClosed":this._initVisibilityActions();break;case"onPopupInitialized":this._initPopupInitializedAction();break;case"fieldTemplate":E(e.value)?this._renderField():this._invalidate();break;case"acceptCustomValue":case"openOnFieldClick":this._invalidate();break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"dropDownOptions":this._popupOptionChanged(e),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;case"popupPosition":break;case"deferRendering":Ke()&&this._createPopup();break;case"applyValueMode":case"applyButtonText":case"cancelButtonText":case"buttonsLocation":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"useHiddenSubmitElement":this._$submitElement&&(this._$submitElement.remove(),this._$submitElement=void 0),this._renderSubmitElement();break;case"rtlEnabled":this._updatePopupPosition(e.value),this.callBase(e);break;default:this.callBase(e)}},open:function(){this.option("opened",!0)},close:function(){this.option("opened",!1)},field:function(){return Fe(this._input())},content:function(){return this._popup?this._popup.content():null}});tt("dxDropDownEditor",CC);var rS=O({},Hu,{_dataExpressionDefaultOptions:function(){return{items:[],dataSource:null,itemTemplate:"item",value:null,valueExpr:"this",displayExpr:void 0}},_initDataExpressions:function(){this._compileValueGetter(),this._compileDisplayGetter(),this._initDynamicTemplates(),this._initDataSource(),this._itemsToDataSource()},_itemsToDataSource:function(){this.option("dataSource")||(this._dataSource=new lr({store:new $s(this.option("items")),pageSize:0}))},_compileDisplayGetter:function(){this._displayGetter=mt(this._displayGetterExpr())},_displayGetterExpr:function(){return this.option("displayExpr")},_compileValueGetter:function(){this._valueGetter=mt(this._valueGetterExpr())},_valueGetterExpr:function(){return this.option("valueExpr")||"this"},_loadValue:function(e){var t=new te;return e=this._unwrappedValue(e),E(e)?(this._loadSingle(this._valueGetterExpr(),e).done((function(i){this._isValueEquals(this._valueGetter(i),e)?t.resolve(i):t.reject()}).bind(this)).fail(function(){t.reject()}),this._loadValueDeferred=t,t.promise()):t.reject().promise()},_rejectValueLoading:function(){var e;(e=this._loadValueDeferred)===null||e===void 0||e.reject({shouldSkipCallback:!0})},_getCurrentValue:function(){return this.option("value")},_unwrappedValue:function(e){var t;return e=(t=e)!==null&&t!==void 0?t:this._getCurrentValue(),e&&this._dataSource&&this._valueGetterExpr()==="this"&&(e=this._getItemKey(e)),Fi.unwrap(e)},_getItemKey:function(e){var t=this._dataSource.key();if(Array.isArray(t)){for(var i={},n=0,r=t.length;n<r;n++)i[t[n]]=e[t[n]];return i}return t&&typeof e=="object"&&(e=e[t]),e},_isValueEquals:function(e,t){var i=this._dataSource&&this._dataSource.key(),n=this._compareValues(e,t);return!n&&i&&E(e)&&E(t)&&(Array.isArray(i)?n=this._compareByCompositeKey(e,t,i):n=this._compareByKey(e,t,i)),n},_compareByCompositeKey:function(e,t,i){var n=He;if(!n(e)||!n(t))return!1;for(var r=0,a=i.length;r<a;r++)if(e[i[r]]!==t[i[r]])return!1;return!0},_compareByKey:function(e,t,i){var n=Fi.unwrap,r=Ft(n(e[i]),e),a=Ft(n(t[i]),t);return this._compareValues(r,a)},_compareValues:function(e,t){return jt(e,!0)===jt(t,!0)},_initDynamicTemplates:ee,_setCollectionWidgetItemTemplate:function(){this._initDynamicTemplates(),this._setCollectionWidgetOption("itemTemplate",this.option("itemTemplate"))},_getCollectionKeyExpr:function(){var e=this.option("valueExpr"),t=Me(e)&&e!=="this"||Ee(e);return t?e:null},_dataExpressionOptionChanged:function(e){switch(e.name){case"items":this._itemsToDataSource(),this._setCollectionWidgetOption("items");break;case"dataSource":this._initDataSource();break;case"itemTemplate":this._setCollectionWidgetItemTemplate();break;case"valueExpr":this._compileValueGetter();break;case"displayExpr":this._compileDisplayGetter(),this._initDynamicTemplates(),this._setCollectionWidgetOption("displayExpr")}}}),aS=qe(),zj=".dx-list-item",Gj="dxListItemData",Uj="dx-dropdownlist-popup-wrapper",Kj="input",jj=["startswith","contains","endwith","notcontains"],oS=Oe.real().platform!=="android",c1=CC.inherit({_supportedKeys:function(){var e=this.callBase();return O({},e,{tab:function(t){if(this._allowSelectItemByTab()){this._saveValueChangeEvent(t);var i=v(this._list.option("focusedElement"));i.length&&this._setSelectedElement(i)}e.tab.apply(this,arguments)},space:ee,home:ee,end:ee})},_allowSelectItemByTab:function(){return this.option("opened")&&this.option("applyValueMode")==="instantly"},_setSelectedElement:function(e){var t=this._valueGetter(this._list._getItemData(e));this._setValue(t)},_setValue:function(e){this.option("value",e)},_getDefaultOptions:function(){return O(this.callBase(),O(rS._dataExpressionDefaultOptions(),{displayValue:void 0,searchEnabled:!1,searchMode:"contains",searchTimeout:500,minSearchLength:0,searchExpr:null,valueChangeEvent:"input change keyup",selectedItem:null,noDataText:ue.format("dxCollectionWidget-noDataText"),onSelectionChanged:null,onItemClick:ee,showDataBeforeSearch:!1,grouped:!1,groupTemplate:"group",popupPosition:{my:"left top",at:"left bottom",offset:{h:0,v:0},collision:"flip"},wrapItemText:!1,useItemTextAsTitle:!1}))},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{popupPosition:{offset:{v:-1}}}},{device:{platform:"generic"},options:{buttonsLocation:"bottom center"}}])},_setOptionsByReference:function(){this.callBase(),O(this._optionsByReference,{value:!0,selectedItem:!0,displayValue:!0})},_init:function(){this.callBase(),this._initDataExpressions(),this._initActions(),this._setListDataSource(),this._validateSearchMode(),this._clearSelectedItem(),this._initItems()},_setListFocusedElementOptionChange:function(){this._list._updateParentActiveDescendant=this._updateActiveDescendant.bind(this)},_initItems:function(){var e=this.option().items;e&&!e.length&&this._dataSource&&(this.option().items=this._dataSource.items())},_initActions:function(){this._initContentReadyAction(),this._initSelectionChangedAction(),this._initItemClickAction()},_initContentReadyAction:function(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initSelectionChangedAction:function(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})},_initItemClickAction:function(){this._itemClickAction=this._createActionByOption("onItemClick")},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({item:new Bh("item")})},_isEditable:function(){return this.callBase()||this.option("searchEnabled")},_saveFocusOnWidget:function(e){this._list&&this._list.initialOption("focusStateEnabled")&&this._focusInput()},_fitIntoRange:function(e,t,i){return e>i?t:e<t?i:e},_items:function(){var e=this._getPlainItems(!this._list&&this._dataSource.items()),t=new Gi(e).filter("disabled","<>",!0).toArray();return t},_calcNextItem:function(e){var t=this._items(),i=this._fitIntoRange(this._getSelectedIndex()+e,0,t.length-1);return t[i]},_getSelectedIndex:function(){var e=this._items(),t=this.option("selectedItem"),i=-1;return F(e,(function(n,r){if(this._isValueEquals(r,t))return i=n,!1}).bind(this)),i},_createPopup:function(){this.callBase(),this._updateCustomBoundaryContainer(),this._popup.$wrapper().addClass(this._popupWrapperClass());var e=this._popup.$content();D.off(e,"mouseup"),D.on(e,"mouseup",this._saveFocusOnWidget.bind(this))},_updateCustomBoundaryContainer:function(){var e=this.option("dropDownOptions.container"),t=e&&v(e);if(t&&t.length&&!Yt(t.get(0))){var i=[].slice.call(t.parents());i.unshift(t.get(0)),F(i,(function(n,r){if(r===v("body").get(0))return!1;if(aS.getComputedStyle(r).overflowY==="hidden")return this._$customBoundaryContainer=v(r),!1}).bind(this))}},_popupWrapperClass:function(){return Uj},_renderInputValue:function(){var e=this._getCurrentValue();return this._rejectValueLoading(),this._loadInputValue(e,this._setSelectedItem.bind(this)).always(this.callBase.bind(this,e))},_loadInputValue:function(e,t){return this._loadItem(e).always(t)},_getItemFromPlain:function(e,t){var i,n;return t&&typeof e!="object"&&(t.itemByValue||(t.itemByValue={},i=this._getPlainItems(),i.forEach(function(r){t.itemByValue[this._valueGetter(r)]=r},this)),n=t.itemByValue[e]),n||(i=this._getPlainItems(),n=Vi(i,(function(r){return this._isValueEquals(this._valueGetter(r),e)}).bind(this))[0]),n},_loadItem:function(e,t){var i=this._getItemFromPlain(e,t);return i!==void 0?new te().resolve(i).promise():this._loadValue(e)},_getPlainItems:function(e){var t=[];e=e||this.option("items")||this._dataSource.items()||[];for(var i=0;i<e.length;i++)e[i]&&e[i].items?t=t.concat(e[i].items):t.push(e[i]);return t},_updateActiveDescendant(){var e,t=this.option("opened"),i=(e=this._list)===null||e===void 0?void 0:e.getFocusedItemId(),n=v("#".concat(i)).length>0,r=t&&n&&i;this.setAria({activedescendant:r||null})},_setSelectedItem:function(e){var t=this._displayValue(e);this.option("selectedItem",Ft(e,null)),this.option("displayValue",t)},_displayValue:function(e){return this._displayGetter(e)},_refreshSelected:function(){var e={};this._listItemElements().each((function(t,i){var n=v(i),r=this._valueGetter(n.data(Gj)),a=this._isSelectedValue(r,e);a?this._list.selectItem(n):this._list.unselectItem(n)}).bind(this))},_popupShownHandler:function(){this.callBase(),this._setFocusPolicy()},_setFocusPolicy:function(){!this.option("focusStateEnabled")||!this._list||this._list.option("focusedElement",null)},_isSelectedValue:function(e){return this._isValueEquals(e,this.option("value"))},_validateSearchMode:function(){var e=this.option("searchMode"),t=e.toLowerCase();if(!jj.includes(t))throw Je.Error("E1019",e)},_clearSelectedItem:function(){this.option("selectedItem",null)},_processDataSourceChanging:function(){this._setListDataSource(),this._renderInputValue().fail((function(){this._isCustomValueAllowed()||this._clearSelectedItem()}).bind(this))},_isCustomValueAllowed:function(){return this.option("displayCustomValue")},reset:function(){this.callBase(),this._clearFilter(),this._clearSelectedItem()},_listItemElements:function(){return this._$list?this._$list.find(zj):v()},_popupConfig:function(){return O(this.callBase(),{templatesRenderAsynchronously:!1,autoResizeEnabled:!1,maxHeight:this._getMaxHeight.bind(this)})},_renderPopupContent:function(){this.callBase(),this._renderList()},_getKeyboardListeners(){var e=this._canListHaveFocus();return this.callBase().concat([!e&&this._list])},_setAriaTargetForList:function(){this._list._getAriaTarget=this._getAriaTarget.bind(this)},_renderList:function(){this._listId="dx-"+new ri()._value;var e=this._$list=v("<div>").attr("id",this._listId).appendTo(this._popup.$content());this._list=this._createComponent(e,Bo,this._listConfig()),this._refreshList(),this._setAriaTargetForList(),this._list.option("_listAttributes",{role:"combobox"}),this._renderPreventBlurOnListClick(),this._setListFocusedElementOptionChange()},_renderPreventBlurOnListClick:function(){var e=me("mousedown","dxDropDownList");D.off(this._$list,e),D.on(this._$list,e,t=>t.preventDefault())},_renderOpenedState:function(){this.callBase(),this._list&&this._updateActiveDescendant(),this.setAria({controls:this._list&&this._listId,owns:this._popup&&this._popupContentId})},_setDefaultAria:function(){this.setAria({haspopup:"listbox",autocomplete:"list"})},_refreshList:function(){this._list&&this._shouldRefreshDataSource()&&this._setListDataSource()},_shouldRefreshDataSource:function(){var e=!!this._list.option("dataSource");return e!==this._needPassDataSourceToList()},_isDesktopDevice:function(){return Oe.real().deviceType==="desktop"},_listConfig:function(){var e={selectionMode:"single",_templates:this.option("_templates"),templateProvider:this.option("templateProvider"),noDataText:this.option("noDataText"),grouped:this.option("grouped"),wrapItemText:this.option("wrapItemText"),useItemTextAsTitle:this.option("useItemTextAsTitle"),onContentReady:this._listContentReadyHandler.bind(this),itemTemplate:this.option("itemTemplate"),indicateLoading:!1,keyExpr:this._getCollectionKeyExpr(),displayExpr:this._displayGetterExpr(),groupTemplate:this.option("groupTemplate"),onItemClick:this._listItemClickAction.bind(this),dataSource:this._getDataSource(),_revertPageOnEmptyLoad:!0,hoverStateEnabled:this._isDesktopDevice()?this.option("hoverStateEnabled"):!1,focusStateEnabled:this._isDesktopDevice()?this.option("focusStateEnabled"):!1};return this._canListHaveFocus()||(e.tabIndex=null),e},_canListHaveFocus:()=>!1,_getDataSource:function(){return this._needPassDataSourceToList()?this._dataSource:null},_dataSourceOptions:function(){return{paginate:!1}},_getGroupedOption:function(){return this.option("grouped")},_dataSourceFromUrlLoadMode:function(){return"raw"},_listContentReadyHandler:function(){this._list=this._list||this._$list.dxList("instance"),this.option("deferRendering")||this._refreshSelected(),this._dimensionChanged(),this._contentReadyAction()},_setListOption:function(e,t){this._setWidgetOption("_list",arguments)},_listItemClickAction:function(e){this._listItemClickHandler(e),this._itemClickAction(e)},_listItemClickHandler:ee,_setListDataSource:function(){this._list&&(this._setListOption("dataSource",this._getDataSource()),this._needPassDataSourceToList()||this._setListOption("items",[]))},_needPassDataSourceToList:function(){return this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded()},_isMinSearchLengthExceeded:function(){return this._searchValue().toString().length>=this.option("minSearchLength")},_needClearFilter:function(){return this._canKeepDataSource()?!1:this._needPassDataSourceToList()},_canKeepDataSource:function(){var e,t=this._isMinSearchLengthExceeded();return((e=this._dataSource)===null||e===void 0?void 0:e.isLoaded())&&this.option("showDataBeforeSearch")&&this.option("minSearchLength")&&!t&&!this._isLastMinSearchLengthExceeded},_searchValue:function(){return this._input().val()||""},_getSearchEvent:function(){return me(Kj,this.NAME+"Search")},_getCompositionStartEvent:function(){return me("compositionstart",this.NAME+"CompositionStart")},_getCompositionEndEvent:function(){return me("compositionend",this.NAME+"CompositionEnd")},_getSetFocusPolicyEvent:function(){return me("input",this.NAME+"FocusPolicy")},_renderEvents:function(){this.callBase(),D.on(this._input(),this._getSetFocusPolicyEvent(),()=>{this._setFocusPolicy()}),this._shouldRenderSearchEvent()&&(D.on(this._input(),this._getSearchEvent(),e=>{this._searchHandler(e)}),oS&&(D.on(this._input(),this._getCompositionStartEvent(),()=>{this._isTextCompositionInProgress(!0)}),D.on(this._input(),this._getCompositionEndEvent(),e=>{this._isTextCompositionInProgress(void 0),this._searchHandler(e,this._searchValue())})))},_shouldRenderSearchEvent:function(){return this.option("searchEnabled")},_refreshEvents:function(){D.off(this._input(),this._getSearchEvent()),D.off(this._input(),this._getSetFocusPolicyEvent()),oS&&(D.off(this._input(),this._getCompositionStartEvent()),D.off(this._input(),this._getCompositionEndEvent())),this.callBase()},_isTextCompositionInProgress:function(e){if(arguments.length)this._isTextComposition=e;else return this._isTextComposition},_searchHandler:function(e,t){if(!this._isTextCompositionInProgress()){if(!this._isMinSearchLengthExceeded()){this._searchCanceled();return}var i=this.option("searchTimeout");i?(this._clearSearchTimer(),this._searchTimer=setTimeout(()=>{this._searchDataSource(t)},i)):this._searchDataSource(t)}},_searchCanceled:function(){this._clearSearchTimer(),this._needClearFilter()&&this._filterDataSource(null),this._refreshList()},_searchDataSource:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._searchValue();this._filterDataSource(e)},_filterDataSource:function(e){this._clearSearchTimer();var t=this._dataSource;t&&(t.searchExpr(this.option("searchExpr")||this._displayGetterExpr()),t.searchOperation(this.option("searchMode")),t.searchValue(e),t.load().done(this._dataSourceFiltered.bind(this,e)))},_clearFilter:function(){var e=this._dataSource;e&&e.searchValue()&&e.searchValue(null)},_dataSourceFiltered:function(){this._isLastMinSearchLengthExceeded=this._isMinSearchLengthExceeded(),this._refreshList(),this._refreshPopupVisibility()},_shouldOpenPopup:function(){return this._hasItemsToShow()},_refreshPopupVisibility:function(){if(!(this.option("readOnly")||!this._searchValue())){var e=this._shouldOpenPopup();e&&!this._isFocused()||(this.option("opened",e),e&&this._dimensionChanged())}},_dataSourceChangedHandler:function(e){this._dataSource.pageIndex()===0?this.option().items=e:this.option().items=this.option().items.concat(e)},_hasItemsToShow:function(){var e=this._dataSource&&this._dataSource.items()||[],t=e.length,i=this._needPassDataSourceToList();return!!(i&&t)},_clearSearchTimer:function(){clearTimeout(this._searchTimer),delete this._searchTimer},_popupShowingHandler:function(){this._dimensionChanged()},_dimensionChanged:function(){this.callBase(arguments),this._popup&&this._updatePopupDimensions()},_needPopupRepaint:function(){if(!this._dataSource)return!1;var e=this._dataSource.pageIndex(),t=E(this._pageIndex)&&e<=this._pageIndex;return this._pageIndex=e,t},_updatePopupDimensions:function(){this._needPopupRepaint()&&this._popup.repaint(),this._list&&this._list.updateDimensions()},_getMaxHeight:function(){var e=this.$element(),t=this._$customBoundaryContainer,i=e.offset().top-(t?t.offset().top:0),n=at(aS),r=t?Math.min(at(t),n):n,a=Math.max(i,r-i-at(e));return Math.min(.5*r,a)},_clean:function(){this._list&&delete this._list,delete this._isLastMinSearchLengthExceeded,this.callBase()},_dispose:function(){this._clearSearchTimer(),this.callBase()},_setCollectionWidgetOption:function(){this._setListOption.apply(this,arguments)},_setSubmitValue:function(){var e=this.option("value"),t=this._shouldUseDisplayValue(e)?this._displayGetter(e):e;this._getSubmitElement().val(t)},_shouldUseDisplayValue:function(e){return this.option("valueExpr")==="this"&&He(e)},_optionChanged:function(e){switch(this._dataExpressionOptionChanged(e),e.name){case"hoverStateEnabled":case"focusStateEnabled":this._isDesktopDevice()&&this._setListOption(e.name,e.value),this.callBase(e);break;case"items":this.option("dataSource")||this._processDataSourceChanging();break;case"dataSource":this._processDataSourceChanging();break;case"valueExpr":this._renderValue(),this._setListOption("keyExpr",this._getCollectionKeyExpr());break;case"displayExpr":this._renderValue(),this._setListOption("displayExpr",this._displayGetterExpr());break;case"searchMode":this._validateSearchMode();break;case"minSearchLength":this._refreshList();break;case"searchEnabled":case"showDataBeforeSearch":case"searchExpr":this._invalidate();break;case"onContentReady":this._initContentReadyAction();break;case"onSelectionChanged":this._initSelectionChangedAction();break;case"onItemClick":this._initItemClickAction();break;case"grouped":case"groupTemplate":case"wrapItemText":case"noDataText":case"useItemTextAsTitle":this._setListOption(e.name);break;case"displayValue":this.option("text",e.value);break;case"itemTemplate":case"searchTimeout":break;case"selectedItem":e.previousValue!==e.value&&this._selectionChangedAction({selectedItem:e.value});break;default:this.callBase(e)}}}).include(rS,BO);tt("dxDropDownList",c1);var qj="dx-radiobutton",sS="dx-radiobutton-icon",Yj="dx-radiobutton-icon-dot",Xj="dx-radiobutton-checked",Zj="dx-radiobutton-icon-checked",h1=Gn.inherit({_supportedKeys:function(){return O(this.callBase(),{space:function(e){e.preventDefault(),this._clickAction({event:e})}})},_getDefaultOptions:function(){return O(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,value:!1})},_canValueBeChangedByClick:function(){return!0},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}}])},_init:function(){this.callBase(),this.$element().addClass(qj)},_initMarkup:function(){this.callBase(),this._renderIcon(),this._renderCheckedState(this.option("value")),this._renderClick(),this.setAria("role","radio")},_renderIcon:function(){this._$icon=v("<div>").addClass(sS),v("<div>").addClass(Yj).appendTo(this._$icon),this.$element().append(this._$icon)},_renderCheckedState:function(e){this.$element().toggleClass(Xj,e).find("."+sS).toggleClass(Zj,e),this.setAria("checked",e)},_renderClick:function(){var e=me(ct,this.NAME);this._clickAction=this._createAction((function(t){this._clickHandler(t.event)}).bind(this)),D.off(this.$element(),e),D.on(this.$element(),e,(function(t){this._clickAction({event:t})}).bind(this))},_clickHandler:function(e){this._saveValueChangeEvent(e),this.option("value",!0)},_optionChanged:function(e){switch(e.name){case"value":this._renderCheckedState(e.value),this.callBase(e);break;default:this.callBase(e)}}});tt("dxRadioButton",h1);var yC="dxListEditDecorator",Qj=me(Jh,yC),Jj=me(ef,yC),eq=me(Ju,yC),tq=nt.inherit({ctor:function(e){this._list=e,this._init()},_init:ee,_shouldHandleSwipe:!1,_attachSwipeEvent:function(e){var t={itemSizeFunc:(function(){return this._clearSwipeCache&&(this._itemWidthCache=$e(this._list.$element()),this._clearSwipeCache=!1),this._itemWidthCache}).bind(this)};D.on(e.$itemElement,Qj,t,this._itemSwipeStartHandler.bind(this)),D.on(e.$itemElement,Jj,this._itemSwipeUpdateHandler.bind(this)),D.on(e.$itemElement,eq,this._itemSwipeEndHandler.bind(this))},_itemSwipeStartHandler:function(e){var t=v(e.currentTarget);if(t.is(".dx-state-disabled, .dx-state-disabled *")){e.cancel=!0;return}clearTimeout(this._list._inkRippleTimer),this._swipeStartHandler(t,e)},_itemSwipeUpdateHandler:function(e){var t=v(e.currentTarget);this._swipeUpdateHandler(t,e)},_itemSwipeEndHandler:function(e){var t=v(e.currentTarget);this._swipeEndHandler(t,e),this._clearSwipeCache=!0},beforeBag:ee,afterBag:ee,_commonOptions:function(){return{activeStateEnabled:this._list.option("activeStateEnabled"),hoverStateEnabled:this._list.option("hoverStateEnabled"),focusStateEnabled:this._list.option("focusStateEnabled")}},modifyElement:function(e){this._shouldHandleSwipe&&(this._attachSwipeEvent(e),this._clearSwipeCache=!0)},afterRender:ee,handleClick:ee,handleKeyboardEvents:ee,handleEnterPressing:ee,handleContextMenu:ee,_swipeStartHandler:ee,_swipeUpdateHandler:ee,_swipeEndHandler:ee,visibilityChange:ee,getExcludedSelectors:ee,dispose:ee}),lS="dx-list-select-decorator-enabled",iq="dx-list-select-all",nq="dx-list-select-all-checkbox",rq="dx-list-select-all-label",aq="dx-list-select-checkbox-container",oq="dx-list-select-checkbox",sq="dx-list-select-radiobutton-container",lq="dx-list-select-radiobutton",uq="dx-state-focused",uS=me(ct,"dxListEditDecorator");f9("selection","default",tq.inherit({_init:function(){this.callBase.apply(this,arguments);var e=this._list.option("selectionMode");this._singleStrategy=e==="single",this._containerClass=this._singleStrategy?sq:aq,this._controlClass=this._singleStrategy?lq:oq,this._controlWidget=this._singleStrategy?h1:yo,this._list.$element().addClass(lS)},beforeBag:function(e){var t=e.$itemElement,i=e.$container.addClass(this._containerClass),n=v("<div>").addClass(this._controlClass).appendTo(i);new this._controlWidget(n,O(this._commonOptions(),{value:this._isSelected(t),focusStateEnabled:!1,hoverStateEnabled:!1,onValueChanged:(function(r){r.event&&this._list._saveSelectionChangeEvent(r.event),this._processCheckedState(t,r.value),r.event&&r.event.stopPropagation()}).bind(this)}))},modifyElement:function(e){this.callBase.apply(this,arguments);var t=e.$itemElement,i=this._controlWidget.getInstance(t.find("."+this._controlClass));D.on(t,"stateChanged",(function(n,r){i.option("value",r)}).bind(this))},_updateSelectAllState:function(){this._$selectAll&&this._selectAllCheckBox.option("value",this._list.isSelectAll())},afterRender:function(){this._list.option("selectionMode")==="all"&&(this._$selectAll?this._updateSelectAllState():this._renderSelectAll())},handleKeyboardEvents:function(e,t){var i=!t,n=this._list,r=this._$selectAll,a=n._getLastItemIndex(),o=t&&e===0||i&&e===a,s=!!r;return s&&o?(n.option("focusedElement",r),n.scrollToItem(n.option("focusedElement")),!0):!1},handleEnterPressing:function(e){if(this._$selectAll&&this._$selectAll.hasClass(uq))return e.target=this._$selectAll.get(0),this._list._saveSelectionChangeEvent(e),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value")),!0},_renderSelectAll:function(){var e=this._$selectAll=v("<div>").addClass(iq),t=this._list,i=t._supportedKeys().downArrow.bind(t);this._selectAllCheckBox=t._createComponent(v("<div>").addClass(nq).appendTo(e),yo,{focusStateEnabled:!1,hoverStateEnabled:!1}),this._selectAllCheckBox.registerKeyHandler("downArrow",i),v("<div>").addClass(rq).text(this._list.option("selectAllText")).appendTo(e),this._list.itemsContainer().prepend(e),this._updateSelectAllState(),this._attachSelectAllHandler()},_attachSelectAllHandler:function(){this._selectAllCheckBox.option("onValueChanged",this._selectAllHandler.bind(this)),D.off(this._$selectAll,uS),D.on(this._$selectAll,uS,this._selectAllClickHandler.bind(this))},_selectAllHandler:function(e){e.event&&e.event.stopPropagation();var t=this._selectAllCheckBox.option("value");e.event&&this._list._saveSelectionChangeEvent(e.event),t===!0?this._selectAllItems():t===!1&&this._unselectAllItems(),this._list._createActionByOption("onSelectAllValueChanged")({value:t})},_checkSelectAllCapability:function(){var e=this._list,t=e.getDataSource();return e.option("selectAllMode")==="allPages"&&e.option("grouped")&&(!t||!t.group())?(Je.log("W1010"),!1):!0},_selectAllItems:function(){this._checkSelectAllCapability()&&this._list._selection.selectAll(this._list.option("selectAllMode")==="page")},_unselectAllItems:function(){this._checkSelectAllCapability()&&this._list._selection.deselectAll(this._list.option("selectAllMode")==="page")},_selectAllClickHandler:function(e){this._list._saveSelectionChangeEvent(e),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value"))},_isSelected:function(e){return this._list.isItemSelected(e)},_processCheckedState:function(e,t){t?this._list.selectItem(e):this._list.unselectItem(e)},dispose:function(){this._disposeSelectAll(),this._list.$element().removeClass(lS),this.callBase.apply(this,arguments)},_disposeSelectAll:function(){this._$selectAll&&(this._$selectAll.remove(),this._$selectAll=null)}}));var dq=".dx-state-disabled",cq="dx-selectbox",hq="dx-selectbox-popup",fq="dx-selectbox-container",dS="dx-selectbox-popup-wrapper",xC=c1.inherit({_supportedKeys:function(){var e=this,t=this.callBase(),i=function(r){var a=this._isEditable();a?this._valueSubstituted()&&(this._preventFiltering=!0):this.option("showClearButton")&&(r.preventDefault(),this.reset()),this._savedTextRemoveEvent=r,this._preventSubstitution=!0},n=function(){e.option("searchEnabled")&&e._valueSubstituted()&&e._searchHandler()};return O({},t,{tab:function(){this.option("opened")&&this.option("applyValueMode")==="instantly"&&this._resetCaretPosition(!0),t.tab&&t.tab.apply(this,arguments),this._cancelSearchIfNeed()},upArrow:function(r){if(t.upArrow&&t.upArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(r),!0},downArrow:function(r){if(t.downArrow&&t.downArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(r),!0},leftArrow:function(){n(),t.leftArrow&&t.leftArrow.apply(this,arguments)},rightArrow:function(){n(),t.rightArrow&&t.rightArrow.apply(this,arguments)},home:function(){n(),t.home&&t.home.apply(this,arguments)},end:function(){n(),t.end&&t.end.apply(this,arguments)},escape:function(){var r=t.escape&&t.escape.apply(this,arguments);return this._cancelEditing(),r??!0},enter:function(r){var a=this.option("opened"),o=this._input().val().trim(),s=o&&this._list&&!this._list.option("focusedElement");if(!o&&E(this.option("value"))&&this.option("allowClearing"))this._saveValueChangeEvent(r),this.option({selectedItem:null,value:null}),this.close();else{if(this.option("acceptCustomValue"))return r.preventDefault(),s&&(a&&this._toggleOpenState(),this._valueChangeEventHandler(r)),a;if(t.enter&&t.enter.apply(this,arguments))return a}},space:function(r){var a=this.option("opened"),o=this.option("searchEnabled"),s=this.option("acceptCustomValue");if(!(!a||o||s))return r.preventDefault(),this._valueChangeEventHandler(r),!0},backspace:i,del:i})},_getDefaultOptions:function(){return O(this.callBase(),{placeholder:ue.format("Select"),fieldTemplate:null,valueChangeEvent:"change",acceptCustomValue:!1,onCustomItemCreating:function(e){E(e.customItem)||(e.customItem=e.text)},showSelectionControls:!1,allowClearing:!0,tooltipEnabled:!1,openOnFieldClick:!0,showDropDownButton:!0,displayCustomValue:!1,useHiddenSubmitElement:!0})},_init:function(){this.callBase(),this._initCustomItemCreatingAction()},_initMarkup:function(){this.$element().addClass(cq),this._renderTooltip(),this.callBase(),this._$container.addClass(fq)},_createPopup:function(){this.callBase(),this._popup.$element().addClass(hq),this._popup.$overlayContent().attr("tabindex",-1)},_popupWrapperClass:function(){return this.callBase()+" "+dS},_cancelEditing:function(){!this.option("searchEnabled")&&this._list&&(this._focusListElement(null),this._updateField(this.option("selectedItem")))},_renderOpenedState:function(){this.callBase(),this.option("opened")&&(this._scrollToSelectedItem(),this._focusSelectedElement())},_focusSelectedElement:function(){var e,t=this._searchValue();if(!t){this._focusListElement(null);return}var{items:i,selectedItem:n}=this.option(),r=this._list._itemElements(),a=(e=i==null?void 0:i.indexOf(n))!==null&&e!==void 0?e:-1,o=a!==-1&&!this._isCustomItemSelected()?r.eq(a):null;this._focusListElement(o)},_renderFocusedElement:function(){if(this._list){var e=this._searchValue();if(!e||this.option("acceptCustomValue")){this._focusListElement(null);return}var t=this._list._itemElements(),i=t.not(dq).eq(0);this._focusListElement(i)}},_focusListElement:function(e){this._preventInputValueRender=!0,this._list.option("focusedElement",Fe(e)),delete this._preventInputValueRender},_scrollToSelectedItem:function(){this._list&&this._list.scrollToItem(this._list.option("selectedItem"))},_listContentReadyHandler:function(){this.callBase();var e=this._dataSource&&this._dataSource.paginate();e&&this._needPopupRepaint()||this._scrollToSelectedItem()},_renderValue:function(){return this._renderInputValue(),this._setSubmitValue(),new te().resolve()},_renderInputValue:function(){return this.callBase().always((function(){this._renderInputValueAsync()}).bind(this))},_renderInputValueAsync:function(){this._renderTooltip(),this._renderInputValueImpl().always((function(){this._refreshSelected()}).bind(this))},_renderInputValueImpl:function(){return this._renderField(),new te().resolve()},_setNextItem:function(e){var t=this._calcNextItem(e),i=this._valueGetter(t);this._setValue(i)},_setNextValue:function(e){var t=this._dataSource.isLoaded()?new te().resolve():this._dataSource.load();t.done((function(){var i=this._getSelectedIndex(),n=this._dataSource.pageSize(),r=this._dataSource.isLastPage(),a=i===this._items().length-1;this._saveValueChangeEvent(e);var o=Nt(e)==="downArrow"?1:-1;n&&!r&&a&&o>0?(this._popup||this._createPopup(),this._dataSource.isLoading()||this._list._loadNextPage().done(this._setNextItem.bind(this,o))):this._setNextItem(o)}).bind(this))},_setSelectedItem:function(e){var t=!this._isCustomValueAllowed()&&e===void 0;this.callBase(t?null:e),!t&&(!this._isEditable()||this._isCustomItemSelected())&&this._setListOption("selectedItem",this.option("selectedItem"))},_isCustomValueAllowed:function(){return this.option("acceptCustomValue")||this.callBase()},_displayValue:function(e){return e=!E(e)&&this._isCustomValueAllowed()?this.option("value"):e,this.callBase(e)},_listConfig:function(){var e=O(this.callBase(),{pageLoadMode:"scrollBottom",onSelectionChanged:this._getSelectionChangeHandler(),selectedItem:this.option("selectedItem"),onFocusedItemChanged:this._listFocusedItemChangeHandler.bind(this)});return this.option("showSelectionControls")&&O(e,{showSelectionControls:!0,selectionByClick:!0}),e},_listFocusedItemChangeHandler:function(e){if(!this._preventInputValueRender){var t=e.component,i=v(t.option("focusedElement")),n=t._getItemData(i);this._updateField(n)}},_updateField:function(e){var t=this._getTemplateByOption("fieldTemplate");if(!(t&&this.option("fieldTemplate"))){var i=this._displayGetter(e);this.option("text",i),this._renderDisplayText(i);return}this._renderField()},_getSelectionChangeHandler:function(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):ee},_selectionChangeHandler:function(e){F(e.addedItems||[],(function(t,i){this._setValue(this._valueGetter(i))}).bind(this))},_getActualSearchValue:function(){return this._dataSource.searchValue()},_toggleOpenState:function(e){if(!this.option("disabled")){if(e=arguments.length?e:!this.option("opened"),!e&&!this._shouldClearFilter()&&this._restoreInputText(!0),this._wasSearch()&&e){this._wasSearch(!1);var t=this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded();if(t&&this._dataSource){if(this._searchTimer)return;var i=this._getActualSearchValue();i&&this._wasSearch(!0),this._filterDataSource(i||null)}else this._setListOption("items",[])}e&&this._scrollToSelectedItem(),this.callBase(e)}},_renderTooltip:function(){this.option("tooltipEnabled")&&this.$element().attr("title",this.option("displayValue"))},_renderDimensions:function(){this.callBase(),this._dimensionChanged()},_isValueEqualInputText:function(){var e=this.option("selectedItem");if(e===null)return!1;var t=this._displayGetter(e),i=t?String(t):"",n=this._searchValue();return i===n},_popupHidingHandler:function(){this._isValueEqualInputText()&&this._cancelEditing(),this.callBase()},_popupHiddenHandler:function(){this.callBase(),this._shouldCancelSearch()&&(this._wasSearch(!1),this._searchCanceled(),this._shouldCancelSearch(!1))},_restoreInputText:function(e){this.option("readOnly")||this._loadItemDeferred&&this._loadItemDeferred.always((function(){var{selectedItem:t,text:i}=this.option();if(this.option("acceptCustomValue")){e||(this._updateField(t??this._createCustomItem(i)),this._clearFilter());return}if(this.option("searchEnabled")&&!this._searchValue()&&this.option("allowClearing")){this._clearTextValue();return}this._isValueEqualInputText()||this._renderInputValue().always((function(n){var r=Ft(n,t);this._setSelectedItem(r),this._updateField(r),this._clearFilter()}).bind(this))}).bind(this))},_focusOutHandler:function(e){if(!this._preventNestedFocusEvent(e)){var t=this._isOverlayNestedTarget(e.relatedTarget);t||(this._restoreInputText(),this._clearSearchTimer()),this._cancelSearchIfNeed(e)}e.target=this._input().get(0),this.callBase(e)},_cancelSearchIfNeed:function(e){var{searchEnabled:t}=this.option(),i=this._isOverlayNestedTarget(e==null?void 0:e.relatedTarget),n=this._wasSearch()&&t&&!i;if(n){var r,a=(r=this._popup)===null||r===void 0?void 0:r._hideAnimationProcessing;this._clearSearchTimer(),a?this._shouldCancelSearch(!0):(this._wasSearch(!1),this._searchCanceled())}},_shouldCancelSearch:function(e){if(!arguments.length)return this._shouldCancelSearchValue;this._shouldCancelSearchValue=e},_isOverlayNestedTarget:function(e){return!!v(e).closest(".".concat(dS)).length},_clearTextValue:function(){this.option("selectedItem")&&(this._savedTextRemoveEvent&&this._saveValueChangeEvent(this._savedTextRemoveEvent),this.option("value",null)),delete this._savedTextRemoveEvent},_shouldOpenPopup:function(){return this._needPassDataSourceToList()&&this._wasSearch()},_isFocused:function(){var e=fe.getActiveElement();return this.callBase()&&v(e).closest(this._input()).length>0},_renderValueChangeEvent:function(){this._isEditable()&&this.callBase()},_fieldRenderData:function(){var e=this._list&&this.option("opened")&&v(this._list.option("focusedElement"));return e&&e.length?this._list._getItemData(e):this.option("selectedItem")},_isSelectedValue:function(e){return this._isValueEquals(e,this.option("value"))},_shouldCloseOnItemClick:function(){return!(this.option("showSelectionControls")&&this.option("selectionMode")!=="single")},_listItemClickHandler:function(e){var t=this._getCurrentValue();this._focusListElement(v(e.itemElement)),this._saveValueChangeEvent(e.event),this._completeSelection(this._valueGetter(e.itemData)),this._shouldCloseOnItemClick()&&this.option("opened",!1),this.option("searchEnabled")&&t===this._valueGetter(e.itemData)&&this._updateField(e.itemData),this._shouldClearFilter()&&this._cancelSearchIfNeed()},_shouldClearFilter:function(){return this._wasSearch()},_completeSelection:function(e){this._setValue(e)},_loadItem:function(e,t){var i=this,n=new te;return this.callBase(e,t).done((function(r){n.resolve(r)}).bind(this)).fail((function(r){if(!(r!=null&&r.shouldSkipCallback)){var a=i.option("selectedItem");i.option("acceptCustomValue")&&e===i._valueGetter(a)?n.resolve(a):n.reject()}}).bind(this)),n.promise()},_loadInputValue:function(e,t){return this._loadItemDeferred=this._loadItem(e).always(t),this._loadItemDeferred},_isCustomItemSelected:function(){var e=this.option("selectedItem"),t=this._searchValue(),i=this._displayGetter(e);return!i||t!==i.toString()},_valueChangeEventHandler:function(e){this.option("acceptCustomValue")&&this._isCustomItemSelected()&&!this._isValueChanging&&(this._isValueChanging=!0,this._customItemAddedHandler(e),this._isValueChanging=!1)},_initCustomItemCreatingAction:function(){this._customItemCreatingAction=this._createActionByOption("onCustomItemCreating")},_createCustomItem:function(e){var t={text:e},i=this._customItemCreatingAction(t),n=Ft(i,t.customItem);return E(i)&&_t.log("W0015","onCustomItemCreating","customItem"),n},_customItemAddedHandler:function(e){var t=this._searchValue(),i=this._createCustomItem(t);if(this._saveValueChangeEvent(e),i===void 0)throw this._renderValue(),_t.Error("E0121");xu(i)?gi(i).done(this._setCustomItem.bind(this)).fail(this._setCustomItem.bind(this,null)):this._setCustomItem(i)},_setCustomItem:function(e){this._disposed||(e=e||null,this.option("selectedItem",e),this._cancelSearchIfNeed(),this._setValue(this._valueGetter(e)),this._renderDisplayText(this._displayGetter(e)))},_clearValueHandler:function(e){return this._preventFiltering=!0,this.callBase(e),this._searchCanceled(),!1},_wasSearch:function(e){if(!arguments.length)return!!this._wasSearchValue;this._wasSearchValue=e},_searchHandler:function(){if(this._preventFiltering){delete this._preventFiltering;return}this._needPassDataSourceToList()&&this._wasSearch(!0),this.callBase(arguments)},_dataSourceFiltered:function(e){this.callBase(),e!==null&&(this._renderInputSubstitution(),this._renderFocusedElement())},_valueSubstituted:function(){var e=this._input().get(0),t=this._searchValue().length,i=e.selectionStart===0&&e.selectionEnd===t,n=e.selectionStart!==e.selectionEnd,r=t===e.selectionEnd;return this._wasSearch()&&n&&!i&&r&&this._shouldSubstitutionBeRendered()},_shouldSubstitutionBeRendered:function(){return!this._preventSubstitution&&this.option("searchEnabled")&&!this.option("acceptCustomValue")&&this.option("searchMode")==="startswith"},_renderInputSubstitution:function(){if(!this._shouldSubstitutionBeRendered()){delete this._preventSubstitution;return}var e=this._list&&this._getPlainItems(this._list.option("items"))[0];if(e){var t=this._input(),i=t.val().length;if(i!==0){var n=t.get(0),r=this._displayGetter(e).toString();n.value=r,this._caret({start:i,end:r.length})}}},_dispose:function(){this._renderInputValueAsync=ee,delete this._loadItemDeferred,this.callBase()},_optionChanged:function(e){switch(e.name){case"onCustomItemCreating":this._initCustomItemCreatingAction();break;case"tooltipEnabled":this._renderTooltip();break;case"displayCustomValue":case"acceptCustomValue":case"showSelectionControls":this._invalidate();break;case"allowClearing":break;default:this.callBase(e)}}});tt("dxSelectBox",xC);var cS=e=>e.getMonth()+1,hS=(e,t)=>{var i=e.getDate(),n=pu("M",e),r=Di(parseInt(t),n.min,n.max);e.setMonth(r-1,1);var{min:a,max:o}=pu("dM",e),s=Di(i,a,o);e.setDate(s)},pq={a:e=>e.getHours()<12?0:1,E:"getDay",y:"getFullYear",M:cS,L:cS,d:"getDate",H:"getHours",h:"getHours",m:"getMinutes",s:"getSeconds",S:"getMilliseconds"},vq=O({},q2(),{a:(e,t)=>{var i=e.getHours(),n=i>=12;n!==!!parseInt(t)&&e.setHours((i+12)%24)},d:(e,t)=>{var i=pu("dM",e).max;t>i&&e.setMonth(e.getMonth()+1),e.setDate(t)},h:(e,t)=>{var i=e.getHours()>=12;e.setHours(+t%12+(i?12:0))},M:hS,L:hS,E:(e,t)=>{t<0||e.setDate(e.getDate()-e.getDay()+parseInt(t))},y:(e,t)=>{var i=e.getFullYear(),n=String(t).length,r=String(pu("y",e).max).length,a=parseInt(String(i).substr(0,r-n)+t);e.setFullYear(a)}}),_q=e=>pq[e]||(()=>e),gq=(e,t)=>{for(var i=t.regexp.exec(e),n=0,r=0,a=[],o=function(l){n=r,r=n+i[l].length;var u=t.patterns[l-1].replace(/^'|'$/g,""),d=_q(u[0]);a.push({index:l-1,isStub:u===i[l],caret:{start:n,end:r},pattern:u,text:i[l],limits:function(){for(var c=arguments.length,h=new Array(c),f=0;f<c;f++)h[f]=arguments[f];return pu(u[0],...h)},setter:vq[u[0]]||ee,getter:d})},s=1;s<i.length;s++)o(s);return a},pu=(e,t,i)=>{var n={y:{min:0,max:9999},M:{min:1,max:12},L:{min:1,max:12},d:{min:1,max:31},dM:{min:1,max:new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},E:{min:0,max:6},H:{min:0,max:23},h:{min:0,max:23},m:{min:0,max:59},s:{min:0,max:59},S:{min:0,max:999},a:{min:0,max:1}};return n[i||e]||n.getAmPm},mq=(e,t)=>{for(var i=0;i<e.length;i++){var n=e[i].caret.end>=t;if(!e[i].isStub&&n)return i}return null},Zp=["year","day","month","day"],fS=["hours","minutes","seconds","milliseconds"],f1=6e4,p1=60*f1*24,Cq=365*p1,yq=function(e){var t=typeof e;return t==="string"?"format":t==="object"&&e.type!==void 0?e.type:null},ht={SUPPORTED_FORMATS:["date","time","datetime"],ONE_MINUTE:f1,ONE_DAY:p1,ONE_YEAR:Cq,MIN_DATEVIEW_DEFAULT_DATE:new Date(1900,0,1),MAX_DATEVIEW_DEFAULT_DATE:function(){var e=new Date;return new Date(e.getFullYear()+50,e.getMonth(),e.getDate(),23,59,59)}(),FORMATS_INFO:{date:{getStandardPattern:function(){return"yyyy-MM-dd"},components:Zp},time:{getStandardPattern:function(){return"HH:mm"},components:fS},datetime:{getStandardPattern:function(){var e;return function(){var t=v("<input>").attr("type","datetime");t.val("2000-01-01T01:01Z"),t.val()&&(e="yyyy-MM-ddTHH:mmZ")}(),e||(e="yyyy-MM-ddTHH:mm:ssZ"),ht.FORMATS_INFO.datetime.getStandardPattern=function(){return e},e},components:[...Zp,...fS]},"datetime-local":{getStandardPattern:function(){return"yyyy-MM-ddTHH:mm:ss"},components:[...Zp,"hours","minutes","seconds"]}},FORMATS_MAP:{date:"shortdate",time:"shorttime",datetime:"shortdateshorttime"},SUBMIT_FORMATS_MAP:{date:"date",time:"time",datetime:"datetime-local"},toStandardDateFormat:function(e,t){var i=ht.FORMATS_INFO[t].getStandardPattern();return li.serializeDate(e,i)},fromStandardDateFormat:function(e){var t=li.dateParser(e);return Mi(t)?t:void 0},getMaxMonthDay:function(e,t){return new Date(e,t+1,0).getDate()},mergeDates:function(e,t,i){if(!t)return t||null;if(!e||isNaN(e.getTime())){var n=new Date(null);e=new Date(n.getFullYear(),n.getMonth(),n.getDate())}var r=new Date(e.valueOf()),a=ht.FORMATS_INFO[i];return F(a.components,function(){var o=ht.DATE_COMPONENTS_INFO[this];r[o.setter](t[o.getter]())}),r},getLongestCaptionIndex:function(e){var t=0,i=0,n;for(n=0;n<e.length;++n)e[n].length>i&&(t=n,i=e[n].length);return t},formatUsesMonthName:function(e){return Ze.formatUsesMonthName(e)},formatUsesDayName:function(e){return Ze.formatUsesDayName(e)},getLongestDate:function(e,t,i){var n=yq(e),r=9;(!n||ht.formatUsesMonthName(n))&&(r=ht.getLongestCaptionIndex(t));var a=new Date(1888,r,21,23,59,59,999);if(!n||ht.formatUsesDayName(n)){var o=a.getDate()-a.getDay()+ht.getLongestCaptionIndex(i);a.setDate(o)}return a},normalizeTime:function(e){e.setSeconds(0),e.setMilliseconds(0)}};ht.DATE_COMPONENTS_INFO={year:{getter:"getFullYear",setter:"setFullYear",formatter:function(e,t){var i=new Date(t.getTime());return i.setFullYear(e),Ze.format(i,"yyyy")},startValue:void 0,endValue:void 0},day:{getter:"getDate",setter:"setDate",formatter:function(e,t){var i=new Date(t.getTime());return i.setDate(e),Ze.format(i,"d")},startValue:1,endValue:void 0},month:{getter:"getMonth",setter:"setMonth",formatter:function(e){return Ze.getMonthNames()[e]},startValue:0,endValue:11},hours:{getter:"getHours",setter:"setHours",formatter:function(e){return Ze.format(new Date(0,0,0,e),"hour")},startValue:0,endValue:23},minutes:{getter:"getMinutes",setter:"setMinutes",formatter:function(e){return Ze.format(new Date(0,0,0,0,e),"minute")},startValue:0,endValue:59},seconds:{getter:"getSeconds",setter:"setSeconds",formatter:function(e){return Ze.format(new Date(0,0,0,0,0,e),"second")},startValue:0,endValue:59},milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",formatter:function(e){return Ze.format(new Date(0,0,0,0,0,0,e),"millisecond")},startValue:0,endValue:999}};var v1="dxSwipeable",xq="dx-swipeable",bq={onStart:Jh,onUpdated:ef,onEnd:Ju,onCancel:"dxswipecancel"},ph=hr.inherit({_getDefaultOptions:function(){return O(this.callBase(),{elastic:!0,immediate:!1,direction:"horizontal",itemSizeFunc:null,onStart:null,onUpdated:null,onEnd:null,onCancel:null})},_render:function(){this.callBase(),this.$element().addClass(xq),this._attachEventHandlers()},_attachEventHandlers:function(){if(this._detachEventHandlers(),!this.option("disabled")){var e=this.NAME;this._createEventData(),F(bq,(function(t,i){var n=this._createActionByOption(t,{context:this});i=me(i,e),D.on(this.$element(),i,this._eventData,function(r){return n({event:r})})}).bind(this))}},_createEventData:function(){this._eventData={elastic:this.option("elastic"),itemSizeFunc:this.option("itemSizeFunc"),direction:this.option("direction"),immediate:this.option("immediate")}},_detachEventHandlers:function(){D.off(this.$element(),"."+v1)},_optionChanged:function(e){switch(e.name){case"disabled":case"onStart":case"onUpdated":case"onEnd":case"onCancel":case"elastic":case"immediate":case"itemSizeFunc":case"direction":this._detachEventHandlers(),this._attachEventHandlers();break;case"rtlEnabled":break;default:this.callBase(e)}},_useTemplates:function(){return!1}});Iu(ph,v1);var Sq="dx-calendar-navigator",Eq="dx-calendar-navigator-previous-month",wq="dx-calendar-navigator-next-month",Iq="dx-calendar-navigator-previous-view",Tq="dx-calendar-navigator-next-view",Aq="dx-calendar-disabled-navigator-link",Dq="dx-calendar-caption-button",Oq=pi.inherit({_getDefaultOptions:function(){return O(this.callBase(),{onClick:null,onCaptionClick:null,text:""})},_init:function(){this.callBase(),this._initActions()},_initActions:function(){this._clickAction=this._createActionByOption("onClick"),this._captionClickAction=this._createActionByOption("onCaptionClick")},_initMarkup:function(){this.callBase(),this.$element().addClass(Sq),this._renderButtons(),this._renderCaption()},_renderButtons:function(){var e=this,t=this.option("rtlEnabled")?-1:1;this._prevButton=this._createComponent(v("<a>"),Si,{focusStateEnabled:!1,icon:"chevronleft",onClick:function(a){e._clickAction({direction:-t,event:a})},integrationOptions:{}});var i=this._prevButton.$element().addClass(Iq).addClass(Eq);this._nextButton=this._createComponent(v("<a>"),Si,{focusStateEnabled:!1,icon:"chevronright",onClick:function(a){e._clickAction({direction:t,event:a})},integrationOptions:{}});var n=this._nextButton.$element().addClass(Tq).addClass(wq);this._caption=this._createComponent(v("<a>").addClass(Dq),Si,{focusStateEnabled:!1,onClick:function(a){e._captionClickAction({event:a})},integrationOptions:{}});var r=this._caption.$element();this.$element().append(i,r,n)},_renderCaption:function(){this._caption.option("text",this.option("text"))},toggleButton:function(e,t){var i="_"+e+"Button",n=this[i];n&&(n.option("disabled",t),n.$element().toggleClass(Aq,t))},_optionChanged:function(e){switch(e.name){case"text":this._renderCaption();break;default:this.callBase(e)}}}),{abstract:Zr}=pi,Rq="dx-calendar-other-view",kq="dx-calendar-cell",pS="dx-calendar-empty-cell",Bq="dx-calendar-today",vS="dx-calendar-selected-date",Qp="dx-calendar-contoured-date",_S=me(ct,"dxCalendar"),gS="dxDateValueKey",Wd=pi.inherit({_getViewName:function(){return"base"},_getDefaultOptions:function(){return O(this.callBase(),{date:new Date,focusStateEnabled:!1,cellTemplate:null,disabledDates:null,onCellClick:null,rowCount:3,colCount:4,allowValueSelection:!0,_todayDate:()=>new Date})},_initMarkup:function(){this.callBase(),this._renderImpl()},_renderImpl:function(){this.$element().append(this._createTable()),this._createDisabledDatesHandler(),this._renderBody(),this._renderContouredDate(),this._renderValue(),this._renderEvents()},_createTable:function(){return this._$table=v("<table>"),this.setAria({label:ue.format("dxCalendar-ariaWidgetName"),role:"grid"},this._$table),this._$table},_renderBody:function(){this.$body=v("<tbody>").appendTo(this._$table);for(var e={cellDate:this._getFirstCellData(),prevCellDate:null},t=0,i=this.option("rowCount");t<i;t++){e.row=this._createRow();for(var n=0,r=this.option("colCount");n<r;n++)this._renderCell(e,n)}},_createRow:function(){var e=fe.createElement("tr");return this.setAria("role","row",v(e)),this.$body.get(0).appendChild(e),e},_appendCell:function(e,t){this._appendMethodName||this._cacheAppendMethodName(),v(e)[this._appendMethodName](t)},_cacheAppendMethodName:function(e){this._appendMethodName=e??this.option("rtlEnabled")?"prepend":"append"},_createCell:function(e){var t=fe.createElement("td"),i=v(t);return t.className=this._getClassNameByDate(e),t.setAttribute("data-value",li.serializeDate(e,Pe.getShortDateFormat())),Mt(t,gS,e),this.setAria({role:"gridcell",label:this.getCellAriaLabel(e)},i),{cell:t,$cell:i}},_renderCell:function(e,t){var{cellDate:i,prevCellDate:n,row:r}=e;n&&Pe.fixTimezoneGap(n,i),e.prevCellDate=i;var{cell:a,$cell:o}=this._createCell(i),s=this.option("cellTemplate");this._appendCell(r,a),s?s.render(this._prepareCellTemplateData(i,t,o)):a.innerHTML=this._getCellText(i),e.cellDate=this._getNextCellData(i)},_getClassNameByDate:function(e){var t=kq;return this._isTodayCell(e)&&(t+=" ".concat(Bq)),(this._isDateOutOfRange(e)||this.isDateDisabled(e))&&(t+=" ".concat(pS)),this._isOtherView(e)&&(t+=" ".concat(Rq)),t},_prepareCellTemplateData:function(e,t,i){return{model:{text:this._getCellText(e),date:e,view:this._getViewName()},container:Fe(i),index:t}},_renderEvents:function(){this._createCellClickAction(),D.off(this._$table,_S),D.on(this._$table,_S,"td",e=>{v(e.currentTarget).hasClass(pS)||this._cellClickAction({event:e,value:v(e.currentTarget).data(gS)})})},_createCellClickAction:function(){this._cellClickAction=this._createActionByOption("onCellClick")},_createDisabledDatesHandler:function(){var e=this.option("disabledDates");this._disabledDatesHandler=Array.isArray(e)?this._getDefaultDisabledDatesHandler(e):e||ee},_getDefaultDisabledDatesHandler:function(e){return ee},_isTodayCell:Zr,_isDateOutOfRange:Zr,isDateDisabled:function(e){var t={date:e,view:this._getViewName()};return this._disabledDatesHandler(t)},_isOtherView:Zr,_getCellText:Zr,_getFirstCellData:Zr,_getNextCellData:Zr,_renderContouredDate:function(e){if(this.option("focusStateEnabled")){e=e||this.option("contouredDate");var t=this._getContouredCell(),i=this._getCellByDate(e);t.removeClass(Qp),i.addClass(Qp)}},_getContouredCell:function(){return this._$table.find(".".concat(Qp))},_changeValue:function(e){if(e){var t=this.option("value"),i=t?new Date(t):new Date;i.setDate(e.getDate()),i.setMonth(e.getMonth()),i.setFullYear(e.getFullYear()),i.setDate(e.getDate()),this.option("value",i)}else this.option("value",null)},_renderValue:function(){if(this.option("allowValueSelection")){var e=this.option("value"),t=this._getCellByDate(e);this._selectedCell&&this._selectedCell.removeClass(vS),t.addClass(vS),this._selectedCell=t}},getCellAriaLabel:function(e){return this._getCellText(e)},_getFirstAvailableDate:function(){var e=this.option("date"),t=this.option("min");return e=Pe.getFirstDateView(this._getViewName(),e),new Date(t&&e<t?t:e)},_getCellByDate:Zr,isBoundary:Zr,_optionChanged:function(e){var{name:t,value:i}=e;switch(t){case"value":this._renderValue();break;case"contouredDate":this._renderContouredDate(i);break;case"onCellClick":this._createCellClickAction();break;case"disabledDates":case"cellTemplate":this._invalidate();break;case"rtlEnabled":this._cacheAppendMethodName(i),this.callBase(e);break;case"_todayDate":this._renderBody();break;default:this.callBase(e)}}}),Lq="dx-calendar-other-month",Pq="dx-calendar-other-view",Fq={month:Wd.inherit({_getViewName:function(){return"month"},_getDefaultOptions:function(){return O(this.callBase(),{firstDayOfWeek:void 0,rowCount:6,colCount:7})},_renderImpl:function(){this.callBase(),this._renderHeader()},_renderBody:function(){this.callBase(),this._$table.find(".".concat(Pq)).addClass(Lq)},_renderFocusTarget:ee,getCellAriaLabel:function(e){return Ze.format(e,"longdate")},_renderHeader:function(){var e=v("<tr>"),t=v("<thead>").append(e);this._$table.prepend(t);for(var i=0,n=this.option("colCount");i<n;i++)this._renderHeaderCell(i,e)},_renderHeaderCell:function(e,t){var{full:i,abbreviated:n}=this._getDayCaption(this._getFirstDayOfWeek()+e),r=v("<th>").attr({scope:"col",abbr:i}).text(n);this._appendCell(t,r)},getNavigatorCaption:function(){return Ze.format(this.option("date"),"monthandyear")},_isTodayCell:function(e){var t=this.option("_todayDate")();return Pe.sameDate(e,t)},_isDateOutOfRange:function(e){var t=this.option("min"),i=this.option("max");return!Pe.dateInRange(e,t,i,"date")},_isOtherView:function(e){return e.getMonth()!==this.option("date").getMonth()},_getCellText:function(e){return Ze.format(e,"d")},_getDayCaption:function(e){var t=this.option("colCount"),i=e%t;return{full:Ze.getDayNames()[i],abbreviated:Ze.getDayNames("abbreviated")[i]}},_getFirstCellData:function(){var e=Pe.getFirstMonthDate(this.option("date")),t=this._getFirstDayOfWeek()-e.getDay(),i=this.option("colCount");return t>=0&&(t-=i),e.setDate(e.getDate()+t),e},_getNextCellData:function(e){return e=new Date(e),e.setDate(e.getDate()+1),e},_getFirstDayOfWeek:function(){return E(this.option("firstDayOfWeek"))?this.option("firstDayOfWeek"):Ze.firstDayOfWeekIndex()},_getCellByDate:function(e){return this._$table.find("td[data-value='".concat(li.serializeDate(e,Pe.getShortDateFormat()),"']"))},isBoundary:function(e){return Pe.sameMonthAndYear(e,this.option("min"))||Pe.sameMonthAndYear(e,this.option("max"))},_getDefaultDisabledDatesHandler:function(e){return function(t){var i=e.some(function(n){return Pe.sameDate(n,t.date)});if(i)return!0}}}),year:Wd.inherit({_getViewName:function(){return"year"},_isTodayCell:function(e){var t=this.option("_todayDate")();return Pe.sameMonthAndYear(e,t)},_isDateOutOfRange:function(e){return!Pe.dateInRange(e,Pe.getFirstMonthDate(this.option("min")),Pe.getLastMonthDate(this.option("max")))},_isOtherView:function(){return!1},_getCellText:function(e){return Ze.getMonthNames("abbreviated")[e.getMonth()]},_getFirstCellData:function(){var e=this.option("date"),t=new Date(e);return t.setDate(1),t.setMonth(0),t},_getNextCellData:function(e){return e=new Date(e),e.setMonth(e.getMonth()+1),e},_getCellByDate:function(e){var t=new Date(e);return t.setDate(1),this._$table.find("td[data-value='".concat(li.serializeDate(t,Pe.getShortDateFormat()),"']"))},getCellAriaLabel:function(e){return Ze.format(e,"monthandyear")},getNavigatorCaption:function(){return Ze.format(this.option("date"),"yyyy")},isBoundary:function(e){return Pe.sameYear(e,this.option("min"))||Pe.sameYear(e,this.option("max"))}}),decade:Wd.inherit({_getViewName:function(){return"decade"},_isTodayCell:function(e){var t=this.option("_todayDate")();return Pe.sameYear(e,t)},_isDateOutOfRange:function(e){var t=this.option("min"),i=this.option("max");return!Pe.dateInRange(e.getFullYear(),t&&t.getFullYear(),i&&i.getFullYear())},_isOtherView:function(e){var t=new Date(e);return t.setMonth(1),!Pe.sameDecade(t,this.option("date"))},_getCellText:function(e){return Ze.format(e,"yyyy")},_getFirstCellData:function(){var e=Pe.getFirstYearInDecade(this.option("date"))-1;return Pe.createDateWithFullYear(e,0,1)},_getNextCellData:function(e){return e=new Date(e),e.setFullYear(e.getFullYear()+1),e},getNavigatorCaption:function(){var e=this.option("date"),t=Pe.getFirstYearInDecade(e),i=new Date(e),n=new Date(e);return i.setFullYear(t),n.setFullYear(t+9),Ze.format(i,"yyyy")+"-"+Ze.format(n,"yyyy")},_isValueOnCurrentView:function(e,t){return Pe.sameDecade(e,t)},_getCellByDate:function(e){var t=new Date(e);return t.setDate(1),t.setMonth(0),this._$table.find("td[data-value='".concat(li.serializeDate(t,Pe.getShortDateFormat()),"']"))},isBoundary:function(e){return Pe.sameDecade(e,this.option("min"))||Pe.sameDecade(e,this.option("max"))}}),century:Wd.inherit({_getViewName:function(){return"century"},_isTodayCell:function(e){var t=this.option("_todayDate")();return Pe.sameDecade(e,t)},_isDateOutOfRange:function(e){var t=Pe.getFirstYearInDecade(e),i=Pe.getFirstYearInDecade(this.option("min")),n=Pe.getFirstYearInDecade(this.option("max"));return!Pe.dateInRange(t,i,n)},_isOtherView:function(e){var t=new Date(e);return t.setMonth(1),!Pe.sameCentury(t,this.option("date"))},_getCellText:function(e){var t=Ze.format(e,"yyyy"),i=new Date(e);return i.setFullYear(i.getFullYear()+9),t+" - "+Ze.format(i,"yyyy")},_getFirstCellData:function(){var e=Pe.getFirstDecadeInCentury(this.option("date"))-10;return Pe.createDateWithFullYear(e,0,1)},_getNextCellData:function(e){return e=new Date(e),e.setFullYear(e.getFullYear()+10),e},_getCellByDate:function(e){var t=new Date(e);return t.setDate(1),t.setMonth(0),t.setFullYear(Pe.getFirstYearInDecade(t)),this._$table.find("td[data-value='".concat(li.serializeDate(t,Pe.getShortDateFormat()),"']"))},getNavigatorCaption:function(){var e=this.option("date"),t=Pe.getFirstDecadeInCentury(e),i=new Date(e),n=new Date(e);return i.setFullYear(t),n.setFullYear(t+99),Ze.format(i,"yyyy")+"-"+Ze.format(n,"yyyy")},isBoundary:function(e){return Pe.sameCentury(e,this.option("min"))||Pe.sameCentury(e,this.option("max"))}})},Mq="dx-calendar",Vq="dx-calendar-body",Nq="dx-calendar-cell",Hq="dx-calendar-footer",$q="dx-calendar-today-button",Wq="dx-calendar-with-footer",zq="dx-calendar-views-wrapper",mS="dx-calendar-view",Gq="dx-state-focused",Jp=250,Uq=.6,Kq=1,jq="yyyy-MM-dd",qq="dxDateValueKey",Zo={month:3,year:2,decade:1,century:0},Ii={MONTH:"month",YEAR:"year",DECADE:"decade",CENTURY:"century"};function Yq(e){return e.hasClass(Gq)}var _1=Gn.inherit({_activeStateUnit:"."+Nq,_getDefaultOptions:function(){return O(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,currentDate:new Date,value:null,dateSerializationFormat:void 0,min:new Date(1e3,0),max:new Date(3e3,0),firstDayOfWeek:void 0,zoomLevel:Ii.MONTH,maxZoomLevel:Ii.MONTH,minZoomLevel:Ii.CENTURY,showTodayButton:!1,cellTemplate:"cell",disabledDates:null,onCellClick:null,onContouredChanged:null,skipFocusCheck:!1,_todayDate:()=>new Date})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}}])},_supportedKeys:function(){return O(this.callBase(),{rightArrow:function(e){e.preventDefault(),fi(e)?this._waitRenderView(1):this._moveCurrentDateByOffset(1*this._getRtlCorrection())},leftArrow:function(e){e.preventDefault(),fi(e)?this._waitRenderView(-1):this._moveCurrentDateByOffset(-1*this._getRtlCorrection())},upArrow:function(e){if(e.preventDefault(),fi(e))this._navigateUp();else{if($t.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(-1*this._view.option("colCount"))}},downArrow:function(e){if(e.preventDefault(),fi(e))this._navigateDown();else{if($t.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(1*this._view.option("colCount"))}},home:function(e){e.preventDefault();var t=this.option("zoomLevel"),i=this.option("currentDate"),n=this._dateOption("min");if(!this._view.isDateDisabled(i)){var r=Pe.sameView(t,i,n)?n:Pe.getViewFirstCellDate(t,i);this._moveToClosestAvailableDate(r)}},end:function(e){e.preventDefault();var t=this.option("zoomLevel"),i=this.option("currentDate"),n=this._dateOption("max");if(!this._view.isDateDisabled(i)){var r=Pe.sameView(t,i,n)?n:Pe.getViewLastCellDate(t,i);this._moveToClosestAvailableDate(r)}},pageUp:function(e){e.preventDefault(),this._waitRenderView(-1*this._getRtlCorrection())},pageDown:function(e){e.preventDefault(),this._waitRenderView(1*this._getRtlCorrection())},tab:ee,enter:function(e){if(!this._isMaxZoomLevel())this._navigateDown();else if(!this._view.isDateDisabled(this.option("currentDate"))){var t=this._updateTimeComponent(this.option("currentDate"));this._dateValue(t,e)}}})},_getSerializationFormat:function(e){var t=this.option(e||"value");if(this.option("dateSerializationFormat"))return this.option("dateSerializationFormat");if(xt(t))return"number";if(Me(t))return li.getDateSerializationFormat(t)},_convertToDate:function(e,t){return li.deserializeDate(e)},_dateValue:function(e,t){if(t){if(t.type==="keydown"){var i=this._view._getContouredCell().get(0);t.target=i}this._saveValueChangeEvent(t)}this._dateOption("value",e)},_dateOption:function(e,t){if(arguments.length===1)return this._convertToDate(this.option(e),e);var i=this._getSerializationFormat(e);this.option(e,li.serializeDate(t,i))},_shiftDate:function(e,t,i,n){switch(e){case Ii.MONTH:t.setDate(t.getDate()+i*n);break;case Ii.YEAR:t.setMonth(t.getMonth()+i*n);break;case Ii.DECADE:t.setFullYear(t.getFullYear()+i*n);break;case Ii.CENTURY:t.setFullYear(t.getFullYear()+10*i*n)}},_moveCurrentDateByOffset:function(e){var t=this.option("currentDate"),i=new Date(t),n=this.option("zoomLevel");this._shiftDate(n,i,e,1);for(var r=this._getMaxDate(),a=this._getMinDate(),o=this._areDatesInNeighborView(n,i,t),s=Br(i,a,r)&&o,l=new Date(i);s;){if(!this._view.isDateDisabled(l)){i=l;break}this._shiftDate(n,l,e,1),o=this._areDatesInNeighborView(n,l,t),s=Br(l,a,r)&&o}this._view.isDateDisabled(t)||this._view.isDateDisabled(i)?this._waitRenderView(e>0?1:-1):this.option("currentDate",i)},_areDatesInSameView(e,t,i){switch(e){case Ii.MONTH:return t.getMonth()===i.getMonth();case Ii.YEAR:return t.getYear()===i.getYear();case Ii.DECADE:return parseInt(t.getYear()/10)===parseInt(i.getYear()/10);case Ii.CENTURY:return parseInt(t.getYear()/100)===parseInt(i.getYear()/100)}},_areDatesInNeighborView(e,t,i){switch(e){case Ii.MONTH:return n=t.getMonth(),r=i.getMonth(),a=Math.abs(n-r),Math.min(a,12-a)<=1;case Ii.YEAR:return Math.abs(t.getYear()-i.getYear())<=1;case Ii.DECADE:return Math.abs(t.getYear()-i.getYear())<=10;case Ii.CENTURY:return Math.abs(t.getYear()-i.getYear())<=100}var n,r,a},_moveToClosestAvailableDate:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.option("currentDate"),t=new Date(e),i=this.option("zoomLevel"),n=!this._isDateNotAvailable(t),r=n,a=n,o,s,l=new Date(t),u=new Date(t);do{if(r){t=l;break}if(a){t=u;break}this._shiftDate(i,l,1,1),this._shiftDate(i,u,1,-1),o=this._areDatesInSameView(i,l,e),s=this._areDatesInSameView(i,u,e),r=o&&!this._isDateNotAvailable(l),a=s&&!this._isDateNotAvailable(u)}while(o||s);this.option("currentDate",t)},_isDateNotAvailable:function(e){var t=this._getMaxDate(),i=this._getMinDate();return!Br(e,i,t)||this._view.isDateDisabled(e)},_init:function(){this.callBase(),this._correctZoomLevel(),this._initCurrentDate(),this._initActions()},_correctZoomLevel:function(){var e=this.option("minZoomLevel"),t=this.option("maxZoomLevel"),i=this.option("zoomLevel");Zo[t]<Zo[e]||(Zo[i]>Zo[t]?this.option("zoomLevel",t):Zo[i]<Zo[e]&&this.option("zoomLevel",e))},_initCurrentDate:function(){var e=this._getNormalizedDate(this._dateOption("value"))||this._getNormalizedDate(this.option("currentDate"));this.option("currentDate",e)},_getNormalizedDate:function(e){return e=Pe.normalizeDate(e,this._getMinDate(),this._getMaxDate()),E(e)?this._getDate(e):e},_initActions:function(){this._cellClickAction=this._createActionByOption("onCellClick"),this._onContouredChanged=this._createActionByOption("onContouredChanged")},_initTemplates:function(){this._templateManager.addDefaultTemplates({cell:new Ts(function(e){var t=e.model;v(e.container).append(v("<span>").text(t&&t.text||String(t)))})}),this.callBase()},_updateCurrentDate:function(e){$t.isAnimating(this._$viewsWrapper)&&$t.stop(this._$viewsWrapper,!0);var t=this._getMinDate(),i=this._getMaxDate();if(t>i){this.option("currentDate",new Date);return}var n=this._getNormalizedDate(e);if(e.getTime()!==n.getTime()){this.option("currentDate",new Date(n));return}var r=this._getViewsOffset(this._view.option("date"),n);r!==0&&!this._isMaxZoomLevel()&&this._isOtherViewCellClicked&&(r=0),this._view&&r!==0&&!this._suppressNavigation?this._navigate(r,n):(this._renderNavigator(),this._setViewContoured(n),this._updateAriaId(n))},_setViewContoured:function(e){(this.option("skipFocusCheck")||Yq(this._focusTarget()))&&this._view.option("contouredDate",e)},_getMinDate:function(){return this.min?this.min:(this.min=this._dateOption("min")||new Date(1e3,0),this.min)},_getMaxDate:function(){return this.max?this.max:(this.max=this._dateOption("max")||new Date(3e3,0),this.max)},_getViewsOffset:function(e,t){var i=this.option("zoomLevel");if(i===Ii.MONTH)return this._getMonthsOffset(e,t);var n;switch(i){case Ii.CENTURY:n=100;break;case Ii.DECADE:n=10;break;default:n=1}return parseInt(t.getFullYear()/n)-parseInt(e.getFullYear()/n)},_getMonthsOffset:function(e,t){var i=t.getFullYear()-e.getFullYear(),n=t.getMonth()-e.getMonth();return 12*i+n},_waitRenderView:function(e){if(!this._alreadyViewRender){this._alreadyViewRender=!0;var t=this._getDateByOffset(e*this._getRtlCorrection());this._moveToClosestAvailableDate(t),this._waitRenderViewTimeout=setTimeout(()=>{this._alreadyViewRender=!1})}},_getRtlCorrection:function(){return this.option("rtlEnabled")?-1:1},_getDateByOffset:function(e,t){var i;t=this._getDate((i=t)!==null&&i!==void 0?i:this.option("currentDate"));var n=t.getDate(),r=Pe.getDifferenceInMonth(this.option("zoomLevel"))*e;t.setDate(1),t.setMonth(t.getMonth()+r);var a=Pe.getLastMonthDate(t).getDate();return t.setDate(n>a?a:n),t},_focusTarget:function(){return this.$element()},_initMarkup:function(){this._renderSubmitElement(),this.callBase();var e=this.$element();e.addClass(Mq),this._renderBody(),e.append(this.$body),this._renderViews(),this._renderNavigator(),e.append(this._navigator.$element()),this._renderSwipeable(),this._renderFooter(),this._updateAriaSelected(),this._updateAriaId(),this._moveToClosestAvailableDate()},_render:function(){this.callBase(),this._setViewContoured(this.option("currentDate"))},_renderBody:function(){this._$viewsWrapper||(this.$body=v("<div>").addClass(Vq),this._$viewsWrapper=v("<div>").addClass(zq),this.$body.append(this._$viewsWrapper))},_getKeyboardListeners(){return this.callBase().concat([this._view])},_renderViews:function(){this.$element().addClass(mS+"-"+this.option("zoomLevel"));var e=this.option("currentDate");if(this._view=this._renderSpecificView(e),Ke()){var t=this._getDateByOffset(-1,e);this._beforeView=this._isViewAvailable(t)?this._renderSpecificView(t):null;var i=this._getDateByOffset(1,e);i.setDate(1),this._afterView=this._isViewAvailable(i)?this._renderSpecificView(i):null}this._translateViews()},_renderSpecificView:function(e){var t=Fq[this.option("zoomLevel")],i=v("<div>").appendTo(this._$viewsWrapper),n=this._viewConfig(e);return this._createComponent(i,t,n)},_viewConfig:function(e){var t=this.option("disabledDates");return t=Ee(t)?this._injectComponent(t.bind(this)):t,{date:e,min:this._getMinDate(),max:this._getMaxDate(),firstDayOfWeek:this.option("firstDayOfWeek"),value:this._dateOption("value"),tabIndex:void 0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),disabledDates:t,onCellClick:this._cellClickHandler.bind(this),cellTemplate:this._getTemplateByOption("cellTemplate"),allowValueSelection:this._isMaxZoomLevel(),_todayDate:this.option("_todayDate")}},_injectComponent:function(e){var t=this;return function(i){return O(i,{component:t}),e(i)}},_isViewAvailable:function(e){var t=this.option("zoomLevel"),i=Pe.getViewMinBoundaryDate(t,this._getMinDate()),n=Pe.getViewMaxBoundaryDate(t,this._getMaxDate());return Pe.dateInRange(e,i,n)},_translateViews:function(){ti(this._view.$element(),{left:0,top:0}),this._beforeView&&ti(this._beforeView.$element(),{left:this._getViewPosition(-1),top:0}),this._afterView&&ti(this._afterView.$element(),{left:this._getViewPosition(1),top:0})},_getViewPosition:function(e){var t=this.option("rtlEnabled")?-1:1;return 100*e*t+"%"},_cellClickHandler:function(e){var t=this.option("zoomLevel"),i=Pe.getViewDown(t),n=this._isMaxZoomLevel();if(i&&!n)this._navigateDown(e.event.currentTarget);else{var r=this._updateTimeComponent(e.value);this._dateValue(r,e.event),this._cellClickAction(e)}},_updateTimeComponent:function(e){var t=new Date(e),i=this._dateOption("value");return i&&(t.setHours(i.getHours()),t.setMinutes(i.getMinutes()),t.setSeconds(i.getSeconds()),t.setMilliseconds(i.getMilliseconds())),t},_isMaxZoomLevel:function(){return this.option("zoomLevel")===this.option("maxZoomLevel")},_navigateDown:function(e){var t=this.option("zoomLevel");if(!this._isMaxZoomLevel()){var i=Pe.getViewDown(t);if(i){var n=this._view.option("contouredDate")||this._view.option("date");e&&(n=v(e).data(qq)),this._isOtherViewCellClicked=!0,this.option("currentDate",n),this.option("zoomLevel",i),this._isOtherViewCellClicked=!1,this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate")))}}},_renderNavigator:function(){this._navigator||(this._navigator=new Oq(v("<div>"),this._navigatorConfig())),this._navigator.option("text",this._view.getNavigatorCaption()),this._updateButtonsVisibility()},_navigatorConfig:function(){return{text:this._view.getNavigatorCaption(),onClick:this._navigatorClickHandler.bind(this),onCaptionClick:this._navigateUp.bind(this),rtlEnabled:this.option("rtlEnabled")}},_navigatorClickHandler:function(e){var t=this._getDateByOffset(e.direction,this.option("currentDate"));this._moveToClosestAvailableDate(t)},_navigateUp:function(){var e=this.option("zoomLevel"),t=Pe.getViewUp(e);!t||this._isMinZoomLevel(e)||(this.option("zoomLevel",t),this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate"))))},_isMinZoomLevel:function(e){var t=this._getMinDate(),i=this._getMaxDate();return Pe.sameView(e,t,i)||this.option("minZoomLevel")===e},_updateButtonsVisibility:function(){this._navigator.toggleButton("next",!E(this._getRequiredView("next"))),this._navigator.toggleButton("prev",!E(this._getRequiredView("prev")))},_renderSwipeable:function(){this._swipeable||(this._swipeable=this._createComponent(this.$element(),ph,{onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._viewWidth.bind(this)}))},_swipeStartHandler:function(e){$t.stop(this._$viewsWrapper,!0),e.event.maxLeftOffset=this._getRequiredView("next")?1:0,e.event.maxRightOffset=this._getRequiredView("prev")?1:0},_getRequiredView:function(e){var t,i=this.option("rtlEnabled");return e==="next"?t=i?this._beforeView:this._afterView:e==="prev"&&(t=i?this._afterView:this._beforeView),t},_swipeUpdateHandler:function(e){var t=e.event.offset;ti(this._$viewsWrapper,{left:t*this._viewWidth(),top:0}),this._updateNavigatorCaption(t)},_swipeEndHandler:function(e){var t=e.event.targetOffset,i=t?t/Math.abs(t):0;if(i===0){this._animateWrapper(0,Jp);return}var n=this._getDateByOffset(-i*this._getRtlCorrection());this._isDateInInvalidRange(n)&&(i>=0?n=new Date(this._getMinDate()):n=new Date(this._getMaxDate())),this.option("currentDate",n)},_viewWidth:function(){return this._viewWidthValue||(this._viewWidthValue=$e(this.$element())),this._viewWidthValue},_updateNavigatorCaption:function(e){e*=this._getRtlCorrection();var t=this._view;e>.5&&this._beforeView?t=this._beforeView:e<-.5&&this._afterView&&(t=this._afterView),this._navigator.option("text",t.getNavigatorCaption())},_isDateInInvalidRange:function(e){if(!this._view.isBoundary(e)){var t=this._getMinDate(),i=this._getMaxDate(),n=Pe.normalizeDate(e,t,i);return n===t||n===i}},_renderFooter:function(){var e=this.option("showTodayButton");if(e){var t=this._createComponent(v("<a>"),Si,{focusStateEnabled:!1,text:ue.format("dxCalendar-todayButtonText"),onClick:(function(i){this._toTodayView(i)}).bind(this),integrationOptions:{}}).$element().addClass($q);this._$footer=v("<div>").addClass(Hq).append(t),this.$element().append(this._$footer)}this.$element().toggleClass(Wq,e)},_renderSubmitElement:function(){this._$submitElement=v("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue:function(e){var t=this._convertToDate(e);this._getSubmitElement().val(li.serializeDate(t,jq))},_getSubmitElement:function(){return this._$submitElement},_animateShowView:function(){return $t.stop(this._view.$element(),!0),this._popAnimationView(this._view,Uq,Kq,Jp).promise()},_popAnimationView:function(e,t,i,n){return $t.animate(e.$element(),{type:"pop",from:{scale:t,opacity:t},to:{scale:i,opacity:i},duration:n})},_navigate:function(e,t){if(e!==0&&Math.abs(e)!==1&&this._isViewAvailable(t)){var i=this._renderSpecificView(t);e>0?(this._afterView&&this._afterView.$element().remove(),this._afterView=i):(this._beforeView&&this._beforeView.$element().remove(),this._beforeView=i),this._translateViews()}var n=this._getRtlCorrection(),r=e>0?1:e<0?-1:0,a=-n*r*this._viewWidth(),o=this._$viewsWrapper.position().left;o!==a&&(this._preventViewChangeAnimation?this._wrapperAnimationEndHandler(e,t):this._animateWrapper(a,Jp).done(this._wrapperAnimationEndHandler.bind(this,e,t)))},_animateWrapper:function(e,t){return $t.animate(this._$viewsWrapper,{type:"slide",from:{left:this._$viewsWrapper.position().left},to:{left:e},duration:t})},_getDate:e=>new Date(e),_toTodayView:function(e){this._saveValueChangeEvent(e.event);var t=new Date;if(this._isMaxZoomLevel()){this._dateOption("value",t);return}this._preventViewChangeAnimation=!0,this.option("zoomLevel",this.option("maxZoomLevel")),this._dateOption("value",t),this._animateShowView(),this._preventViewChangeAnimation=!1},_wrapperAnimationEndHandler:function(e,t){this._rearrangeViews(e),this._translateViews(),this._resetLocation(),this._renderNavigator(),this._setViewContoured(t),this._updateAriaId(t)},_rearrangeViews:function(e){if(e!==0){var t,i,n;if(e<0?(t=1,i="_beforeView",n="_afterView"):(t=-1,i="_afterView",n="_beforeView"),!!this[i]){var r=this[i].option("date");this[n]&&this[n].$element().remove(),e===t?this[n]=this._view:(this[n]=this._renderSpecificView(this._getDateByOffset(t,r)),this._view.$element().remove()),this._view=this[i];var a=this._getDateByOffset(-t,r);this[i]=this._isViewAvailable(a)?this._renderSpecificView(a):null}}},_resetLocation:function(){ti(this._$viewsWrapper,{left:0,top:0})},_clean:function(){this.callBase(),this._clearViewWidthCache(),delete this._$viewsWrapper,delete this._navigator,delete this._$footer},_clearViewWidthCache:function(){delete this._viewWidthValue},_disposeViews:function(){this._view.$element().remove(),this._beforeView&&this._beforeView.$element().remove(),this._afterView&&this._afterView.$element().remove(),delete this._view,delete this._beforeView,delete this._afterView},_dispose:function(){clearTimeout(this._waitRenderViewTimeout),this.callBase()},_refreshViews:function(){this._disposeViews(),this._renderViews()},_visibilityChanged:function(){this._translateViews()},_focusInHandler:function(){this.callBase.apply(this,arguments),this._view.option("contouredDate",this.option("currentDate"))},_focusOutHandler:function(){this.callBase.apply(this,arguments),this._view.option("contouredDate",null)},_updateViewsValue:function(e){var t=e?new Date(e):null;this._view.option("value",t),this._beforeView&&this._beforeView.option("value",t),this._afterView&&this._afterView.option("value",t)},_updateAriaSelected:function(e,t){var i;e=(i=e)!==null&&i!==void 0?i:this._dateOption("value");var n=this._view._getCellByDate(t),r=this._view._getCellByDate(e);this.setAria("selected",void 0,n),this.setAria("selected",!0,r),e&&this.option("currentDate").getTime()===e.getTime()&&this._updateAriaId(e)},_updateAriaId:function(e){var t;e=(t=e)!==null&&t!==void 0?t:this.option("currentDate");var i="dx-"+new ri,n=this._view._getCellByDate(e);this.setAria("id",i,n),this.setAria("activedescendant",i),this._onContouredChanged(i)},_suppressingNavigation:function(e,t){this._suppressNavigation=!0,e.apply(this,t),delete this._suppressNavigation},_optionChanged:function(e){var t=e.value,i=e.previousValue;switch(e.name){case"width":this.callBase(e),this._clearViewWidthCache();break;case"min":case"max":this.min=void 0,this.max=void 0,this._suppressingNavigation(this._updateCurrentDate,[this.option("currentDate")]),this._refreshViews(),this._renderNavigator();break;case"firstDayOfWeek":this._refreshViews(),this._updateButtonsVisibility();break;case"currentDate":this.setAria("id",void 0,this._view._getCellByDate(i)),this._updateCurrentDate(t);break;case"zoomLevel":this.$element().removeClass(mS+"-"+i),this._correctZoomLevel(),this._refreshViews(),this._renderNavigator(),this._updateAriaId();break;case"minZoomLevel":case"maxZoomLevel":this._correctZoomLevel(),this._updateButtonsVisibility();break;case"value":t=this._convertToDate(t),i=this._convertToDate(i),this._updateAriaSelected(t,i),this.option("currentDate",E(t)?new Date(t):new Date),this._updateViewsValue(t),this._setSubmitValue(t),this.callBase(e);break;case"onCellClick":this._view.option("onCellClick",t);break;case"onContouredChanged":this._onContouredChanged=this._createActionByOption("onContouredChanged");break;case"disabledDates":case"dateSerializationFormat":case"cellTemplate":case"showTodayButton":this._invalidate();break;case"skipFocusCheck":break;case"_todayDate":this._refreshViews();break;default:this.callBase(e)}},getContouredDate:function(){return this._view.option("contouredDate")}});tt("dxCalendar",_1);var zd=nt.abstract,af=nt.inherit({ctor:function(e){this.dateBox=e},widgetOption:function(){return this._widget&&this._widget.option.apply(this._widget,arguments)},_renderWidget:function(e){e=e||v("<div>"),this._widget=this._createWidget(e),this._widget.$element().appendTo(this._getWidgetContainer())},_createWidget:function(e){var t=this._getWidgetName(),i=this._getWidgetOptions();return this.dateBox._createComponent(e,t,i)},_getWidgetOptions:zd,_getWidgetName:zd,getDefaultOptions:function(){return{mode:"text"}},getDisplayFormat:zd,supportedKeys:ee,getKeyboardListener:ee,customizeButtons:ee,getParsedText:function(e,t){var i=Ze.parse(e,t);return i||Ze.parse(e)},renderInputMinMax:ee,renderOpenedState:function(){this._updateValue()},popupConfig:zd,_dimensionChanged:function(){var e;(e=this._getPopup())===null||e===void 0||e.repaint()},renderPopupContent:function(){var e=this._getPopup();this._renderWidget();var t=e.$content().parent();D.off(t,"mousedown"),D.on(t,"mousedown",this._preventFocusOnPopup.bind(this))},getFirstPopupElement:ee,getLastPopupElement:ee,_preventFocusOnPopup:function(e){e.preventDefault()},_getWidgetContainer:function(){return this._getPopup().$content()},_getPopup:function(){return this.dateBox._popup},popupShowingHandler:ee,popupHiddenHandler:ee,_updateValue:function(){this._widget&&this._widget.option("value",this.dateBoxValue())},useCurrentDateByDefault:ee,getDefaultDate:function(){return new Date},textChangedHandler:ee,renderValue:function(){this.dateBox.option("opened")&&this._updateValue()},getValue:function(){return this._widget.option("value")},isAdaptivityChanged:function(){return!1},dispose:function(){var e=this._getPopup();e&&e.$content().empty()},dateBoxValue:function(){return arguments.length?this.dateBox.dateValue.apply(this.dateBox,arguments):this.dateBox.dateOption.apply(this.dateBox,["value"])}}),g1=af.inherit({NAME:"Calendar",supportedKeys:function(){var e=function(t){return this.option("opened")?(t.preventDefault(),!0):!1};return{rightArrow:function(){if(this.option("opened"))return!0},leftArrow:function(){if(this.option("opened"))return!0},enter:(function(t){if(this.dateBox.option("opened"))if(t.preventDefault(),this._widget.option("zoomLevel")===this._widget.option("maxZoomLevel")){var i=this._getContouredValue(),n=this._lastActionElement,r=this._closeDropDownByEnter();return r&&i&&n==="calendar"&&this.dateBoxValue(i,t),r&&this.dateBox.close(),this.dateBox._valueChangeEventHandler(t),!r}else return!0;else this.dateBox._valueChangeEventHandler(t)}).bind(this),home:e,end:e}},getDisplayFormat:function(e){return e||"shortdate"},_closeDropDownByEnter:()=>!0,_getWidgetName:function(){return _1},_getContouredValue:function(){return this._widget._view.option("contouredDate")},getKeyboardListener(){return this._widget},_getWidgetOptions:function(){var e=this.dateBox.option("disabledDates");return O(this.dateBox.option("calendarOptions"),{value:this.dateBoxValue()||null,dateSerializationFormat:null,min:this.dateBox.dateOption("min"),max:this.dateBox.dateOption("max"),onValueChanged:this._valueChangedHandler.bind(this),onCellClick:this._cellClickHandler.bind(this),tabIndex:null,disabledDates:Ee(e)?this._injectComponent(e.bind(this.dateBox)):e,onContouredChanged:this._refreshActiveDescendant.bind(this),skipFocusCheck:!0})},_injectComponent:function(e){var t=this;return function(i){return O(i,{component:t.dateBox}),e(i)}},_refreshActiveDescendant:function(e){this._lastActionElement="calendar",this.dateBox.setAria("activedescendant",e.actionValue)},popupConfig:function(e){var t=e.toolbarItems,i=this.dateBox.option("buttonsLocation"),n=[];return i!=="default"?n=Eo(i):n=["bottom","center"],this.dateBox.option("applyValueMode")==="useButtons"&&this._isCalendarVisible()&&t.unshift({widget:"dxButton",toolbar:n[0],location:n[1]==="after"?"before":n[1],options:{onInitialized:(function(r){r.component.registerKeyHandler("escape",this._escapeHandler.bind(this))}).bind(this),onClick:r=>{this._widget._toTodayView(r)},text:ue.format("dxCalendar-todayButtonText"),type:"today"}}),O(!0,e,{toolbarItems:t,position:{collision:"flipfit flip"},width:"auto"})},_isCalendarVisible:function(){return Rn(this.dateBox.option("calendarOptions"))||this.dateBox.option("calendarOptions.visible")!==!1},_escapeHandler:function(){this.dateBox.close(),this.dateBox.focus()},_valueChangedHandler:function(e){var t=this.dateBox,i=e.value,n=e.previousValue;Pe.sameDate(i,n)||t.option("applyValueMode")==="instantly"&&this.dateBoxValue(this.getValue(),e.event)},_updateValue:function(){this._widget&&this._widget.option("value",this.dateBoxValue())},textChangedHandler:function(){this._lastActionElement="input",this.dateBox.option("opened")&&this._widget&&this._updateValue(!0)},_cellClickHandler:function(e){var t=this.dateBox;t.option("applyValueMode")==="instantly"&&(t.option("opened",!1),this.dateBoxValue(this.getValue(),e.event))}});class Xq{constructor(t){this.DIRECTION_HORIZONTAL="horizontal",this.DIRECTION_VERTICAL="vertical",this.DIRECTION_BOTH="both",this.direction=t??nh}get isHorizontal(){return this.direction===CD||this.direction===hp}get isVertical(){return this.direction===nh||this.direction===hp}get isBoth(){return this.direction===hp}}function Zq(e,t){if(Ye(e)){var i=Ft(e.left,e.x),n=Ft(e.top,e.y);return{left:E(i)?i:void 0,top:E(n)?n:void 0}}var{isHorizontal:r,isVertical:a}=new Xq(t);return{left:r&&E(e)?e:void 0,top:a&&E(e)?e:void 0}}var Qq="dx-dateviewroller",Jq="dx-state-active",eY="dx-dateviewroller-current",CS="dx-dateview-item",tY="dx-dateview-item-selected",iY="dx-dateview-item-selected-frame",nY="dx-dateview-item-selected-border";class m1 extends cn{_getDefaultOptions(){return O(super._getDefaultOptions(),{showScrollbar:"never",useNative:!1,selectedIndex:0,bounceEnabled:!1,items:[],showOnClick:!1,onClick:null,onSelectedIndexChanged:null,scrollByContent:!0})}_init(){super._init(),this.option("onVisibilityChange",this._visibilityChangedHandler.bind(this)),this.option("onEnd",this._endActionHandler.bind(this))}_render(){super._render(),this._renderSelectedItemFrame(),this.$element().addClass(Qq),this._renderContainerClick(),this._renderItems(),this._renderSelectedValue(),this._renderItemsClick(),this._renderWheelEvent(),this._renderSelectedIndexChanged()}_renderSelectedIndexChanged(){this._selectedIndexChanged=this._createActionByOption("onSelectedIndexChanged")}_renderWheelEvent(){D.on(v(this.container()),"dxmousewheel",t=>{this._isWheelScrolled=!0})}_renderContainerClick(){if(this.option("showOnClick")){var t=me(ct,this.NAME),i=this._createActionByOption("onClick");D.off(v(this.container()),t),D.on(v(this.container()),t,function(n){i({event:n})})}}_renderItems(){var t=this.option("items")||[],i=v();v(this.content()).empty(),t.forEach(function(n){i=i.add(v("<div>").addClass(CS).append(n))}),v(this.content()).append(i),this._$items=i,this.update()}_renderSelectedItemFrame(){v("<div>").addClass(iY).append(v("<div>").addClass(nY)).appendTo(v(this.container()))}_renderSelectedValue(t){var i=this._fitIndex(t??this.option("selectedIndex"));this._moveTo({top:this._getItemPosition(i)}),this._renderActiveStateItem()}_fitIndex(t){var i=this.option("items")||[],n=i.length;return t>=n?n-1:t<0?0:t}_getItemPosition(t){return Math.round(this._itemHeight()*t)}_renderItemsClick(){var t=this._getItemSelector(),i=me(ct,this.NAME);D.off(this.$element(),i,t),D.on(this.$element(),i,t,this._itemClickHandler.bind(this))}_getItemSelector(){return"."+CS}_itemClickHandler(t){this.option("selectedIndex",this._itemElementIndex(t.currentTarget))}_itemElementIndex(t){return this._itemElements().index(t)}_itemElements(){return this.$element().find(this._getItemSelector())}_renderActiveStateItem(){var t=this.option("selectedIndex");F(this._$items,function(i){v(this).toggleClass(tY,t===i)})}_shouldScrollToNeighborItem(){return Oe.real().deviceType==="desktop"&&this._isWheelScrolled}_moveTo(t){var{top:i,left:n}=Zq(t),r=this.scrollOffset(),a={x:r.left-n,y:r.top-i};if(this._isVisible()&&(a.x||a.y))if(this._prepareDirections(!0),this._animation&&!this._shouldScrollToNeighborItem()){var o=this;$t.stop(v(this.content())),$t.animate(v(this.content()),{duration:200,type:"slide",to:{top:Math.floor(a.y)},complete(){Ru(v(o.content())),o.handleMove({delta:a})}}),delete this._animation}else this.handleMove({delta:a})}_validate(t){return this._moveIsAllowed(t)}_fitSelectedIndexInRange(t){var i=this.option("items").length;return Math.max(Math.min(t,i-1),0)}_isInNullNeighborhood(t){return-.1<=t&&t<=.1}_getSelectedIndexAfterScroll(t){var i=this.scrollOffset().top,n=t*this._itemHeight(),r=i-n;if(this._isInNullNeighborhood(r))return t;var a=r>0?1:-1,o=this._fitSelectedIndexInRange(t+a);return o}_getNewSelectedIndex(t){if(this._shouldScrollToNeighborItem())return this._getSelectedIndexAfterScroll(t);this._animation=!0;var i=this.scrollOffset().top/this._itemHeight();return Math.round(i)}_endActionHandler(){var t=this.option("selectedIndex"),i=this._getNewSelectedIndex(t);i===t?this._renderSelectedValue(i):this.option("selectedIndex",i),this._isWheelScrolled=!1}_itemHeight(){var t=this._$items.first();return je(t)}_toggleActive(t){this.$element().toggleClass(Jq,t)}_isVisible(){return v(this.container()).is(":visible")}_fireSelectedIndexChanged(t,i){this._selectedIndexChanged({value:t,previousValue:i,event:void 0})}_visibilityChanged(t){super._visibilityChanged(t),this._visibilityChangedHandler(t)}_visibilityChangedHandler(t){t&&(this._visibilityTimer=setTimeout(()=>{this._renderSelectedValue(this.option("selectedIndex"))})),this.toggleActiveState(!1)}toggleActiveState(t){this.$element().toggleClass(eY,t)}_refreshSelectedIndex(){var t=this.option("selectedIndex"),i=this._fitIndex(t);i===t?this._renderActiveStateItem():this.option("selectedIndex",i)}_optionChanged(t){switch(t.name){case"selectedIndex":this._fireSelectedIndexChanged(t.value,t.previousValue),this._renderSelectedValue(t.value);break;case"items":this._renderItems(),this._refreshSelectedIndex();break;case"onClick":case"showOnClick":this._renderContainerClick();break;case"onSelectedIndexChanged":this._renderSelectedIndexChanged();break;default:super._optionChanged(t)}}_dispose(){clearTimeout(this._visibilityTimer),super._dispose()}}tt("dxDateViewRoller",m1);var ev="dx-dateview",rY="dx-dateview-compact",aY="dx-dateview-wrapper",oY="dx-dateview-rollers",sY="dx-dateviewroller",yS={date:"date",datetime:"datetime",time:"time"},Zi={year:"year",month:"month",day:"day",hours:"hours"},C1=Gn.inherit({_valueOption:function(){var e=this.option("value"),t=new Date(e);return!e||isNaN(t)?this._getDefaultDate():t},_getDefaultDate:function(){var e=new Date;return this.option("type")===yS.date?new Date(e.getFullYear(),e.getMonth(),e.getDate()):e},_getDefaultOptions:function(){return O(this.callBase(),{minDate:ht.MIN_DATEVIEW_DEFAULT_DATE,maxDate:ht.MAX_DATEVIEW_DEFAULT_DATE,type:yS.date,value:new Date,applyCompactClass:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(e){return e.deviceType!=="desktop"},options:{applyCompactClass:!0}}])},_render:function(){this.callBase(),this.$element().addClass(ev),this._toggleFormatClasses(this.option("type")),this._toggleCompactClass()},_toggleFormatClasses:function(e,t){this.$element().addClass(ev+"-"+e),t&&this.$element().removeClass(ev+"-"+t)},_toggleCompactClass:function(){this.$element().toggleClass(rY,this.option("applyCompactClass"))},_wrapper:function(){return this._$wrapper},_renderContentImpl:function(){this._$wrapper=v("<div>").addClass(aY),this._renderRollers(),this._$wrapper.appendTo(this.$element())},_renderRollers:function(){this._$rollersContainer||(this._$rollersContainer=v("<div>").addClass(oY)),this._$rollersContainer.empty(),this._createRollerConfigs(),this._rollers={};var e=this;F(e._rollerConfigs,function(t){var i=v("<div>").appendTo(e._$rollersContainer).addClass(sY+"-"+e._rollerConfigs[t].type);e._rollers[e._rollerConfigs[t].type]=e._createComponent(i,m1,{items:e._rollerConfigs[t].displayItems,selectedIndex:e._rollerConfigs[t].selectedIndex,showScrollbar:"never",scrollByContent:!0,onStart:function(n){var r=n.component;r._toggleActive(!0),e._setActiveRoller(e._rollerConfigs[t],r.option("selectedIndex"))},onEnd:function(n){var r=n.component;r._toggleActive(!1)},onClick:function(n){var r=n.component;r._toggleActive(!0),e._setActiveRoller(e._rollerConfigs[t],r.option("selectedIndex")),e._setRollerState(e._rollerConfigs[t],r.option("selectedIndex")),r._toggleActive(!1)},onSelectedIndexChanged:function(n){var r=n.component;e._setRollerState(e._rollerConfigs[t],r.option("selectedIndex"))}})}),e._$rollersContainer.appendTo(e._wrapper())},_createRollerConfigs:function(e){var t=this;e=e||t.option("type"),t._rollerConfigs={},Ze.getFormatParts(ht.FORMATS_MAP[e]).forEach(function(i){t._createRollerConfig(i)})},_createRollerConfig:function(e){for(var t=ht.DATE_COMPONENTS_INFO[e],i=this._calculateRollerConfigValueRange(e),n=i.startValue,r=i.endValue,a=t.formatter,o=this._getCurrentDate(),s={type:e,setValue:t.setter,valueItems:[],displayItems:[],getIndex:function(u){return u[t.getter]()-n}},l=n;l<=r;l++)s.valueItems.push(l),s.displayItems.push(a(l,o));s.selectedIndex=s.getIndex(o),this._rollerConfigs[e]=s},_setActiveRoller:function(e){var t=e&&this._rollers[e.type];F(this._rollers,function(){this.toggleActiveState(this===t)})},_updateRollersPosition:function(){var e=this;F(this._rollers,function(t){var i=e._rollerConfigs[t].getIndex(e._getCurrentDate());this.option("selectedIndex",i)})},_setRollerState:function(e,t){if(t!==e.selectedIndex){var i=e.valueItems[t],n=e.setValue,r=new Date(this._getCurrentDate()),a=r.getDate(),o=this.option("minDate"),s=this.option("maxDate");e.type===Zi.month?a=Math.min(a,ht.getMaxMonthDay(r.getFullYear(),i)):e.type===Zi.year&&(a=Math.min(a,ht.getMaxMonthDay(i,r.getMonth()))),r.setDate(a),r[n](i);var l=Pe.normalizeDate(r,o,s);r=ht.mergeDates(l,r,"time"),r=Pe.normalizeDate(r,o,s),this.option("value",r),e.selectedIndex=t}e.type===Zi.year&&this._refreshRollers(),e.type===Zi.month&&(this._refreshRoller(Zi.day),this._refreshRoller(Zi.hours))},_refreshRoller:function(e){var t=this._rollers[e];if(t){this._createRollerConfig(e);var i=this._rollerConfigs[e];(e===Zi.day||i.displayItems.toString()!==t.option("items").toString())&&t.option({items:i.displayItems,selectedIndex:i.selectedIndex})}},_getCurrentDate:function(){var e=this._valueOption(),t=this.option("minDate"),i=this.option("maxDate");return Pe.normalizeDate(e,t,i)},_calculateRollerConfigValueRange:function(e){var t=this._getCurrentDate(),i=this.option("minDate"),n=this.option("maxDate"),r=Pe.sameYear(t,i),a=r&&t.getMonth()===i.getMonth(),o=Pe.sameYear(t,n),s=o&&t.getMonth()===n.getMonth(),l=a&&t.getDate()===i.getDate(),u=s&&t.getDate()===n.getDate(),d=ht.DATE_COMPONENTS_INFO[e],c=d.startValue,h=d.endValue;return e===Zi.year&&(c=i.getFullYear(),h=n.getFullYear()),e===Zi.month&&(r&&(c=i.getMonth()),o&&(h=n.getMonth())),e===Zi.day&&(h=ht.getMaxMonthDay(t.getFullYear(),t.getMonth()),r&&a&&(c=i.getDate()),o&&s&&(h=n.getDate())),e===Zi.hours&&(c=l?i.getHours():c,h=u?n.getHours():h),{startValue:c,endValue:h}},_refreshRollers:function(){this._refreshRoller(Zi.month),this._refreshRoller(Zi.day),this._refreshRoller(Zi.hours)},_optionChanged:function(e){switch(e.name){case"minDate":case"maxDate":case"type":this._renderRollers(),this._toggleFormatClasses(e.value,e.previousValue);break;case"visible":this.callBase(e),e.value&&this._renderRollers();break;case"value":this.option("value",this._valueOption()),this._refreshRollers(),this._updateRollersPosition();break;default:this.callBase(e)}},_clean:function(){this.callBase(),delete this._$rollersContainer}});tt("dxDateView",C1);var lY=qe(),uY=af.inherit({NAME:"DateView",getDefaultOptions:function(){return O(this.callBase(),{openOnFieldClick:!0,applyButtonText:ue.format("OK"),"dropDownOptions.showTitle":!0})},getDisplayFormat:function(e){return e||ht.FORMATS_MAP[this.dateBox.option("type")]},popupConfig:function(e){return{toolbarItems:this.dateBox._popupToolbarItemsConfig(),onInitialized:e.onInitialized,defaultOptionsRules:[{device:{platform:"android"},options:{width:333,height:331}},{device:function(t){var i=t.platform;return i==="generic"||i==="ios"},options:{width:"auto",height:"auto"}},{device:function(t){var i=t.platform,n=t.phone;return i==="generic"&&n},options:{width:333,maxWidth:"100%",maxHeight:"100%",height:"auto",position:{collision:"flipfit flip"}}},{device:{platform:"ios",phone:!0},options:{width:"100%",position:{my:"bottom",at:"bottom",of:lY}}}]}},_renderWidget:function(){if(Lh(this.dateBox.option("mode"))&&this.dateBox._isNativeType()||this.dateBox.option("readOnly")){this._widget&&(this._widget.$element().remove(),this._widget=null);return}var e=this._getPopup();if(this._widget)this._widget.option(this._getWidgetOptions());else{var t=v("<div>").appendTo(e.$content());this._widget=this._createWidget(t)}this._widget.$element().appendTo(this._getWidgetContainer())},_getWidgetName:function(){return C1},renderOpenedState:function(){this.callBase(),this._widget&&this._widget.option("value",this._widget._getCurrentDate())},_getWidgetOptions:function(){return{value:this.dateBoxValue()||new Date,type:this.dateBox.option("type"),minDate:this.dateBox.dateOption("min")||new Date(1900,0,1),maxDate:this.dateBox.dateOption("max")||new Date(Date.now()+50*ht.ONE_YEAR),onDisposing:(function(){this._widget=null}).bind(this)}}}),dY=af.inherit({NAME:"Native",popupConfig:function(e){return O({},e,{width:"auto"})},getParsedText:function(e){return e?this.dateBox.option("type")==="datetime"?new Date(e.replace(/-/g,"/").replace("T"," ").split(".")[0]):ht.fromStandardDateFormat(e):null},renderPopupContent:ee,_getWidgetName:ee,_getWidgetOptions:ee,_getDateBoxType:function(){var e=this.dateBox.option("type");return ht.SUPPORTED_FORMATS.includes(e)?e==="datetime"&&!Lh(e)&&(e="datetime-local"):e="date",e},customizeButtons:function(){var e=this.dateBox.getButton("dropDown");Oe.real().android&&e&&e.on("click",(function(){this.dateBox._input().get(0).click()}).bind(this))},getDefaultOptions:function(){return{mode:this._getDateBoxType()}},getDisplayFormat:function(e){var t=this._getDateBoxType();return e||ht.FORMATS_MAP[t]},renderInputMinMax:function(e){e.attr({min:li.serializeDate(this.dateBox.dateOption("min"),"yyyy-MM-dd"),max:li.serializeDate(this.dateBox.dateOption("max"),"yyyy-MM-dd")})}}),xS="dx-box",bS=".dx-box",cY="dx-box-item",vs="dxBoxItemData",y1={row:"minWidth",col:"minHeight"},x1={row:"maxWidth",col:"maxHeight"},ng=1,SS={start:"flex-start",end:"flex-end",center:"center","space-between":"space-between","space-around":"space-around"},ES={start:"flex-start",end:"flex-end",center:"center",stretch:"stretch"},hY={row:"row",col:"column"},Qo=(e,t,i)=>{if(i=ws(t,i),e.style[xa(t)]=i,!Ke()){if(i===""||!E(i))return;var n=Zg(t),r=n+": "+i+";";e.attributes.style?e.attributes.style.value.indexOf(r)<0&&(e.attributes.style.value+=" "+r):e.setAttribute("style",r)}},fY="dxBox",tv="dxupdate."+fY,wS="dx-box-fallback-item",pY={row:"nowrap",col:"normal"},qa={row:{name:"width",getter:$e,setter:wu},col:{name:"height",getter:je,setter:fn}},Gd={row:qa.col,col:qa.row},Ud={row:"marginLeft",col:"marginTop"},iv={row:"marginRight",col:"marginBottom"},nv={row:"marginTop",col:"marginLeft"},IS={row:"marginBottom",col:"marginRight"},vY={marginLeft:"marginRight",marginRight:"marginLeft"};class _Y extends Do{_renderVisible(t,i){super._renderVisible(t),E(i)&&this._options.fireItemStateChangedAction({name:"visible",state:t,oldState:i})}}class gY{constructor(t,i){this._$element=t,this._option=i,this.initSize=ee,this.update=ee}renderBox(){this._$element.css({display:pc("flexDirection")+"flex"}),Qo(this._$element.get(0),"flexDirection",hY[this._option("direction")])}renderAlign(){this._$element.css({justifyContent:this._normalizedAlign()})}_normalizedAlign(){var t=this._option("align");return t in SS?SS[t]:t}renderCrossAlign(){this._$element.css({alignItems:this._normalizedCrossAlign()})}_normalizedCrossAlign(){var t=this._option("crossAlign");return t in ES?ES[t]:t}renderItems(t){var i=pc("flexDirection"),n=this._option("direction");F(t,function(){var r=v(this),a=r.data(vs);r.css({display:i+"flex"}).css(x1[n],a.maxSize||"none").css(y1[n],a.minSize||"0"),Qo(r.get(0),"flexBasis",a.baseSize||0),Qo(r.get(0),"flexGrow",a.ratio),Qo(r.get(0),"flexShrink",E(a.shrink)?a.shrink:ng),r.children().each((o,s)=>{v(s).css({width:"auto",height:"auto",display:pc("flexDirection")+"flex",flexBasis:0}),Qo(s,"flexGrow",1),Qo(s,"flexDirection",v(s)[0].style.flexDirection||"column")})})}}class mY{constructor(t,i){this._$element=t,this._option=i}renderBox(){this._$element.css({fontSize:0,whiteSpace:pY[this._option("direction")],verticalAlign:"top"}),D.off(this._$element,tv),D.on(this._$element,tv,this.update.bind(this))}renderAlign(){var t=this._$items;if(t){var i=this._option("align"),n=this.totalItemSize,r=this._option("direction"),a=qa[r].getter(this._$element),o=a-n,s=0;switch(this._setItemsMargins(t,r,0),i){case"start":break;case"end":s=o,t.first().css(this._chooseMarginSide(Ud[r]),s);break;case"center":s=.5*o,t.first().css(this._chooseMarginSide(Ud[r]),s),t.last().css(this._chooseMarginSide(iv[r]),s);break;case"space-between":s=.5*o/(t.length-1),this._setItemsMargins(t,r,s),t.first().css(this._chooseMarginSide(Ud[r]),0),t.last().css(this._chooseMarginSide(iv[r]),0);break;case"space-around":s=.5*o/t.length,this._setItemsMargins(t,r,s)}}}_setItemsMargins(t,i,n){t.css(this._chooseMarginSide(Ud[i]),n).css(this._chooseMarginSide(iv[i]),n)}renderCrossAlign(){var t=this._$items;if(t){var i=this._option("crossAlign"),n=this._option("direction"),r=Gd[n].getter(this._$element),a=this;switch(i){case"start":break;case"end":F(t,function(){var o=v(this),s=Gd[n].getter(o),l=r-s;o.css(a._chooseMarginSide(nv[n]),l)});break;case"center":F(t,function(){var o=v(this),s=Gd[n].getter(o),l=.5*(r-s);o.css(a._chooseMarginSide(nv[n]),l).css(a._chooseMarginSide(IS[n]),l)});break;case"stretch":t.css(a._chooseMarginSide(nv[n]),0).css(a._chooseMarginSide(IS[n]),0).css(Gd[n].name,"100%")}}}_chooseMarginSide(t){return this._option("rtlEnabled")&&vY[t]||t}renderItems(t){this._$items=t;var i=this._option("direction"),n=0,r=0,a=0;F(t,(u,d)=>{var c=v(d);c.css({display:"inline-block",verticalAlign:"top"}),qa[i].setter(c,"auto"),c.removeClass(wS);var h=c.data(vs),f=h.ratio||0,p=this._baseSize(c),g=E(h.shrink)?h.shrink:ng;n+=f,r+=g*p,a+=p});var o=this._boxSize()-a,s=u=>{var d=u.data(vs),c=this._baseSize(u),h=o>=0?d.ratio||0:(E(d.shrink)?d.shrink:ng)*c,f=o>=0?n:r,p=f?Math.round(o*h/f):0;return c+p},l=0;F(t,(u,d)=>{var c=v(d),h=v(d).data(vs),f=s(c);l+=f,c.css(x1[i],h.maxSize||"none").css(y1[i],h.minSize||"0").css(qa[i].name,f),c.addClass(wS)}),this.totalItemSize=l}_baseSize(t){var i=v(t).data(vs);return i.baseSize==null?0:i.baseSize==="auto"?this._contentSize(t):this._parseSize(i.baseSize)}_contentSize(t){return qa[this._option("direction")].getter(v(t))}_parseSize(t){return String(t).match(/.+%$/)?.01*parseFloat(t)*this._boxSizeValue:t}_boxSize(t){if(!arguments.length)return this._boxSizeValue=this._boxSizeValue||this._totalBaseSize(),this._boxSizeValue;this._boxSizeValue=t}_totalBaseSize(){var t=0;return F(this._$items,(i,n)=>{t+=this._baseSize(n)}),t}initSize(){this._boxSize(qa[this._option("direction")].getter(this._$element))}update(){if(!(!this._$items||this._$element.is(":hidden"))){this._$items.detach(),this.initSize(),this._$element.append(this._$items),this.renderItems(this._$items),this.renderAlign(),this.renderCrossAlign();var t=this._$element.get(0);this._$items.find(bS).each(function(){t===v(this).parent().closest(bS).get(0)&&D.triggerHandler(this,tv)})}}}class Ca extends Ro{_getDefaultOptions(){return O(super._getDefaultOptions(),{direction:"row",align:"start",crossAlign:"stretch",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,_layoutStrategy:"flex",_queue:void 0})}_itemClass(){return cY}_itemDataKey(){return vs}_itemElements(){return this._itemContainer().children(this._itemSelector())}_init(){super._init(),this.$element().addClass("".concat(xS,"-").concat(this.option("_layoutStrategy"))),this._initLayout(),this._initBoxQueue()}_initLayout(){this._layout=this.option("_layoutStrategy")==="fallback"?new mY(this.$element(),this.option.bind(this)):new gY(this.$element(),this.option.bind(this))}_initBoxQueue(){this._queue=this.option("_queue")||[]}_queueIsNotEmpty(){return this.option("_queue")?!1:!!this._queue.length}_pushItemToQueue(t,i){this._queue.push({$item:t,config:i})}_shiftItemFromQueue(){return this._queue.shift()}_initMarkup(){this.$element().addClass(xS),this._layout.renderBox(),super._initMarkup(),this._renderAlign(),this._renderActions()}_renderActions(){this._onItemStateChanged=this._createActionByOption("onItemStateChanged")}_renderAlign(){this._layout.renderAlign(),this._layout.renderCrossAlign()}_renderItems(t){for(this._layout.initSize(),super._renderItems(t);this._queueIsNotEmpty();){var i=this._shiftItemFromQueue();this._createComponent(i.$item,Ca,O({_layoutStrategy:this.option("_layoutStrategy"),itemTemplate:this.option("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this.option("onItemHold"),onItemClick:this.option("onItemClick"),onItemContextMenu:this.option("onItemContextMenu"),onItemRendered:this.option("onItemRendered"),_queue:this._queue},i.config))}this._layout.renderItems(this._itemElements()),clearTimeout(this._updateTimer),this._updateTimer=setTimeout(()=>{this._isUpdated||this._layout.update(),this._isUpdated=!1,this._updateTimer=null})}_renderItemContent(t){var i=t.itemData&&t.itemData.node;return i?this._renderItemContentByNode(t,i):super._renderItemContent(t)}_postprocessRenderItem(t){var i=t.itemData.box;i&&this._pushItemToQueue(t.itemContent,i)}_createItemByTemplate(t,i){return i.itemData.box?t.source?t.source():v():super._createItemByTemplate(t,i)}_visibilityChanged(t){t&&this._dimensionChanged()}_dimensionChanged(){this._updateTimer||(this._isUpdated=!0,this._layout.update())}_dispose(){clearTimeout(this._updateTimer),super._dispose.apply(this,arguments)}_itemOptionChanged(t,i,n,r){i==="visible"&&this._onItemStateChanged({name:i,state:n,oldState:r!==!1}),super._itemOptionChanged(t,i,n)}_optionChanged(t){switch(t.name){case"_layoutStrategy":case"_queue":case"direction":this._invalidate();break;case"align":this._layout.renderAlign();break;case"crossAlign":this._layout.renderCrossAlign();break;default:super._optionChanged(t)}}_itemOptions(){var t=super._itemOptions();return t.fireItemStateChangedAction=i=>{this._onItemStateChanged(i)},t}repaint(){this._dimensionChanged()}}Ca.ItemClass=_Y;tt("dxBox",Ca);var CY="dx-timeview",yY="dx-timeview-clock",xY="dx-timeview-field",bY="dx-timeview-hourarrow",SY="dx-timeview-time-separator",EY="dx-timeview-format12",rv=-1,av=1,wY="dx-timeview-minutearrow",TS=function(e,t,i){IY(e,t,i)},IY=function(e,t,i){e.css("transform","rotate("+t+"deg) translate(0,"+i+"px)")},b1=Gn.inherit({_getDefaultOptions:function(){return O(this.callBase(),{value:new Date(Date.now()),use24HourFormat:!0,_showClock:!0,_arrowOffset:5,stylingMode:void 0})},_getValue:function(){return this.option("value")||new Date},_init:function(){this.callBase(),this.$element().addClass(CY)},_render:function(){this.callBase(),this._renderBox(),this._updateTime()},_renderBox:function(){var e=v("<div>").appendTo(this.$element()),t=[];this.option("_showClock")&&t.push({ratio:1,shrink:0,baseSize:"auto",template:this._renderClock.bind(this)}),t.push({ratio:0,shrink:0,baseSize:"auto",template:this._renderField.bind(this)}),this._createComponent(e,Ca,{height:"100%",width:"100%",direction:"col",items:t})},_renderClock:function(e,t,i){this._$hourArrow=v("<div>").addClass(bY),this._$minuteArrow=v("<div>").addClass(wY);var n=v(i);n.addClass(yY).append(this._$hourArrow).append(this._$minuteArrow),this.setAria("role","presentation",n)},_updateClock:function(){var e=this._getValue(),t=e.getHours()/12*360+e.getMinutes()/60*30,i=e.getMinutes()/60*360;TS(this._$hourArrow,t,this.option("_arrowOffset")),TS(this._$minuteArrow,i,this.option("_arrowOffset"))},_getBoxItems:function(e){var t=[{ratio:0,shrink:0,baseSize:"auto",template:()=>this._hourBox.$element()},{ratio:0,shrink:0,baseSize:"auto",template:v("<div>").addClass(SY).text(Ze.getTimeSeparator())},{ratio:0,shrink:0,baseSize:"auto",template:()=>this._minuteBox.$element()}];return e&&t.push({ratio:0,shrink:0,baseSize:"auto",template:()=>this._format12.$element()}),t},_renderField:function(){var e=!this.option("use24HourFormat");return this._createHourBox(e),this._createMinuteBox(),e&&this._createFormat12Box(),this._createComponent(v("<div>").addClass(xY),Ca,{direction:"row",align:"center",crossAlign:"center",items:this._getBoxItems(e)}).$element()},_createHourBox:function(e){var t=this._hourBox=this._createComponent(v("<div>"),hh,O({min:-1,max:e?13:24,value:this._getValue().getHours(),onValueChanged:this._onHourBoxValueChanged.bind(this),onKeyboardHandled:i=>this._keyboardHandler(i)},this._getNumberBoxConfig()));t.setAria("label","hours")},_isPM:function(){return!this.option("use24HourFormat")&&this._format12.option("value")===1},_onHourBoxValueChanged:function(e){var{value:t,component:i}=e,n=this._getValue(),r=new Date(n),a=this._convertMaxHourToMin(t);i.option("value",a),this._isPM()&&(a+=12),r.setHours(a),ht.normalizeTime(r),this.option("value",r)},_convertMaxHourToMin:function(e){var t=this.option("use24HourFormat")?24:12;return(t+e)%t},_createMinuteBox:function(){var e=this._minuteBox=this._createComponent(v("<div>"),hh,O({min:-1,max:60,value:this._getValue().getMinutes(),onKeyboardHandled:t=>this._keyboardHandler(t),onValueChanged:t=>{var{value:i,component:n}=t,r=(60+i)%60;n.option("value",r);var a=new Date(this._getValue());a.setMinutes(r),ht.normalizeTime(a),this.option("value",a)}},this._getNumberBoxConfig()));e.setAria("label","minutes")},_createFormat12Box:function(){var e=Ze.getPeriodNames(),t=this._format12=this._createComponent(v("<div>").addClass(EY),xC,{items:[{value:rv,text:e[0]},{value:av,text:e[1]}],valueExpr:"value",displayExpr:"text",onKeyboardHandled:i=>this._keyboardHandler(i),onValueChanged:i=>{var{value:n}=i,r=this._getValue().getHours(),a=new Date(this._getValue()),o=(r+12*n)%24;a.setHours(o),this.option("value",a)},value:this._getValue().getHours()>=12?av:rv,stylingMode:this.option("stylingMode")});t.setAria("label","type")},_refreshFormat12:function(){if(!this.option("use24HourFormat")){var e=this._getValue(),t=e.getHours(),i=t>=12,n=i?av:rv;this._silentEditorValueUpdate(this._format12,n)}},_silentEditorValueUpdate:function(e,t){e&&(e._suppressValueChangeAction(),e.option("value",t),e._resumeValueChangeAction())},_getNumberBoxConfig:function(){return{showSpinButtons:!0,displayValueFormatter:function(e){return(e<10?"0":"")+e},stylingMode:this.option("stylingMode")}},_normalizeHours:function(e){return this.option("use24HourFormat")?e:e%12||12},_updateField:function(){var e=this._normalizeHours(this._getValue().getHours());this._silentEditorValueUpdate(this._hourBox,e),this._silentEditorValueUpdate(this._minuteBox,this._getValue().getMinutes()),this._refreshFormat12()},_updateTime:function(){this.option("_showClock")&&this._updateClock(),this._updateField()},_visibilityChanged:function(e){e&&this._updateTime()},_optionChanged:function(e){switch(e.name){case"value":this._updateTime(),this.callBase(e);break;case"_arrowOffset":break;case"use24HourFormat":case"_showClock":case"stylingMode":this._invalidate();break;default:this.callBase(e)}}});tt("dxTimeView",b1);var TY=qe(),AY=573,DY="dx-datebox-adaptivity-mode",AS="dx-datebox-datetime-time-side",OY=g1.inherit({NAME:"CalendarWithTime",getDefaultOptions:function(){return O(this.callBase(),{applyValueMode:"useButtons",buttonsLocation:"bottom after","dropDownOptions.showTitle":!1})},_closeDropDownByEnter:function(){return Pe.sameDate(this._getContouredValue(),this.widgetOption("value"))},getDisplayFormat:function(e){return e||"shortdateshorttime"},_is24HourFormat:function(){return Ze.is24HourFormat(this.getDisplayFormat(this.dateBox.option("displayFormat")))},_getContouredValue:function(){var e=this.callBase();return this._updateDateTime(e)},_renderWidget:function(){this.callBase(),this._timeView=this.dateBox._createComponent(v("<div>"),b1,{value:this.dateBoxValue(),_showClock:!this._isShrinkView(),use24HourFormat:this._is24HourFormat(),onValueChanged:this._valueChangedHandler.bind(this),stylingMode:this.dateBox.option("stylingMode")}),this._timeView.registerKeyHandler("escape",this._escapeHandler.bind(this))},renderOpenedState:function(){this.callBase();var e=this._getPopup();e&&e.$wrapper().toggleClass(DY,this._isSmallScreen()),clearTimeout(this._repaintTimer),this._repaintTimer=setTimeout((function(){this._getPopup()&&this._getPopup().repaint()}).bind(this),0)},isAdaptivityChanged:function(){var e=this._isShrinkView(),t=this._currentAdaptiveMode;return e!==t?(this._currentAdaptiveMode=e,t!==void 0):this.callBase()},_updateValue:function(e){var t=this.dateBoxValue();!t&&!e&&(t=new Date,ht.normalizeTime(t)),this.callBase(),this._timeView&&(t&&this._timeView.option("value",t),this._timeView.option("use24HourFormat",this._is24HourFormat()))},_isSmallScreen:function(){return $e(TY)<=AY},_isShrinkView:function(){return!this.dateBox.option("showAnalogClock")||this.dateBox.option("adaptivityEnabled")&&this._isSmallScreen()},_getBoxItems:function(){var e=[{ratio:0,shrink:0,baseSize:"auto",name:"calendar"}];return this._isShrinkView()||e.push({ratio:0,shrink:0,baseSize:"auto",name:"time"}),e},renderPopupContent:function(){this.callBase(),this._currentAdaptiveMode=this._isShrinkView();var e=this._getPopup().$content();this._box=this.dateBox._createComponent(v("<div>").appendTo(e),Ca,{direction:"row",crossAlign:"stretch",items:this._getBoxItems(),itemTemplate:(function(t,i,n){var r=v("<div>");switch(t.name){case"calendar":r.append(this._widget.$element()),this._isShrinkView()&&(this._timeView.$element().addClass(AS),r.append(this._timeView.$element()));break;case"time":r.append(this._timeView.$element()),v(n).addClass(AS)}return r}).bind(this)}),this._attachTabHandler()},popupConfig:function(e){var t=this.callBase(e),i=O(t,{width:"auto",onShowing:(function(){if(this._box.option("_layoutStrategy")==="fallback"){var n=this._getPopup().$content().find(".dx-timeview-clock").css("minWidth");this._timeView.$element().css("maxWidth",n)}}).bind(this)});return i},getFirstPopupElement:function(){return this._timeView._hourBox.$element().find("input")},_attachTabHandler:function(){var e=this.dateBox;this._timeView._hourBox.registerKeyHandler("tab",function(t){t.shiftKey&&(t.preventDefault(),e.focus())})},_preventFocusOnPopup:function(e){v(e.target).hasClass("dx-texteditor-input")||(this.callBase.apply(this,arguments),this.dateBox._hasFocusClass()||this.dateBox.focus())},_updateDateTime:function(e){var t=this._timeView.option("value");return e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e},getValue:function(){var e,t=(e=this._widget.option("value"))!==null&&e!==void 0?e:this._widget.getContouredDate();return t=t?new Date(t):new Date,this._updateDateTime(t)},dispose:function(){clearTimeout(this._removeMinWidthTimer),clearTimeout(this._repaintTimer),this.callBase()}}),RY=qe(),kY="date",BY={min:new Date(0,0,0,0,0),max:new Date(0,0,0,23,59)},LY=af.inherit({NAME:"List",supportedKeys:function(){return{tab:function(){var{opened:e,applyValueMode:t}=this.option();e&&t==="instantly"&&this.close()},space:ee,home:ee,end:ee}},getDefaultOptions:function(){return O(this.callBase(),{applyValueMode:"instantly"})},getDisplayFormat:function(e){return e||"shorttime"},popupConfig:function(e){return e},getValue:function(){var e=this._widget.option("selectedIndex");if(e===-1)return this.dateBox.option("value");var t=this._widgetItems[e];return this._getDateByItemData(t)},useCurrentDateByDefault:function(){return!0},getDefaultDate:function(){return new Date(null)},popupShowingHandler:function(){this.dateBox._dimensionChanged()},_renderWidget:function(){this.callBase(),this._refreshItems()},_getWidgetName:function(){return Bo},_getWidgetOptions:function(){return{itemTemplate:this._timeListItemTemplate.bind(this),onItemClick:this._listItemClickHandler.bind(this),tabIndex:-1,onFocusedItemChanged:this._refreshActiveDescendant.bind(this),selectionMode:"single"}},_refreshActiveDescendant:function(e){this.dateBox.setAria("activedescendant",""),this.dateBox.setAria("activedescendant",e.actionValue)},_refreshItems:function(){this._widgetItems=this._getTimeListItems(),this._widget.option("items",this._widgetItems)},renderOpenedState:function(){this._widget&&(this._widget.option("focusedElement",null),this._setSelectedItemsByValue(),this._widget.option("templatesRenderAsynchronously")?this._asyncScrollTimeout=setTimeout(this._scrollToSelectedItem.bind(this)):this._scrollToSelectedItem())},dispose:function(){this.callBase(),clearTimeout(this._asyncScrollTimeout)},_updateValue:function(){this._widget&&(this._refreshItems(),this._setSelectedItemsByValue(),this._scrollToSelectedItem())},_setSelectedItemsByValue:function(){var e=this.dateBoxValue(),t=this._getDateIndex(e);t===-1?this._widget.option("selectedItems",[]):this._widget.option("selectedIndex",t)},_scrollToSelectedItem:function(){this._widget.scrollToItem(this._widget.option("selectedIndex"))},_getDateIndex:function(e){for(var t=-1,i=0,n=this._widgetItems.length;i<n;i++)if(this._areDatesEqual(e,this._widgetItems[i])){t=i;break}return t},_areDatesEqual:function(e,t){return Mi(e)&&Mi(t)&&e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes()},_getTimeListItems:function(){var e=this.dateBox.dateOption("min")||this._getBoundaryDate("min"),t=this.dateBox.dateOption("max")||this._getBoundaryDate("max"),i=this.dateBox.dateOption("value")||null,n=t-e,r=e.getMinutes()%this.dateBox.option("interval");return n<0?[]:(n>ht.ONE_DAY&&(n=ht.ONE_DAY),i-e<ht.ONE_DAY?this._getRangeItems(e,new Date(e),n):(e=this._getBoundaryDate("min"),e.setMinutes(r),i&&Math.abs(i-t)<ht.ONE_DAY&&(n=(60*t.getHours()+Math.abs(t.getMinutes()-r))*ht.ONE_MINUTE),this._getRangeItems(e,new Date(e),n)))},_getRangeItems:function(e,t,i){for(var n=[],r=this.dateBox.option("interval");t-e<=i;)n.push(new Date(t)),t.setMinutes(t.getMinutes()+r);return n},_getBoundaryDate:function(e){var t=BY[e],i=new Date(Ft(this.dateBox.dateOption("value"),0));return new Date(i.getFullYear(),i.getMonth(),i.getDate(),t.getHours(),t.getMinutes())},_timeListItemTemplate:function(e){var t=this.dateBox.option("displayFormat");return Ze.format(e,this.getDisplayFormat(t))},_listItemClickHandler:function(e){if(this.dateBox.option("applyValueMode")!=="useButtons"){var t=this._getDateByItemData(e.itemData);this.dateBox.option("opened",!1),this.dateBoxValue(t,e.event)}},_getDateByItemData:function(e){var t=this.dateBox.option("value"),i=e.getHours(),n=e.getMinutes(),r=e.getSeconds(),a=e.getFullYear(),o=e.getMonth(),s=e.getDate();return t?(this.dateBox.option("dateSerializationFormat")?t=li.deserializeDate(t):t=new Date(t),t.setHours(i),t.setMinutes(n),t.setSeconds(r),t.setFullYear(a),t.setMonth(o),t.setDate(s)):t=new Date(a,o,s,i,n,0,0),t},getKeyboardListener:function(){return this._widget},_updatePopupHeight:function(){var e=mC(this.dateBox.option("dropDownOptions.height"));if(e===void 0||e==="auto"){this.dateBox._setPopupOption("height","auto");var t=at(this._widget.$element()),i=.45*je(RY);this.dateBox._setPopupOption("height",Math.min(t,i))}this.dateBox._timeList&&this.dateBox._timeList.updateDimensions()},getParsedText:function(e,t){var i=this.callBase(e,t);return i&&(i=ht.mergeDates(i,new Date(null),kY)),i}}),pl=qe(),vl="dx-datebox",PY="dx-auto-width",FY="dx-show-invalid-badge",MY="dx-clear-button-area",Kd="dx-datebox-wrapper",VY="dx-dropdowneditor-overlay",on={calendar:"calendar",rollers:"rollers",list:"list",native:"native"},xn={date:"date",datetime:"datetime",time:"time"},_l={calendar:"Calendar",dateView:"DateView",native:"Native",calendarWithTime:"CalendarWithTime",list:"List"},NY={Calendar:g1,DateView:uY,Native:dY,CalendarWithTime:OY,List:LY},HY=CC.inherit({_supportedKeys:function(){return O(this.callBase(),this._strategy.supportedKeys())},_renderButtonContainers:function(){this.callBase.apply(this,arguments),this._strategy.customizeButtons()},_getDefaultOptions:function(){return O(this.callBase(),{type:"date",showAnalogClock:!0,value:null,dateSerializationFormat:void 0,min:void 0,max:void 0,displayFormat:null,interval:30,disabledDates:null,pickerType:on.calendar,invalidDateMessage:ue.format("dxDateBox-validation-datetime"),dateOutOfRangeMessage:ue.format("validation-range"),applyButtonText:ue.format("OK"),adaptivityEnabled:!1,calendarOptions:{},useHiddenSubmitElement:!0})},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{"dropDownOptions.showTitle":!0}},{device:{platform:"android"},options:{buttonsLocation:"bottom after"}},{device:function(){var e=Oe.real(),t=e.platform;return t==="ios"||t==="android"},options:{pickerType:on.native}},{device:{platform:"generic",deviceType:"desktop"},options:{buttonsLocation:"bottom after"}}])},_initOptions:function(e){this._userOptions=O({},e),this.callBase(e),this._updatePickerOptions()},_updatePickerOptions:function(){var e=this.option("pickerType"),t=this.option("type");e===on.list&&(t===xn.datetime||t===xn.date)&&(e=on.calendar),t===xn.time&&e===on.calendar&&(e=on.list),this.option("showDropDownButton",Oe.real().platform!=="generic"||e!==on.native),this._pickerType=e},_init:function(){this._initStrategy(),this.option(O({},this._strategy.getDefaultOptions(),this._userOptions)),delete this._userOptions,this.callBase()},_toLowerCaseFirstLetter:function(e){return e.charAt(0).toLowerCase()+e.substr(1)},_initStrategy:function(){var e=this._getStrategyName(this._getFormatType()),t=NY[e];this._strategy&&this._strategy.NAME===e||(this._strategy=new t(this))},_getFormatType:function(){var e=this.option("type"),t=/h|m|s/g.test(e),i=/d|M|Y/g.test(e),n="";return i&&(n+=xn.date),t&&(n+=xn.time),n},_getStrategyName:function(e){var t=this._pickerType;return t===on.rollers?_l.dateView:t===on.native?_l.native:e===xn.date?_l.calendar:e===xn.datetime?_l.calendarWithTime:_l.list},_initMarkup:function(){this.$element().addClass(vl),this.callBase(),this._refreshFormatClass(),this._refreshPickerTypeClass(),this._strategy.renderInputMinMax(this._input())},_render:function(){this.callBase(),this._formatValidationIcon()},_renderDimensions:function(){this.callBase(),this.$element().toggleClass(PY,!this.option("width")),this._dimensionChanged()},_dimensionChanged:function(){if(this.callBase(arguments),this._popup){var e,t;(e=(t=this._strategy)._updatePopupHeight)===null||e===void 0||e.call(t)}},_refreshFormatClass:function(){var e=this.$element();F(xn,function(t,i){e.removeClass(vl+"-"+i)}),e.addClass(vl+"-"+this.option("type"))},_refreshPickerTypeClass:function(){var e=this.$element();F(on,function(t,i){e.removeClass(vl+"-"+i)}),e.addClass(vl+"-"+this._pickerType)},_formatValidationIcon:function(){if(Ke()){var e=this._input().get(0),t=this.option("rtlEnabled"),i=this._getClearButtonWidth(),n=this._getLongestElementDimensions(),r=parseFloat(pl.getComputedStyle(e).width)-i,a=n.width>r,o=e.style;this.$element().toggleClass(FY,!a),a?(this._storedPadding===void 0&&(this._storedPadding=t?n.leftPadding:n.rightPadding),t?o.paddingLeft=0:o.paddingRight=0):t?o.paddingLeft=this._storedPadding+"px":o.paddingRight=this._storedPadding+"px"}},_getClearButtonWidth:function(){var e=0;if(this._isClearButtonVisible()&&this._input().val()===""){var t=this.$element().find("."+MY).get(0);e=parseFloat(pl.getComputedStyle(t).width)}return e},_getLongestElementDimensions:function(){var e=this._strategy.getDisplayFormat(this.option("displayFormat")),t=Ze.format(ht.getLongestDate(e,Ze.getMonthNames(),Ze.getDayNames()),e),i=this._input(),n=i.get(0),r=MV(i,t),a=this._storedPadding!==void 0,o=a?this._storedPadding:0;r.appendTo(this.$element());var s=parseFloat(pl.getComputedStyle(r.get(0)).width),l=parseFloat(pl.getComputedStyle(n).paddingRight),u=parseFloat(pl.getComputedStyle(n).paddingLeft),d=s+u+l+o;return r.remove(),{width:d,leftPadding:u,rightPadding:l}},_getKeyboardListeners(){return this.callBase().concat([this._strategy&&this._strategy.getKeyboardListener()])},_renderPopup:function(){this.callBase(),this._popup.$wrapper().addClass(Kd),this._renderPopupWrapper()},_popupConfig:function(){var e=this.callBase();return O(this._strategy.popupConfig(e),{title:this._getPopupTitle(),dragEnabled:!1})},_renderPopupWrapper:function(){if(this._popup){var e=this.$element(),t=O({},xn,on);F(t,(function(i,n){e.removeClass(Kd+"-"+n)}).bind(this)),this._popup.$wrapper().addClass(Kd+"-"+this.option("type")).addClass(Kd+"-"+this._pickerType).addClass(VY)}},_renderPopupContent:function(){this.callBase(),this._strategy.renderPopupContent()},_getFirstPopupElement:function(){return this._strategy.getFirstPopupElement()||this.callBase()},_getLastPopupElement:function(){return this._strategy.getLastPopupElement()||this.callBase()},_popupShowingHandler:function(){this.callBase(),this._strategy.popupShowingHandler()},_popupShownHandler:function(){this.callBase(),this._strategy.renderOpenedState()},_popupHiddenHandler:function(){this.callBase(),this._strategy.renderOpenedState(),this._strategy.popupHiddenHandler()},_visibilityChanged:function(e){e&&this._formatValidationIcon()},_clearValueHandler:function(e){this.option("text",""),this.callBase(e)},_readOnlyPropValue:function(){if(this._pickerType===on.rollers)return!0;var e=Oe.real().platform,t=this._isNativeType()&&(e==="ios"||e==="android");return t?this.option("readOnly"):this.callBase()},_isClearButtonVisible:function(){return this.callBase()&&!this._isNativeType()},_renderValue:function(){var e=this.dateOption("value");return this.option("text",this._getDisplayedText(e)),this._strategy.renderValue(),this.callBase()},_setSubmitValue:function(){var e=this.dateOption("value"),t=this.option("dateSerializationFormat"),i=ht.SUBMIT_FORMATS_MAP[this.option("type")],n=t?li.serializeDate(e,t):ht.toStandardDateFormat(e,i);this._getSubmitElement().val(n)},_getDisplayedText:function(e){var t=this.option("mode"),i;if(t==="text"){var n=this._strategy.getDisplayFormat(this.option("displayFormat"));i=Ze.format(e,n)}else{var r=this._getFormatByMode(t);r?i=Ze.format(e,r):i=ht.toStandardDateFormat(e,t)}return i},_getFormatByMode:function(e){return Lh(e)?null:ht.FORMATS_MAP[e]},_valueChangeEventHandler:function(e){var{text:t,type:i,validationError:n}=this.option(),r=this.dateOption("value");if(t===this._getDisplayedText(r)){(!n||n.editorSpecific)&&(this._applyInternalValidation(r),this._applyCustomValidation(r));return}var a=this._getParsedDate(t),o=r??this._getDateByDefault(),s=ht.mergeDates(o,a,i),l=a&&i==="time"?s:a;if(this._applyInternalValidation(l).isValid){var u=this._getDisplayedText(s);o&&s&&o.getTime()===s.getTime()&&u!==t?this._renderValue():this.dateValue(s,e)}},_getDateByDefault:function(){return this._strategy.useCurrentDateByDefault()&&this._strategy.getDefaultDate()},_getParsedDate:function(e){var t=this._strategy.getDisplayFormat(this.option("displayFormat")),i=this._strategy.getParsedText(e,t);return i??void 0},_applyInternalValidation(e){var t=this.option("text"),i=!!t&&e!==null,n=!!e&&Mi(e)&&!isNaN(e.getTime()),r=n&&Pe.dateInRange(e,this.dateOption("min"),this.dateOption("max"),this.option("type")),a=!i&&!e||r,o="";return n?r||(o=this.option("dateOutOfRangeMessage")):o=this.option("invalidDateMessage"),this.option({isValid:a,validationError:a?null:{editorSpecific:!0,message:o}}),{isValid:a,isDate:n}},_applyCustomValidation:function(e){this.validationRequest.fire({editor:this,value:this._serializeDate(e)})},_isValueChanged:function(e){var t=this.dateOption("value"),i=t&&t.getTime(),n=e&&e.getTime();return i!==n},_isTextChanged:function(e){var t=this.option("text"),i=e&&this._getDisplayedText(e)||"";return t!==i},_renderProps:function(){this.callBase(),this._input().attr("autocomplete","off")},_renderOpenedState:function(){this._isNativeType()||this.callBase(),this._strategy.isAdaptivityChanged()&&this._refreshStrategy()},_getPopupTitle:function(){var e=this.option("placeholder");if(e)return e;var t=this.option("type");return t===xn.time?ue.format("dxDateBox-simulatedDataPickerTitleTime"):t===xn.date||t===xn.datetime?ue.format("dxDateBox-simulatedDataPickerTitleDate"):""},_refreshStrategy:function(){this._strategy.dispose(),this._initStrategy(),this.option(this._strategy.getDefaultOptions()),this._refresh()},_applyButtonHandler:function(e){var t=this._strategy.getValue(),{isValid:i,isDate:n}=this._applyInternalValidation(t);if(i)this.dateValue(t,e.event);else if(n){var r=this._getDisplayedText(t);this.option("text",r),this._renderDisplayText(r)}this.callBase()},_dispose:function(){var e;this.callBase(),(e=this._strategy)===null||e===void 0||e.dispose()},_isNativeType:function(){return this._pickerType===on.native},_updatePopupTitle:function(){var e;(e=this._popup)===null||e===void 0||e.option("title",this._getPopupTitle())},_optionChanged:function(e){switch(e.name){case"showClearButton":case"buttons":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"pickerType":this._updatePickerOptions({pickerType:e.value}),this._refreshStrategy(),this._refreshPickerTypeClass(),this._invalidate();break;case"type":this._updatePickerOptions({format:e.value}),this._refreshStrategy(),this._refreshFormatClass(),this._renderPopupWrapper(),this._formatValidationIcon(),this._updateValue();break;case"placeholder":this.callBase.apply(this,arguments),this._updatePopupTitle();break;case"min":case"max":var t=this.option("isValid");this._applyInternalValidation(this.dateOption("value")),t||this._applyCustomValidation(this.dateOption("value")),this._invalidate();break;case"dateSerializationFormat":case"interval":case"disabledDates":case"calendarOptions":this._invalidate();break;case"displayFormat":this.option("text",this._getDisplayedText(this.dateOption("value"))),this._renderInputValue();break;case"text":this._strategy.textChangedHandler(e.value),this.callBase.apply(this,arguments);break;case"isValid":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"showDropDownButton":this._formatValidationIcon(),this.callBase.apply(this,arguments);break;case"readOnly":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"invalidDateMessage":case"dateOutOfRangeMessage":case"adaptivityEnabled":case"showAnalogClock":break;default:this.callBase.apply(this,arguments)}},_getSerializationFormat:function(){var e=this.option("value");if(this.option("dateSerializationFormat")&&It().forceIsoDateParsing)return this.option("dateSerializationFormat");if(xt(e))return"number";if(Me(e))return li.getDateSerializationFormat(e)},_updateValue:function(e){this.callBase(),this._applyInternalValidation(e??this.dateOption("value"))},dateValue:function(e,t){var i=this._isValueChanged(e);return i&&t&&this._saveValueChangeEvent(t),i||(this._isTextChanged(e)?this._updateValue(e):this.option("text")===""&&this._applyCustomValidation(e)),this.dateOption("value",e)},dateOption:function(e,t){if(arguments.length===1)return li.deserializeDate(this.option(e));this.option(e,this._serializeDate(t))},_serializeDate:function(e){var t=this._getSerializationFormat();return li.serializeDate(e,t)},_clearValue:function(){var e=this.option("value");this.callBase(),e===null&&this._applyCustomValidation(null)},reset:function(){var e=this.option("value");this.callBase(),e===null&&this._applyInternalValidation(null)}}),Jo="dateBoxMask",Qr=1,es=-1,$Y=HY.inherit({_supportedKeys(e){var t=this.callBase(e),i=r=>{var a=t[Nt(r)];return a&&a.apply(this,[r])},n=(r,a)=>this._shouldUseOriginalHandler(r)?i.apply(this,[r]):a.apply(this,[r]);return O({},t,{del:r=>n(r,a=>{this._revertPart(Qr),this._isAllSelected()||a.preventDefault()}),backspace:r=>n(r,a=>{this._revertPart(es),this._isAllSelected()||a.preventDefault()}),home:r=>n(r,a=>{this._selectFirstPart(),a.preventDefault()}),end:r=>n(r,a=>{this._selectLastPart(),a.preventDefault()}),escape:r=>n(r,a=>{this._revertChanges(a)}),enter:r=>n(r,a=>{this._enterHandler(a)}),leftArrow:r=>n(r,a=>{this._selectNextPart(es),a.preventDefault()}),rightArrow:r=>n(r,a=>{this._selectNextPart(Qr),a.preventDefault()}),upArrow:r=>n(r,a=>{this._upDownArrowHandler(Qr),a.preventDefault()}),downArrow:r=>n(r,a=>{this._upDownArrowHandler(es),a.preventDefault()})})},_shouldUseOriginalHandler(e){var t=this.option("opened")&&e&&["backspace","del"].indexOf(Nt(e))===-1;return!this._useMaskBehavior()||t||e&&e.altKey},_upDownArrowHandler(e){this._setNewDateIfEmpty();var t=this._getActivePartValue(this._initialMaskValue),i=this._getActivePartValue(),n=i-t;this._loadMaskValue(this._initialMaskValue),this._partIncrease(n+e,!0)},_getDefaultOptions(){return O(this.callBase(),{useMaskBehavior:!1,emptyDateValue:new Date(2e3,0,1,0,0,0)})},_isSingleCharKey(e){var{originalEvent:t,alt:i}=e,n=t.data||t.key;return typeof n=="string"&&n.length===1&&!i&&!fi(t)},_isSingleDigitKey(e){var t,i=(t=e.originalEvent)===null||t===void 0?void 0:t.data;return(i==null?void 0:i.length)===1&&parseInt(i,10)},_useBeforeInputEvent:function(){return Oe.real().android},_keyInputHandler(e,t){var i=this._input().val();this._processInputKey(t),e.preventDefault();var n=i!==this._input().val();n&&D.trigger(this._input(),"input")},_keyboardHandler(e){var t=e.originalEvent.key,i=this.callBase(e);return!this._useMaskBehavior()||this._useBeforeInputEvent()||(Bt.chrome&&e.key==="Process"&&e.code.indexOf("Digit")===0?(t=e.code.replace("Digit",""),this._processInputKey(t),this._maskInputHandler=()=>{this._renderSelectedPart()}):this._isSingleCharKey(e)&&this._keyInputHandler(e.originalEvent,t)),i},_maskBeforeInputHandler(e){this._maskInputHandler=null;var{inputType:t}=e.originalEvent;t==="insertCompositionText"&&(this._maskInputHandler=()=>{this._renderSelectedPart()});var i=t==="deleteContentBackward",n=t==="deleteContentForward";if(i||n){var r=i?es:Qr;this._maskInputHandler=()=>{this._revertPart(),this._selectNextPart(r)}}if(!(!this._useMaskBehavior()||!this._isSingleCharKey(e))){var a=e.originalEvent.data;return this._keyInputHandler(e,a),!0}},_keyPressHandler(e){var{originalEvent:t}=e;(t==null?void 0:t.inputType)==="insertCompositionText"&&this._isSingleDigitKey(e)&&(this._processInputKey(t.data),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()),this.callBase(e),this._maskInputHandler&&(this._maskInputHandler(),this._maskInputHandler=null)},_processInputKey(e){this._isAllSelected()&&(this._activePartIndex=0),this._setNewDateIfEmpty(),isNaN(parseInt(e))?this._searchString(e):this._searchNumber(e)},_isAllSelected(){var e=this._caret();return e.end-e.start===this.option("text").length},_getFormatPattern(){if(this._formatPattern)return this._formatPattern;var e=this._strategy.getDisplayFormat(this.option("displayFormat")),t=Me(e)&&!Ze._getPatternByFormat(e);return t?this._formatPattern=e:this._formatPattern=wm(function(i){return Ze.format(i,e)}),this._formatPattern},_setNewDateIfEmpty(){if(!this._maskValue){var e=this.option("type")==="time"?new Date(null):new Date;this._maskValue=e,this._initialMaskValue=e,this._renderDateParts()}},_partLimitsReached(e){var t=String(e).length,i=this._getActivePartProp("pattern").length,n=i===1,r=n?t:Math.min(i,t),a=this._searchValue.length===r,o=parseInt(this._searchValue+"0")>e;return a||o},_searchNumber(e){var{max:t}=this._getActivePartLimits(),i=String(t).length;this._searchValue=(this._searchValue+e).substr(-i),isNaN(this._searchValue)&&(this._searchValue=e),this._setActivePartValue(this._searchValue),this._partLimitsReached(t)&&this._selectNextPart(Qr)},_searchString(e){if(isNaN(parseInt(this._getActivePartProp("text")))){for(var t=this._getActivePartProp("limits")(this._maskValue),i=this._searchValue+e.toLowerCase(),n=t.max-t.min,r=0;r<=n;r++)if(this._loadMaskValue(this._initialMaskValue),this._partIncrease(r+1),this._getActivePartProp("text").toLowerCase().indexOf(i)===0){this._searchValue=i;return}this._setNewDateIfEmpty(),this._searchValue&&(this._clearSearchValue(),this._searchString(e))}},_clearSearchValue(){this._searchValue=""},_revertPart:function(e){if(!this._isAllSelected()){var t=this._getActivePartValue(this.option("emptyDateValue"));this._setActivePartValue(t),this._selectNextPart(e)}this._clearSearchValue()},_useMaskBehavior(){return this.option("useMaskBehavior")&&this.option("mode")==="text"},_prepareRegExpInfo(){this._regExpInfo=yA(this._getFormatPattern(),Ze);var e=this._regExpInfo.regexp,t=e.source,i=e.flags,n=new RegExp(/(\{[0-9]+,?[0-9]*\})/),r=t.split(n).map(a=>n.test(a)?a:yt.convertDigits(a,!1)).join("");this._regExpInfo.regexp=new RegExp(r,i)},_initMaskState(){this._activePartIndex=0,this._formatPattern=null,this._prepareRegExpInfo(),this._loadMaskValue()},_renderMask(){this.callBase(),this._detachMaskEvents(),this._clearMaskState(),this._useMaskBehavior()&&(this._attachMaskEvents(),this._initMaskState(),this._renderDateParts())},_renderDateParts(){if(this._useMaskBehavior()){var e=this.option("text")||this._getDisplayedText(this._maskValue);e&&(this._dateParts=gq(e,this._regExpInfo),this._input().is(":hidden")||this._selectNextPart())}},_detachMaskEvents(){D.off(this._input(),"."+Jo)},_attachMaskEvents(){D.on(this._input(),me("dxclick",Jo),this._maskClickHandler.bind(this)),D.on(this._input(),me("paste",Jo),this._maskPasteHandler.bind(this)),D.on(this._input(),me("drop",Jo),()=>{this._renderSelectedPart()}),D.on(this._input(),me("compositionend",Jo),this._maskCompositionEndHandler.bind(this)),this._useBeforeInputEvent()&&D.on(this._input(),me("beforeinput",Jo),this._maskBeforeInputHandler.bind(this))},_renderSelectedPart(){this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()},_selectLastPart(){this.option("text")&&(this._activePartIndex=this._dateParts.length,this._selectNextPart(es))},_selectFirstPart(){this.option("text")&&(this._activePartIndex=-1,this._selectNextPart(Qr))},_onMouseWheel(e){this._useMaskBehavior()&&this._partIncrease(e.delta>0?Qr:es,e)},_selectNextPart(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;if(!(!this.option("text")||this._disposed)){e&&(this._initialMaskValue=new Date(this._maskValue));var t=Di(this._activePartIndex+e,0,this._dateParts.length-1);if(this._dateParts[t].isStub){var i=t===0&&e<0||t===this._dateParts.length-1&&e>0;if(i)t=this._activePartIndex;else{this._selectNextPart(e>=0?e+1:e-1);return}}this._activePartIndex!==t&&this._clearSearchValue(),this._activePartIndex=t,this._caret(this._getActivePartProp("caret"))}},_getRealLimitsPattern(){if(this._getActivePartProp("pattern")[0]==="d")return"dM"},_getActivePartLimits(e){var t=this._getActivePartProp("limits");return t(this._maskValue,e&&this._getRealLimitsPattern())},_getActivePartValue(e){e=e||this._maskValue;var t=this._getActivePartProp("getter");return Ee(t)?t(e):e[t]()},_addLeadingZeroes(e){var t=this._searchValue.match(/^0+/),i=this._getActivePartLimits(),n=String(i.max).length;return((t&&t[0]||"")+String(e)).substr(-n)},_setActivePartValue(e,t){t=t||this._maskValue;var i=this._getActivePartProp("setter"),n=this._getActivePartLimits();e=Br(e,n.min,n.max)?e:e%10,e=this._addLeadingZeroes(Di(e,n.min,n.max)),Ee(i)?i(t,e):t[i](e),this._renderDisplayText(this._getDisplayedText(t)),this._renderDateParts()},_getActivePartProp(e){if(!(!this._dateParts||!this._dateParts[this._activePartIndex]))return this._dateParts[this._activePartIndex][e]},_loadMaskValue(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dateOption("value");this._maskValue=e&&new Date(e),this._initialMaskValue=e&&new Date(e)},_saveMaskValue(){var e=this._maskValue&&new Date(this._maskValue);e&&this.option("type")==="date"&&e.setHours(0,0,0,0),this._initialMaskValue=new Date(e),this.dateOption("value",e)},_revertChanges(){this._loadMaskValue(),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts()},_renderDisplayText(e){this.callBase(e),this._useMaskBehavior()&&this.option("text",e)},_partIncrease(e,t){this._setNewDateIfEmpty();var{max:i,min:n}=this._getActivePartLimits(t),r=i-n;r===1&&r++;var a=e+this._getActivePartValue();a>i?a=this._applyLimits(a,{limitBase:n,limitClosest:i,limitDelta:r}):a<n&&(a=this._applyLimits(a,{limitBase:i,limitClosest:n,limitDelta:r})),this._setActivePartValue(a)},_applyLimits(e,t){var{limitBase:i,limitClosest:n,limitDelta:r}=t,a=(e-n)%r;return a?i+a-1*Ds(a):n},_maskClickHandler(){this.option("text")&&(this._activePartIndex=mq(this._dateParts,this._caret().start),this._isAllSelected()||(E(this._activePartIndex)?this._caret(this._getActivePartProp("caret")):this._selectLastPart()))},_maskCompositionEndHandler(e){this._input().val(this._getDisplayedText(this._maskValue)),this._selectNextPart(),this._maskInputHandler=()=>{this._renderSelectedPart()}},_maskPasteHandler(e){var t=this._replaceSelectedText(this.option("text"),this._caret(),m_(e)),i=Ze.parse(t,this._getFormatPattern());i&&this._isDateValid(i)&&(this._maskValue=i,this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts(),this._selectNextPart()),e.preventDefault()},_isDateValid:e=>Mi(e)&&!isNaN(e),_isValueDirty(){var e=this.dateOption("value");return(this._maskValue&&this._maskValue.getTime())!==(e&&e.getTime())},_fireChangeEvent(){this._clearSearchValue(),this._isValueDirty()&&D.trigger(this._input(),"change")},_enterHandler(e){this._fireChangeEvent(),this._selectNextPart(Qr),e.preventDefault()},_focusOutHandler(e){var t=this._useMaskBehavior()&&!e.isDefaultPrevented();t?(this._fireChangeEvent(),this.callBase(e),this._selectFirstPart(e)):this.callBase(e)},_valueChangeEventHandler(e){var t=this.option("text");this._useMaskBehavior()?(this._saveValueChangeEvent(e),t?this._maskValue===null&&this._loadMaskValue(t):this._maskValue=null,this._saveMaskValue()):this.callBase(e)},_optionChanged(e){switch(e.name){case"useMaskBehavior":this._renderMask();break;case"displayFormat":case"mode":this.callBase(e),this._renderMask();break;case"value":this._loadMaskValue(),this.callBase(e),this._renderDateParts();break;case"emptyDateValue":break;default:this.callBase(e)}},_clearMaskState(){this._clearSearchValue(),delete this._dateParts,delete this._activePartIndex,delete this._maskValue},reset(){this.callBase(),this._clearMaskState(),this._activePartIndex=0},_clean(){this.callBase(),this._detachMaskEvents(),this._clearMaskState()}});tt("dxDateBox",$Y);var{isWrapped:WY}=Fi,zY="checkbox-size",GY="dx-editor-inline-block",S1=function(){var e=function(a,o){return O(a,{readOnly:o.readOnly,placeholder:o.placeholder,inputAttr:{id:o.id},tabIndex:o.tabIndex},o.editorOptions)},t=function(){return Bt.mozilla||Oe.real().ios},i=function(a){var o={},s=t(),l=a.sharedData||o;return e({placeholder:a.placeholder,width:a.width,value:a.value,onValueChanged:function(u){var d=a.parentType==="filterRow"||a.parentType==="searchPanel",c=u.event&&(u.event.type==="input"||u.event.type==="keyup"),h=function(f,p){a&&a.setValue(f.value,p)};clearTimeout(o.valueChangeTimeout),c&&d?l.valueChangeTimeout=o.valueChangeTimeout=setTimeout(function(){h(u,o.valueChangeTimeout!==l.valueChangeTimeout)},E(a.updateValueTimeout)?a.updateValueTimeout:0):h(u)},onKeyDown:function(u){s&&Nt(u.event)==="enter"&&D.trigger(v(u.component._input()),"change")},valueChangeEvent:"change"+(a.parentType==="filterRow"?" keyup input":"")},a)},n=function(a){a.parentType==="filterRow"||a.parentType==="filterBuilder"?r(O(a,{lookup:{displayExpr:function(o){if(o===!0)return a.trueText||"true";if(o===!1)return a.falseText||"false"},dataSource:[!0,!1]}})):function(o){o.editorName="dxCheckBox",o.editorOptions=e({elementAttr:{id:o.id},value:E(o.value)?o.value:void 0,hoverStateEnabled:!o.readOnly,focusStateEnabled:!o.readOnly,activeStateEnabled:!1,onValueChanged:function(s){o.setValue&&o.setValue(s.value,s)}},o)}(a)};function r(a){var o=a.lookup,s,l,u,d=a.parentType==="filterRow";if(o){s=mt(o.displayExpr),l=o.dataSource,Ee(l)&&!WY(l)&&(l=l(a.row||{}),function(h){if(h.row&&h.row.watch&&h.parentType==="dataRow"){var f=h.editorOptions||{};h.editorOptions=f;var p,g=f.onInitialized;f.onInitialized=function(x){g&&g.apply(this,arguments),p=x.component,p.on("disposing",C)};var m,C=h.row.watch(()=>(m=h.lookup.dataSource(h.row),m&&m.filter),()=>{p.option("dataSource",m)},x=>{h.row=x})}}(a)),(He(l)||Array.isArray(l))&&(l=Ws(l),d&&(u=l.postProcess,l.postProcess=function(h){return this.pageIndex()===0&&(h=h.slice(0),h.unshift(null)),u?u.call(this,h):h}));var c=!!(o.allowClearing&&!d);a.editorName="dxSelectBox",a.editorOptions=e({searchEnabled:!0,value:a.value,valueExpr:a.lookup.valueExpr,searchExpr:a.lookup.searchExpr||a.lookup.displayExpr,allowClearing:c,showClearButton:c,displayExpr:function(h){return h===null?a.showAllText:s(h)},dataSource:l,onValueChanged:function(h){var f=[h.value];!d&&f.push(h.component.option("text")),a.setValue.apply(this,f)}},a)}}return{createEditor:function(a,o){if(o.cancel=!1,o.editorElement=Fe(a),E(o.tabIndex)||(o.tabIndex=this.option("tabIndex")),o.lookup)r(o);else switch(o.dataType){case"date":case"datetime":(function(s){s.editorName="dxDateBox",s.editorOptions=e({value:s.value,onValueChanged:function(l){s.setValue(l.value)},onKeyDown:function(l){var{component:u,event:d}=l,c=u.option("useMaskBehavior");(t()||c)&&Nt(d)==="enter"&&(u.blur(),u.focus())},displayFormat:s.format,type:s.dataType,dateSerializationFormat:null,width:s.parentType==="filterBuilder"?void 0:"auto"},s)})(o);break;case"boolean":n(o);break;case"number":(function(s){var l=i(s);l.value=E(s.value)?s.value:null,s.editorName="dxNumberBox",s.editorOptions=l})(o);break;default:(function(s){var l=i(s),u=s.parentType==="searchPanel";s.editorType&&s.editorType!=="dxTextBox"?l.value=s.value:l.value=(d=s.value,E(d)?d.toString():"");var d;l.valueChangeEvent+=u?" keyup input search":"",l.mode=l.mode||(u?"search":"text"),s.editorName="dxTextBox",s.editorOptions=l})(o)}o.parentType==="dataRow"&&o.editorType&&(o.editorName=o.editorType),this.executeAction("onEditorPreparing",o),!o.cancel&&(o.parentType==="dataRow"&&!o.isOnForm&&!E(o.editorOptions.showValidationMark)&&(o.editorOptions.showValidationMark=!1),function(s,l){var u=v(l.editorElement);if(l.editorName&&l.editorOptions&&u[l.editorName]){if((l.editorName==="dxCheckBox"||l.editorName==="dxSwitch")&&(l.isOnForm||(u.addClass(s.addWidgetPrefix(zY)),u.parent().addClass(GY))),s._createComponent(u,l.editorName,l.editorOptions),l.editorName==="dxDateBox"){var d=u.dxDateBox("instance"),c=d._supportedKeys().enter;d.registerKeyHandler("enter",h=>(d.option("opened")&&c(h),!0))}l.editorName==="dxTextArea"&&u.dxTextArea("instance").registerKeyHandler("enter",function(h){Nt(h)==="enter"&&!h.ctrlKey&&!h.shiftKey&&h.stopPropagation()})}}(this,o),this.executeAction("onEditorPrepared",o))}}}(),UY="dx-editor-inline-block",ov="dx-cell-focus-disabled",DS="focus-overlay",KY="content",sv="dx-focused",jY="dx-row",E1="dxDataGridEditorFactory",OS=me([ut.down,"focusin",ct].join(" "),E1),lv="dx-hidden",qY=Tt.ViewController.inherit({_getFocusedElement:function(e){var t=this.option("focusedRowEnabled")?"tr[tabindex]:focus":"tr[tabindex]:not(.dx-data-row):focus",i="td[tabindex]:focus, ".concat(t,", input:focus, textarea:focus, .dx-lookup-field:focus, .dx-checkbox:focus, .dx-switch:focus, .dx-dropdownbutton .dx-buttongroup:focus"),n=e.find(i);return this.elementIsInsideGrid(n)&&n},_getFocusCellSelector:function(){return".dx-row > td"},_updateFocusCore:function(){var e=this._$focusedElement,t=this.component&&this.component.$element(),i,n;if(t&&(e=this._getFocusedElement(t),e&&e.length&&(!e.hasClass(ov)&&!e.hasClass(jY)&&(i=e.closest(this._getFocusCellSelector()+", ."+ov),n=i.get(0)!==e.get(0)&&i.hasClass(UY),e=i),e.length&&!e.hasClass(ov)))){this.focus(e,n);return}this.loseFocus()},_updateFocus:function(e){var t=this,i=e&&e.event&&v(e.event.target).hasClass(t.addWidgetPrefix(DS));t._isFocusOverlay=t._isFocusOverlay||i,clearTimeout(t._updateFocusTimeoutID),t._updateFocusTimeoutID=setTimeout(function(){delete t._updateFocusTimeoutID,t._isFocusOverlay||t._updateFocusCore(),t._isFocusOverlay=!1})},_updateFocusOverlaySize:function(e,t){e.hide();var i=mi.calculate(e,O({collision:"fit"},t));i.h.oversize>0&&ny(e,lt(e)-i.h.oversize),i.v.oversize>0&&ry(e,at(e)-i.v.oversize),e.show()},callbackNames:function(){return["focused"]},focus:function(e,t){var i=this;if(e===void 0)return i._$focusedElement;e&&(e.is(i._$focusedElement)||i._$focusedElement&&i._$focusedElement.removeClass(sv),i._$focusedElement=e,clearTimeout(i._focusTimeoutID),i._focusTimeoutID=setTimeout(function(){delete i._focusTimeoutID,i.renderFocusOverlay(e,t),e.addClass(sv),i.focused.fire(e)}))},refocus:function(){var e=this.focus();this.focus(e)},renderFocusOverlay:function(e,t){if(xe.isElementInCurrentGrid(this,e)){if(this._$focusOverlay||(this._$focusOverlay=v("<div>").addClass(this.addWidgetPrefix(DS))),t)this._$focusOverlay.addClass(lv);else if(e.length){var i=Bt.mozilla?"right bottom":"left top",n=e.closest("."+this.addWidgetPrefix(KY)),r=Gt(e.get(0));this._$focusOverlay.removeClass(lv).appendTo(n),ry(this._$focusOverlay,r.bottom-r.top+1),ny(this._$focusOverlay,r.right-r.left+1);var a={precise:!0,my:i,at:i,of:e,boundary:n.length&&n};this._updateFocusOverlaySize(this._$focusOverlay,a),mi.setup(this._$focusOverlay,a),this._$focusOverlay.css("visibility","visible")}}},resize:function(){var e=this._$focusedElement;e&&this.focus(e)},loseFocus:function(){this._$focusedElement&&this._$focusedElement.removeClass(sv),this._$focusedElement=null,this._$focusOverlay&&this._$focusOverlay.addClass(lv)},init:function(){this.createAction("onEditorPreparing",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onEditorPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this._updateFocusHandler=this._updateFocusHandler||this.createAction(this._updateFocus.bind(this)),D.on(fe.getDocument(),OS,this._updateFocusHandler),this._attachContainerEventHandlers()},_attachContainerEventHandlers:function(){var e=this,t=e.component&&e.component.$element();t&&D.on(t,me("keydown",E1),function(i){Nt(i)==="tab"&&e._updateFocusHandler(i)})},dispose:function(){clearTimeout(this._focusTimeoutID),clearTimeout(this._updateFocusTimeoutID),D.off(fe.getDocument(),OS,this._updateFocusHandler)}}).include(S1),YY={defaultOptions:function(){return{}},controllers:{editorFactory:qY}};De.registerModule("editorFactory",YY);var uv=qe(),XY={text:"OK",onClick:function(){return!0}},Lo="dx-dialog",ZY="".concat(Lo,"-wrapper"),QY="".concat(Lo,"-root"),JY="".concat(Lo,"-content"),eX="".concat(Lo,"-message"),tX="".concat(Lo,"-buttons"),iX="".concat(Lo,"-button"),RS="dx-button",nX=tm.inherit({ctor:function(e,t){this.callBase(t)},_defaultOptionsRules:function(){return this.callBase().concat([{device:{platform:"ios"},options:{width:276}}])}}),rX=function(e){var t,i=new te,n=new nX().option();e=O(n,e);var r=v("<div>").addClass(Lo).appendTo(va()),a="message"in e,o="messageHtml"in e;a&&Je.log("W1013");var s=String(o?e.messageHtml:e.message),l=v("<div>").addClass(eX).html(s),u=[];F(e.buttons||[XY],function(){var h=new en(this.onClick,{context:d});u.push({toolbar:"bottom",location:Oe.current().android?"after":"center",widget:"dxButton",options:O({},this,{onClick:function(){var f=h.execute(...arguments);c(f)}})})});var d=new pr(r,O({title:(t=e.title)!==null&&t!==void 0?t:"",showTitle:Ft(e.showTitle,!0),dragEnabled:Ft(e.dragEnabled,!0),height:"auto",width:e.width,showCloseButton:e.showCloseButton||!1,ignoreChildEvents:!1,container:r,visualContainer:uv,onContentReady:function(h){h.component.$content().addClass(JY).append(l)},onShowing:function(h){h.component.bottomToolbar().addClass(tX).find(".".concat(RS)).addClass(iX),Ns()},onShown:function(h){var f=h.component.bottomToolbar().find(".".concat(RS)).first();D.trigger(f,"focus")},onHiding:function(){i.reject()},toolbarItems:u,animation:{show:{type:"pop",duration:400},hide:{type:"pop",duration:400,to:{opacity:0,scale:0},from:{opacity:1,scale:1}}},rtlEnabled:It().rtlEnabled,position:{boundaryOffset:{h:10,v:0}}},e.popupOptions));d.$wrapper().addClass(ZY),e.position&&d.option("position",e.position),d.$wrapper().addClass(QY);function c(h){i.resolve(h),d.hide().done(function(){d.$element().remove()})}return{show:function(){if(Oe.real().platform==="android"){var h=je(uv)>$e(uv),f=h?"80%":"60%";d.option({width:f})}return d.show(),i.promise()},hide:c}},aX=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=Ye(e)?e:{title:t,messageHtml:e,showTitle:i,buttons:[{text:ue.format("Yes"),onClick:function(){return!0}},{text:ue.format("No"),onClick:function(){return!1}}],dragEnabled:i};return rX(n).show()},oX="dx-editor-cell",sX="dx-row",kS="dx-selection",w1="edit-form",Zn="insert",Jr="remove",Ac="editing.popup",dv="editing.form",Nn="editing.editRowKey",kl="editing.editColumnName",I1="targetComponent",T1="input:not([type='hidden'])",A1="[tabindex], "+T1,rg="batch",Rs="row",D1="cell",of="form",bC="popup",BS="first",jd="last",LS="pageBottom",cv="pageTop",PS="viewportBottom",O1="viewportTop",lX=[rg,Rs,D1,of,bC],uX=[Rs,of,bC],dX=[Rs,of],cX="readonly",hX="dx-link",fX="dx-selection",pX="dx-edit-button",R1="dx-command-edit",FS=R1+"-with-icons",ea="__DX_INSERT_INDEX__",vX="dx-row-inserted",_X="dx-row-modified",MS="dx-cell-modified",gX="dxDataGridEditing",mX="dx-cell-focus-disabled",gl="update",CX="click",yX={save:"dx-link-save",cancel:"dx-link-cancel",edit:"dx-link-edit",undelete:"dx-link-undelete",delete:"dx-link-delete",add:"dx-link-add"},xX={save:"save",cancel:"revert",edit:"edit",undelete:"revert",delete:"trash",add:"add"},bX={edit:"editRow",delete:"deleteRow",undelete:"undeleteRow",save:"saveEditData",cancel:"cancelEditData",add:"addRowByRowIndex"},SX={add:"allowAdding",edit:"allowUpdating",delete:"allowDeleting"},EX=["edit","save","cancel","delete","undelete"],wr="editing.changes",qd=function(e){return function(t){var i=t instanceof Error?t:new Error(t&&String(t)||"Unknown error");e.reject(i)}},k1=function(e,t){return t.isEditing||e&&t.column.allowEditing},VS=function(e,t){var i=!!t.column.command,n=k1(e,t),r=!i&&(n||t.column.showEditorAlways);return t.rowType==="data"&&r},wX=Tt.ViewController.inherit(function(){var e=(i,n)=>{var r=-1;return i.some((a,o)=>{if(t(a)===n)return r=o,!0}),r};function t(i){return He(i)?i.name:i}return{init:function(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._rowsView=this.getView("rowsView"),this._lastOperation=null,this._deferreds&&this._deferreds.forEach(i=>i.reject("cancel")),this._deferreds=[],this._dataChangedHandler||(this._dataChangedHandler=this._handleDataChanged.bind(this),this._dataController.changed.add(this._dataChangedHandler)),this._saveEditorHandler||(this.createAction("onInitNewRow",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserting",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowInserted",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditingStart",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdating",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowUpdated",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onRowRemoved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaved",{excludeValidators:["disabled","readOnly"]}),this.createAction("onSaving",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceling",{excludeValidators:["disabled","readOnly"]}),this.createAction("onEditCanceled",{excludeValidators:["disabled","readOnly"]})),this._updateEditColumn(),this._updateEditButtons(),this._internalState||(this._internalState=[]),this.component._optionsByReference[Nn]=!0,this.component._optionsByReference[wr]=!0},getEditMode:function(){var i=this.option("editing.mode");return lX.indexOf(i)!==-1?i:Rs},_getDefaultEditorTemplate:function(){return(i,n)=>{var r=v("<div>").appendTo(i);this.getController("editorFactory").createEditor(r,O({},n.column,{value:n.value,setValue:n.setValue,row:n.row,parentType:"dataRow",width:null,readOnly:!n.setValue,isOnForm:n.isOnForm,id:n.id}))}},_getNewRowPosition:function(){var i=this.option("editing.newRowPosition"),n=this.option("scrolling.mode");if(n==="virtual")switch(i){case cv:return O1;case LS:return PS;default:return i}return i},getChanges:function(){return this.option(wr)},getInsertRowCount:function(){var i=this.option(wr);return i.filter(n=>n.type==="insert").length},resetChanges:function(){var i=this.getChanges(),n=i==null?void 0:i.length;n&&this._silentOption(wr,[])},_getInternalData:function(i){return this._internalState.filter(n=>kt(n.key,i))[0]},_addInternalData:function(i){var n=this._getInternalData(i.key);return n?O(n,i):(this._internalState.push(i),i)},_getOldData:function(i){var n;return(n=this._getInternalData(i))===null||n===void 0?void 0:n.oldData},getUpdatedData:function(i){var n=this._dataController.keyOf(i),r=this.getChanges(),a=xe.getIndexByKey(n,r);return r[a]?ua(i,r[a].data):i},getInsertedData:function(){return this.getChanges().filter(i=>i.data&&i.type===Zn).map(i=>i.data)},getRemovedData:function(){return this.getChanges().filter(i=>this._getOldData(i.key)&&i.type===Jr).map(i=>this._getOldData(i.key))},_fireDataErrorOccurred:function(i){if(i!=="cancel"){var n=this.getPopupContent();this._dataController.dataErrorOccurred.fire(i,n)}},_needToCloseEditableCell:ee,_closeEditItem:ee,_handleDataChanged:ee,_isDefaultButtonVisible:function(i,n){var r=!0;switch(i.name){case"delete":r=this.allowDeleting(n);break;case"undelete":r=!1}return r},_isButtonVisible:function(i,n){var r=i.visible;return E(r)?Ee(r)?r.call(i,{component:n.component,row:n.row,column:n.column}):r:this._isDefaultButtonVisible(i,n)},_isButtonDisabled:function(i,n){var r=i.disabled;return Ee(r)?r.call(i,{component:n.component,row:n.row,column:n.column}):!!r},_getButtonConfig:function(i,n){var r=He(i)?i:{},a=t(i),o=(c=>{var h=c.component.option("editing.texts")||{};return{save:h.saveRowChanges,cancel:h.cancelRowChanges,edit:h.editRow,undelete:h.undeleteRow,delete:h.deleteRow,add:h.addRowToNode}})(n),s=bX[a],l=this.option("editing"),u=SX[a],d=u?l[u]:!0;return O({name:a,text:o[a],cssClass:yX[a]},{onClick:s&&(c=>{var h=c.event;h.stopPropagation(),h.preventDefault(),setTimeout(()=>{n.row&&d&&this[s]&&this[s](n.row.rowIndex)})})},r)},_getEditingButtons:function(i){var n,r=!!i.column.buttons,a=(i.column.buttons||[]).slice();return r?(n=e(a,"edit"),n>=0&&(e(a,"save")<0&&a.splice(n+1,0,"save"),e(a,"cancel")<0&&a.splice(e(a,"save")+1,0,"cancel")),n=e(a,"delete"),n>=0&&e(a,"undelete")<0&&a.splice(n+1,0,"undelete")):a=EX.slice(),a.map(o=>this._getButtonConfig(o,i))},_renderEditingButtons:function(i,n,r,a){n.forEach(o=>{this._isButtonVisible(o,r)&&this._createButton(i,o,r,a)})},_getEditCommandCellTemplate:function(){return(i,n,r)=>{var a=v(i);if(n.rowType==="data"){var o=this._getEditingButtons(n);this._renderEditingButtons(a,o,n,r),n.watch&&n.watch(()=>o.map(s=>this._isButtonVisible(s,n)),()=>{a.empty(),this._renderEditingButtons(a,o,n)})}else xe.setEmptyText(a)}},isRowBasedEditMode:function(){var i=this.getEditMode();return uX.indexOf(i)!==-1},getFirstEditableColumnIndex:function(){var i=this.getController("columns"),n,r=i.getVisibleColumns();return F(r,function(a,o){if(o.allowEditing)return n=a,!1}),n},getFirstEditableCellInRow:function(i){var n=this.getView("rowsView");return n&&n._getCellElement(i||0,this.getFirstEditableColumnIndex())},getFocusedCellInRow:function(i){return this.getFirstEditableCellInRow(i)},getIndexByKey:function(i,n){return xe.getIndexByKey(i,n)},hasChanges:function(i){for(var n=this.getChanges(),r=!1,a=0;a<(n==null?void 0:n.length);a++)if(n[a].type&&(!E(i)||this._dataController.getRowIndexByKey(n[a].key)===i)){r=!0;break}return r},dispose:function(){this.callBase(),clearTimeout(this._inputFocusTimeoutID),D.off(fe.getDocument(),ut.up,this._pointerUpEditorHandler),D.off(fe.getDocument(),ut.down,this._pointerDownEditorHandler),D.off(fe.getDocument(),ct,this._saveEditorHandler)},optionChanged:function(i){if(i.name==="editing"){var n=i.fullName;n===Nn?this._handleEditRowKeyChange(i):n===wr?this._handleChangesChange(i):i.handled||(this._columnsController.reinit(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey()),i.handled=!0}else this.callBase(i)},_handleEditRowKeyChange:function(i){var n=this._dataController.getRowIndexByKey(i.value),r=this._getEditRowIndexCorrection(),a=this._dataController.getRowIndexByKey(i.previousValue)+r;E(i.value)?i.value!==i.previousValue&&this._editRowFromOptionChanged(n,a):this.cancelEditData()},_handleChangesChange:function(i){var n=this._dataController;!i.value.length&&!i.previousValue.length||(this._processInsertChanges(i.value),n.updateItems({repaintChangesOnly:!0,isLiveUpdate:!1}))},_processInsertChanges:function(i){i.forEach(n=>{n.type==="insert"&&this._addInsertInfo(n)})},publicMethods:function(){return["addRow","deleteRow","undeleteRow","editRow","saveEditData","cancelEditData","hasEditData"]},refresh:function(){E(this._pageIndex)&&this._refreshCore.apply(this,arguments)},_refreshCore:ee,isEditing:function(){var i=E(this.option(Nn));return i},isEditRow:function(){return!1},_setEditRowKey:function(i,n){n?this._silentOption(Nn,i):this.option(Nn,i)},_setEditRowKeyByIndex:function(i,n){var r=this._dataController.getKeyByRowIndex(i);if(r===void 0){this._dataController.fireError("E1043");return}this._setEditRowKey(r,n)},getEditRowIndex:function(){return this._getVisibleEditRowIndex()},getEditFormRowIndex:function(){return-1},isEditRowByIndex(i){var n=this._dataController.getKeyByRowIndex(i),r=E(n)&&kt(this.option(Nn),n);return r&&this._getVisibleEditRowIndex()===i},isEditCell:function(i,n){return this.isEditRowByIndex(i)&&this._getVisibleEditColumnIndex()===n},getPopupContent:ee,_isProcessedItem:function(i){return!1},_getInsertRowIndex:function(i,n,r){var a=-1,o=this._dataController,s=this._getInsertAfterOrBeforeKey(n);return!E(s)&&i.length===0?a=0:E(s)&&i.some((l,u)=>{var d=r||this._isProcessedItem(l);if(He(l)&&(d||E(l[ea])?kt(l.key,s)&&(a=u):kt(o.keyOf(l),s)&&(a=u)),a>=0){var c=i[a+1];return c&&(c.rowType==="detail"||c.rowType==="detailAdaptive")&&E(n.insertAfterKey)?void 0:(E(n.insertAfterKey)&&(a+=1),!0)}}),a},_generateNewItem:function(i){var n,r={key:i},a=(n=this._getInternalData(i))===null||n===void 0?void 0:n.insertInfo;return a!=null&&a[ea]&&(r[ea]=a[ea]),r},_getLoadedRowIndex:function(i,n,r){var a=this._getInsertRowIndex(i,n,r),o=this._dataController;if(a<0){var s=this._getNewRowPosition(),l=o.pageIndex(),u=this._getInsertAfterOrBeforeKey(n);s!==jd&&l===0&&!E(u)?a=0:s===jd&&o.isLastPageLoaded()&&(a=i.length)}return a},processItems:function(i,n){var r=n.changeType;this.update(r);var a=this.getChanges();return a.forEach(o=>{var s,l=o.type===Zn;if(l){var u=o.key,d=(s=this._getInternalData(u))===null||s===void 0?void 0:s.insertInfo;(!E(u)||!E(d))&&(d=this._addInsertInfo(o),u=d.key);var c=this._getLoadedRowIndex(i,o),h=this._generateNewItem(u);c>=0&&i.splice(c,0,h)}}),i},processDataItem:function(i,n,r){var a=n.visibleColumns,o=i.data[ea]?i.data.key:i.key,s=this.getChanges(),l=xe.getIndexByKey(o,s);i.isEditing=!1,l>=0&&this._processDataItemCore(i,s[l],o,a,r)},_processDataItemCore:function(i,n,r,a,o){var{data:s,type:l}=n;switch(l){case Zn:i.isNewRow=!0,i.key=r,i.data=s;break;case gl:i.modified=!0,i.oldData=i.data,i.data=ua(i.data,s),i.modifiedValues=o(s,a,!0);break;case Jr:i.removed=!0}},_initNewRow:function(i){if(this.executeAction("onInitNewRow",i),i.promise){var n=new te;return Ae(gi(i.promise)).done(n.resolve).fail(qd(n)).fail(r=>this._fireDataErrorOccurred(r)),n}},_createInsertInfo:function(){var i={};return i[ea]=this._getInsertIndex(),i},_addInsertInfo:function(i,n){var r,a,{key:o}=i;if(E(o)||(o=String(new ri),i.key=o),a=(r=this._getInternalData(o))===null||r===void 0?void 0:r.insertInfo,!E(a)){var s=this._getInsertAfterOrBeforeKey(i);a=this._createInsertInfo(),E(s)||this._setInsertAfterOrBeforeKey(i,n)}return this._addInternalData({insertInfo:a,key:o}),{insertInfo:a,key:o}},_setInsertAfterOrBeforeKey:function(i,n){var r=this._dataController,a=r.items(!0),o=this.getView("rowsView"),s=this._getNewRowPosition();switch(s){case BS:case jd:break;case cv:case LS:if(a.length){var l=s===cv?0:a.length-1;i[l===0?"insertBeforeKey":"insertAfterKey"]=a[l].key}break;default:var u=s===PS,d=u?o==null?void 0:o.getBottomVisibleItemIndex():o==null?void 0:o.getTopVisibleItemIndex(),c=r.getVisibleRows()[d];c&&(!c.isEditing&&c.rowType==="detail"||c.rowType==="detailAdaptive")&&d++;var h=r.getKeyByRowIndex(d);E(h)&&(i.insertBeforeKey=h)}},_getInsertIndex:function(){var i=0;return this.getChanges().forEach(n=>{var r,a=(r=this._getInternalData(n.key))===null||r===void 0?void 0:r.insertInfo;E(a)&&n.type===Zn&&a[ea]>i&&(i=a[ea])}),i+1},_getInsertAfterOrBeforeKey:function(i){var n;return(n=i.insertAfterKey)!==null&&n!==void 0?n:i.insertBeforeKey},_getPageIndexToInsertRow:function(){var i=this._getNewRowPosition(),n=this._dataController,r=n.pageIndex(),a=n.pageCount()-1;return i===BS&&r!==0?0:i===jd&&r!==a?a:-1},addRow:function(i){var n=this._dataController,r=n.store();return r?this._addRow(i):(n.fireError("E1052",this.component.NAME),new te().reject())},_addRow:function(i){var n=this._dataController,r=n.store(),a=r&&r.key(),o={data:{}},s=this._getVisibleEditRowIndex(),l=new te;return this.refresh({allowCancelEditing:!0}),this._allowRowAdding()?(a||(o.data.__KEY__=String(new ri)),Ae(this._initNewRow(o,i)).done(()=>{this._allowRowAdding()?Ae(this._addRowCore(o.data,i,s)).done(l.resolve).fail(l.reject):l.reject("cancel")}).fail(l.reject),l.promise()):(Ae(this._navigateToNewRow(s)).done(l.resolve).fail(l.reject),l.promise())},_allowRowAdding:function(){var i=this._getInsertIndex();return!(i>1)},_addRowCore:function(i,n,r){var a={data:i,type:Zn},o=this._getVisibleEditRowIndex(),s=this._addInsertInfo(a,n),l=s.key;return this._setEditRowKey(l,!0),this._addChange(a),this._navigateToNewRow(r,a,o)},_navigateToNewRow:function(i,n,r){var a,o,s=new te,l=this._dataController,u=this.getController("focus");if(r=(a=r)!==null&&a!==void 0?a:-1,n=(o=n)!==null&&o!==void 0?o:this.getChanges().filter(p=>p.type===Zn)[0],!n)return s.reject("cancel").promise();var d=this._getPageIndexToInsertRow(),c=this._getLoadedRowIndex(l.items(),n,!0),h=p=>{Ae(u==null?void 0:u.navigateToRow(p)).done(()=>{c=l.getRowIndexByKey(n.key),s.resolve()})},f=this._getInsertAfterOrBeforeKey(n);return d>=0?l.pageIndex(d).done(()=>{h(n.key)}).fail(s.reject):c<0&&E(f)?h(f):(l.updateItems({changeType:"update",rowIndices:[i,r,c]}),c=l.getRowIndexByKey(n.key),c<0?h(n.key):s.resolve()),s.done(()=>{this._showAddedRow(c),this._afterInsertRow(n.key)}),s.promise()},_showAddedRow:function(i){this._focusFirstEditableCellInRow(i)},_beforeFocusElementInRow:ee,_focusFirstEditableCellInRow:function(i){var n=this._dataController,r=n.getKeyByRowIndex(i),a=this.getFirstEditableCellInRow(i);this._editCellInProgress=!0,this._delayedInputFocus(a,()=>{i=n.getRowIndexByKey(r),this._editCellInProgress=!1,this._beforeFocusElementInRow(i)})},_isEditingStart:function(i){return this.executeAction("onEditingStart",i),i.cancel},_beforeUpdateItems:ee,_getVisibleEditColumnIndex:function(){var i=this.option(kl);return E(i)?this._columnsController.getVisibleColumnIndex(i):-1},_setEditColumnNameByIndex:function(i,n){var r,a=this._columnsController.getVisibleColumns();this._setEditColumnName((r=a[i])===null||r===void 0?void 0:r.name,n)},_setEditColumnName:function(i,n){n?this._silentOption(kl,i):this.option(kl,i)},_resetEditColumnName:function(){this._setEditColumnName(null,!0)},_getEditColumn:function(){var i=this.option(kl);return this._getColumnByName(i)},_getColumnByName:function(i){var n=this._columnsController.getVisibleColumns(),r;return E(i)&&n.some(a=>{if(a.name===i)return r=a,!0}),r},_getVisibleEditRowIndex:function(i){var n=this._dataController,r=this.option(Nn),a=n.getRowIndexByKey(r);return a===-1?a:a+this._getEditRowIndexCorrection(i)},_getEditRowIndexCorrection:function(i){var n=i?this._getColumnByName(i):this._getEditColumn(),r=(n==null?void 0:n.visibleWidth)==="adaptiveHidden";return r?1:0},_resetEditRowKey:function(){this._setEditRowKey(null,!0)},_resetEditIndices:function(){this._resetEditColumnName(),this._resetEditRowKey()},editRow:function(i){var n,r=this._dataController,a=r.items(),o=a[i],s={data:o&&o.data,cancel:!1},l=this._getVisibleEditRowIndex();if(o){if(i===l)return!0;if(o.key===void 0){this._dataController.fireError("E1043");return}o.isNewRow||(s.key=o.key),!this._isEditingStart(s)&&(this.resetChanges(),this.init(),this._resetEditColumnName(),this._pageIndex=r.pageIndex(),this._addInternalData({key:o.key,oldData:(n=o.oldData)!==null&&n!==void 0?n:o.data}),this._setEditRowKey(o.key))}},_editRowFromOptionChanged:function(i,n){var r=[n,i];this._beforeUpdateItems(r,i,n),this._editRowFromOptionChangedCore(r,i)},_editRowFromOptionChangedCore:function(i,n,r){this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:i,cancel:r})},_focusEditorIfNeed:ee,_showEditPopup:ee,_repaintEditPopup:ee,_getEditPopupHiddenHandler:function(){return i=>{this.isEditing()&&this.cancelEditData()}},_getPopupEditFormTemplate:ee,_getSaveButtonConfig:function(){return{text:this.option("editing.texts.saveRowChanges"),onClick:this.saveEditData.bind(this)}},_getCancelButtonConfig:function(){return{text:this.option("editing.texts.cancelRowChanges"),onClick:this.cancelEditData.bind(this)}},_removeInternalData:function(i){var n=this._getInternalData(i),r=this._internalState.indexOf(n);r>-1&&this._internalState.splice(r,1)},_updateInsertAfterOrBeforeKeys:function(i,n){var r=i[n];i.forEach(a=>{var o=this._getInsertAfterOrBeforeKey(a);kt(o,r.key)&&(a[E(a.insertAfterKey)?"insertAfterKey":"insertBeforeKey"]=this._getInsertAfterOrBeforeKey(r))})},_removeChange:function(i){if(i>=0){var n=[...this.getChanges()],r=n[i].key;this._removeInternalData(r),this._updateInsertAfterOrBeforeKeys(n,i),n.splice(i,1),this._silentOption(wr,n),kt(this.option(Nn),r)&&this._resetEditIndices()}},executeOperation:function(i,n){this._lastOperation&&this._lastOperation.reject(),this._lastOperation=i,this.waitForDeferredOperations().done(()=>{i.state()!=="rejected"&&(n(),this._lastOperation=null)}).fail(()=>{i.reject(),this._lastOperation=null})},waitForDeferredOperations:function(){return Ae(...this._deferreds)},_processCanceledEditingCell:ee,_repaintEditCell:function(i,n,r){this._needFocusEditor=!0,!i||!i.showEditorAlways||n&&!n.showEditorAlways?(this._editCellInProgress=!0,this.getController("editorFactory").loseFocus(),this._dataController.updateItems({changeType:"update",rowIndices:[r,this._getVisibleEditRowIndex()]})):i!==n&&this._dataController.updateItems({changeType:"update",rowIndices:[]})},_delayedInputFocus:function(i,n,r){var a=()=>{if(n&&n(),i){var o=i.find(A1).first();xe.focusAndSelectElement(this,o)}this._beforeFocusCallback=null};Oe.real().ios||Oe.real().android?a():(this._beforeFocusCallback&&this._beforeFocusCallback(),clearTimeout(this._inputFocusTimeoutID),r&&(this._beforeFocusCallback=n),this._inputFocusTimeoutID=setTimeout(a))},_focusEditingCell:function(i,n,r){var a=this.getView("rowsView"),o=this._getVisibleEditColumnIndex();n=n||a&&a._getCellElement(this._getVisibleEditRowIndex(),o),n&&this._delayedInputFocus(n,i,r)},deleteRow:function(i){this._checkAndDeleteRow(i)},_checkAndDeleteRow:function(i){var n=this.option("editing"),r=n==null?void 0:n.texts,a=n==null?void 0:n.confirmDelete,o=r==null?void 0:r.confirmDeleteMessage,s=this._dataController.items()[i],l=!this.isEditing()||s.isNewRow;if(s&&l)if(!a||!o)this._deleteRowCore(i);else{var u=r&&r.confirmDeleteTitle,d=E(u)&&u.length>0;aX(o,u,d).done(c=>{c&&this._deleteRowCore(i)})}},_deleteRowCore:function(i){var n=this._dataController,r=n.items()[i],a=r&&r.key,o=this._getVisibleEditRowIndex();this.refresh();var s=this.getChanges(),l=xe.getIndexByKey(a,s);return l>=0?s[l].type===Zn?this._removeChange(l):this._addChange({key:a,type:Jr}):this._addChange({key:a,oldData:r.data,type:Jr}),this._afterDeleteRow(i,o)},_afterDeleteRow:function(i,n){return this.saveEditData()},undeleteRow:function(i){var n=this._dataController,r=n.items()[i],a=this._getVisibleEditRowIndex(),o=r&&r.key,s=this.getChanges();if(r){var l=xe.getIndexByKey(o,s);if(l>=0){var{data:u}=s[l];Rn(u)?this._removeChange(l):this._addChange({key:o,type:gl}),n.updateItems({changeType:"update",rowIndices:[a,i]})}}},_fireOnSaving:function(){var i={cancel:!1,promise:null,changes:[...this.getChanges()]};this.executeAction("onSaving",i);var n=new te;return Ae(gi(i.promise)).done(()=>{n.resolve(i)}).fail(r=>{this._fireDataErrorOccurred(r),n.resolve({cancel:!0})}),n},_executeEditingAction:function(i,n,r){if(this.component._disposed)return null;var a=new te;return this.executeAction(i,n),Ae(gi(n.cancel)).done(function(o){o?setTimeout(function(){a.resolve("cancel")}):r(n).done(a.resolve).fail(qd(a))}).fail(qd(a)),a},_processChanges:function(i,n,r,a){var o=this._dataController.store();F(a,(s,l)=>{var u=this._getOldData(l.key),{data:d,type:c}=l,h=be({},l),f,p;if(!this._beforeSaveEditData(l,s)){switch(c){case Jr:p={data:u,key:l.key,cancel:!1},f=this._executeEditingAction("onRowRemoving",p,function(){return o.remove(l.key).done(function(m){r.push({type:"remove",key:m})})});break;case Zn:p={data:d,cancel:!1},f=this._executeEditingAction("onRowInserting",p,function(){return o.insert(p.data).done(function(m,C){E(C)&&(h.key=C),m&&He(m)&&m!==p.data&&(h.data=m),r.push({type:"insert",data:m,index:0})})});break;case gl:p={newData:d,oldData:u,key:l.key,cancel:!1},f=this._executeEditingAction("onRowUpdating",p,function(){return o.update(l.key,p.newData).done(function(m,C){m&&He(m)&&m!==p.newData&&(h.data=m),r.push({type:"update",key:C,data:m})})})}if(a[s]=h,f){var g=new te;f.always(function(m){n.push({key:l.key,result:m})}).always(g.resolve),i.push(g.promise())}}})},_processRemoveIfError:function(i,n){var r=i[n];return(r==null?void 0:r.type)===Jr&&n>=0&&i.splice(n,1),!0},_processRemove:function(i,n,r){var a=i[n];if(!r||!a||a.type===Jr)return this._processRemoveCore(i,n,!r||!a)},_processRemoveCore:function(i,n){return n>=0&&i.splice(n,1),!0},_processSaveEditDataResult:function(i){for(var n=!1,r=[...this.getChanges()],a=r.length,o=0;o<i.length;o++){var s=i[o].result,l=s==="cancel",u=xe.getIndexByKey(i[o].key,r),d=r[u],c=s&&s instanceof Error;if(c){if(d&&this._addInternalData({key:d.key,error:s}),this._fireDataErrorOccurred(s),this._processRemoveIfError(r,u))break}else this._processRemove(r,u,l)&&(n=!l)}return r.length<a&&this._silentOption(wr,r),n},_fireSaveEditDataEvents:function(i){F(i,(n,r)=>{var{data:a,key:o,type:s}=r,l=this._addInternalData({key:o}),u={key:o,data:a};switch(l.error&&(u.error=l.error),s){case Jr:this.executeAction("onRowRemoved",O({},u,{data:l.oldData}));break;case Zn:this.executeAction("onRowInserted",u);break;case gl:this.executeAction("onRowUpdated",u)}}),this.executeAction("onSaved",{changes:i})},saveEditData:function(){var i=new te;return this.waitForDeferredOperations().done(()=>{if(this.isSaving()){this._resolveAfterSave(i);return}Ae(this._beforeSaveEditData()).done(n=>{if(n){this._resolveAfterSave(i,{cancel:n});return}this._saving=!0;var r={};this._saveEditDataInner(r).always(()=>{this._saving=!1,r.needFocusEditCell&&this._focusEditingCell()}).done(i.resolve).fail(i.reject)}).fail(i.reject)}).fail(i.reject),i.promise()},_resolveAfterSave:function(i){var{cancel:n,error:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ae(this._afterSaveEditData(n)).done(function(){i.resolve(r)}).fail(i.reject)},_saveEditDataInner:function(i){var n=[],r=[],a=[],o=this._dataController,s=o.dataSource(),l=new te;return Ae(this._fireOnSaving()).done(u=>{var{cancel:d,changes:c}=u;if(d)return l.resolve().promise();if(this._processChanges(r,n,a,c),r.length)return s==null||s.beginLoading(),Ae(...r).done(()=>{this._processSaveEditDataResult(n)?this._endSaving(a,c,l):(s==null||s.endLoading(),l.resolve())}).fail(h=>{s==null||s.endLoading(),l.resolve(h)}),l.always(()=>{i.needFocusEditCell=!0}).promise();this._cancelSaving(l)}).fail(l.reject),l.promise()},_beforeEndSaving:function(i){this._resetEditIndices()},_endSaving:function(i,n,r){var a=this._dataController.dataSource();this._beforeEndSaving(n),a==null||a.endLoading(),this._refreshDataAfterSave(i,n,r)},_cancelSaving:function(i){this.executeAction("onSaved",{changes:[]}),this._resolveAfterSave(i)},_refreshDataAfterSave:function(i,n,r){var a=this._dataController,o=this.option("editing.refreshMode"),s=o!=="reshape"&&o!=="repaint";s||a.push(i),Ae(a.refresh({selection:s,reload:s,load:o==="reshape",changesOnly:this.option("repaintChangesOnly")})).always(()=>{this._fireSaveEditDataEvents(n)}).done(()=>{this._resolveAfterSave(r)}).fail(l=>{this._resolveAfterSave(r,{error:l})})},isSaving:function(){return this._saving},_updateEditColumn:function(){var i=this._isEditColumnVisible(),n=this.option("editing.useIcons"),r=R1+(n?" "+FS:"");this._columnsController.addCommandColumn({type:"buttons",command:"edit",visible:i,cssClass:r,width:"auto",alignment:"center",cellTemplate:this._getEditCommandCellTemplate(),fixedPosition:"right"}),this._columnsController.columnOption("command:edit",{visible:i,cssClass:r})},_isEditColumnVisible:function(){var i=this.option("editing");return i.allowDeleting},_isEditButtonDisabled:function(){var i=this.hasChanges(),n=E(this.option("editing.editRowKey"));return!(n||i)},_updateEditButtons:function(){var i=this.getView("headerPanel"),n=this._isEditButtonDisabled();i&&(i.setToolbarItemDisabled("saveButton",n),i.setToolbarItemDisabled("revertButton",n))},_applyModified:function(i){i&&i.addClass(MS)},_beforeCloseEditCellInBatchMode:ee,cancelEditData:function(){var i=this.getChanges(),n={cancel:!1,changes:i};this.executeAction("onEditCanceling",n),n.cancel||(this._cancelEditDataCore(),this.executeAction("onEditCanceled",{changes:i}))},_cancelEditDataCore:function(){var i=this._getVisibleEditRowIndex();this._beforeCancelEditData(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey(),this._afterCancelEditData(i)},_afterCancelEditData:function(i){var n=this._dataController;n.updateItems({repaintChangesOnly:this.option("repaintChangesOnly")})},_hideEditPopup:ee,hasEditData:function(){return this.hasChanges()},update:function(i){var n=this._dataController;n&&this._pageIndex!==n.pageIndex()&&(i==="refresh"&&this.refresh({isPageChanged:!0}),this._pageIndex=n.pageIndex()),this._updateEditButtons()},_getRowIndicesForCascadeUpdating:function(i,n){return n?[]:[i.rowIndex]},addDeferred:function(i){this._deferreds.indexOf(i)<0&&(this._deferreds.push(i),i.always(()=>{var n=this._deferreds.indexOf(i);n>=0&&this._deferreds.splice(n,1)}))},_prepareChange:function(i,n,r){var a,o={},s=(a=i.row)===null||a===void 0?void 0:a.data,l=i.key,u=new te;if(l!==void 0){i.value=n;var d=gi(i.column.setCellValue(o,n,O(!0,{},s),r));d.done(function(){u.resolve({data:o,key:l,oldData:s,type:gl})}).fail(qd(u)).fail(c=>this._fireDataErrorOccurred(c)),E(r)&&i.column.displayValueMap&&(i.column.displayValueMap[n]=r),this._updateRowValues(i),this.addDeferred(u)}return u},_updateRowValues:function(i){if(i.values){var n=this._dataController,r=n.getRowIndexByKey(i.key),a=n.getVisibleRows()[r];a&&(i.values=a.values),i.values[i.columnIndex]=i.value}},updateFieldValue:function(i,n,r,a){var o=i.key,s=new te;return o===void 0&&this._dataController.fireError("E1043"),i.column.setCellValue?this._prepareChange(i,n,r).done(l=>{Ae(this._applyChange(i,l,a)).always(()=>{s.resolve()})}):s.resolve(),s.promise()},_focusPreviousEditingCellIfNeed:function(i){if(this.hasEditData()&&!this.isEditCell(i.rowIndex,i.columnIndex))return this._focusEditingCell(),this._updateEditRow(i.row,!0),!0},_needUpdateRow:function(i){var n=this._columnsController.getVisibleColumns();i||(i=this._getEditColumn());var r=i&&i.setCellValue!==i.defaultSetCellValue,a=n.some(o=>o.calculateCellValue!==o.defaultCalculateCellValue);return r||a},_applyChange:function(i,n,r){var a=be({},i,{forceUpdateRow:r});return this._addChange(n,a),this._updateEditButtons(),this._applyChangeCore(i,a.forceUpdateRow)},_applyChangeCore:function(i,n){var r=i.column.setCellValue!==i.column.defaultSetCellValue,a=i.row;a&&(n||r?this._updateEditRow(a,n,r):a.update&&a.update())},_updateEditRowCore:function(i,n,r){this._dataController.updateItems({changeType:"update",rowIndices:this._getRowIndicesForCascadeUpdating(i,n)})},_updateEditRow:function(i,n,r){n?this._updateRowImmediately(i,n,r):this._updateRowWithDelay(i,r)},_updateRowImmediately:function(i,n,r){this._updateEditRowCore(i,!n,r),this._validateEditFormAfterUpdate(i,r),n||this._focusEditingCell()},_updateRowWithDelay:function(i,n){var r=new te;this.addDeferred(r),setTimeout(()=>{var a=v(fe.getActiveElement()),o=this._rowsView.getCellIndex(a,i.rowIndex),s=a.get(0),l=xe.getSelectionRange(s);if(this._updateEditRowCore(i,!1,n),this._validateEditFormAfterUpdate(i,n),o>=0){var u=this._rowsView._getCellElement(i.rowIndex,o);this._delayedInputFocus(u,()=>{setTimeout(()=>{s=fe.getActiveElement(),l.selectionStart>=0&&xe.setSelectionRange(s,l)})})}r.resolve()})},_validateEditFormAfterUpdate:ee,_addChange:function(i,n){var r,a=n==null?void 0:n.row,o=[...this.getChanges()],s=xe.getIndexByKey(i.key,o);s<0&&(s=o.length,this._addInternalData({key:i.key,oldData:i.oldData}),delete i.oldData,o.push(i));var l=be({},o[s]);return l&&(i.data&&(l.data=ua(l.data,i.data)),(!l.type||!i.data)&&i.type&&(l.type=i.type),a&&(a.oldData=this._getOldData(a.key),a.data=ua(a.data,i.data))),o[s]=l,this._silentOption(wr,o),n&&l!==((r=this.getChanges())===null||r===void 0?void 0:r[s])&&(n.forceUpdateRow=!0),l},_getFormEditItemTemplate:function(i,n){return n.editCellTemplate||this._getDefaultEditorTemplate()},getColumnTemplate:function(i){var n=i.column,r=i.row&&i.row.rowIndex,a,o=this.isRowBasedEditMode(),s=this.isEditRow(r),l=this.isEditCell(r,i.columnIndex),u;if((n.showEditorAlways||n.setCellValue&&(s&&n.allowEditing||l))&&(i.rowType==="data"||i.rowType==="detailAdaptive")&&!n.command){var d=this.allowUpdating(i);((d||s)&&n.allowEditing||l)&&(s||!o)&&(n.showEditorAlways&&!o&&(u={cancel:!1,key:i.row.isNewRow?void 0:i.row.key,data:i.row.data,column:n},this._isEditingStart(u)),(!u||!u.cancel)&&(i.setValue=(c,h)=>{this.updateFieldValue(i,c,h)})),a=n.editCellTemplate||this._getDefaultEditorTemplate()}else n.command==="detail"&&i.rowType==="detail"&&s&&(a=this===null||this===void 0?void 0:this.getEditFormTemplate(i));return a},_createButton:function(i,n,r,a){var o=xX[n.name],s=this.option("editing.useIcons"),l=this.option("useLegacyColumnButtonTemplate"),u=v("<a>").attr("href","#").addClass(hX).addClass(n.cssClass);if(n.template&&l)this._rowsView.renderTemplate(i,n.template,r,!0);else{if(n.template)u=v("<span>").addClass(n.cssClass);else if(s&&o||n.icon){o=n.icon||o;var d=$u(o);d==="image"||d==="svg"?u=mo(o).addClass(n.cssClass):u.addClass("dx-icon"+(d==="dxIcon"?"-":" ")+o).attr("title",n.text),u.addClass("dx-link-icon"),i.addClass(FS);var c=this.getButtonLocalizationNames()[n.name];c&&u.attr("aria-label",ue.format(c))}else u.text(n.text);E(n.hint)&&u.attr("title",n.hint),this._isButtonDisabled(n,r)?u.addClass("dx-state-disabled"):(!n.template||n.onClick)&&D.on(u,me("click",gX),this.createAction(function(h){var f;(f=n.onClick)===null||f===void 0||f.call(n,O({},h,{row:r.row,column:r.column})),h.event.preventDefault(),h.event.stopPropagation()})),i.append(u,"&nbsp;"),n.template&&this._rowsView.renderTemplate(u,n.template,r,!0,a)}},getButtonLocalizationNames:()=>({edit:"dxDataGrid-editingEditRow",save:"dxDataGrid-editingSaveRowChanges",delete:"dxDataGrid-editingDeleteRow",undelete:"dxDataGrid-editingUndeleteRow",cancel:"dxDataGrid-editingCancelRowChanges"}),prepareButtonItem:function(i,n,r,a){var o=this.option("editing.texts")||{},s={revert:o.cancelAllChanges,save:o.saveAllChanges,addRow:o.addRow},l={revert:"cancel",save:"save",addRow:"addrow"}[n],u=s[n],d=(l==="save"||l==="cancel")&&this._isEditButtonDisabled();return{widget:"dxButton",options:{onInitialized:c=>{v(c.element).addClass(i._getToolbarButtonClass(pX+" "+this.addWidgetPrefix(l)+"-button"))},icon:"edit-button-"+l,disabled:d,onClick:()=>{setTimeout(()=>{this[r]()})},text:u,hint:u},showText:"inMenu",name:n+"Button",location:"after",locateInMenu:"auto",sortIndex:a}},prepareEditButtons:function(i){var n=this.option("editing")||{},r=[];return n.allowAdding&&r.push(this.prepareButtonItem(i,"addRow","addRow",20)),r},highlightDataCell:function(i,n){var r=this.isCellModified(n),a=r&&n.column.setCellValue&&(this.getEditMode()!==Rs||!n.row.isEditing);a&&i.addClass(MS)},_afterInsertRow:ee,_beforeSaveEditData:function(i){if(i&&!E(i.key)&&E(i.type))return!0},_afterSaveEditData:ee,_beforeCancelEditData:ee,_allowEditAction:function(i,n){var r=this.option("editing."+i);return Ee(r)&&(r=r({component:this.component,row:n.row})),r},allowUpdating:function(i,n){var r=this.option("editing.startEditAction")||CX,a=arguments.length>1?r===n||n==="down":!0;return a&&this._allowEditAction("allowUpdating",i)},allowDeleting:function(i){return this._allowEditAction("allowDeleting",i)},isCellModified:function(i){var n=i.columnIndex,r=i.row&&(i.row.isNewRow?i.row.values:i.row.modifiedValues);return!!r&&r[n]!==void 0},isNewRowInEditMode:function(){var i=this._getVisibleEditRowIndex(),n=this._dataController.items();return i>=0?n[i].isNewRow:!1}}}()),IX={defaultOptions:function(){return{editing:{mode:"row",refreshMode:"full",newRowPosition:O1,allowAdding:!1,allowUpdating:!1,allowDeleting:!1,useIcons:!1,selectTextOnEditStart:!1,confirmDelete:!0,texts:{editRow:ue.format("dxDataGrid-editingEditRow"),saveAllChanges:ue.format("dxDataGrid-editingSaveAllChanges"),saveRowChanges:ue.format("dxDataGrid-editingSaveRowChanges"),cancelAllChanges:ue.format("dxDataGrid-editingCancelAllChanges"),cancelRowChanges:ue.format("dxDataGrid-editingCancelRowChanges"),addRow:ue.format("dxDataGrid-editingAddRow"),deleteRow:ue.format("dxDataGrid-editingDeleteRow"),undeleteRow:ue.format("dxDataGrid-editingUndeleteRow"),confirmDeleteMessage:ue.format("dxDataGrid-editingConfirmDeleteMessage"),confirmDeleteTitle:""},form:{colCount:2},popup:{},startEditAction:"click",editRowKey:null,editColumnName:null,changes:[]},useLegacyColumnButtonTemplate:!1}},controllers:{editing:wX},extenders:{controllers:{data:{init:function(){this._editingController=this.getController("editing"),this.callBase()},reload:function(e,t){return!t&&this._editingController.refresh(),this.callBase.apply(this,arguments)},repaintRows:function(){if(!this.getController("editing").isSaving())return this.callBase.apply(this,arguments)},_updateEditRow:function(e){var t=this.option(Nn),i=xe.getIndexByKey(t,e),n=e[i];if(n){var r;n.isEditing=!0,(r=this._updateEditItem)===null||r===void 0||r.call(this,n)}},_updateItemsCore:function(e){this.callBase(e),this._updateEditRow(this.items(!0))},_applyChangeUpdate:function(e){this._updateEditRow(e.items),this.callBase(e)},_applyChangesOnly:function(e){this._updateEditRow(e.items),this.callBase(e)},_processItems:function(e,t){return e=this._editingController.processItems(e,t),this.callBase(e,t)},_processDataItem:function(e,t){return this._editingController.processDataItem(e,t,this.generateDataValues),this.callBase(e,t)},_processItem:function(e,t){return e=this.callBase(e,t),e.isNewRow&&(t.dataIndex--,delete e.dataIndex),e},_getChangedColumnIndices:function(e,t,i,n){if(!(e.isNewRow!==t.isNewRow||e.removed!==t.removed))return this.callBase.apply(this,arguments)},_isCellChanged:function(e,t,i,n,r){var a=this.getController("editing"),o=e.cells&&e.cells[n],s=a&&a.isEditCell(i,n);return r&&s?!1:o&&o.column&&!o.column.showEditorAlways&&o.isEditing!==s?!0:this.callBase.apply(this,arguments)},needToRefreshOnDataSourceChange:function(e){var t=this.getController("editing"),i=Array.isArray(e.value)&&e.value===e.previousValue&&t.isSaving();return!i},_handleDataSourceChange(e){var t=this.callBase(e),i=this.option("editing.changes"),n=e.value;if(Array.isArray(n)&&i.length){var r=n.map(l=>this.keyOf(l)),a=i.filter(l=>l.type==="insert"||r.some(u=>kt(l.key,u)));a.length!==i.length&&this.option("editing.changes",a);var o=this.option("editing.editRowKey"),s=a.some(l=>l.type==="insert"&&kt(o,l.key));!s&&r.every(l=>!kt(o,l))&&this.option("editing.editRowKey",null)}return t}}},views:{rowsView:{init:function(){this.callBase(),this._editingController=this.getController("editing")},getCellIndex:function(e,t){if(!e.is("td")&&t>=0){var i=this.getCellElements(t),n=-1;return F(i,function(r,a){v(a).find(e).length&&(n=r)}),n}return this.callBase.apply(this,arguments)},publicMethods:function(){return this.callBase().concat(["cellValue"])},_getCellTemplate:function(e){var t=this._editingController.getColumnTemplate(e);return t||this.callBase(e)},_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=!!e.removed,n=!!e.isNewRow,r=!!e.modified;n&&t.addClass(vX),r&&t.addClass(_X),(n||i)&&t.removeClass(fX)}return t},_getColumnIndexByElement:function(e){for(var t=e.closest("table"),i=this.getTableElements();t.length&&!i.filter(t).length;)e=t.closest("td"),t=e.closest("table");return this._getColumnIndexByElementCore(e)},_getColumnIndexByElementCore:function(e){var t=e.closest("."+sX+"> td:not(.dx-master-detail-cell)");return this.getCellIndex(t)},_editCellByClick:function(e,t){var i=this._editingController,n=v(e.event.target),r=this._getColumnIndexByElement(n),a=this._dataController.items()[e.rowIndex],o=i.allowUpdating({row:a},t)||a&&a.isNewRow,s=this._columnsController.getVisibleColumns()[r],l=i.isEditCell(e.rowIndex,r),u=o&&s&&(s.allowEditing||l),d=this.option("editing.startEditAction")||"click";if(t==="down")return(Oe.real().ios||Oe.real().android)&&!l&&Ns(),s&&s.showEditorAlways&&u&&i.editCell(e.rowIndex,r);if(t==="click"&&d==="dblClick"&&!l){var c=a==null?void 0:a.isNewRow;i.closeEditCell(!1,c)}if(u&&t===d)return i.editCell(e.rowIndex,r)||i.isEditRow(e.rowIndex)},_rowPointerDown:function(e){this._pointerDownTimeout=setTimeout(()=>{this._editCellByClick(e,"down")})},_rowClick:function(e){var t=v(e.rowElement).hasClass(this.addWidgetPrefix(w1));e.event[I1]=this.component,!this._editCellByClick(e,"click")&&!t&&this.callBase.apply(this,arguments)},_rowDblClick:function(e){this._editCellByClick(e,"dblClick")||this.callBase.apply(this,arguments)},_cellPrepared:function(e,t){var i=this._editingController,n=!!t.column.command,r=t.setValue,a=i.isEditRow(t.rowIndex),o=k1(a,t);if(VS(a,t)){var s=t.column.alignment;e.toggleClass(this.addWidgetPrefix(cX),!r).toggleClass(mX,!r),s&&e.find(T1).first().css("textAlign",s)}o&&this._editCellPrepared(e),t.column&&!n&&i.highlightDataCell(e,t),this.callBase.apply(this,arguments)},_editCellPrepared:ee,_formItemPrepared:ee,_getCellOptions:function(e){var t=this.callBase(e);return t.isEditing=this._editingController.isEditCell(t.rowIndex,t.columnIndex),t},_createCell:function(e){var t=this.callBase(e),i=this._editingController.isEditRow(e.rowIndex);return VS(i,e)&&t.addClass(oX),t},cellValue:function(e,t,i,n){var r=this.getCellOptions(e,t);if(r){if(i===void 0)return r.value;this._editingController.updateFieldValue(r,i,n,!0)}},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._pointerDownTimeout)},_renderCore:function(){this.callBase.apply(this,arguments),this._editingController._focusEditorIfNeed()}},headerPanel:{_getToolbarItems:function(){var e=this.callBase(),t=this.getController("editing").prepareEditButtons(this);return t.concat(e)},optionChanged:function(e){var t=e.fullName;switch(e.name){case"editing":var i=[Ac,wr,kl,Nn],n=t&&!i.some(r=>r===t);n&&this._invalidate(),this.callBase(e);break;case"useLegacyColumnButtonTemplate":e.handled=!0;break;default:this.callBase(e)}},isVisible:function(){var e=this.getController("editing").option("editing");return this.callBase()||(e==null?void 0:e.allowAdding)}}}}};De.registerModule("editing",O(!0,{},IX,{extenders:{controllers:{data:{_changeRowExpandCore:function(e){var t=this._editingController;return Array.isArray(e)&&t&&t.refresh(),this.callBase.apply(this,arguments)}}}}}));var NS="dx-edit-row",TX={extenders:{controllers:{editing:{isRowEditMode:function(){return this.getEditMode()===Rs},_afterCancelEditData:function(e){var t=this._dataController;this.isRowBasedEditMode()&&e>=0?t.updateItems({changeType:"update",rowIndices:[e,e+1]}):this.callBase.apply(this,arguments)},_isDefaultButtonVisible:function(e,t){var i=this.isRowBasedEditMode(),n=t.row&&t.row.rowIndex===this._getVisibleEditRowIndex();if(i)switch(e.name){case"edit":return!n&&this.allowUpdating(t);case"delete":return this.callBase.apply(this,arguments)&&!n;case"save":case"cancel":return n;default:return this.callBase.apply(this,arguments)}return this.callBase.apply(this,arguments)},isEditRow:function(e){return this.isRowBasedEditMode()&&this.isEditRowByIndex(e)},_cancelSaving:function(){this.isRowBasedEditMode()&&(this.hasChanges()||this._cancelEditDataCore()),this.callBase.apply(this,arguments)},_refreshCore:function(e){var{allowCancelEditing:t}=e??{};if(this.isRowBasedEditMode()){var i=this.getChanges().filter(n=>n.type==="update").length>0;this.init(),t&&i&&this._cancelEditDataCore()}this.callBase.apply(this,arguments)},_isEditColumnVisible:function(){var e=this.callBase.apply(this,arguments),t=this.option("editing"),i=this.isRowEditMode(),n=t.allowUpdating||t.allowAdding;return e||i&&n},_focusEditorIfNeed:function(){var e=this.getEditMode();if(this._needFocusEditor){if(dX.indexOf(e)!==-1){var t=this.getFocusedCellInRow(this._getVisibleEditRowIndex());this._delayedInputFocus(t,()=>{t&&this.component.focus(t)})}this._needFocusEditor=!1}}},data:{_getChangedColumnIndices:function(e,t,i,n){var r=this.getController("editing");if(!(r.isRowBasedEditMode()&&e.isEditing!==t.isEditing))return this.callBase.apply(this,arguments)}}},views:{rowsView:{_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=this._editingController,n=i.isEditRow(e.rowIndex);n&&(t.addClass(NS),t.removeClass(kS),e.rowType==="detail"&&t.addClass(this.addWidgetPrefix(w1)))}return t},_update:function(e){this.callBase(e),e.changeType==="updateSelection"&&this.getTableElements().children("tbody").children("."+NS).removeClass(kS)}}}}};De.registerModule("editingRowBased",TX);class B1{constructor(){this._map={}}_findWidgetInstance(t){var i;return F(this._map,function(n,r){var{widgetInstance:a,item:o}=r;if(t(o))return i=a,!1}),i}_findFieldByCondition(t,i){var n;return F(this._map,function(r,a){if(t(a))return n=i==="guid"?r:a[i],!1}),n}clear(){this._map={}}removeItemsByItems(t){F(t.getItems(),i=>this.removeItemByKey(i))}removeItemByKey(t){delete this._map[t]}add(t){var i=t.guid||new ri;return this._map[i]=t,i}addItemsOrExtendFrom(t){t.each((i,n)=>{this._map[i]?(n.widgetInstance&&(this._map[i].widgetInstance=n.widgetInstance),this._map[i].$itemContainer=n.$itemContainer):this.add({item:n.item,widgetInstance:n.widgetInstance,guid:i,$itemContainer:n.$itemContainer})})}extendRunTimeItemInfoByKey(t,i){this._map[t]&&(this._map[t]=O(this._map[t],i))}findWidgetInstanceByItem(t){return this._findWidgetInstance(i=>i===t)}findGroupOrTabLayoutManagerByPath(t){return this._findFieldByCondition(i=>{var{path:n}=i;return n===t},"layoutManager")}findKeyByPath(t){return this._findFieldByCondition(i=>{var{path:n}=i;return n===t},"guid")}findWidgetInstanceByName(t){return this._findWidgetInstance(i=>t===i.name)}findWidgetInstanceByDataField(t){return this._findWidgetInstance(i=>t===(Me(i)?i:i.dataField))}findItemContainerByItem(t){for(var i in this._map)if(this._map[i].item===t)return this._map[i].$itemContainer;return null}findItemIndexByItem(t){return this._findFieldByCondition(i=>{var{item:n}=i;return n===t},"itemIndex")}findPreparedItemByItem(t){return this._findFieldByCondition(i=>{var{item:n}=i;return n===t},"preparedItem")}getItems(){return this._map}each(t){F(this._map,function(i,n){t(i,n)})}removeItemsByPathStartWith(t){var i=Object.keys(this._map),n=i.filter(r=>this._map[r].path?this._map[r].path.indexOf(t,0)>-1:!1);n.forEach(r=>this.removeItemByKey(r))}}var Yd={move(e,t){ti(e,{left:t})}},hv={moveTo(e,t,i,n){$t.animate(e,{type:"slide",to:{left:t},duration:i,complete:n})},complete(e){$t.stop(e,!0)}},AX="dx-multiview",DX="dx-multiview-wrapper",OX="dx-multiview-item-container",HS="dx-multiview-item",RX="dx-multiview-item-hidden",kX="dxMultiViewItemData",BX=200,$S=e=>+e,LX=e=>In(e).left,L1=cC.inherit({_activeStateUnit:"."+HS,_supportedKeys:function(){return O(this.callBase(),{pageUp:ee,pageDown:ee})},_getDefaultOptions:function(){return O(this.callBase(),{selectedIndex:0,swipeEnabled:!0,animationEnabled:!0,loop:!1,deferRendering:!0,_itemAttributes:{role:"tabpanel"},loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectionByClick:!1})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}}])},_itemClass:function(){return HS},_itemDataKey:function(){return kX},_itemContainer:function(){return this._$itemContainer},_itemElements:function(){return this._itemContainer().children(this._itemSelector())},_itemWidth:function(){return this._itemWidthValue||(this._itemWidthValue=$e(this._$wrapper)),this._itemWidthValue},_clearItemWidthCache:function(){delete this._itemWidthValue},_itemsCount:function(){return this.option("items").length},_normalizeIndex:function(e){var t=this._itemsCount();return e<0&&(e+=t),e>=t&&(e-=t),e},_getRTLSignCorrection:function(){return this.option("rtlEnabled")?-1:1},_init:function(){this.callBase.apply(this,arguments);var e=this.$element();e.addClass(AX),this._$wrapper=v("<div>").addClass(DX),this._$wrapper.appendTo(e),this._$itemContainer=v("<div>").addClass(OX),this._$itemContainer.appendTo(this._$wrapper),this.option("loopItemFocus",this.option("loop")),this._initSwipeable()},_initMarkup:function(){this._deferredItems=[],this.callBase();var e=this._getSelectedItemIndices();this._updateItemsVisibility(e[0])},_afterItemElementDeleted:function(e,t){this.callBase(e,t),this._deferredItems&&this._deferredItems.splice(t.itemIndex,1)},_beforeItemElementInserted:function(e){this.callBase.apply(this,arguments),this._deferredItems&&this._deferredItems.splice(e.index,0,null)},_executeItemRenderAction:function(e,t,i){e=(this.option("items")||[]).indexOf(t),this.callBase(e,t,i)},_renderItemContent:function(e){var t=new te,i=this,n=this.callBase,r=new te;return r.done(function(){var a=n.call(i,e);t.resolve(a)}),this._deferredItems[e.index]=r,this.option("deferRendering")||r.resolve(),t.promise()},_render:function(){this.callBase(),Zt(()=>{var e=this._getSelectedItemIndices();this._updateItems(e[0])})},_updateItems:function(e,t){this._updateItemsPosition(e,t),this._updateItemsVisibility(e,t)},_modifyByChanges:function(){this.callBase.apply(this,arguments);var e=this._getSelectedItemIndices();this._updateItemsVisibility(e[0])},_updateItemsPosition:function(e,t){var i=this._itemElements(),n=E(t)?-this._animationDirection(t,e):void 0,r=i.eq(e);Yd.move(r,0),E(t)&&Yd.move(i.eq(t),100*n+"%")},_updateItemsVisibility:function(e,t){var i=this._itemElements();i.each((function(n,r){var a=v(r),o=n!==e&&n!==t;o||this._renderSpecificItem(n),a.toggleClass(RX,o),this.setAria("hidden",o||void 0,a)}).bind(this))},_renderSpecificItem:function(e){var t=this._itemElements().eq(e),i=t.find(this._itemContentClass()).length>0;E(e)&&!i&&(this._deferredItems[e].resolve(),nr(t))},_refreshItem:function(e,t){this.callBase(e,t),this._updateItemsVisibility(this.option("selectedIndex"))},_setAriaSelected:ee,_updateSelection:function(e,t){var i=e[0],n=t[0];hv.complete(this._$itemContainer),this._updateItems(n,i);var r=this._animationDirection(i,n);this._animateItemContainer(r*this._itemWidth(),(function(){Yd.move(this._$itemContainer,0),this._updateItems(i),$e(this._$itemContainer)}).bind(this))},_animateItemContainer:function(e,t){var i=this.option("animationEnabled")?BX:0;hv.moveTo(this._$itemContainer,e,i,t)},_animationDirection:function(e,t){var i=LX(this._$itemContainer),n=(t-e)*this._getRTLSignCorrection()*this._getItemFocusLoopSignCorrection(),r=i!==0,a=r?i:n;return Ds(a)},_getSwipeDisabledState(){return!this.option("swipeEnabled")||this._itemsCount()<=1},_initSwipeable(){this._createComponent(this.$element(),ph,{disabled:this._getSwipeDisabledState(),elastic:!1,itemSizeFunc:this._itemWidth.bind(this),onStart:e=>this._swipeStartHandler(e.event),onUpdated:e=>this._swipeUpdateHandler(e.event),onEnd:e=>this._swipeEndHandler(e.event)})},_swipeStartHandler:function(e){hv.complete(this._$itemContainer);var t=this.option("selectedIndex"),i=this.option("loop"),n=this._itemsCount()-1,r=this.option("rtlEnabled");e.maxLeftOffset=$S(i||(r?t>0:t<n)),e.maxRightOffset=$S(i||(r?t<n:t>0)),this._swipeDirection=null},_swipeUpdateHandler:function(e){var t=e.offset,i=Ds(t)*this._getRTLSignCorrection();if(Yd.move(this._$itemContainer,t*this._itemWidth()),i!==this._swipeDirection){this._swipeDirection=i;var n=this.option("selectedIndex"),r=this._normalizeIndex(n-i);this._updateItems(n,r)}},_swipeEndHandler:function(e){var t=e.targetOffset*this._getRTLSignCorrection();if(t){this.option("selectedIndex",this._normalizeIndex(this.option("selectedIndex")-t));var i=this.itemElements().filter(".dx-item-selected");this.option("focusStateEnabled")&&this.option("focusedElement",Fe(i))}else this._animateItemContainer(0,ee)},_getItemFocusLoopSignCorrection:function(){return this._itemFocusLooped?-1:1},_moveFocus:function(){this.callBase.apply(this,arguments),this._itemFocusLooped=!1},_prevItem:function(e){var t=this.callBase.apply(this,arguments);return this._itemFocusLooped=t.is(e.last()),t},_nextItem:function(e){var t=this.callBase.apply(this,arguments);return this._itemFocusLooped=t.is(e.first()),t},_dimensionChanged:function(){this._clearItemWidthCache()},_visibilityChanged:function(e){e&&this._dimensionChanged()},_updateSwipeDisabledState(){var e=this._getSwipeDisabledState();ph.getInstance(this.$element()).option("disabled",e)},_optionChanged:function(e){var t=e.value;switch(e.name){case"loop":this.option("loopItemFocus",t);break;case"animationEnabled":break;case"swipeEnabled":this._updateSwipeDisabledState();break;case"deferRendering":this._invalidate();break;case"items":this._updateSwipeDisabledState(),this.callBase(e);break;default:this.callBase(e)}}});tt("dxMultiView",L1);var PX="dx-tabs-item-badge",WS="dx-badge",FX=Do.inherit({_renderWatchers:function(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this))},_renderBadge:function(e){if(this._$element.children("."+WS).remove(),!!e){var t=v("<div>").addClass(PX).addClass(WS).text(e);this._$element.append(t)}}}),zS="dx-tabs-expanded";function P1(e){return e.scrollWidth-e.clientWidth}function MX(e,t){return Math.round(e)<=t}function VX(e,t,i){return Math.round(P1(e)-t)<=i}var NX="dx-tabs",HX="dx-tabs-wrapper",GS="dx-tabs-stretched",$X="dx-tabs-scrollable",US="dx-tabs-nav-buttons",KS="dx-overflow-hidden",jS="dx-tab",WX="dx-tab-selected",zX="dx-tabs-nav-button",GX="dx-tabs-nav-button-left",UX="dx-tabs-nav-button-right",KX="dx-tab-text",jX="dxTabData",qS="chevronnext",YS="chevronprev",qX=100,XS=5,YX=300,ZS=30,SC=cC.inherit({_activeStateUnit:"."+jS,_getDefaultOptions:function(){return O(this.callBase(),{hoverStateEnabled:!0,showNavButtons:!0,scrollByContent:!0,scrollingEnabled:!0,selectionMode:"single",activeStateEnabled:!0,selectionRequired:!1,selectOnFocus:!0,loopItemFocus:!1,useInkRipple:!1,badgeExpr:function(e){return e?e.badge:void 0},_itemAttributes:{role:"tab"}})},_defaultOptionsRules:function(){var e=Un();return this.callBase().concat([{device:function(){return Oe.real().deviceType!=="desktop"},options:{showNavButtons:!1}},{device:{deviceType:"desktop"},options:{scrollByContent:!1}},{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return Qt(e)},options:{useInkRipple:!0,selectOnFocus:!1}}])},_init:function(){this.callBase(),this.setAria("role","tablist"),this.$element().addClass(NX),this._renderWrapper(),this._renderMultiple(),this._feedbackHideTimeout=qX},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({item:new Oo((function(e,t){Ye(t)?this._prepareDefaultItemTemplate(t,e):e.text(String(t));var i=mo(t.icon);i&&i.prependTo(e),e.wrapInner(v("<span>").addClass(KX))}).bind(this),["text","html","icon"],this.option("integrationOptions.watchMethod"))})},_createItemByTemplate:function(e,t){var{itemData:i,container:n,index:r}=t;return this._deferredTemplates[r]=new te,e.render({model:i,container:n,index:r,onRendered:()=>this._deferredTemplates[r].resolve()})},_itemClass:function(){return jS},_selectedItemClass:function(){return WX},_itemDataKey:function(){return jX},_initMarkup:function(){this._deferredTemplates=[],this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.$element().addClass(KS)},_render:function(){this.callBase(),this._deferRenderScrolling()},_deferRenderScrolling(){Ae.apply(this,this._deferredTemplates).done(()=>this._renderScrolling())},_renderScrolling:function(){var e=[GS,zS,KS];if(this.$element().removeClass(e.join(" ")),this.option("scrollingEnabled")&&this._isItemsWidthExceeded()){this._scrollable||(this._renderScrollable(),this._renderNavButtons());var t=this.getScrollable();if(t.update(),this.option("rtlEnabled")){var i=P1(v(this.getScrollable().container()).get(0));t.scrollTo({left:i})}this._updateNavButtonsVisibility(),this._scrollToItem(this.option("selectedItem"))}this.option("scrollingEnabled")&&this._isItemsWidthExceeded()||(this._cleanScrolling(),this._needStretchItems()&&!this._isItemsWidthExceeded()&&this.$element().addClass(GS),this.$element().removeClass(US).addClass(zS))},_isItemsWidthExceeded:function(){var e=this._getSummaryItemsWidth(this._getVisibleItems(),!0);return e-1>$e(this.$element())},_needStretchItems:function(){var e=this._getVisibleItems(),t=$e(this.$element()),i=[];F(e,(r,a)=>{i.push(lt(a,!0))});var n=Math.max.apply(null,i);return n>t/e.length},_cleanNavButtons:function(){!this._leftButton||!this._rightButton||(this._leftButton.$element().remove(),this._rightButton.$element().remove(),this._leftButton=null,this._rightButton=null)},_cleanScrolling:function(){this._scrollable&&(this._$wrapper.appendTo(this.$element()),this._scrollable.$element().remove(),this._scrollable=null,this._cleanNavButtons())},_renderInkRipple:function(){this._inkRipple=Gm()},_toggleActiveState:function(e,t,i){if(this.callBase.apply(this,arguments),!!this._inkRipple){var n={element:e,event:i};t?this._inkRipple.showWave(n):this._inkRipple.hideWave(n)}},_renderMultiple:function(){this.option("selectionMode")==="multiple"&&this.option("selectOnFocus",!1)},_renderWrapper:function(){this._$wrapper=v("<div>").addClass(HX),this.$element().append(this._$wrapper)},_itemContainer:function(){return this._$wrapper},_renderScrollable:function(){var e=this.$element().wrapInner(v("<div>").addClass($X)).children();this._scrollable=this._createComponent(e,cn,{direction:"horizontal",showScrollbar:"never",useKeyboard:!1,useNative:!1,scrollByContent:this.option("scrollByContent"),onScroll:()=>{this._updateNavButtonsVisibility()}}),this.$element().append(this._scrollable.$element())},_scrollToItem:function(e){if(this._scrollable){var t=this._editStrategy.getItemElement(e);this._scrollable.scrollToElement(t)}},_renderNavButtons:function(){if(this.$element().toggleClass(US,this.option("showNavButtons")),!!this.option("showNavButtons")){var e=this.option("rtlEnabled");this._leftButton=this._createNavButton(-ZS,e?qS:YS);var t=this._leftButton.$element();t.addClass(GX),this.$element().prepend(t),this._rightButton=this._createNavButton(ZS,e?YS:qS);var i=this._rightButton.$element();i.addClass(UX),this.$element().append(i)}},_updateNavButtonsVisibility:function(){var e=this.getScrollable();this._leftButton&&this._leftButton.option("disabled",MX(e.scrollLeft(),1)),this._rightButton&&this._rightButton.option("disabled",VX(v(e.container()).get(0),e.scrollLeft(),1))},_updateScrollPosition:function(e,t){this._scrollable.update(),this._scrollable.scrollBy(e/t)},_createNavButton:function(e,t){var i=this,n=i._createAction(function(){i._holdInterval=setInterval(function(){i._updateScrollPosition(e,XS)},XS)}),r=me(ma.name,"dxNavButton"),a=me(ut.up,"dxNavButton"),o=me(ut.out,"dxNavButton"),s=this._createComponent(v("<div>").addClass(zX),Si,{focusStateEnabled:!1,icon:t,onClick:function(){i._updateScrollPosition(e,1)},integrationOptions:{}}),l=s.$element();return D.on(l,r,{timeout:YX},(function(u){n({event:u})}).bind(this)),D.on(l,a,function(){i._clearInterval()}),D.on(l,o,function(){i._clearInterval()}),s},_clearInterval:function(){this._holdInterval&&clearInterval(this._holdInterval)},_updateSelection:function(e){this._scrollable&&this._scrollable.scrollToElement(this.itemElements().eq(e[0]),{left:1,right:1})},_visibilityChanged:function(e){e&&this._dimensionChanged()},_dimensionChanged:function(){this._renderScrolling()},_itemSelectHandler:function(e){this.option("selectionMode")==="single"&&this.isItemSelected(e.currentTarget)||this.callBase(e)},_clean:function(){this._deferredTemplates=[],this._cleanScrolling(),this.callBase()},_optionChanged:function(e){switch(e.name){case"useInkRipple":case"scrollingEnabled":case"showNavButtons":this._invalidate();break;case"scrollByContent":this._scrollable&&this._scrollable.option(e.name,e.value);break;case"width":this.callBase(e),this._dimensionChanged();break;case"selectionMode":this._renderMultiple(),this.callBase(e);break;case"badgeExpr":this._invalidate();break;default:this.callBase(e)}},_afterItemElementInserted(){this.callBase(),this._deferRenderScrolling()},_afterItemElementDeleted(e,t){this.callBase(e,t),this._renderScrolling()},getScrollable(){return this._scrollable}});SC.ItemClass=FX;tt("dxTabs",SC);class XX extends Do{_renderWatchers(){return this._startWatcher("badge",ee),super._renderWatchers()}}var ZX="dx-tabpanel",QX="dx-tabpanel-tabs",JX="dx-tabpanel-container",eZ="dx-tab-text",EC=L1.inherit({_getDefaultOptions:function(){return O(this.callBase(),{itemTitleTemplate:"title",hoverStateEnabled:!0,showNavButtons:!1,scrollByContent:!0,scrollingEnabled:!0,onTitleClick:null,onTitleHold:null,onTitleRendered:null,badgeExpr:function(e){return e?e.badge:void 0}})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()},options:{focusStateEnabled:!0}},{device:function(){return!fo},options:{swipeEnabled:!1}},{device:{platform:"generic"},options:{animationEnabled:!1}}])},_init:function(){this.callBase(),this.$element().addClass(ZX),this.setAria("role","tabpanel")},_initMarkup:function(){this.callBase(),this._createTitleActions(),this._renderLayout()},_initTemplates:function(){this.callBase(),this._templateManager.addDefaultTemplates({title:new Oo(function(e,t){if(Ye(t)){var i=mo(t.icon);i&&e.append(i),E(t.title)&&!Ye(t.title)&&e.append(fe.createTextNode(t.title))}else E(t)&&e.text(String(t));e.wrapInner(v("<span>").addClass(eZ))},["title","icon"],this.option("integrationOptions.watchMethod"))})},_createTitleActions:function(){this._createTitleClickAction(),this._createTitleHoldAction(),this._createTitleRenderedAction()},_createTitleClickAction:function(){this._titleClickAction=this._createActionByOption("onTitleClick")},_createTitleHoldAction:function(){this._titleHoldAction=this._createActionByOption("onTitleHold")},_createTitleRenderedAction:function(){this._titleRenderedAction=this._createActionByOption("onTitleRendered")},_renderContent:function(){var e=this;this.callBase(),this.option("templatesRenderAsynchronously")&&(this._resizeEventTimer=setTimeout(function(){e._updateLayout()},0))},_renderLayout:function(){if(this._tabs){this._updateLayout();return}var e=this.$element();this._$tabContainer=v("<div>").addClass(QX).appendTo(e);var t=v("<div>").appendTo(this._$tabContainer);this._tabs=this._createComponent(t,SC,this._tabConfig()),this._$container=v("<div>").addClass(JX).appendTo(e),this._$container.append(this._$wrapper),this._updateLayout()},_updateLayout:function(){if(Ke()){var e=at(this._$tabContainer);this._$container.css({marginTop:-e,paddingTop:e})}},_refreshActiveDescendant:function(){if(this._tabs){var e=this._tabs,t=e.itemElements(),i=v(t[e.option("selectedIndex")]),n=this.getFocusedItemId();this.setAria("controls",void 0,v(t)),this.setAria("controls",n,i)}},_tabConfig:function(){return{selectOnFocus:!0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),repaintChangesOnly:this.option("repaintChangesOnly"),tabIndex:this.option("tabIndex"),selectedIndex:this.option("selectedIndex"),badgeExpr:this.option("badgeExpr"),onItemClick:this._titleClickAction.bind(this),onItemHold:this._titleHoldAction.bind(this),itemHoldTimeout:this.option("itemHoldTimeout"),onSelectionChanged:(function(e){this.option("selectedIndex",e.component.option("selectedIndex")),this._refreshActiveDescendant()}).bind(this),onItemRendered:this._titleRenderedAction.bind(this),itemTemplate:this._getTemplateByOption("itemTitleTemplate"),items:this.option("items"),noDataText:null,scrollingEnabled:this.option("scrollingEnabled"),scrollByContent:this.option("scrollByContent"),showNavButtons:this.option("showNavButtons"),itemTemplateProperty:"tabTemplate",loopItemFocus:this.option("loop"),selectionRequired:!0,onOptionChanged:(function(e){if(e.name==="focusedElement")if(e.value){var t=v(e.value),i=this._itemElements().eq(t.index());this.option("focusedElement",Fe(i))}else this.option("focusedElement",e.value)}).bind(this),onFocusIn:(function(e){this._focusInHandler(e.event)}).bind(this),onFocusOut:(function(e){this._isFocusOutHandlerExecuting||this._focusOutHandler(e.event)}).bind(this)}},_renderFocusTarget:function(){this._focusTarget().attr("tabIndex",-1)},_updateFocusState:function(e,t){this.callBase(e,t),e.target===this._tabs._focusTarget().get(0)&&this._toggleFocusClass(t,this._focusTarget())},_focusOutHandler:function(e){this._isFocusOutHandlerExecuting=!0,this.callBase.apply(this,arguments),this._tabs._focusOutHandler(e),this._isFocusOutHandlerExecuting=!1},_setTabsOption:function(e,t){this._tabs&&this._tabs.option(e,t)},_visibilityChanged:function(e){e&&(this._tabs._dimensionChanged(),this._updateLayout())},registerKeyHandler:function(e,t){this.callBase(e,t),this._tabs&&this._tabs.registerKeyHandler(e,t)},repaint:function(){this.callBase(),this._tabs.repaint()},_optionChanged:function(e){var t=e.name,i=e.value,n=e.fullName;switch(t){case"dataSource":this.callBase(e);break;case"items":this._setTabsOption(t,this.option(t)),this._updateLayout(),this.option("repaintChangesOnly")||this._tabs.repaint(),this.callBase(e);break;case"width":this.callBase(e),this._tabs.repaint();break;case"selectedIndex":case"selectedItem":if(this._setTabsOption(n,i),this.callBase(e),this.option("focusStateEnabled")===!0){var r=this.option("selectedIndex"),a=this._itemElements().eq(r);this.option("focusedElement",Fe(a))}break;case"itemHoldTimeout":case"focusStateEnabled":case"hoverStateEnabled":this._setTabsOption(n,i),this.callBase(e);break;case"scrollingEnabled":case"scrollByContent":case"showNavButtons":this._setTabsOption(n,i);break;case"focusedElement":var o=i&&v(i).index(),s=i&&this._tabs._itemElements().eq(o);this._setTabsOption("focusedElement",Fe(s)),this.callBase(e);break;case"itemTitleTemplate":this._setTabsOption("itemTemplate",this._getTemplateByOption("itemTitleTemplate"));break;case"onTitleClick":this._createTitleClickAction(),this._setTabsOption("onItemClick",this._titleClickAction.bind(this));break;case"onTitleHold":this._createTitleHoldAction(),this._setTabsOption("onItemHold",this._titleHoldAction.bind(this));break;case"onTitleRendered":this._createTitleRenderedAction(),this._setTabsOption("onItemRendered",this._titleRenderedAction.bind(this));break;case"loop":this._setTabsOption("loopItemFocus",i);break;case"badgeExpr":this._invalidate();break;default:this.callBase(e)}},_clean:function(){clearTimeout(this._resizeEventTimer),this.callBase()}});EC.ItemClass=XX;tt("dxTabPanel",EC);class zs{constructor(t){this._options=t,this._itemsRunTimeInfo=this._options.itemsRunTimeInfo}findInstance(){return this._itemsRunTimeInfo.findWidgetInstanceByItem(this._options.item)}findItemContainer(){return this._itemsRunTimeInfo.findItemContainerByItem(this._options.item)}findPreparedItem(){return this._itemsRunTimeInfo.findPreparedItemByItem(this._options.item)}tryExecute(){nt.abstract()}}var ag=(e,t)=>"".concat(t?"tabs":"items","[").concat(e,"]"),F1=(e,t)=>E(e)&&E(t)?"".concat(e,".").concat(t):e||t,og=e=>e?e.replace(/\s/g,""):void 0,tZ=(e,t)=>e?e.dataField===t||e.name===t||og(e.title)===t||e.itemType==="group"&&og(e.caption)===t:!1,Bl=(e,t)=>"".concat(e,".").concat(t),QS=e=>{var t=e.split(".");return t[t.length-1].replace(/\[\d+]/,"")},iZ=e=>{for(var t=e.split("."),i=[...t],n=t.length-1;n>=0;n--){if(M1(t[n]))return i.join(".");i.splice(n,1)}return""},M1=e=>e.indexOf("tabs")>-1,V1=(e,t,i)=>{var n=e.indexOf(t);if(n>-1)return ag(n,i);for(var r=0;r<e.length;r++){var a=e[r],o=a.tabs||a.items;if(o){var s=V1(o,t,a.tabs);if(s)return F1(ag(r,i),s)}}};function nZ(e){var{form:t,$formElement:i,formOptions:n,items:r,validationGroup:a,extendedLayoutManagerOptions:o,onFieldDataChanged:s,onContentReady:l,onDisposing:u,onFieldItemRendered:d}=e,c={form:t,items:r,$formElement:i,validationGroup:a,onFieldDataChanged:s,onContentReady:l,onDisposing:u,onFieldItemRendered:d,validationBoundary:n.scrollingEnabled?i:void 0,scrollingEnabled:n.scrollingEnabled,showRequiredMark:n.showRequiredMark,showOptionalMark:n.showOptionalMark,requiredMark:n.requiredMark,optionalMark:n.optionalMark,requiredMessage:n.requiredMessage,screenByWidth:n.screenByWidth,layoutData:n.formData,labelLocation:n.labelLocation,customizeItem:n.customizeItem,minColWidth:n.minColWidth,showColonAfterLabel:n.showColonAfterLabel,onEditorEnterKey:n.onEditorEnterKey,labelMode:n.labelMode},h=O(c,{isRoot:o.isRoot,colCount:o.colCount,alignItemLabels:o.alignItemLabels,cssItemClass:o.cssItemClass,colCountByScreen:o.colCountByScreen,onLayoutChanged:o.onLayoutChanged,width:o.width});return h}class rZ extends zs{tryExecute(){var{value:t}=this._options,i=this.findInstance();return i?(i.option(t),!0):!1}}class JS extends zs{tryExecute(){var t=this.findInstance();if(t){var{optionName:i,item:n,value:r}=this._options,a=this._itemsRunTimeInfo.findItemIndexByItem(n);if(a>=0)return t.option(Bl("items[".concat(a,"]"),i),r),!0}return!1}}class aZ extends zs{tryExecute(){var t=this.findPreparedItem();return t!=null&&t._prepareGroupItemTemplate&&t._renderGroupContentTemplate?(t._prepareGroupItemTemplate(this._options.item.template),t._renderGroupContentTemplate(),!0):!1}}class oZ extends zs{tryExecute(){var t=this.findInstance();if(t){var{value:i}=this._options;return t.option("dataSource",i),!0}return!1}}class sZ extends zs{tryExecute(){var{item:t}=this._options,i=this.findInstance(),n=i&&Mt(i.$element()[0],"dxValidator");if(n&&t){var r=s=>s.type==="required",a=(n.option("validationRules")||[]).some(r),o=(t.validationRules||[]).some(r);if(!a&&!o||a&&o)return n.option("validationRules",t.validationRules),!0}return!1}}class lZ extends zs{tryExecute(){var t=this.findItemContainer(),{previousValue:i,value:n}=this._options;return t?(t.removeClass(i).addClass(n),!0):!1}}var uZ=(e,t)=>{var i;switch(e){case"editorOptions":case"buttonOptions":return new rZ(t);case"validationRules":return new sZ(t);case"cssClass":return new lZ(t);case"badge":case"disabled":case"icon":case"tabTemplate":case"title":return new JS(O(t,{optionName:e}));case"tabs":return new oZ(t);case"template":return((i=t.item)===null||i===void 0?void 0:i.itemType)==="group"?new aZ(t):new JS(O(t,{optionName:e}));default:return null}},dZ=qe(),N1="dx-responsivebox",eE=N1+"-screen-",cZ="dx-box-item",tE="dxBoxItemData",hZ=1920,H1=Ro.inherit({_getDefaultOptions:function(){return O(this.callBase(),{rows:[],cols:[],screenByWidth:null,singleColumnScreen:"",height:"100%",width:"100%",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,onLayoutChanged:null,currentScreenFactor:void 0,_layoutStrategy:void 0})},_init:function(){this.option("screenByWidth")||this._options.silent("screenByWidth",Ug),this.callBase(),this._initLayoutChangedAction()},_initLayoutChangedAction:function(){this._layoutChangedAction=this._createActionByOption("onLayoutChanged",{excludeValidators:["disabled","readonly"]})},_itemClass:function(){return cZ},_itemDataKey:function(){return tE},_initMarkup:function(){this.callBase(),this.$element().addClass(N1),this._updateRootBox()},_updateRootBox:function(){clearTimeout(this._updateTimer),this._updateTimer=setTimeout((function(){this._$root&&D.triggerHandler(this._$root,"dxupdate")}).bind(this))},_renderItems:function(){this._setScreenSize(),this._screenItems=this._itemsByScreen(),this._prepareGrid(),this._spreadItems(),this._layoutItems(),this._linkNodeToItem()},_itemOptionChanged:function(e){var t=this._findItemElementByItem(e);t.length&&(this._refreshItem(t,e),this._clearItemNodeTemplates(),this._update(!0))},_setScreenSize:function(){var e=this._getCurrentScreen();this._removeScreenSizeClass(),this.$element().addClass(eE+e),this.option("currentScreenFactor",e)},_removeScreenSizeClass:function(){var e=this.option("currentScreenFactor");e&&this.$element().removeClass(eE+e)},_prepareGrid:function(){var e=this._grid=[];this._prepareRowsAndCols(),F(this._rows,(function(){var t=[];e.push(t),F(this._cols,(function(){t.push(this._createEmptyCell())}).bind(this))}).bind(this))},getSingleColumnRows:function(){var e=this.option("rows"),t=this._screenItems.length;if(e.length){for(var i=this._filterByScreen(e),n=[],r=0;r<t;r++){var a=this._defaultSizeConfig();r<i.length&&E(i[r].shrink)&&(a.shrink=i[r].shrink),n.push(a)}return n}else return this._defaultSizeConfig(t)},_prepareRowsAndCols:function(){this._isSingleColumnScreen()?(this._prepareSingleColumnScreenItems(),this._rows=this.getSingleColumnRows(),this._cols=this._defaultSizeConfig(1)):(this._rows=this._sizesByScreen(this.option("rows")),this._cols=this._sizesByScreen(this.option("cols")))},_isSingleColumnScreen:function(){return this._screenRegExp().test(this.option("singleColumnScreen"))||!this.option("rows").length||!this.option("cols").length},_prepareSingleColumnScreenItems:function(){this._screenItems.sort(function(e,t){return e.location.row-t.location.row||e.location.col-t.location.col}),F(this._screenItems,function(e,t){O(t.location,{row:e,col:0,rowspan:1,colspan:1})})},_sizesByScreen:function(e){return Jt(this._filterByScreen(e),(function(t){return O(this._defaultSizeConfig(),t)}).bind(this))},_createDefaultSizeConfig:function(){return{ratio:1,baseSize:0,minSize:0,maxSize:0}},_defaultSizeConfig:function(e){var t=this._createDefaultSizeConfig();if(!arguments.length)return t;for(var i=[],n=0;n<e;n++)i.push(t);return i},_filterByScreen:function(e){var t=this._screenRegExp();return Vi(e,function(i){return!i.screen||t.test(i.screen)})},_screenRegExp:function(){var e=this._getCurrentScreen();return new RegExp("(^|\\s)"+e+"($|\\s)","i")},_getCurrentScreen:function(){var e=this._screenWidth();return this.option("screenByWidth")(e)},_screenWidth:function(){return Ke()?$e(dZ):hZ},_createEmptyCell:function(){return{item:{},location:{colspan:1,rowspan:1}}},_spreadItems:function(){F(this._screenItems,(function(e,t){var i=t.location||{},n=i.col,r=i.row,a=this._grid[r],o=a&&a[n];this._occupyCells(o,t)}).bind(this))},_itemsByScreen:function(){return this.option("items").reduce((e,t)=>{var i=t.location||{};return i=Ye(i)?[i]:i,this._filterByScreen(i).forEach(n=>{e.push({item:t,location:O({rowspan:1,colspan:1},n)})}),e},[])},_occupyCells:function(e,t){!e||this._isItemCellOccupied(e,t)||(O(e,t),this._markSpanningCell(e))},_isItemCellOccupied:function(e,t){if(!Rn(e.item))return!0;var i=!1;return this._loopOverSpanning(t.location,function(n){i=i||!Rn(n.item)}),i},_loopOverSpanning:function(e,t){var i=e.row+e.rowspan-1,n=e.col+e.colspan-1,r=Math.min(i,this._rows.length-1),a=Math.min(n,this._cols.length-1);e.rowspan-=i-r,e.colspan-=n-a;for(var o=e.row;o<=r;o++)for(var s=e.col;s<=a;s++)(o!==e.row||s!==e.col)&&t(this._grid[o][s])},_markSpanningCell:function(e){this._loopOverSpanning(e.location,function(t){O(t,{item:e.item,spanningCell:e})})},_linkNodeToItem:function(){F(this._itemElements(),function(e,t){var i=v(t),n=i.data(tE);n.box||(n.node=i.children())})},_layoutItems:function(){var e=this._grid.length,t=e&&this._grid[0].length;if(!(!e&&!t)){var i=this._layoutBlock({direction:"col",row:{start:0,end:e-1},col:{start:0,end:t-1}}),n=this._prepareBoxConfig(i.box||{direction:"row",items:[O(i,{ratio:1})]});O(n,this._rootBoxConfig(n.items)),this._$root=v("<div>").appendTo(this._itemContainer()),this._createComponent(this._$root,Ca,n)}},_rootBoxConfig:function(e){var t=F(e,(function(i,n){this._needApplyAutoBaseSize(n)&&O(n,{baseSize:"auto"})}).bind(this));return O({width:"100%",height:"100%",items:t,itemTemplate:this._getTemplateByOption("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this._createActionByOption("onItemHold"),onItemClick:this._createActionByOption("onItemClick"),onItemContextMenu:this._createActionByOption("onItemContextMenu"),onItemRendered:this._createActionByOption("onItemRendered")},{_layoutStrategy:this.option("_layoutStrategy")})},_needApplyAutoBaseSize:function(e){return!e.baseSize&&(!e.minSize||e.minSize==="auto")&&(!e.maxSize||e.maxSize==="auto")},_prepareBoxConfig:function(e){return O(e||{},{crossAlign:"stretch",onItemStateChanged:this.option("onItemStateChanged")})},_layoutBlock:function(e){return this._isSingleItem(e)?this._itemByCell(e.row.start,e.col.start):this._layoutDirection(e)},_isSingleItem:function(e){var t=this._grid[e.row.start][e.col.start].location,i=e.row.end-e.row.start===t.rowspan-1,n=e.col.end-e.col.start===t.colspan-1;return i&&n},_itemByCell:function(e,t){var i=this._grid[e][t];return i.spanningCell?null:i.item},_layoutDirection:function(e){for(var t=[],i=e.direction,n=this._crossDirection(i),r;r=this._nextBlock(e);){if(this._isBlockIndivisible(e.prevBlockOptions,r))throw Je.Error("E1025");var a=this._layoutBlock({direction:n,row:r.row,col:r.col,prevBlockOptions:e});a&&(O(a,this._blockSize(r,n)),t.push(a)),e[n].start=r[n].end+1}return{box:this._prepareBoxConfig({direction:i,items:t})}},_isBlockIndivisible:function(e,t){return e&&e.col.start===t.col.start&&e.col.end===t.col.end&&e.row.start===t.row.start&&e.row.end===t.row.end},_crossDirection:function(e){return e==="col"?"row":"col"},_nextBlock:function(e){var t=e.direction,i=this._crossDirection(t),n=e[t].start,r=e[t].end,a=e[i].start;if(a>e[i].end)return null;for(var o=1,s=a;s<a+o;s++){for(var l=1,u=n;u<=r;u++){var d=this._cellByDirection(t,u,s);l=Math.max(l,d.location[i+"span"])}var c=s+l,h=a+o;c>h&&(o+=c-h)}var f={};return f[t]={start:n,end:r},f[i]={start:a,end:a+o-1},f},_cellByDirection:function(e,t,i){return e==="col"?this._grid[i][t]:this._grid[t][i]},_blockSize:function(e,t){for(var i=t==="row"?"auto":0,n=t==="row"?this._rows:this._cols,r=O(this._createDefaultSizeConfig(),{ratio:0}),a=e[t].start;a<=e[t].end;a++){var o=n[a];r.ratio+=o.ratio,r.baseSize+=o.baseSize,r.minSize+=o.minSize,r.maxSize+=o.maxSize,E(o.shrink)&&(r.shrink=o.shrink)}return r.minSize=r.minSize?r.minSize:i,r.maxSize=r.maxSize?r.maxSize:"auto",this._isSingleColumnScreen()&&(r.baseSize="auto"),r},_update:function(e){var t=this._$root;this._renderItems(),t&&(e?t.remove():(t.detach(),this._saveAssistantRoot(t))),this._layoutChangedAction(),this._updateRootBox()},_saveAssistantRoot:function(e){this._assistantRoots=this._assistantRoots||[],this._assistantRoots.push(e)},_dispose:function(){clearTimeout(this._updateTimer),this._clearItemNodeTemplates(),this._cleanUnusedRoots(),this.callBase.apply(this,arguments)},_cleanUnusedRoots:function(){this._assistantRoots&&F(this._assistantRoots,function(e,t){v(t).remove()})},_clearItemNodeTemplates:function(){F(this.option("items"),function(){delete this.node})},_toggleVisibility:function(e){this.callBase(e),e&&this._updateRootBox()},_attachClickEvent:ee,_optionChanged:function(e){switch(e.name){case"rows":case"cols":case"screenByWidth":case"_layoutStrategy":case"singleColumnScreen":this._clearItemNodeTemplates(),this._invalidate();break;case"width":case"height":this.callBase(e),this._update();break;case"onLayoutChanged":this._initLayoutChangedAction();break;case"itemTemplate":this._clearItemNodeTemplates(),this.callBase(e);break;case"currentScreenFactor":break;default:this.callBase(e)}},_dimensionChanged:function(){this._getCurrentScreen()!==this.option("currentScreenFactor")&&this._update()},repaint:function(){this._update()}});tt("dxResponsiveBox",H1);var fZ="dx-widget",pZ="dx-form",fv="dx-form-group",vZ="dx-form-group-caption",iE="dx-col-",$1="dx-field-item",nE="dx-layout-manager-one-col",W1="dx-field-item-label-content",_Z="dx-layout-manager",z1="dx-field-item-label",sg="dx-field-item-content",gZ="dx-single-column-item-content",G1="dx-root-simple-item",mZ="dx-form-group-content",CZ="dx-field-item-has-group",yZ="dx-field-item-has-tabs",xZ="dx-form-group-with-caption",rE="dx-field-item-tab",aE="dx-group-colcount-",oE="group-col-count",bZ="dx-form-validation-summary",SZ="dx-form-styling-mode-underlined",lg="simple",EZ=nt.inherit({ctor(e,t){this.editor=e,this.validator=t,this.validationRequestsCallbacks=[];var i=n=>{this.validationRequestsCallbacks.forEach(r=>r(n))};e.validationRequest.add(i),e.on("disposing",function(){e.validationRequest.remove(i)})},getValue(){return this.editor.option("value")},getCurrentValidationError(){return this.editor.option("validationError")},bypass(){return this.editor.option("disabled")},applyValidationResults(e){this.editor.option({validationErrors:e.brokenRules,validationStatus:e.status})},reset(){this.editor.reset()},focus(){this.editor.focus()}}),wZ="dx-validator",sE="valid",IZ="invalid",pv="pending",sf=hr.inherit({_initOptions:function(e){this.callBase.apply(this,arguments),this.option(pt.initValidationOptions(e))},_getDefaultOptions(){return O(this.callBase(),{validationRules:[]})},_init(){this.callBase(),this._initGroupRegistration(),this.focused=dt(),this._initAdapter(),this._validationInfo={result:null,deferred:null,skipValidation:!1}},_initGroupRegistration(){var e=this._findGroup();this._groupWasInit||this.on("disposing",function(t){pt.removeRegisteredValidator(t.component._validationGroup,t.component)}),(!this._groupWasInit||this._validationGroup!==e)&&(pt.removeRegisteredValidator(this._validationGroup,this),this._groupWasInit=!0,this._validationGroup=e,pt.registerValidatorInGroup(e,this))},_setOptionsByReference(){this.callBase(),O(this._optionsByReference,{validationGroup:!0})},_getEditor(){var e=this.$element()[0];return Mt(e,"dx-validation-target")},_initAdapter(){var e=this._getEditor(),t=this.option("adapter");if(!t){if(e){t=new EZ(e,this),t.validationRequestsCallbacks.push(n=>{this._validationInfo.skipValidation||this.validate(n)}),this.option("adapter",t);return}throw Je.Error("E0120")}var i=t.validationRequestsCallbacks;i&&i.push(n=>{this.validate(n)})},_toggleRTLDirection(e){var t,i,n,r=(t=(i=this.option("adapter"))===null||i===void 0||(n=i.editor)===null||n===void 0?void 0:n.option("rtlEnabled"))!==null&&t!==void 0?t:e;this.callBase(r)},_initMarkup(){this.$element().addClass(wZ),this.callBase()},_render(){this.callBase(),this._toggleAccessibilityAttributes()},_toggleAccessibilityAttributes(){var e=this._getEditor();if(e){var t=this.option("validationRules")||[],i=t.some(n=>{var{type:r}=n;return r==="required"})||null;e.isInitialized()&&e.setAria("required",i),e.option("_onMarkupRendered",()=>{e.setAria("required",i)})}},_visibilityChanged(e){e&&this._initGroupRegistration()},_optionChanged(e){switch(e.name){case"validationGroup":this._initGroupRegistration();return;case"validationRules":this._resetValidationRules(),this._toggleAccessibilityAttributes(),this.option("isValid")!==void 0&&this.validate();return;case"adapter":this._initAdapter();break;case"isValid":case"validationStatus":this.option(pt.synchronizeValidationOptions(e,this.option()));break;default:this.callBase(e)}},_getValidationRules(){return this._validationRules||(this._validationRules=Jt(this.option("validationRules"),(e,t)=>O({},e,{validator:this,index:t}))),this._validationRules},_findGroup(){var e=this.$element();return this.option("validationGroup")||pt.findGroup(e,this._modelByElement(e))},_resetValidationRules(){delete this._validationRules},validate(e){var t=this.option("adapter"),i=this.option("name"),n=t.bypass&&t.bypass(),r=e&&e.value!==void 0?e.value:t.getValue(),a=t.getCurrentValidationError&&t.getCurrentValidationError(),o=this._getValidationRules(),s=this._validationInfo&&this._validationInfo.result;if(s&&s.status===pv&&s.value===r)return O({},s);var l;return n?l={isValid:!0,status:sE}:a&&a.editorSpecific?(a.validator=this,l={isValid:!1,status:IZ,brokenRule:a,brokenRules:[a]}):l=pt.validate(r,o,i),l.id=new ri().toString(),this._applyValidationResult(l,t),l.complete&&l.complete.then(u=>{u.id===this._validationInfo.result.id&&this._applyValidationResult(u,t)}),O({},this._validationInfo.result)},reset(){var e=this.option("adapter"),t={id:null,isValid:!0,brokenRule:null,brokenRules:null,pendingRules:null,status:sE,complete:null};this._validationInfo.skipValidation=!0,e.reset(),this._validationInfo.skipValidation=!1,this._resetValidationRules(),this._applyValidationResult(t,e)},_updateValidationResult(e){if(!this._validationInfo.result||this._validationInfo.result.id!==e.id){var t=this._validationInfo.deferred&&this._validationInfo.result.complete;this._validationInfo.result=O({},e,{complete:t})}else for(var i in e)i!=="id"&&i!=="complete"&&(this._validationInfo.result[i]=e[i])},_applyValidationResult(e,t){var i=this._createActionByOption("onValidated",{excludeValidators:["readOnly"]});if(e.validator=this,this._updateValidationResult(e),t.applyValidationResults&&t.applyValidationResults(this._validationInfo.result),this.option({validationStatus:this._validationInfo.result.status}),this._validationInfo.result.status===pv){this._validationInfo.deferred||(this._validationInfo.deferred=new te,this._validationInfo.result.complete=this._validationInfo.deferred.promise()),this._eventsStrategy.fireEvent("validating",[this._validationInfo.result]);return}this._validationInfo.result.status!==pv&&(i(e),this._validationInfo.deferred&&(this._validationInfo.deferred.resolve(e),this._validationInfo.deferred=null))},focus(){var e=this.option("adapter");e&&e.focus&&e.focus()},_useTemplates:function(){return!1}});tt("dxValidator",sf);var TZ=["dxTagBox","dxRangeSlider"],AZ=["dxCalendar","dxCheckBox","dxHtmlEditor","dxRadioGroup","dxRangeSlider","dxSlider","dxSwitch"];function DZ(e){var{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:r,useFlexLayout:a,item:o,template:s,name:l,formLabelLocation:u,requiredMessageTemplate:d,validationGroup:c,editorValue:h,canAssignUndefinedValueToEditor:f,editorValidationBoundary:p,editorStylingMode:g,showColonAfterLabel:m,managerLabelLocation:C,itemId:x,managerMarkOptions:T,labelMode:R}=e,A=E(o.isRequired)?o.isRequired:!!kZ(o.validationRules),H=o.itemType===lg,$=o.helpText?"dx-"+new ri:null,V=BZ({item:o,id:x,isRequired:A,managerMarkOptions:T,showColonAfterLabel:m,labelLocation:C,formLabelMode:R}),U=V.visible&&V.text,{location:K,labelID:X}=V,M=K!=="top"&&(!!o.helpText&&!a||["dxTextArea","dxRadioGroup","dxCalendar","dxHtmlEditor"].includes(o.editorType)),q=RZ({editorType:o.editorType,editorValue:h,defaultEditorName:o.dataField,canAssignUndefinedValueToEditor:f,externalEditorOptions:o.editorOptions,editorInputId:x,editorValidationBoundary:p,editorStylingMode:g,formLabelMode:R,labelText:V.textWithoutColon,labelMark:V.markOptions.showRequiredMark?" "+V.markOptions.requiredMark:""}),b=V.markOptions.showOptionalMark&&!V.visible&&q.labelMode!=="hidden"&&!E(o.helpText),j=b?V.markOptions.optionalMark:o.helpText;return{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:r,useFlexLayout:a,labelOptions:V,labelNeedBaselineAlign:M,labelLocation:K,needRenderLabel:U,item:o,isSimpleItem:H,isRequired:A,template:s,helpID:$,labelID:X,name:l,helpText:j,formLabelLocation:u,requiredMessageTemplate:d,validationGroup:c,editorOptions:q}}function OZ(e){var{showRequiredMark:t,requiredMark:i,showOptionalMark:n,optionalMark:r}=e;return!t&&!n?"":" "+(t?i:r)}function U1(e,t){var{showRequiredMark:i,requiredMark:n,showOptionalMark:r,optionalMark:a}=e;return{showRequiredMark:i&&t,requiredMark:n,showOptionalMark:r&&!t,optionalMark:a}}function RZ(e){var{editorType:t,defaultEditorName:i,editorValue:n,canAssignUndefinedValueToEditor:r,externalEditorOptions:a,editorInputId:o,editorValidationBoundary:s,editorStylingMode:l,formLabelMode:u,labelText:d,labelMark:c}=e,h={};(n!==void 0||r)&&(h.value=n),TZ.indexOf(t)!==-1&&(h.value=h.value||[]);var f=a==null?void 0:a.labelMode;E(f)||(f=u==="outside"?"hidden":u);var p=(a==null?void 0:a.stylingMode)||l,g=O(!0,h,a,{inputAttr:{id:o},validationBoundary:s,stylingMode:p,label:d,labelMode:f,labelMark:c});return a&&(g.dataSource&&(g.dataSource=a.dataSource),g.items&&(g.items=a.items)),i&&!g.name&&(g.name=i),g}function kZ(e){var t;return e&&e.length&&F(e,function(i,n){if(n.type==="required")return t=!0,!1}),t}function BZ(e){var{item:t,id:i,isRequired:n,managerMarkOptions:r,showColonAfterLabel:a,labelLocation:o,formLabelMode:s}=e,l=AZ.includes(t.editorType),u=O({showColon:a,location:o,id:i,visible:s==="outside"||l&&s!=="hidden",isRequired:n},t?t.label:{},{markOptions:U1(r,n)});return["dxRadioGroup","dxCheckBox","dxLookup","dxSlider","dxRangeSlider","dxSwitch","dxHtmlEditor"].includes(t.editorType)&&(u.labelID="dx-label-".concat(new ri)),!u.text&&t.dataField&&(u.text=uo(t.dataField)),u.text&&(u.textWithoutColon=u.text,u.text+=u.showColon?":":""),u}var LZ=["$FIELD_ITEM_LABEL_CONTENT_CLASS"],PZ="dx-layout-manager-hidden-label",FZ="dx-field-item-required-mark",K1="dx-field-item-label-location-",MZ="dx-field-item-optional-mark",j1="dx-field-item-label-text";function q1(e){var{text:t,id:i,location:n,alignment:r,labelID:a=null,markOptions:o={}}=e;return!E(t)||t.length<=0?null:v("<label>").addClass(z1+" "+K1+n).attr("for",i).attr("id",a).css("textAlign",r).append(v("<span>").addClass(W1).append(v("<span>").addClass(j1).text(t),VZ(o)))}function VZ(e){var t=OZ(e);return t===""?null:v("<span>").addClass(e.showRequiredMark?FZ:MZ).text(t)}function NZ(e,t,i){var n="".concat(t," > .").concat(z1,":not(.").concat(K1,"top) > .").concat(W1),r=e.find(n),a=r.length,o,s,l=0;for(s=0;s<a;s++)o=HZ({$FIELD_ITEM_LABEL_CONTENT_CLASS:r[s],location:"left",markOptions:i}),o>l&&(l=o);for(s=0;s<a;s++)r[s].style.width=l+"px"}function HZ(e){var{$FIELD_ITEM_LABEL_CONTENT_CLASS:t}=e,i=Lt(e,LZ),n=v("<div>").addClass(fZ).addClass(PZ).appendTo("body");i.text=" ";var r=q1(i).appendTo(n),a=r.find("."+j1)[0];a.innerHTML=$Z(t);var o=a.offsetWidth;return n.remove(),o}function $Z(e){var t=e.children.length,i,n="",r;for(r=0;r<t;r++)i=e.children[r],n+=$l(i.innerText)?i.innerHTML:i.innerText;return n}var WZ="dx-flex-layout",zZ="dx-field-item-optional",GZ="dx-field-item-required",lE="dx-field-item-content-wrapper",UZ="dx-field-item-content-location-",KZ="dx-field-item-label-align",jZ="dx-field-item-help-text",qZ="dx-label-v-align",YZ="dx-label-h-align",XZ="dx-template-wrapper",ZZ="dx-invalid";function QZ(e){var{$parent:t,rootElementCssClassList:i,formOrLayoutManager:n,createComponentCallback:r,useFlexLayout:a,labelOptions:o,labelNeedBaselineAlign:s,labelLocation:l,needRenderLabel:u,formLabelLocation:d,item:c,editorOptions:h,isSimpleItem:f,isRequired:p,template:g,helpID:m,labelID:C,name:x,helpText:T,requiredMessageTemplate:R,validationGroup:A}=e,H=v("<div>").addClass(i.join(" ")).appendTo(t);H.addClass(p?GZ:zZ),f&&a&&H.addClass(WZ),f&&s&&H.addClass(KZ);var $=v("<div>");$.data("dx-form-item",c),$.addClass(sg).addClass(UZ+{right:"left",left:"right",top:"bottom"}[d]);var V=u?q1(o):null;V?(H.append(V),(l==="top"||l==="left")&&H.append($),l==="right"&&H.prepend($),l==="top"?H.addClass(qZ):H.addClass(YZ),(c.editorType==="dxCheckBox"||c.editorType==="dxSwitch")&&D.on(V,ct,function(){D.trigger($.children(),ct)})):H.append($);var U;if(g)g.render({container:Fe($),model:{dataField:c.dataField,editorType:c.editorType,editorOptions:h,component:n,name:c.name}});else{var K=v("<div>").appendTo($);try{U=r(K,c.editorType,h),U.setAria("describedby",m),C&&U.setAria("labelledby",C),U.setAria("required",p)}catch(y){Je.log("E1035",y.message)}}var X=$.children().first(),M=X.hasClass(XZ)?X.children().first():X,q=M&&M.data("dx-validation-target");if(q){var b=c.label&&c.label.text,j=b?null:x,ne=b?c.label.text:j&&uo(j),J;if(f)if(c.validationRules)J=c.validationRules;else{var pe=Hr(R,ne||"");J=c.isRequired?[{type:"required",message:pe}]:null}if(Array.isArray(J)&&J.length&&r(M,sf,{validationRules:J,validationGroup:A,dataGetter:function(){return{formItem:c}}}),Qt()){var le="."+lE,Q=function(y){v(y.element).parents(le).toggleClass(ZZ,y.component.option("isValid")===!1&&(y.component._isFocused()||y.component.option("validationMessageMode")==="always"))};q.on("optionChanged",y=>{y.name==="isValid"&&Q(y)}),q.on("focusIn",Q).on("focusOut",Q).on("enterKey",Q)}}if(T&&f){var z=$.parent();z.append(v("<div>").addClass(lE).append($).append(v("<div>").addClass(jZ).attr("id",m).text(T)))}return{$fieldEditorContainer:$,$rootElement:H,widgetInstance:U}}var JZ="dx-field-button-item";function eQ(e){var{item:t,$parent:i,rootElementCssClassList:n,validationGroup:r,createComponentCallback:a}=e,o=v("<div>").appendTo(i).addClass(n.join(" ")).addClass(JZ).css("textAlign",tQ(t.horizontalAlignment));i.css("justifyContent",iQ(t.verticalAlignment));var s=v("<div>").appendTo(o);return{$rootElement:o,buttonInstance:a(s,"dxButton",O({validationGroup:r},t.buttonOptions))}}function tQ(e){return E(e)?e:"right"}function iQ(e){switch(e){case"center":return"center";case"bottom":return"flex-end";default:return"flex-start"}}var nQ="dx-field-empty-item";function uE(e){var{$parent:t,rootElementCssClassList:i}=e;return v("<div>").addClass(nQ).html("&nbsp;").addClass(i.join(" ")).appendTo(t)}var rQ="dxTextBox",aQ="dx-first-row",oQ="dx-last-row",sQ="dx-first-col",lQ="dx-last-col",vv="flex",uQ="fallback",dQ=pi.inherit({_getDefaultOptions:function(){return O(this.callBase(),{layoutData:{},readOnly:!1,colCount:1,colCountByScreen:void 0,labelLocation:"left",onFieldDataChanged:null,onEditorEnterKey:null,customizeItem:null,alignItemLabels:!0,minColWidth:200,showRequiredMark:!0,screenByWidth:null,showOptionalMark:!1,requiredMark:"*",labelMode:"outside",optionalMark:ue.format("dxForm-optionalMark"),requiredMessage:ue.getFormatter("dxForm-requiredMessage")})},_setOptionsByReference:function(){this.callBase(),O(this._optionsByReference,{layoutData:!0,validationGroup:!0})},_init:function(){var e=this.option("layoutData");this.callBase(),this._itemWatchers=[],this._itemsRunTimeInfo=new B1,this._updateReferencedOptions(e),this._initDataAndItems(e)},_dispose:function(){this.callBase(),this._cleanItemWatchers()},_initDataAndItems:function(e){this._syncDataWithItems(),this._updateItems(e)},_syncDataWithItems:function(){var e=this.option("layoutData"),t=this.option("items");E(t)&&t.forEach(i=>{if(i.dataField&&this._getDataByField(i.dataField)===void 0){var n;i.editorOptions&&(n=i.editorOptions.value),(E(n)||i.dataField in e)&&this._updateFieldValue(i.dataField,n)}})},_getDataByField:function(e){return e?this.option("layoutData."+e):null},_isCheckboxUndefinedStateEnabled:function(e){var{allowIndeterminateState:t,editorType:i,dataField:n}=e;if(t===!0&&i==="dxCheckBox"){var r=["layoutData",...n.split(".")],a=r.pop(),o=this.option(r.join("."));return o&&a in o}return!1},_updateFieldValue:function(e,t){var i=this.option("layoutData"),n=t;!Fi.isWrapped(i[e])&&E(e)?this.option("layoutData."+e,n):Fi.isWritableWrapped(i[e])&&(n=Ee(n)?n():n,i[e](n)),this._triggerOnFieldDataChanged({dataField:e,value:n})},_triggerOnFieldDataChanged:function(e){this._createActionByOption("onFieldDataChanged")(e)},_updateItems:function(e){var t=this,i=this.option("items"),n=E(i),r=t.option("customizeItem"),a=n?i:this._generateItemsByData(e);if(E(a)){var o=[];F(a,function(s,l){t._isAcceptableItem(l)&&(l=t._processItem(l),r&&r(l),He(l)&&Fi.unwrap(l.visible)!==!1&&o.push(l))}),(!t._itemWatchers.length||!n)&&t._updateItemWatchers(a),this._setItems(o),this._sortItems()}},_cleanItemWatchers:function(){this._itemWatchers.forEach(function(e){e()}),this._itemWatchers=[]},_updateItemWatchers:function(e){var t=this,i=t._getWatch();e.forEach(function(n){He(n)&&E(n.visible)&&Ee(i)&&t._itemWatchers.push(i(function(){return Fi.unwrap(n.visible)},function(){t._updateItems(t.option("layoutData")),t.repaint()},{skipImmediate:!0}))})},_generateItemsByData:function(e){var t=[];return E(e)&&F(e,function(i){t.push({dataField:i})}),t},_isAcceptableItem:function(e){var t=e.dataField||e,i=this._getDataByField(t);return!(Ee(i)&&!Fi.isWrapped(i))},_processItem:function(e){if(typeof e=="string"&&(e={dataField:e}),typeof e=="object"&&!e.itemType&&(e.itemType=lg),!E(e.editorType)&&E(e.dataField)){var t=this._getDataByField(e.dataField);e.editorType=E(t)?this._getEditorTypeByDataType(On(t)):rQ}if(e.editorType==="dxCheckBox"){var i;e.allowIndeterminateState=(i=e.allowIndeterminateState)!==null&&i!==void 0?i:!0}return e},_getEditorTypeByDataType:function(e){switch(e){case"number":return"dxNumberBox";case"date":return"dxDateBox";case"boolean":return"dxCheckBox";default:return"dxTextBox"}},_sortItems:function(){Il(this._items,"visibleIndex"),this._sortIndexes()},_sortIndexes:function(){this._items.sort(function(e,t){var i=e.visibleIndex,n=t.visibleIndex,r;return i>n?r=1:i<n?r=-1:r=0,r})},_initMarkup:function(){this._itemsRunTimeInfo.clear(),this.$element().addClass(_Z),this.callBase(),this._renderResponsiveBox()},_hasBrowserFlex:function(){return xa(vv)===vv},_renderResponsiveBox:function(){var e=[];if(this._items&&this._items.length){var t=this._getColCount(),i=v("<div>").appendTo(this.$element());this._prepareItemsWithMerging(t);var n=this._generateLayoutItems();this._responsiveBox=this._createComponent(i,H1,this._getResponsiveBoxConfig(n,t,e)),Ke()||this._renderTemplates(e)}},_itemStateChangedHandler:function(e){this._refresh()},_renderTemplates:function(e){var t=this;F(e,function(i,n){switch(n.itemType){case"empty":uE(n);break;case"button":t._renderButtonItem(n);break;default:t._renderFieldItem(n)}})},_getResponsiveBoxConfig:function(e,t,i){var n=this,r=n.option("colCountByScreen"),a=r&&r.xs;return{onItemStateChanged:this._itemStateChangedHandler.bind(this),_layoutStrategy:n._hasBrowserFlex()?vv:uQ,onLayoutChanged:function(){var o=n.option("onLayoutChanged"),s=n.isSingleColumnMode();o&&(n.$element().toggleClass(nE,s),o(s))},onContentReady:function(o){Ke()&&n._renderTemplates(i),n.option("onLayoutChanged")&&n.$element().toggleClass(nE,n.isSingleColumnMode(o.component))},itemTemplate:function(o,s,l){if(o.location){var u=v(l),d=o.location.row*t,c=n._items[o.location.col+d];if(c){var h=[c.cssClass];u.toggleClass(gZ,n.isSingleColumnMode(this)),o.location.row===0&&h.push(aQ),o.location.col===0&&h.push(sQ),c.itemType===lg&&n.option("isRoot")&&u.addClass(G1);var f=o.location.col===t-1||o.location.col+o.location.colspan===t,p=n._getRowsCount(),g=o.location.row===p-1;f&&h.push(lQ),g&&h.push(oQ),c.itemType!=="empty"&&(h.push($1),h.push(n.option("cssItemClass")),E(c.col)&&h.push("dx-col-"+c.col)),i.push({itemType:c.itemType,item:c,$parent:u,rootElementCssClassList:h})}}},cols:n._generateRatio(t),rows:n._generateRatio(n._getRowsCount(),!0),dataSource:e,screenByWidth:n.option("screenByWidth"),singleColumnScreen:a?!1:"xs"}},_getColCount:function(){var e=this.option("colCount"),t=this.option("colCountByScreen");if(t){var i=this.option("form").getTargetScreenFactor();i||(i=Ke()?FI(this.option("screenByWidth")):"lg"),e=t[i]||e}if(e==="auto"){if(this._cashedColCount)return this._cashedColCount;this._cashedColCount=e=this._getMaxColCount()}return e<1?1:e},_getMaxColCount:function(){if(!Ke())return 1;var e=this.option("minColWidth"),t=$e(this.$element()),i=this._items.length,n=Math.floor(t/e)||1;return i<n?i:n},isCachedColCountObsolete:function(){return this._cashedColCount&&this._getMaxColCount()!==this._cashedColCount},_prepareItemsWithMerging:function(e){var t=this._items.slice(0),i,n,r=[],a,o;for(o=0;o<t.length;o++)if(i=t[o],r.push(i),(this.option("alignItemLabels")||i.alignItemLabels||i.colSpan)&&(i.col=this._getColByIndex(r.length-1,e)),i.colSpan>1&&i.col+i.colSpan<=e){for(n=[],a=0;a<i.colSpan-1;a++)n.push({merged:!0});r=r.concat(n)}else delete i.colSpan;this._setItems(r)},_getColByIndex:function(e,t){return e%t},_setItems:function(e){this._items=e,this._cashedColCount=null},_generateLayoutItems:function(){var e=this._items,t=this._getColCount(),i=[],n,r;for(r=0;r<e.length;r++)if(n=e[r],!n.merged){var a={location:{row:parseInt(r/t),col:this._getColByIndex(r,t)}};E(n.disabled)&&(a.disabled=n.disabled),E(n.visible)&&(a.visible=n.visible),E(n.colSpan)&&(a.location.colspan=n.colSpan),E(n.rowSpan)&&(a.location.rowspan=n.rowSpan),i.push(a)}return i},_renderEmptyItem:function(e){uE({$container:e})},_renderButtonItem:function(e){var{item:t,$parent:i,rootElementCssClassList:n}=e,{$rootElement:r,buttonInstance:a}=eQ({item:t,$parent:i,rootElementCssClassList:n,validationGroup:this.option("validationGroup"),createComponentCallback:this._createComponent.bind(this)});this._itemsRunTimeInfo.add({item:t,widgetInstance:a,guid:t.guid,$itemContainer:r})},_renderFieldItem:function(e){var t,{item:i,$parent:n,rootElementCssClassList:r}=e,a=this._getDataByField(i.dataField),o=!1;if(a===void 0){var{allowIndeterminateState:s,editorType:l,dataField:u}=i;o=this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:s,editorType:l,dataField:u})}var d=i.dataField||i.name,{$fieldEditorContainer:c,widgetInstance:h,$rootElement:f}=QZ(DZ({$parent:n,rootElementCssClassList:r,item:i,name:d,editorValue:a,canAssignUndefinedValueToEditor:o,formOrLayoutManager:this._getFormOrThis(),createComponentCallback:this._createComponent.bind(this),useFlexLayout:this._hasBrowserFlex(),formLabelLocation:this.option("labelLocation"),requiredMessageTemplate:this.option("requiredMessage"),validationGroup:this.option("validationGroup"),editorValidationBoundary:this.option("validationBoundary"),editorStylingMode:this.option("form")&&this.option("form").option("stylingMode"),showColonAfterLabel:this.option("showColonAfterLabel"),managerLabelLocation:this.option("labelLocation"),template:i.template?this._getTemplate(i.template):null,itemId:this.option("form")&&this.option("form").getItemID(d),managerMarkOptions:this._getMarkOptions(),labelMode:this.option("labelMode")}));(t=this.option("onFieldItemRendered"))===null||t===void 0||t(),h&&i.dataField&&this._bindDataField(h,i.dataField,i.editorType,c),this._itemsRunTimeInfo.add({item:i,widgetInstance:h,guid:i.guid,$itemContainer:f})},_getMarkOptions:function(){return{showRequiredMark:this.option("showRequiredMark"),requiredMark:this.option("requiredMark"),showOptionalMark:this.option("showOptionalMark"),optionalMark:this.option("optionalMark")}},_getFormOrThis:function(){return this.option("form")||this},_bindDataField:function(e,t,i,n){var r=this._getFormOrThis();e.on("enterKey",function(a){r._createActionByOption("onEditorEnterKey")(O(a,{dataField:t}))}),this._createWatcher(e,n,t),this.linkEditorToDataField(e,t,i)},_createWatcher:function(e,t,i){var n=this,r=n._getWatch();if(Ee(r)){var a=r(function(){return n._getDataByField(i)},function(){var o=n._getDataByField(i);if(e.NAME==="dxTagBox"){var s=e.option("value");if(o!==s&&function(l,u){if(!Array.isArray(l)||!Array.isArray(u)||l.length!==u.length)return!1;for(var d=0;d<l.length;d++)if(l[d]!==u[d])return!1;return!0}(o,s))return}e.option("value",o)},{deep:!0,skipImmediate:!0});D.on(t,dr,a)}},_getWatch:function(){if(!E(this._watch)){var e=this.option("form");this._watch=e&&e.option("integrationOptions.watchMethod")}return this._watch},_createComponent:function(e,t,i){var n=this.option("readOnly"),r=this.callBase(e,t,i);return n&&r.option("readOnly",n),this.on("optionChanged",function(a){a.name==="readOnly"&&!E(i.readOnly)&&r.option(a.name,a.value)}),r},_generateRatio:function(e,t){var i=[],n,r;for(r=0;r<e;r++)n={ratio:1},t&&(n.baseSize="auto"),i.push(n);return i},_getRowsCount:function(){return Math.ceil(this._items.length/this._getColCount())},_updateReferencedOptions:function(e){var t=this.option("layoutData");He(t)&&Object.getOwnPropertyNames(t).forEach(i=>delete this._optionsByReference["layoutData."+i]),He(e)&&Object.getOwnPropertyNames(e).forEach(i=>this._optionsByReference["layoutData."+i]=!0)},_resetWidget(e){this._disableEditorValueChangedHandler=!0,e.reset(),this._disableEditorValueChangedHandler=!1,e.option("isValid",!0)},_optionChanged(e){if(e.fullName.search("layoutData.")!==0)switch(e.name){case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":this._cashedRequiredConfig=null,this._invalidate();break;case"layoutData":this._updateReferencedOptions(e.value),this.option("items")?Rn(e.value)||this._itemsRunTimeInfo.each((t,i)=>{if(E(i.item)){var n=i.item.dataField;if(n&&E(i.widgetInstance)){var r=mt(n),a=r(e.value),{allowIndeterminateState:o,editorType:s}=i.item;a!==void 0||this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:o,editorType:s,dataField:n})?i.widgetInstance.option("value",a):this._resetWidget(i.widgetInstance)}}}):(this._initDataAndItems(e.value),this._invalidate());break;case"items":this._cleanItemWatchers(),this._initDataAndItems(e.value),this._invalidate();break;case"alignItemLabels":case"labelLocation":case"labelMode":case"requiredMessage":this._invalidate();break;case"customizeItem":this._updateItems(this.option("layoutData")),this._invalidate();break;case"colCount":this._resetColCount();break;case"minColWidth":this.option("colCount")==="auto"&&this._resetColCount();break;case"readOnly":break;case"width":this.callBase(e),this.option("colCount")==="auto"&&this._resetColCount();break;case"onFieldDataChanged":break;default:this.callBase(e)}},_resetColCount:function(){this._cashedColCount=null,this._invalidate()},linkEditorToDataField(e,t){this.on("optionChanged",i=>{i.fullName==="layoutData.".concat(t)&&e._setOptionWithoutOptionChange("value",i.value)}),e.on("valueChanged",i=>{var n=He(i.value)||Array.isArray(i.value);!this._disableEditorValueChangedHandler&&!(n&&i.value===i.previousValue)&&this._updateFieldValue(t,i.value)})},_dimensionChanged:function(){this.option("colCount")==="auto"&&this.isCachedColCountObsolete()&&this._eventsStrategy.fireEvent("autoColCountChanged")},updateData:function(e,t){var i=this;He(e)?F(e,function(n,r){i._updateFieldValue(n,r)}):typeof e=="string"&&i._updateFieldValue(e,t)},getEditor:function(e){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(e)||this._itemsRunTimeInfo.findWidgetInstanceByName(e)},isSingleColumnMode:function(e){var t=this._responsiveBox||e;if(t)return t.option("currentScreenFactor")===t.option("singleColumnScreen")},getItemsRunTimeInfo:function(){return this._itemsRunTimeInfo}});tt("dxLayoutManager",dQ);var wC="dx-validationsummary",cQ=wC+"-item",hQ=wC+"-item-data",Y1=Ro.inherit({_getDefaultOptions(){return O(this.callBase(),{focusStateEnabled:!1,noDataText:null})},_setOptionsByReference(){this.callBase(),O(this._optionsByReference,{validationGroup:!0})},_init(){this.callBase(),this._initGroupRegistration()},_initGroupRegistration(){var e=this.$element(),t=this.option("validationGroup")||pt.findGroup(e,this._modelByElement(e)),i=pt.addGroup(t);this._unsubscribeGroup(),this._groupWasInit=!0,this._validationGroup=t,this.groupSubscription=this._groupValidationHandler.bind(this),i.on("validated",this.groupSubscription)},_unsubscribeGroup(){var e=pt.getGroupConfig(this._validationGroup);e&&e.off("validated",this.groupSubscription)},_getOrderedItems(e,t){var i=[];return F(e,function(n,r){var a=Vi(t,function(o){if(o.validator===r)return!0});a.length&&(i=i.concat(a))}),i},_groupValidationHandler(e){var t=this._getOrderedItems(e.validators,Jt(e.brokenRules,function(i){return{text:i.message,validator:i.validator,index:i.index}}));this.validators=e.validators,F(this.validators,(i,n)=>{if(n._validationSummary!==this){var r=this._itemValidationHandler.bind(this);n.on("validated",r),n.on("disposing",function(){n.off("validated",r),n._validationSummary=null,r=null}),n._validationSummary=this}}),this.option("items",t)},_itemValidationHandler(e){for(var{isValid:t,validator:i,brokenRules:n}=e,r=this.option("items"),a=!1,o=0,s=function(){var u=r[o];if(u.validator===i){var d=Vi(n||[],function(c){return c.index===u.index})[0];if(t||!d)return r.splice(o,1),a=!0,"continue";d.message!==u.text&&(u.text=d.message,a=!0)}o++};o<r.length;)var l=s();F(n,function(u,d){var c=Vi(r,function(h){return h.validator===i&&h.index===d.index})[0];c||(r.push({text:d.message,validator:i,index:d.index}),a=!0)}),a&&(r=this._getOrderedItems(this.validators,r),this.option("items",r))},_initMarkup(){this.$element().addClass(wC),this.callBase()},_optionChanged(e){switch(e.name){case"validationGroup":this._initGroupRegistration();break;default:this.callBase(e)}},_itemClass:()=>cQ,_itemDataKey:()=>hQ,_postprocessRenderItem(e){D.on(e.itemElement,"click",function(){e.itemData.validator&&e.itemData.validator.focus&&e.itemData.validator.focus()})},_dispose(){this.callBase(),this._unsubscribeGroup()},refreshValidationGroup(){this._initGroupRegistration()}});tt("dxValidationSummary",Y1);var dE="dx-validationgroup",fQ="dx-validator",pQ="dx-validationsummary";class vQ extends hr{_getDefaultOptions(){return super._getDefaultOptions()}_init(){super._init(),pt.addGroup(this)}_initMarkup(){var t=this.$element();t.addClass(dE),t.find(".".concat(fQ)).each(function(i,n){sf.getInstance(v(n))._initGroupRegistration()}),t.find(".".concat(pQ)).each(function(i,n){Y1.getInstance(v(n)).refreshValidationGroup()}),super._initMarkup()}validate(){return pt.validateGroup(this)}reset(){return pt.resetGroup(this)}_dispose(){pt.removeGroup(this),this.$element().removeClass(dE),super._dispose()}_useTemplates(){return!1}}tt("dxValidationGroup",vQ);var cE="dx-state-focused",_Q=["items","isRequired","validationRules","visible"],IC=pi.inherit({_init:function(){this.callBase(),this._cachedColCountOptions=[],this._itemsRunTimeInfo=new B1,this._groupsColCount=[],this._attachSyncSubscriptions()},_getDefaultOptions:function(){return O(this.callBase(),{formID:"dx-"+new ri,formData:{},colCount:1,screenByWidth:Ug,colCountByScreen:void 0,labelLocation:"left",readOnly:!1,onFieldDataChanged:null,customizeItem:null,onEditorEnterKey:null,minColWidth:200,alignItemLabels:!0,alignItemLabelsInAllGroups:!0,alignRootItemLabels:!0,showColonAfterLabel:!0,showRequiredMark:!0,showOptionalMark:!1,requiredMark:"*",optionalMark:ue.format("dxForm-optionalMark"),requiredMessage:ue.getFormatter("dxForm-requiredMessage"),showValidationSummary:!1,items:void 0,scrollingEnabled:!1,validationGroup:void 0,stylingMode:It().editorStylingMode,labelMode:"outside"})},_defaultOptionsRules:function(){return this.callBase().concat([{device:function(){return Qt()},options:{showColonAfterLabel:!1,labelLocation:"top"}}])},_setOptionsByReference:function(){this.callBase(),O(this._optionsByReference,{formData:!0,validationGroup:!0})},_getGroupColCount:function(e){return parseInt(e.attr(oE))},_applyLabelsWidthByCol:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,r=i.inOneColumn?$1:iE+t,a=i.excludeTabbed?":not(.".concat(rE,")"):"";NZ(e,".".concat(r).concat(a),n)},_applyLabelsWidth:function(e,t,i,n,r){n=i?1:n||this._getGroupColCount(e);var a={excludeTabbed:t,inOneColumn:i},o;for(o=0;o<n;o++)this._applyLabelsWidthByCol(e,o,a,r)},_getGroupElementsInColumn:function(e,t,i){var n=E(i)?"."+aE+i:"",r="."+iE+t+" > ."+sg+" > ."+fv+n;return e.find(r)},_applyLabelsWidthWithGroups:function(e,t,i,n){if(this.option("alignRootItemLabels")===!0)for(var r=e.find(".".concat(G1)),a=0;a<t;a++)this._applyLabelsWidthByCol(r,a,i,n);var o=this.option("alignItemLabelsInAllGroups");if(o)this._applyLabelsWidthWithNestedGroups(e,t,i,n);else{var s=this.$element().find("."+fv),l;for(l=0;l<s.length;l++)this._applyLabelsWidth(s.eq(l),i,void 0,void 0,n)}},_applyLabelsWidthWithNestedGroups:function(e,t,i,n){var r={excludeTabbed:i},a,o,s,l;for(a=0;a<t;a++)for(l=this._getGroupElementsInColumn(e,a),this._applyLabelsWidthByCol(l,0,r,n),o=0;o<this._groupsColCount.length;o++){l=this._getGroupElementsInColumn(e,a,this._groupsColCount[o]);var u=this._getGroupColCount(l);for(s=1;s<u;s++)this._applyLabelsWidthByCol(l,s,r,n)}},_labelLocation:function(){return this.option("labelLocation")},_alignLabelsInColumn:function(e){var{layoutManager:t,inOneColumn:i,$container:n,excludeTabbed:r,items:a}=e;if(!(!Ke()||this._labelLocation()==="top")){var o=U1(t._getMarkOptions());i?this._applyLabelsWidth(n,r,!0,void 0,o):this._checkGrouping(a)?this._applyLabelsWidthWithGroups(n,t._getColCount(),r,o):this._applyLabelsWidth(n,r,!1,t._getColCount(),o)}},_prepareFormData:function(){E(this.option("formData"))||this.option("formData",{})},_setStylingModeClass:function(){this.option("stylingMode")==="underlined"&&this.$element().addClass(SZ)},_initMarkup:function(){pt.addGroup(this._getValidationGroup()),this._clearCachedInstances(),this._prepareFormData(),this.$element().addClass(pZ),this._setStylingModeClass(),this.callBase(),this.setAria("role","form",this.$element()),this.option("scrollingEnabled")&&this._renderScrollable(),this._renderLayout(),this._renderValidationSummary(),this._lastMarkupScreenFactor=this._targetScreenFactor||this._getCurrentScreenFactor()},_getCurrentScreenFactor:function(){return Ke()?FI(this.option("screenByWidth")):"lg"},_clearCachedInstances:function(){this._itemsRunTimeInfo.clear(),this._cachedLayoutManagers=[]},_alignLabels:function(e,t){this._alignLabelsInColumn({$container:this.$element(),layoutManager:e,excludeTabbed:!0,items:this.option("items"),inOneColumn:t}),nr(this.$element().find(".".concat(FO)))},_clean:function(){this._clearValidationSummary(),this.callBase(),this._groupsColCount=[],this._cachedColCountOptions=[],this._lastMarkupScreenFactor=void 0},_renderScrollable:function(){var e=this.option("useNativeScrolling");this._scrollable=new cn(this.$element(),{useNative:!!e,useSimulatedScrollbar:!e,useKeyboard:!1,direction:"both",bounceEnabled:!1})},_getContent:function(){return this.option("scrollingEnabled")?v(this._scrollable.content()):this.$element()},_clearValidationSummary:function(){var e;(e=this._$validationSummary)===null||e===void 0||e.remove(),this._$validationSummary=void 0,this._validationSummary=void 0},_renderValidationSummary:function(){this._clearValidationSummary(),this.option("showValidationSummary")&&(this._$validationSummary=v("<div>").addClass(bZ).appendTo(this._getContent()),this._validationSummary=this._$validationSummary.dxValidationSummary({validationGroup:this._getValidationGroup()}).dxValidationSummary("instance"))},_prepareItems(e,t,i,n){if(e){for(var r=[],a=0;a<e.length;a++){var o=e[a],s=F1(i,ag(a,n)),l={item:o,itemIndex:a,path:s},u=this._itemsRunTimeInfo.add(l);if(Me(o)&&(o={dataField:o}),He(o)){var d=be({},o);l.preparedItem=d,d.guid=u,this._tryPrepareGroupItem(d),this._tryPrepareTabbedItem(d,s),this._tryPrepareItemTemplate(d),t&&(d.cssItemClass=rE),d.items&&(d.items=this._prepareItems(d.items,t,s)),r.push(d)}else r.push(o)}return r}},_tryPrepareGroupItem:function(e){e.itemType==="group"&&(e.alignItemLabels=Ft(e.alignItemLabels,!0),e._prepareGroupItemTemplate=t=>{e.template&&(e.groupContentTemplate=this._getTemplate(t)),e.template=this._itemGroupTemplate.bind(this,e)},e._prepareGroupItemTemplate(e.template))},_tryPrepareTabbedItem:function(e,t){e.itemType==="tabbed"&&(e.template=this._itemTabbedTemplate.bind(this,e),e.tabs=this._prepareItems(e.tabs,!0,t,!0))},_tryPrepareItemTemplate:function(e){e.template&&(e.template=this._getTemplate(e.template))},_checkGrouping:function(e){if(e)for(var t=0;t<e.length;t++){var i=e[t];if(i.itemType==="group")return!0}},_renderLayout:function(){var e=this,t=e.option("items"),i=e._getContent();t=e._prepareItems(t),e._rootLayoutManager=e._renderLayoutManager(i,this._createLayoutManagerOptions(t,{isRoot:!0,colCount:e.option("colCount"),alignItemLabels:e.option("alignItemLabels"),screenByWidth:this.option("screenByWidth"),colCountByScreen:this.option("colCountByScreen"),onLayoutChanged:function(n){e._alignLabels.bind(e)(e._rootLayoutManager,n)},onContentReady:function(n){e._alignLabels(n.component,n.component.isSingleColumnMode())}}))},_tryGetItemsForTemplate:function(e){return e.items||[]},_itemTabbedTemplate:function(e,t,i){var n=v("<div>").appendTo(i),r=O({},e.tabPanelOptions,{dataSource:e.tabs,onItemRendered:s=>zc(s.itemElement),itemTemplate:(s,l,u)=>{var d=v(u),c=Ft(s.alignItemLabels,!0),h=this._renderLayoutManager(d,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(s),{colCount:s.colCount,alignItemLabels:c,screenByWidth:this.option("screenByWidth"),colCountByScreen:s.colCountByScreen,cssItemClass:s.cssItemClass,onLayoutChanged:f=>{this._alignLabelsInColumn({$container:d,layoutManager:h,items:s.items,inOneColumn:f})}}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(s.guid,{layoutManager:h}),c&&this._alignLabelsInColumn({$container:d,layoutManager:h,items:s.items,inOneColumn:h.isSingleColumnMode()})}}),a=(s,l)=>{Array.isArray(s)&&s.forEach(u=>this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(u.guid,{widgetInstance:l}))},o=this._createComponent(n,EC,r);v(i).parent().addClass(yZ),o.on("optionChanged",s=>{s.fullName==="dataSource"&&a(s.value,s.component)}),a([{guid:e.guid},...e.tabs],o)},_itemGroupTemplate:function(e,t,i){var n=v("<div>").toggleClass(xZ,E(e.caption)&&e.caption.length).addClass(fv).appendTo(i);v(i).parent().addClass(CZ);var r,a;e.caption&&v("<span>").addClass(vZ).text(e.caption).appendTo(n);var o=v("<div>").addClass(mZ).appendTo(n);e.groupContentTemplate?(e._renderGroupContentTemplate=()=>{o.empty();var s={formData:this.option("formData"),component:this};e.groupContentTemplate.render({model:s,container:Fe(o)})},e._renderGroupContentTemplate()):(a=this._renderLayoutManager(o,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(e),{colCount:e.colCount,colCountByScreen:e.colCountByScreen,alignItemLabels:e.alignItemLabels,cssItemClass:e.cssItemClass})),this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(e.guid,{layoutManager:a}),r=a._getColCount(),this._groupsColCount.includes(r)||this._groupsColCount.push(r),n.addClass(aE+r),n.attr(oE,r))},_createLayoutManagerOptions:function(e,t){return nZ({form:this,formOptions:this.option(),$formElement:this.$element(),items:e,validationGroup:this._getValidationGroup(),extendedLayoutManagerOptions:t,onFieldDataChanged:i=>{this._isDataUpdating||this._triggerOnFieldDataChanged(i)},onContentReady:i=>{this._itemsRunTimeInfo.addItemsOrExtendFrom(i.component._itemsRunTimeInfo),t.onContentReady&&t.onContentReady(i)},onDisposing:i=>{var{component:n}=i,r=n.getItemsRunTimeInfo();this._itemsRunTimeInfo.removeItemsByItems(r)},onFieldItemRendered:()=>{var i;(i=this._validationSummary)===null||i===void 0||i.refreshValidationGroup()}})},_renderLayoutManager:function(e,t){var i={lg:t.colCount,md:t.colCount,sm:t.colCount,xs:1};this._cachedColCountOptions.push({colCountByScreen:O(i,t.colCountByScreen)});var n=v("<div>");n.appendTo(e);var r=this._createComponent(n,"dxLayoutManager",t);return r.on("autoColCountChanged",()=>{this._clearAutoColCountChangedTimeout(),this.autoColCountChangedTimeoutId=setTimeout(()=>!this._disposed&&this._refresh(),0)}),this._cachedLayoutManagers.push(r),r},_getValidationGroup:function(){return this.option("validationGroup")||this},_createComponent:function(e,t,i){return i=i||{},this._extendConfig(i,{readOnly:this.option("readOnly")}),this.callBase(e,t,i)},_attachSyncSubscriptions:function(){var e=this;e.on("optionChanged",function(t){var i=t.fullName;i==="formData"&&(E(t.value)||e._options.silent("formData",t.value={}),e._triggerOnFieldDataChangedByDataSet(t.value)),e._cachedLayoutManagers.length&&F(e._cachedLayoutManagers,function(n,r){i==="formData"&&(e._isDataUpdating=!0,r.option("layoutData",t.value),e._isDataUpdating=!1),(t.name==="readOnly"||t.name==="disabled")&&r.option(i,t.value)})})},_optionChanged:function(e){var t=e.fullName.split(".");t.length>1&&t[0].search("items")!==-1&&this._itemsOptionChangedHandler(e)||t.length>1&&t[0].search("formData")!==-1&&this._formDataOptionChangedHandler(e)||this._defaultOptionChangedHandler(e)},_defaultOptionChangedHandler:function(e){switch(e.name){case"formData":this.option("items")?Rn(e.value)&&this._resetValues():this._invalidate();break;case"onFieldDataChanged":break;case"items":case"colCount":case"onEditorEnterKey":case"labelLocation":case"labelMode":case"alignItemLabels":case"showColonAfterLabel":case"customizeItem":case"alignItemLabelsInAllGroups":case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":case"requiredMessage":case"scrollingEnabled":case"formID":case"colCountByScreen":case"screenByWidth":case"stylingMode":this._invalidate();break;case"showValidationSummary":this._renderValidationSummary();break;case"minColWidth":this.option("colCount")==="auto"&&this._invalidate();break;case"alignRootItemLabels":case"readOnly":break;case"width":this.callBase(e),this._rootLayoutManager.option(e.name,e.value),this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode());break;case"visible":this.callBase(e),e.value&&zc(this.$element());break;case"validationGroup":pt.removeGroup(e.previousValue||this),this._invalidate();break;default:this.callBase(e)}},_itemsOptionChangedHandler:function(e){var t=e.fullName.split("."),i=e.value,n=this._getItemPath(t),r=this.option(n),a=e.fullName.replace(n+".",""),o=a.split(".")[0].replace(/\[\d+]/,""),s=this._tryCreateItemOptionAction(o,r,r[o],e.previousValue,n),l=this._tryExecuteItemOptionAction(s)||this._tryChangeLayoutManagerItemOption(e.fullName,i);if(!l&&r){this._changeItemOption(r,a,i);var u=this._generateItemsFromData(this.option("items"));this.option("items",u),l=!0}return l},_formDataOptionChangedHandler:function(e){var t=e.fullName.split("."),i=e.value,n=t.slice(1).join("."),r=this.getEditor(n);return r?r.option("value",i):this._triggerOnFieldDataChanged({dataField:n,value:i}),!0},_tryCreateItemOptionAction:function(e,t,i,n,r){return e==="tabs"&&(this._itemsRunTimeInfo.removeItemsByPathStartWith("".concat(r,".tabs")),i=this._prepareItems(i,!0,r,!0)),uZ(e,{item:t,value:i,previousValue:n,itemsRunTimeInfo:this._itemsRunTimeInfo})},_tryExecuteItemOptionAction:function(e){return e&&e.tryExecute()},_updateValidationGroupAndSummaryIfNeeded:function(e){var t=QS(e);if(_Q.indexOf(t)>-1&&(pt.addGroup(this._getValidationGroup()),this.option("showValidationSummary"))){var i;(i=this._validationSummary)===null||i===void 0||i.refreshValidationGroup()}},_setLayoutManagerItemOption(e,t,i,n){if(this._updateLockCount>0){!e._updateLockCount&&e.beginUpdate();var r=this._itemsRunTimeInfo.findKeyByPath(n);this.postponedOperations.add(r,()=>(!e._disposed&&e.endUpdate(),new te().resolve()))}var a=o=>{if(o.component.off("contentReady",a),M1(n)){var s=iZ(n),l=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(s);l&&this._alignLabelsInColumn({items:l.option("items"),layoutManager:l,$container:l.$element(),inOneColumn:l.isSingleColumnMode()})}else this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())};e.on("contentReady",a),e.option(t,i),this._updateValidationGroupAndSummaryIfNeeded(t)},_tryChangeLayoutManagerItemOption(e,t){var i=e.split("."),n=QS(e);if(n==="items"&&i.length>1){var r=this._getItemPath(i),a=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(r);if(a){this._itemsRunTimeInfo.removeItemsByItems(a.getItemsRunTimeInfo());var o=this._prepareItems(t,!1,r);return this._setLayoutManagerItemOption(a,n,o,r),!0}}else if(i.length>2){var s=i.length-2,l=this._getItemPath(i.slice(0,s)),u=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(l);if(u){var d=Bl(i[s],n);if(n==="editorType"&&u.option(d)!==t)return!1;if(n==="visible"){var c=this.option(Bl(l,"items"));if(c&&c.length){var h=u.option("items");c.forEach((f,p)=>{var g=h[p];g.visibleIndex=f.visibleIndex})}}return this._setLayoutManagerItemOption(u,d,t,l),!0}}return!1},_tryChangeLayoutManagerItemOptions(e,t){var i;return this.beginUpdate(),F(t,(n,r)=>{if(i=this._tryChangeLayoutManagerItemOption(Bl(e,n),r),!i)return!1}),this.endUpdate(),i},_getItemPath:function(e){var t=e[0],i;for(i=1;i<e.length&&e[i].search(/items\[\d+]|tabs\[\d+]/)!==-1;i++)t+="."+e[i];return t},_triggerOnFieldDataChanged:function(e){this._createActionByOption("onFieldDataChanged")(e)},_triggerOnFieldDataChangedByDataSet:function(e){var t=this;e&&He(e)&&F(e,function(i,n){t._triggerOnFieldDataChanged({dataField:i,value:n})})},_updateFieldValue:function(e,t){if(E(this.option("formData"))){var i=this.getEditor(e);if(this.option("formData."+e,t),i){var n=i.option("value");n!==t&&i.option("value",t)}}},_generateItemsFromData:function(e){var t=this.option("formData"),i=[];return!e&&E(t)&&F(t,function(n){i.push({dataField:n})}),e&&F(e,function(n,r){He(r)?i.push(r):i.push({dataField:r})}),i},_getItemByField:function(e,t){var i=this,n=He(e)?e:i._getFieldParts(e),r=n.fieldName,a=n.fieldPath,o;return t.length&&F(t,function(s,l){var u=l.itemType;if(a.length){var d=a.slice();l=i._getItemByFieldPath(d,r,l)}else if(u==="group"&&!(l.caption||l.name)||u==="tabbed"&&!l.name){var c=i._getSubItemField(u);l.items=i._generateItemsFromData(l.items),l=i._getItemByField({fieldName:r,fieldPath:a},l[c])}if(tZ(l,r))return o=l,!1}),o},_getFieldParts:function(e){for(var t=e,i=t.indexOf("."),n=[];i!==-1;)n.push(t.substr(0,i)),t=t.substr(i+1),i=t.indexOf(".");return{fieldName:t,fieldPath:n.reverse()}},_getItemByFieldPath:function(e,t,i){var n=i.itemType,r=this._getSubItemField(n),a=n==="group"||n==="tabbed"||i.title,o;do if(a){var s=i.name||i.caption||i.title,l=E(s),u=og(s),d=void 0;if(i[r]=this._generateItemsFromData(i[r]),l&&(d=e.pop()),!e.length&&(o=this._getItemByField(t,i[r]),o))break;(!l||l&&u===d)&&e.length&&(o=this._searchItemInEverySubItem(e,t,i[r]))}else break;while(e.length&&!E(o));return o},_getSubItemField:function(e){return e==="tabbed"?"tabs":"items"},_searchItemInEverySubItem:function(e,t,i){var n=this,r;return F(i,function(a,o){if(r=n._getItemByFieldPath(e.slice(),t,o),r)return!1}),r||(r=!1),r},_changeItemOption:function(e,t,i){He(e)&&(e[t]=i)},_dimensionChanged:function(){var e=this._getCurrentScreenFactor();this._lastMarkupScreenFactor!==e&&(this._isColCountChanged(this._lastMarkupScreenFactor,e)&&(this._targetScreenFactor=e,this._refresh(),this._targetScreenFactor=void 0),this._lastMarkupScreenFactor=e)},_isColCountChanged:function(e,t){var i=!1;return F(this._cachedColCountOptions,function(n,r){if(r.colCountByScreen[e]!==r.colCountByScreen[t])return i=!0,!1}),i},_refresh:function(){var e="."+cE+" input, ."+cE+" textarea";D.trigger(this.$element().find(e),"change"),this.callBase()},_resetValues:function(){this._itemsRunTimeInfo.each(function(e,t){E(t.widgetInstance)&&Gn.isEditor(t.widgetInstance)&&(t.widgetInstance.reset(),t.widgetInstance.option("isValid",!0))}),pt.resetGroup(this._getValidationGroup())},_updateData:function(e,t,i){var n=this,r=i?t:e;He(r)?F(r,function(a,o){n._updateData(i?e+"."+a:a,o,He(o))}):Me(e)&&n._updateFieldValue(e,t)},registerKeyHandler:function(e,t){this.callBase(e,t),this._itemsRunTimeInfo.each(function(i,n){E(n.widgetInstance)&&n.widgetInstance.registerKeyHandler(e,t)})},_focusTarget:function(){return this.$element().find("."+sg+" [tabindex]").first()},_visibilityChanged:function(){},_clearAutoColCountChangedTimeout:function(){this.autoColCountChangedTimeoutId&&(clearTimeout(this.autoColCountChangedTimeoutId),this.autoColCountChangedTimeoutId=void 0)},_dispose:function(){this._clearAutoColCountChangedTimeout(),pt.removeGroup(this._getValidationGroup()),this.callBase()},resetValues:function(){this._resetValues()},updateData:function(e,t){this._updateData(e,t)},getEditor:function(e){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(e)||this._itemsRunTimeInfo.findWidgetInstanceByName(e)},getButton:function(e){return this._itemsRunTimeInfo.findWidgetInstanceByName(e)},updateDimensions:function(){var e=this,t=new te;return e._scrollable?e._scrollable.update().done(function(){t.resolveWith(e)}):t.resolveWith(e),t.promise()},itemOption:function(e,t,i){var n=this._generateItemsFromData(this.option("items")),r=this._getItemByField(e,n),a=V1(n,r);if(r)switch(arguments.length){case 1:return r;case 3:var o=this._tryCreateItemOptionAction(t,r,i,r[t],a);this._changeItemOption(r,t,i);var s=Bl(a,t);!this._tryExecuteItemOptionAction(o)&&!this._tryChangeLayoutManagerItemOption(s,i)&&this.option("items",n);break;default:if(He(t)&&!this._tryChangeLayoutManagerItemOptions(a,t)){var l;F(t,(u,d)=>{var c=this._tryCreateItemOptionAction(u,r,d,r[u],a);this._changeItemOption(r,u,d),!l&&!this._tryExecuteItemOptionAction(c)&&(l=!0)}),l&&this.option("items",n)}}},validate:function(){return pt.validateGroup(this._getValidationGroup())},getItemID:function(e){return"dx_"+this.option("formID")+"_"+(e||new ri)},getTargetScreenFactor:function(){return this._targetScreenFactor}});tt("dxForm",IC);var gQ=!!cn.IS_RENOVATED_WIDGET,hE="edit-form-item",mQ="edit-popup",CQ="edit-popup-form",yQ=gQ?"dx-scrollable":"dx-scrollable-container",xQ="dx-button",bQ="form-buttons-container",SQ=e=>{var t,i=e.column;return e.isCustomEditorType?e.editorType:(t=i.formItem)===null||t===void 0?void 0:t.editorType},X1=(e,t)=>{e.forEach(i=>{i.items||i.tabs?X1(i.items||i.tabs,t):t(i)})},EQ={extenders:{controllers:{editing:{init:function(){this._editForm=null,this._updateEditFormDeferred=null,this.callBase.apply(this,arguments)},isFormOrPopupEditMode:function(){return this.isPopupEditMode()||this.isFormEditMode()},isPopupEditMode:function(){var e=this.option("editing.mode");return e===bC},isFormEditMode:function(){var e=this.option("editing.mode");return e===of},getFirstEditableColumnIndex:function(){var e=this._firstFormItem;if(this.isFormEditMode()&&e){var t=this.option(Nn),i=this._dataController.getRowIndexByKey(t),n=this._rowsView.getCellElements(i);return this._rowsView._getEditFormEditorVisibleIndex(n,e.column)}return this.callBase.apply(this,arguments)},getEditFormRowIndex:function(){return this.isFormOrPopupEditMode()?this._getVisibleEditRowIndex():this.callBase.apply(this,arguments)},_isEditColumnVisible:function(){var e=this.callBase.apply(this,arguments),t=this.option("editing");return this.isFormOrPopupEditMode()&&t.allowUpdating||e},_handleDataChanged:function(e){if(this.isPopupEditMode()){var t,i=this.option("editing.editRowKey"),n=e==null||(t=e.items)===null||t===void 0?void 0:t.some(r=>kt(r.key,i));(e.changeType==="refresh"||n)&&this._repaintEditPopup()}this.callBase.apply(this,arguments)},getPopupContent:function(){var e,t=(e=this._editPopup)===null||e===void 0?void 0:e.option("visible");if(this.isPopupEditMode()&&t)return this._$popupContent},_showAddedRow:function(e){this.isPopupEditMode()?this._showEditPopup(e):this.callBase.apply(this,arguments)},_cancelEditDataCore:function(){this.callBase.apply(this,arguments),this.isPopupEditMode()&&this._hideEditPopup()},_updateEditRowCore:function(e,t,i){var n=this._editForm;if(this.isPopupEditMode())if(this.option("repaintChangesOnly")){var r;(r=e.update)===null||r===void 0||r.call(e,e),this._rowsView.renderDelayedTemplates()}else n&&(this._updateEditFormDeferred=new te().done(()=>n.repaint()),this._updateLockCount||this._updateEditFormDeferred.resolve());else this.callBase.apply(this,arguments)},_showEditPopup:function(e,t){var i=Oe.current().deviceType!=="desktop",n=O({showTitle:!1,fullScreen:i,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getSaveButtonConfig()},{toolbar:"bottom",location:"after",widget:"dxButton",options:this._getCancelButtonConfig()}],contentTemplate:this._getPopupEditFormTemplate(e)},this.option(Ac));if(!this._editPopup){var r=v("<div>").appendTo(this.component.$element()).addClass(this.addWidgetPrefix(mQ));this._editPopup=this._createComponent(r,pr,{copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0}),this._editPopup.on("hiding",this._getEditPopupHiddenHandler()),this._editPopup.on("shown",a=>{if(D.trigger(a.component.$content().find(A1).not(".".concat(yQ)).first(),"focus"),t){var o;(o=this._editForm)===null||o===void 0||o.repaint()}})}this._editPopup.option(n),this._editPopup.show(),this.callBase.apply(this,arguments)},_getPopupEditFormTemplate:function(e){var t=this.component.getVisibleRows()[e],i={row:t,values:t.values,rowType:t.rowType,key:t.key,rowIndex:e};return this._rowsView._addWatchMethod(i,t),n=>{var r=this.getEditFormTemplate(),a=this._createComponent(v("<div>").appendTo(n),cn);this._$popupContent=v(a.content()),r(this._$popupContent,i,{isPopupForm:!0}),this._rowsView.renderDelayedTemplates()}},_repaintEditPopup:function(){var e,t=this._getVisibleEditRowIndex();if((e=this._editPopup)!==null&&e!==void 0&&e.option("visible")&&t>=0){var i=this._editPopup.option("animation");this._editPopup.option("animation",null),this._showEditPopup(t,!0),this._editPopup.option("animation",i)}},_hideEditPopup:function(){var e;(e=this._editPopup)===null||e===void 0||e.option("visible",!1)},optionChanged:function(e){if(e.name==="editing"&&this.isFormOrPopupEditMode()){var t=e.fullName;t.indexOf(dv)===0?(this._handleFormOptionChange(e),e.handled=!0):t.indexOf(Ac)===0&&(this._handlePopupOptionChange(e),e.handled=!0)}this.callBase.apply(this,arguments)},_handleFormOptionChange:function(e){var t;if(this.isFormEditMode()){var i=this._getVisibleEditRowIndex();i>=0&&this._dataController.updateItems({changeType:"update",rowIndices:[i]})}else(t=this._editPopup)!==null&&t!==void 0&&t.option("visible")&&e.fullName.indexOf(dv)===0&&this._repaintEditPopup()},_handlePopupOptionChange:function(e){var t=this._editPopup;if(t){var i=e.fullName.slice(Ac.length+1);i?t.option(i,e.value):t.option(e.value)}},renderFormEditTemplate:function(e,t,i,n,r){var a=this,o=v(n),s=t.column,l=SQ(t),u=e==null?void 0:e.row.data,d=i.component,{label:c,labelMark:h,labelMode:f}=i.editorOptions||{},p=O({},e,{data:u,cellElement:null,isOnForm:!0,item:t,id:d.getItemID(t.name||t.dataField),column:O({},s,{editorType:l,editorOptions:O({label:c,labelMark:h,labelMode:f},s.editorOptions,t.editorOptions)}),columnIndex:s.index,setValue:!r&&s.allowEditing&&function(m){a.updateFieldValue(p,m)}});p.value=s.calculateCellValue(u);var g=this._getFormEditItemTemplate.bind(this)(p,s);return this._rowsView.renderTemplate(o,g,p,!!o.closest(qe().document).length).done(()=>{this._rowsView._updateCell(o,p)}),p},getFormEditorTemplate:function(e,t){var i=this.component.columnOption(t.dataField);return(n,r)=>{var a,o,s=v(r);(a=(o=e.row).watch)===null||a===void 0||a.call(o,function(){return i.selector(e.row.data)},()=>{var l,u=s.find(".dx-widget").first(),d=u.data("dxValidator"),c=(l=d)===null||l===void 0?void 0:l.option();s.contents().remove(),e=this.renderFormEditTemplate.bind(this)(e,t,n,s),u=s.find(".dx-widget").first(),d=u.data("dxValidator"),c&&!d&&u.dxValidator({validationRules:c.validationRules,validationGroup:c.validationGroup,dataGetter:c.dataGetter})}),e=this.renderFormEditTemplate.bind(this)(e,t,n,s)}},getEditFormOptions:function(e){var t,i=(t=this._getValidationGroupsInForm)===null||t===void 0?void 0:t.call(this,e),n=this.option("editing.form.customizeItem"),r=this.addWidgetPrefix(hE),a=this.option("editing.form.items"),o={};if(a)X1(a,l=>{var u=(l==null?void 0:l.name)||(l==null?void 0:l.dataField);u&&(o[u]=!!l.editorType)});else{var s=this.getController("columns").getColumns();a=[],F(s,function(l,u){!u.isBand&&!u.type&&a.push({column:u,name:u.name,dataField:u.dataField})})}return O({},i,{items:a,formID:"dx-"+new ri,customizeItem:l=>{var u,d=l.name||l.dataField;if((l.column||d)&&(u=l.column||this._columnsController.columnOption(l.name?"name:"+l.name:"dataField:"+l.dataField)),u){if(l.label=l.label||{},l.label.text=l.label.text||u.caption,u.dataType==="boolean"&&l.label.visible===void 0){var c=this.option("editing.form.labelMode");(c==="floating"||c==="static")&&(l.label.visible=!0)}l.template=l.template||this.getFormEditorTemplate(e,l),l.column=u,l.isCustomEditorType=o[d],u.formItem&&O(l,u.formItem),l.isRequired===void 0&&u.validationRules&&(l.isRequired=u.validationRules.some(function(f){return f.type==="required"}),l.validationRules=[]);var h=E(l.visible)?l.visible:!0;!this._firstFormItem&&h&&(this._firstFormItem=l)}n==null||n.call(this,l),l.cssClass=Me(l.cssClass)?l.cssClass+" "+r:r}})},getEditFormTemplate:function(){return(e,t,i)=>{var n=this.option(dv),r=this.getEditFormOptions(t),a=v("<div>").appendTo(e),o=i==null?void 0:i.isPopupForm;if(this._firstFormItem=void 0,o&&a.addClass(this.addWidgetPrefix(CQ)),this._editForm=this._createComponent(a,IC,O({},n,r)),!o){var s=v("<div>").addClass(this.addWidgetPrefix(bQ)).appendTo(e);this._createComponent(v("<div>").appendTo(s),Si,this._getSaveButtonConfig()),this._createComponent(v("<div>").appendTo(s),Si,this._getCancelButtonConfig())}this._editForm.on("contentReady",()=>{var l;this._rowsView.renderDelayedTemplates(),(l=this._editPopup)===null||l===void 0||l.repaint()})}},getEditForm:function(){return this._editForm},_endUpdateCore:function(){var e;(e=this._updateEditFormDeferred)===null||e===void 0||e.resolve()},_beforeEndSaving:function(){if(this.callBase.apply(this,arguments),this.isPopupEditMode()){var e;(e=this._editPopup)===null||e===void 0||e.hide()}},_processDataItemCore:function(e,t){var{type:i}=t;this.isPopupEditMode()&&i===Zn&&(e.visible=!1),this.callBase.apply(this,arguments)},_editRowFromOptionChangedCore:function(e,t){var i=this.isPopupEditMode();this.callBase(e,t,i),i&&this._showEditPopup(t)}},data:{_updateEditItem:function(e){this._editingController.isFormEditMode()&&(e.rowType="detail")},_getChangedColumnIndices:function(e,t,i,n){if(!(n===!1&&t.isEditing&&this._editingController.isFormEditMode()))return this.callBase.apply(this,arguments)}}},views:{rowsView:{_renderCellContent:function(e,t){t.rowType==="data"&&this._editingController.isPopupEditMode()&&t.row.visible===!1||this.callBase.apply(this,arguments)},getCellElements:function(e){var t=this.callBase(e),i=this._editingController,n=i.getEditForm(),r=i.getEditFormRowIndex();return r===e&&t&&n?n.$element().find("."+this.addWidgetPrefix(hE)+", ."+xQ):t},_getVisibleColumnIndex:function(e,t,i){var n=this._editingController.getEditFormRowIndex();if(n===t&&Me(i)){var r=this._columnsController.columnOption(i);return this._getEditFormEditorVisibleIndex(e,r)}return this.callBase.apply(this,arguments)},_getEditFormEditorVisibleIndex:function(e,t){var i=-1;return F(e,function(n,r){var a=v(r).find(".dx-field-item-content").data("dx-form-item");if(a!=null&&a.column&&t&&a.column.index===t.index)return i=n,!1}),i},_isFormItem:function(e){var t=e.rowType==="detail"||e.rowType==="detailAdaptive",i=e.rowType==="data"&&this._editingController.isPopupEditMode();return(t||i)&&e.item},_updateCell:function(e,t){this._isFormItem(t)?this._formItemPrepared(t,e):this.callBase(e,t)}}}}};De.registerModule("editingFormBased",EQ);var wQ="focus-overlay",IQ="addrow-button",TQ="dx-dropdowneditor-overlay",AQ="dx-editor-cell",DQ="dx-row",OQ="dx-cell-modified",RQ="dx-data-row",kQ="dx-row-removed",BQ="editing.editRowKey",fE="editing.editColumnName",LQ="remove";const PQ={extenders:{controllers:{editing:{init:function(){var e=!this._saveEditorHandler;if(this.callBase.apply(this,arguments),e){var t,i;this._pointerUpEditorHandler=()=>{var n;i=(n=this.getController("columnsResizer"))===null||n===void 0?void 0:n.isResizing()},this._pointerDownEditorHandler=n=>t=v(n.target),this._saveEditorHandler=this.createAction(function(n){var r=n.event,a=v(r.target),o=r[I1],s=this.component;if(t&&t.is("input")&&!t.is(a))return;function l(g){if(!g)return!1;var m=g.closest(".".concat(TQ)),C=s.$element();return m.length>0&&C.closest(m).length===0}if(this.isCellOrBatchEditMode()&&!this._editCellInProgress){var u=l(a)||l(o==null?void 0:o.$element()),d=!!a.closest(qe().document).length,c=o&&!o._disposed&&o!==this.component,h=!!a.closest(".".concat(this.addWidgetPrefix(IQ))).length,f=a.hasClass(this.addWidgetPrefix(wQ)),p=this.isCellEditMode();!i&&!u&&!f&&!(h&&p&&this.isEditing())&&(d||c)&&this._closeEditItem.bind(this)(a)}}),D.on(fe.getDocument(),ut.up,this._pointerUpEditorHandler),D.on(fe.getDocument(),ut.down,this._pointerDownEditorHandler),D.on(fe.getDocument(),ct,this._saveEditorHandler)}},isCellEditMode:function(){return this.option("editing.mode")===D1},isBatchEditMode:function(){return this.option("editing.mode")===rg},isCellOrBatchEditMode:function(){return this.isCellEditMode()||this.isBatchEditMode()},_needToCloseEditableCell:function(e){var t=this.component.$element(),i=this.isEditing(),n=!t||!!e.closest(t).length;if(n){var r=e.closest("."+RQ).length;if(r){var a=this.getView("rowsView"),o=e.closest("."+DQ+"> td"),s=a.getRowIndex(o.parent()),l=a.getCellElements(s).index(o),u=this._columnsController.getVisibleColumns(),d=u[l]&&u[l].allowEditing;i=i&&!d&&!this.isEditCell(s,l)}}return i||this.callBase.apply(this,arguments)},_closeEditItem:function(e){this._needToCloseEditableCell(e)&&this.closeEditCell()},_focusEditorIfNeed:function(){if(this._needFocusEditor&&this.isCellOrBatchEditMode()){var e,t=this._getVisibleEditColumnIndex(),i=(e=this._rowsView)===null||e===void 0?void 0:e._getCellElement(this._getVisibleEditRowIndex(),t);i&&!i.find(":focus").length?this._focusEditingCell(()=>{this._editCellInProgress=!1},i,!0):this._editCellInProgress=!1,this._needFocusEditor=!1}else this.callBase.apply(this,arguments)},isEditing:function(){if(this.isCellOrBatchEditMode()){var e=E(this.option(BQ)),t=E(this.option(fE));return e&&t}return this.callBase.apply(this,arguments)},_handleEditColumnNameChange:function(e){var t=this._getVisibleEditRowIndex(e.previousValue);if(this.isCellOrBatchEditMode()&&t!==-1&&E(e.value)&&e.value!==e.previousValue){var i=this._columnsController.getVisibleColumnIndex(e.value),n=this._columnsController.getVisibleColumnIndex(e.previousValue);this._editCellFromOptionChanged(i,n,t)}},_addRow:function(e,t){if(this.isCellEditMode()&&this.hasChanges()){var i=new te;return this.saveEditData().done(()=>{this.hasChanges()?i.reject("cancel"):this.addRow(e).done(i.resolve).fail(i.reject)}),i.promise()}return this.callBase.apply(this,arguments)},editCell:function(e,t){return this._editCell({rowIndex:e,columnIndex:t})},_editCell:function(e){var t=new te,i;return this.executeOperation(t,()=>{i=this._editCellCore(e),Ae(i).done(t.resolve).fail(t.reject)}),i!==void 0?i:t.promise()},_editCellCore:function(e){var t=this._dataController,i=E(e.oldColumnIndex)||E(e.oldRowIndex),{columnIndex:n,rowIndex:r,column:a,item:o}=this._getNormalizedEditCellOptions(e),s={data:o==null?void 0:o.data,cancel:!1,column:a};if(o.key===void 0){this._dataController.fireError("E1043");return}if(a&&(o.rowType==="data"||o.rowType==="detailAdaptive")&&!o.removed&&this.isCellOrBatchEditMode()){if(!i&&this.isEditCell(r,n))return!0;var l=r+t.getRowIndexOffset();return Ae(this._beforeEditCell(r,n,o)).done(u=>{u||this._prepareEditCell(s,o,n,l)||this._processCanceledEditingCell()})}return!1},_beforeEditCell:function(e,t,i){if(this.isCellEditMode()&&!i.isNewRow&&this.hasChanges()){var n=new te;return this.saveEditData().always(()=>{n.resolve(this.hasChanges())}),n}},publicMethods:function(){var e=this.callBase.apply(this,arguments);return e.concat(["editCell","closeEditCell"])},_getNormalizedEditCellOptions:function(e){var{oldColumnIndex:t,oldRowIndex:i,columnIndex:n,rowIndex:r}=e,a=this._columnsController,o=a.getVisibleColumns(),s=this._dataController.items(),l=s[r],u;E(t)?u=o[t]:u=this._getEditColumn(),E(i)||(i=this._getVisibleEditRowIndex()),Me(n)&&(n=a.columnOption(n,"index"),n=a.getVisibleIndex(n));var d=o[n];return{oldColumn:u,columnIndex:n,oldRowIndex:i,rowIndex:r,column:d,item:l}},_prepareEditCell:function(e,t,i,n){if(t.isNewRow||(e.key=t.key),this._isEditingStart(e))return!1;if(this._pageIndex=this._dataController.pageIndex(),this._setEditRowKey(t.key),this._setEditColumnNameByIndex(i),!e.column.showEditorAlways){var r;this._addInternalData({key:t.key,oldData:(r=t.oldData)!==null&&r!==void 0?r:t.data})}return!0},closeEditCell:function(e,t){var i=Ae(),n=this._getVisibleEditRowIndex();if(this.isCellOrBatchEditMode()){var r=new te;i=new te,this.executeOperation(r,()=>{this._closeEditCellCore(e,n,t).always(i.resolve)})}return i.promise()},_closeEditCellCore:function(e,t,i){var n=this._dataController,r=new te,a=r.promise();if(this.isCellEditMode()&&this.hasChanges()){if(!i)return this.saveEditData().done(s=>{if(!this.hasChanges()){this.closeEditCell(!!s).always(r.resolve);return}r.resolve()}),a}else if(this._resetEditRowKey(),this._resetEditColumnName(),t>=0){var o=[t];this._beforeCloseEditCellInBatchMode(o),e||n.updateItems({changeType:"update",rowIndices:o})}return r.resolve(),a},_resetModifiedClassCells:function(e){if(this.isBatchEditMode()){var t=this._columnsController.getVisibleColumns().length;e.forEach(i=>{var{key:n}=i,r=this._dataController.getRowIndexByKey(n);if(r!==-1)for(var a=0;a<t;a++)this._rowsView._getCellElement(r,a).removeClass(OQ)})}},_prepareChange:function(e,t,i){var n=v(e.cellElement);return this.isBatchEditMode()&&e.key!==void 0&&this._applyModified(n,e),this.callBase.apply(this,arguments)},_cancelSaving:function(){var e=this._dataController;this.isCellOrBatchEditMode()&&(this.isBatchEditMode()&&this._resetEditIndices(),e.updateItems()),this.callBase.apply(this,arguments)},optionChanged:function(e){var t=e.fullName;e.name==="editing"&&t===fE?(this._handleEditColumnNameChange(e),e.handled=!0):this.callBase(e)},_editCellFromOptionChanged:function(e,t,i){var n=this._columnsController.getVisibleColumns();e>-1&&Zt(()=>{this._repaintEditCell(n[e],n[t],i)})},_handleEditRowKeyChange:function(e){if(this.isCellOrBatchEditMode()){var t=this._getVisibleEditColumnIndex(),i=this._getEditRowIndexCorrection(),n=this._dataController.getRowIndexByKey(e.previousValue)+i;if(E(e.value)&&e.value!==e.previousValue){var r;(r=this._editCellFromOptionChanged)===null||r===void 0||r.call(this,t,t,n)}}else this.callBase.apply(this,arguments)},deleteRow:function(e){if(this.isCellEditMode()&&this.isEditing()){var t=this._dataController.items()[e].isNewRow,i=this._dataController.getKeyByRowIndex(e);this.closeEditCell(null,t).always(()=>{e=this._dataController.getRowIndexByKey(i),this._checkAndDeleteRow(e)})}else this.callBase.apply(this,arguments)},_checkAndDeleteRow:function(e){this.isBatchEditMode()?this._deleteRowCore(e):this.callBase.apply(this,arguments)},_refreshCore:function(e){var{isPageChanged:t}=e??{},i=this.isBatchEditMode()||t&&this.option("scrolling.mode")!=="virtual";this.isCellOrBatchEditMode()?i&&(this._resetEditColumnName(),this._resetEditRowKey()):this.callBase.apply(this,arguments)},_allowRowAdding:function(e){return this.isBatchEditMode()?!0:this.callBase.apply(this,arguments)},_afterDeleteRow:function(e,t){var i=this._dataController;return this.isBatchEditMode()?(i.updateItems({changeType:"update",rowIndices:[t,e]}),new te().resolve()):this.callBase.apply(this,arguments)},_updateEditRow:function(e,t,i){this.isCellOrBatchEditMode()?this._updateRowImmediately(e,t,i):this.callBase.apply(this,arguments)},_isDefaultButtonVisible:function(e,t){if(this.isCellOrBatchEditMode()){var i=this.isBatchEditMode();switch(e.name){case"save":case"cancel":case"edit":return!1;case"delete":return this.callBase.apply(this,arguments)&&(!i||!t.row.removed);case"undelete":return i&&this.allowDeleting(t)&&t.row.removed;default:return this.callBase.apply(this,arguments)}}return this.callBase.apply(this,arguments)},_isRowDeleteAllowed:function(){var e=this.callBase.apply(this,arguments);return e||this.isBatchEditMode()},_beforeEndSaving:function(e){if(this.isCellEditMode()){var t;((t=e[0])===null||t===void 0?void 0:t.type)!=="update"&&this.callBase.apply(this,arguments)}else this.isBatchEditMode()&&this._resetModifiedClassCells(e),this.callBase.apply(this,arguments)},prepareEditButtons:function(e){var t=this.option("editing")||{},i=this.callBase.apply(this,arguments);return(t.allowUpdating||t.allowAdding||t.allowDeleting)&&this.isBatchEditMode()&&(i.push(this.prepareButtonItem(e,"save","saveEditData",21)),i.push(this.prepareButtonItem(e,"revert","cancelEditData",22))),i},_saveEditDataInner:function(){var e,t=this._dataController.getVisibleRows()[this.getEditRowIndex()],i=this._getEditColumn(),n=i==null?void 0:i.showEditorAlways,r=this.isCellEditMode()&&!(t!=null&&t.isNewRow),a;return r&&n&&(a=new te,this.addDeferred(a)),this.callBase.apply(this,arguments).always((e=a)===null||e===void 0?void 0:e.resolve)},_applyChange:function(e,t,i){var n=this.isCellEditMode()&&e.row&&!e.row.isNewRow,r=e.column.showEditorAlways,a=e.column.setCellValue!==e.column.defaultSetCellValue,o=r&&!i&&n&&this.hasEditData()&&!this.isEditCell(e.rowIndex,e.columnIndex);if(o){this._focusEditingCell(),this._updateEditRow(e.row,!0,a);return}return this.callBase.apply(this,arguments)},_applyChangeCore:function(e,t){var i=e.column.showEditorAlways,n=this.isCellEditMode()&&e.row&&!e.row.isNewRow;if(i&&!t){if(n)return this._setEditRowKey(e.row.key,!0),this._setEditColumnNameByIndex(e.columnIndex,!0),this.saveEditData();if(this.isBatchEditMode())return t=this._needUpdateRow(e.column),this.callBase(e,t)}return this.callBase.apply(this,arguments)},_processDataItemCore:function(e,t){var{data:i,type:n}=t;this.isBatchEditMode()&&n===LQ&&(e.data=ua(e.data,i)),this.callBase.apply(this,arguments)},_processRemoveCore:function(e,t,i){if(!(this.isBatchEditMode()&&!i))return this.callBase.apply(this,arguments)},_processRemoveIfError:function(){if(!this.isBatchEditMode())return this.callBase.apply(this,arguments)},_beforeFocusElementInRow:function(e){this.callBase.apply(this,arguments);var t=e>=0?e:0,i=this.getFirstEditableColumnIndex();i>=0&&this.editCell(t,i)}}},views:{rowsView:{_createTable:function(){var e=this.callBase.apply(this,arguments),t=this._editingController;return t.isCellOrBatchEditMode()&&this.option("editing.allowUpdating")&&D.on(e,me(ma.name,"dxDataGridRowsView"),"td:not(."+AQ+")",this.createAction(()=>{t.isEditing()&&t.closeEditCell()})),e},_createRow:function(e){var t=this.callBase.apply(this,arguments);if(e){var i=this._editingController,n=!!e.removed;i.isBatchEditMode()&&n&&t.addClass(kQ)}return t}},headerPanel:{isVisible:function(){var e=this.getController("editing").option("editing");return this.callBase()||e&&(e.allowUpdating||e.allowDeleting)&&e.mode===rg}}}}};De.registerModule("editingCellBased",PQ);var Z1="invalid",Xd="revert-tooltip",FQ="rowsview",MQ="dx-invalid-message",_v="invalid-message",VQ="dx-invalid-message-always",NQ="dx-revert-button",Q1="validator",gv="dx-pending-indicator",pE="dx-validation-pending",vE="content",_E="__DX_INSERT_INDEX__",HQ=2,$Q="row",WQ="form",mv="batch",Ll="cell",zQ="popup",GQ="dx-group-cell",J1=[zQ,WQ],UQ="transparent",ln={valid:"valid",invalid:"invalid",pending:"pending"},Pl="insert",KQ="remove",Fl="cancel",Ml=function(e){return E(e)&&e!==Fl},gE=function(e,t){return e!==void 0||e===void 0&&t&&!t.isNewRow},jQ=Tt.Controller.inherit({init:function(){this._editingController=this.getController("editing"),this.createAction("onRowValidating"),this._validationState||this.initValidationState()},initValidationState(){this._validationState=[],this._validationStateCache={}},_rowIsValidated:function(e){var t=this._getValidationData(e==null?void 0:e.key);return!!t&&!!t.validated},_getValidationData:function(e,t){var i=Wn(e),n=He(i),r;return n?r=this._validationState.filter(a=>kt(a.key,e))[0]:r=this._validationStateCache[i],!r&&t&&(r={key:e,isValid:!0},this._validationState.push(r),n||(this._validationStateCache[i]=r)),r},_getBrokenRules:function(e,t){var i;return t?i=t.brokenRules||t.brokenRule&&[t.brokenRule]:i=e.brokenRules||[],i},_rowValidating:function(e,t){var i=new te,n=this._editingController.getChangeByKey(e==null?void 0:e.key),r=this._getBrokenRules(e,t),a=t?t.isValid:e.isValid,o={brokenRules:r,isValid:a,key:n.key,newData:n.data,oldData:this._editingController._getOldData(n.key),promise:null,errorText:this.getHiddenValidatorsErrorText(r)};return this.executeAction("onRowValidating",o),Ae(gi(o.promise)).always(function(){e.isValid=o.isValid,e.errorText=o.errorText,i.resolve(o)}),i.promise()},getHiddenValidatorsErrorText:function(e){var t=[];return F(e,function(i,n){var r=n.column,a=r&&r.groupIndex!==void 0&&!r.showWhenGrouped,o=r&&r.visible;!n.validator.$element().parent().length&&(!o||a)&&t.push(n.message)}),t.join(", ")},validate:function(e){var t=!0,i=this._editingController,n=new te,r=[],a=i.getEditMode();if(e=e||a===$Q,this._isValidationInProgress)return n.resolve(!1).promise();if(this._isValidationInProgress=!0,e){i.addDeferred(n);var o=i.getChanges();F(o,(l,u)=>{var{type:d,key:c}=u;if(d!=="remove"){var h=this._getValidationData(c,!0),f=this.validateGroup(h);r.push(f),f.done(p=>{h.validated=!0,t=t&&p.isValid})}})}else if(this._currentCellValidator){var s=this.validateGroup(this._currentCellValidator._findGroup());r.push(s),s.done(l=>{t=l.isValid})}return Ae(...r).done(()=>{this._isValidationInProgress=!1,n.resolve(t)}),n.promise()},validateGroup:function(e){var t,i=new te,n=e&&pt.getGroupConfig(e),r;return n!=null&&n.validators.length&&(this.resetRowValidationResults(e),r=pt.validateGroup(e)),Ae(((t=r)===null||t===void 0?void 0:t.complete)||r).done(a=>{Ae(this._rowValidating(e,a)).done(i.resolve)}),i.promise()},isRowDataModified:e=>!Rn(e.data),updateValidationState:function(e){var t=this._editingController.getEditMode(),i=e.key,n=this._getValidationData(i,!0);if(J1.indexOf(t)===-1){if(e.type===Pl&&!this.isRowDataModified(e)){n.isValid=!0;return}this.setDisableApplyValidationResults(!0);var r=pt.getGroupConfig(n);if(r){var a=pt.validateGroup(n);Ae(a.complete||a).done(o=>{n.isValid=o.isValid,n.brokenRules=o.brokenRules})}else(!n.brokenRules||!n.brokenRules.length)&&(n.isValid=!0);this.setDisableApplyValidationResults(!1)}else n.isValid=!0},setValidator:function(e){this._currentCellValidator=e},renderCellPendingIndicator:function(e){var t=e.find("."+gv);if(!t.length){var i=e;t=v("<div>").appendTo(i).addClass(gv),this._createComponent(t,dn),e.addClass(pE)}},disposeCellPendingIndicator:function(e){var t=e.find("."+gv);if(t.length){var i=dn.getInstance(t);i&&(i.dispose(),i.$element().remove()),e.removeClass(pE)}},validationStatusChanged:function(e){var t=e.validator,i=t.option("validationGroup"),n=t.option("dataGetter")().column;this.updateCellValidationResult({rowKey:i.key,columnIndex:n.index,validationResult:e})},validatorInitialized:function(e){e.component.on("validating",this.validationStatusChanged.bind(this)),e.component.on("validated",this.validationStatusChanged.bind(this))},validatorDisposing:function(e){var t=e.component,i=t.option("validationGroup"),n=t.option("dataGetter")().column,r=this.getCellValidationResult({rowKey:i==null?void 0:i.key,columnIndex:n.index});Ml(r)&&r.status===ln.pending&&this.cancelCellValidationResult({change:i,columnIndex:n.index})},applyValidationResult:function(e,t){var i=t.validator,n=i.option("validationGroup"),r=i.option("dataGetter")().column;if(t.brokenRules&&t.brokenRules.forEach(u=>{u.columnIndex=r.index,u.column=r}),e){var a=this.getCellValidationResult({rowKey:n.key,columnIndex:r.index}),o=Ml(a)&&a.disabledPendingId===t.id;if(this._disableApplyValidationResults||o)return;if(t.status===ln.invalid){var s=e.find(":focus");_a(s)||(D.trigger(s,"focus"),D.trigger(s,ut.down))}var l=!r.editCellTemplate&&this.getController("editorFactory").getEditorInstance(e);t.status===ln.pending?l?l.option("validationStatus",ln.pending):this.renderCellPendingIndicator(e):l?l.option("validationStatus",ln.valid):this.disposeCellPendingIndicator(e),e.toggleClass(this.addWidgetPrefix(Z1),t.status===ln.invalid)}},_syncInternalEditingData:function(e){var t,i=this._editingController,n=i.getChangeByKey(e.key),r=i._getOldData(e.key),a=(t=e.row)===null||t===void 0?void 0:t.oldData;n&&a&&!r&&i._addInternalData({key:e.key,oldData:a})},createValidator:function(e,t){var i=this._editingController,n=e.column,r=n.showEditorAlways;if(!(E(n.command)||!n.validationRules||!Array.isArray(n.validationRules)||!n.validationRules.length)){var a=i.getIndexByKey(e.key,i.getChanges()),o=a>-1;if(!o){if(!r){var s=this.getController("columns"),l=(s==null?void 0:s.getVisibleColumns())||[];r=l.some(function(x){return x.showEditorAlways})}var u=kt(this.option("editing.editRowKey"),e.key),d=i.isCellOrBatchEditMode()&&i.allowUpdating({row:e.row});if(o=u||d&&r,d&&r){var c,h;i._addInternalData({key:e.key,oldData:(c=(h=e.row)===null||h===void 0?void 0:h.oldData)!==null&&c!==void 0?c:e.data})}}if(o){if(t&&!t.length){Je.log("E1050");return}this._syncInternalEditingData(e);var f=this._getValidationData(e.key,!0),p=()=>{var x=i.getChangeByKey(f==null?void 0:f.key),T=n.calculateCellValue((x==null?void 0:x.data)||{});return T!==void 0?T:e.value},g=t&&t.hasClass("dx-widget");t&&t.addClass(this.addWidgetPrefix(Q1));var m=new sf(t||v("<div>"),{name:n.caption,validationRules:O(!0,[],n.validationRules),validationGroup:f,adapter:g?null:{getValue:p,applyValidationResults:x=>{this.applyValidationResult(t,x)}},dataGetter:function(){var x=f==null?void 0:f.key,T=i.getChangeByKey(x),R=i._getOldData(x);return{data:ua(R,T==null?void 0:T.data),column:n}},onInitialized:this.validatorInitialized.bind(this),onDisposing:this.validatorDisposing.bind(this)});if(g){var C=m.option("adapter");C&&(C.getValue=p,C.validationRequestsCallbacks=[],C.bypass=()=>e.row.isNewRow&&!this._isValidationInProgress&&!i.isCellModified(e))}return m}}},setDisableApplyValidationResults:function(e){this._disableApplyValidationResults=e},getDisableApplyValidationResults:function(){return this._disableApplyValidationResults},isCurrentValidatorProcessing:function(e){var{rowKey:t,columnIndex:i}=e;return this._currentCellValidator&&kt(this._currentCellValidator.option("validationGroup").key,t)&&this._currentCellValidator.option("dataGetter")().column.index===i},validateCell:function(e){var t={rowKey:e.option("validationGroup").key,columnIndex:e.option("dataGetter")().column.index},i=this.getCellValidationResult(t),n=Ml(i);n||(i=e.validate());var r=new te,a=e.option("adapter");return n&&i.status===ln.pending&&(this.updateCellValidationResult(t),a.applyValidationResults(i)),Ae(i.complete||i).done(o=>{n&&a.applyValidationResults(o),r.resolve(o)}),r.promise()},updateCellValidationResult:function(e){var{rowKey:t,columnIndex:i,validationResult:n}=e,r=this._getValidationData(t);if(r){r.validationResults||(r.validationResults={});var a;if(n){if(a=O({},n),r.validationResults[i]=a,n.status===ln.pending&&(this._editingController.getEditMode()===Ll&&(a.deferred=new te,a.complete.always(()=>{a.deferred.resolve()}),this._editingController.addDeferred(a.deferred)),this._disableApplyValidationResults)){a.disabledPendingId=n.id;return}}else a=r.validationResults[i];a&&a.disabledPendingId&&delete a.disabledPendingId}},getCellValidationResult:function(e){var t,{rowKey:i,columnIndex:n}=e,r=this._getValidationData(i,!0);return r==null||(t=r.validationResults)===null||t===void 0?void 0:t[n]},removeCellValidationResult:function(e){var{change:t,columnIndex:i}=e,n=this._getValidationData(t==null?void 0:t.key);n&&n.validationResults&&(this.cancelCellValidationResult({change:t,columnIndex:i}),delete n.validationResults[i])},cancelCellValidationResult:function(e){var{change:t,columnIndex:i}=e,n=this._getValidationData(t.key);if(t&&n.validationResults){var r=n.validationResults[i];r&&(r.deferred&&r.deferred.reject(Fl),n.validationResults[i]=Fl)}},resetRowValidationResults:function(e){e&&(e.validationResults&&delete e.validationResults,delete e.validated)},isInvalidCell:function(e){var{rowKey:t,columnIndex:i}=e,n=this.getCellValidationResult({rowKey:t,columnIndex:i});return Ml(n)&&n.status===ln.invalid},getCellValidator:function(e){var{rowKey:t,columnIndex:i}=e,n=this._getValidationData(t),r=n&&pt.getGroupConfig(n),a=r&&r.validators;return a&&a.filter(o=>{var s=o.option("dataGetter")().column;return s?s.index===i:!1})[0]},setCellValidationStatus:function(e){var t=this.getCellValidationResult({rowKey:e.key,columnIndex:e.column.index});E(t)?e.validationStatus=t!==Fl?t.status:Fl:delete e.validationStatus}}),qQ={defaultOptions:function(){return{editing:{texts:{validationCancelChanges:ue.format("dxDataGrid-validationCancelChanges")}}}},controllers:{validating:jQ},extenders:{controllers:{editing:{_addChange:function(e){var t=this.callBase.apply(this,arguments),i=this.getController("validating");return t&&e.type!==KQ&&i.updateValidationState(t),t},_handleChangesChange:function(e){this.callBase.apply(this,arguments);var t=this.getController("validating");e.value.forEach(i=>{t._getValidationData(i.key)===void 0&&t.updateValidationState(i)})},_updateRowAndPageIndices:function(){var e=this,t=e.getView("rowsView").getTopVisibleItemIndex(),i=t;F(e.getChanges(),(n,r)=>{var{key:a,type:o}=r,s=this.getController("validating")._getValidationData(a);s&&!s.isValid&&s.pageIndex!==e._pageIndex&&(s.pageIndex=e._pageIndex,o===Pl?s.rowIndex=t:s.rowIndex=i,i++)})},_getValidationGroupsInForm:function(e){var t=this.getController("validating"),i=t._getValidationData(e.key,!0);return{validationGroup:i}},_validateEditFormAfterUpdate:function(e,t){t&&this._editForm&&this._editForm.validate(),this.callBase.apply(this,arguments)},_prepareEditCell:function(e){var t=this.callBase.apply(this,arguments),i=this.getController("validating");return t&&e.column.showEditorAlways&&i.updateValidationState({key:e.key}),t},processItems:function(e,t){var i=this.getChanges(),n=this.getController("data"),r=this.getController("validating");e=this.callBase(e,t);var a=e.length,o=function(s,l){var u={key:s.key},d=function(h,f){var p=-1,g=h.type===Pl,m=h.key;return F(f,function(C,x){if(kt(m,g?x.key:n.keyOf(x)))return p=C,!1}),p}(s,e);if(!(d>=0)){l.rowIndex=l.rowIndex>a?l.rowIndex%a:l.rowIndex;var c=l.rowIndex;u[_E]=1,e.splice(c,0,u)}};return this.getEditMode()===mv&&t!=="prepend"&&t!=="append"&&i.forEach(s=>{var l=s.key,u=r._getValidationData(l);u&&s.type&&u.pageIndex===this._pageIndex&&(s==null?void 0:s.pageIndex)!==this._pageIndex&&o(s,u)}),e},processDataItem:function(e){var t=e.data[_E],i=t?e.data.key:e.key,n=this.getEditMode();if(n===mv&&t&&i){var r=this.getChanges(),a=xe.getIndexByKey(i,r);if(a>=0){var o=r[a];if(o.type!==Pl){var s=this._getOldData(o.key);e.data=O(!0,{},s,o.data),e.key=i}}}this.callBase.apply(this,arguments)},_createInvisibleColumnValidators:function(e){var t=this,i=this.getController("validating"),n=this.getController("columns"),r=n.getColumns(),a=n.getInvisibleColumns().filter(u=>!u.isBand),o=n.getGroupColumns().filter(u=>!u.showWhenGrouped&&a.indexOf(u)===-1),s=[],l=(u,d)=>this._dataController.getRowIndexByKey(d)>=0&&a.indexOf(u)<0;return a.push(...o),J1.indexOf(this.getEditMode())===-1&&F(r,function(u,d){e.forEach(function(c){var h;if(!l(d,c.key)){if(c.type===Pl)h=c.data;else if(c.type==="update"){var f=t._getOldData(c.key);h=ua(f,c.data)}if(h){var p=i.createValidator({column:d,key:c.key,value:d.calculateCellValue(h)});p&&s.push(p)}}})}),function(){s.forEach(function(u){u.dispose()})}},_beforeSaveEditData:function(e,t){var i=this.callBase.apply(this,arguments),n=this.getController("validating"),r=n._getValidationData(e==null?void 0:e.key);if(e){var a=e.type==="remove"||r.isValid;i=i||!a}else{var o=this._createInvisibleColumnValidators(this.getChanges());i=new te,this.executeOperation(i,()=>{n.validate(!0).done(s=>{switch(o(),this._updateRowAndPageIndices(),this.getEditMode()){case Ll:s||this._focusEditingCell();break;case mv:s||(this._resetEditRowKey(),this._resetEditColumnName(),this.getController("data").updateItems())}i.resolve(!s)})})}return i.promise?i.promise():i},_beforeEditCell:function(e,t,i){var n=this.callBase(e,t,i);if(this.getEditMode()===Ll){var r=this._rowsView._getCellElement(e,t),a=r&&r.data("dxValidator"),o=r&&r.closest(".dx-row").data("options"),s=a&&a.option("adapter").getValue();if(a&&gE(s,o)){var l=this.getController("validating"),u=new te;return Ae(l.validateCell(a),n).done((d,c)=>{u.resolve(d.status===ln.valid&&c)}),u.promise()}else if(!a)return n}},_afterSaveEditData:function(e){var t,i=this.getEditMode()===Ll;if(F(this.getChanges(),(l,u)=>{var d=this._showErrorRow(u);t=t||d}),t){var n=this._rowsView.getScrollable();n&&(n.update(),n.scrollToElement(t))}if(e&&i&&this._needUpdateRow()){var r=this.getEditRowIndex();this._dataController.updateItems({changeType:"update",rowIndices:[r]}),this._focusEditingCell()}else if(!e){var a=!0;if(i){var o=this.getController("columns").getColumns(),s=o.filter(l=>{var u;return l.showEditorAlways&&((u=l.validationRules)===null||u===void 0?void 0:u.length)>0}).length>0;a=!s}a&&this.getController("validating").initValidationState()}},_handleDataChanged:function(e){var t=this.getController("validating")._validationState;this.option("scrolling.mode")==="standard"&&this.resetRowAndPageIndices(),e.changeType==="prepend"&&F(t,function(i,n){n.rowIndex+=e.items.length}),this.callBase(e)},resetRowAndPageIndices:function(){var e=this.getController("validating")._validationState;F(e,(t,i)=>{i.pageIndex!==this._pageIndex&&(delete i.pageIndex,delete i.rowIndex)})},_beforeCancelEditData:function(){this.getController("validating").initValidationState(),this.callBase()},_showErrorRow:function(e){var t,i=this.getController("errorHandling"),n=this.getController("data").items(),r=this.getIndexByKey(e.key,n),a=this.getController("validating")._getValidationData(e.key);if(!(a!=null&&a.isValid)&&a!==null&&a!==void 0&&a.errorText&&r>=0)return t=this.getPopupContent(),i&&i.renderErrorRow(a==null?void 0:a.errorText,r,t)},updateFieldValue:function(e){var t=this.getController("validating"),i=new te;return t.removeCellValidationResult({change:this.getChangeByKey(e.key),columnIndex:e.column.index}),this.callBase.apply(this,arguments).done(()=>{var n=t.getCellValidator({rowKey:e.key,columnIndex:e.column.index});Ae(n&&t.validateCell(n)).done(r=>{this.getController("editorFactory").refocus(),i.resolve(r)})}),i.promise()},highlightDataCell:function(e,t){this.callBase.apply(this,arguments);var i=this.getController("validating");i.setCellValidationStatus(t);var n=!!t.setValue,r=this.isCellModified(t),a=E(t.validationStatus),o=r&&t.column.setCellValue||n&&!r&&!(t.row.isNewRow||!a);if(o){var s=e.data("dxValidator");s&&Ae(this.getController("validating").validateCell(s)).done(()=>{i.setCellValidationStatus(t)})}},getChangeByKey:function(e){var t=this.getChanges();return t[xe.getIndexByKey(e,t)]},isCellModified:function(e){var t=this.callBase(e),i=this.getChangeByKey(e.key),n=!!e.row&&this.getController("validating").isInvalidCell({rowKey:e.key,columnIndex:e.column.index});return t||this.getController("validating")._rowIsValidated(i)&&n}},editorFactory:{_showRevertButton:function(e){if(!(!e||!e.length)){var t=this._rowsView.element().find("."+this.addWidgetPrefix(Xd)),i=e.closest(".".concat(this.addWidgetPrefix(vE)));t&&t.remove(),t=v("<div>").addClass(this.addWidgetPrefix(Xd)).appendTo(e);var n={animation:null,visible:!0,width:"auto",height:"auto",shading:!1,container:i,propagateOutsideClick:!0,hideOnOutsideClick:!1,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,contentTemplate:()=>{var r=v("<div>").addClass(NQ),a={icon:"revert",hint:this.option("editing.texts.validationCancelChanges"),onClick:()=>{this._editingController.cancelEditData()}};return new Si(r,a).$element()},position:{my:"left top",at:"right top",offset:"1 0",collision:"flip",boundaryOffset:"0 0",boundary:this._rowsView.element(),of:e},onPositioned:this._positionedHandler.bind(this)};return new zn(t,n)}},_hideFixedGroupCell:function(e,t){var i,n,r=this._rowsView.isFixedColumns(),a=this._editingController.isFormOrPopupEditMode();if(r&&!a){var o=e.closest(".dx-row").next().data("options");o&&o.rowType==="group"&&(i=v(this._rowsView.getRowElement(o.rowIndex)).last(),n=i.find("."+GQ),n.length&&n.get(0).style.visibility!=="hidden"&&(n.css("visibility","hidden"),t.onDisposing=function(){n.css("visibility","")}))}},_positionedHandler:function(e,t){if(!e.component.__skipPositionProcessing){var i=v(e.element).hasClass(this.addWidgetPrefix(Xd)),n=!i&&this._rowsView.updateFreeSpaceRowHeight(),r=this._normalizeValidationMessagePositionAndMaxWidth(e,i,t);e.component.__skipPositionProcessing=!!(n||r),r?e.component.option(r):n&&e.component.repaint()}},_showValidationMessage:function(e,t,i,n){var r=e.find(".dx-dropdowneditor-overlay").data("dxPopup"),a=r&&r.option("visible"),o=a?"top right":"top "+i,s=a?"top left":"bottom "+i,l=e.closest(".".concat(this.addWidgetPrefix(vE))),u="";t&&t.forEach(function(f){u+=(u.length?"<br/>":"")+Vg(f)});var d=this.addWidgetPrefix(_v);this._rowsView.element().find("."+d).remove();var c=v("<div>").addClass(MQ).addClass(VQ).addClass(d).html(u).appendTo(e),h={container:l,shading:!1,width:"auto",height:"auto",visible:!0,animation:!1,propagateOutsideClick:!0,hideOnOutsideClick:!1,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,position:{collision:"flip",boundary:this._rowsView.element(),boundaryOffset:"0 0",offset:{x:0,y:!a&&Bt.mozilla?-1:0},my:o,at:s,of:e},onPositioned:f=>{this._positionedHandler(f,a),this._shiftValidationMessageIfNeed(f.component.$content(),n&&n.$content(),e)}};this._hideFixedGroupCell(e,h),new zn(c,h)},_normalizeValidationMessagePositionAndMaxWidth:function(e,t,i){var n=this._columnsController.getFixedColumns();if(!(!n||!n.length)){var r,a=!t&&(o=this,s=e.element,l=v(s).closest("tr").index(),u=v(o._rowsView.getRowElement(l)).first().children().filter(":not(.dx-hidden-cell)"),o._rowsView._getWidths(u).reduce((g,m)=>g+m,0)),o,s,l,u,d=e.component.$content(),c=lt(d,!0),h=!t&&c>a,f=this._rowsView.getCellIndex(v(e.element).closest("td")),p=function(g){var m,C;return g.some((x,T)=>{if(x.command===UQ)return m=T===0?-1:T,C=T===g.length-1?-1:T+x.colspan-1,!0}),{startColumnIndex:m,endColumnIndex:C}}(n);return!t&&(f===p.startColumnIndex||h)?r={collision:"none flip",my:"top left",at:i?"top right":"bottom left"}:f===p.endColumnIndex&&(r={collision:"none flip",my:"top right",at:t||i?"top left":"bottom right"},t&&(r.offset="-1 0")),r&&{position:r,maxWidth:h?a-2:void 0}}},_shiftValidationMessageIfNeed:function(e,t,i){if(t){var n=e.offset(),r=t.offset();if(n.top===r.top&&n.left+$e(e)>r.left){var a=$e(t)+HQ;e.css("left",r.left<i.offset().left?-a:a)}}},_getTooltipsSelector:function(){var e=this.addWidgetPrefix(_v),t=this.addWidgetPrefix(Xd);return".dx-editor-cell ."+t+", .dx-editor-cell ."+e+", .dx-cell-modified ."+e},init:function(){this.callBase(),this._editingController=this.getController("editing"),this._columnsController=this.getController("columns"),this._rowsView=this.getView("rowsView")},loseFocus:function(e){e||this.getController("validating").setValidator(null),this.callBase()},updateCellState:function(e,t,i){var n,r=e==null?void 0:e.closest(this._getFocusCellSelector()),a=r!=null&&r.is("td")?r:null,o=r==null?void 0:r.closest(".dx-row").data("options"),s=o?this.getController("editing").getChangeByKey(o.key):null,l=a&&this.getController("columns").getVisibleColumns()[a.index()],u=(s==null||(n=s.data)===null||n===void 0?void 0:n[l==null?void 0:l.name])!==void 0&&!this._editingController.isSaving(),d;((t==null?void 0:t.status)===ln.invalid||u)&&this._editingController.getEditMode()===Ll&&(d=this._showRevertButton(r));var c=t&&t.status===ln.invalid;if(c&&a&&l&&t&&t.brokenRules){var h=[];t.brokenRules.forEach(function(f){f.message&&h.push(f.message)}),h.length&&this._showValidationMessage(r,h,l.alignment||"left",d)}!i&&this._rowsView.element()&&this._rowsView.updateFreeSpaceRowHeight()},focus:function(e,t){if(!arguments.length)return this.callBase();var i=e&&e.closest("."+this.addWidgetPrefix(FQ)).find(this._getTooltipsSelector());if(i&&i.remove(),e!=null&&e.hasClass("dx-row"))return this.callBase(e,t);var n=e==null?void 0:e.closest(this._getFocusCellSelector()),r=this.callBase,a=n&&(n.data("dxValidator")||e.find("."+this.addWidgetPrefix(Q1)).eq(0).data("dxValidator")),o=n&&n.closest(".dx-row").data("options"),s=this.getController("editing"),l=o?s.getChangeByKey(o.key):null,u,d=this.getController("validating");if(a){d.setValidator(a);var c=a.option("adapter").getValue();if(gE(c,o)||d._rowIsValidated(l))return s.waitForDeferredOperations().done(()=>{Ae(d.validateCell(a)).done(h=>{u=h;var f=u.validator.option("dataGetter")().column;l&&f&&!d.isCurrentValidatorProcessing({rowKey:l.key,columnIndex:f.index})||(u.status===ln.invalid&&(t=!0),this.updateCellState(e,u,t),r.call(this,e,t))})}),this.callBase(e,t)}return this.updateCellState(e,u,t),this.callBase(e,t)},getEditorInstance:function(e){var t=e.find(".dx-texteditor").eq(0);return xe.getWidgetInstance(t)}},data:{_isCellChanged:function(e,t,i,n,r){var a,o,s=(a=e.cells)===null||a===void 0?void 0:a[n],l=s&&s.validationStatus,u=this.getController("validating"),d=u.getCellValidationResult({rowKey:e.key,columnIndex:n}),c=u._getValidationData(e.key),h=Ml(d)?d.status:d,f=JSON.stringify(t.modifiedValues)!==JSON.stringify(e.modifiedValues),p=v(s==null?void 0:s.cellElement).hasClass(this.addWidgetPrefix(Z1)),g=e.isEditing!==t.isEditing,m=s==null||(o=s.column.validationRules)===null||o===void 0?void 0:o.length;return g&&m||l!==h&&f||c.isValid&&p?!0:this.callBase.apply(this,arguments)}}},views:{rowsView:{updateFreeSpaceRowHeight:function(e){var t,i,n,r=this.element(),a=r&&r.find("."+this.addWidgetPrefix(_v)+" .dx-overlay-content");if(this.callBase(e),a&&a.length&&(t=this._getRowElements(),n=this._getFreeSpaceRowElements(e),i=n.first(),i&&t.length===1&&(!i.is(":visible")||at(a)>at(i))))return n.show(),fn(n,at(a)),!0},_formItemPrepared:function(e,t){this.callBase.apply(this,arguments),Bi(()=>{var i=t.find(".dx-widget").first(),n=i.length&&!i.children().length;n||this.getController("validating").createValidator(e,i)})},_cellPrepared:function(e,t){this.getController("editing").isFormOrPopupEditMode()||this.getController("validating").createValidator(t,e),this.callBase.apply(this,arguments)},_restoreErrorRow:function(e){var t=this.getController("editing");t&&t.hasChanges()&&this._getRowElements(e).each((i,n)=>{var r=v(n).data("options");if(r){var a=t.getChangeByKey(r.key);a&&t._showErrorRow(a)}})}}}}};De.registerModule("validating",qQ);var Cv="scrolling.legacyMode",eR=e=>e.option("scrolling.loadTwoPagesOnStart")||e._controller.isVirtual()||e._controller.getViewportItemIndex()>0,Dc=e=>e._cache.length?e._cache[0].pageIndex:-1,ug=e=>e._cache.length?e._cache[e._cache.length-1].pageIndex:-1,vh=(e,t,i)=>{e._isChangedFiring=!0,t(i),e._isChangedFiring=!1},mE=(e,t,i)=>{if(e._isDelayChanged)return e._isDelayChanged=!1,vh(e,t,i),!0},YQ=e=>{var t=e._dataOptions.pageSize(),i=e.option("scrolling.preventPreload");if(i)return 0;var n=e._controller.viewportSize();if(e._controller.isVirtualMode()&&e.option("scrolling.removeInvisiblePages")){n=0;for(var r=e._controller.viewportSize()*e._controller.viewportItemSize(),a=e._controller.getContentOffset(),o=e._controller.getViewportPosition(),s=e._controller.virtualItemsCount(),l=e._dataOptions.totalItemsCount(),u=s.begin;u<l&&!(a>=o+r);u++){var d=e._controller.getItemSizes()[u]||e._controller.viewportItemSize();a+=d,a>=o&&n++}}return t&&n>0?Math.ceil(n/t):1},Oc=(e,t)=>{var i=e.option("scrolling.preloadEnabled"),n=YQ(e),r=e._controller.isAppendMode();return n&&(t?n=i?1:0:(i&&n++,(r||!eR(e))&&n--)),n},XQ=e=>{var t=-1,i=Dc(e),n=e._dataOptions;if(i<0)t=e._pageIndex;else if(!e._cache[e._pageIndex-i])t=e._pageIndex;else if(i>=0&&e._controller.viewportSize()>=0){if(i>0){var r=ug(e)+1===n.pageCount()&&e._cache.length<Oc(e)+1,a=r||e._pageIndex===i&&Oc(e,!0);a&&(t=i-1)}if(t<0){var o=i+e._cache.length<=e._pageIndex+Oc(e);o&&(t=i+e._cache.length)}}return e._loadingPageIndexes[t]&&(t=-1),t},ZQ=(e,t)=>{var i=e._dataOptions;if(t===e.pageIndex()||!i.isLoading()&&t<i.pageCount()||!i.hasKnownLastPage()&&t===i.pageCount())return i.pageIndex(t),e._loadingPageIndexes[t]=!0,Ae(i.load()).always(()=>{e._loadingPageIndexes[t]=!1})},CE=(e,t,i,n,r)=>{var a=e._dataOptions,o=a.items().slice(),s=He(i)?i:void 0,l=i==="prepend",u=a.viewportItems();i&&Me(i)&&!e._isDelayChanged&&(s={changeType:i,items:o},r&&(s.removeCount=r.itemsCount,s.removeCount&&a.correctCount&&(s.removeCount=a.correctCount(u,s.removeCount,l))));var d=r?r.itemsLength:0;d&&a.correctCount&&(d=a.correctCount(u,d,l)),i==="append"?(u.push.apply(u,o),r&&u.splice(0,d)):l?(u.unshift.apply(u,o),r&&u.splice(-d)):e._dataOptions.viewportItems(o),a.updateLoading(),e._lastPageIndex=e.pageIndex(),e._isDelayChanged=n,n||vh(e,t,s)};class QQ{constructor(t,i){this._controller=t,this._dataOptions=i,this._pageIndex=this._lastPageIndex=i.pageIndex(),this._cache=[],this._loadingPageIndexes={}}option(){return this._controller.option.apply(this._controller,arguments)}viewportItemIndexChanged(t){var i=this._dataOptions.pageSize(),n=this._dataOptions.pageCount(),r=this._controller.isVirtualMode(),a=this._controller.isAppendMode(),o=this._dataOptions.totalItemsCount(),s;if(i&&(r||a)&&o>=0){var l=this._controller.viewportSize();if(l&&t+l>=o&&!this._controller.isVirtual())if(this._dataOptions.hasKnownLastPage()){s=n-1;var u=o%i;s>0&&u>0&&u<l&&s--}else s=n;else{s=Math.floor(t/i);var d=n-1;s=Math.max(s,0),s=Math.min(s,d)}return this.pageIndex(s),this.load()}}pageIndex(t){var i=this._controller.isVirtualMode(),n=this._controller.isAppendMode();return this.option(Cv)!==!1&&(i||n)?(t!==void 0&&(this._pageIndex=t),this._pageIndex):this._dataOptions.pageIndex(t)}beginPageIndex(t){var i=Dc(this);return i<0&&(i=t!==void 0?t:this.pageIndex()),i}endPageIndex(){var t=ug(this);return t>0?t:this._lastPageIndex}pageSize(){return this._dataOptions.pageSize()}load(){var t=this._dataOptions,i,n=this._controller.isVirtualMode(),r=this._controller.isAppendMode();if(this.option(Cv)!==!1&&(n||r)){var a=XQ(this);if(a>=0){var o=ZQ(this,a);o&&(i=new te,o.done(()=>{var s=this._delayDeferred;s?s.done(i.resolve).fail(i.reject):i.resolve()}).fail(i.reject),t.updateLoading())}}else i=t.load();return!i&&this._lastPageIndex!==this.pageIndex()&&this._dataOptions.onChanged({changeType:"pageIndex"}),i||new te().resolve()}loadIfNeed(){var t=this._controller.isVirtualMode(),i=this._controller.isAppendMode();if((t||i)&&!this._dataOptions.isLoading()&&(!this._isChangedFiring||this._controller.isVirtual())){var n=this._controller.getViewportPosition();n>0?this._controller._setViewportPositionCore(n):this.load()}}handleDataChanged(t,i){var n=this._dataOptions,r=this._cache.length,a,o,s=this._controller.isVirtualMode(),l=this._controller.isAppendMode();if(i&&i.changes)vh(this,t,i);else if(this.option(Cv)!==!1&&(s||l)){var u=Dc(this);if(u>=0&&(s&&u+this._cache.length!==n.pageIndex()&&u-1!==n.pageIndex()&&(r=0,this._cache=[]),l)){if(n.pageIndex()===0)this._cache=[];else if(n.pageIndex()<ug(this)){vh(this,t,{changeType:"append",items:[]});return}}var d={pageIndex:n.pageIndex(),itemsLength:n.items(!0).length,itemsCount:this.itemsCount(!0)};this.option("scrolling.removeInvisiblePages")&&s?o=this._cache.length>Math.max(Oc(this)+(this.option("scrolling.preloadEnabled")?1:0),2):mE(this,t,{isDelayed:!0});var c;u===n.pageIndex()+1?(o&&(c=this._cache.pop()),a="prepend",this._cache.unshift(d)):(o&&(c=this._cache.shift()),a="append",this._cache.push(d));var h=s&&r===0&&eR(this);CE(this,t,this._cache.length>1?a:void 0,h,c),this._delayDeferred=this.load().done(()=>{mE(this,t)&&this.load()})}else CE(this,t,i)}getDelayDeferred(){return this._delayDeferred}itemsCount(t){var i=0,n=this._controller.isVirtualMode();return!t&&n?this._cache.forEach(r=>{i+=r.itemsCount}):i=this._dataOptions.itemsCount(),i}virtualItemsCount(){var t=Dc(this);t<0&&(t=this._dataOptions.pageIndex());var i=t*this._dataOptions.pageSize(),n=this._cache.length*this._dataOptions.pageSize(),r=Math.max(0,this._dataOptions.totalItemsCount()-n-i);return{begin:i,end:r}}reset(){this._loadingPageIndexes={},this._cache=[]}}var JQ="infinite",tR="virtual",Zd="scrolling.legacyMode",yE=e=>e.option("scrolling.mode")===tR||e._isVirtual,eJ=e=>e.option("scrolling.mode")===JQ&&!e._isVirtual;function iR(e,t,i){var n,r=[],a=[];i=i||e;function o(u){var d=u.element?u.$element():u,c=mi.offset(d);return c?u.scrollTop()-(c.top-e.offset().top):e.offset().top}var s={on:function(u,d,c){u.on("scroll",c)},off:function(u,d,c){u.off("scroll",c)}};function l(u){var d=u.get(0).nodeName==="#document",c=u.data("dxScrollable"),h=s;if(!(!c&&(c=d&&v(qe())||u.css("overflowY")==="auto"&&u,h=D,!c))){var f=function(p){return function(){var g=p.scrollTop()-o(p);g=g>0?g:0,t(g)}}(c);h.on(c,"scroll",f),r.push(function(p){var g=o(c),m=c.scrollTo?"scrollTo":"scrollTop";p-g>=0&&c[m](p+g)}),a.push(function(){h.off(c,"scroll",f)})}}for(n=i.parent();n.length;n=n.parent())l(n);return{scrollTo:function(u){F(r,function(d,c){c(u)})},dispose:function(){F(a,function(u,d){d()})}}}var nR=nt.inherit(function(){var e={ctor:function(t,i,n){this._dataOptions=i,this.component=t,this._viewportSize=t.option(Zd)===!1?15:0,this._viewportItemSize=20,this._viewportItemIndex=0,this._position=0,this._isScrollingBack=!1,this._contentSize=0,this._itemSizes={},this._sizeRatio=1,this._isVirtual=n,this.positionChanged=dt(),this._dataLoader=new QQ(this,this._dataOptions)},getItemSizes:function(){return this._itemSizes},option:function(){return this.component.option.apply(this.component,arguments)},isVirtual:function(){return this._isVirtual},virtualItemsCount:function(){if(yE(this)){var t=this._dataOptions,i=t.totalItemsCount();if(this.option(Zd)===!1&&i!==-1){var n=this.getViewportParams(),r=t.loadedOffset(),a=t.loadedItemCount(),o=Math.max(n.skip,r),s=Math.min(n.take,a),l=Math.max(i-(o+s),0);return{begin:o,end:l}}return this._dataLoader.virtualItemsCount.apply(this._dataLoader,arguments)}},getScrollingTimeout:function(){var t=this.option("scrolling.renderAsync"),i=0;if(!E(t))i=Math.min(this.option("scrolling.timeout")||0,this._dataOptions.changingDuration()),i<this.option("scrolling.renderingThreshold")&&(i=this.option("scrolling.minTimeout")||0);else if(t){var n;i=(n=this.option("scrolling.timeout"))!==null&&n!==void 0?n:0}return i},setViewportPosition:function(t){var i=new te,n=this.getScrollingTimeout();return clearTimeout(this._scrollTimeoutID),n>0?this._scrollTimeoutID=setTimeout(()=>{this._setViewportPositionCore(t),i.resolve()},n):(this._setViewportPositionCore(t),i.resolve()),i.promise()},getViewportPosition:function(){return this._position},getItemIndexByPosition:function(t){var i;t=(i=t)!==null&&i!==void 0?i:this._position;for(var n=this.getItemSize(),r=0,a=0,o=Object.keys(this._itemSizes).concat(-1),s=0;s<o.length&&r<t;s++){var l=parseInt(o[s]),u=(t-r)/n;if(l<0||a+u<l){a+=u;break}else u=l-a,r+=u*n,a+=u;var d=this._itemSizes[l];r+=d,a+=r<t?1:(t-r+d)/d}return Math.round(50*a)/50},isScrollingBack:function(){return this._isScrollingBack},_setViewportPositionCore:function(t){var i=this._position||0;this._position=t,i!==this._position&&(this._isScrollingBack=this._position<i);var n=this.getItemIndexByPosition(),r=this.setViewportItemIndex(n);return this.positionChanged.fire(),r},setContentItemSizes:function(t){var i=this.virtualItemsCount();if(this._contentSize=t.reduce((a,o)=>a+o,0),i){t.forEach((a,o)=>{this._itemSizes[i.begin+o]=a});var n=(i.begin+i.end+this.itemsCount())*this._viewportItemSize,r=xe.getContentHeightLimit(Bt);n>r?this._sizeRatio=r/n:this._sizeRatio=1}},getItemSize:function(){return this._viewportItemSize*this._sizeRatio},getItemOffset:function(t,i){var n=this.virtualItemsCount(),r=t;if(!n)return 0;var a=0,o=this._dataOptions.totalItemsCount();return Object.keys(this._itemSizes).forEach(s=>{r&&(i?s>=o-t:s<t)&&(a+=this._itemSizes[s],r--)}),Math.floor(a+r*this._viewportItemSize*this._sizeRatio)},getContentOffset:function(t){var i=t==="end",n=this.virtualItemsCount();return n?this.getItemOffset(i?n.end:n.begin,i):0},getVirtualContentSize:function(){var t=this.virtualItemsCount();return t?this.getContentOffset("begin")+this.getContentOffset("end")+this._contentSize:0},getViewportItemIndex:function(){return this._viewportItemIndex},setViewportItemIndex:function(t){if(this._viewportItemIndex=t,this.option(Zd)!==!1)return this._dataLoader.viewportItemIndexChanged.apply(this._dataLoader,arguments)},viewportItemSize:function(t){return t!==void 0&&(this._viewportItemSize=t),this._viewportItemSize},viewportSize:function(t){return t!==void 0&&(this._viewportSize=t),this._viewportSize},viewportHeight:function(t){var i=this.getItemIndexByPosition(),n=this.getItemIndexByPosition(this._position+t);this.viewportSize(Math.ceil(n-i)),this._viewportItemIndex!==i&&this._setViewportPositionCore(this._position)},reset:function(t){this._dataLoader.reset(),t||(this._itemSizes={})},subscribeToWindowScrollEvents:function(t){this._windowScroll=this._windowScroll||iR(t,i=>{this.viewportItemSize()&&this.setViewportPosition(i)})},dispose:function(){clearTimeout(this._scrollTimeoutID),this._windowScroll&&this._windowScroll.dispose(),this._windowScroll=null},scrollTo:function(t){this._windowScroll&&this._windowScroll.scrollTo(t)},isVirtualMode:function(){return yE(this)},isAppendMode:function(){return eJ(this)},getViewportParams:function(){var t,i=this.option("scrolling.mode")===tR,n=this._dataOptions.totalItemsCount(),r=this._dataOptions.hasKnownLastPage(),a=r&&this._viewportItemIndex>n?n:this._viewportItemIndex,o=this._viewportSize+a,s=this.option("scrolling.prerenderedRowChunkSize")||1,l=this.isScrollingBack(),u=(t=this.option("scrolling.prerenderedRowCount"))!==null&&t!==void 0?t:1,d=l?u:0,c=l?0:u,h=Math.floor(Math.max(0,a-d)/s)*s,f=Math.ceil((o+c-h)/s)*s;if(i){var p=Math.max(0,n-h);f=Math.min(f,p)}return{skip:h,take:f}},itemsCount:function(){var t=0;return this.option(Zd)?t=this._dataLoader.itemsCount.apply(this._dataLoader,arguments):t=this._dataOptions.itemsCount(),t}};return["pageIndex","beginPageIndex","endPageIndex","pageSize","load","loadIfNeed","handleDataChanged","getDelayDeferred"].forEach(function(t){e[t]=function(){return this._dataLoader[t].apply(this._dataLoader,arguments)}}),e}()),xE="bottom-load-panel",tJ="table-content",iJ="group-space",nJ="content",bE="dx-freespace-row",rJ="dx-column-lines",Qd="dx-virtual-row",aJ="dx-row-inserted",oJ="infinite",sJ="virtual",rR=300,st="scrolling.legacyMode",yv="paging.pageIndex",Ji=function(e){return e.option("scrolling.mode")===sJ},sr=function(e){return e.option("scrolling.mode")===oJ},Yn=function(e){return Ji(e)||sr(e)},SE=function(e,t,i,n){for(var r=0;r<t+1;r++){var a=e[i?e.length-1-r:r];a&&!n(a,r===t,i)&&t++}return t},Rc=function(e,t){return e.rowType==="data"&&!e.isNewRow||e.rowType==="group"&&t.isGroupItemCountable(e.data)},lJ=function(e){return e.forEach(function(t,i){t.rowIndex=i}),e},uJ=function(){var e=function(i){var n=i._virtualScrollController.beginPageIndex(-1);Ji(i)&&(n<0||i.viewportSize()>=0&&i.getViewportItemIndex()>=0&&(n*i.pageSize()>i.getViewportItemIndex()||n*i.pageSize()+i.itemsCount()<i.getViewportItemIndex()+i.viewportSize())&&i._dataSource.isLoading()?i._isLoading||(i._isLoading=!0,i.loadingChanged.fire(!0)):i._isLoading&&(i._isLoading=!1,i.loadingChanged.fire(!1)))},t={init:function(){this.callBase.apply(this,arguments),this._items=[],this._totalCount=-1,this._isLoaded=!0,this._loadPageCount=1,this._virtualScrollController=new nR(this.component,this._getVirtualScrollDataOptions())},_getVirtualScrollDataOptions:function(){var i=this;return{pageSize:function(){return i.pageSize()},totalItemsCount:function(){return i.totalItemsCount()},hasKnownLastPage:function(){return i.hasKnownLastPage()},pageIndex:function(n){return i._dataSource.pageIndex(n)},isLoading:function(){return i._dataSource.isLoading()&&!i.isCustomLoading()},pageCount:function(){return i.pageCount()},load:function(){return i._dataSource.load()},updateLoading:function(){e(i)},itemsCount:function(){return i.itemsCount(!0)},items:function(){return i._dataSource.items()},viewportItems:function(n){return n&&(i._items=n),i._items},onChanged:function(n){i.changed.fire(n)},changingDuration:function(n){return i.isLoading()?rR:i._renderTime||0}}},_handleLoadingChanged:function(i){if(this.option(st)===!1){this.callBase.apply(this,arguments);return}(!Ji(this)||this._isLoadingAll)&&(this._isLoading=i,this.callBase.apply(this,arguments)),i?this._startLoadTime=new Date:this._startLoadTime=void 0},_handleLoadError:function(){this.option(st)!==!1&&(this._isLoading=!1,this.loadingChanged.fire(!1)),this.callBase.apply(this,arguments)},_handleDataChanged:function(i){if(this.option(st)===!1){this._items=this._dataSource.items().slice(),this._totalCount=this._dataSourceTotalCount(!0),this.callBase.apply(this,arguments);return}var n=this.callBase.bind(this);this._virtualScrollController.handleDataChanged(n,i)},_customizeRemoteOperations:function(i,n){var r=this.option(st)===!1,a=this.option("scrolling.renderAsync");E(a)||(a=this._renderTime>=this.option("scrolling.renderingThreshold")),(Ji(this)||sr(this)&&r)&&!n.reload&&(n.skip||r)&&!a&&(i.delay=void 0),this.callBase.apply(this,arguments)},items:function(){return this._items},_dataSourceTotalCount:function(i){return this.option(st)===!1&&Ji(this)&&!i?this._totalCount:this.callBase()},itemsCount:function(i){return i||this.option(st)===!1?this.callBase():this._virtualScrollController.itemsCount()},load:function(i){return this.option(st)===!1||i?this.callBase(i):this._virtualScrollController.load()},isLoading:function(){return this.option(st)===!1?this._dataSource.isLoading():this._isLoading},isLoaded:function(){return this._dataSource.isLoaded()&&this._isLoaded},resetPagesCache:function(i){i||this._virtualScrollController.reset(!0),this.callBase.apply(this,arguments)},_changeRowExpandCore:function(){var i=this.callBase.apply(this,arguments);return this.option(st)===!1||(this.resetPagesCache(),e(this)),i},reload:function(){this._dataSource.pageIndex(this.pageIndex());var i=this._virtualScrollController;if(this.option(st)!==!1&&i){var n=new te;return this.callBase.apply(this,arguments).done(function(r){var a=i.getDelayDeferred();a?a.done(n.resolve).fail(n.reject):n.resolve(r)}).fail(n.reject),n}else return this.callBase.apply(this,arguments)},refresh:function(i,n){if(this.option(st)!==!1){var r=i.storeLoadOptions,a=this._dataSource;n.reload?(this._virtualScrollController.reset(),a.items().length=0,this._isLoaded=!1,e(this),this._isLoaded=!0,sr(this)?(this.pageIndex(0),a.pageIndex(0),r.pageIndex=0,i.pageIndex=0,r.skip=0):(a.pageIndex(this.pageIndex()),a.paginate()&&(i.pageIndex=this.pageIndex(),r.skip=this.pageIndex()*this.pageSize()))):sr(this)&&r.skip&&this._totalCountCorrection<0&&(r.skip+=this._totalCountCorrection)}return this.callBase.apply(this,arguments)},dispose:function(){this._virtualScrollController.dispose(),this.callBase.apply(this,arguments)},loadPageCount:function(i){if(!E(i))return this._loadPageCount;this._loadPageCount=i},_handleDataLoading:function(i){var n=this.loadPageCount(),r=this.pageSize(),a=this.option(st)===!1,o=i.storeLoadOptions,s=E(o.take);i.loadPageCount=n,!i.isCustomLoading&&a&&s&&n>1&&r>0&&(o.take=n*r),this.callBase.apply(this,arguments)},_loadPageSize:function(){return this.callBase.apply(this,arguments)*this.loadPageCount()}};return["beginPageIndex","endPageIndex","pageIndex"].forEach(function(i){t[i]=function(){if(this.option(st)===!1){var n=this._dataSource;return n.pageIndex.apply(n,arguments)}var r=this._virtualScrollController;return r[i].apply(r,arguments)}}),["virtualItemsCount","getContentOffset","getVirtualContentSize","setContentItemSizes","setViewportPosition","getViewportItemIndex","setViewportItemIndex","getItemIndexByPosition","viewportSize","viewportItemSize","getItemSize","getItemSizes","loadIfNeed"].forEach(function(i){t[i]=function(){var n=this._virtualScrollController;return n[i].apply(n,arguments)}}),t}(),dJ=function(){var e=function(t,i){var n=t.toArray().map(o=>v(o).parent("."+i).get(0)).filter(o=>o);n.length&&(t=v(n));for(var r=i===bE?t.length-1:t.length,a=0;a<r;a++)t.eq(a).remove()};return{init:function(){var t,i=this.getController("data");this.callBase(),i.pageChanged.add(n=>{var r=this._scrollTop;this.scrollToPage(n??i.pageIndex()),this.option(st)===!1&&this._scrollTop===r&&i.updateViewport()}),i.dataSourceChanged.add(()=>{!this._scrollTop&&this._scrollToCurrentPageOnResize()}),(t=i.stateLoaded)===null||t===void 0||t.add(()=>{this._scrollToCurrentPageOnResize()}),this._scrollToCurrentPageOnResize()},_scrollToCurrentPageOnResize:function(){var t=this.getController("data");if(t.pageIndex()>0){var i=()=>{this.resizeCompleted.remove(i),this.scrollToPage(t.pageIndex())};this.resizeCompleted.add(i)}},scrollToPage:function(t){var i=this._dataController,n=i?i.pageSize():0,r;if(Ji(this)||sr(this)){var a=i.getItemSize(),o=i.getItemSizes(),s=t*n;r=s*a;for(var l in o)l<s&&(r+=o[l]-a)}else r=0;this.scrollTo({y:r,x:this._scrollLeft})},renderDelayedTemplates:function(t){this._updateContentPosition(!0),this.callBase.apply(this,arguments)},_renderCore:function(t){var i=new Date;this.callBase.apply(this,arguments);var n=this._dataController._dataSource;if(n&&t){var r=t.items?t.items.length:20,a=this._dataController.viewportSize()||20;xe.isVirtualRowRendering(this)&&r>0&&this.option(st)!==!1?n._renderTime=(new Date-i)*a/r:n._renderTime=new Date-i}},_getRowElements:function(t){var i=this.callBase(t);return i&&i.not("."+Qd)},_removeRowsElements:function(t,i,n){var r=this._getRowElements(t).toArray();n==="append"?r=r.slice(0,i):r=r.slice(-i);var a=this.getController("errorHandling");r.map(o=>{var s=v(o);a&&a.removeErrorRow(s.next()),s.remove()})},_updateContent:function(t,i){var n,r=this._findContentElement(),a=i&&i.changeType,o=r.children().first();if(a==="append"||a==="prepend"){var s=this._getBodies(t);s.length===1?this._getBodies(o)[a==="append"?"append":"prepend"](s.children()):s[a==="append"?"appendTo":"prependTo"](o),t.remove(),n=this._getFreeSpaceRowElements(o),e(n,bE),i.removeCount&&this._removeRowsElements(o,i.removeCount,a),this._restoreErrorRow(o)}else this.callBase.apply(this,arguments),a==="update"&&this._restoreErrorRow(o);this._updateBottomLoading()},_addVirtualRow:function(t,i,n,r){if(r){var a=this._createEmptyRow(Qd,i,r);a=this._wrapRowIfNeed(t,a),this._appendEmptyRow(t,a,n)}},_getRowHeights:function(){var t,i,n=(t=this.getController("editing"))===null||t===void 0||(i=t.isPopupEditMode)===null||i===void 0?void 0:i.call(t),r=this._getRowElements(this._tableElement).toArray();return n&&(r=r.filter(a=>!v(a).hasClass(aJ))),r.map(a=>Gt(a).height)},_correctRowHeights:function(t){for(var i=this._dataController,n=i._dataSource,r=[],a=i.getVisibleRows(),o=0,s=!0,l=-1,u=0;u<t.length;u++){var d=a[u];E(d)&&(this.option(st)===!1?(l>=0&&l!==d.loadIndex&&(r.push(o),o=0),l=d.loadIndex):Rc(d,n)&&(s?s=!1:(r.push(o),o=0)),o+=t[u])}return o>0&&r.push(o),r},_updateContentPosition:function(t){var i=this._dataController,n=this._rowHeight||20;if(i.viewportItemSize(n),Ji(this)||xe.isVirtualRowRendering(this)){if(!t){var r=this._getRowHeights(),a=this._correctRowHeights(r);i.setContentItemSizes(a)}var o=i.getContentOffset("begin"),s=i.getContentOffset("end"),l=this.getTableElements(),u=l.children("tbody").children("."+Qd);e(u,Qd),l.each((d,c)=>{var h=d>0,f=this._isFixedTableRendering;this._isFixedTableRendering=h,this._addVirtualRow(v(c),h,"top",o),this._addVirtualRow(v(c),h,"bottom",s),this._isFixedTableRendering=f})}},_isTableLinesDisplaysCorrect:function(t){var i=t.find("."+rJ).length>0;return i===this.option("showColumnLines")},_isColumnElementsEqual:function(t,i){var n=t.length===i.length;return n&&F(t,function(r,a){if(a.style.width!==i[r].style.width)return n=!1,n}),n},_getCellClasses:function(t){var i=[],n=t.cssClass,r=t.command==="expand";return n&&i.push(n),r&&i.push(this.addWidgetPrefix(iJ)),i},_findBottomLoadPanel:function(t){var i=t||this.element(),n=i&&i.find("."+this.addWidgetPrefix(xE));if(n&&n.length)return n},_updateBottomLoading:function(){var t=Ji(this),i=sr(this),n=!this._dataController.hasKnownLastPage()&&this._dataController.isLoaded()&&(t||i),r=this._findContentElement(),a=this._findBottomLoadPanel(r);n?a||v("<div>").addClass(this.addWidgetPrefix(xE)).append(this._createComponent(v("<div>"),dn).$element()).appendTo(r):a&&a.remove()},_handleScroll:function(t){var i=this.option(st)===!0,n=t.scrollOffset.top===0;(this._hasHeight||!i&&n)&&this._rowHeight&&(this._scrollTop=t.scrollOffset.top,this._dataController.setViewportPosition(t.scrollOffset.top)),this.callBase.apply(this,arguments)},_needUpdateRowHeight:function(t){return this.callBase.apply(this,arguments)||t>0&&sr(this)&&!xe.isVirtualRowRendering(this)},_updateRowHeight:function(){if(this.callBase.apply(this,arguments),this._rowHeight){this._updateContentPosition();var t=this._hasHeight?at(this.element()):at(qe()),i=this._dataController;this.option(st)===!1?(i.viewportHeight(t),i.updateViewport()):i.viewportSize(Math.ceil(t/this._rowHeight))}},updateFreeSpaceRowHeight:function(){var t=this.callBase.apply(this,arguments);return t&&this._updateContentPosition(),t},setLoading:function(t,i){var n=this._dataController,r=n.pageIndex()>0&&n.isLoaded()&&!!this._findBottomLoadPanel();this.option(st)===!1&&t&&n.isViewportChanging()||(r&&(t=!1),this.callBase.call(this,t,i))},_resizeCore:function(){var t=this,i=t.element();t.callBase(),t.component.$element()&&!t._windowScroll&&i.closest(qe().document).length&&(t._windowScroll=iR(i,function(n){!t._hasHeight&&t._rowHeight&&t._dataController.setViewportPosition(n)},t.component.$element()),t.on("disposing",function(){t._windowScroll.dispose()})),this.option(st)!==!1&&t.loadIfNeed()},loadIfNeed:function(){var t,i=this._dataController;i==null||(t=i.loadIfNeed)===null||t===void 0||t.call(i)},setColumnWidths:function(t){var i=this.getScrollable(),n;this.callBase.apply(this,arguments),this.option("scrolling.mode")==="virtual"&&(n=i?v(i.content()):this.element(),this.callBase(t,n.children("."+this.addWidgetPrefix(nJ)).children(":not(."+this.addWidgetPrefix(tJ)+")")))},_restoreErrorRow:function(){if(this.option(st)===!1){var t=this.getController("errorHandling");t==null||t.removeErrorRow()}this.callBase.apply(this,arguments)},dispose:function(){clearTimeout(this._scrollTimeoutID),this.callBase()}}}(),aR={defaultOptions:function(){return{scrolling:{timeout:300,updateTimeout:300,minTimeout:0,renderingThreshold:100,removeInvisiblePages:!0,rowPageSize:5,prerenderedRowChunkSize:1,mode:"standard",preloadEnabled:!1,rowRenderingMode:"standard",loadTwoPagesOnStart:!1,legacyMode:!1,prerenderedRowCount:1}}},extenders:{dataSourceAdapter:uJ,controllers:{data:function(){var e={_refreshDataSource:function(){var t=this.callBase.apply(this,arguments)||new te().resolve().promise();return t.done(this.initVirtualRows.bind(this)),t},_loadDataSource:function(){if(this._rowsScrollController&&Yn(this)){var t,i,{loadPageCount:n}=(t=this.getLoadPageParams())!==null&&t!==void 0?t:{};n>=1&&((i=this._dataSource)===null||i===void 0||i.loadPageCount(n))}return this.callBase.apply(this,arguments)},getRowPageSize:function(){var t=this.option("scrolling.rowPageSize"),i=this.pageSize();return i&&i<t?i:t},reload:function(){var t=this._rowsScrollController||this._dataSource,i=t&&t.getItemIndexByPosition(),n=this.callBase.apply(this,arguments);return n&&n.done(()=>{if(Ji(this)||xe.isVirtualRowRendering(this)){var r=this.getRowIndexOffset(),a=Math.floor(i)-r,o=this.component,s=o.getScrollable&&o.getScrollable(),l=this.dataSource().operationTypes().sorting;if(s&&!l&&a>=0){var u=o.getRowElement(a),d=u&&u[0]&&v(u[0]),c=d&&d.position().top,h=Bt.chrome&&Bt.version>=91,f=Bt.mozilla||h?1:0;c>f&&(c=Math.round(c+at(d)*(i%1)),s.scrollTo({y:c}))}}})},initVirtualRows:function(){var t=xe.isVirtualRowRendering(this);if(this._allItems=null,this._loadViewportParams=null,this.option("scrolling.mode")!=="virtual"&&t!==!0||t===!1||this.option(st)!==!1&&!this.option("scrolling.rowPageSize")){this._visibleItems=null,this._rowsScrollController=null;return}var i=!Ji(this)&&this.pageIndex()>=this.pageCount()?this.pageCount()-1:this.pageIndex();this._rowPageIndex=Math.ceil(i*this.pageSize()/this.getRowPageSize()),this._visibleItems=this.option(st)===!1?null:[],this._viewportChanging=!1,this._needUpdateViewportAfterLoading=!1,this._rowsScrollController||(this._rowsScrollController=new nR(this.component,this._getRowsScrollDataOptions(),!0),this._rowsScrollController.positionChanged.add(()=>{var n;if(this.option(st)===!1){this._viewportChanging=!0,this.loadViewport(),this._viewportChanging=!1;return}(n=this._dataSource)===null||n===void 0||n.setViewportItemIndex(this._rowsScrollController.getViewportItemIndex())})),this.option(st)===!1&&this._updateLoadViewportParams(),this.isLoaded()&&this.option(st)!==!1&&this._rowsScrollController.load()},isViewportChanging:function(){return this._viewportChanging},_getRowsScrollDataOptions:function(){var t=this,i=function(n){return Rc(n,t._dataSource)};return{pageSize:function(){return t.getRowPageSize()},loadedOffset:function(){var n;return Ji(t)&&((n=t._dataSource)===null||n===void 0?void 0:n.lastLoadOptions().skip)||0},loadedItemCount:function(){return t._itemCount},totalItemsCount:function(){return Yn(t)?t.totalItemsCount():t.option(st)===!1?t._itemCount:t._items.filter(i).length},hasKnownLastPage:function(){return t.option(st)===!1?t.hasKnownLastPage():!0},pageIndex:function(n){return n!==void 0&&(t._rowPageIndex=n),t._rowPageIndex},isLoading:function(){return t.isLoading()},pageCount:function(){var n=Math.ceil(this.totalItemsCount()/this.pageSize());return n||1},load:function(){t._rowsScrollController.pageIndex()>=this.pageCount()&&(t._rowPageIndex=this.pageCount()-1,t._rowsScrollController.pageIndex(t._rowPageIndex)),!(!this.items().length&&this.totalItemsCount())&&t._rowsScrollController.handleDataChanged(n=>{n=n||{},n.changeType=n.changeType||"refresh",n.items=n.items||t._visibleItems,t._visibleItems.forEach((r,a)=>{r.rowIndex=a}),t._fireChanged(n)})},updateLoading:function(){},itemsCount:function(){return this.items(!0).length},correctCount:function(n,r,a){return SE(n,r,a,(o,s,l)=>o.isNewRow?s&&!l:s&&l?!o.isNewRow:i(o))},items:function(n){var r=t._items;if(t.option(st)){var a=t.dataSource(),o=a==null?void 0:a.virtualItemsCount(),s=o?o.begin:0,l=t.getRowPageSize(),u=t._rowPageIndex*l-s,d=l;if(u<0)return[];u&&(u=this.correctCount(r,u),r=r.slice(u)),d&&(d=this.correctCount(r,d),r=r.slice(0,d))}return n?r.filter(i):r},viewportItems:function(n){return n&&t.option(st)!==!1&&(t._visibleItems=n),t._visibleItems},onChanged:function(){},changingDuration:function(n){var r=t.dataSource();return r!=null&&r.isLoading()&&t.option(st)!==!1?rR:(r==null?void 0:r._renderTime)||0}}},_updateItemsCore:function(t){var i=this.getRowIndexDelta();if(this.callBase.apply(this,arguments),this.option(st)===!1&&xe.isVirtualRowRendering(this)){t.changeType==="update"&&t.rowIndices.length===0&&t.cancelEmptyChanges&&(t.cancel=!0);return}var n=this._rowsScrollController;if(n){var r=this._visibleItems,a=t.changeType==="refresh"||t.isLiveUpdate;if(t.changeType==="append"&&t.items&&!t.items.length)return;a||t.changeType==="append"||t.changeType==="prepend"?(t.cancel=!0,a&&n.reset(!0),n.load()):(t.changeType==="update"?t.rowIndices.forEach((o,s)=>{var l=t.changeTypes[s],u=t.items[s];l==="update"?r[o]=u:l==="insert"?r.splice(o,0,u):l==="remove"&&r.splice(o,1)}):(r.forEach((o,s)=>{r[s]=this._items[s+i]||r[s]}),t.items=r),lJ(r))}},_updateLoadViewportParams:function(){var t=this._rowsScrollController.getViewportParams(),i=this.pageSize();if(t&&!Yn(this)&&i>0){var n=this.pageIndex()*i;t.skip+=n}this._loadViewportParams=t},_processItems:function(t){var i=this.callBase.apply(this,arguments);if(this.option(st)===!1){var n,r=this._dataSource,a=(n=r==null?void 0:r.lastLoadOptions().skip)!==null&&n!==void 0?n:0,o,s,l,u=!1;i.forEach(d=>{var c=d.rowType,h=Rc(d,r),f=c==="group"&&(o||h||s!=="group"&&a>0),p=c==="data"&&h&&(o||s!=="group");if(!d.isNewRow&&E(o)){var g=l&&!u;(f||p)&&!g&&a++}(f||p)&&(u=!0),d.loadIndex=a,o=h,s=c,l=d.isNewRow})}return i},_afterProcessItems:function(t){if(this._itemCount=t.filter(o=>Rc(o,this._dataSource)).length,E(this._loadViewportParams)){this._updateLoadViewportParams();var i=t;if(this._allItems=t,t.length){var{skipForCurrentPage:n}=this.getLoadPageParams(!0),r=t[0].loadIndex+n,a=this._loadViewportParams.take;i=t.filter(o=>{var s=o.isNewRow&&o.loadIndex>=r-1,l=o.isNewRow&&o.loadIndex===r&&a===0,u=o.loadIndex>=r||s,d=o.loadIndex<r+a||l;return u&&d})}return i}return this.callBase.apply(this,arguments)},_applyChange:function(t){var i=this,n=t.items,r=t.changeType,a=t.removeCount;if(a){var o=r==="prepend";a=SE(i._items,a,o,function(s,l){return s.rowType==="data"&&!s.isNewRow||s.rowType==="group"&&(i._dataSource.isGroupItemCountable(s.data)||l)}),t.removeCount=a}switch(r){case"prepend":i._items.unshift.apply(i._items,n),a&&i._items.splice(-a);break;case"append":i._items.push.apply(i._items,n),a&&i._items.splice(0,a);break;default:i.callBase(t)}},items:function(t){return t?this._allItems||this._items:this._visibleItems||this._items},getRowIndexDelta:function(){var t=0;if(this.option(st)){var i=this._visibleItems;i&&i[0]&&(t=this._items.indexOf(i[0]))}return t<0?0:t},getRowIndexOffset:function(t){var i=0,n=this.dataSource(),r=this._rowsScrollController,a=this.option(st)===!1,o=Yn(this);if(r&&!t)if(a&&E(this._loadViewportParams)){var{skipForCurrentPage:s,pageIndex:l}=this.getLoadPageParams(!0),u=this.items(!0);if(i=o?l*this.pageSize():0,u.length){var d=u[0].loadIndex;i+=u.filter(h=>h.loadIndex<d+s).length}}else i=r.beginPageIndex()*r.pageSize();else if(o&&a&&n){var c;i=(c=n.lastLoadOptions().skip)!==null&&c!==void 0?c:0}else Ji(this)&&n&&(i=n.beginPageIndex()*n.pageSize());return i},viewportSize:function(){var t=this._rowsScrollController,i=this._dataSource,n=t==null?void 0:t.viewportSize.apply(t,arguments);return this.option(st)===!1?n:i==null?void 0:i.viewportSize.apply(i,arguments)},viewportHeight:function(t){var i;(i=this._rowsScrollController)===null||i===void 0||i.viewportHeight(t)},viewportItemSize:function(){var t=this._rowsScrollController,i=this._dataSource,n=t==null?void 0:t.viewportItemSize.apply(t,arguments);return this.option(st)===!1?n:i==null?void 0:i.viewportItemSize.apply(i,arguments)},setViewportPosition:function(){var t=this._rowsScrollController,i=this._dataSource;this._isPaging=!1,t?t.setViewportPosition.apply(t,arguments):i==null||i.setViewportPosition.apply(i,arguments)},setContentItemSizes:function(t){var i=this._rowsScrollController,n=this._dataSource,r=i==null?void 0:i.setContentItemSizes(t);return this.option(st)===!1?r:n==null?void 0:n.setContentItemSizes(t)},getPreloadedRowCount:function(){var t=this.option("scrolling.preloadedRowCount"),i=this.option("scrolling.preloadEnabled");if(E(t))return t;var n=this.viewportSize();return i?2*n:n},getLoadPageParams:function(t){var i,n,r=this.pageSize(),a=this._loadViewportParams,o=(i=this._dataSource)===null||i===void 0?void 0:i.lastLoadOptions(),s=(o==null?void 0:o.pageIndex)||0,l=(o==null?void 0:o.take)||0,u=this._rowsScrollController.isScrollingBack(),d=u?this.getPreloadedRowCount():0,c=u?0:this.getPreloadedRowCount(),h=((n=this._dataSource)===null||n===void 0?void 0:n.totalCountCorrection())||0,f=Math.max(0,a.skip-d),p=t?s:Math.floor(r?f/r:0),g=p*r,m=a.skip-g,C=a.take+m+c-h,x=t?l:C,T=Math.ceil(r?x/r:0);return{pageIndex:p,loadPageCount:Math.max(1,T),skipForCurrentPage:Math.max(0,m)}},_updateVisiblePageIndex:function(t){if(this._rowsScrollController){if(E(t)){this._silentOption(yv,t),this.pageChanged.fire();return}var i=this._rowsScrollController.getViewportItemIndex(),n=Math.floor(i/this.pageSize());this.pageIndex()!==n&&(this._silentOption(yv,n),this.updateItems({changeType:"pageIndex"}))}},_getChangedLoadParams:function(){var t=this.getLoadPageParams(!0),{pageIndex:i,loadPageCount:n}=this.getLoadPageParams(),r=this._pageIndexIsValid(i),a=null;return!this._isLoading&&r&&(i!==t.pageIndex||n!==t.loadPageCount)&&(a={pageIndex:i,loadPageCount:n}),a},_pageIndexIsValid:function(t){var i=!0;return(sr(this)&&this.hasKnownLastPage()||Ji(this))&&(i=t*this.pageSize()<this.totalItemsCount()),i},_loadItems:function(t){var i,n,r=Yn(this),a=this._dataSource,o=this._getChangedLoadParams(),s=(i=a==null?void 0:a.loadPageCount())!==null&&i!==void 0?i:0,l=this.pageSize()*s,u=(n=a==null?void 0:a.pageIndex())!==null&&n!==void 0?n:0,d=(o==null?void 0:o.pageIndex)===u,c=sr(this)&&this.totalItemsCount()<l,h=this.option("editing.refreshMode")==="repaint",f=(o==null?void 0:o.pageIndex)>u,p=!1;if(!a||r&&t&&(h||f||d&&c))return p;if(r&&this._isLoading&&(this._needUpdateViewportAfterLoading=!0),r&&o){p=!0,a.pageIndex(o.pageIndex),a.loadPageCount(o.loadPageCount),this._repaintChangesOnly=!0,this._needUpdateDimensions=!0;var g=this._viewportChanging;this.load().always(()=>{this._repaintChangesOnly=void 0,this._needUpdateDimensions=void 0}).done(()=>{var m=this.pageCount()>0&&this.pageIndex()===this.pageCount()-1;(g||m)&&this._updateVisiblePageIndex(),this._needUpdateViewportAfterLoading&&(this._needUpdateViewportAfterLoading=!1,this.loadViewport({checkLoadedParamsOnly:!0}))})}return p},loadViewport:function(t){var{checkLoadedParamsOnly:i,checkLoading:n}=t??{},r=Yn(this);if(r||xe.isVirtualRowRendering(this)){this._updateLoadViewportParams();var a=this._loadItems(n);!a&&!(this._isLoading&&n)&&!i&&this.updateItems({repaintChangesOnly:!0,needUpdateDimensions:!0,useProcessedItemsCache:!0,cancelEmptyChanges:!0})}},updateViewport:function(){var t,i,n=this.viewportSize(),r=this.items().length,a=n>r,o=(t=(i=this._loadViewportParams)===null||i===void 0?void 0:i.take)!==null&&t!==void 0?t:0,s=this._rowsScrollController,l=s==null?void 0:s.getViewportParams().take;(a||o<l)&&!this._isPaging&&r&&this.loadViewport({checkLoading:!0})},loadIfNeed:function(){if(this.option(st)!==!1){var t=this._rowsScrollController;t&&t.loadIfNeed();var i=this._dataSource;return i&&i.loadIfNeed()}},getItemSize:function(){var t=this._rowsScrollController;if(t)return t.getItemSize.apply(t,arguments);var i=this._dataSource;return i&&i.getItemSize.apply(i,arguments)},getItemSizes:function(){var t=this._rowsScrollController;if(t)return t.getItemSizes.apply(t,arguments);var i=this._dataSource;return i&&i.getItemSizes.apply(i,arguments)},getContentOffset:function(){var t=this._rowsScrollController;if(t)return t.getContentOffset.apply(t,arguments);var i=this._dataSource;return i&&i.getContentOffset.apply(i,arguments)},refresh:function(t){var i=this._dataSource;return i&&t&&t.load&&sr(this)&&i.resetCurrentTotalCount(),this.callBase.apply(this,arguments)},dispose:function(){var t=this._rowsScrollController;t&&t.dispose(),this.callBase.apply(this,arguments)},topItemIndex:function(){var t;return(t=this._loadViewportParams)===null||t===void 0?void 0:t.skip},bottomItemIndex:function(){var t=this._loadViewportParams;return t&&t.skip+t.take},virtualItemsCount:function(){var t=this._rowsScrollController;if(t)return t.virtualItemsCount.apply(t,arguments);var i=this._dataSource;return i==null?void 0:i.virtualItemsCount.apply(i,arguments)},pageIndex:function(t){var i=Yn(this),n=this._rowsScrollController;if(this.option(st)===!1&&i&&n&&t===void 0){var r;return(r=this.option(yv))!==null&&r!==void 0?r:0}return this.callBase.apply(this,arguments)},_fireChanged:function(t){this.callBase.apply(this,arguments);var{operationTypes:i}=t;if(this.option(st)===!1&&Yn(this)&&i){var{fullReload:n,pageIndex:r}=i;t.isDataChanged&&!n&&r&&this._updateVisiblePageIndex(this._dataSource.pageIndex())}},_getPagingOptionValue:function(t){var i=this.callBase.apply(this,arguments);return this.option(st)===!1&&Yn(this)&&(i=this[t]()),i},isEmpty:function(){return this.option(st)===!1?!this.items(!0).length:this.callBase(this,arguments)},isLastPageLoaded:function(){var t=!1;if(this.option(st)===!1&&Yn(this)){var{pageIndex:i,loadPageCount:n}=this.getLoadPageParams(!0),r=this.pageCount();t=i+n>=r}else t=this.callBase.apply(this,arguments);return t},reset:function(){this._itemCount=0,this._allItems=null,this.callBase.apply(this,arguments)}};return xe.proxyMethod(e,"getVirtualContentSize"),xe.proxyMethod(e,"setViewportItemIndex"),e}(),resizing:{resize:function(){var e=this,t=e.callBase,i;if(Ji(e)||xe.isVirtualRowRendering(e)){clearTimeout(e._resizeTimeout);var n=new Date-e._lastTime,r=e.option("scrolling.updateTimeout");e._lastTime&&n<r?(i=new te,e._resizeTimeout=setTimeout(function(){t.apply(e).done(i.resolve).fail(i.reject),e._lastTime=new Date},r),e._lastTime=new Date):(i=t.apply(e),e._dataController.isLoaded()&&(e._lastTime=new Date))}else i=t.apply(e);return i},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._resizeTimeout)}}},views:{rowsView:dJ}}};De.registerModule("virtualScrolling",aR);Nu.extend(aR.extenders.dataSourceAdapter);var cJ=.9,oR=(e,t)=>{var i=v(qe()),{top:n}=e.offset(),r;if(xt(t)){if(t<n)return n-t;r=Wc(i)-t+i.scrollTop()}else{var a=n-i.scrollTop(),o=Wc(i)-a-at(e);r=Math.max(a,o)}return r*cJ},hJ="dx-context-menu-content-delimiter",fJ="dx-submenu";class xv extends sC{_getDefaultOptions(){return O(super._getDefaultOptions(),{orientation:"horizontal",tabIndex:null,onHoverStart:ee})}_initDataAdapter(){this._dataAdapter=this.option("_dataAdapter"),this._dataAdapter||super._initDataAdapter()}_renderContentImpl(){this._renderContextMenuOverlay(),super._renderContentImpl();var t=this._dataAdapter.getNodeByKey(this.option("_parentKey"));t&&this._renderItems(this._getChildNodes(t)),this._renderDelimiter()}_renderDelimiter(){this.$contentDelimiter=v("<div>").appendTo(this._itemContainer()).addClass(hJ)}_getOverlayOptions(){return O(super._getOverlayOptions(),{onPositioned:this._overlayPositionedActionHandler.bind(this)})}_overlayPositionedActionHandler(t){this._showDelimiter(t)}_hoverEndHandler(t){super._hoverEndHandler(t),this._toggleFocusClass(!1,t.currentTarget)}_isMenuHorizontal(){return this.option("orientation")==="horizontal"}_hoverStartHandler(t){var i=this.option("onHoverStart");i(t),super._hoverStartHandler(t),this._toggleFocusClass(!0,t.currentTarget)}_drawSubmenu(t){this._actions.onShowing({rootItem:Fe(t),submenu:this}),super._drawSubmenu(t),this._actions.onShown({rootItem:Fe(t),submenu:this})}_hideSubmenu(t){this._actions.onHiding({cancel:!0,rootItem:Fe(t),submenu:this}),super._hideSubmenu(t),this._actions.onHidden({rootItem:Fe(t),submenu:this})}_showDelimiter(t){if(this.$contentDelimiter){var i=this._itemContainer().children(".".concat(fJ)).eq(0),n=this.option("position").of,r={of:i},a=t.position,o=a.v.location,s=a.h.location,l=n.offset(),u=Math.round(l.left),d=Math.round(l.top),c=$e(n),h=je(n),f=$e(i),p=je(i);this.$contentDelimiter.css("display","block"),wu(this.$contentDelimiter,this._isMenuHorizontal()?c<f?c-2:f:2),fn(this.$contentDelimiter,this._isMenuHorizontal()?2:h<p?h-2:p),this._isMenuHorizontal()?o>d?Math.round(s)===u?(r.offset="1 -1",r.at=r.my="left top"):(r.offset="-1 -1",r.at=r.my="right top"):(fn(this.$contentDelimiter,5),Math.round(s)===u?(r.offset="1 4",r.at=r.my="left bottom"):(r.offset="-1 2",r.at=r.my="right bottom")):s>u?Math.round(o)===d?(r.offset="-1 1",r.at=r.my="left top"):(r.offset="-1 -1",r.at=r.my="left bottom"):Math.round(o)===d?(r.offset="1 1",r.at=r.my="right top"):(r.offset="1 -1",r.at=r.my="right bottom"),mi.setup(this.$contentDelimiter,r)}}_getContextMenuPosition(){return this.option("position")}isOverlayVisible(){return this._overlay.option("visible")}getOverlayContent(){return this._overlay.$content()}}var Po="dx-menu",pJ=Po+"-vertical",EE=Po+"-horizontal",dg=Po+"-item",wE=Po+"-items-container",bv=dg+"-expanded",kc="dx-context-menu",Sv=kc+"-container-border",vJ="dx-context-menu-content-delimiter",_J="dx-submenu",gJ="dx-state-disabled",IE="dx-state-hover",mJ="dx-state-active",Bc=Po+"-adaptive-mode",TE=Po+"-hamburger-button",CJ=Bc+"-overlay-wrapper",yJ="up",xJ="down",bJ="left",SJ="right",ml="showSubmenu",ts="nextItem",ta="prevItem",EJ={show:50,hide:300},AE=["onSubmenuShowing","onSubmenuShown","onSubmenuHiding","onSubmenuHidden","onItemContextMenu","onItemClick","onSelectionChanged","onItemRendered"];class cg extends oC{_getDefaultOptions(){return O(super._getDefaultOptions(),{orientation:"horizontal",submenuDirection:"auto",showFirstSubmenuMode:{name:"onClick",delay:{show:50,hide:300}},hideSubmenuOnMouseLeave:!1,onSubmenuShowing:null,onSubmenuShown:null,onSubmenuHiding:null,onSubmenuHidden:null,adaptivityEnabled:!1})}_setOptionsByReference(){super._setOptionsByReference(),O(this._optionsByReference,{animation:!0,selectedItem:!0})}_itemElements(){var t=super._itemElements(),i=this._submenuItemElements();return t.add(i)}_submenuItemElements(){var t=[],i=".".concat(dg),n=this._submenus.length&&this._submenus[0];return n&&n.itemsContainer()&&(t=n.itemsContainer().find(i)),t}_focusTarget(){return this.$element()}_isMenuHorizontal(){return this.option("orientation")==="horizontal"}_moveFocus(t){var i=this._getAvailableItems(),n=this._isMenuHorizontal(),r=this._getActiveItem(!0),a,o,s,l;switch(t){case yJ:o=n?ml:this._getItemsNavigationOperation(ta),a=n?r:i,s=this._getKeyboardNavigationAction(o,a),l=s();break;case xJ:o=n?ml:this._getItemsNavigationOperation(ts),a=n?r:i,s=this._getKeyboardNavigationAction(o,a),l=s();break;case SJ:o=n?this._getItemsNavigationOperation(ts):ml,a=n?i:r,s=this._getKeyboardNavigationAction(o,a),l=s();break;case bJ:o=n?this._getItemsNavigationOperation(ta):ml,a=n?i:r,s=this._getKeyboardNavigationAction(o,a),l=s();break;default:return super._moveFocus(t)}l&&l.length!==0&&this.option("focusedElement",Fe(l))}_getItemsNavigationOperation(t){var i=t;return this.option("rtlEnabled")&&(i=t===ta?ts:ta),i}_getKeyboardNavigationAction(t,i){var n=ee;switch(t){case ml:i.hasClass(gJ)||(n=this._showSubmenu.bind(this,i));break;case ts:n=this._nextItem.bind(this,i);break;case ta:n=this._prevItem.bind(this,i)}return n}_clean(){super._clean(),this.option("templatesRenderAsynchronously")&&clearTimeout(this._resizeEventTimer)}_visibilityChanged(t){t&&(this._menuItemsWidth||this._updateItemsWidthCache(),this._dimensionChanged())}_isAdaptivityEnabled(){return this.option("adaptivityEnabled")&&this.option("orientation")==="horizontal"}_updateItemsWidthCache(){var t=this.$element().find("ul").first().children("li").children(".".concat(dg));this._menuItemsWidth=this._getSummaryItemsWidth(t,!0)}_dimensionChanged(){if(this._isAdaptivityEnabled()){var t=lt(this.$element());this._toggleAdaptiveMode(this._menuItemsWidth>t)}}_init(){super._init(),this._submenus=[]}_initActions(){this._actions={},F(AE,(t,i)=>{this._actions[i]=this._createActionByOption(i)})}_initMarkup(){this._visibleSubmenu=null,this.$element().addClass(Po),super._initMarkup(),this._addCustomCssClass(this.$element()),this.setAria("role","menubar")}_render(){super._render(),this._initAdaptivity()}_renderHamburgerButton(){return this._hamburger=new Si(v("<div>").addClass(TE),{icon:"menu",activeStateEnabled:!1,onClick:this._toggleTreeView.bind(this)}),this._hamburger.$element()}_toggleTreeView(t){Ye(t)&&(t=!this._overlay.option("visible")),this._overlay.option("visible",t),this._toggleHamburgerActiveState(t)}_toggleHamburgerActiveState(t){this._hamburger&&this._hamburger.$element().toggleClass(mJ,t)}_toggleAdaptiveMode(t){var i=this.$element().find(".".concat(EE)),n=this.$element().find(".".concat(Bc));t?this._hideVisibleSubmenu():(this._treeView&&this._treeView.collapseAll(),this._overlay&&this._toggleTreeView(t)),i.toggle(!t),n.toggle(t)}_removeAdaptivity(){this._$adaptiveContainer&&(this._toggleAdaptiveMode(!1),this._$adaptiveContainer.remove(),this._$adaptiveContainer=null,this._treeView=null,this._hamburger=null,this._overlay=null)}_treeviewItemClickHandler(t){this._actions.onItemClick(t),t.node.children.length||this._toggleTreeView(!1)}_getAdaptiveOverlayOptions(){var t=this.option("rtlEnabled"),i=t?"right":"left";return{_ignoreFunctionValueDeprecation:!0,maxHeight:()=>oR(this.$element()),deferRendering:!1,shading:!1,animation:!1,hideOnParentScroll:!0,onHidden:()=>{this._toggleHamburgerActiveState(!1)},height:"auto",hideOnOutsideClick:n=>!v(n.target).closest(".".concat(TE)).length,position:{collision:"flipfit",at:"bottom "+i,my:"top "+i,of:this._hamburger.$element()}}}_getTreeViewOptions(){var t={};return F(["rtlEnabled","width","accessKey","activeStateEnabled","animation","dataSource","disabled","displayExpr","displayExpr","focusStateEnabled","hint","hoverStateEnabled","itemsExpr","items","itemTemplate","selectedExpr","selectionMode","tabIndex","visible"],(i,n)=>{t[n]=this.option(n)}),F(["onItemContextMenu","onSelectionChanged","onItemRendered"],(i,n)=>{t[n]=r=>{this._actions[n](r)}}),O(t,{dataSource:this.getDataSource(),animationEnabled:!!this.option("animation"),onItemClick:this._treeviewItemClickHandler.bind(this),onItemExpanded:i=>{this._overlay.repaint(),this._actions.onSubmenuShown(i)},onItemCollapsed:i=>{this._overlay.repaint(),this._actions.onSubmenuHidden(i)},selectNodesRecursive:!1,selectByClick:this.option("selectByClick"),expandEvent:"click"})}_initAdaptivity(){if(this._isAdaptivityEnabled()){this._$adaptiveContainer=v("<div>").addClass(Bc);var t=this._renderHamburgerButton();this._treeView=this._createComponent(v("<div>"),ed,this._getTreeViewOptions()),this._overlay=this._createComponent(v("<div>"),zn,this._getAdaptiveOverlayOptions()),this._overlay.$content().append(this._treeView.$element()).addClass(Bc).addClass(this.option("cssClass")),this._overlay.$wrapper().addClass(CJ),this._$adaptiveContainer.append(t),this._$adaptiveContainer.append(this._overlay.$element()),this.$element().append(this._$adaptiveContainer),this._updateItemsWidthCache(),this._dimensionChanged()}}_getDelay(t){var i=this.option("showFirstSubmenuMode").delay;return E(i)?He(i)?i[t]:i:EJ[t]}_keyboardHandler(t){return super._keyboardHandler(t,!!this._visibleSubmenu)}_renderContainer(){var t=v("<div>");return t.appendTo(this.$element()).addClass(this._isMenuHorizontal()?EE:pJ),super._renderContainer(t)}_renderSubmenuItems(t,i){var n=this._createSubmenu(t,i);return this._submenus.push(n),this._renderBorderElement(i),n}_getKeyboardListeners(){return super._getKeyboardListeners().concat(this._visibleSubmenu)}_createSubmenu(t,i){var n=v("<div>").addClass(kc).appendTo(i),r=this._getChildNodes(t),a=this._createComponent(n,xv,O(this._getSubmenuOptions(),{_dataAdapter:this._dataAdapter,_parentKey:t.internalFields.key,items:r,onHoverStart:this._clearTimeouts.bind(this),position:this.getSubmenuPosition(i)}));return this._attachSubmenuHandlers(i,a),a}_getSubmenuOptions(){var t=v("<div>"),i=this._isMenuHorizontal();return{itemTemplate:this.option("itemTemplate"),target:t,orientation:this.option("orientation"),selectionMode:this.option("selectionMode"),cssClass:this.option("cssClass"),selectByClick:this.option("selectByClick"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),showSubmenuMode:this.option("showSubmenuMode"),displayExpr:this.option("displayExpr"),disabledExpr:this.option("disabledExpr"),selectedExpr:this.option("selectedExpr"),itemsExpr:this.option("itemsExpr"),onFocusedItemChanged:n=>{n.component.option("visible")&&this.option("focusedElement",n.component.option("focusedElement"))},onSelectionChanged:this._nestedItemOnSelectionChangedHandler.bind(this),onItemClick:this._nestedItemOnItemClickHandler.bind(this),onItemRendered:this._nestedItemOnItemRenderedHandler.bind(this),onLeftFirstItem:i?null:this._moveMainMenuFocus.bind(this,ta),onLeftLastItem:i?null:this._moveMainMenuFocus.bind(this,ts),onCloseRootSubmenu:this._moveMainMenuFocus.bind(this,i?ta:null),onExpandLastSubmenu:i?this._moveMainMenuFocus.bind(this,ts):null}}_getShowFirstSubmenuMode(){if(!this._isDesktopDevice())return"onClick";var t=this.option("showFirstSubmenuMode");return He(t)?t.name:t}_moveMainMenuFocus(t){var i=this._getAvailableItems(),n=i.length,r=i.filter(".".concat(bv)).eq(0),a=i.index(r);this._hideSubmenu(this._visibleSubmenu),a+=t===ta?-1:1,a>=n?a=0:a<0&&(a=n-1);var o=i.eq(a);this.option("focusedElement",Fe(o))}_nestedItemOnSelectionChangedHandler(t){var i=t.addedItems.length&&t.addedItems[0],n=xv.getInstance(t.element),r=this._actions.onSelectionChanged;r(t),i&&this._clearSelectionInSubmenus(i[0],n),this._clearRootSelection(),this._setOptionWithoutOptionChange("selectedItem",i)}_clearSelectionInSubmenus(t,i){var n=!arguments.length;F(this._submenus,(r,a)=>{var o=a._itemContainer(),s=!o.is(i&&i._itemContainer()),l=o.find(".".concat(this._selectedItemClass()));if(s&&l.length||n){l.removeClass(this._selectedItemClass());var u=this._getItemData(l);u&&(u.selected=!1),a._clearSelectedItems()}})}_clearRootSelection(){var t=this.$element().find(".".concat(wE)).first().children().children().filter(".".concat(this._selectedItemClass()));if(t.length){var i=this._getItemData(t);i.selected=!1,t.removeClass(this._selectedItemClass())}}_nestedItemOnItemClickHandler(t){this._actions.onItemClick(t)}_nestedItemOnItemRenderedHandler(t){this._actions.onItemRendered(t)}_attachSubmenuHandlers(t,i){var n=i.getOverlayContent(),r=n.find(".".concat(_J)),a=me(Mh,this.NAME+"_submenu");i.option({onShowing:this._submenuOnShowingHandler.bind(this,t,i),onShown:this._submenuOnShownHandler.bind(this,t,i),onHiding:this._submenuOnHidingHandler.bind(this,t,i),onHidden:this._submenuOnHiddenHandler.bind(this,t,i)}),F(r,(o,s)=>{D.off(s,a),D.on(s,a,null,this._submenuMouseLeaveHandler.bind(this,t))})}_submenuOnShowingHandler(t,i){var n=t.children(".".concat(Sv));this._actions.onSubmenuShowing({rootItem:Fe(t),submenu:i}),n.show(),t.addClass(bv)}_submenuOnShownHandler(t,i){this._actions.onSubmenuShown({rootItem:Fe(t),submenu:i})}_submenuOnHidingHandler(t,i,n){var r=t.children(".".concat(Sv)),a=n;a.rootItem=Fe(t),a.submenu=i,this._actions.onSubmenuHiding(a),n=a,n.cancel||(this._visibleSubmenu===i&&(this._visibleSubmenu=null),r.hide(),t.removeClass(bv))}_submenuOnHiddenHandler(t,i){this._actions.onSubmenuHidden({rootItem:Fe(t),submenu:i})}_submenuMouseLeaveHandler(t,i){var n=v(i.relatedTarget).parents(".".concat(kc))[0],r=this._getSubmenuByRootElement(t).getOverlayContent()[0];this.option("hideSubmenuOnMouseLeave")&&n!==r&&(this._clearTimeouts(),setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide")))}_hideSubmenuAfterTimeout(){if(this._visibleSubmenu){var t=v(this._visibleSubmenu.$element().context).hasClass(IE),i=this._visibleSubmenu.getOverlayContent().find(".".concat(IE)).length,n=this._visibleSubmenu.getOverlayContent().get(0).querySelector(":hover");!n&&!i&&!t&&this._visibleSubmenu.hide()}}_getSubmenuByRootElement(t){if(!t)return!1;var i=t.children(".".concat(kc));return i.length&&xv.getInstance(i)}getSubmenuPosition(t){var i=this._isMenuHorizontal(),n=this.option("submenuDirection").toLowerCase(),r=this.option("rtlEnabled"),a={collision:"flip",of:t};switch(n){case"leftortop":a.at="left top",a.my=i?"left bottom":"right top";break;case"rightorbottom":a.at=i?"left bottom":"right top",a.my="left top";break;default:i?(a.at=r?"right bottom":"left bottom",a.my=r?"right top":"left top"):(a.at=r?"left top":"right top",a.my=r?"right top":"left top")}return a}_renderBorderElement(t){v("<div>").appendTo(t).addClass(Sv).hide()}_itemPointerDownHandler(t){var i=v(t.target),n=i.closest(this._itemElements());if(n.hasClass("dx-menu-item-has-submenu")){this.option("focusedElement",null);return}super._itemPointerDownHandler(t)}_hoverStartHandler(t){var i=me(ut.move,this.NAME),n=this._getItemElementByEventArgs(t),r=this._dataAdapter.getNodeByItem(this._getItemData(n)),a=E(t.buttons)&&t.buttons===1||!E(t.buttons)&&t.which===1;if(!this._isItemDisabled(n)){if(D.off(n,i),!this._hasChildren(r)){this._showSubmenuTimer=setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide"));return}if(this._getShowFirstSubmenuMode()==="onHover"&&!a){var o=this._getSubmenuByElement(n);this._clearTimeouts(),o.isOverlayVisible()||(D.on(n,i,this._itemMouseMoveHandler.bind(this)),this._showSubmenuTimer=this._getDelay("hide"))}}}_hoverEndHandler(t){var i=this._getItemElementByEventArgs(t),n=v(t.relatedTarget);super._hoverEndHandler(t),this._clearTimeouts(),!this._isItemDisabled(i)&&(n.hasClass(vJ)||this.option("hideSubmenuOnMouseLeave")&&!n.hasClass(wE)&&(this._hideSubmenuTimer=setTimeout(()=>{this._hideSubmenuAfterTimeout()},this._getDelay("hide"))))}_hideVisibleSubmenu(){return this._visibleSubmenu?(this._hideSubmenu(this._visibleSubmenu),!0):!1}_showSubmenu(t){var i=this._getSubmenuByElement(t);this._visibleSubmenu!==i&&this._hideVisibleSubmenu(),i&&(this._clearTimeouts(),i.show(),this.option("focusedElement",i.option("focusedElement"))),this._visibleSubmenu=i,this._hoveredRootItem=t}_hideSubmenu(t){t&&t.hide(),this._visibleSubmenu===t&&(this._visibleSubmenu=null),this._hoveredRootItem=null}_itemMouseMoveHandler(t){if(!(t.pointers&&t.pointers.length)){var i=v(t.currentTarget);E(this._showSubmenuTimer)&&(this._clearTimeouts(),this._showSubmenuTimer=setTimeout(()=>{var n=this._getSubmenuByElement(i);n&&!n.isOverlayVisible()&&this._showSubmenu(i)},this._getDelay("show")))}}_clearTimeouts(){clearTimeout(this._hideSubmenuTimer),clearTimeout(this._showSubmenuTimer)}_getSubmenuByElement(t,i){var n=this._getSubmenuByRootElement(t);if(n)return n;i=i||this._getItemData(t);var r=this._dataAdapter.getNodeByItem(i);return this._hasChildren(r)&&this._renderSubmenuItems(r,t)}_updateSubmenuVisibilityOnClick(t){var i=t.args.length&&t.args[0];if(!(!i||this._disabledGetter(i.itemData))){var n=v(i.itemElement),r=this._getSubmenuByElement(n,i.itemData);if(this._updateSelectedItemOnClick(t),this._visibleSubmenu)if(this._visibleSubmenu===r){this.option("showFirstSubmenuMode")==="onClick"&&this._hideSubmenu(this._visibleSubmenu);return}else this._hideSubmenu(this._visibleSubmenu);if(r&&!r.isOverlayVisible()){this._showSubmenu(n);return}}}_optionChanged(t){if(AE.indexOf(t.name)>=0){this._initActions();return}switch(t.name){case"orientation":case"submenuDirection":this._invalidate();break;case"showFirstSubmenuMode":case"hideSubmenuOnMouseLeave":break;case"showSubmenuMode":this._changeSubmenusOption(t.name,t.value);break;case"adaptivityEnabled":t.value?this._initAdaptivity():this._removeAdaptivity();break;case"width":this._isAdaptivityEnabled()&&(this._treeView.option(t.name,t.value),this._overlay.option(t.name,t.value)),super._optionChanged(t),this._dimensionChanged();break;case"animation":this._isAdaptivityEnabled()&&this._treeView.option("animationEnabled",!!t.value),super._optionChanged(t);break;default:this._isAdaptivityEnabled()&&(t.name===t.fullName||t.name==="items")&&this._treeView.option(t.fullName,t.value),super._optionChanged(t)}}_changeSubmenusOption(t,i){F(this._submenus,(n,r)=>{r.option(t,i)})}selectItem(t){this._hideSubmenu(this._visibleSubmenu),super.selectItem(t)}unselectItem(t){this._hideSubmenu(this._visibleSubmenu),super.selectItem(t)}}tt("dxMenu",cg);var Ev={"=":"filter-operation-equals","<>":"filter-operation-not-equals","<":"filter-operation-less","<=":"filter-operation-less-equal",">":"filter-operation-greater",">=":"filter-operation-greater-equal",default:"filter-operation-default",notcontains:"filter-operation-not-contains",contains:"filter-operation-contains",startswith:"filter-operation-starts-with",endswith:"filter-operation-ends-with",between:"filter-operation-between"},DE={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",between:"between"},wJ=700,sR=1,Xl="filter-row",Jd="filter-range-overlay",ec="filter-range-start",IJ="filter-range-end",OE="dx-menu",RE="dx-editor-with-menu",$a="dx-editor-container",hg="dx-editor-cell",TJ="dx-filter-menu",AJ="dx-apply-button",wv="dx-highlight-outline",kE="dx-focused",DJ="dx-cell-focus-disabled",Iv="dx-filter-range-content",Tv="dx-filter-modified",Cl="input:not([type='hidden'])",OJ=["date","datetime","number"];function _s(e){return e.option("filterRow.applyFilter")==="onClick"}var Av=function(e){var t=e&&e.children(),i=t&&t.data("dxComponents"),n=i&&i.length&&t.data(i[0]);if(n instanceof Gn)return n},RJ=function(){var e=function(a,o){var s="",l="",u=t(a,o),d=xe.getFormatOptionsByColumn(o,"filterRow");return Array.isArray(u)?(s=xe.formatValue(u[0],d),l=xe.formatValue(u[1],d),l!==""&&(s+=" - "+l)):E(u)&&(s=xe.formatValue(u,d)),s};function t(a,o){if(o)return _s(a)&&o.bufferedFilterValue!==void 0?o.bufferedFilterValue:o.filterValue}var i=function(a,o){if(o)return _s(a)&&o.bufferedSelectedFilterOperation!==void 0?o.bufferedSelectedFilterOperation:o.selectedFilterOperation},n=function(a,o,s){var l=a._columnsController.columnOption(o),u=t(a,l),d=s.closest("."+a.addWidgetPrefix(Jd)).length,c=s.hasClass(a.addWidgetPrefix(ec));return u&&Array.isArray(u)&&i(a,l)==="between"?c?u[0]:u[1]:!d&&function(h,f){return f&&OJ.indexOf(f.dataType)>=0&&Array.isArray(h)?!1:h!==void 0}(u,l)?u:null},r=function(a,o){var s=o.value===""?null:o.value,l=o.container,u=a._columnsController.columnOption(o.column.index),d=n(a,u.index,l);if(!(!E(d)&&!E(s))){a._applyFilterViewController.setHighLight(l,d!==s);var c=_s(a)?"bufferedFilterValue":"filterValue",h=function(g,m,C,x){if(i(g,C)==="between"){var T=t(g,C);return x.hasClass(g.addWidgetPrefix(ec))?[m,Array.isArray(T)?T[1]:void 0]:[Array.isArray(T)?T[0]:T,m]}return m}(a,s,u,l),f=i(a,u)==="between",p=o.notFireEvent||f&&Array.isArray(h)&&h.indexOf(void 0)>=0;a._columnsController.columnOption(u.index,c,h,p)}};return{_updateEditorValue:function(a,o){var s=Av(o);s&&s.option("value",n(this,a.index,o))},_columnOptionChanged:function(a){var o=a.optionNames,s,l,u,d;if(xe.checkChanges(o,["filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","filterValues","filterType"])&&a.columnIndex!==void 0){var c=this._columnsController.getVisibleIndex(a.columnIndex),h=this._columnsController.columnOption(a.columnIndex);if(s=this._getCellElement(this.element().find("."+this.addWidgetPrefix(Xl)).index(),c)||v(),l=s.find("."+$a).first(),o.filterValue||o.bufferedFilterValue){this._updateEditorValue(h,l);var f=s.find("."+this.addWidgetPrefix(Jd)).data("dxOverlay");f&&(u=f.$content().find("."+$a),this._updateEditorValue(h,u.first()),this._updateEditorValue(h,u.last())),(!f||!f.option("visible"))&&this._updateFilterRangeContent(s,e(this,h))}(o.selectedFilterOperation||o.bufferedSelectedFilterOperation)&&c>=0&&h&&(d=s.find("."+OE),d.length&&(this._updateFilterOperationChooser(d,h,l),i(this,h)==="between"?this._renderFilterRangeContent(s,h):l.find("."+Iv).length&&(this._renderEditor(l,this._getEditorOptions(l,h)),this._hideFilterRange())));return}this.callBase(a)},_renderCore:function(){this._filterRangeOverlayInstance=null,this.callBase.apply(this,arguments)},_resizeCore:function(){this.callBase.apply(this,arguments),this._filterRangeOverlayInstance&&this._filterRangeOverlayInstance.repaint()},isFilterRowVisible:function(){return this._isElementVisible(this.option("filterRow"))},isVisible:function(){return this.callBase()||this.isFilterRowVisible()},init:function(){this.callBase(),this._applyFilterViewController=this.getController("applyFilter")},_initFilterRangeOverlay:function(a,o){var s=this,l={},u=a.find(".dx-editor-container"),d=v("<div>").addClass(s.addWidgetPrefix(Jd)).appendTo(a);return s._createComponent(d,zn,{height:"auto",shading:!1,showTitle:!1,focusStateEnabled:!1,hideOnOutsideClick:!0,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,animation:!1,position:{my:"top",at:"top",of:u.length&&u||a,offset:"0 -1"},contentTemplate:function(c){var h,f=v("<div>").addClass($a+" "+s.addWidgetPrefix(ec)).appendTo(c);return o=s._columnsController.columnOption(o.index),h=s._getEditorOptions(f,o),h.sharedData=l,s._renderEditor(f,h),D.on(f.find(Cl),"keydown",function(p){var g=a.find("[tabindex]").not(p.target).first();Nt(p)==="tab"&&p.shiftKey&&(p.preventDefault(),s._hideFilterRange(),g.length||(g=a.prev().find("[tabindex]").last()),D.trigger(g,"focus"))}),f=v("<div>").addClass($a+" "+s.addWidgetPrefix(IJ)).appendTo(c),h=s._getEditorOptions(f,o),h.sharedData=l,s._renderEditor(f,h),D.on(f.find(Cl),"keydown",function(p){Nt(p)==="tab"&&!p.shiftKey&&(p.preventDefault(),s._hideFilterRange(),D.trigger(a.next().find("[tabindex]").first(),"focus"))}),v(c).addClass(s.getWidgetContainerClass())},onShown:function(c){var h=c.component.$content().find("."+$a).first();D.trigger(h.find(Cl),"focus")},onHidden:function(){o=s._columnsController.columnOption(o.index),a.find("."+OE).parent().addClass(RE),i(s,o)==="between"&&(s._updateFilterRangeContent(a,e(s,o)),s.component.updateDimensions())}})},_updateFilterRangeOverlay:function(a){var o=this._filterRangeOverlayInstance;o&&o.option(a)},_showFilterRange:function(a,o){var s=a.children("."+this.addWidgetPrefix(Jd)),l=s.length&&s.data("dxOverlay");!l&&o&&(l=this._initFilterRangeOverlay(a,o)),l.option("visible")||(this._filterRangeOverlayInstance&&this._filterRangeOverlayInstance.hide(),this._filterRangeOverlayInstance=l,this._updateFilterRangeOverlay({width:lt(a,!0)+sR}),this._filterRangeOverlayInstance&&this._filterRangeOverlayInstance.show())},_hideFilterRange:function(){var a=this._filterRangeOverlayInstance;a&&a.hide()},getFilterRangeOverlayInstance:function(){return this._filterRangeOverlayInstance},_createRow:function(a){var o=this.callBase(a);return a.rowType==="filter"&&(o.addClass(this.addWidgetPrefix(Xl)),this.option("useLegacyKeyboardNavigation")||D.on(o,"keydown",s=>Fm("filterRow",this,s))),o},_getRows:function(){var a=this.callBase();return this.isFilterRowVisible()&&a.push({rowType:"filter"}),a},_renderFilterCell:function(a,o){var s=o.column,l=v(a);this.component.option("showColumnHeaders")&&this.setAria("describedby",s.headerId,l),this.setAria("label",ue.format("dxDataGrid-ariaFilterCell"),l),l.addClass(hg);var u=v("<div>").appendTo(l),d=v("<div>").addClass($a).appendTo(u);if(i(this,s)==="between")this._renderFilterRangeContent(l,s);else{var c=this._getEditorOptions(d,s);this._renderEditor(d,c)}var h=s.alignment;h&&h!=="center"&&l.find(Cl).first().css("textAlign",s.alignment),s.filterOperations&&s.filterOperations.length&&this._renderFilterOperationChooser(u,s,d)},_renderCellContent:function(a,o){var s=this,l=o.column;if(o.rowType==="filter"){if(l.command)a.html("&nbsp;");else if(l.allowFiltering){s.renderTemplate(a,s._renderFilterCell.bind(s),o).done(()=>{s._updateCell(a,o)});return}}s.callBase(a,o)},_getEditorOptions:function(a,o){var s=this,l={editorOptions:{inputAttr:s._getFilterInputAccessibilityAttributes(o)}},u=O(l,o,{value:n(s,o.index,a),parentType:"filterRow",showAllText:s.option("filterRow.showAllText"),updateValueTimeout:s.option("filterRow.applyFilter")==="onClick"?0:wJ,width:null,setValue:function(d,c){r(s,{column:o,value:d,container:a,notFireEvent:c})}});return i(s,o)==="between"&&(a.hasClass(s.addWidgetPrefix(ec))?u.placeholder=s.option("filterRow.betweenStartText"):u.placeholder=s.option("filterRow.betweenEndText")),u},_getFilterInputAccessibilityAttributes:function(a){var o=ue.format("dxDataGrid-ariaFilterCell");return this.component.option("showColumnHeaders")?{"aria-label":o,"aria-describedby":a.headerId}:{"aria-label":o}},_renderEditor:function(a,o){a.empty();var s=v("<div>").appendTo(a),l=this.getController("editorFactory"),u=this.getController("data").dataSource(),d=this.getController("applyFilter");if(o.lookup&&this.option("syncLookupFilterValues")){d.setCurrentColumnForFiltering(o);var c=this.getController("data").getCombinedFilter();d.setCurrentColumnForFiltering(null);var h=xe.getWrappedLookupDataSource(o,u,c),f=be({},o,{lookup:be({},o.lookup,{dataSource:h})});return l.createEditor(s,f)}else return l.createEditor(s,o)},_renderFilterRangeContent:function(a,o){var s=this,l=a.find("."+$a).first();l.empty();var u=v("<div>").addClass(Iv).attr("tabindex",this.option("tabIndex"));D.on(u,"focusin",function(){s._showFilterRange(a,o)}),u.appendTo(l),s._updateFilterRangeContent(a,e(s,o))},_updateFilterRangeContent:function(a,o){var s=a.find("."+Iv);s.length&&(o===""?s.html("&nbsp;"):s.text(o))},_updateFilterOperationChooser:function(a,o,s){var l=this,u,d=function(){var c=cg.getInstance(a);c&&c.option("focusedElement",null),u&&l._focusEditor(s)};l._createComponent(a,cg,{integrationOptions:{},activeStateEnabled:!1,selectionMode:"single",cssClass:l.getWidgetContainerClass()+" "+DJ+" "+TJ,showFirstSubmenuMode:"onHover",hideSubmenuOnMouseLeave:!0,items:[{disabled:!(o.filterOperations&&o.filterOperations.length),icon:Ev[i(l,o)||"default"],selectable:!1,items:l._getFilterOperationMenuItems(o)}],onItemClick:function(c){var h=c.itemData.name,f=i(l,o),p=!1,g=_s(l),m={};if(!(c.itemData.items||h&&h===f)){if(h?(m[g?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=h,(h==="between"||f==="between")&&(p=h==="between",m[g?"bufferedFilterValue":"filterValue"]=null)):(m[g?"bufferedFilterValue":"filterValue"]=null,m[g?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=o.defaultSelectedFilterOperation||null),l._columnsController.columnOption(o.index,m),l._applyFilterViewController.setHighLight(s,!0),!h){var C=Av(s);C&&C.NAME==="dxDateBox"&&!C.option("isValid")&&(C.reset(),C.option("isValid",!0))}p?l._showFilterRange(s.closest("."+hg),o):l._focusEditor(s)}},onSubmenuShown:function(){u=l._isEditorFocused(s),l.getController("editorFactory").loseFocus()},onSubmenuHiding:function(){D.trigger(a,"blur"),d()},onContentReady:function(c){D.on(a,"blur",()=>{var h=c.component;h._hideSubmenu(h._visibleSubmenu),d()})},rtlEnabled:l.option("rtlEnabled")})},_isEditorFocused:function(a){return a.hasClass(kE)||a.parents("."+kE).length},_focusEditor:function(a){this.getController("editorFactory").focus(a),D.trigger(a.find(Cl),"focus")},_renderFilterOperationChooser:function(a,o,s){var l;this.option("filterRow.showOperationChooser")&&(a.addClass(RE),l=v("<div>").prependTo(a),this._updateFilterOperationChooser(l,o,s))},_getFilterOperationMenuItems:function(a){var o=this,s=[{}],l=o.option("filterRow"),u=l&&l.operationDescriptions||{};if(a.filterOperations&&a.filterOperations.length){var d=a.filterOperations.filter(function(c){return E(DE[c])});s=Jt(d,function(c){var h=DE[c];return{name:c,selected:(i(o,a)||a.defaultFilterOperation)===c,text:u[h],icon:Ev[c]}}),s.push({name:null,text:l&&l.resetOperationText,icon:Ev.default})}return s},_handleDataChanged:function(a){var o;this.callBase.apply(this,arguments),(o=a.operationTypes)!==null&&o!==void 0&&o.filtering&&this.updateLookupDataSource()},updateLookupDataSource:function(){if(this.option("syncLookupFilterValues")&&this.element()){var a=this.getController("columns").getVisibleColumns(),o=this.getController("data").dataSource(),s=this.getController("applyFilter"),l=this.element().find("."+this.addWidgetPrefix(Xl)).index();l!==-1&&a.forEach(u=>{if(u.lookup){var d=this._getCellElement(l,u.visibleIndex),c=Av(d.find(".dx-editor-container"));s.setCurrentColumnForFiltering(u);var h=this.getController("data").getCombinedFilter();s.setCurrentColumnForFiltering(null);var f=xe.getWrappedLookupDataSource(u,o,h);c==null||c.option("dataSource",f)}})}},optionChanged:function(a){switch(a.name){case"filterRow":case"showColumnLines":this._invalidate(!0,!0),a.handled=!0;break;default:this.callBase(a)}}}}(),kJ={skipCalculateColumnFilters:function(){return!1},_calculateAdditionalFilter:function(){if(this.skipCalculateColumnFilters())return this.callBase();var e=[this.callBase()],t=this._columnsController.getVisibleColumns(null,!0),i=this.getController("applyFilter");return F(t,function(){var n,r=((n=i.getCurrentColumnForFiltering())===null||n===void 0?void 0:n.index)===this.index;if(this.allowFiltering&&this.calculateFilterExpression&&E(this.filterValue)&&!r){var a=this.createFilterExpression(this.filterValue,this.selectedFilterOperation||this.defaultFilterOperation,"filterRow");e.push(a)}}),xe.combineFilters(e)}},BJ=Tt.ViewController.inherit({_getHeaderPanel:function(){return this._headerPanel||(this._headerPanel=this.getView("headerPanel")),this._headerPanel},setHighLight:function(e,t){_s(this)&&(e&&e.toggleClass(wv,t)&&e.closest("."+hg).toggleClass(Tv,t),this._getHeaderPanel().enableApplyButton(t))},applyFilter:function(){var e=this.getController("columns"),t=e.getColumns();e.beginUpdate();for(var i=0;i<t.length;i++){var n=t[i];n.bufferedFilterValue!==void 0&&(e.columnOption(i,"filterValue",n.bufferedFilterValue),n.bufferedFilterValue=void 0),n.bufferedSelectedFilterOperation!==void 0&&(e.columnOption(i,"selectedFilterOperation",n.bufferedSelectedFilterOperation),n.bufferedSelectedFilterOperation=void 0)}e.endUpdate(),this.removeHighLights()},removeHighLights:function(){if(_s(this)){var e=this.getView("columnHeadersView").element();e.find("."+this.addWidgetPrefix(Xl)+" ."+wv).removeClass(wv),e.find("."+this.addWidgetPrefix(Xl)+" ."+Tv).removeClass(Tv),this._getHeaderPanel().enableApplyButton(!1)}},setCurrentColumnForFiltering:function(e){this._currentColumn=e},getCurrentColumnForFiltering:function(){return this._currentColumn}}),LJ={defaultOptions:function(){return{syncLookupFilterValues:!0,filterRow:{visible:!1,showOperationChooser:!0,showAllText:ue.format("dxDataGrid-filterRowShowAllText"),resetOperationText:ue.format("dxDataGrid-filterRowResetOperationText"),applyFilter:"auto",applyFilterText:ue.format("dxDataGrid-applyFilterText"),operationDescriptions:{equal:ue.format("dxDataGrid-filterRowOperationEquals"),notEqual:ue.format("dxDataGrid-filterRowOperationNotEquals"),lessThan:ue.format("dxDataGrid-filterRowOperationLess"),lessThanOrEqual:ue.format("dxDataGrid-filterRowOperationLessOrEquals"),greaterThan:ue.format("dxDataGrid-filterRowOperationGreater"),greaterThanOrEqual:ue.format("dxDataGrid-filterRowOperationGreaterOrEquals"),startsWith:ue.format("dxDataGrid-filterRowOperationStartsWith"),contains:ue.format("dxDataGrid-filterRowOperationContains"),notContains:ue.format("dxDataGrid-filterRowOperationNotContains"),endsWith:ue.format("dxDataGrid-filterRowOperationEndsWith"),between:ue.format("dxDataGrid-filterRowOperationBetween"),isBlank:ue.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:ue.format("dxFilterBuilder-filterOperationIsNotBlank")},betweenStartText:ue.format("dxDataGrid-filterRowOperationBetweenStartText"),betweenEndText:ue.format("dxDataGrid-filterRowOperationBetweenEndText")}}},controllers:{applyFilter:BJ},extenders:{controllers:{data:kJ,columnsResizer:{_startResizing:function(){var e=this;if(e.callBase.apply(e,arguments),e.isResizing()){var t=e._columnHeadersView.getFilterRangeOverlayInstance();if(t){var i=t.$element().closest("td").index();(i===e._targetPoint.columnIndex||i===e._targetPoint.columnIndex+1)&&t.$content().hide()}}},_endResizing:function(){var e=this,t;if(e.isResizing()){var i=e._columnHeadersView.getFilterRangeOverlayInstance();i&&(t=i.$element().closest("td"),e._columnHeadersView._updateFilterRangeOverlay({width:lt(t,!0)+sR}),i.$content().show())}e.callBase.apply(e,arguments)}},editing:{updateFieldValue(e){return e.column.lookup&&(this._needUpdateLookupDataSource=!0),this.callBase.apply(this,arguments)},_afterSaveEditData(e){if(this._needUpdateLookupDataSource&&!e){var t;(t=this.getView("columnHeadersView"))===null||t===void 0||t.updateLookupDataSource()}return this._needUpdateLookupDataSource=!1,this.callBase.apply(this,arguments)},_afterCancelEditData(){return this._needUpdateLookupDataSource=!1,this.callBase.apply(this,arguments)}}},views:{columnHeadersView:RJ,headerPanel:{_getToolbarItems:function(){var e=this.callBase(),t=this._prepareFilterItem(e);return t.concat(e)},_prepareFilterItem:function(){var e=this,t=[];if(e._isShowApplyFilterButton()){var i=e.option("filterRow.applyFilterText"),n=e._columnsController.getColumns(),r=!n.filter(function(o){return o.bufferedFilterValue!==void 0}).length,a={widget:"dxButton",options:{icon:"apply-filter",disabled:r,onClick:function(){e._applyFilterViewController.applyFilter()},hint:i,text:i,onInitialized:function(o){v(o.element).addClass(e._getToolbarButtonClass(AJ))}},showText:"inMenu",name:"applyFilterButton",location:"after",locateInMenu:"auto",sortIndex:10};t.push(a)}return t},_isShowApplyFilterButton:function(){var e=this.option("filterRow");return e&&e.visible&&e.applyFilter==="onClick"},init:function(){this.callBase(),this._dataController=this.getController("data"),this._applyFilterViewController=this.getController("applyFilter")},enableApplyButton:function(e){this.setToolbarItemDisabled("applyFilterButton",!e)},isVisible:function(){return this.callBase()||this._isShowApplyFilterButton()},optionChanged:function(e){if(e.name==="filterRow")this._invalidate(),e.handled=!0;else if(e.name==="syncLookupFilterValues"){var t;(t=this.component.getView("columnHeadersView"))===null||t===void 0||t.updateLookupDataSource(),e.handled=!0}else this.callBase(e)}}}}};De.registerModule("filterRow",LJ);Co.setEditorClass(Zu);var BE="dx-header-filter",PJ="dx-header-filter-menu",FJ="text";function lR(e){e=e||[];for(var t=0;t<e.length;t++)e[t].selected=!1,lR(e[t].items)}function LE(e,t){if(!e.component.option("searchValue")){var i=v(e.element).find(".dx-list-select-all-checkbox").data("dxCheckBox");i&&t&&t.length&&i.option("value",void 0)}}function MJ(e,t){var i=t.headerFilter;return i&&E(i.allowSearch)?i.allowSearch:e.option("headerFilter.allowSearch")}function VJ(e,t,i){if(t^i){if(e.selected=!0,i&&e.items){for(var n=0;n<e.items.length;n++)if(!e.items[n].selected){e.selected=void 0;break}}}else(i||e.selected)&&(e.selected=!1,lR(e.items))}var NJ=Tt.View.inherit({getPopupContainer:function(){return this._popupContainer},getListContainer:function(){return this._listContainer},applyHeaderFilter:function(e){var t=this.getListContainer(),i=t.option("searchValue"),n=!i&&!e.isFilterBuilder&&t.$element().find(".dx-checkbox").eq(0).hasClass("dx-checkbox-checked"),r=[];n?(e.type==="tree"&&(e.filterType="exclude"),Array.isArray(e.filterValues)&&(e.filterValues=[])):e.type==="tree"&&(e.filterType&&(e.filterType="include"),function a(o,s,l){F(s,function(u,d){if(d.selected!==void 0&&!!d.selected^l){var c=t._getNode(d),h=t._hasChildren(c),f=h&&d.items&&d.items.some(p=>p.selected);if(!i||!f){o.push(d.value);return}}d.items&&d.items.length&&a(o,d.items,l)})}(r,t.option("items"),!1),e.filterValues=r),e.filterValues&&!e.filterValues.length&&(e.filterValues=null),e.apply(),this.hideHeaderFilterMenu()},showHeaderFilterMenu:function(e,t){if(t){this._initializePopupContainer(t);var i=this.getPopupContainer();this.hideHeaderFilterMenu(),this.updatePopup(e,t),i.show()}},hideHeaderFilterMenu:function(){var e=this.getPopupContainer();e&&e.hide()},updatePopup:function(e,t){var i=this.option("showColumnLines"),n=t.alignment==="right"^!i?"left":"right";this._popupContainer&&(this._cleanPopupContent(),this._popupContainer.option("position",{my:n+" top",at:n+" bottom",of:e,collision:"flip fit"}))},_getSearchExpr:function(e){var t=e.lookup,i=e.useDefaultSearchExpr,n=e.headerFilter&&e.headerFilter.dataSource;if(i||E(n)&&!Ee(n))return FJ;if(t)return t.displayExpr||"this";if(e.dataSource){var r=e.dataSource.group;if(Array.isArray(r)&&r.length>0)return r[0].selector;if(Ee(r)&&!e.remoteFiltering)return r}return e.dataField||e.selector},_cleanPopupContent:function(){this._popupContainer&&this._popupContainer.$content().empty()},_initializePopupContainer:function(e){var t=this,i=t.element(),n=t.option("headerFilter"),r=e.headerFilter&&e.headerFilter.width||n&&n.width,a=e.headerFilter&&e.headerFilter.height||n&&n.height,o={width:r,height:a,visible:!1,shading:!1,showTitle:!1,showCloseButton:!1,hideOnParentScroll:!1,dragEnabled:!1,hideOnOutsideClick:!0,focusStateEnabled:!1,copyRootClassesToWrapper:!0,_ignoreCopyRootClassesToWrapperDeprecation:!0,toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.texts.ok,onClick:function(){t.applyHeaderFilter(e)}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:n.texts.cancel,onClick:function(){t.hideHeaderFilterMenu()}}}],resizeEnabled:!0,onShowing:function(s){s.component.$content().parent().addClass("dx-dropdowneditor-overlay"),t._initializeListContainer(e),e.onShowing&&e.onShowing(s)},onShown:function(){t.getListContainer().focus()},onHidden:e.onHidden,onInitialized:function(s){var l=s.component;l.option("animation",l._getDefaultOptions().animation)}};E(t._popupContainer)?t._popupContainer.option(o):t._popupContainer=t._createComponent(i,pr,o)},_initializeListContainer:function(e){var t=this,i=t._popupContainer.$content(),n={searchEnabled:MJ(t,e),searchTimeout:t.option("headerFilter.searchTimeout"),searchMode:e.headerFilter&&e.headerFilter.searchMode||"",dataSource:e.dataSource,onContentReady:function(){t.renderCompleted.fire()},itemTemplate:function(a,o,s){var l=v(s);return e.encodeHtml?l.text(a.text):l.html(a.text)}};function r(a){a.fullName==="searchValue"&&!e.isFilterBuilder&&t.option("headerFilter.hideSelectAllOnSearch")!==!1&&(e.type==="tree"?a.component.option("showCheckBoxesMode",a.value?"normal":"selectAll"):a.component.option("selectionMode",a.value?"multiple":"all"))}e.type==="tree"?t._listContainer=t._createComponent(v("<div>").appendTo(i),ed,O(n,{showCheckBoxesMode:e.isFilterBuilder?"normal":"selectAll",onOptionChanged:r,keyExpr:"id"})):t._listContainer=t._createComponent(v("<div>").appendTo(i),Bo,O(n,{searchExpr:t._getSearchExpr(e),pageLoadMode:"scrollBottom",showSelectionControls:!0,selectionMode:e.isFilterBuilder?"multiple":"all",onOptionChanged:r,onSelectionChanged:function(a){var o=a.component.option("items"),s=a.component.option("selectedItems");if(!a.component._selectedItemsUpdating&&!a.component.option("searchValue")&&!e.isFilterBuilder){var l=e.filterValues||[],u=e.filterType==="exclude";s.length===0&&o.length&&(l.length<=1||u&&l.length===o.length-1)?(e.filterType="include",e.filterValues=[]):s.length===o.length&&(e.filterType="exclude",e.filterValues=[])}F(o,function(d,c){var h=xe.getIndexByKey(c,s,null)>=0,f=!!c.selected;if(f!==h){c.selected=h,e.filterValues=e.filterValues||[];var p=xe.getIndexByKey(c.value,e.filterValues,null);p>=0&&e.filterValues.splice(p,1),h^e.filterType==="exclude"&&e.filterValues.push(c.value)}}),LE(a,e.filterValues)},onContentReady:function(a){var o=a.component,s=o.option("items"),l=[];F(s,function(){this.selected&&l.push(this)}),o._selectedItemsUpdating=!0,o.option("selectedItems",l),o._selectedItemsUpdating=!1,LE(a,e.filterValues)}}))},_renderCore:function(){this.element().addClass(PJ)}}),lf=function(e){return E(e.allowHeaderFiltering)?e.allowHeaderFiltering:e.allowFiltering},uR={_applyColumnState:function(e){var t,i=e.rootElement,n=e.column;return e.name==="headerFilter"?(i.find("."+BE).remove(),lf(n)&&(t=this.callBase(e).toggleClass("dx-header-filter-empty",this._isHeaderFilterEmpty(n)),this.option("useLegacyKeyboardNavigation")||t.attr("tabindex",this.option("tabindex")||0)),t):this.callBase(e)},_isHeaderFilterEmpty:function(e){return!e.filterValues||!e.filterValues.length},_getIndicatorClassName:function(e){return e==="headerFilter"?BE:this.callBase(e)},_renderIndicator:function(e){var t=e.container,i=e.indicator;if(e.name==="headerFilter"){var n=this.option("rtlEnabled");if(t.children().length&&(!n&&e.columnAlignment==="right"||n&&e.columnAlignment==="left")){t.prepend(i);return}}this.callBase(e)},optionChanged:function(e){if(e.name==="headerFilter"){var t=this.name==="columnHeadersView";this._invalidate(t,t),e.handled=!0}else this.callBase(e)}},HJ={month:function(e){return Ze.getMonthNames()[e-1]},quarter:function(e){return Ze.format(new Date(2e3,3*e-1),"quarter")}};function dR(e,t,i){return t=t||[],i=i||[],e.forEach(n=>{if(E(n.key)){var r=t.length===1;if(t.push(r?n.key-1:n.key),n.items)dR(n.items,t,i);else{var a=new Date(Date.UTC.apply(Date,t));i.push(a)}t.pop()}else i.push(null)}),i}function $J(e,t){var i=dR(e),n=Gi(i),r=xe.getHeaderFilterGroupParameters(be({},t,{calculateCellValue:a=>a}));return Wr.queryByOptions(n,{group:r}).toArray()}function WJ(e){return(e==null?void 0:e.slice(-1))==="Z"||(e==null?void 0:e.slice(-3))==="'Z'"}var zJ=Tt.ViewController.inherit({init:function(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._headerFilterView=this.getView("headerFilterView")},_updateSelectedState:function(e,t){for(var i=e.length,n=t.filterType==="exclude";i--;){var r=e[i];"items"in e[i]&&this._updateSelectedState(e[i].items,t),VJ(r,xe.getIndexByKey(e[i].value,t.filterValues,null)>-1,n)}},_normalizeGroupItem:function(e,t,i){var n,r,a=i.path,o=i.valueSelector,s=i.displaySelector,l=i.column;return o&&s?(n=o(e),r=s(e)):(n=e.key,r=n),He(e)?e=O({},e):e={},a.push(n),a.length===1?e.value=a[0]:e.value=a.join("/"),e.text=this.getHeaderItemText(r,l,t,i.headerFilterOptions),e},getHeaderItemText:function(e,t,i,n){var r=xe.formatValue(e,function(a,o,s){var l=As.getGroupInterval(o),u=xe.getFormatOptionsByColumn(o,"headerFilter");return l&&(u.groupInterval=l[s],xe.isDateType(o.dataType)?u.format=HJ[l[s]]:o.dataType==="number"&&(u.getDisplayFormat=function(){var d={format:o.format,target:"headerFilter"},c=xe.formatValue(a,d),h=a+l[s],f=xe.formatValue(h,d);return c&&f?c+" - "+f:""})),u}(e,t,i));return r||(r=n.texts.emptyValue),r},_processGroupItems:function(e,t,i,n){var r,a,o=n.column,s=o.lookup,l=n.level;i=i||[],t=t||0,s&&(r=mt(s.displayExpr),a=mt(s.valueExpr));for(var u=0;u<e.length;u++)e[u]=this._normalizeGroupItem(e[u],t,{column:n.column,headerFilterOptions:n.headerFilterOptions,displaySelector:r,valueSelector:a,path:i}),"items"in e[u]&&(t===l||!E(e[u].value)?delete e[u].items:this._processGroupItems(e[u].items,t+1,i,n)),i.pop()},getDataSource:function(e){var t,i=this._dataController.dataSource(),n=i==null?void 0:i.remoteOperations().grouping,r=xe.getHeaderFilterGroupParameters(e,n),a=(t=e.headerFilter)===null||t===void 0?void 0:t.dataSource,o=this.option("headerFilter"),s=!1,l={component:this.component};if(i){if(E(a)&&!Ee(a))l.dataSource=Ws(a);else if(e.lookup)if(s=!0,this.option("syncLookupFilterValues")){this._currentColumn=e;var u=this._dataController.getCombinedFilter();this._currentColumn=null,l.dataSource=xe.getWrappedLookupDataSource(e,i,u)}else l.dataSource=xe.normalizeLookupDataSource(e.lookup);else{var d=Array.isArray(r)?r.length-1:0;this._currentColumn=e;var c=this._dataController.getCombinedFilter();this._currentColumn=null,l.dataSource={filter:c,group:r,useDefaultSearch:!0,load:p=>{var g=new te;return p.dataField=e.dataField||e.name,i.load(p).done(function(m){var C=n&&WJ(e.serializationFormat)&&d>3;C&&(m=$J(m,e)),f._processGroupItems(m,null,null,{level:d,column:e,headerFilterOptions:o}),g.resolve(m)}).fail(g.reject),g}}}Ee(a)&&a.call(e,l);var h=l.dataSource.postProcess,f=this;return l.dataSource.postProcess=function(p){var g=p;return s&&(this.pageIndex()===0&&!this.searchValue()&&(g=g.slice(0),g.unshift(null)),f._processGroupItems(g,null,null,{level:0,column:e,headerFilterOptions:o})),g=h&&h.call(this,g)||g,f._updateSelectedState(g,e),g},l.dataSource}},getCurrentColumn:function(){return this._currentColumn},showHeaderFilterMenu:function(e,t){var i=this._columnsController,n=O(!0,{},this._columnsController.getColumns()[e]);if(n){var r=i.getVisibleIndex(e),a=t?this.getView("headerPanel"):this.getView("columnHeadersView"),o=o||a.getColumnElements().eq(t?n.groupIndex:r);this.showHeaderFilterMenuBase({columnElement:o,column:n,applyFilter:!0,apply:function(){i.columnOption(e,{filterValues:this.filterValues,filterType:this.filterType})}})}},showHeaderFilterMenuBase:function(e){var t=this,i=e.column;if(i){var n=As.getGroupInterval(i),r=t._dataController.dataSource(),a=r&&r.remoteOperations().filtering;O(e,i,{type:n&&n.length>1?"tree":"list",remoteFiltering:a,onShowing:function(o){var s=o.component.$overlayContent().dxResizable("instance");s&&s.option("onResizeEnd",function(l){var u=t.getController("columns"),d=u.columnOption(e.dataField,"headerFilter");d=d||{},d.width=l.width,d.height=l.height,u.columnOption(e.dataField,"headerFilter",d,!0)})},onHidden:()=>Pm(this)}),e.dataSource=t.getDataSource(e),e.isFilterBuilder&&(e.dataSource.filter=null,e.alignment="right"),t._headerFilterView.showHeaderFilterMenu(e.columnElement,e)}},hideHeaderFilterMenu:function(){this._headerFilterView.hideHeaderFilterMenu()}}),GJ=O({},uR,{_renderCellContent:function(e,t){var i,n=t.column;!n.command&&lf(n)&&this.option("headerFilter.visible")&&t.rowType==="header"&&(i=this._applyColumnState({name:"headerFilter",rootElement:e,column:n,showColumnLines:this.option("showColumnLines")}),i&&this._subscribeToIndicatorEvent(i,n,"headerFilter")),this.callBase(e,t)},_subscribeToIndicatorEvent:function(e,t,i){var n=this;i==="headerFilter"&&D.on(e,ct,n.createAction(function(r){r.event.stopPropagation(),n.getController("headerFilter").showHeaderFilterMenu(t.index,!1)}))},_updateIndicator:function(e,t,i){var n=this.callBase(e,t,i);n&&this._subscribeToIndicatorEvent(n,t,i)},_updateHeaderFilterIndicators:function(){this.option("headerFilter.visible")&&this._updateIndicators("headerFilter")},_needUpdateFilterIndicators:function(){return!0},_columnOptionChanged:function(e){var t=e.optionNames;if(xe.checkChanges(t,["filterValues","filterType"])){this._needUpdateFilterIndicators()&&this._updateHeaderFilterIndicators();return}this.callBase(e)}}),UJ=O({},uR,{_createGroupPanelItem:function(e,t){var i=this,n=i.callBase.apply(i,arguments),r;return!t.command&&lf(t)&&i.option("headerFilter.visible")&&(r=i._applyColumnState({name:"headerFilter",rootElement:n,column:{alignment:wa(i.option("rtlEnabled")),filterValues:t.filterValues,allowHeaderFiltering:!0},showColumnLines:!0}),r&&D.on(r,ct,i.createAction(function(a){var o=a.event;o.stopPropagation(),i.getController("headerFilter").showHeaderFilterMenu(t.index,!0)}))),n}}),KJ={skipCalculateColumnFilters:function(){return!1},_calculateAdditionalFilter:function(){if(this.skipCalculateColumnFilters())return this.callBase();var e=[this.callBase()],t=this._columnsController.getVisibleColumns(null,!0),i=this.getController("headerFilter"),n=i.getCurrentColumn();return F(t,function(r,a){var o;if(!(n&&n.index===a.index)&&lf(a)&&a.calculateFilterExpression&&Array.isArray(a.filterValues)&&a.filterValues.length){var s=[];F(a.filterValues,function(l,u){Array.isArray(u)?o=u:(a.deserializeValue&&!xe.isDateType(a.dataType)&&a.dataType!=="number"&&(u=a.deserializeValue(u)),o=a.createFilterExpression(u,"=","headerFilter")),o&&(o.columnIndex=a.index),s.push(o)}),s=xe.combineFilters(s,"or"),e.push(a.filterType==="exclude"?["!",s]:s)}}),xe.combineFilters(e)}},jJ={defaultOptions:function(){return{syncLookupFilterValues:!0,headerFilter:{visible:!1,width:252,height:325,allowSearch:!1,searchTimeout:500,texts:{emptyValue:ue.format("dxDataGrid-headerFilterEmptyValue"),ok:ue.format("dxDataGrid-headerFilterOK"),cancel:ue.format("dxDataGrid-headerFilterCancel")}}}},controllers:{headerFilter:zJ},views:{headerFilterView:NJ},extenders:{controllers:{data:KJ},views:{columnHeadersView:GJ,headerPanel:UJ}}};De.registerModule("headerFilter",jJ);var uf="dx-filterbuilder-range",qJ=uf+"-start",YJ=uf+"-end",XJ=uf+"-separator",cR="–";function ZJ(e,t){var i=v("<div>").addClass(qJ),n=v("<div>").addClass(YJ),r=e.value||[],a=function(s){return s&&s.length>0?s[0]:null},o=function(s){return s&&s.length===2?s[1]:null};t.append(i),t.append(v("<span>").addClass(XJ).text(cR)),t.append(n),t.addClass(uf),this._editorFactory.createEditor.call(this,i,O({},e.field,e,{value:a(r),parentType:"filterBuilder",setValue:function(s){r=[s,o(r)],e.setValue(r)}})),this._editorFactory.createEditor.call(this,n,O({},e.field,e,{value:o(r),parentType:"filterBuilder",setValue:function(s){r=[a(r),s],e.setValue(r)}}))}function PE(e,t){return{name:"between",caption:e,icon:"range",valueSeparator:cR,dataTypes:["number","date","datetime"],editorTemplate:ZJ.bind(t),notForLookup:!0}}var QJ={"=":"equal","<>":"notequal","<":"less","<=":"lessorequal",">":"greater",">=":"greaterorequal",notcontains:"doesnotcontain",contains:"contains",startswith:"startswith",endswith:"endswith",isblank:"isblank",isnotblank:"isnotblank"},JJ={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",isblank:"isBlank",isnotblank:"isNotBlank",between:"between"};const hR={getIconByFilterOperation:function(e){return QJ[e]},getNameByFilterOperation:function(e){return JJ[e]}};var TC="string",FE="icon-none",ya="and",AC="=",eee="<>",tee={number:["=","<>","<",">","<=",">=","isblank","isnotblank"],string:["contains","notcontains","startswith","endswith","=","<>","isblank","isnotblank"],date:["=","<>","<",">","<=",">=","isblank","isnotblank"],datetime:["=","<>","<",">","<=",">=","isblank","isnotblank"],boolean:["=","<>","isblank","isnotblank"],object:["isblank","isnotblank"]},iee={date:"shortDate",datetime:"shortDateShortTime"},nee=["=","<>","isblank","isnotblank"],ree=["caption","customizeText","dataField","dataType","editorTemplate","falseText","editorOptions","filterOperations","format","lookup","trueText","calculateFilterExpression","name"],aee="dx-filterbuilder",fR=aee+"-text",oee=fR+"-part",pR=fR+"-separator",see=pR+"-empty";function lee(e,t){var i=e.format||iee[e.dataType];return bA.format(t,i)}function xo(e){return e&&e.length>1&&e[0]==="!"&&!Ei(e)}function Da(e){return xo(e)?e[1]:e}function uee(e,t){return xo(e)?e[1]=t:e=t,e}function dee(e,t){(function(i){return i.indexOf("!")!==-1})(t)?xo(e)||function(i){var n=i.slice(0);i.length=0,i.push("!",n)}(e):xo(e)&&function(i){var n=Da(i);i.length=0,[].push.apply(i,n)}(e)}function cee(e,t){dee(e,t);var i=Da(e),n;return t=function(r){return r.indexOf("!")===-1?r:r.substring(1)}(t),function(r,a){for(n=0;n<r.length;n++)Array.isArray(r[n])||(r[n]=a)}(i,t),e}function hee(e,t){var i=Fo(e);return t.filter(function(n){return n.value===i})[0]}function vR(e){if(Ei(e))return ya;for(var t="",i=0;i<e.length;i++){var n=e[i];if(!Array.isArray(n)){if(t&&t!==n)throw new ni.Error("E4019");n!=="!"&&(t=n)}}return t}function Fo(e){var t=Da(e),i=vR(t);return i||(i=ya),t!==e&&(i="!"+i),i}function fee(e){return e.lookup&&nee||tee[e.dataType||TC]}function pee(e){return Array.isArray(e)&&e.length}function _R(e){var t=pee(e.filterOperations)?e.filterOperations:fee(e);return O([],t)}function fg(e,t){var i=hR.getNameByFilterOperation(e);return t&&t[i]?t[i]:i}function vee(e,t){for(var i=0;i<t.length;i++)if(t[i].value===e)return t[i];throw new Je.Error("E1048",e)}function Fr(e,t){var i=e.filter(function(n){return n.name===t});return i.length?i[0]:null}function _ee(e,t,i){var n=_R(e),r=!!e.lookup;return i.forEach(function(a){if(!e.filterOperations&&n.indexOf(a.name)===-1){var o=a&&a.dataTypes,s=r?!!a.notForLookup:!1;!s&&o&&o.indexOf(e.dataType||TC)>=0&&n.push(a.name)}}),n.map(function(a){var o=Fr(i,a);return o?{icon:o.icon||FE,text:o.caption||uo(o.name),value:o.name,isCustom:!0}:{icon:hR.getIconByFilterOperation(a)||FE,text:fg(a,t),value:a}})}function DC(e){return e.defaultFilterOperation||_R(e)[0]}function gee(e,t){var i=[e.dataField,"",""],n=DC(e);return vg(i,n,t),i}function pg(e,t){var i=Da(e),n=i.indexOf(t);return i.splice(n,1),i.length!==1&&i.splice(n,1),e}function gR(e){var t=OC(e),i=t?RC(e):e;return t?["!",[i]]:[i]}function _h(e,t){var i=Da(t),n=Fo(i);return i.length===1?i.unshift(e):i.push(e,n),t}function gh(e,t){for(var i=0;i<t.length;i++)if(t[i].name===e||t[i].dataField.toLowerCase()===e.toLowerCase())return t[i];var n=SR(t,!0).filter(function(r){return r.dataField.toLowerCase()===e.toLowerCase()});if(n.length>0)return n[0];throw new Je.Error("E1047",e)}function Oa(e){return Array.isArray(e)?e.length<2||Array.isArray(e[0])||Array.isArray(e[1]):!1}function Ei(e){return Array.isArray(e)?e.length>1&&!Array.isArray(e[0])&&!Array.isArray(e[1]):!1}function ME(e,t,i){i=i||ya;for(var n=vR(e).toLowerCase()||i,r=[],a=0;a<e.length;a++)Oa(e[a])?(r.push(kC(e[a],t,i)),r=Ov(r,n)):Ei(e[a])&&(r.push(mh(e[a],t)),r=Ov(r,n));return r.length===0&&(r=Ov(r,n)),r}function mee(e,t){var i=Fr(t,e[1]);return i&&i.name===e[1]}function mh(e,t){return mee(e,t)||e.length<3&&(e[2]=e[1],e[1]=AC),e}function OC(e){return e.indexOf("not")!==-1}function RC(e){return e.substring(3).toLowerCase()}function Dv(e,t){var i=OC(t);return t=i?RC(t):t,i?["!",e,t]:[e,t]}function Ov(e,t){var i=OC(t);t=i?RC(t):t,e.push(t);var n=e;return i&&(n=["!",n]),n}function kC(e,t,i){return i=i||ya,e?(e=O(!0,[],e),Ei(e)?Dv(mh(e,t),i):xo(e)?["!",Ei(e[1])?Dv(mh(e[1],t),i):xo(e[1])?Dv(kC(e[1],t),i):ME(e[1],t,i)]:ME(e,t,i)):gR(i)}function Cee(e){return e.reduce(function(t,i){if(E(i.dataField)){var n={};for(var r in i)i[r]&&ree.indexOf(r)>-1&&(n[r]=i[r]);n.defaultCalculateFilterExpression=As.defaultCalculateFilterExpression,E(n.dataType)||(n.dataType=TC),E(n.trueText)||(n.trueText=ue.format("dxDataGrid-trueText")),E(n.falseText)||(n.falseText=ue.format("dxDataGrid-falseText")),t.push(n)}return t},[])}function VE(e,t,i,n){var r=gh(e[0],t),a=mh(e,i),o=i.length&&Fr(i,a[1]);return o&&o.calculateFilterExpression?o.calculateFilterExpression.apply(o,[a[2],r,t]):r.createFilterExpression?r.createFilterExpression.apply(r,[a[2],a[1],n]):r.calculateFilterExpression?r.calculateFilterExpression.apply(r,[a[2],a[1],n]):r.defaultCalculateFilterExpression.apply(r,[a[2],a[1],n])}function ks(e,t,i,n){if(!E(e))return null;if(xo(e)){var r=ks(e[1],t,i,n);return["!",r]}var a=Da(e);if(Ei(a))return VE(a,t,i,n)||null;for(var o=[],s,l=Fo(a),u=0;u<a.length;u++)Oa(a[u])?(s=ks(a[u],t,i,n),s&&(u&&o.push(l),o.push(s))):Ei(a[u])&&(s=VE(a[u],t,i,n),s&&(o.length&&o.push(l),o.push(s)));return o.length===1&&(o=o[0]),o.length?o:null}function Zl(e){var t=Da(e),i;if(t.length===0)return null;var n=[];for(i=0;i<t.length;i++)if(Oa(t[i])){var r=Zl(t[i]);r?t[i]=r:n.push(t[i])}else Ei(t[i])&&(xee(t[i])||n.push(t[i]));for(i=0;i<n.length;i++)pg(t,n[i]);return t.length===1||(t.splice(t.length-1,1),t.length===1&&(e=uee(e,t[0])),e.length===0)?null:e}function mR(e,t,i){if(t===""){i("");return}var n=e.lookup;if(n.items)i(n.calculateCellValue(t)||"");else{var r=Ee(n.dataSource)?n.dataSource({}):n.dataSource,a=new lr(r);a.loadSingle(n.valueExpr,t).done(function(o){var s="";o&&(s=n.displayExpr?mt(n.displayExpr)(o):o),e.customizeText&&(s=e.customizeText({value:t,valueText:s})),i(s)}).fail(function(){i("")})}}function CR(e,t,i,n,r){var a;return t===!0?a=e.trueText||ue.format("dxDataGrid-trueText"):t===!1?a=e.falseText||ue.format("dxDataGrid-falseText"):a=lee(e,t),e.customizeText&&(a=e.customizeText.call(e,{value:t,valueText:a,target:n})),i&&i.customizeText&&(a=i.customizeText.call(i,{value:t,valueText:a,field:e,target:n},r)),a}function yee(e,t,i,n){var r={values:t};return t.map(a=>CR(e,a,i,n,r))}function Rv(e){return e===""||e===null}function yR(e,t,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"filterBuilder";if(Rv(t))return"";if(Array.isArray(t)){var r=new te;return Ae.apply(this,yee(e,t,i,n)).done(function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=o.some(u=>!Rv(u))?o.map(u=>Rv(u)?"?":u):"";r.resolve(l)}),r}else return CR(e,t,i,n)}function NE(e,t){return e.some(function(i){return i.dataField===t})}function xR(e,t,i){var n=i.dataField;BC(n)&&(i.parentId=ER(n),!NE(t,i.parentId)&&!NE(e,i.parentId)&&xR(e,t,{id:i.parentId,dataType:"object",dataField:i.parentId,caption:bR(i.parentId,!0),filterOperations:["isblank","isnotblank"]})),t.push(i)}function bR(e,t){var i="";if(t)e=e.substring(e.lastIndexOf(".")+1);else if(BC(e))return e.split(".").forEach(function(n,r,a){i+=uo(n),r!==a.length-1&&(i+=".")}),i;return uo(e)}function SR(e,t){for(var i=[],n=0;n<e.length;n++){var r=O(!0,{caption:bR(e[n].dataField,t)},e[n]);r.id=r.name||r.dataField,t?xR(e,i,r):i.push(r)}return i}function BC(e){return e.lastIndexOf(".")!==-1}function ER(e){return e.substring(0,e.lastIndexOf("."))}function wR(e,t){if(BC(e.dataField)){for(var i=ER(e.dataField),n=0;n<t.length;n++)if(t[n].dataField===i)return wR(t[n],t)+"."+e.caption}return e.caption}function vg(e,t,i){var n=Fr(i,t);return n?(n.hasValue===!1?(e[1]=t,e.length=2):(e[1]=t,e[2]=""),e):(t==="isblank"?(e[1]=AC,e[2]=null):t==="isnotblank"?(e[1]=eee,e[2]=null):(n=Fr(i,e[1]),(n||e.length===2||e[2]===null)&&(e[2]=""),e[1]=t),e)}function HE(e){var t;return e[2]===null?e[1]===AC?t="isblank":t="isnotblank":t=e[1],t}function xee(e){return e[2]!==""}function bee(e,t,i){var n=O(!0,[],e),r=-1;return n.some(function(a,o){if(a.name==="between")return r=o,!0}),r!==-1?n[r]=O(PE(t,i),n[r]):n.unshift(PE(t,i)),n}function vu(e,t){return e[0]===t}function _g(e,t){if(!e||e.length===0)return null;if(Ei(e)){var i=vu(e,t);return i?null:e}else return IR(e,[t],!1)}function IR(e,t,i){var n=[];return e.forEach(function(r){Ei(r)?vu(r,t[0])?i?(n.push(t),i=!1):n.splice(n.length-1,1):n.push(r):(n.length||Oa(r))&&n.push(r)}),n.length===0?null:(i&&(n.push(ya),n.push(t)),n.length===1?n[0]:n)}function $E(e,t){if(e===null||e.length===0)return t;if(Ei(e))return vu(e,t[0])?t:[e,ya,t];var i=Fo(e);return i!==ya?[t,"and",e]:IR(e,t,!0)}function See(e,t){if(e===null||e.length===0)return[];if(Ei(e))return vu(e,t)?[e]:[];var i=Fo(e);if(i!==ya)return[];var n=e.filter(function(r){return Ei(r)&&vu(r,t)});return n}function TR(e,t){return e===null||e.length===0?!1:Ei(e)?e[0]===t:e.some(function(i){return(Ei(i)||Oa(i))&&TR(i,t)})}var gg=function(e,t,i){if(Array.isArray(t)){var n=t.length-1;e.empty(),t.forEach((r,a)=>{v("<span>").addClass(oee).text(r).appendTo(e),a!==n&&v("<span>").addClass(pR).text(i&&i.valueSeparator?i.valueSeparator:"|").addClass(see).appendTo(e)})}else t?e.text(t):e.text(ue.format("dxFilterBuilder-enterValueText"))};function AR(e){var t=function(n,r){return r?r+"/"+n:n},i=e&&e.getController("headerFilter");return{dataTypes:["string","date","datetime","number","boolean","object"],calculateFilterExpression:function(n,r,a){var o=[],s=n.length-1;return n&&n.forEach(function(l,u){if(Ei(l)||Oa(l)){var d=ks(l,a,[],"headerFilter");o.push(d)}else o.push(ks([r.dataField,"=",l],a,[],"headerFilter"));u!==s&&o.push("or")}),o.length===1&&(o=o[0]),o},editorTemplate:function(n,r){var a=v("<div>").addClass("dx-filterbuilder-item-value-text").appendTo(r),o=O(!0,{},e.columnOption(n.field.dataField));return gg(a,n.text&&n.text.split("|")),o.filterType="include",o.filterValues=n.value?n.value.slice():[],i.showHeaderFilterMenuBase({columnElement:a,column:o,apply:function(){s=this.filterValues,n.setValue(s);var s;i.hideHeaderFilterMenu(),n.closeEditor()},onHidden:function(){n.closeEditor()},isFilterBuilder:!0}),r},customizeText:function(n,r){r=r||{};var a=n.value,o=e.columnOption(n.field.dataField),s=o&&o.headerFilter,l=o&&o.lookup,u=r.values||[a];if(s&&s.dataSource||l&&l.dataSource){var d=new te,c=r.items||new te;if(!r.items){o=O({},o,{filterType:"include",filterValues:u});var h=i.getDataSource(o);h.paginate=!1;var f=new lr(h),p=f.store().key();if(p){var{values:g}=r;if(g&&g.length>1){var m=g.reduce((x,T)=>(x.length&&x.push("or"),x.push([p,"=",T]),x),[]);f.filter(m)}else f.filter([p,"=",n.value])}else n.field.calculateDisplayValue&&Je.log("W1017");r.items=c,f.load().done(c.resolve)}return c.done(x=>{var T=u.indexOf(n.value);d.resolve(function R(A,H){var $=[];return A.forEach(function(V){if(V.items){var U=R(V.items,t(V.text,H));$=$.concat(U)}V.selected&&$.push(t(V.text,H))}),$}(x)[T])}),d}else{var C=i.getHeaderItemText(a,o,0,e.option("headerFilter"));return C}}}}function Eee(e){return O(AR(e),{name:"anyof",icon:"selectall",caption:ue.format("dxFilterBuilder-filterOperationAnyOf")})}function wee(e){var t=AR(e);return O({},t,{calculateFilterExpression:function(i,n,r){var a=t.calculateFilterExpression(i,n,r);return!a||a.length===0?null:a[0]==="!"?a:["!",a]},name:"noneof",icon:"unselectall",caption:ue.format("dxFilterBuilder-filterOperationNoneOf")})}var Iee=["=","<>","<","<=",">",">=","notcontains","contains","startswith","endswith","between"],WE="include",Ql="exclude";function Qn(e){return e.name||e.dataField}function Tee(e){e.forEach(t=>{var i=Qn(t);if(!E(i)&&t.allowFiltering)throw new Je.Error("E1049",t.caption)})}var Aee=Tt.Controller.inherit(function(){var e=function(){return{filterType:WE,filterValues:void 0}},t=function(o){var s=o.filterValues||[];return!As.getGroupInterval(o)&&!(o.headerFilter&&o.headerFilter.dataSource)||s.length===1&&s[0]===null},i=function(o){var s=o.filterValue;if(E(s)){var l=o.selectedFilterOperation||o.defaultFilterOperation||DC(o),u=[Qn(o),l,o.filterValue];return u}else return null},n=function(o){var s,l,u=o.filterValues;return u?(u.length===1&&t(o)&&!Array.isArray(u[0])?(o.filterType===Ql?s="<>":s="=",l=u[0]):(o.filterType===Ql?s="noneof":s="anyof",l=u),[Qn(o),s,l]):null},r=function(o,s,l){var u=function(d,c){if(!d)return e();var h,f=d[1],p=d[2],g=Array.isArray(p);if(!g&&!t(c))return e();switch(f){case"anyof":case"=":h=WE;break;case"noneof":case"<>":h=Ql;break;default:return e()}return{filterType:h,filterValues:g?p:[p]}}(l,s);o.columnOption(Qn(s),u)},a=function(o,s,l){var u,d=l==null?void 0:l[1],c=l==null?void 0:l[2],h=s.filterOperations||s.defaultFilterOperations;(!h||h.indexOf(d)>=0||d===s.defaultFilterOperation)&&Iee.indexOf(d)>=0&&c!==null?(d===s.defaultFilterOperation&&!E(s.selectedFilterOperation)&&(d=s.selectedFilterOperation),u={filterValue:c,selectedFilterOperation:d}):u={filterValue:void 0,selectedFilterOperation:void 0},o.columnOption(Qn(s),u)};return{syncFilterValue:function(){var o=this,s=o.getController("columns"),l=s.getFilteringColumns();this._skipSyncColumnOptions=!0,l.forEach(function(u){var d=See(o.option("filterValue"),Qn(u));if(d.length===1){var c=d[0];r(s,u,c),a(s,u,c)}else E(u.filterValues)&&r(s,u),E(u.filterValue)&&a(s,u)}),this._skipSyncColumnOptions=!1},_initSync:function(){var o=this.getController("columns").getColumns(),s=this.getController("data"),l=s.pageIndex();if(Tee(o),!this.option("filterValue")){var u=this.getController("columns").getFilteringColumns(),d=this.getFilterValueFromColumns(u);this.option("filterValue",d)}this.syncFilterValue(),s.pageIndex(l)},init:function(){var o=this.getController("data");o.isFilterSyncActive()&&(this.getController("columns").isAllDataTypesDefined()?this._initSync():o.dataSourceChanged.add(()=>this._initSync()))},_getSyncFilterRow:function(o,s){var l=i(s);return E(l)?$E(o,l):_g(o,Qn(s))},_getSyncHeaderFilter:function(o,s){var l=n(s);return l?$E(o,l):_g(o,Qn(s))},getFilterValueFromColumns:function(o){if(!this.getController("data").isFilterSyncActive())return null;var s=["and"];return o&&o.forEach(l=>{var u=n(l),d=i(l);u&&_h(u,s),d&&_h(d,s)}),Zl(s)},syncFilterRow:function(o,s){this.option("filterValue",this._getSyncFilterRow(this.option("filterValue"),o))},syncHeaderFilter:function(o){this.option("filterValue",this._getSyncHeaderFilter(this.option("filterValue"),o))},getCustomFilterOperations:function(){var o=this.option("filterBuilder.customOperations")||[];return[Eee(this.component),wee(this.component)].concat(o)},publicMethods:function(){return["getCustomFilterOperations"]}}}()),Dee={isFilterSyncActive:function(){var e=this.option("filterSyncEnabled");return e==="auto"?this.option("filterPanel.visible"):e},skipCalculateColumnFilters:function(){return E(this.option("filterValue"))&&this.isFilterSyncActive()},_calculateAdditionalFilter:function(){if(this.option("filterPanel.filterEnabled")===!1)return this.callBase();var e=[this.callBase()],t=this.getController("columns").getFilteringColumns(),i=this.option("filterValue");if(this.isFilterSyncActive()){var n=this.getController("headerFilter").getCurrentColumn();n&&i&&(i=_g(i,Qn(n)))}var r=this.getController("filterSync").getCustomFilterOperations(),a=ks(i,t,r,"filterBuilder");return a&&e.push(a),xe.combineFilters(e)},_parseColumnPropertyName:function(e){var t=e.match(/.*\.(.*)/);return t?t[1]:null},clearFilter:function(e){this.component.beginUpdate(),arguments.length>0?(e==="filterValue"&&this.option("filterValue",null),this.callBase(e)):(this.option("filterValue",null),this.callBase()),this.component.endUpdate()},optionChanged:function(e){switch(e.name){case"filterValue":this._applyFilter(),this.isFilterSyncActive()&&this.getController("filterSync").syncFilterValue(),e.handled=!0;break;case"filterSyncEnabled":e.handled=!0;break;case"columns":if(this.isFilterSyncActive()){var t=this.getController("columns").getColumnByPath(e.fullName),i=this.getController("filterSync");if(t&&!i._skipSyncColumnOptions){var n=this._parseColumnPropertyName(e.fullName);i._skipSyncColumnOptions=!0,n==="filterType"?(Ql===e.value||Ql===e.previousValue)&&i.syncHeaderFilter(t):n==="filterValues"?i.syncHeaderFilter(t):["filterValue","selectedFilterOperation"].indexOf(n)>-1&&i.syncFilterRow(t,t.filterValue),i._skipSyncColumnOptions=!1}}this.callBase(e);break;default:this.callBase(e)}}},Oee={_isHeaderFilterEmpty:function(e){return this.getController("data").isFilterSyncActive()?!TR(this.option("filterValue"),Qn(e)):this.callBase(e)},_needUpdateFilterIndicators:function(){return!this.getController("data").isFilterSyncActive()},optionChanged:function(e){e.name==="filterValue"?this._updateHeaderFilterIndicators():this.callBase(e)}},Ree={defaultOptions:function(){return{filterValue:null,filterSyncEnabled:"auto"}},controllers:{filterSync:Aee},extenders:{controllers:{data:Dee},views:{columnHeadersView:Oee}}};De.registerModule("filterSync",Ree);var vn="dx-filterbuilder",Bs=vn+"-group",zE=Bs+"-item",GE=Bs+"-content",kee=Bs+"-operations",Bee=Bs+"-operation",mg=vn+"-action",UE=mg+"-icon",Lee="dx-icon-plus",Pee="dx-icon-remove",yl=vn+"-text",Fee=vn+"-item-field",Mee=vn+"-item-operation",KE=vn+"-item-value",Vee=vn+"-item-value-text",Nee=vn+"-overlay",Hee=vn+"-operations",$ee=vn+"-fields",Wee=vn+"-add-condition",tc="dx-state-active",zee=vn+"-menu-custom-operation",jE="filterBuilder",Gee="dx-state-disabled",qE="tab",kv="enter",YE="escape",Uee=[{name:"onEditorPreparing",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onEditorPrepared",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onValueChanged",config:{excludeValidators:["disabled","readOnly"]}}],XE={and:"and",or:"or",notAnd:"!and",notOr:"!or"},Kee=nt.inherit(S1),DR=pi.inherit({_getDefaultOptions:function(){return O(this.callBase(),{onEditorPreparing:null,onEditorPrepared:null,onValueChanged:null,fields:[],groupOperations:["and","or","notAnd","notOr"],maxGroupLevel:void 0,value:null,allowHierarchicalFields:!1,groupOperationDescriptions:{and:ue.format("dxFilterBuilder-and"),or:ue.format("dxFilterBuilder-or"),notAnd:ue.format("dxFilterBuilder-notAnd"),notOr:ue.format("dxFilterBuilder-notOr")},customOperations:[],closePopupOnTargetScroll:!0,filterOperationDescriptions:{between:ue.format("dxFilterBuilder-filterOperationBetween"),equal:ue.format("dxFilterBuilder-filterOperationEquals"),notEqual:ue.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:ue.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:ue.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:ue.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:ue.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:ue.format("dxFilterBuilder-filterOperationStartsWith"),contains:ue.format("dxFilterBuilder-filterOperationContains"),notContains:ue.format("dxFilterBuilder-filterOperationNotContains"),endsWith:ue.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:ue.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:ue.format("dxFilterBuilder-filterOperationIsNotBlank")}})},_optionChanged:function(e){switch(e.name){case"closePopupOnTargetScroll":break;case"onEditorPreparing":case"onEditorPrepared":case"onValueChanged":this._initActions();break;case"customOperations":this._initCustomOperations(),this._invalidate();break;case"fields":case"maxGroupLevel":case"groupOperations":case"allowHierarchicalFields":case"groupOperationDescriptions":case"filterOperationDescriptions":this._invalidate();break;case"value":if(e.value!==e.previousValue){var t=this._disableInvalidateForValue;t||(this._initModel(),this._invalidate()),this._disableInvalidateForValue=!1,this.executeAction("onValueChanged",{value:e.value,previousValue:e.previousValue}),this._disableInvalidateForValue=t}break;default:this.callBase(e)}},getFilterExpression:function(){var e=this._getNormalizedFields(),t=O(!0,[],this._model);return ks(Zl(t),e,this._customOperations,jE)},_getNormalizedFields:function(){return Cee(this.option("fields"))},_updateFilter:function(){this._disableInvalidateForValue=!0;var e=O(!0,[],this._model),t=Zl(e),i=Zl(this._getModel(this.option("value")));JSON.stringify(i)!==JSON.stringify(t)&&this.option("value",t),this._disableInvalidateForValue=!1,this._fireContentReadyAction()},_init:function(){this._initCustomOperations(),this._initModel(),this._initEditorFactory(),this._initActions(),this.callBase()},_initEditorFactory:function(){this._editorFactory=new Kee},_initCustomOperations:function(){this._customOperations=bee(this.option("customOperations"),this.option("filterOperationDescriptions.between"),this)},_getDefaultGroupOperation:function(){var e,t;return(e=(t=this.option("groupOperations"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:XE.and},_getModel:function(e){return kC(e,this._customOperations,this._getDefaultGroupOperation())},_initModel:function(){this._model=this._getModel(this.option("value"))},_initActions:function(){var e=this;e._actions={},Uee.forEach(function(t){var i=O({},t.config);e._actions[t.name]=e._createActionByOption(t.name,i)})},executeAction:function(e,t){var i=this._actions[e];return i&&i(t)},_initMarkup:function(){this.$element().addClass(vn),this.callBase(),this._createGroupElementByCriteria(this._model).appendTo(this.$element())},_createConditionElement:function(e,t){return v("<div>").addClass(Bs).append(this._createConditionItem(e,t))},_createGroupElementByCriteria:function(e,t){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=this._createGroupElement(e,t,i),r=n.find("."+GE),a=Da(e),o=0;o<a.length;o++){var s=a[o];Oa(s)?this._createGroupElementByCriteria(s,e,i+1).appendTo(r):Ei(s)&&this._createConditionElement(s,e).appendTo(r)}return n},_createGroupElement:function(e,t,i){var n=v("<div>").addClass(zE),r=v("<div>").addClass(GE),a=v("<div>").addClass(Bs).append(n).append(r);return t!=null&&this._createRemoveButton(()=>{pg(t,e),a.remove(),this._updateFilter()}).appendTo(n),this._createGroupOperationButton(e).appendTo(n),this._createAddButton(()=>{var o=gR(this._getDefaultGroupOperation());_h(o,e),this._createGroupElement(o,e,i+1).appendTo(r),this._updateFilter()},()=>{var o=this.option("fields")[0],s=gee(o,this._customOperations);_h(s,e),this._createConditionElement(s,e).appendTo(r),this._updateFilter()},i).appendTo(n),a},_createButton:function(e){return v("<div>").text(e)},_createGroupOperationButton:function(e){var t=this._getGroupOperations(e),i=hee(e,t),n=i.text,r=t&&t.length<2?this._createButton(n).addClass(Gee):this._createButtonWithMenu({caption:n,menu:{items:t,displayExpr:"text",keyExpr:"value",onItemClick:a=>{i!==a.itemData&&(cee(e,a.itemData.value),r.text(a.itemData.text),i=a.itemData,this._updateFilter())},onContentReady:function(a){a.component.selectItem(i)},cssClass:kee}});return r.addClass(yl).addClass(Bee).attr("tabindex",0)},_createButtonWithMenu:function(e){var t=this,i=function(){t.$element().find("."+tc).removeClass(tc),t.$element().find(".dx-overlay .dx-treeview").remove(),t.$element().find(".dx-overlay").remove()},n=this.option("rtlEnabled"),r=n?"right":"left",a=this._createButton(e.caption);O(e.menu,{focusStateEnabled:!0,selectionMode:"single",onItemClick:(o=e.menu.onItemClick,function(s){o(s),s.event.type==="dxclick"&&i()}),onHiding:function(s){a.removeClass(tc)},position:{my:r+" top",at:r+" bottom",offset:"0 1",of:a,collision:"flip"},animation:null,onHidden:function(){i()},cssClass:Nee+" "+e.menu.cssClass,rtlEnabled:n});var o;return e.popup={onShown:function(s){var l=v(s.component.content()).find(".dx-treeview"),u=l.dxTreeView("instance");D.on(l,"keyup keydown",function(d){var c=Nt(d);(d.type==="keydown"&&c===qE||d.type==="keyup"&&(c===YE||c===kv))&&(s.component.hide(),D.trigger(e.menu.position.of,"focus"))}),u.focus(),u.option("focusedElement",null)}},this._subscribeOnClickAndEnterKey(a,function(){i(),t._createPopupWithTreeView(e,t.$element()),a.addClass(tc)}),a},_hasValueButton:function(e){var t=Fr(this._customOperations,e[1]);return t?t.hasValue!==!1:e[2]!==null},_createOperationButtonWithMenu:function(e,t){var i=this,n=_ee(t,this.option("filterOperationDescriptions"),this._customOperations),r=vee(HE(e),n),a=this._createButtonWithMenu({caption:r.text,menu:{items:n,displayExpr:"text",onItemRendered:function(o){o.itemData.isCustom&&v(o.itemElement).addClass(zee)},onContentReady:function(o){o.component.selectItem(r)},onItemClick:o=>{if(r!==o.itemData){r=o.itemData,vg(e,r.value,i._customOperations);var s=a.siblings().filter("."+KE);i._hasValueButton(e)?(s.length!==0&&s.remove(),i._createValueButton(e,t).appendTo(a.parent())):s.remove(),a.html(r.text),this._updateFilter()}},cssClass:Hee}}).addClass(yl).addClass(Mee).attr("tabindex",0);return a},_createOperationAndValueButtons:function(e,t,i){this._createOperationButtonWithMenu(e,t).appendTo(i),this._hasValueButton(e)&&this._createValueButton(e,t).appendTo(i)},_createFieldButtonWithMenu:function(e,t,i){var n=this,r=this.option("allowHierarchicalFields"),a=SR(e,r),o=gh(i.name||i.dataField,a),s=function(u,d){return r?wR(u,d):u.caption},l=this._createButtonWithMenu({caption:s(o,a),menu:{items:a,dataStructure:"plain",keyExpr:"id",parentId:"parentId",displayExpr:"caption",onItemClick:u=>{if(o!==u.itemData){o=u.itemData,t[0]=o.name||o.dataField,t[2]=o.dataType==="object"?null:"",vg(t,DC(o),n._customOperations),l.siblings().filter("."+yl).remove(),n._createOperationAndValueButtons(t,o,l.parent());var d=s(o,u.component.option("items"));l.html(d),this._updateFilter()}},onContentReady:function(u){u.component.selectItem(o)},cssClass:$ee}}).addClass(yl).addClass(Fee).attr("tabindex",0);return l},_createConditionItem:function(e,t){var i=v("<div>").addClass(zE),n=this._getNormalizedFields(),r=gh(e[0],n);return this._createRemoveButton(()=>{pg(t,e);var a=i.parent().children().length===1;a?i.parent().remove():i.remove(),this._updateFilter()}).appendTo(i),this._createFieldButtonWithMenu(n,e,r).appendTo(i),this._createOperationAndValueButtons(e,r,i),i},_getGroupOperations:function(e){var t=this.option("groupOperations"),i=this.option("groupOperationDescriptions");return(!t||!t.length)&&(t=[Fo(e).replace("!","not")]),t.map(n=>({text:i[n],value:XE[n]}))},_createRemoveButton:function(e){var t=v("<div>").addClass(UE).addClass(Pee).addClass(mg).attr("tabindex",0);return this._subscribeOnClickAndEnterKey(t,e),t},_createAddButton:function(e,t,i){var n,r=this.option("maxGroupLevel");return E(r)&&i>=r?(n=this._createButton(),this._subscribeOnClickAndEnterKey(n,t)):n=this._createButtonWithMenu({menu:{items:[{caption:ue.format("dxFilterBuilder-addCondition"),click:t},{caption:ue.format("dxFilterBuilder-addGroup"),click:e}],displayExpr:"caption",onItemClick:function(a){a.itemData.click()},cssClass:Wee}}),n.addClass(UE).addClass(Lee).addClass(mg).attr("tabindex",0)},_createValueText:function(e,t,i){var n=this,r=v("<div>").html("&nbsp;").addClass(Vee).attr("tabindex",0).appendTo(i),a=e[2],o=Fr(n._customOperations,e[1]);return!o&&t.lookup?mR(t,a,function(s){gg(r,s)}):Ae(yR(t,a,o)).done(s=>{gg(r,s,o)}),n._subscribeOnClickAndEnterKey(r,function(s){s.type==="keyup"&&s.stopPropagation(),n._createValueEditorWithEvents(e,t,i)}),r},_updateConditionValue:function(e,t,i){var n=e[2]!==t;n&&(e[2]=t),i(),this._updateFilter()},_addDocumentKeyUp:function(e,t){var i=!1,n=!1,r=fe.getDocument(),a=s=>{if(i||n){n=!1;return}t(s)};D.on(r,"keyup",a);var o=e.find("input");D.on(o,"compositionstart",()=>{i=!0}),D.on(o,"compositionend",()=>{i=!1,n=!0}),D.on(o,"keydown",s=>{s.which!==229&&(n=!1)}),this._documentKeyUpHandler=a},_addDocumentClick:function(e,t){var i=fe.getDocument(),n=r=>{this._isFocusOnEditorParts(e,r.target)||(D.trigger(e.find("input"),"change"),t())};D.on(i,"dxpointerdown",n),this._documentClickHandler=n},_isFocusOnEditorParts:function(e,t){var i=t||fe.getActiveElement();return v(i).closest(e.children()).length||v(i).closest(".dx-dropdowneditor-overlay").length},_removeEvents:function(){var e=fe.getDocument();E(this._documentKeyUpHandler)&&D.off(e,"keyup",this._documentKeyUpHandler),E(this._documentClickHandler)&&D.off(e,"dxpointerdown",this._documentClickHandler)},_dispose:function(){this._removeEvents(),this.callBase()},_createValueEditorWithEvents:function(e,t,i){var n=e[2],r=()=>(i.empty(),this._removeEvents(),this._createValueText(e,t,i)),a=()=>{this._updateConditionValue(e,n,function(){r()})},o={value:n===""?null:n,filterOperation:HE(e),setValue:function(l){n=l===null?"":l},closeEditor:a,text:i.text()};i.empty();var s=this._createValueEditor(i,t,o);D.trigger(s.find("input").not(":hidden").eq(0),"focus"),this._removeEvents(),this._addDocumentClick(s,a),this._addDocumentKeyUp(s,l=>{var u=Nt(l);if(u===qE){if(this._isFocusOnEditorParts(s))return;this._updateConditionValue(e,n,function(){r(),l.shiftKey&&D.trigger(i.prev(),"focus")})}u===YE&&D.trigger(r(),"focus"),u===kv&&this._updateConditionValue(e,n,function(){D.trigger(r(),"focus")})}),this._fireContentReadyAction()},_createValueButton:function(e,t){var i=v("<div>").addClass(yl).addClass(KE);return this._createValueText(e,t,i),i},_createValueEditor:function(e,t,i){var n=v("<div>").attr("tabindex",0).appendTo(e),r=Fr(this._customOperations,i.filterOperation),a=r&&r.editorTemplate?r.editorTemplate:t.editorTemplate;if(a){var o=this._getTemplate(a);o.render({model:O({field:t},i),container:n})}else this._editorFactory.createEditor.call(this,n,O({},t,i,{parentType:jE}));return n},_createPopupWithTreeView:function(e,t){var i=this,n=v("<div>").addClass(e.menu.cssClass).appendTo(t);this._createComponent(n,pr,{wrapperAttr:{class:e.menu.cssClass},onHiding:e.menu.onHiding,onHidden:e.menu.onHidden,rtlEnabled:e.menu.rtlEnabled,position:e.menu.position,animation:e.menu.animation,contentTemplate:function(r){var a=v("<div>").appendTo(r);i._createComponent(a,ed,e.menu),this.repaint()},_ignoreFunctionValueDeprecation:!0,maxHeight:function(){return oR(e.menu.position.of)},visible:!0,focusStateEnabled:!1,hideOnParentScroll:this.option("closePopupOnTargetScroll"),hideOnOutsideClick:!0,onShown:e.popup.onShown,shading:!1,width:"auto",height:"auto",showTitle:!1})},_subscribeOnClickAndEnterKey:function(e,t){D.on(e,"dxclick",t),D.on(e,"keyup",function(i){Nt(i)===kv&&t(i)})}});tt("dxFilterBuilder",DR);var jee=Tt.View.inherit({_renderCore:function(){this._updatePopupOptions()},_updatePopupOptions:function(){this.option("filterBuilderPopup.visible")?this._initPopup():this._filterBuilderPopup&&this._filterBuilderPopup.hide()},_disposePopup:function(){this._filterBuilderPopup&&(this._filterBuilderPopup.dispose(),this._filterBuilderPopup=void 0),this._filterBuilder&&(this._filterBuilder.dispose(),this._filterBuilder=void 0)},_initPopup:function(){var e=this;e._disposePopup(),e._filterBuilderPopup=e._createComponent(e.element(),pr,O({title:ue.format("dxDataGrid-filterBuilderPopupTitle"),contentTemplate:function(t){return e._getPopupContentTemplate(t)},onOptionChanged:function(t){t.name==="visible"&&e.option("filterBuilderPopup.visible",t.value)},toolbarItems:e._getPopupToolbarItems()},e.option("filterBuilderPopup"),{onHidden:function(t){Pm(e),e._disposePopup()}}))},_getPopupContentTemplate:function(e){var t=v(e),i=v("<div>").appendTo(v(e));this._filterBuilder=this._createComponent(i,DR,O({value:this.option("filterValue"),fields:this.getController("columns").getFilteringColumns()},this.option("filterBuilder"),{customOperations:this.getController("filterSync").getCustomFilterOperations()})),this._createComponent(t,dC,{direction:"both"})},_getPopupToolbarItems:function(){var e=this;return[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:ue.format("OK"),onClick:function(t){var i=e._filterBuilder.option("value");e.option("filterValue",i),e._filterBuilderPopup.hide()}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:ue.format("Cancel"),onClick:function(t){e._filterBuilderPopup.hide()}}}]},optionChanged:function(e){switch(e.name){case"filterBuilder":case"filterBuilderPopup":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}}}),qee={defaultOptions:function(){return{filterBuilder:{groupOperationDescriptions:{and:ue.format("dxFilterBuilder-and"),or:ue.format("dxFilterBuilder-or"),notAnd:ue.format("dxFilterBuilder-notAnd"),notOr:ue.format("dxFilterBuilder-notOr")},filterOperationDescriptions:{between:ue.format("dxFilterBuilder-filterOperationBetween"),equal:ue.format("dxFilterBuilder-filterOperationEquals"),notEqual:ue.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:ue.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:ue.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:ue.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:ue.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:ue.format("dxFilterBuilder-filterOperationStartsWith"),contains:ue.format("dxFilterBuilder-filterOperationContains"),notContains:ue.format("dxFilterBuilder-filterOperationNotContains"),endsWith:ue.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:ue.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:ue.format("dxFilterBuilder-filterOperationIsNotBlank")}},filterBuilderPopup:{}}},views:{filterBuilderView:jee}};De.registerModule("filterBuilder",qee);var td="filter-panel",Yee=td+"-text",Xee=td+"-checkbox",Zee=td+"-clear-filter",Qee=td+"-left",Jee="filterPanel",ete=Tt.View.inherit({isVisible:function(){return this.option("filterPanel.visible")&&this.getController("data").dataSource()},init:function(){this.getController("data").dataSourceChanged.add(()=>this.render())},_renderCore:function(){var e=this.element();e.empty().addClass(this.addWidgetPrefix(td));var t=v("<div>").addClass(this.addWidgetPrefix(Qee)).appendTo(e);this.option("filterValue")||this._filterValueBuffer?(t.append(this._getCheckElement()).append(this._getFilterElement()).append(this._getTextElement()),e.append(this._getRemoveButtonElement())):t.append(this._getFilterElement()).append(this._getTextElement())},_getCheckElement:function(){var e=this,t=v("<div>").addClass(this.addWidgetPrefix(Xee));return e._createComponent(t,yo,{value:e.option("filterPanel.filterEnabled"),onValueChanged:function(i){e.option("filterPanel.filterEnabled",i.value)}}),t.attr("title",this.option("filterPanel.texts.filterEnabledHint")),t},_getFilterElement:function(){var e=this,t=v("<div>").addClass("dx-icon-filter");return D.on(t,"click",()=>e._showFilterBuilder()),Kl("filterPanel",e,t,void 0,()=>e._showFilterBuilder()),e._addTabIndexToElement(t),t},_getTextElement:function(){var e=this,t=v("<div>").addClass(e.addWidgetPrefix(Yee)),i,n=e.option("filterValue");return n?Ae(e.getFilterText(n,e.getController("filterSync").getCustomFilterOperations())).done(function(r){var a=e.option("filterPanel.customizeText");if(a){var o=a({component:e.component,filterValue:n,text:r});typeof o=="string"&&(r=o)}t.text(r)}):(i=e.option("filterPanel.texts.createFilter"),t.text(i)),D.on(t,"click",()=>e._showFilterBuilder()),Kl("filterPanel",e,t,void 0,()=>e._showFilterBuilder()),e._addTabIndexToElement(t),t},_showFilterBuilder:function(){this.option("filterBuilderPopup.visible",!0)},_getRemoveButtonElement:function(){var e=this,t=()=>e.option("filterValue",null),i=v("<div>").addClass(e.addWidgetPrefix(Zee)).text(e.option("filterPanel.texts.clearFilter"));return D.on(i,"click",t),Kl("filterPanel",this,i,void 0,t),e._addTabIndexToElement(i),i},_addTabIndexToElement:function(e){if(!this.option("useLegacyKeyboardNavigation")){var t=this.option("tabindex")||0;e.attr("tabindex",t)}},optionChanged:function(e){switch(e.name){case"filterValue":this._invalidate(),this.option("filterPanel.filterEnabled",!0),e.handled=!0;break;case"filterPanel":this._invalidate(),e.handled=!0;break;default:this.callBase(e)}},_getConditionText:function(e,t,i){var n="[".concat(e,"] ").concat(t);return E(i)&&(n+=i),n},_getValueMaskedText:function(e){return Array.isArray(e)?"('".concat(e.join("', '"),"')"):" '".concat(e,"'")},_getValueText:function(e,t,i){var n=new te,r=t&&t.customizeText;if(E(i)||r)if(!r&&e.lookup)mR(e,i,o=>{n.resolve(this._getValueMaskedText(o))});else{var a=Array.isArray(i)?i:xe.getDisplayValue(e,i);Ae(yR(e,a,t,Jee)).done(o=>{n.resolve(this._getValueMaskedText(o))})}else n.resolve("");return n.promise()},getConditionText:function(e,t){var i=this,n=e[1],r=new te,a=Fr(t.customOperations,n),o,s=gh(e[0],t.columns),l=s.caption||"",u=e[2];return a?o=a.caption||uo(a.name):u===null?o=fg(n==="="?"isblank":"isnotblank",t.filterOperationDescriptions):o=fg(n,t.filterOperationDescriptions),this._getValueText(s,a,u).done(d=>{r.resolve(i._getConditionText(l,o,d))}),r},getGroupText:function(e,t,i){var n=this,r=new te,a=[],o=Fo(e);return e.forEach(s=>{Ei(s)?a.push(n.getConditionText(s,t)):Oa(s)&&a.push(n.getGroupText(s,t,!0))}),Ae.apply(this,a).done(function(){for(var s,l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];if(o[0]==="!"){var c=t.groupOperationDescriptions["not"+o.substring(1,2).toUpperCase()+o.substring(2)].split(" ");s="".concat(c[0]," ").concat(u[0])}else s=u.join(" ".concat(t.groupOperationDescriptions[o]," "));i&&(s="(".concat(s,")")),r.resolve(s)}),r},getFilterText:function(e,t){var i={customOperations:t,columns:this.getController("columns").getFilteringColumns(),filterOperationDescriptions:this.option("filterBuilder.filterOperationDescriptions"),groupOperationDescriptions:this.option("filterBuilder.groupOperationDescriptions")};return Ei(e)?this.getConditionText(e,i):this.getGroupText(e,i)}}),tte={defaultOptions:function(){return{filterPanel:{visible:!1,filterEnabled:!0,texts:{createFilter:ue.format("dxDataGrid-filterPanelCreateFilter"),clearFilter:ue.format("dxDataGrid-filterPanelClearFilter"),filterEnabledHint:ue.format("dxDataGrid-filterPanelFilterEnabledHint")}}}},views:{filterPanelView:ete},extenders:{controllers:{data:{optionChanged:function(e){switch(e.name){case"filterPanel":this._applyFilter(),e.handled=!0;break;default:this.callBase(e)}}}}}};De.registerModule("filterPanel",tte);var ZE="search-panel",QE="search-text",ite="header-panel",nte=700;function JE(e){return E(e.allowSearch)?e.allowSearch:e.allowFiltering}function ew(e,t){var i=e.lookup;return e.parseValue?i?e.parseValue.call(i,t):e.parseValue(t):t}var rte={defaultOptions:function(){return{searchPanel:{visible:!1,width:160,placeholder:ue.format("dxDataGrid-searchPanelPlaceholder"),highlightSearchText:!0,highlightCaseSensitive:!1,text:"",searchVisibleColumnsOnly:!1}}},extenders:{controllers:{data:{publicMethods:function(){return this.callBase().concat(["searchByText"])},_calculateAdditionalFilter:function(){var e=this.callBase(),t=function(i,n){var r,a,o=i._columnsController.getColumns(),s=i.option("searchPanel.searchVisibleColumnsOnly"),l,u=[];if(!n)return null;function d(h){for(var f=mt(l.valueExpr),p=0;p<h.length;p++){var g=f(h[p]);u.push(a.createFilterExpression(g,null,"search"))}}for(r=0;r<o.length;r++)if(a=o[r],!(s&&!a.visible)&&JE(a)&&a.calculateFilterExpression){l=a.lookup;var c=ew(a,n);l&&l.items?Gi(l.items).filter(a.createFilterExpression.call({dataField:l.displayExpr,dataType:l.dataType,calculateFilterExpression:a.calculateFilterExpression},c,null,"search")).enumerate().done(d):c!==void 0&&u.push(a.createFilterExpression(c,null,"search"))}return u.length===0?["!"]:xe.combineFilters(u,"or")}(this,this.option("searchPanel.text"));return xe.combineFilters([e,t])},searchByText:function(e){this.option("searchPanel.text",e)},optionChanged:function(e){switch(e.fullName){case"searchPanel.text":case"searchPanel":this._applyFilter(),e.handled=!0;break;default:this.callBase(e)}}}},views:{headerPanel:function(){var e=function(t){return t.option("searchPanel")};return{_getToolbarItems:function(){var t=this.callBase();return this._prepareSearchItem(t)},_prepareSearchItem:function(t){var i=this,n=i.getController("data"),r=e(i);if(r&&r.visible){var a={template:function(o,s,l){var u=v("<div>").addClass(i.addWidgetPrefix(ZE)).appendTo(l);i.getController("editorFactory").createEditor(u,{width:r.width,placeholder:r.placeholder,parentType:"searchPanel",value:i.option("searchPanel.text"),updateValueTimeout:nte,setValue:function(d){n.searchByText(d)},editorOptions:{inputAttr:{"aria-label":ue.format("".concat(i.component.NAME,"-ariaSearchInGrid"))}}}),i.resize()},name:"searchPanel",location:"after",locateInMenu:"never",sortIndex:40};t.push(a)}return t},getSearchTextEditor:function(){var t=this,i=t.element(),n=i.find("."+t.addWidgetPrefix(ZE)).filter(function(){return v(this).closest("."+t.addWidgetPrefix(ite)).is(i)});return n.length?n.dxTextBox("instance"):null},isVisible:function(){var t=e(this);return this.callBase()||t&&t.visible},optionChanged:function(t){if(t.name==="searchPanel"){if(t.fullName==="searchPanel.text"){var i=this.getSearchTextEditor();i&&i.option("value",t.value)}else this._invalidate();t.handled=!0}else this.callBase(t)}}}(),rowsView:{init:function(){this.callBase.apply(this,arguments),this._searchParams=[]},_getFormattedSearchText:function(e,t){var i=ew(e,t),n=xe.getFormatOptionsByColumn(e,"search");return xe.formatValue(i,n)},_getStringNormalizer:function(){var e=this.option("searchPanel.highlightCaseSensitive");return function(t){return e?t:t.toLowerCase()}},_findHighlightingTextNodes:function(e,t,i){var n,r=t.parent(),a,o=this._getStringNormalizer(),s=o(i),l=[];if(!r.length)r=v("<div>").append(t);else if(e)if(e.groupIndex>=0&&!e.showWhenGrouped)a=t;else{var u=this._columnsController.getVisibleIndex(e.index);a=r.children("td").eq(u).find("*")}return a=(n=a)!==null&&n!==void 0&&n.length?a:r.find("*"),a.each(function(d,c){for(var h=v(c).contents(),f=0;f<h.length;f++){var p=h.get(f);if(p.nodeType===3){var g=o(p.textContent||p.nodeValue);g.indexOf(s)>-1&&l.push(p)}}}),l},_highlightSearchTextCore:function(e,t){var i=v("<span>").addClass(this.addWidgetPrefix(QE)),n=e.text(),r=e[0],a=this._getStringNormalizer(),o=a(n).indexOf(a(t));if(o>=0)return r.textContent?r.textContent=n.substr(0,o):r.nodeValue=n.substr(0,o),e.after(i.text(n.substr(o,t.length))),e=v(fe.createTextNode(n.substr(o+t.length))).insertAfter(i),this._highlightSearchTextCore(e,t)},_highlightSearchText:function(e,t,i){var n=this,r=this._getStringNormalizer(),a=n.option("searchPanel.text");if(t&&i&&(a=a&&n._getFormattedSearchText(i,a)),a&&n.option("searchPanel.highlightSearchText")){var o=n._findHighlightingTextNodes(i,e,a);o.forEach(s=>{t?r(v(s).text())===r(a)&&v(s).replaceWith(v("<span>").addClass(n.addWidgetPrefix(QE)).text(v(s).text())):n._highlightSearchTextCore(v(s),a)})}},_renderCore:function(){this.callBase.apply(this,arguments),(this.option().rowTemplate||this.option("dataRowTemplate"))&&(this.option("templatesRenderAsynchronously")?(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){this._highlightSearchText(this.getTableElement())}).bind(this))):this._highlightSearchText(this.getTableElement()))},_updateCell:function(e,t){var i=t.column,n=i.lookup&&i.lookup.dataType||i.dataType,r=n!=="string";JE(i)&&!t.isOnForm&&(this.option("templatesRenderAsynchronously")?(this._searchParams.length||(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){this._searchParams.forEach((function(a){this._highlightSearchText.apply(this,a)}).bind(this)),this._searchParams=[]}).bind(this))),this._searchParams.push([e,r,i])):this._highlightSearchText(e,r,i)),this.callBase(e,t)},dispose:function(){clearTimeout(this._highlightTimer),this.callBase()}}}}};De.registerModule("search",rte);class ate extends Xu{_optionChanged(t){switch(t.name){case"pageIndex":var i=this.option("pageIndexChanged");i&&i(t.value);break;case"pageSize":var n=this.option("pageSizeChanged");n&&n(t.value)}super._optionChanged(t)}}function ote(e){return e?Number(e.replace("px","")):0}function Ch(e,t){var i,n=(i=i1(t))!==null&&i!==void 0?i:{};return ote(n[e])}function Vl(e){return Ch("width",e)}function OR(e){return Ch("minWidth",e)}var ste=["contentTemplate","pagerProps"],lte=e=>{var{contentAttributes:t,infoTextRef:i,infoTextVisible:n,isLargeDisplayMode:r,pageSizesRef:a,pagesRef:o,parentRef:s,props:{contentTemplate:l}}=e;return l(be({rootElementRef:s,pageSizesRef:a,infoTextRef:i,pagesRef:o,infoTextVisible:n,isLargeDisplayMode:r},t))};function ute(e){var{pageSizes:t,pages:i,parent:n}=e;return n-(t+i)>0}function dte(e){var{info:t,pageSizes:i,pages:n,parent:r}=e,a=i+n+t;return r-a>0}function cte(e){var{info:t,pageSizes:i,pages:n,parent:r}=e,a=Vl(r),o=Vl(i),s=Vl(t),l=Vl(n);return{parent:a,pageSizes:o,info:s+Ch("marginLeft",t)+Ch("marginRight",t),pages:l}}var hte={},fte=e=>e&&(e.defaultProps?t=>nn(Et(2,e,be({},t))):e);class RR extends fr{constructor(t){super(t),this.parentRef=xi(),this.pageSizesRef=xi(),this.infoTextRef=xi(),this.pagesRef=xi(),this.actualIsLargeDisplayMode=!0,this.actualInfoTextVisible=!0,this.state={infoTextVisible:!0,isLargeDisplayMode:!0},this.subscribeToResize=this.subscribeToResize.bind(this),this.effectUpdateChildProps=this.effectUpdateChildProps.bind(this),this.updateAdaptivityProps=this.updateAdaptivityProps.bind(this)}createEffects(){return[new Rt(this.subscribeToResize,[this.state.infoTextVisible,this.state.isLargeDisplayMode]),new Rt(this.effectUpdateChildProps,[this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])]}updateEffects(){var t,i;(t=this._effects[0])===null||t===void 0||t.update([this.state.infoTextVisible,this.state.isLargeDisplayMode]),(i=this._effects[1])===null||i===void 0||i.update([this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])}subscribeToResize(){var t=()=>{this.parentWidth>0&&this.updateAdaptivityProps()};return co.add(t),()=>{co.remove(t)}}effectUpdateChildProps(){this.parentWidth>0&&this.updateAdaptivityProps()}get contentAttributes(){var{className:t,displayMode:i,gridCompatibility:n,hasKnownLastPage:r,infoText:a,lightModeEnabled:o,maxPagesCount:s,onKeyDown:l,pageCount:u,pageIndex:d,pageIndexChange:c,pageSize:h,pageSizeChange:f,pageSizes:p,pagesCountText:g,pagesNavigatorVisible:m,rtlEnabled:C,showInfo:x,showNavigationButtons:T,showPageSizes:R,totalCount:A,visible:H}=this.props.pagerProps;return be({},this.restAttributes,{pageSize:h,pageIndex:d,pageIndexChange:c,pageSizeChange:f,gridCompatibility:n,className:t,showInfo:x,infoText:a,lightModeEnabled:o,displayMode:i,maxPagesCount:s,pageCount:u,pagesCountText:g,visible:H,hasKnownLastPage:r,pagesNavigatorVisible:m,showPageSizes:R,pageSizes:p,rtlEnabled:C,showNavigationButtons:T,totalCount:A,onKeyDown:l})}get parentWidth(){return this.parentRef.current?Vl(this.parentRef.current):0}updateAdaptivityProps(){var t=cte({parent:this.parentRef.current,pageSizes:this.pageSizesRef.current,info:this.infoTextRef.current,pages:this.pagesRef.current});if(!(this.actualInfoTextVisible!==this.state.infoTextVisible||this.actualIsLargeDisplayMode!==this.state.isLargeDisplayMode)){var i=!E(this.elementsWidth);i&&(this.elementsWidth={}),(i||this.state.isLargeDisplayMode)&&(this.elementsWidth.pageSizes=t.pageSizes,this.elementsWidth.pages=t.pages),(i||this.state.infoTextVisible)&&(this.elementsWidth.info=t.info),this.actualIsLargeDisplayMode=ute(be({parent:t.parent},{pageSizes:this.elementsWidth.pageSizes,pages:this.elementsWidth.pages})),this.actualInfoTextVisible=dte(be({},t,{info:this.elementsWidth.info})),this.setState(n=>({infoTextVisible:this.actualInfoTextVisible})),this.setState(n=>({isLargeDisplayMode:this.actualIsLargeDisplayMode}))}}get restAttributes(){var t=this.props,i=Lt(t,ste);return i}render(){var t=this.props;return lte({props:be({},t,{contentTemplate:fte(t.contentTemplate)}),infoTextVisible:this.state.infoTextVisible,isLargeDisplayMode:this.state.isLargeDisplayMode,parentRef:this.parentRef,pageSizesRef:this.pageSizesRef,infoTextRef:this.infoTextRef,pagesRef:this.pagesRef,contentAttributes:this.contentAttributes,parentWidth:this.parentWidth,updateAdaptivityProps:this.updateAdaptivityProps,restAttributes:this.restAttributes})}}RR.defaultProps=hte;var kR={gridCompatibility:!0,showInfo:!1,displayMode:"adaptive",maxPagesCount:10,pageCount:10,visible:!0,hasKnownLastPage:!0,pagesNavigatorVisible:"auto",showPageSizes:!0,pageSizes:Object.freeze([5,10]),showNavigationButtons:!1,totalCount:0},pte=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(kR),Object.getOwnPropertyDescriptors({defaultPageSize:5,pageSizeChange:()=>{},defaultPageIndex:1,pageIndexChange:()=>{}}))),_i=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(kR),Object.getOwnPropertyDescriptors({pageSize:5,pageIndex:1}))),vte=["infoText","pageCount","pageIndex","rootElementRef","totalCount"],BR="dx-info",_te=e=>{var{props:{rootElementRef:t},text:i}=e;return qt(1,"div",BR,i,0,null,null,t)},gte={get pageIndex(){return _i.pageIndex},get pageCount(){return _i.pageCount},get totalCount(){return _i.totalCount}};class LR extends Ln{constructor(t){super(t),this.state={}}get infoText(){var t;return((t=this.props.infoText)!==null&&t!==void 0?t:"")||ue.getFormatter("dxPager-infoText")()}get text(){var{pageCount:t,pageIndex:i,totalCount:n}=this.props;return Hr(this.infoText,(i+1).toString(),t.toString(),n.toString())}get restAttributes(){var t=this.props,i=Lt(t,vte);return i}render(){var t=this.props;return _te({props:be({},t),infoText:this.infoText,text:this.text,restAttributes:this.restAttributes})}}LR.defaultProps=gte;var mte=dO(void 0),Cte=["children","className","label","onClick"],yte=e=>{var{props:{children:t,className:i,label:n},widgetRef:r}=e;return qt(1,"div",i,t,0,{tabIndex:0,role:"button","aria-label":n},null,r)},xte={className:"",label:""};class _u extends fr{constructor(t){super(t),this.state={},this.widgetRef=xi(),this.keyboardEffect=this.keyboardEffect.bind(this),this.subscribeToClick=this.subscribeToClick.bind(this)}get keyboardContext(){return"KeyboardActionContext"in this.context?this.context.KeyboardActionContext:mte}createEffects(){return[new Rt(this.keyboardEffect,[this.keyboardContext,this.props.onClick]),new Rt(this.subscribeToClick,[this.props.onClick])]}updateEffects(){var t,i;(t=this._effects[0])===null||t===void 0||t.update([this.keyboardContext,this.props.onClick]),(i=this._effects[1])===null||i===void 0||i.update([this.props.onClick])}keyboardEffect(){return this.keyboardContext.registerKeyboardAction(this.widgetRef.current,this.props.onClick)}subscribeToClick(){return W6(this.widgetRef.current,this.props.onClick)}get restAttributes(){var t=this.props,i=Lt(t,Cte);return i}render(){var t=this.props;return yte({props:be({},t),widgetRef:this.widgetRef,keyboardContext:this.keyboardContext,restAttributes:this.restAttributes})}}_u.defaultProps=xte;var bte="dx-pager",Ste="dx-light-mode",Ete="dx-pages",wte="dx-page-indexes",Ite="dx-page",PR="dx-selection",FR="dx-page-size",Tte="dx-page-sizes",Ate="".concat(FR," ").concat(PR),Dte="dx-first-child",Ote=["className","index","onClick","selected"],Rte=e=>{var{className:t,label:i,props:{onClick:n},value:r}=e;return Et(2,_u,{className:t,label:i,onClick:n,children:r})},kte={index:0,selected:!1,className:Ite};class LC extends Ln{constructor(t){super(t),this.state={}}get label(){return"Page ".concat(this.value)}get value(){return this.props.index+1}get className(){var{selected:t}=this.props;return Tn({["".concat(this.props.className)]:!!this.props.className,[PR]:!!t})}get restAttributes(){var t=this.props,i=Lt(t,Ote);return i}render(){var t=this.props;return Rte({props:be({},t),label:this.label,value:this.value,className:this.className,restAttributes:this.restAttributes})}}LC.defaultProps=kte;var Bte=["pageIndexes"],Lte=["maxPagesCount","pageCount","pageIndex","pageIndexChange"],Pte="dx-separator",Fte=e=>{var{pages:t}=e,i=t.map(n=>{var{key:r,pageProps:a}=n;return a?Et(2,LC,{index:a.index,selected:a.selected,onClick:a.onClick},r):qt(1,"div",Pte,". . .",16,null,r)});return jr(i,0)},Wa=4;function tw(e,t,i){return e===1?"high":e+t===i-1?"low":"both"}function MR(e,t,i){var n=[],r=[];switch(i){case"none":n=[...e];break;case"both":n=[0,"low",...e,"high",t-1],r=e.slice(1,-1);break;case"high":n=[0,...e,"high",t-1],r=e.slice(0,-1);break;case"low":n=[0,"low",...e,t-1],r=e.slice(1)}return{slidingWindowIndexes:e,indexesForReuse:r,pageIndexes:n}}function iw(e,t,i,n){for(var r=[],a=0;a<t;a+=1)r.push(a+e);return MR(r,i,n)}var Mte={get pageIndex(){return _i.pageIndex},get maxPagesCount(){return _i.maxPagesCount},get pageCount(){return _i.pageCount}};class VR extends Ln{constructor(t){super(t),this.state={},this.canReuseSlidingWindow=this.canReuseSlidingWindow.bind(this),this.generatePageIndexes=this.generatePageIndexes.bind(this),this.isSlidingWindowMode=this.isSlidingWindowMode.bind(this),this.onPageClick=this.onPageClick.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:Zh}get slidingWindowState(){var t=this.slidingWindowStateHolder;return t||{indexesForReuse:[],slidingWindowIndexes:[]}}canReuseSlidingWindow(t,i){var{indexesForReuse:n}=this.slidingWindowState,r=n.slice(-1)[0]<t-1,a=n.includes(i);return r&&a}generatePageIndexes(){var{pageCount:t,pageIndex:i}=this.props,n=0,{slidingWindowIndexes:r}=this.slidingWindowState;i===r[0]?n=i-1:i===r[r.length-1]?n=i+2-Wa:i<Wa?n=1:i>=t-Wa?n=t-Wa-1:n=i-1;var a=Wa,o=tw(n,a,t),s=iw(n,a,t,o),{pageIndexes:l}=s,u=Lt(s,Bte);return this.slidingWindowStateHolder=u,l}isSlidingWindowMode(){var{maxPagesCount:t,pageCount:i}=this.props;return i<=Wa||i<=t}onPageClick(t){this.props.pageIndexChange(t)}get pageIndexes(){var{pageCount:t}=this.props;if(this.isSlidingWindowMode())return iw(0,t,t,"none").pageIndexes;if(this.canReuseSlidingWindow(t,this.props.pageIndex)){var{slidingWindowIndexes:i}=this.slidingWindowState,n=tw(i[0],Wa,t);return MR(i,t,n).pageIndexes}return this.generatePageIndexes()}get pages(){var t,{pageIndex:i}=this.props,n=a=>{var o=a==="low"||a==="high"?null:{index:a,onClick:()=>this.onPageClick(a),selected:i===a};return{key:a.toString(),pageProps:o}},r=(t=this.config)!==null&&t!==void 0&&t.rtlEnabled?[...this.pageIndexes].reverse():this.pageIndexes;return r.map(a=>n(a))}get restAttributes(){var t=this.props,i=Lt(t,Lte);return i}render(){var t=this.props;return Fte({props:be({},t),config:this.config,pageIndexes:this.pageIndexes,pages:this.pages,restAttributes:this.restAttributes})}}VR.defaultProps=Mte;var xs={hoverStateEnabled:!0,activeStateEnabled:!0,get focusStateEnabled(){return Oe.real().deviceType==="desktop"&&!Oe.isSimulator()}},yh={label:"",get labelMode(){return Qt(Un())?"floating":"static"}},Vte=["accessKey","activeStateEnabled","className","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","invalidValueMessage","isValid","label","labelMode","max","min","mode","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","showSpinButtons","step","tabIndex","useLargeSpinButtons","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","visible","width"],Nte=0,Hte=e=>{var{componentProps:t,restAttributes:i}=e;return nn(Et(2,rf,be({componentType:hh,componentProps:t,templateNames:[]},i)))},bn=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(vi),Object.getOwnPropertyDescriptors({defaultValue:Nte,isReactComponentWrapper:!0}))),$te={get defaultValue(){return bn.defaultValue},get readOnly(){return bn.readOnly},get name(){return bn.name},get validationError(){return bn.validationError},get validationErrors(){return bn.validationErrors},get validationMessageMode(){return bn.validationMessageMode},get validationStatus(){return bn.validationStatus},get isValid(){return bn.isValid},get className(){return bn.className},get activeStateEnabled(){return xs.activeStateEnabled},get disabled(){return bn.disabled},get focusStateEnabled(){return xs.focusStateEnabled},get hoverStateEnabled(){return xs.hoverStateEnabled},get tabIndex(){return bn.tabIndex},get visible(){return bn.visible},get label(){return yh.label},get labelMode(){return yh.labelMode},isReactComponentWrapper:!0};class NR extends Ln{constructor(t){super(t),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue}}get componentProps(){return be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})}get restAttributes(){var t=be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Lt(t,Vte);return i}render(){var t=this.props;return Hte({props:be({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}NR.defaultProps=$te;var Wte=10;function HR(e,t){return e+Wte*Math.max(...t).toString().length}var zte=["pageCount","pageIndex","pageIndexChange","pagesCountText"],Gte="".concat(BR," dx-info-text"),$R="dx-page-index",Ute="dx-light-pages",Kte="dx-pages-count",jte=e=>{var{pageIndexRef:t,pagesCountText:i,props:{pageCount:n},selectLastPageIndex:r,value:a,valueChange:o,width:s}=e;return qt(1,"div",Ute,[Et(2,NR,{className:$R,min:1,max:n,width:s,value:a,valueChange:o}),qt(1,"span",Gte,i,0),Et(2,LC,{className:Kte,selected:!1,index:n-1,onClick:r})],4,null,null,t)},qte={get pageIndex(){return _i.pageIndex},get pageCount(){return _i.pageCount}};class WR extends fr{constructor(t){super(t),this.pageIndexRef=xi(),this.state={minWidth:10},this.updateWidth=this.updateWidth.bind(this),this.selectLastPageIndex=this.selectLastPageIndex.bind(this),this.valueChange=this.valueChange.bind(this)}createEffects(){return[new Rt(this.updateWidth,[this.state.minWidth])]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.state.minWidth])}updateWidth(){var t,i=(t=this.pageIndexRef.current)===null||t===void 0?void 0:t.querySelector(".".concat($R));this.setState(n=>({minWidth:i&&OR(i)||n.minWidth}))}get value(){return this.props.pageIndex+1}get width(){var{pageCount:t}=this.props;return HR(this.state.minWidth,[t])}get pagesCountText(){var t;return((t=this.props.pagesCountText)!==null&&t!==void 0?t:"")||ue.getFormatter("dxPager-pagesCountText")()}selectLastPageIndex(){this.props.pageIndexChange(this.props.pageCount-1)}valueChange(t){this.props.pageIndexChange(t-1)}get restAttributes(){var t=this.props,i=Lt(t,zte);return i}render(){var t=this.props;return jte({props:be({},t),pageIndexRef:this.pageIndexRef,value:this.value,width:this.width,pagesCountText:this.pagesCountText,selectLastPageIndex:this.selectLastPageIndex,valueChange:this.valueChange,restAttributes:this.restAttributes})}}WR.defaultProps=qte;var Yte=["hasKnownLastPage","isLargeDisplayMode","maxPagesCount","pageCount","pageIndex","pageIndexChange","pagesCountText","showNavigationButtons","totalCount"],df="dx-navigate-button",zR="dx-prev-button",GR="dx-next-button",UR="dx-button-disable",Xte="".concat(df," ").concat(GR),Zte="".concat(df," ").concat(zR),Qte="".concat(UR," ").concat(df," ").concat(GR),Jte="".concat(UR," ").concat(df," ").concat(zR),eie=e=>{var{navigateToNextPage:t,navigateToPrevPage:i,nextClassName:n,pageIndexChange:r,prevClassName:a,props:{isLargeDisplayMode:o,maxPagesCount:s,pageCount:l,pageIndex:u,pagesCountText:d},renderNextButton:c,renderPrevButton:h}=e;return jr([h&&Et(2,_u,{className:a,label:"Previous page",onClick:i}),o&&Et(2,VR,{maxPagesCount:s,pageCount:l,pageIndex:u,pageIndexChange:r}),!o&&Et(2,WR,{pageCount:l,pageIndex:u,pageIndexChange:r,pagesCountText:d}),c&&Et(2,_u,{className:n,label:"Next page",onClick:t})],0)};function tie(e){return e==="next"?1:-1}var iie={isLargeDisplayMode:!0},nie={get pageIndex(){return _i.pageIndex},get maxPagesCount(){return _i.maxPagesCount},get pageCount(){return _i.pageCount},get hasKnownLastPage(){return _i.hasKnownLastPage},get showNavigationButtons(){return _i.showNavigationButtons},get totalCount(){return _i.totalCount},get isLargeDisplayMode(){return iie.isLargeDisplayMode}};class KR extends Ln{constructor(t){super(t),this.state={},this.pageIndexChange=this.pageIndexChange.bind(this),this.navigateToNextPage=this.navigateToNextPage.bind(this),this.navigateToPrevPage=this.navigateToPrevPage.bind(this),this.getNextDirection=this.getNextDirection.bind(this),this.getPrevDirection=this.getPrevDirection.bind(this),this.canNavigateToPage=this.canNavigateToPage.bind(this),this.getNextPageIndex=this.getNextPageIndex.bind(this),this.canNavigateTo=this.canNavigateTo.bind(this),this.navigateToPage=this.navigateToPage.bind(this)}get config(){return"ConfigContext"in this.context?this.context.ConfigContext:Zh}pageIndexChange(t){this.canNavigateToPage(t)&&this.props.pageIndexChange(t)}navigateToNextPage(){this.navigateToPage(this.getNextDirection())}navigateToPrevPage(){this.navigateToPage(this.getPrevDirection())}getNextDirection(){var t;return(t=this.config)!==null&&t!==void 0&&t.rtlEnabled?"prev":"next"}getPrevDirection(){var t;return(t=this.config)!==null&&t!==void 0&&t.rtlEnabled?"next":"prev"}canNavigateToPage(t){return this.props.hasKnownLastPage?t>=0&&t<=this.props.pageCount-1:t>=0}getNextPageIndex(t){return this.props.pageIndex+tie(t)}canNavigateTo(t){return this.canNavigateToPage(this.getNextPageIndex(t))}navigateToPage(t){this.pageIndexChange(this.getNextPageIndex(t))}get renderPrevButton(){var{isLargeDisplayMode:t,showNavigationButtons:i}=this.props;return!t||i}get renderNextButton(){return this.renderPrevButton||!this.props.hasKnownLastPage}get nextClassName(){var t=this.getNextDirection(),i=this.canNavigateTo(t);return i?Xte:Qte}get prevClassName(){var t=this.getPrevDirection(),i=this.canNavigateTo(t);return i?Zte:Jte}get restAttributes(){var t=this.props,i=Lt(t,Yte);return i}render(){var t=this.props;return eie({props:be({},t),config:this.config,pageIndexChange:this.pageIndexChange,navigateToNextPage:this.navigateToNextPage,navigateToPrevPage:this.navigateToPrevPage,renderPrevButton:this.renderPrevButton,renderNextButton:this.renderNextButton,nextClassName:this.nextClassName,prevClassName:this.prevClassName,restAttributes:this.restAttributes})}}KR.defaultProps=nie;var rie=["accessKey","activeStateEnabled","className","dataSource","defaultValue","disabled","displayExpr","focusStateEnabled","height","hint","hoverStateEnabled","isValid","label","labelMode","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationStatus","value","valueChange","valueExpr","visible","width"],aie=e=>{var{componentProps:t,restAttributes:i}=e;return nn(Et(2,rf,be({componentType:xC,componentProps:t,templateNames:["dropDownButtonTemplate","groupTemplate","itemTemplate"]},i)))},Sn=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(vi),Object.getOwnPropertyDescriptors({defaultValue:null,isReactComponentWrapper:!0}))),oie={get defaultValue(){return Sn.defaultValue},get readOnly(){return Sn.readOnly},get name(){return Sn.name},get validationError(){return Sn.validationError},get validationErrors(){return Sn.validationErrors},get validationMessageMode(){return Sn.validationMessageMode},get validationStatus(){return Sn.validationStatus},get isValid(){return Sn.isValid},get className(){return Sn.className},get activeStateEnabled(){return xs.activeStateEnabled},get disabled(){return Sn.disabled},get focusStateEnabled(){return xs.focusStateEnabled},get hoverStateEnabled(){return xs.hoverStateEnabled},get tabIndex(){return Sn.tabIndex},get visible(){return Sn.visible},get label(){return yh.label},get labelMode(){return yh.labelMode},isReactComponentWrapper:!0};class jR extends Ln{constructor(t){super(t),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue}}get componentProps(){return be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})}get restAttributes(){var t=be({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}),i=Lt(t,rie);return i}render(){var t=this.props;return aie({props:be({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}jR.defaultProps=oie;var sie=["pageSize","pageSizeChange","pageSizes","parentRef"],lie=e=>{var{props:{pageSize:t,pageSizeChange:i,pageSizes:n},width:r}=e;return Et(2,jR,{displayExpr:"text",valueExpr:"value",dataSource:n,value:t,valueChange:i,width:r})},uie={get pageSize(){return _i.pageSize}};class qR extends fr{constructor(t){super(t),this.state={minWidth:10},this.updateWidth=this.updateWidth.bind(this)}createEffects(){return[new Rt(this.updateWidth,[this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChange,this.props.pageSizes])]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChange,this.props.pageSizes])}updateWidth(){this.setState(t=>({minWidth:OR(this.props.parentRef.current)||t.minWidth}))}get width(){return HR(this.state.minWidth,this.props.pageSizes.map(t=>t.value))}get restAttributes(){var t=this.props,i=Lt(t,sie);return i}render(){var t=this.props;return lie({props:be({},t),width:this.width,restAttributes:this.restAttributes})}}qR.defaultProps=uie;var die=["pageSize","pageSizeChange","pageSizes"],cie=e=>{var{pageSizesText:t}=e;return jr(t.map(i=>{var{className:n,click:r,label:a,text:o}=i;return Et(2,_u,{className:n,label:a,onClick:r,children:o},o)}),0)},hie={get pageSize(){return _i.pageSize}};class YR extends Ln{constructor(t){super(t),this.state={},this.__getterCache={},this.onPageSizeChange=this.onPageSizeChange.bind(this)}get pageSizesText(){return this.__getterCache.pageSizesText!==void 0?this.__getterCache.pageSizesText:this.__getterCache.pageSizesText=(()=>{var{pageSize:t,pageSizes:i}=this.props;return i.map((n,r)=>{var{text:a,value:o}=n,s=o===t,l=Tn({[s?Ate:FR]:!0,[Dte]:r===0});return{className:l,click:this.onPageSizeChange(o),label:"Display ".concat(o," items on page"),text:a}})})()}onPageSizeChange(t){return()=>(this.props.pageSizeChange(t),this.props.pageSize)}get restAttributes(){var t=this.props,i=Lt(t,die);return i}componentWillUpdate(t,i,n){(this.props.pageSize!==t.pageSize||this.props.pageSizes!==t.pageSizes||this.props.pageSizeChange!==t.pageSizeChange)&&(this.__getterCache.pageSizesText=void 0)}render(){var t=this.props;return cie({props:be({},t),pageSizesText:this.pageSizesText,restAttributes:this.restAttributes})}}YR.defaultProps=hie;var fie=["isLargeDisplayMode","pageSize","pageSizeChange","pageSizes","rootElementRef"],pie=e=>{var{htmlRef:t,normalizedPageSizes:i,props:{isLargeDisplayMode:n,pageSize:r,pageSizeChange:a}}=e;return qt(1,"div",Tte,[n&&Et(2,YR,{pageSizes:i,pageSize:r,pageSizeChange:a}),!n&&Et(2,qR,{parentRef:t,pageSizes:i,pageSize:r,pageSizeChange:a})],0,null,null,t)};function vie(){return ue.getFormatter("dxPager-pageSizesAllText")()}var _ie={isLargeDisplayMode:!0},gie={get pageSize(){return _i.pageSize},get pageSizes(){return _i.pageSizes},get isLargeDisplayMode(){return _ie.isLargeDisplayMode}};class XR extends fr{constructor(t){super(t),this.state={},this.htmlRef=xi(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this)}createEffects(){return[new Rt(this.setRootElementRef,[])]}setRootElementRef(){var{rootElementRef:t}=this.props;t&&(t.current=this.htmlRef.current)}get normalizedPageSizes(){return this.__getterCache.normalizedPageSizes!==void 0?this.__getterCache.normalizedPageSizes:this.__getterCache.normalizedPageSizes=(()=>{var{pageSizes:t}=this.props;return t.map(i=>i==="all"||i===0?{text:vie(),value:0}:{text:String(i),value:i})})()}get restAttributes(){var t=this.props,i=Lt(t,fie);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),this.props.pageSizes!==t.pageSizes&&(this.__getterCache.normalizedPageSizes=void 0)}render(){var t=this.props;return pie({props:be({},t),htmlRef:this.htmlRef,normalizedPageSizes:this.normalizedPageSizes,restAttributes:this.restAttributes})}}XR.defaultProps=gie;var mie=["className","displayMode","gridCompatibility","hasKnownLastPage","infoText","infoTextRef","infoTextVisible","isLargeDisplayMode","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pageSizesRef","pagesCountText","pagesNavigatorVisible","pagesRef","rootElementRef","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"],Cie=e=>{var{classes:t,infoVisible:i,isLargeDisplayMode:n,pageIndexSelectorVisible:r,pagesContainerVisibility:a,pagesContainerVisible:o,props:{hasKnownLastPage:s,infoText:l,infoTextRef:u,maxPagesCount:d,pageCount:c,pageIndex:h,pageIndexChange:f,pageSize:p,pageSizeChange:g,pageSizes:m,pageSizesRef:C,pagesCountText:x,pagesRef:T,rtlEnabled:R,showNavigationButtons:A,showPageSizes:H,totalCount:$,visible:V},restAttributes:U,widgetRootElementRef:K}=e;return nn(Et(2,Qh,be({rootElementRef:K,rtlEnabled:R,classes:t,visible:V},U,{children:[H&&Et(2,XR,{rootElementRef:C,isLargeDisplayMode:n,pageSize:p,pageSizeChange:g,pageSizes:m}),o&&qt(1,"div",Ete,[i&&Et(2,LR,{rootElementRef:u,infoText:l,pageCount:c,pageIndex:h,totalCount:$}),r&&qt(1,"div",wte,Et(2,KR,{hasKnownLastPage:s,isLargeDisplayMode:n,maxPagesCount:d,pageCount:c,pageIndex:h,pageIndexChange:f,pagesCountText:x,showNavigationButtons:A,totalCount:$}),2,null,null,T)],0,{style:eC({visibility:a})})]})))},yie=Object.create(Object.prototype,be(Object.getOwnPropertyDescriptors(_i),Object.getOwnPropertyDescriptors({infoTextVisible:!0,isLargeDisplayMode:!0})));class ZR extends fr{constructor(t){super(t),this.state={},this.widgetRootElementRef=xi(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this),this.createFakeInstance=this.createFakeInstance.bind(this)}createEffects(){return[new Rt(this.setRootElementRef,[])]}getChildContext(){return be({},this.context,{KeyboardActionContext:this.keyboardAction})}setRootElementRef(){var{rootElementRef:t}=this.props;t&&(t.current=this.widgetRootElementRef.current)}createFakeInstance(){return{option:()=>!1,element:()=>this.widgetRootElementRef.current,_createActionByOption:()=>t=>{var i,n;(i=(n=this.props).onKeyDown)===null||i===void 0||i.call(n,t)}}}get keyboardAction(){return this.__getterCache.keyboardAction!==void 0?this.__getterCache.keyboardAction:this.__getterCache.keyboardAction={registerKeyboardAction:(t,i)=>{var n=this.createFakeInstance();return jA("pager",n,t,void 0,i)}}}get infoVisible(){var{infoTextVisible:t,showInfo:i}=this.props;return i&&t}get pageIndexSelectorVisible(){return this.props.pageSize!==0}get normalizedDisplayMode(){var{displayMode:t,lightModeEnabled:i}=this.props;return t==="adaptive"&&i!==void 0?i?"compact":"full":t}get pagesContainerVisible(){return!!this.props.pagesNavigatorVisible&&this.props.pageCount>0}get pagesContainerVisibility(){if(this.props.pagesNavigatorVisible==="auto"&&this.props.pageCount===1&&this.props.hasKnownLastPage)return"hidden"}get isLargeDisplayMode(){var t=this.normalizedDisplayMode,i=!1;return t==="adaptive"?i=this.props.isLargeDisplayMode:i=t==="full",i}get classes(){var t={["".concat(this.props.className)]:!!this.props.className,[bte]:!0,[Ste]:!this.isLargeDisplayMode};return Tn(t)}get restAttributes(){var t=this.props,i=Lt(t,mie);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),this.props.onKeyDown!==t.onKeyDown&&(this.__getterCache.keyboardAction=void 0)}render(){var t=this.props;return Cie({props:be({},t),widgetRootElementRef:this.widgetRootElementRef,keyboardAction:this.keyboardAction,infoVisible:this.infoVisible,pageIndexSelectorVisible:this.pageIndexSelectorVisible,pagesContainerVisible:this.pagesContainerVisible,pagesContainerVisibility:this.pagesContainerVisibility,isLargeDisplayMode:this.isLargeDisplayMode,classes:this.classes,restAttributes:this.restAttributes})}}ZR.defaultProps=yie;var xie=["className","defaultPageIndex","defaultPageSize","displayMode","gridCompatibility","hasKnownLastPage","infoText","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pagesCountText","pagesNavigatorVisible","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"],bie=e=>{var{pagerProps:t,restAttributes:i}=e;return nn(Et(2,RR,be({contentTemplate:ZR,pagerProps:t},i)))};let QR=class extends qu{constructor(t){super(t),this.__getterCache={},this.state={pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.props.defaultPageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.props.defaultPageIndex},this.pageIndexChange=this.pageIndexChange.bind(this),this.pageSizeChange=this.pageSizeChange.bind(this)}createEffects(){return[Yu()]}pageIndexChange(t){if(this.props.gridCompatibility){var i;this.setState(r=>(i=t+1,{pageIndex:i})),this.props.pageIndexChange(i)}else{var n;this.setState(r=>(n=t,{pageIndex:n})),this.props.pageIndexChange(n)}}get pageIndex(){return this.props.gridCompatibility?(this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex)-1:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}pageSizeChange(t){var i;this.setState(n=>(i=t,{pageSize:i})),this.props.pageSizeChange(i)}get className(){return this.props.gridCompatibility?Tn({"dx-datagrid-pager":!0,["".concat(this.props.className)]:!!this.props.className}):this.props.className}get pagerProps(){return this.__getterCache.pagerProps!==void 0?this.__getterCache.pagerProps:this.__getterCache.pagerProps=be({},be({},this.props,{pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.state.pageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}),{className:this.className,pageIndex:this.pageIndex,pageIndexChange:t=>this.pageIndexChange(t),pageSizeChange:t=>this.pageSizeChange(t)})}get restAttributes(){var t=be({},this.props,{pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.state.pageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}),i=Lt(t,xie);return i}componentWillUpdate(t,i,n){super.componentWillUpdate(),(this.props!==t||this.props.gridCompatibility!==t.gridCompatibility||this.props.className!==t.className||this.state.pageIndex!==i.pageIndex||this.props.pageIndex!==t.pageIndex||this.props.pageIndexChange!==t.pageIndexChange||this.props.pageSizeChange!==t.pageSizeChange)&&(this.__getterCache.pagerProps=void 0)}render(){var t=this.props;return bie({props:be({},t,{pageSize:this.props.pageSize!==void 0?this.props.pageSize:this.state.pageSize,pageIndex:this.props.pageIndex!==void 0?this.props.pageIndex:this.state.pageIndex}),pageIndexChange:this.pageIndexChange,pageIndex:this.pageIndex,pageSizeChange:this.pageSizeChange,className:this.className,pagerProps:this.pagerProps,restAttributes:this.restAttributes})}};QR.defaultProps=pte;let JR=class extends ate{getProps(){var t=super.getProps();return t.onKeyDown=this._wrapKeyDownHandler(t.onKeyDown),t}get _propsInfo(){return{twoWay:[["pageSize","defaultPageSize","pageSizeChange"],["pageIndex","defaultPageIndex","pageIndexChange"]],allowNull:[],elements:[],templates:[],props:["defaultPageSize","pageSizeChange","defaultPageIndex","pageIndexChange","gridCompatibility","className","showInfo","infoText","lightModeEnabled","displayMode","maxPagesCount","pageCount","pagesCountText","visible","hasKnownLastPage","pagesNavigatorVisible","showPageSizes","pageSizes","rtlEnabled","showNavigationButtons","totalCount","onKeyDown","pageSize","pageIndex"]}}get _viewComponent(){return QR}};tt("dxPager",JR);var Sie="pager",Eie=10,nw=function(e){return 1+(parseInt(e.pageIndex())||0)},wie=Tt.View.inherit({init:function(){var e=this.getController("data");e.changed.add(t=>{if(t&&t.repaintChangesOnly){var i=this._pager;i?i.option({pageIndex:nw(e),pageSize:e.pageSize(),pageCount:e.pageCount(),totalCount:e.totalCount(),hasKnownLastPage:e.hasKnownLastPage()}):this.render()}else(!t||t.changeType!=="update"&&t.changeType!=="updateSelection"&&t.changeType!=="updateFocusedRow")&&(this._pager=null,this.render())})},_renderCore:function(){var e=this.element().addClass(this.addWidgetPrefix(Sie)),t=this.option("pager")||{},i=this.getController("data"),n=this.getController("keyboardNavigation"),r={maxPagesCount:Eie,pageIndex:nw(i),pageCount:i.pageCount(),pageSize:i.pageSize(),showPageSizes:t.showPageSizeSelector,showInfo:t.showInfo,displayMode:t.displayMode,pagesNavigatorVisible:t.visible,showNavigationButtons:t.showNavigationButtons,pageSizes:this.getPageSizes(),totalCount:i.totalCount(),hasKnownLastPage:i.hasKnownLastPage(),pageIndexChanged:function(a){i.pageIndex()!==a-1&&i.pageIndex(a-1)},pageSizeChanged:function(a){i.pageSize(a)},onKeyDown:a=>n&&n.executeAction("onKeyDown",a),useLegacyKeyboardNavigation:this.option("useLegacyKeyboardNavigation"),useKeyboard:this.option("keyboardNavigation.enabled")};if(E(t.infoText)&&(r.infoText=t.infoText),this._pager){this._pager.repaint();return}Ke()?this._pager=this._createComponent(e,JR,r):e.addClass("dx-pager").html('<div class="dx-pages"><div class="dx-page"></div></div>')},getPager:function(){return this._pager},getPageSizes:function(){var e=this.getController("data"),t=this.option("pager"),i=t&&t.allowedPageSizes,n=e.pageSize();return(!E(this._pageSizes)||!this._pageSizes.includes(n))&&(this._pageSizes=[],t&&(Array.isArray(i)?this._pageSizes=i:i&&n>1&&(this._pageSizes=[Math.floor(n/2),n,2*n]))),this._pageSizes},isVisible:function(){var e=this.getController("data"),t=this.option("pager"),i=t&&t.visible,n=this.option("scrolling");return i==="auto"&&(n&&(n.mode==="virtual"||n.mode==="infinite")?i=!1:i=e.pageCount()>1||e.isLoaded()&&!e.hasKnownLastPage()),i},getHeight:function(){return this.getElementHeight()},optionChanged:function(e){var t=e.name,i=t==="pager",n=t==="paging",r=t==="dataSource",a=t==="scrolling",o=this.getController("data");if(i||n||a||r){if(e.handled=!0,o.skipProcessingPagingChange(e.fullName))return;(i||n)&&(this._pageSizes=null),r||(this._pager=null,this._invalidate(),Ke()&&i&&this.component&&this.component.resize())}},dispose:function(){this._pager=null}}),Iie={defaultOptions:function(){return{pager:{visible:"auto",showPageSizeSelector:!1,allowedPageSizes:"auto"}}},views:{pagerView:wie}};De.registerModule("pager",Iie);var Tie="columns-separator",rw="columns-separator-transparent",aw="drag-header",Aie="text-content",Cg="drag-action",ow="tracker",sw="drop-highlight",lw="dx-block-separator",uw="dx-header-row",Die="dx-widget",Oie="dx-drag-command-cell",Qi="dxDataGridResizingReordering",Rie=10,dw=5,Bv=.5,Jl=function(e){return e.option("allowColumnResizing")||e.getController("columns").isColumnOptionUsed("allowResizing")},ek=function(e){return e.option("allowColumnReordering")||e.getController("columns").isColumnOptionUsed("allowReordering")},kie=Tt.View.inherit({_renderCore:function(){this.callBase(),this.element().addClass(this.addWidgetPrefix(ow)),this.hide()},_unsubscribeFromCallback:function(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)},_subscribeToCallback:function(){var e=this;e._positionChanged=function(t){var i=e.element();i&&i.hasClass(e.addWidgetPrefix(ow))&&(i.css({top:t.top}),fn(i,t.height))},this._tablePositionController.positionChanged.add(e._positionChanged)},optionChanged:function(e){e.name==="allowColumnResizing"&&(this._unsubscribeFromCallback(),e.value&&(this._subscribeToCallback(),this._invalidate())),this.callBase(e)},init:function(){this.callBase(),this._tablePositionController=this.getController("tablePosition"),this._subscribeToCallback()},isVisible:function(){return Jl(this)},show:function(){this.element().show()},hide:function(){this.element()&&this.element().hide()},setHeight:function(e){fn(this.element(),e)},dispose:function(){this._unsubscribeFromCallback(),this.callBase()}}),tk=Tt.View.inherit({_renderSeparator:function(){},_renderCore:function(e){this.callBase(e),this._isShown=!0,this._renderSeparator(),this.hide()},show:function(){this._isShown=!0},hide:function(){this._isShown=!1},height:function(e){var t=this.element();if(t)if(E(e))fn(t,e);else return je(t)},width:function(e){var t=this.element();if(t)if(E(e))wu(t,e);else return $e(t)}}),Bie=tk.inherit({_renderSeparator:function(){this.callBase();var e=this.element();e.addClass(this.addWidgetPrefix(Tie))},_subscribeToCallback:function(){var e=this,t;e._positionChanged=function(i){t=e.element(),t&&(t.css({top:i.top}),fn(t,i.height))},e._tablePositionController.positionChanged.add(e._positionChanged)},_unsubscribeFromCallback:function(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)},_init:function(){this._isTransparent=Jl(this),this.isVisible()&&this._subscribeToCallback()},isVisible:function(){return this.option("showColumnHeaders")&&(ek(this)||Jl(this))},optionChanged:function(e){e.name==="allowColumnResizing"&&(e.value?(this._init(),this._invalidate(),this.hide(!0)):(this._unsubscribeFromCallback(),this._isTransparent=Jl(this),this.hide(!0))),this.callBase(e)},init:function(){this.callBase(),this._tablePositionController=this.getController("tablePosition"),this._init()},show:function(){var e=this.element();e&&!this._isShown&&(this._isTransparent?e.removeClass(this.addWidgetPrefix(rw)):e.show()),this.callBase()},hide:function(e){var t=this.element(),i=this.addWidgetPrefix(rw);t&&(this._isShown||e)&&(this._isTransparent?(t.addClass(i),t.css("left",""),t.show()):(t.hasClass(i)&&t.removeClass(i),t.hide())),this.callBase()},moveByX:function(e){var t=this.element();t&&t.css("left",e===null?0:e-this._parentElement().offset().left)},changeCursor:function(e){e=E(e)?e:"";var t=this.element();t&&t.css("cursor",e)},dispose:function(){this._unsubscribeFromCallback(),this.callBase()}}),Lie=tk.inherit({init:function(){var e=this;this.callBase(),this.getController("data").loadingChanged.add(function(t){t||e.hide()})},_renderSeparator:function(){this.callBase(),this.element().addClass(lw).html("&nbsp;")},hide:function(){var e=this._parentElement(),t=this.element();t&&this._isShown&&t.css("display","none"),e&&!e.children("."+lw).length&&e.prepend(this.element()),this.callBase()},isVisible:function(){var e=this.option("groupPanel"),t=this.option("columnChooser");return e&&e.visible||t&&t.enabled},show:function(e){var t=this.element(),i=function(n){$t.stop(t,!0),$t.animate(t,{type:"slide",from:{width:0,display:n.display},to:n,duration:300,easing:"swing"})};if(t&&!this._isShown)switch(e){case"group":i({width:"50px",display:"inline-block"});break;case"columnChooser":i({width:"100%",display:"block"});break;default:t.css("display","")}this.callBase()}}),Pie=Tt.View.inherit({_isDragging:!1,isDragging:function(){return this._isDragging},_getDraggingPanelByPos:function(e){var t;return F(this._dragOptions.draggingPanels,function(i,n){if(n){var r=n.getBoundingRect();if(r&&(r.bottom===void 0||e.y<r.bottom)&&(r.top===void 0||e.y>r.top)&&(r.left===void 0||e.x>r.left)&&(r.right===void 0||e.x<r.right))return t=n,!1}}),t},_renderCore:function(){this.element().addClass(this.addWidgetPrefix(aw)+" "+this.addWidgetPrefix(Aie)+" "+Die).hide()},_resetTargetColumnOptions:function(){var e=this._dropOptions;e.targetColumnIndex=-1,delete e.targetColumnElement,delete e.isLast,delete e.posX,delete e.posY},_getVisibleIndexObject:function(e,t){return E(e)?{columnIndex:t,rowIndex:e}:t},dispose:function(){var e=this.element();this._dragOptions=null,e&&e.parent().find("."+this.addWidgetPrefix(aw)).remove()},isVisible:function(){var e=this.getController("columns"),t=e.getCommonSettings();return this.option("showColumnHeaders")&&(ek(this)||t.allowGrouping||t.allowHiding)},init:function(){var e=this;this.callBase(),this._controller=this.getController("draggingHeader"),this._columnsResizerViewController=this.getController("columnsResizer"),this.getController("data").loadingChanged.add(function(t){var i=e.element();!t&&i&&i.hide()})},dragHeader:function(e){var t=e.columnElement,i=!!e.sourceColumn.type;this._isDragging=!0,this._dragOptions=e,this._dropOptions={sourceIndex:e.index,sourceColumnIndex:this._getVisibleIndexObject(e.rowIndex,e.columnIndex),sourceColumnElement:e.columnElement,sourceLocation:e.sourceLocation};var n=fe.getDocument();this._onSelectStart=n.onselectstart,n.onselectstart=function(){return!1},this._controller.drag(this._dropOptions),this.element().css({textAlign:t&&t.css("textAlign"),height:t&&(i&&t.get(0).clientHeight||je(t)),width:t&&(i&&t.get(0).clientWidth||$e(t)),whiteSpace:t&&t.css("whiteSpace")}).addClass(this.addWidgetPrefix(Cg)).toggleClass(Oie,i).text(i?"":e.sourceColumn.caption),this.element().appendTo(JT.getSwatchContainer(t))},moveHeader:function(e){var t=e.event,i=t.data.that,n=zt(t),r=i._columnsResizerViewController?i._columnsResizerViewController.isResizing():!1,a=i._dragOptions;if(i._isDragging&&!r){var o=i.element(),s=Math.abs(n.x-a.columnElement.offset().left-a.deltaX),l=Math.abs(n.y-a.columnElement.offset().top-a.deltaY);if(o.is(":visible")||s>dw||l>dw){o.show();var u=n.x-a.deltaX,d=n.y-a.deltaY;o.css({left:u,top:d}),i.dockHeader(n)}t.preventDefault()}},dockHeader:function(e){var t=this._getDraggingPanelByPos(e),i=this._controller,n=this._dropOptions,r=this._dragOptions;if(t){var a=this.option("rtlEnabled"),o=t.getName()==="columnChooser",s=o?"y":"x",l=t.getName(),u=l==="headers"?r.rowIndex:void 0,d=r.sourceColumn,c=t.getColumnElements(u,d==null?void 0:d.ownerBand)||[],h=r.pointsByTarget=r.pointsByTarget||{},f=l==="columnChooser"?[]:h[l]||i._generatePointsByColumns(O({},r,{targetDraggingPanel:t,columns:t.getColumns(u),columnElements:c,isVerticalOrientation:o,startColumnIndex:l==="headers"&&v(c[0]).index()}));if(h[l]=f,n.targetLocation=l,f.length>0)for(var p=0;p<f.length;p++){var g=f[p+1]&&(f[p][s]+f[p+1][s])/2;if(g===void 0||(a&&s==="x"?e[s]>g:e[s]<g)){n.targetColumnIndex=this._getVisibleIndexObject(u,f[p].columnIndex),c[p]?(n.targetColumnElement=c.eq(p),n.isLast=!1):(n.targetColumnElement=c.last(),n.isLast=!0),n.posX=f[p].x,n.posY=f[p].y,i.dock(n);break}}else this._resetTargetColumnOptions(),i.dock(n)}},dropHeader:function(e){var t=e.event,i=t.data.that,n=i._controller;i.element().hide(),n&&i._isDragging&&n.drop(i._dropOptions),i.element().appendTo(i._parentElement()),i._dragOptions=null,i._dropOptions=null,i._isDragging=!1,fe.getDocument().onselectstart=i._onSelectStart||null}}),Lv=function(e){return e.option("columnResizingMode")!=="widget"},Fie=Tt.ViewController.inherit({_isHeadersRowArea:function(e){if(this._columnHeadersView){var t=this._columnHeadersView.element();if(t){var i=t.offset().top,n=this._columnHeadersView.getHeadersRowHeight();return e>=i&&e<=i+n}}return!1},_isRtlParentStyle:function(){var e;return this.option("rtlEnabled")&&((e=this._$parentContainer)===null||e===void 0?void 0:e.parent().css("direction"))==="rtl"},_pointCreated:function(e,t,i){var n=Lv(this),r=this.option("rtlEnabled"),a=this._isRtlParentStyle(),o=!n&&r&&!a?0:1;if(e.index>=o&&e.index<t+(!n&&(!r||a)?1:0)){e.columnIndex-=o;var s=i[e.columnIndex]||{},l=i[e.columnIndex+1]||{};return!(n?s.allowResizing&&l.allowResizing:s.allowResizing)}return!0},_getTargetPoint:function(e,t,i){if(e){for(var n=0;n<e.length;n++)if(!(e[n].x===e[0].x&&e[n+1]&&e[n].x===e[n+1].x)&&e[n].x-i<=t&&t<=e[n].x+i)return e[n]}return null},_moveSeparator:function(e){var t,i=e.event,n=i.data,r=n._columnsSeparatorView.width(),a=Lv(n),o=r/2,s=n._$parentContainer.offset(),l=s.left,u=zt(i),d=n.option("rtlEnabled"),c=this._isRtlParentStyle(),h=(t=n._draggingHeaderView)===null||t===void 0?void 0:t.isDragging();if(n._isResizing&&n._resizingInfo){if((l<=u.x||!a&&c)&&(!a||u.x<=l+$e(n._$parentContainer))&&n._updateColumnsWidthIfNeeded(u.x)){var f=n._columnHeadersView.getColumnElements().eq(n._resizingInfo.currentColumnIndex),p=f[0];if(p){var g=p.getBoundingClientRect().width;n._columnsSeparatorView.moveByX(f.offset().left+((a||c)&&d?0:g)),n._tablePositionController.update(n._targetPoint.y),i.preventDefault()}}}else h||(n._isHeadersRowArea(u.y)?(n._previousParentOffset&&(n._previousParentOffset.left!==s.left||n._previousParentOffset.top!==s.top)&&n.pointsByColumns(null),n._targetPoint=n._getTargetPoint(n.pointsByColumns(),u.x,r),n._previousParentOffset=s,n._isReadyResizing=!1,n._targetPoint?(n._columnsSeparatorView.changeCursor("col-resize"),n._columnsSeparatorView.moveByX(n._targetPoint.x-o),n._tablePositionController.update(n._targetPoint.y),n._isReadyResizing=!0,i.preventDefault()):(n._columnsSeparatorView.changeCursor(),n._columnsSeparatorView.moveByX(null))):(n.pointsByColumns(null),n._isReadyResizing=!1,n._columnsSeparatorView.changeCursor(),n._columnsSeparatorView.moveByX(null)))},_endResizing:function(e){var t=e.event,i=t.data;i._isResizing&&(i.pointsByColumns(null),i._resizingInfo=null,i._columnsSeparatorView.hide(),i._columnsSeparatorView.changeCursor(),i._trackerView.hide(),i._isReadyResizing=!1,i._isResizing=!1)},_getNextColumnIndex:function(e){return e+1},_setupResizingInfo:function(e){var t=this._targetPoint.columnIndex,i=this._getNextColumnIndex(t),n=this._columnHeadersView.getHeaderElement(t),r=this._columnHeadersView.getHeaderElement(i);this._resizingInfo={startPosX:e,currentColumnIndex:t,currentColumnWidth:n&&n.length>0?Gt(n[0]).width:0,nextColumnIndex:i,nextColumnWidth:r&&r.length>0?Gt(r[0]).width:0}},_startResizing:function(e){var t=e.event,i=t.data,n=zt(t);if(Au(t)&&(i._isHeadersRowArea(n.y)?(i._targetPoint=i._getTargetPoint(i.pointsByColumns(),n.x,Rie),i._targetPoint&&(i._columnsSeparatorView.moveByX(i._targetPoint.x-i._columnsSeparatorView.width()/2),i._isReadyResizing=!0)):i._isReadyResizing=!1),i._isReadyResizing){i._setupResizingInfo(n.x),i._isResizing=!0,i._tablePositionController.update(i._targetPoint.y),i._columnsSeparatorView.show(),i._trackerView.show();var r=i.component.getScrollable();r&&i._isRtlParentStyle()&&(i._scrollRight=$e(r.$content())-$e(r.container())-r.scrollLeft()),t.preventDefault(),t.stopPropagation()}this.isResizing()&&this.getController("editorFactory").loseFocus()},_generatePointsByColumns:function(){var e=this,t=e._columnsController?e._columnsController.getVisibleColumns():[],i=e._columnHeadersView.getColumnElements(),n=[];i&&i.length>0&&(n=xe.getPointsByColumns(i,function(r){return e._pointCreated(r,i.length,t)})),e._pointsByColumns=n},_unsubscribeFromEvents:function(){this._moveSeparatorHandler&&D.off(fe.getDocument(),me(ut.move,Qi),this._moveSeparatorHandler),this._startResizingHandler&&D.off(this._$parentContainer,me(ut.down,Qi),this._startResizingHandler),this._endResizingHandler&&(D.off(this._columnsSeparatorView.element(),me(ut.up,Qi),this._endResizingHandler),D.off(fe.getDocument(),me(ut.up,Qi),this._endResizingHandler))},_subscribeToEvents:function(){this._moveSeparatorHandler=this.createAction(this._moveSeparator),this._startResizingHandler=this.createAction(this._startResizing),this._endResizingHandler=this.createAction(this._endResizing),D.on(fe.getDocument(),me(ut.move,Qi),this,this._moveSeparatorHandler),D.on(this._$parentContainer,me(ut.down,Qi),this,this._startResizingHandler),D.on(this._columnsSeparatorView.element(),me(ut.up,Qi),this,this._endResizingHandler),D.on(fe.getDocument(),me(ut.up,Qi),this,this._endResizingHandler)},_updateColumnsWidthIfNeeded:function(e){var t,i,n=this._rowsView.contentWidth(),r=this._resizingInfo,a=this._columnsController,o=a.getVisibleColumns(),s=this._columnsSeparatorView.width(),l=Lv(this),u=l&&this.option("adaptColumnWidthByRatio")&&!this.option("columnAutoWidth"),d=this.option("rtlEnabled"),c=this._isRtlParentStyle(),h=o[r.currentColumnIndex],f=o[r.nextColumnIndex];function p(V){return Me(V)&&V.slice(-1)==="%"}function g(V,U,K,X){if(V){var M=V.width;M&&(X=p(M)),X?(a.columnOption(V.index,"visibleWidth",U),a.columnOption(V.index,"width",(U/K*100).toFixed(3)+"%")):(a.columnOption(V.index,"visibleWidth",null),a.columnOption(V.index,"width",U))}}t=e-r.startPosX,(l||c)&&d&&(t=-t);var{cellWidth:m,nextCellWidth:C}=function(V){var U,K,X,M=r.currentColumnWidth+V,q=h&&h.minWidth||s,b={};return M>=q?b.cellWidth=M:(b.cellWidth=q,X=!0),l&&(K=r.nextColumnWidth-V,U=f&&f.minWidth||s,K>=U?X?b.nextCellWidth=r.nextColumnWidth-(V+q-M):b.nextCellWidth=K:(b.nextCellWidth=U,b.cellWidth=r.currentColumnWidth+(V-U+K))),b}(t);if(i=h.width!==m,i){if(a.beginUpdate(),m=Math.floor(m),n=function(V,U){var K=U.every(M=>M.width);if(K){var X=U.reduce((M,q)=>(p(q.width)&&(M+=parseFloat(q.width)),M),0);X>100&&(V=V/X*100)}return V}(n,o),g(h,m,n,u),l)C=Math.floor(C),g(f,C,n,u);else{var x=this._columnHeadersView.getColumnWidths();x[r.currentColumnIndex]=m;var T=x.reduce((V,U)=>V+U,0)>this._rowsView.contentWidth();if(!T){var R=xe.getLastResizableColumnIndex(o);R>=0&&a.columnOption(o[R].index,"visibleWidth","auto")}for(var A=0;A<x.length;A++)o[A]&&o[A]!==h&&o[A].width===void 0&&a.columnOption(o[A].index,"width",x[A])}if(a.endUpdate(),!l){this.component.updateDimensions();var H=this.component.getScrollable();if(H&&c){var $=$e(H.$content())-$e(H.container())-this._scrollRight;H.scrollTo({left:$})}}}return i},_subscribeToCallback:function(e,t){e.add(t),this._subscribesToCallbacks.push({callback:e,handler:t})},_unsubscribeFromCallbacks:function(){for(var e=0;e<this._subscribesToCallbacks.length;e++){var t=this._subscribesToCallbacks[e];t.callback.remove(t.handler)}this._subscribesToCallbacks=[]},_unsubscribes:function(){this._unsubscribeFromEvents(),this._unsubscribeFromCallbacks()},_init:function(){var e=this,t=function(){e._isResizing||e.pointsByColumns(null)},i=function(a){e._scrollLeft!==a.left&&(e._scrollLeft=a.left,e.pointsByColumns(null))};e._columnsSeparatorView=e.getView("columnsSeparatorView"),e._columnHeadersView=e.getView("columnHeadersView"),e._trackerView=e.getView("trackerView"),e._rowsView=e.getView("rowsView"),e._columnsController=e.getController("columns"),e._tablePositionController=e.getController("tablePosition"),e._$parentContainer=e.component.$element(),e._draggingHeaderView=e.component.getView("draggingHeaderView"),e._subscribeToCallback(e._columnHeadersView.renderCompleted,t),e._subscribeToCallback(e._columnHeadersView.resizeCompleted,t),e._subscribeToCallback(e._columnsSeparatorView.renderCompleted,function(){e._unsubscribeFromEvents(),e._subscribeToEvents()}),e._subscribeToCallback(e._rowsView.renderCompleted,function(){e._rowsView.scrollChanged.remove(i),e._rowsView.scrollChanged.add(i)});var n=e._rowsView.getScrollbarWidth()!==0,r=0;e._subscribeToCallback(e.getController("tablePosition").positionChanged,function(a){if(e._isResizing&&!e._rowsView.isResizing){var o=e._rowsView.getScrollbarWidth()!==0;n!==o||r&&r!==a.height?(n=o,r=a.height,e.component.updateDimensions()):e._rowsView.updateFreeSpaceRowHeight()}r=a.height})},optionChanged:function(e){this.callBase(e),e.name==="allowColumnResizing"&&(e.value?(this._init(),this._subscribeToEvents()):this._unsubscribes())},isResizing:function(){return this._isResizing},init:function(){this._subscribesToCallbacks=[],Jl(this)&&this._init()},pointsByColumns:function(e){if(e!==void 0)this._pointsByColumns=e;else return this._pointsByColumns||this._generatePointsByColumns(),this._pointsByColumns},dispose:function(){this._unsubscribes(),this.callBase()}}),Mie=Tt.ViewController.inherit({update:function(e){var t={},i=this._columnHeadersView.element(),n=i&&i.offset(),r=n&&n.top||0,a=E(e)?Math.abs(e-r):0,o=this._columnHeadersView?this._columnHeadersView.getHeight():0,s=this._rowsView.getScrollbarWidth(!0),l=this._rowsView?this._rowsView.height()-s:0,u=this.component.getController("columnsResizer"),d=this.component.getView("draggingHeaderView");t.height=o;var c=u.isResizing()!==!1||d.isDragging();c&&(t.height+=l-a),e!==null&&i&&i.length&&(t.top=i[0].offsetTop+a),this.positionChanged.fire(t)},init:function(){var e=this;e.callBase(),e._columnHeadersView=this.getView("columnHeadersView"),e._rowsView=this.getView("rowsView"),e._pagerView=this.getView("pagerView"),e._rowsView.resizeCompleted.add(function(){if(e.option("allowColumnResizing")){var t=e.getController("columnsResizer")._targetPoint;e.update(t?t.y:null)}})},ctor:function(e){this.callBase(e),this.positionChanged=dt()}}),Vie=Tt.ViewController.inherit({_generatePointsByColumns:function(e){var t=this;return xe.getPointsByColumns(e.columnElements,function(i){return t._pointCreated(i,e.columns,e.targetDraggingPanel.getName(),e.sourceColumn)},e.isVerticalOrientation,e.startColumnIndex)},_pointCreated:function(e,t,i,n){var r=t[e.columnIndex],a=t[e.columnIndex-1];switch(i){case"columnChooser":return!0;case"headers":return n&&!n.allowReordering||(!r||!r.allowReordering)&&(!a||!a.allowReordering);default:return t.length===0}},_subscribeToEvents:function(e,t){var i=this;F(t,function(n,r){if(r)for(var a,o=r.getRowCount?r.getRowCount():1,s=r.getName(),l=function(c,h){if(h){var f=v(h),p=a[c];r.allowDragging(p,s,t)&&(f.addClass(i.addWidgetPrefix(Cg)),D.on(f,me(vo,Qi),i.createAction(function(g){var m=g.event,C=zt(m);e.dragHeader({deltaX:C.x-v(m.currentTarget).offset().left,deltaY:C.y-v(m.currentTarget).offset().top,sourceColumn:p,index:p.index,columnIndex:c,columnElement:f,sourceLocation:s,draggingPanels:t,rowIndex:i._columnsController.getRowIndex(p.index,!0)})})),D.on(f,me(ga,Qi),{that:e},i.createAction(e.moveHeader)),D.on(f,me(_o,Qi),{that:e},i.createAction(e.dropHeader)))}},u=0;u<o;u++){var d=r.getColumnElements(u)||[];d.length&&(a=r.getColumns(u)||[],F(d,l))}})},_unsubscribeFromEvents:function(e,t){var i=this;F(t,function(n,r){if(r){var a=r.getColumnElements()||[];F(a,function(o,s){var l=v(s);D.off(l,me(vo,Qi)),D.off(l,me(ga,Qi)),D.off(l,me(_o,Qi)),l.removeClass(i.addWidgetPrefix(Cg))})}})},_getSeparator:function(e){return e==="headers"?this._columnsSeparatorView:this._blockSeparatorView},hideSeparators:function(e){var t=this._blockSeparatorView,i=this._columnsSeparatorView;this._animationColumnIndex=null,t&&t.hide(),e!=="block"&&i&&i.hide()},init:function(){var e=this;e.callBase(),e._columnsController=e.getController("columns"),e._columnHeadersView=e.getView("columnHeadersView"),e._columnsSeparatorView=e.getView("columnsSeparatorView"),e._draggingHeaderView=e.getView("draggingHeaderView"),e._rowsView=e.getView("rowsView"),e._blockSeparatorView=e.getView("blockSeparatorView"),e._headerPanelView=e.getView("headerPanel"),e._columnChooserView=e.getView("columnChooserView");var t=function(){if(e._draggingHeaderView){var i=[e._columnChooserView,e._columnHeadersView,e._headerPanelView];e._unsubscribeFromEvents(e._draggingHeaderView,i),e._subscribeToEvents(e._draggingHeaderView,i)}};e._columnHeadersView.renderCompleted.add(t),e._headerPanelView&&e._headerPanelView.renderCompleted.add(t),e._columnChooserView&&e._columnChooserView.renderCompleted.add(t)},allowDrop:function(e){return this._columnsController.allowMoveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)},drag:function(e){var t=e.sourceIndex,i=e.sourceLocation,n=e.sourceColumnElement,r=this._columnHeadersView,a=this._rowsView;n&&(n.css({opacity:Bv}),i==="headers"&&(r&&r.setRowsOpacity(t,Bv),a&&a.setRowsOpacity(t,Bv)))},dock:function(e){var t=this,i=He(e.targetColumnIndex)?e.targetColumnIndex.columnIndex:e.targetColumnIndex,n=e.sourceLocation,r=e.targetLocation,a=t._getSeparator(r),o=i>=0;t._columnHeadersView.element().find("."+uw).toggleClass(t.addWidgetPrefix(sw),n!=="headers"&&r==="headers"&&!o),a&&(t.allowDrop(e)&&o?r==="group"||r==="columnChooser"?function(){t._animationColumnIndex!==i&&(t.hideSeparators(),a.element()[e.isLast?"insertAfter":"insertBefore"](e.targetColumnElement),t._animationColumnIndex=i,a.show(r))}():(t.hideSeparators("block"),t.getController("tablePosition").update(e.posY),a.moveByX(e.posX-a.width()),a.show()):t.hideSeparators())},drop:function(e){var t=e.sourceColumnElement;if(t&&(t.css({opacity:""}),this._columnHeadersView.setRowsOpacity(e.sourceIndex,""),this._rowsView.setRowsOpacity(e.sourceIndex,""),this._columnHeadersView.element().find("."+uw).removeClass(this.addWidgetPrefix(sw))),this.allowDrop(e)){var i=this._getSeparator(e.targetLocation);i&&i.hide(),this._columnsController.moveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)}},dispose:function(){this._draggingHeaderView&&this._unsubscribeFromEvents(this._draggingHeaderView,[this._columnChooserView,this._columnHeadersView,this._headerPanelView])}}),Mo={views:{columnsSeparatorView:Bie,blockSeparatorView:Lie,draggingHeaderView:Pie,trackerView:kie},controllers:{draggingHeader:Vie,tablePosition:Mie,columnsResizer:Fie},extenders:{views:{rowsView:{_needUpdateRowHeight:function(e){var t=this.option("wordWrapEnabled"),i=this.getController("columnsResizer"),n=i.isResizing();return this.callBase.apply(this,arguments)||e>0&&t&&n}}},controllers:{editorFactory:{renderFocusOverlay:function(){if(!this.getController("columnsResizer").isResizing())return this.callBase.apply(this,arguments)}}}}};Mo.views.draggingHeaderView;Mo.controllers.draggingHeader;Mo.views.columnsSeparatorView;Mo.controllers.tablePosition;Mo.controllers.columnsResizer;Mo.views.trackerView;De.registerModule("columnsResizingReordering",Mo);var Pv="rowsview",cw="edit-form",Nie="group-footer",is="dx-row",Hie="dx-data-row",$ie="dx-group-row",Wie="dx-header-row",zie="edit-form-item",Gie="dx-master-detail-row",ik="dx-freespace-row",Uie="dx-virtual-row",hw="dx-master-detail-cell",nk="dx-editor-cell",Kie="dx-dropdowneditor-overlay",ic="dx-command-expand",rk="dx-command-select",jie="dx-command-edit",fw="[class^=dx-command]",nc="dx-cell-focus-disabled",qie="dxDateBox",pw="dx-state-focused",Yie="dx-widget",Xie="dx-revert-button",Fv="delete",Lc="input:not([type='hidden']), textarea, a, select, button, [tabindex], .dx-checkbox",vw="".concat(Lc,", .dx-dropdowneditor-icon"),Zie="row",ak="form",_w="batch",gw="cell",mw="row",Cw="cell",yw="columnHeadersView",Qie=["shift","control","alt"];function gs(e){return e&&e.hasClass($ie)}function Pc(e){return e&&e.hasClass(Gie)}function xl(e){return e&&!gs(e)&&!Pc(e)}function Jie(e){return!e||e.hasClass(ik)||e.hasClass(Uie)}function Nl(e){return e.length&&e[0].tagName==="TD"}function xw(e,t){return!e._isRowEditMode()&&t&&!t.hasClass(rk)&&t.hasClass(nk)}function En(e){return E(e)&&e.length>0}function ok(){return Oe.current().deviceType!=="desktop"}function bw(e){return!!e.parent(".".concat(Wie)).length}function ene(e,t){var i=e.option("rtlEnabled"),n=!1;return i?n=!(t.fixedPosition==="right"||E(t.command)&&!E(t.fixedPosition)):n=!(!E(t.fixedPosition)||t.fixedPosition==="left"),n}function tne(e){var t=e.getController("keyboardNavigation");return t._isVirtualScrolling()?e.option("focusedRowIndex")===t.getRowIndex():!1}var ine=Tt.ViewController.inherit({init:function(){this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._editingController=this.getController("editing"),this._headerPanel=this.getView("headerPanel"),this._columnsController=this.getController("columns"),this._editorFactory=this.getController("editorFactory"),this.isKeyboardEnabled()&&(qW(),this._updateFocusTimeout=null,this._fastEditingStarted=!1,this._focusedCellPosition={},this._canceledCellPosition=null,this._editorFactory.focused.add(e=>{this.setupFocusedView(),this._isNeedScroll&&e.is(":visible")&&this._focusedView&&this._focusedView.getScrollable&&(this._focusedView._scrollToElement(e),this._isNeedScroll=!1)}),this._initViewHandlers(),this._initDocumentHandlers(),this.createAction("onKeyDown"))},_initViewHandlers:function(){var e=this.getView("rowsView"),t=i=>{var n=v(i.target),r=v(i.relatedTarget).closest(e.element()).length,a=n.hasClass("dx-link");if(a&&!r&&this._isEventInCurrentGrid(i)){var o=this._getFocusedCell();o=En(o)?o:e.getCellElements(0).filter("[tabindex]").eq(0),n.closest(o).length||(i.preventDefault(),D.trigger(o,"focus"))}};e.renderCompleted.add(i=>{var n=e.element(),r=!i||i.changeType==="refresh",a=this._focusedView&&this._focusedView.name===e.name,o=!1,s=i&&(i.changeType==="append"||i.changeType==="prepend"),l=v(":focus"),u=!l.length||l.closest(n).length;D.off(n,"focusin",t),D.on(n,"focusin",t),this._initPointerEventHandler(),this._initKeyDownHandler(),this._setRowsViewAttributes(),a&&u&&(o=this._isNeedFocus?!s:this._isHiddenFocus&&r&&!(i!=null&&i.virtualColumnsScrolling),o&&this._updateFocus(!0))})},_initDocumentHandlers:function(){var e=fe.getDocument();this._documentClickHandler=this.createAction(t=>{var i=v(t.event.target),n=this._isEventInCurrentGrid(t.event)&&i.closest(".".concat(this.addWidgetPrefix(Pv))).length,r=i.closest(".".concat(Kie)).length,a=this.getController("columnsResizer"),o=!!a&&a.isResizing();if(!n&&!r&&!o){var s=this._focusedView?i.parents().filter(this._focusedView.element()).length>0:!1;!s&&this._resetFocusedCell(!0),this._resetFocusedView()}}),D.on(e,me(ut.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler)},_setRowsViewAttributes:function(){var e=this._getRowsViewElement(),t=!this._dataController.getVisibleRows().length;t&&this._applyTabIndexToElement(e)},_initPointerEventHandler:function(){var e=ok()?ct:ut.down,t=".".concat(is," > td, .").concat(is),i=this._getRowsViewElement();E(this._pointerEventAction)||(this._pointerEventAction=this.createAction(this._pointerEventHandler)),D.off(i,me(e,"dxDataGridKeyboardNavigation"),this._pointerEventAction),D.on(i,me(e,"dxDataGridKeyboardNavigation"),t,this._pointerEventAction)},_initKeyDownHandler:function(){var e=this._getRowsViewElement();ha.off(this._keyDownListener),this._keyDownListener=ha.on(e,null,t=>this._keyDownHandler(t))},dispose:function(){this.callBase(),this._resetFocusedView(),ha.off(this._keyDownListener),D.off(fe.getDocument(),me(ut.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),clearTimeout(this._updateFocusTimeout),YW()},optionChanged:function(e){switch(e.name){case"keyboardNavigation":case"useLegacyKeyboardNavigation":e.handled=!0;break;default:this.callBase(e)}},isRowFocusType:function(){return this.focusType===mw},isCellFocusType:function(){return this.focusType===Cw},setRowFocusType:function(){this.option("focusedRowEnabled")&&(this.focusType=mw)},setCellFocusType:function(){this.focusType=Cw},_keyDownHandler:function(e){var t=!0;this._isNeedFocus=!0,this._isNeedScroll=!0;var i=this._processOnKeyDown(e),n=this._editingController.isEditing(),r=e.originalEvent;if(r.isDefaultPrevented()){this._isNeedFocus=!1,this._isNeedScroll=!1;return}if(Qie.indexOf(e.keyName)<0&&this._updateFocusedCellPositionByTarget(r.target),!i){switch(e.keyName){case"leftArrow":case"rightArrow":this._leftRightKeysHandler(e,n),i=!0;break;case"upArrow":case"downArrow":e.ctrl?Fm("rowsView",this,r):this._upDownKeysHandler(e,n),i=!0;break;case"pageUp":case"pageDown":this._pageUpDownKeyHandler(e),i=!0;break;case"space":i=this._spaceKeyHandler(e,n);break;case"A":fi(e.originalEvent)?(this._ctrlAKeyHandler(e,n),i=!0):i=this._beginFastEditing(e.originalEvent);break;case"tab":this._tabKeyHandler(e,n),i=!0;break;case"enter":this._enterKeyHandler(e,n),i=!0;break;case"escape":this._escapeKeyHandler(e,n),i=!0;break;case"F":fi(e.originalEvent)?(this._ctrlFKeyHandler(e),i=!0):i=this._beginFastEditing(e.originalEvent);break;case"F2":this._f2KeyHandler(),i=!0;break;case"del":case"backspace":this._isFastEditingAllowed()&&!this._isFastEditingStarted()&&(i=this._beginFastEditing(r,!0))}!i&&!this._beginFastEditing(r)&&(this._isNeedFocus=!1,this._isNeedScroll=!1,t=!1),t&&r.stopPropagation()}},_processOnKeyDown:function(e){var t=e.originalEvent,i={handled:!1,event:t};return this.executeAction("onKeyDown",i),e.ctrl=t.ctrlKey,e.alt=t.altKey,e.shift=t.shiftKey,!!i.handled},_closeEditCell:function(){setTimeout(()=>{this._editingController.closeEditCell()})},_leftRightKeysHandler:function(e,t){var i=this.getVisibleRowIndex(),n=e.originalEvent,r=this._focusedView&&this._focusedView.getRow(i),a=this._getDirectionCodeByKey(e.keyName),o=this._isFastEditingStarted(),s=(!t||o)&&xl(r);if(s){this.setCellFocusType(),o&&this._closeEditCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(a);var l=this._getNextCell(a);En(l)&&this._arrowKeysHandlerFocusCell(n,l,a),n&&n.preventDefault()}},_upDownKeysHandler:function(e,t){var i,n,r=this._focusedCellPosition.rowIndex,a=this.getVisibleRowIndex(),o=this._focusedView&&this._focusedView.getRow(a),s=e.originalEvent,l=e.keyName==="upArrow",u=this._dataController.dataSource(),d=(i=this._editingController)===null||i===void 0||(n=i.isEditRowByIndex)===null||n===void 0?void 0:n.call(i,a),c=this._isFastEditingStarted(),h=(!d||!t||c)&&o&&!Pc(o);if(h){if(c&&this._closeEditCell(),!this._navigateNextCell(s,e.keyName)&&this._isVirtualRowRender()&&l&&u&&!u.isLoading()){var f=at(o);r=this._focusedCellPosition.rowIndex-1,this._scrollBy(0,-f,r,s)}s&&s.preventDefault()}},_pageUpDownKeyHandler:function(e){var t=this._dataController.pageIndex(),i=this._dataController.pageCount(),n=this.option("paging.enabled"),r=e.keyName==="pageUp",a=r?-1:1,o=this.getView("rowsView").getScrollable();n&&!this._isVirtualScrolling()?(r?t>0:t<i-1)&&!this._isVirtualScrolling()&&(this._dataController.pageIndex(t+a),e.originalEvent.preventDefault()):o&&je(o.container())<je(o.$content())&&(this._scrollBy(0,je(o.container())*a),e.originalEvent.preventDefault())},_spaceKeyHandler:function(e,t){var i=this.getVisibleRowIndex(),n=v(e.originalEvent&&e.originalEvent.target);if(this.option("selection")&&this.option("selection").mode!=="none"&&!t){var r=this._getElementType(n)==="row"&&this.isRowFocusType()&&xl(n),a=n.hasClass(rk);return a&&this.option("selection.showCheckBoxesMode")==="onClick"&&this._selectionController.startSelectionWithCheckboxes(),r||n.parent().hasClass(Hie)||n.hasClass(this.addWidgetPrefix(Pv))?(this._selectionController.changeItemSelection(i,{shift:e.shift,control:e.ctrl}),e.originalEvent.preventDefault(),!0):!1}else return this._beginFastEditing(e.originalEvent)},_ctrlAKeyHandler:function(e,t){!t&&!e.alt&&this.option("selection.mode")==="multiple"&&this.option("selection.allowSelectAll")&&(this._selectionController.selectAll(),e.originalEvent.preventDefault())},_tabKeyHandler:function(e,t){var i=this.option("editing"),n=e.shift?"previous":"next",r=E(this._focusedCellPosition)&&!Rn(this._focusedCellPosition),a=!r||!e.shift&&this._isLastValidCell(this._focusedCellPosition)||e.shift&&this._isFirstValidCell(this._focusedCellPosition),o=e.originalEvent.target,s=this._focusedView&&this._focusedView.element();if(!this._handleTabKeyOnMasterDetailCell(o,n)){if(v(s).addClass(pw),i&&o&&!a)if(v(o).hasClass(this.addWidgetPrefix(Pv))&&this._resetFocusedCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(n),t){if(!this._editingCellTabHandler(e,n))return}else this._targetCellTabHandler(e,n)&&(a=!0);a?(this._editorFactory.loseFocus(),this._editingController.isEditing()&&!this._isRowEditMode()&&(this._resetFocusedCell(!0),this._resetFocusedView(),this._closeEditCell())):e.originalEvent.preventDefault()}},_getMaxHorizontalOffset:function(){var e=this.component.getScrollable(),t=this.getView("rowsView"),i=e?e.scrollWidth()-$e(t.element()):0;return i},_isColumnRendered:function(e){var t=this._columnsController.getVisibleColumns(null,!0),i=this._columnsController.getVisibleColumns(),n=t[e],r=!1;return n&&(r=i.indexOf(n)>=0),r},_isFixedColumn:function(e){var t=this._columnsController.getVisibleColumns(null,!0),i=t[e];return!!i&&!!i.fixed},_isColumnVirtual:function(e){var t=e-this._columnsController.getColumnIndexOffset(),i=this._columnsController.getVisibleColumns(),n=i[t];return!!n&&n.command==="virtual"},_processVirtualHorizontalPosition:function(e){var t=this.component.getScrollable(),i=this.getColumnIndex(),n,r=0,a=!1;switch(e){case"next":case"nextInRow":var o=this._getVisibleColumnCount();n=i+1,r=this.option("rtlEnabled")?this._getMaxHorizontalOffset():0,e==="next"?a=o===n||this._isFixedColumn(i)&&!this._isColumnRendered(n):a=o>n&&this._isFixedColumn(i)&&!this._isColumnRendered(n);break;case"previous":case"previousInRow":if(n=i-1,r=this.option("rtlEnabled")?0:this._getMaxHorizontalOffset(),e==="previous"){var s=this._columnsController.getColumnIndexOffset(),l=n<0&&s===0;a=l||this._isFixedColumn(i)&&!this._isColumnRendered(n)}else a=n>=0&&this._isFixedColumn(i)&&!this._isColumnRendered(n)}a?t.scrollTo({left:r}):E(n)&&E(e)&&this._isColumnVirtual(n)&&(r=this._getHorizontalScrollPositionOffset(e),r!==0&&t.scrollBy({left:r,top:0}))},_getHorizontalScrollPositionOffset:function(e){var t=0,i=this._getCell(this._focusedCellPosition),n=i&&lt(i);if(n>0){var r=this.option("rtlEnabled")?-1:1;t=e==="nextInRow"||e==="next"?n*r:n*r*-1}return t},_editingCellTabHandler:function(e,t){var i=e.originalEvent.target,n=this._getCellElementFromTarget(i),r,a=e.originalEvent,o=this._getElementType(i);if(n.is(fw))return!this._targetCellTabHandler(e,t);this._updateFocusedCellPosition(n);var s=this._getNextCellByTabKey(a,t,o);if(n=s.$cell,!n||this._handleTabKeyOnMasterDetailCell(n,t))return!1;var l=this._columnsController,u=this.getView("rowsView").getCellIndex(n),d=u+l.getColumnIndexOffset(),c=l.getVisibleColumns(null,!0)[d],h=n.parent(),f=this._getRowIndex(h),p=this._dataController.items()[f],g=this._editingController;if(c&&c.allowEditing){var m=!p||p.rowType==="data";r=g.allowUpdating({row:p})?m:p&&p.isNewRow}return r||this._closeEditCell(),this._focusCell(n,!s.isHighlighted)&&(!this._isRowEditMode()&&r?this._editFocusedCell():this._focusInteractiveElement(n,e.shift)),!0},_targetCellTabHandler:function(e,t){var i=e.originalEvent,n=i.target,r=this._getCellElementFromTarget(n),a=this._getInteractiveElement(r,!e.shift),o=!1,s;if(!xw(this,r)&&a.length&&n!==a.get(0))o=!0;else{this._focusedCellPosition.rowIndex===void 0&&v(n).hasClass(is)&&this._updateFocusedCellPosition(r),s=this._getElementType(n),this.isRowFocusType()&&(this.setCellFocusType(),s==="row"&&xl(v(n))&&(n=this.getFirstValidCellInRow(v(n)),s=this._getElementType(n)));var l=this._getNextCellByTabKey(i,t,s);if(r=l.$cell,!r||(r=this._checkNewLineTransition(i,r),!r))return!1;this._focusCell(r,!l.isHighlighted),xw(this,r)||this._focusInteractiveElement(r,e.shift)}return o},_getNextCellByTabKey:function(e,t,i){var n=this._getNextCell(t,i),r=n&&this._fireFocusedCellChanging(e,n,!0);return!r||r.cancel?{}:(r.$newCellElement&&(n=r.$newCellElement),{$cell:n,isHighlighted:r.isHighlighted})},_checkNewLineTransition:function(e,t){var i=this.getVisibleRowIndex(),n=t.parent();if(i!==this._getRowIndex(n)){var r=this._getCellPosition(t),a=this._fireFocusedRowChanging(e,n);if(a.cancel)return;a.rowIndexChanged&&(this.setFocusedColumnIndex(r.columnIndex),t=this._getFocusedCell())}return t},_enterKeyHandler:function(e,t){var i=this._getFocusedCell(),n=this.getVisibleRowIndex(),r=this._focusedView&&this._focusedView.getRow(n);if(this.option("grouping.allowCollapsing")&&gs(r)||this.option("masterDetail.enabled")&&i&&i.hasClass(ic)){var a=this._dataController.getKeyByRowIndex(n),o=this._dataController.items()[n];a!==void 0&&o&&o.data&&!o.data.isContinuation&&this._dataController.changeRowExpand(a)}else this._processEnterKeyForDataCell(e,t)},_processEnterKeyForDataCell:function(e,t){var i=this._getEnterKeyDirection(e),n=this._allowEditingOnEnterKey();t||!n&&i?(this._handleEnterKeyEditingCell(e.originalEvent),i==="next"||i==="previous"?this._targetCellTabHandler(e,i):(i==="upArrow"||i==="downArrow")&&this._navigateNextCell(e.originalEvent,i)):n&&this._startEditing(e)},_getEnterKeyDirection:function(e){var t=this.option("keyboardNavigation.enterKeyDirection"),i=e.shift;if(t==="column")return i?"upArrow":"downArrow";if(t==="row")return i?"previous":"next"},_handleEnterKeyEditingCell:function(e){var t=e.target,i=this._getCellElementFromTarget(t),n=this._isRowEditMode();this._updateFocusedCellPosition(i),n?(this._focusEditFormCell(i),setTimeout(this._editingController.saveEditData.bind(this._editingController))):(D.trigger(v(t),"change"),this._closeEditCell(),e.preventDefault())},_escapeKeyHandler:function(e,t){var i=this._getCellElementFromTarget(e.originalEvent.target);t&&(this._updateFocusedCellPosition(i),this._isRowEditMode()?(this._focusEditFormCell(i),this._editingController.cancelEditData(),this._dataController.items().length===0&&(this._resetFocusedCell(),this._editorFactory.loseFocus())):this._editingController.getEditMode()==="cell"?this._editingController.cancelEditData():this._closeEditCell(),e.originalEvent.preventDefault())},_ctrlFKeyHandler:function(e){if(this.option("searchPanel.visible")){var t=this._headerPanel.getSearchTextEditor();t&&(t.focus(),e.originalEvent.preventDefault())}},_f2KeyHandler:function(){var e=this._editingController.isEditing(),t=this.getVisibleRowIndex(),i=this._focusedView&&this._focusedView.getRow(t);!e&&xl(i)&&this._startEditing()},_navigateNextCell:function(e,t){var i=this._getNextCell(t),n=this._getDirectionCodeByKey(t),r=i&&this._isCellValid(i),a=r?this._arrowKeysHandlerFocusCell(e,i,n):!1;return a},_arrowKeysHandlerFocusCell:function(e,t,i){var n=i==="prevRow"||i==="nextRow",r=this._fireFocusChangingEvents(e,t,n,!0);return t=r.$newCellElement,!r.cancel&&this._isCellValid(t)?(this._focus(t,!r.isHighlighted),!0):!1},_beginFastEditing:function(e,t){if(!this._isFastEditingAllowed()||e.altKey||e.ctrlKey||this._editingController.isEditing())return!1;if(t)this._startEditing(e,Fv);else{var i=e.key,n=e.keyCode||e.which,r=i||n&&String.fromCharCode(n);r&&(r.length===1||r===Fv)&&this._startEditing(e,r)}return!0},_pointerEventHandler:function(e){var t=e.event||e,i=v(t.currentTarget),n=this.getView("rowsView"),r=n&&n.element(),a=i.parent(),o=v(t.target).is(Lc),s=!!v(t.target).closest(".".concat(Xie)).length,l=i.hasClass(ic);this._isEventInCurrentGrid(t)&&(!s&&(this._isCellValid(i,!o)||l)?(i=this._isInsideEditForm(i)?v(t.target):i,this._focusView(),v(r).removeClass(pw),a.hasClass(ik)?(this._updateFocusedCellPosition(i),this._applyTabIndexToElement(this._focusedView.element()),this._focusedView.focus()):this._isMasterDetailCell(i)?this._updateFocusedCellPosition(i):this._clickTargetCellHandler(t,i)):i.is("td")&&this._resetFocusedCell())},_clickTargetCellHandler:function(e,t){var i=this.getView("rowsView").getCellIndex(t),n=this._columnsController.getVisibleColumns()[i],r=this._isCellEditMode();this.setCellFocusType();var a=this._fireFocusChangingEvents(e,t,!0);if(t=a.$newCellElement,a.cancel)this.setRowFocusType(),this.setFocusedRowIndex(a.prevRowIndex),t=this._getFocusedCell(),this._editingController.isEditing()&&r&&this._closeEditCell();else{if(a.resetFocusedRow){this.getController("focus")._resetFocusedRow();return}if(a.rowIndexChanged&&(t=this._getFocusedCell()),!a.isHighlighted&&!r&&this.setRowFocusType(),this._updateFocusedCellPosition(t),this._allowRowUpdating()&&r&&n&&n.allowEditing)this._isNeedFocus=!1,this._isHiddenFocus=!1;else{var o=e&&v(e.target).closest(vw+", td"),s=o&&o.not(t).is(vw),l=!!n&&!n.command&&t.hasClass(nk),u=!l&&(!a.isHighlighted||s);this._focus(t,u,s)}}},_allowRowUpdating:function(){var e=this.getVisibleRowIndex(),t=this._dataController.items()[e];return this._editingController.allowUpdating({row:t},"click")},focus:function(e){var t,i=this.option("focusedRowEnabled"),n=Nl(v(e));e||(t=".dx-datagrid-rowsview .dx-row[tabindex]",i||(t+=", .dx-datagrid-rowsview .dx-row > td[tabindex]"),e=this.component.$element().find(t).first()),e&&this._focusElement(v(e),n)},getFocusedView:function(){return this._focusedView},setupFocusedView:function(){this.isKeyboardEnabled()&&!E(this._focusedView)&&this._focusView()},_focusElement:function(e,t){var i=v(this._getRowsViewElement()),n=e.closest(i),r=this.isRowFocusType(),a={};!n.length||Nl(e)&&!this._isCellValid(e)||(this._focusView(),this._isNeedFocus=!0,this._isNeedScroll=!0,(Nl(e)||gs(e))&&(this.setCellFocusType(),a=this._fireFocusChangingEvents(null,e,!1,t),e=a.$newCellElement,r&&!a.isHighlighted&&this.setRowFocusType()),a.cancel||(this._focus(e,!a.isHighlighted),this._focusInteractiveElement(e)))},_getFocusedViewByElement:function(e){var t=this.getFocusedView(),i=t&&v(t.element());return e&&e.closest(i).length!==0},_focusView:function(){this._focusedView=this.getView("rowsView")},_resetFocusedView:function(){this.setRowFocusType(),this._focusedView=null},_focusInteractiveElement:function(e,t){if(e){var i=this._getInteractiveElement(e,t);xe.focusAndSelectElement(this,i)}},_focus:function(e,t,i){var n=e&&!e.hasClass(is)?e.closest(".".concat(is)):e;if(!(n&&Jie(n))){var r=this._focusedView,a=r&&r.element(),o;this._isHiddenFocus=t;var s=gs(n)||this.isRowFocusType();s?(o=n,r&&this.setFocusedRowIndex(this._getRowIndex(n))):Nl(e)&&(o=e,this._updateFocusedCellPosition(e)),o&&(a&&a.find(".dx-row[tabindex], .dx-row > td[tabindex]").not(o).removeClass(nc).removeAttr("tabindex"),D.one(o,"blur",l=>{l.relatedTarget&&o.removeClass(nc)}),i||(this._applyTabIndexToElement(o),D.trigger(o,"focus")),t?(o.addClass(nc),s&&e.addClass(nc)):this._editorFactory.focus(o))}},_updateFocus:function(e){this._updateFocusTimeout=setTimeout(()=>{var t=this._editingController,i=t.getEditMode()===gw,n=t.getEditMode()===_w;if(i&&t.hasChanges()||n&&t.isNewRowInEditMode()){t._focusEditingCell();return}var r=this._getFocusedCell(),a=t.isEditing();if(r&&!(this._isMasterDetailCell(r)&&!this._isRowEditMode())){if(this._hasSkipRow(r.parent())){var o=this._focusedCellPosition&&this._focusedCellPosition.rowIndex>0?"upArrow":"downArrow";r=this._getNextCell(o)}if(En(r))if(r.is("td")||r.hasClass(this.addWidgetPrefix(zie))){var s=r.is(fw),l=r.find(":focus"),u=En(l);if((e||!s)&&this._editorFactory.focus()){if(s&&u){xe.focusAndSelectElement(this,l);return}!u&&this._focus(r)}else!u&&(this._isNeedFocus||this._isHiddenFocus)&&this._focus(r,this._isHiddenFocus);a&&this._focusInteractiveElement.bind(this)(r)}else D.trigger(r,"focus")}})},_getFocusedCell:function(){return v(this._getCell(this._focusedCellPosition))},_updateFocusedCellPositionByTarget:function(e){var t,i=this._getElementType(e);if(i==="row"&&E((t=this._focusedCellPosition)===null||t===void 0?void 0:t.columnIndex)){var n=v(e);this._focusedView&&gs(n)&&this.setFocusedRowIndex(this._getRowIndex(n))}else this._updateFocusedCellPosition(this._getCellElementFromTarget(e))},_updateFocusedCellPosition:function(e,t){var i=this._getCellPosition(e,t);return i&&(!e.length||i.rowIndex>=0&&i.columnIndex>=0)&&this.setFocusedCellPosition(i.rowIndex,i.columnIndex),i},_getFocusedColumnIndexOffset:function(e){var t=0,i=this._columnsController.getVisibleColumns()[e];return i&&i.fixed?t=this._getFixedColumnIndexOffset(i):e>=0&&(t=this._columnsController.getColumnIndexOffset()),t},_getFixedColumnIndexOffset:function(e){var t=ene(this,e)?this._getVisibleColumnCount()-this._columnsController.getVisibleColumns().length:0;return t},_getCellPosition:function(e,t){var i,n=En(e)&&e.closest("tr"),r=this.getView("rowsView");if(En(n)){var a=this._getRowIndex(n);return i=r.getCellIndex(e,a),i+=this._getFocusedColumnIndexOffset(i),t&&(i=t==="previous"?i-1:i+1,i=this._applyColumnIndexBoundaries(i)),{rowIndex:a,columnIndex:i}}},_focusCell:function(e,t){if(this._isCellValid(e))return this._focus(e,t),!0},_focusEditFormCell:function(e){e.hasClass(hw)&&this._editorFactory.focus(e,!0)},_resetFocusedCell:function(e){var t,i=this._getFocusedCell();En(i)&&i.removeAttr("tabindex"),this._isNeedFocus=!1,this._isNeedScroll=!1,this._focusedCellPosition={},clearTimeout(this._updateFocusTimeout),(t=this._focusedView)===null||t===void 0||t.renderFocusState({preventScroll:e})},restoreFocusableElement:function(e,t){var i,n,r=E(e),a=this.getView("rowsView"),o=a.element(),s=this._focusedCellPosition.columnIndex,l=this._dataController.getRowIndexOffset();e=r?e:a.getTopVisibleItemIndex()+l,r?(n=a.getRow(e-l),i=this._fireFocusedRowChanging(t,n),!i.cancel&&i.rowIndexChanged&&(e=i.newRowIndex)):(this._editorFactory.loseFocus(),this._applyTabIndexToElement(o),D.trigger(o,"focus")),(!r||!i.cancel)&&this.setFocusedCellPosition(e,s),r&&this._updateFocus()},_getNewPositionByCode:function(e,t,i){var n=e.columnIndex,r=e.rowIndex,a;if(e.rowIndex===void 0&&i==="next")return{columnIndex:0,rowIndex:0};switch(i){case"nextInRow":case"next":a=this._getVisibleColumnCount(),n<a-1&&t!=="row"&&this._hasValidCellAfterPosition({columnIndex:n,rowIndex:r})?n++:!this._isLastRow(r)&&i==="next"&&(n=0,r++);break;case"previousInRow":case"previous":n>0&&t!=="row"&&this._hasValidCellBeforePosition({columnIndex:n,rowIndex:r})?n--:r>0&&i==="previous"&&(r--,a=this._getVisibleColumnCount(),n=a-1);break;case"upArrow":r=r>0?r-1:r;break;case"downArrow":r=this._isLastRow(r)?r:r+1}return{columnIndex:n,rowIndex:r}},setFocusedCellPosition:function(e,t){this.setFocusedRowIndex(e),this.setFocusedColumnIndex(t)},setFocusedRowIndex:function(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.rowIndex=e},setFocusedColumnIndex:function(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.columnIndex=e},getRowIndex:function(){return this._focusedCellPosition?this._focusedCellPosition.rowIndex:-1},getColumnIndex:function(){return this._focusedCellPosition?this._focusedCellPosition.columnIndex:-1},getVisibleRowIndex:function(){var e=this._focusedCellPosition&&this._focusedCellPosition.rowIndex;return!E(e)||e<0?-1:e-this._dataController.getRowIndexOffset()},getVisibleColumnIndex:function(){var e=this._focusedCellPosition&&this._focusedCellPosition.columnIndex;return E(e)?e-this._columnsController.getColumnIndexOffset():-1},_applyColumnIndexBoundaries:function(e){var t=this._getVisibleColumnCount();return e<0?e=0:e>=t&&(e=t-1),e},_isCellByPositionValid:function(e){var t=v(this._getCell(e));return this._isCellValid(t)},_isLastRow:function(e){var t=this._dataController;return this._isVirtualRowRender()?e>=t.getMaxRowIndex():e===t.items().length-1},_isFirstValidCell:function(e){var t=!1;return e.rowIndex===0&&e.columnIndex>=0&&(t=t||!this._hasValidCellBeforePosition(e)),t},_hasValidCellBeforePosition:function(e){for(var t=e.columnIndex,i=!1;t>0&&!i;){var n={columnIndex:--t,rowIndex:e.rowIndex};i=this._isCellByPositionValid(n)}return i},_hasValidCellAfterPosition:function(e){for(var t=e.columnIndex,i=!1,n=this._getVisibleColumnCount();t<n-1&&!i;){var r={columnIndex:++t,rowIndex:e.rowIndex};i=this._isCellByPositionValid(r)}return i},_isLastValidCell:function(e){var t=e.columnIndex>=0?e.columnIndex+1:0,i=e.rowIndex,n={columnIndex:t,rowIndex:i},r=this._dataController.getVisibleRows(),a=r&&r[i],o=this._isLastRow(i);return o?a&&a.rowType==="group"&&e.columnIndex>0||e.columnIndex===this._getVisibleColumnCount()-1?!0:this._isCellByPositionValid(n)?!1:this._isLastValidCell(n):!1},_isCellValid:function(e,t){if(En(e)){var i=this.getView("rowsView"),n=e.parent(),r=this._columnsController,a=i.getCellIndex(e)+r.getColumnIndexOffset(),o=r.getVisibleColumns(null,!0)[a],s=this._getVisibleColumnCount(),l=this._editingController,u=Pc(n),d=o&&o.showWhenGrouped,c=o&&!e.hasClass(ic)&&xl(n);if(this._isMasterDetailCell(e))return!0;if(s>a&&(!u&&o&&(!E(o.groupIndex)||d&&c)||parseInt(e.attr("colspan"))>1)){var h=this._dataController.items(),f=i.getRowIndex(n),p=h[f],g=l&&this._isCellEditMode()&&l.isEditing(),m=l&&l.isEditRow(f),C=m||g;return o.command?this._isLegacyNavigation()?!C&&o.command==="expand":g?!1:m?o.command!=="select":!C:g&&p&&p.rowType!=="data"?!1:!C||o.allowEditing||t}}},getFirstValidCellInRow:function(e,t){var i=e.find("> td"),n,r;t=t||0;for(var a=t;a<i.length;++a)if(n=i.eq(a),this._isCellValid(n)){r=n;break}return r},_getNextCell:function(e,t,i){var n=i||this._focusedCellPosition,r=this.isRowFocusType(),a=r||["next","previous"].includes(e),o,s;if(this._focusedView&&n){var l=this._getNewPositionByCode(n,t,e);o=v(this._getCell(l));var u=e==="previous"?this._isFirstValidCell(l):this._isLastValidCell(l);if(En(o)&&!this._isCellValid(o)&&this._isCellInRow(l,a)&&!u&&(r?o=this.getFirstValidCellInRow(o.parent(),l.columnIndex):o=this._getNextCell(e,"cell",l)),s=En(o)&&o.parent(),this._hasSkipRow(s)){var d=this._getRowIndex(s);if(!this._isLastRow(d))o=this._getNextCell(e,"row",{columnIndex:n.columnIndex,rowIndex:d});else return null}return En(o)?o:null}return null},_startEditing:function(e,t){var i=this._focusedCellPosition,n=this.getVisibleRowIndex(),r=this.getVisibleColumnIndex(),a=this._dataController.items()[n],o=this._columnsController.getVisibleColumns()[r];this._isAllowEditing(a,o)&&(this._isRowEditMode()?this._editingController.editRow(n):i&&this._startEditCell(e,t))},_isAllowEditing:function(e,t){return this._editingController.allowUpdating({row:e})&&t&&t.allowEditing},_editFocusedCell:function(){var e=this.getVisibleRowIndex(),t=this.getVisibleColumnIndex();return this._editingController.editCell(e,t)},_startEditCell:function(e,t){this._fastEditingStarted=E(t);var i=this._editFocusedCell();if(this._isFastEditingStarted()){if(i===!0)this._editingCellHandler(e,t);else if(i&&i.done){var n=t!==Fv?t:"";i.done(()=>this._editingCellHandler(e,n))}}},_editingCellHandler:function(e,t){var i,n,r=this._getFocusedCell().find(Lc).eq(0),a=ro(e,{type:"keydown",target:r.get(0)}),o=ro(e,{type:"keypress",target:r.get(0)}),s=ro(e,{type:"input",target:r.get(0)});if((i=(n=r.get(0)).select)===null||i===void 0||i.call(n),D.trigger(r,a),!a.isDefaultPrevented()&&(D.trigger(r,o),!o.isDefaultPrevented())){var l=Bt.mozilla?25:0;setTimeout(()=>{r.val(t);var u=r.closest(".".concat(Yie));D.off(u,"focusout"),D.one(u,"focusout",function(){D.trigger(r,"change")}),D.trigger(r,s)},l)}},_fireFocusChangingEvents:function(e,t,i,n){var r={},a=this._getCellPosition(t)||{};return this.isCellFocusType()&&(r=this._fireFocusedCellChanging(e,t,n),r.cancel||(a.columnIndex=r.newColumnIndex,a.rowIndex=r.newRowIndex,n=r.isHighlighted,t=v(this._getCell(a)))),!r.cancel&&i&&t&&(r=this._fireFocusedRowChanging(e,t.parent()),r.cancel||(a.rowIndex=r.newRowIndex,r.isHighlighted=n)),r.$newCellElement=v(this._getCell(a)),r.$newCellElement.length||(r.$newCellElement=t),r},_fireFocusedCellChanging:function(e,t,i){var n=this.option("focusedColumnIndex"),r=this.option("focusedRowIndex"),a=this._getCellPosition(t),o=a?a.columnIndex:-1,s=a?a.rowIndex:-1,l={cellElement:t,prevColumnIndex:n,prevRowIndex:r,newColumnIndex:o,newRowIndex:s,rows:this._dataController.getVisibleRows(),columns:this._columnsController.getVisibleColumns(),event:e,isHighlighted:i||!1,cancel:!1};return this._canceledCellPosition=null,this.executeAction("onFocusedCellChanging",l),(l.newColumnIndex!==o||l.newRowIndex!==s)&&(l.$newCellElement=v(this._getCell({columnIndex:l.newColumnIndex,rowIndex:l.newRowIndex}))),l.cancel&&(this._canceledCellPosition={rowIndex:s,columnIndex:o}),l},_fireFocusedCellChanged:function(e,t,i){var n=this._dataController,r=this.getView("rowsView").getCellIndex(e),a=this._getRowIndex(e&&e.parent()),o=Math.min(a-n.getRowIndexOffset(),n.items().length-1),s=this._editingController.isEditCell(o,r),l=n.items()[o];!s&&(t!==r||i!==a)&&this.executeAction("onFocusedCellChanged",{cellElement:e,columnIndex:r,rowIndex:a,row:l,column:this._columnsController.getVisibleColumns()[r]})},_fireFocusedRowChanging:function(e,t){var i=this._getRowIndex(t),n=this._dataController,r=this.option("focusedRowIndex"),a=n.loadingOperationTypes(),o={rowElement:t,prevRowIndex:r,newRowIndex:i,event:e,rows:n.getVisibleRows(),cancel:!1};return!n||n.isLoading()&&(a.reload||a.paging)?(o.cancel=!0,o):(this.option("focusedRowEnabled")&&(this.executeAction("onFocusedRowChanging",o),!o.cancel&&o.newRowIndex!==i&&(o.resetFocusedRow=o.newRowIndex<0,o.resetFocusedRow||this.setFocusedRowIndex(o.newRowIndex),o.rowIndexChanged=!0)),o)},_fireFocusedRowChanged:function(e){var t,i=this.option("focusedRowKey"),n=this.getController("focus"),r=n==null?void 0:n.getFocusedRowIndexByKey(i);if(this.option("focusedRowEnabled")){if(r>=0){var a=this._dataController;t=r>=0&&a.getVisibleRows()[r-a.getRowIndexOffset()]}this.executeAction("onFocusedRowChanged",{rowElement:e,rowIndex:r,row:t})}},_isEventInCurrentGrid:function(e){return xe.isElementInCurrentGrid(this,v(e.target))},_isRowEditMode:function(){var e=this._editingController.getEditMode();return e===Zie||e===ak},_isCellEditMode:function(){var e=this._editingController.getEditMode();return e===gw||e===_w},_isFastEditingAllowed:function(){return this._isCellEditMode()&&this.option("keyboardNavigation.editOnKeyPress")},_getInteractiveElement:function(e,t){var i=e.find(Lc).filter(":visible");return t?i.last():i.first()},_applyTabIndexToElement:function(e){var t=this.option("tabIndex")||0;e.attr("tabindex",E(t)?t:0)},_getCell:function(e){if(this._focusedView&&e){var t=this._dataController.getRowIndexOffset(),i=this._columnsController.getVisibleColumns(null,!0)[e.columnIndex],n=i&&i.fixed?this._getFixedColumnIndexOffset(i):this._columnsController.getColumnIndexOffset(),r=e.rowIndex>=0?e.rowIndex-t:-1,a=e.columnIndex>=0?e.columnIndex-n:-1;return this._focusedView.getCell({rowIndex:r,columnIndex:a})}},_getRowIndex:function(e){var t=this.getView("rowsView"),i=t.getRowIndex(e);return i>=0&&(i+=this._dataController.getRowIndexOffset()),i},_hasSkipRow:function(e){var t=e&&e.get(0);return t&&(t.style.display==="none"||e.hasClass(this.addWidgetPrefix(Nie))||Pc(e)&&!e.hasClass(this.addWidgetPrefix(cw)))},_allowEditingOnEnterKey:function(){return this.option("keyboardNavigation.enterKeyAction")==="startEdit"},_isLegacyNavigation:function(){return this.option("useLegacyKeyboardNavigation")},_getDirectionCodeByKey:function(e){var t;switch(e){case"upArrow":t="prevRow";break;case"downArrow":t="nextRow";break;case"leftArrow":t=this.option("rtlEnabled")?"nextInRow":"previousInRow";break;case"rightArrow":t=this.option("rtlEnabled")?"previousInRow":"nextInRow"}return t},_isVirtualScrolling:function(){var e=this.option("scrolling.mode");return e==="virtual"||e==="infinite"},_isVirtualRowRender:function(){return this._isVirtualScrolling()||xe.isVirtualRowRendering(this)},_isVirtualColumnRender:function(){return this.option("scrolling.columnRenderingMode")==="virtual"},_scrollBy:function(e,t,i,n){var r=this,a=this.getView("rowsView").getScrollable();return r._focusedCellPosition&&a.on("scroll",function o(){a.off("scroll",o),setTimeout(r.restoreFocusableElement.bind(r,i,n))}),a.scrollBy({left:e,top:t})},_isInsideEditForm:function(e){var t=v(e).closest("."+this.addWidgetPrefix(cw));return t.length&&this.elementIsInsideGrid(t)},_isMasterDetailCell:function(e){var t=v(e).closest("."+hw);return t.length&&this.elementIsInsideGrid(t)},_processNextCellInMasterDetail:function(e){!this._isInsideEditForm(e)&&e&&this._applyTabIndexToElement(e)},_handleTabKeyOnMasterDetailCell:function(e,t){if(this._isMasterDetailCell(e)){this._updateFocusedCellPosition(v(e),t);var i=this._getNextCell(t,"row");return this._processNextCellInMasterDetail(i),!0}return!1},_getElementType:function(e){return v(e).is("tr")?"row":"cell"},_isFastEditingStarted:function(){return this._isFastEditingAllowed()&&this._fastEditingStarted},_getVisibleColumnCount:function(){return this._columnsController.getVisibleColumns(null,!0).length},_isCellInRow:function(e,t){var i=e.columnIndex,n=this._getVisibleColumnCount();return t?i>=0&&i<=n-1:i>0&&i<n-1},_getCellElementFromTarget:function(e){var t=this._getElementType(e),i=v(e),n;return t==="cell"?n=i.closest(".".concat(is," > td")):n=i.children().not("."+ic).first(),n},_getRowsViewElement:function(){var e=this.getView("rowsView");return e&&e.element()},isKeyboardEnabled:function(){return this.option("keyboardNavigation.enabled")},_processCanceledEditCellPosition:function(e,t){if(this._canceledCellPosition){var i=this._canceledCellPosition.rowIndex===e&&this._canceledCellPosition.columnIndex===t;return this._canceledCellPosition=null,i}},updateFocusedRowIndex:function(){var e=this._dataController,t=this.getVisibleRowIndex(),i=e.items(),n=i.length?i.length-1:-1,r=e.getRowIndexOffset();n>=0&&t>n&&this.setFocusedRowIndex(n+r)}}),nne={defaultOptions:function(){return{useLegacyKeyboardNavigation:!1,keyboardNavigation:{enabled:!0,enterKeyAction:"startEdit",enterKeyDirection:"none",editOnKeyPress:!1}}},controllers:{keyboardNavigation:ine},extenders:{views:{rowsView:{_rowClick:function(e){var t=this.getController("editing").getEditRowIndex(),i=this.getController("keyboardNavigation");t===e.rowIndex&&i.setCellFocusType();var n=ok()&&this.option("focusedRowEnabled");n&&this._triggerPointerDownEventHandler(e),this.callBase.apply(this,arguments)},_triggerPointerDownEventHandler:function(e){var t=e.event.originalEvent;if(t){var i=this.getController("keyboardNavigation"),n=v(t.target),r=this.getCellIndex(n),a=this.getController("columns").getVisibleColumns()[r],o=this.getController("data").items()[e.rowIndex];if(i._isAllowEditing(o,a)){var s=ro(t,{currentTarget:t.target});i._pointerEventHandler(s)}}},renderFocusState:function(e){var{preventScroll:t,pageSizeChanged:i}=e??{},n=this.getController("keyboardNavigation"),r=this.element();r&&!_a(r)&&r.attr("tabindex",null),i&&n.updateFocusedRowIndex();var a=n.getVisibleRowIndex();(!E(a)||a<0)&&(a=0);var o=this.getCellElements(a);n.isKeyboardEnabled()&&o.length&&this.updateFocusElementTabIndex(o,t)},updateFocusElementTabIndex:function(e){var t=this.getController("keyboardNavigation"),i=e.eq(0).parent();if(gs(i))t._applyTabIndexToElement(i);else{var n=t.getColumnIndex();(!E(n)||n<0)&&(n=0),this._updateFocusedCellTabIndex(e,n)}},_updateFocusedCellTabIndex:function(e,t){var i=this.getController("keyboardNavigation"),n=e?e.length:-1,r=function(s){var l=i._isMasterDetailCell(s),u=i._isCellValid(s);if(!l&&u&&Nl(s))return i._applyTabIndexToElement(s),i.setCellFocusType(),!0},a=e.filter("[aria-colindex='".concat(t+1,"']"));if(a.length)r(a);else{n<=t&&(t=n-1);for(var o=t;o<n&&!r(v(e[o]));++o);}},renderDelayedTemplates:function(e){this.callBase.apply(this,arguments),this._renderFocusByChange(e)},_renderFocusByChange(e){var{operationTypes:t,repaintChangesOnly:i}=e??{},{fullReload:n,pageSize:r}=t??{};if(!e||!i||n||r){var a=tne(this);this.renderFocusState({preventScroll:a,pageSizeChanged:r})}},_renderCore:function(e){this.callBase.apply(this,arguments),this._renderFocusByChange(e)},_editCellPrepared:function(e){var t=this._getEditorInstance(e),i=this.getController("keyboardNavigation"),n=i&&i._isFastEditingStarted();t&&n&&this._handleEditingNavigationMode(t),this.callBase.apply(this,arguments)},_handleEditingNavigationMode:function(e){["downArrow","upArrow"].forEach(function(i){var n=e._supportedKeys()[i];e.registerKeyHandler(i,r=>{var a=e._input().attr("aria-expanded")==="true";if(a)return n&&n.call(e,r)})}),e.registerKeyHandler("leftArrow",ee),e.registerKeyHandler("rightArrow",ee);var t=e.NAME===qie&&e.option("useMaskBehavior");t&&e.registerKeyHandler("enter",ee)},_getEditorInstance:function(e){var t=e.find(".dx-texteditor").eq(0);return xe.getWidgetInstance(t)}}},controllers:{editing:{editCell:function(e,t){var i=this.getController("keyboardNavigation");if(i._processCanceledEditCellPosition(e,t))return!1;var n=this.callBase(e,t);return n&&i.setupFocusedView(),n},editRow:function(e){var t=this.getController("keyboardNavigation"),i=t.getVisibleColumnIndex(),n=this._columnsController.getVisibleColumns()[i];(n&&n.type||this.option("editing.mode")===ak)&&t._resetFocusedCell(),this.callBase(e)},addRow:function(e){var t=this.getController("keyboardNavigation");return t.setupFocusedView(),t.setCellFocusType(),this.callBase.apply(this,arguments)},getFocusedCellInRow:function(e){var t=this.getController("keyboardNavigation"),i=this.callBase(e);if(t.isKeyboardEnabled()&&t._focusedCellPosition.rowIndex===e){var n=t._getFocusedCell();En(n)&&!n.hasClass(jie)&&(i=n)}return i},_processCanceledEditingCell:function(){this.closeEditCell().done(()=>{var e=this.getController("keyboardNavigation");e._updateFocus()})},init:function(){this.callBase(),this._keyboardNavigationController=this.getController("keyboardNavigation")},closeEditCell:function(){var e=this._keyboardNavigationController;e._fastEditingStarted=!1;var t=this.callBase.apply(this,arguments);return e._updateFocus(),t},_delayedInputFocus:function(){this._keyboardNavigationController._isNeedScroll=!0,this.callBase.apply(this,arguments)},_isEditingStart:function(){var e=this.getController("keyboardNavigation"),t=this.callBase.apply(this,arguments);if(t&&!e._isNeedFocus){var i=e._getFocusedCell();e._focus(i,!0)}return t}},data:{_correctRowIndices:function(e){var t=this,i=t.getController("keyboardNavigation"),n=t.getController("editorFactory"),r=i._focusedCellPosition;if(t.callBase.apply(t,arguments),r&&r.rowIndex>=0){var a=e(r.rowIndex);a&&(r.rowIndex+=a,n.refocus())}},getMaxRowIndex:function(){var e=this.items().length-1,t=this.virtualItemsCount();if(t){var i=this.getRowIndexOffset();e+=i+t.end}return e}},adaptiveColumns:{_showHiddenCellsInView:function(e){var{viewName:t,$cells:i,isCommandColumn:n}=e;this.callBase.apply(this,arguments),t===yw&&!n&&i.each((r,a)=>{var o=v(a);bw(o)&&o.attr("tabindex",0)})},_hideVisibleCellInView:function(e){var{viewName:t,$cell:i,isCommandColumn:n}=e;this.callBase.apply(this,arguments),t===yw&&!n&&bw(i)&&i.removeAttr("tabindex")}}}}};De.registerModule("keyboardNavigation",nne);function yg(e,t,i,n){var r=0;if(e<t)for(;r<i.items.length;r++)yg(e+1,t,i.items[r],n);e===t&&n(i)}function rc(e,t){var i;if("map"in e)return e.map(t);var n=new Array(e.length);for(i in e)n[i]=t(e[i],i);return n}function rne(e){return e!==e||e===""||e===null||e===void 0}function ane(e){return e===Sm.count}function Sw(e){var t=mt(e.selector),i="skipEmptyValues"in e?e.skipEmptyValues:!0,n=e.aggregator;if(typeof n=="string"&&(n=Sm[n],!n))throw ni.Error("E4001",e.aggregator);return{selector:t,aggregator:n,skipEmptyValues:i}}const one=nt.inherit({ctor:function(e){this._data=e.data,this._groupLevel=e.groupLevel||0,this._totalAggregates=rc(e.totalAggregates||[],Sw),this._groupAggregates=rc(e.groupAggregates||[],Sw),this._totals=[]},calculate:function(){this._totalAggregates.length&&this._calculateTotals(0,{items:this._data}),this._groupAggregates.length&&this._groupLevel>0&&this._calculateGroups({items:this._data})},totalAggregates:function(){return this._totals},_aggregate:function(e,t,i){for(var n=t.items?t.items.length:0,r=0;r<e.length;r++){if(ane(e[r].aggregator)){i[r]=(i[r]||0)+n;continue}for(var a=0;a<n;a++)this._accumulate(r,e[r],i,t.items[a])}},_calculateTotals:function(e,t){if(e===0&&(this._totals=this._seed(this._totalAggregates)),e===this._groupLevel)this._aggregate(this._totalAggregates,t,this._totals);else for(var i=0;i<t.items.length;i++)this._calculateTotals(e+1,t.items[i]);e===0&&(this._totals=this._finalize(this._totalAggregates,this._totals))},_calculateGroups:function(e){var t=this._groupLevel,i=t+1,n=this._seed.bind(this,this._groupAggregates),r=this._aggregate.bind(this,this._groupAggregates),a=this._finalize.bind(this,this._groupAggregates);function o(s){s.aggregates=n(i-1),i===t?r(s,s.aggregates):yg(i,t,s,function(l){r(l,s.aggregates)}),s.aggregates=a(s.aggregates)}for(;--i>0;)yg(0,i,e,o)},_seed:function(e,t){return rc(e,function(i){var n=i.aggregator,r="seed"in n?Ee(n.seed)?n.seed(t):n.seed:NaN;return r})},_accumulate:function(e,t,i,n){var r=t.selector(n),a=t.aggregator,o=t.skipEmptyValues;o&&rne(r)||(i[e]!==i[e]?i[e]=r:i[e]=a.step(i[e],r))},_finalize:function(e,t){return rc(e,function(i,n){var r=i.aggregator.finalize;return r?r(t[n]):t[n]})}});var sne="dx-datagrid-total-footer",lne="dx-datagrid-summary-item",une="dx-datagrid-text-content",dne="dx-datagrid-group-footer",cne="dx-datagrid-group-text-content",hne="dx-datagrid-nowrap",fne="dx-footer-row",Mv="groupFooter",sk="totalFooter",lk=function(e,t){var i=v(e),n=t.column,r=t.summaryItems,a=[];if(!n.command&&r){for(var o=0;o<r.length;o++){var s=r[o];a.push(v("<div>").css("textAlign",s.alignment||n.alignment).addClass(lne).addClass(une).addClass(s.cssClass).toggleClass(cne,t.rowType==="group").text(De.getSummaryText(s,t.summaryTexts)))}i.append(a)}},uk=function(e,t){var i=e.option("summary.texts")||{};return{totalItem:t.row,summaryItems:t.row.summaryCells[t.columnIndex],summaryTexts:i}},Vv=function(e){return e.summary||e.aggregates||[]},xg=function(e){return e.option("summary.recalculateWhileEditing")},pne=Vu.inherit({_getRows:function(){return this._dataController.footerItems()},_getCellOptions:function(e){return O(this.callBase(e),uk(this,e))},_renderCellContent:function(e,t){lk(e,t),this.callBase(e,t)},_renderCore:function(e){var t=!1,i=this._dataController.footerItems()[0];(!e||!e.columnIndices)&&(this.element().empty().addClass(sne).toggleClass(hne,!this.option("wordWrapEnabled")),t=!0),i&&i.summaryCells&&i.summaryCells.length&&(this._updateContent(this._renderTable({change:e}),e),t&&this._updateScrollLeftPosition())},_updateContent:function(e,t){if(t&&t.changeType==="update"&&t.columnIndices){var i=this.getTableElement().find(".dx-row"),n=e.find(".dx-row");this._updateCells(i,n,t.columnIndices[0])}else return this.callBase.apply(this,arguments)},_rowClick:function(e){var t=this._dataController.footerItems()[e.rowIndex]||{};this.executeAction("onRowClick",O({},e,t))},_columnOptionChanged:function(e){var t=e.optionNames;e.changeTypes.grouping||(t.width||t.visibleWidth)&&this.callBase(e)},_handleDataChanged:function(e){var t=e.changeType;e.changeType==="update"&&e.repaintChangesOnly?e.totalColumnIndices?e.totalColumnIndices.length&&this.render(null,{changeType:"update",columnIndices:[e.totalColumnIndices]}):this.render():(t==="refresh"||t==="append"||t==="prepend")&&this.render()},_createRow:function(e){var t=this.callBase.apply(this,arguments);return e.rowType===sk&&t.addClass(fne),t},getHeight:function(){return this.getElementHeight()},isVisible:function(){return!!this._dataController.footerItems().length}}),vne={init:function(){this.callBase.apply(this,arguments),this._totalAggregates=[],this._summaryGetter=ee},summaryGetter:function(e){if(!arguments.length)return this._summaryGetter;Ee(e)&&(this._summaryGetter=e)},summary:function(e){if(!arguments.length)return this._summaryGetter();this._summaryGetter=function(){return e}},totalAggregates:function(){return this._totalAggregates},isLastLevelGroupItemsPagingLocal:function(){var e=this.summary(),t=e&&e.sortByGroups();return t&&t.length},sortLastLevelGroupItems:function(e,t,i){var n=Wr.multiLevelGroup(Gi(e),t).toArray(),r=[];return i.forEach(function(a){(function o(s,l,u,d){d=d||[];for(var c=0;c<s.length;c++)d.push(s[c].key),l===1?u(d,s[c].items):o(s[c].items,l-1,u,d),d.pop()})(n,t.length,function(o,s){a.toString()===o.toString()&&(r=r.concat(s))})}),r}},_ne=function(){var e=function(i,n,r,a){var o;if(xg(i)){var s=i.getController("editing");if(s){var l=s.getInsertedData();l.length&&(r=function d(c,h,f){return f?d(c,h.map(p=>({items:[p]}),f-1)):c.concat(h)}(r,l,a));var u=s.getRemovedData();u.length&&(r=function d(c,h,f){return f?c.map(p=>{var g={},m=d(p.items||[],h,f-1);return Object.defineProperty(g,"aggregates",{get:()=>p.aggregates,set:C=>{p.aggregates=C}}),O(g,p,{items:m})}):c.filter(p=>h.indexOf(p)<0)}(r,u,a))}}return n&&(o=new one({totalAggregates:n.totalAggregates,groupAggregates:n.groupAggregates,data:r,groupLevel:a}),o.calculate()),o?o.totalAggregates():[]},t=function(i,n,r){var a=r&&r.sortByGroups&&r.sortByGroups();return a&&a.length?function o(s,l,u){if(!s||!l.length)return s;var d=l[0],c=u[0],h;return d&&c&&c.length&&(h=Gi(s),F(c,function(f){f===0?h=h.sortBy(this.selector,this.desc):h=h.thenBy(this.selector,this.desc)}),h.enumerate().done(function(f){s=f})),l=l.slice(1),u=u.slice(1),l.length&&u.length&&F(s,function(){this.items=o(this.items,l,u)}),s}(i,n,a):i};return{_customizeRemoteOperations:function(i){var n=this.summary();n&&(i.remoteOperations.summary?(!i.isCustomLoading||i.storeLoadOptions.isLoadingAll)&&(i.storeLoadOptions.group&&(i.remoteOperations.grouping?i.storeLoadOptions.groupSummary=n.groupAggregates:n.groupAggregates.length&&(i.remoteOperations.paging=!1)),i.storeLoadOptions.totalSummary=n.totalAggregates):(n.totalAggregates.length||n.groupAggregates.length&&i.storeLoadOptions.group)&&(i.remoteOperations.paging=!1)),this.callBase.apply(this,arguments);var r=i.cachedData.extra;r&&r.summary&&!i.isCustomLoading&&(i.storeLoadOptions.totalSummary=void 0)},_handleDataLoadedCore:function(i){var n=$r(i.storeLoadOptions.group||i.loadOptions.group||[]),r=i.remoteOperations||{},a=this.summaryGetter()(r);if(!i.isCustomLoading||i.storeLoadOptions.isLoadingAll){if(r.summary)!r.paging&&n.length&&a&&(r.grouping||e(this,{groupAggregates:a.groupAggregates},i.data,n.length),i.data=t(i.data,n,a));else if(!r.paging&&a){var o,s,l=i.operationTypes||{},u=Object.keys(l).some(c=>l[c]);if(!u||!((o=i.cachedData)!==null&&o!==void 0&&(s=o.extra)!==null&&s!==void 0&&s.summary)||n.length&&a.groupAggregates.length){var d=e(this,a,i.data,n.length);i.extra=Ye(i.extra)?i.extra:{},i.extra.summary=d,i.cachedData&&(i.cachedData.extra=i.extra)}i.data=t(i.data,n,a)}}i.isCustomLoading||(this._totalAggregates=i.extra&&i.extra.summary||this._totalAggregates),this.callBase(i)}}}();Nu.extend(vne);Nu.extend(_ne);De.registerModule("summary",{defaultOptions:function(){return{summary:{groupItems:void 0,totalItems:void 0,calculateCustomSummary:void 0,skipEmptyValues:!0,recalculateWhileEditing:!1,texts:{sum:ue.format("dxDataGrid-summarySum"),sumOtherColumn:ue.format("dxDataGrid-summarySumOtherColumn"),min:ue.format("dxDataGrid-summaryMin"),minOtherColumn:ue.format("dxDataGrid-summaryMinOtherColumn"),max:ue.format("dxDataGrid-summaryMax"),maxOtherColumn:ue.format("dxDataGrid-summaryMaxOtherColumn"),avg:ue.format("dxDataGrid-summaryAvg"),avgOtherColumn:ue.format("dxDataGrid-summaryAvgOtherColumn"),count:ue.format("dxDataGrid-summaryCount")}},sortByGroupSummaryInfo:void 0}},views:{footerView:pne},extenders:{controllers:{data:{_isDataColumn:function(e){return e&&(!E(e.groupIndex)||e.showWhenGrouped)},_isGroupFooterVisible:function(){for(var e=this.option("summary.groupItems")||[],t=0;t<e.length;t++){var i=e[t],n=this._columnsController.columnOption(i.showInColumn||i.column);if(i.showInGroupFooter&&this._isDataColumn(n))return!0}return!1},_processGroupItems:function(e,t,i){var n=i&&i.data,r=this.callBase.apply(this,arguments);return i&&(i.isGroupFooterVisible===void 0&&(i.isGroupFooterVisible=this._isGroupFooterVisible()),n&&n.items&&i.isGroupFooterVisible&&(i.collectContinuationItems||!n.isContinuationOnNextPage)&&r.push({rowType:Mv,key:i.path.slice(),data:n,groupIndex:i.path.length-1,values:[]})),r},_processGroupItem:function(e,t){var i=this;if(t.summaryGroupItems||(t.summaryGroupItems=i.option("summary.groupItems")||[]),e.rowType==="group"){var n=-1,r=-1;F(t.visibleColumns,function(a){var o=t.visibleColumns[a-1];e.groupIndex===this.groupIndex&&(n=this.index),a>0&&o.command==="expand"&&this.command!=="expand"&&(r=this.index)}),e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,Vv(e.data),t.visibleColumns,function(a,o){return a.showInGroupFooter?-1:a.alignByColumn&&o&&!E(o.groupIndex)&&o.index!==r?o.index:n},!0)}return e.rowType===Mv&&(e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,Vv(e.data),t.visibleColumns,function(a,o){return a.showInGroupFooter&&i._isDataColumn(o)?o.index:-1})),e},_calculateSummaryCells:function(e,t,i,n,r){var a=this,o=[],s={};return F(e,function(l,u){var d=a._columnsController.columnOption(u.column),c=u.showInColumn&&a._columnsController.columnOption(u.showInColumn)||d,h=n(u,c);if(h>=0){s[h]||(s[h]=[]);var f=t[l];if(f===f){var p;E(u.valueFormat)?p=u.valueFormat:u.summaryType!=="count"&&(p=De.getFormatByDataType(d&&d.dataType)),s[h].push(O({},u,{value:Me(f)&&d&&d.deserializeValue?d.deserializeValue(f):f,valueFormat:p,columnCaption:d&&d.index!==h?d.caption:void 0}))}}}),Rn(s)||i.forEach((l,u)=>{var d=i[u-1],c=r&&((d==null?void 0:d.command)==="expand"||l.command==="expand")?d==null?void 0:d.index:l.index;o.push(s[c]||[])}),o},_getSummaryCells:function(e,t){var i=this,n=i._columnsController;return i._calculateSummaryCells(e,t,n.getVisibleColumns(),function(r,a){return i._isDataColumn(a)?a.index:-1})},_updateItemsCore:function(e){var t,i=this._dataSource,n=this._footerItems,r=n&&n[0]&&n[0].summaryCells,a=this.option("summary.totalItems");if(this._footerItems=[],i&&a&&a.length){var o=i.totalAggregates();t=this._getSummaryCells(a,o),e&&e.repaintChangesOnly&&r&&(e.totalColumnIndices=t.map(function(s,l){return JSON.stringify(s)!==JSON.stringify(r[l])?l:-1}).filter(s=>s>=0)),t.length&&this._footerItems.push({rowType:sk,summaryCells:t})}this.callBase(e)},_prepareUnsavedDataSelector:function(e){if(xg(this)){var t=this.getController("editing");if(t)return function(i){return i=t.getUpdatedData(i),e(i)}}return e},_prepareAggregateSelector:function(e,t){return e=this._prepareUnsavedDataSelector(e),t==="avg"||t==="sum"?function(i){var n=e(i);return E(n)?Number(n):n}:e},_getAggregates:function(e,t){var i=this,n=i.getController("columns"),r=i.option("summary.calculateCustomSummary"),a=i.option("summary.skipEmptyValues");return Jt(e||[],function(o){var s=n.columnOption(o.column),l=s&&s.calculateCellValue?s.calculateCellValue.bind(s):mt(s?s.dataField:o.column),u=o.summaryType||"count",d=o.column,c=E(o.skipEmptyValues)?o.skipEmptyValues:a;if(t)return{selector:o.column,summaryType:u};if(d=i._prepareAggregateSelector(l,u),u==="custom"){r||(Je.log("E1026"),r=function(){});var h={component:i.component,name:o.name};r(h),h.summaryProcess="calculate",u={seed:function(f){return h.summaryProcess="start",h.totalValue=void 0,h.groupIndex=f,delete h.value,r(h),h.totalValue},step:function(f,p){return h.summaryProcess="calculate",h.totalValue=f,h.value=p,r(h),h.totalValue},finalize:function(f){return h.summaryProcess="finalize",h.totalValue=f,delete h.value,r(h),h.totalValue}}}return{selector:d,aggregator:u,skipEmptyValues:c}})},_addSortInfo:function(e,t,i,n){if(t){var r=t.groupIndex;n=n||t.sortOrder,E(r)&&(e[r]=e[r]||[],e[r].push({selector:i,desc:n==="desc"}))}},_findSummaryItem:function(e,t){var i=-1;return E(t)&&F(e||[],function(n){if(this.name===t||n===t||this.summaryType===t||this.column===t||(r=this,a=r.summaryType,o=r.column,(a&&o&&a+"_"+o)===t))return i=n,!1;var r,a,o}),i},_getSummarySortByGroups:function(e,t){var i=this,n=i._columnsController,r=n.getGroupColumns(),a=[];if(!(!t||!t.length))return F(e||[],function(){var o=this.sortOrder,s=this.groupColumn,l=i._findSummaryItem(t,this.summaryItem);if(!(l<0)){var u=function(d){return Vv(d)[l]};E(s)?(s=n.columnOption(s),i._addSortInfo(a,s,u,o)):F(r,function(d,c){i._addSortInfo(a,c,u,o)})}}),a},_createDataSourceAdapterCore:function(e,t){var i=this,n=this.callBase(e,t);return n.summaryGetter(function(r){return i._getSummaryOptions(r||t)}),n},_getSummaryOptions:function(e){var t=this,i=t.option("summary.groupItems"),n=t.option("summary.totalItems"),r=t.option("sortByGroupSummaryInfo"),a=t._getAggregates(i,e&&e.grouping&&e.summary),o=t._getAggregates(n,e&&e.summary);if(a.length||o.length)return{groupAggregates:a,totalAggregates:o,sortByGroups:function(){return t._getSummarySortByGroups(r,i)}}},publicMethods:function(){var e=this.callBase();return e.push("getTotalSummaryValue"),e},getTotalSummaryValue:function(e){var t=this._findSummaryItem(this.option("summary.totalItems"),e),i=this._dataSource.totalAggregates();if(i.length&&t>-1)return i[t]},optionChanged:function(e){(e.name==="summary"||e.name==="sortByGroupSummaryInfo")&&(e.name="dataSource"),this.callBase(e)},init:function(){this._footerItems=[],this.callBase()},footerItems:function(){return this._footerItems}},editing:{_refreshSummary:function(){xg(this)&&!this.isSaving()&&this._dataController.refresh({load:!0,changesOnly:!0})},_addChange:function(e){var t=this.callBase.apply(this,arguments);return e.type&&this._refreshSummary(),t},_removeChange:function(){var e=this.callBase.apply(this,arguments);return this._refreshSummary(),e},cancelEditData:function(){var e=this.callBase.apply(this,arguments);return this._refreshSummary(),e}}},views:{rowsView:{_createRow:function(e){var t=this.callBase.apply(this,arguments);return e&&t.addClass(e.rowType===Mv?dne:""),t},_renderCells:function(e,t){this.callBase.apply(this,arguments),t.row.rowType==="group"&&t.row.summaryCells&&t.row.summaryCells.length&&this._renderGroupSummaryCells(e,t)},_hasAlignByColumnSummaryItems:function(e,t){return!E(t.columns[e].groupIndex)&&t.row.summaryCells[e].length},_getAlignByColumnCellCount:function(e,t){for(var i=0,n=1;n<e;n++){var r=t.row.summaryCells.length-n;i=this._hasAlignByColumnSummaryItems(r,t)?n:i}return i},_renderGroupSummaryCells:function(e,t){var i=e.children().last(),n=Number(i.attr("colSpan"))||1,r=this._getAlignByColumnCellCount(n,t);this._renderGroupSummaryCellsCore(i,t,n,r)},_renderGroupSummaryCellsCore:function(e,t,i,n){if(n>0){e.attr("colSpan",i-n);for(var r=0;r<n;r++){var a=t.columns.length-n+r;this._renderCell(e.parent(),O({column:t.columns[a],columnIndex:this._getSummaryCellIndex(a,t.columns)},t))}}},_getSummaryCellIndex:function(e){return e},_getCellTemplate:function(e){return!e.column.command&&!E(e.column.groupIndex)&&e.summaryItems&&e.summaryItems.length?lk:this.callBase(e)},_getCellOptions:function(e){var t=this.callBase(e);return e.row.summaryCells?O(t,uk(this,e)):t}}}}});var Ew="content",eu="content-fixed",gne="dx-master-detail-cell",ww="dx-first-cell",mne="dx-last-cell",Iw="dx-state-hover",Tw="dx-col-fixed",Cne="dx-fixed-columns",Nv="dx-pointer-events-none",Ar="transparent",yne="dx-group-row",da=function(e){var t=-1;return F(e,function(i,n){if(n.command===Ar)return t=i,!1}),t},dk=function(e,t,i){var n=0;if(e&&t&&i)for(var r=0;r<e.length;r++)e[r].command===Ar?n+=e[r].colspan:(t[n]<i[r]&&(t[n]=i[r]),n++);return t},PC={init:function(){this.callBase(),this._isFixedTableRendering=!1,this._isFixedColumns=!1},_createCol:function(e){return this.callBase(e).toggleClass(Tw,!!(this._isFixedTableRendering&&(e.fixed||e.command&&e.command!==Ar)))},_correctColumnIndicesForFixedColumns:function(e,t){var i=da(e),n=e[i].colspan,r=t&&t.columnIndices;r&&(t.columnIndices=r.map(function(a){if(a)return a.map(function(o){return o<i?o:o>=i+n?o-n+1:-1}).filter(function(o){return o>=0})}))},_partialUpdateFixedTable(e){var t=this._fixedTableElement,i=da(e),n=e[i],r=this._columnsController.getColumnIndexOffset(),a=this._getRowElementsCore(t),o=t.children("colgroup");o.replaceWith(this._createColGroup(e));for(var s=0;s<a.length;s++)for(var l=a[s].childNodes,u=r+1,d=0;d<l.length;d++)l[d].setAttribute("aria-colindex",u),d===i?(l[d].setAttribute("colspan",n.colspan),u+=n.colspan):u++},_renderTable:function(e){var t,i=this.getFixedColumns();this._isFixedColumns=!!i.length;var n=this.callBase(e);if(this._isFixedColumns){var r=e==null?void 0:e.change;if(this._isFixedTableRendering=!0,r!=null&&r.virtualColumnsScrolling&&this.option("scrolling.legacyMode")!==!0)this._partialUpdateFixedTable(i);else{var a=r==null?void 0:r.columnIndices;this._correctColumnIndicesForFixedColumns(i,r),t=this._createTable(i),this._renderRows(t,O({},e,{columns:i})),this._updateContent(t,r),a&&(r.columnIndices=a)}this._isFixedTableRendering=!1}else this._fixedTableElement&&this._fixedTableElement.parent().remove(),this._fixedTableElement=null;return n},_renderRow:function(e,t){var i,n=t.row.cells;if(this.callBase.apply(this,arguments),this._isFixedTableRendering&&n&&n.length){i=0;var r=t.row.cells||[];n=n.slice(),t.row.cells=n;for(var a=0;a<r.length;a++){if(r[a].column&&r[a].column.command===Ar){i=(r[a].column.colspan||1)-1;continue}n[a+i]=r[a]}}},_createCell:function(e){var t=this,i=e.column,n=i&&i.command,r=e.rowType,a=t.callBase.apply(t,arguments),o,s,l;(t._isFixedTableRendering||r==="filter")&&(o=t.getFixedColumns(),l=da(o),s=o[l-1]),t._isFixedTableRendering?n===Ar&&(a.addClass(Nv).toggleClass(ww,l===0||s&&s.command==="expand").toggleClass(mne,o.length&&l===o.length-1),r!=="freeSpace"&&xe.setEmptyText(a)):r==="filter"&&a.toggleClass(ww,e.columnIndex===l);var u=t.option("rowAlternationEnabled")&&e.isAltRow;return Bt.mozilla&&e.column.fixed&&e.rowType!=="group"&&!u&&a.addClass(Tw),a},_wrapTableInScrollContainer:function(){var e=this.callBase.apply(this,arguments);return this._isFixedTableRendering&&e.addClass(this.addWidgetPrefix(eu)),e},_renderCellContent:function(e,t){var i,n=t.column,r=this._isFixedTableRendering,a=t.rowType==="group"&&E(n.groupIndex);if(r&&a&&!n.command&&!n.groupCellTemplate&&e.css("pointerEvents","none"),!r&&this._isFixedColumns){if(i=n.fixed||n.command&&n.fixed!==!1,a&&(i=!1,t.row.summaryCells&&t.row.summaryCells.length)){var o=this._columnsController.getVisibleColumns(),s=this._getAlignByColumnCellCount?this._getAlignByColumnCellCount(n.colspan,{columns:o,row:t.row,isFixed:!0}):0;if(s>0){var l=da(this._columnsController.getFixedColumns());i=o.length-s<l}}if(i)if(n.command&&n.type!=="buttons"||t.rowType==="group"){e.html("&nbsp;").addClass(n.cssClass);return}else e.addClass("dx-hidden-cell")}n.command!==Ar&&this.callBase(e,t)},_getCellElementsCore:function(e){var t=this.callBase.apply(this,arguments),i=t.parent().hasClass(yne),n=this.name==="columnHeadersView"?e:void 0;if(this._fixedTableElement&&t){var r=this.getFixedColumns(n),a=this._getRowElements(this._fixedTableElement).eq(e).children("td");F(a,(o,s)=>{if(i)t[o]&&s.style.visibility!=="hidden"&&(t[o]=s);else{var l=r[o];if(l)if(l.command===Ar)a.eq(o).hasClass(gne)&&(t[o]=s||t[o]);else{var u=this._columnsController.getVisibleIndexByColumn(l,n);t[u]=s||t[u]}}})}return t},getColumnWidths:function(){var e,t=this.callBase(),i=this.getFixedColumns();return this._fixedTableElement&&t.length&&(e=this.callBase(this._fixedTableElement)),dk(i,t,e)},getTableElement:function(){var e=this._isFixedTableRendering?this._fixedTableElement:this.callBase();return e},setTableElement:function(e){this._isFixedTableRendering?this._fixedTableElement=e.addClass(Nv):this.callBase(e)},getColumns:function(e,t){return t=t||this.getTableElement(),this._isFixedTableRendering||t&&t.closest("table").parent("."+this.addWidgetPrefix(eu)).length?this.getFixedColumns(e):this.callBase(e,t)},getRowIndex:function(e){var t=this._fixedTableElement;return t&&t.find(e).length?this._getRowElements(t).index(e):this.callBase(e)},getTableElements:function(){var e=this.callBase.apply(this,arguments);return this._fixedTableElement&&(e=v([e.get(0),this._fixedTableElement.get(0)])),e},getFixedColumns:function(e){return this._columnsController.getFixedColumns(e)},getFixedColumnsOffset:function(){var e={left:0,right:0},t;if(this._fixedTableElement){t=this.getTransparentColumnElement();var i=t.position();e={left:i.left,right:lt(this.element(),!0)-(lt(t,!0)+i.left)}}return e},getTransparentColumnElement:function(){return this._fixedTableElement&&this._fixedTableElement.find("."+Nv).first()},getFixedTableElement:function(){return this._fixedTableElement},isFixedColumns:function(){return this._isFixedColumns},_resizeCore:function(){this.callBase(),this.synchronizeRows()},setColumnWidths:function(e){var t,i=this._columnsController.getVisibleColumns(),n=e.widths,r=n&&n.length&&E(i[0].visibleWidth),a=e.optionNames,o=a&&a.width,s=!1;if(this.callBase.apply(this,arguments),this._fixedTableElement){var l=n&&n.some(function(u){return u==="auto"});s=l&&(!r||!this.isScrollbarVisible(!0)),s&&(t=i),this.callBase(O({},e,{$tableElement:this._fixedTableElement,columns:t,fixed:!0}))}(r||o&&this.option("wordWrapEnabled"))&&this.synchronizeRows()},_createColGroup:function(e){if(this._isFixedTableRendering&&!this.option("columnAutoWidth")){var t=this._columnsController.getVisibleColumns(),i=t.filter(function(n){return!n.width}).length;i&&(e=t)}return this.callBase(e)},_getClientHeight:function(e){var t=e.getBoundingClientRect&&Gt(e);return t&&t.height?t.height:e.clientHeight},synchronizeRows:function(){var e=[],t=[],i,n,r,a;if(this._isFixedColumns&&this._tableElement&&this._fixedTableElement){var o=this._getClientHeight(this._tableElement.get(0)),s=this._getClientHeight(this._fixedTableElement.get(0));if(n=this._getRowElements(this._tableElement),r=this._getRowElements(this._fixedTableElement),a=this._findContentElement(),o!==s){for(a&&a.css("height",o),n.css("height",""),r.css("height",""),i=0;i<n.length;i++)e.push(this._getClientHeight(n.get(i))),t.push(this._getClientHeight(r.get(i)));for(i=0;i<n.length;i++){var l=e[i],u=t[i];l>u?r.eq(i).css("height",l):l<u&&n.eq(i).css("height",u)}a&&a.css("height","")}}},setScrollerSpacing:function(e){var t=this.option("rtlEnabled");this.callBase(e),this.element().children("."+this.addWidgetPrefix(eu)).css({paddingLeft:t?e:"",paddingRight:t?"":e})}},xne=O({},PC,{_getRowVisibleColumns:function(e){return this._isFixedTableRendering?this.getFixedColumns(e):this.callBase(e)},getContextMenuItems:function(e){var t=e.column,i=this.option("columnFixing"),n=this.callBase(e);if(e.row&&e.row.rowType==="header"&&i.enabled===!0&&t&&t.allowFixing){var r=a=>{switch(a.itemData.value){case"none":this._columnsController.columnOption(t.index,"fixed",!1);break;case"left":this._columnsController.columnOption(t.index,{fixed:!0,fixedPosition:"left"});break;case"right":this._columnsController.columnOption(t.index,{fixed:!0,fixedPosition:"right"})}};n=n||[],n.push({text:i.texts.fix,beginGroup:!0,items:[{text:i.texts.leftPosition,value:"left",disabled:t.fixed&&(!t.fixedPosition||t.fixedPosition==="left"),onItemClick:r},{text:i.texts.rightPosition,value:"right",disabled:t.fixed&&t.fixedPosition==="right",onItemClick:r}]},{text:i.texts.unfix,value:"none",disabled:!t.fixed,onItemClick:r})}return n},getFixedColumnElements:function(e){if(E(e))return this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(e).children();var t=this.getColumnElements(),i=this.getTransparentColumnElement();if(t&&i&&i.length){var n=da(this.getFixedColumns());t.splice(n,i.get(0).colSpan,i.get(0))}return t},getColumnWidths:function(){var e,t=this.callBase(),i=this.getFixedColumnElements(),n=this.getFixedColumns();return this._fixedTableElement&&(i&&i.length?e=this._getWidths(i):e=this.callBase(this._fixedTableElement)),dk(n,t,e)}}),bne=O({},PC,{_detachHoverEvents:function(){this._fixedTableElement&&D.off(this._fixedTableElement,"mouseover mouseout",".dx-data-row"),this._tableElement&&D.off(this._tableElement,"mouseover mouseout",".dx-data-row")},_attachHoverEvents:function(){var e=this,t=function(i){D.on(i,"mouseover mouseout",".dx-data-row",e.createAction(function(n){var r=n.event,a=e.getRowIndex(v(r.target).closest(".dx-row")),o=r.type==="mouseover";a>=0&&(e._tableElement&&e._getRowElements(e._tableElement).eq(a).toggleClass(Iw,o),e._fixedTableElement&&e._getRowElements(e._fixedTableElement).eq(a).toggleClass(Iw,o))}))};e._fixedTableElement&&e._tableElement&&(t(e._fixedTableElement),t(e._tableElement))},_findContentElement:function(){var e=this,t,i,n=e.addWidgetPrefix(Ew),r=e.element(),a=Bt.mozilla?60:0;if(r&&e._isFixedTableRendering){t=r.children("."+n);var o=e.getScrollable();return!t.length&&o&&(t=v("<div>").addClass(n),D.on(t,"scroll",function(s){clearTimeout(e._fixedScrollTimeout),e._fixedScrollTimeout=setTimeout(function(){i=v(s.target).scrollTop(),o.scrollTo({y:i})},a)}),D.on(t,Du,function(s){var l=v(s.target).closest(".dx-scrollable"),u=!1;if(o&&o.$element().is(l))u=!0;else{var d=l.length&&cn.getInstance(l.get(0)),c=d&&d.scrollHeight()-d.clientHeight()>0;u=d&&!c}if(u&&(i=o.scrollTop(),o.scrollTo({y:i-s.delta}),o.scrollTop()>0&&o.scrollTop()+o.clientHeight()<o.scrollHeight()+e.getScrollbarWidth()))return!1}),t.appendTo(r)),t}return e.callBase()},_updateScrollable:function(){this.callBase();var e=this.getScrollable();if(!(e!=null&&e._disposed)){var t=e&&e.scrollOffset().top;this._updateFixedTablePosition(t)}},_renderContent:function(e,t){return this._isFixedTableRendering?e.empty().addClass(this.addWidgetPrefix(Ew)+" "+this.addWidgetPrefix(eu)).append(t):this.callBase(e,t)},_getGroupCellOptions:function(e){return this._isFixedTableRendering?this.callBase(O({},e,{columns:this._columnsController.getVisibleColumns()})):this.callBase(e)},_renderGroupedCells:function(e,t){return this.callBase(e,O({},t,{columns:this._columnsController.getVisibleColumns()}))},_renderGroupSummaryCells:function(e,t){this._isFixedTableRendering?this.callBase(e,O({},t,{columns:this._columnsController.getVisibleColumns()})):this.callBase(e,t)},_hasAlignByColumnSummaryItems:function(e,t){var i=this.callBase.apply(this,arguments),n=t.columns[e];return t.isFixed?n.fixed&&(i||n.fixedPosition==="right"):i&&(!this._isFixedColumns||!n.fixed)},_renderGroupSummaryCellsCore:function(e,t,i,n){var r;if(this._isFixedTableRendering){t.isFixed=!0,r=this._getAlignByColumnCellCount(i,t),t.isFixed=!1;var a=t.columns.length-r;t=O({},t,{columns:this.getFixedColumns()});var o=da(t.columns);a<o?(r-=t.columns[o].colspan-1||0,i-=t.columns[o].colspan-1||0):n>0&&e.css("visibility","hidden"),n=r}this.callBase(e,t,i,n)},_getSummaryCellIndex:function(e,t){if(this._isFixedTableRendering){var i=da(t);return e>i&&(e+=t[i].colspan-1),e}return this.callBase.apply(this,arguments)},_renderCore:function(e){this._detachHoverEvents(),this.callBase(e);var t=this._isFixedColumns;this.element().toggleClass(Cne,t),this.option("hoverStateEnabled")&&t&&this._attachHoverEvents()},setRowsOpacity:function(e,t){this.callBase(e,t);var i=this._getRowElements(this._fixedTableElement);this._setRowsOpacityCore(i,this.getFixedColumns(),e,t)},optionChanged:function(e){this.callBase(e),e.name==="hoverStateEnabled"&&this._isFixedColumns&&(e.value?this._attachHoverEvents():this._detachHoverEvents())},getCellIndex:function(e){var t=this._fixedTableElement,i=0;if(t&&e.is("td")&&e.closest(t).length){var n=this.getFixedColumns();return F(n,function(r,a){if(r===e[0].cellIndex)return!1;if(a.colspan){i+=a.colspan;return}i++}),i}return this.callBase.apply(this,arguments)},_updateFixedTablePosition:function(e,t){if(this._fixedTableElement&&this._tableElement){var i,n=this.getController("editorFactory");this._fixedTableElement.parent().scrollTop(e),t&&n&&(i=n.focus(),i&&n.focus(i))}},setScrollerSpacing:function(e,t){var i={marginBottom:0},n=this.element().children("."+this.addWidgetPrefix(eu));if(n.length&&this._fixedTableElement){n.css(i),this._fixedTableElement.css(i),i[this.option("rtlEnabled")?"marginLeft":"marginRight"]=e,i.marginBottom=t;var r=this._scrollable&&this._scrollable.option("useNative");(r?n:this._fixedTableElement).css(i)}},_getElasticScrollTop:function(e){var t=0;if(e.scrollOffset.top<0)t=-e.scrollOffset.top;else if(e.reachedBottom){var i=v(this._findContentElement()),n=v(e.component.container()),r=Math.max(i.get(0).clientHeight-n.get(0).clientHeight,0);t=r-e.scrollOffset.top}return Math.floor(t)},_applyElasticScrolling:function(e){if(this._fixedTableElement){var t=this._getElasticScrollTop(e);Math.ceil(t)!==0?ti(this._fixedTableElement,{top:t}):this._fixedTableElement.css("transform","")}},_handleScroll:function(e){this._updateFixedTablePosition(e.scrollOffset.top,!0),this._applyElasticScrolling(e),this.callBase(e)},_updateContentPosition:function(e){this.callBase.apply(this,arguments),e||this._updateFixedTablePosition(this._scrollTop)},_afterRowPrepared:function(e){this._isFixedTableRendering||this.callBase(e)},_scrollToElement:function(e){this.callBase(e,this.getFixedColumnsOffset())},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._fixedScrollTimeout)}}),Sne=PC,Ene={defaultOptions:function(){return{columnFixing:{enabled:!1,texts:{fix:ue.format("dxDataGrid-columnFixingFix"),unfix:ue.format("dxDataGrid-columnFixingUnfix"),leftPosition:ue.format("dxDataGrid-columnFixingLeftPosition"),rightPosition:ue.format("dxDataGrid-columnFixingRightPosition")}}}},extenders:{views:{columnHeadersView:xne,rowsView:bne,footerView:Sne},controllers:function(){var e=function(t,i,n){var r=da(i),a=t.length-i.length;return F(n,function(o,s){s.index>r&&(s.columnIndex+=a,s.index+=a)}),n};return{draggingHeader:{_generatePointsByColumns:function(t){var i=t.columns,n=t.targetDraggingPanel;if(n&&n.getName()==="headers"&&n.isFixedColumns()&&t.sourceColumn.fixed){t.rowIndex||(t.columnElements=n.getFixedColumnElements(0)),t.columns=n.getFixedColumns(t.rowIndex);var r=this.callBase(t);return e(i,t.columns,r),r}return this.callBase(t)},_pointCreated:function(t,i,n,r){var a=this.callBase.apply(this,arguments),o=i[t.columnIndex],s=this._columnHeadersView.getTransparentColumnElement();if(!a&&n==="headers"&&s&&s.length){var l=Gt(s.get(0));return r&&r.fixed?r.fixedPosition==="right"?t.x<l.right:t.x>l.left:o&&o.fixed&&o.fixedPosition!=="right"?!0:t.x<l.left||t.x>l.right}return a}},columnsResizer:{_generatePointsByColumns:function(){var t=this,i=t._columnsController,n=i&&t._columnsController.getVisibleColumns(),r=i&&t._columnsController.getFixedColumns(),a=t._columnHeadersView.getFixedColumnElements(),o=[];t.callBase(),a&&a.length>0&&(o=xe.getPointsByColumns(a,function(s){return t._pointCreated(s,a.length,r)}),t._pointsByFixedColumns=e(n,r,o))},_pointCreated:function(t,i,n){var r=this.option("columnResizingMode")==="widget";if(t.index>0&&t.index<i){var a=n[t.columnIndex-1]||{},o=n[t.columnIndex]||{};if(a.fixed||o.fixed)return t.columnIndex-=1,!((a.allowResizing||a.command===Ar)&&(r||o.allowResizing||o.command===Ar))}return this.callBase.apply(this,arguments)},_getTargetPoint:function(t,i,n){var r=this._columnHeadersView.getTransparentColumnElement();if(r&&r.length){var a=Gt(r.get(0));if(i<=a.left||i>=a.right)return this.callBase(this._pointsByFixedColumns,i,n)}return this.callBase(t,i,n)}}}}()}};De.registerModule("columnFixing",Ene);var ck="columnHeadersView",hk="rowsView",wne="footerView",Hv=[ck,hk,wne],Ine="dxDataGridAdaptivity",Dr="adaptiveHidden",ns="detailAdaptive",bg="dx-field-item-content",Tne="dx-item-modified",tu="hidden-column",Ane="adaptive-more",fk="dx-command-adaptive",$v="dx-command-adaptive-hidden",Dne="dx-adaptive-detail-row",Aw="dx-adaptive-item-text",One="dx-master-detail-cell",Rne="dx-last-data-cell",ac="adaptive",kne="batch",Sg="row",Bne="form",Lne="popup",Pne="revert-tooltip",Dw="dx-group-cell",Fne="dx-group-row",Ow="dxDataGrid-ariaAdaptiveExpand",Mne="dxDataGrid-ariaAdaptiveCollapse",Vne="scrolling.legacyMode";function oc(e,t){return e._columnsController.getColumnId(t)}function Rw(e){return e.find("td:not(.dx-datagrid-hidden-column):not([class*='dx-command-'])")}function Nne(e,t){var i,n=v(e),r=t.component.getController("adaptiveColumns");t.rowType==="data"?(i=v("<span>").addClass(r.addWidgetPrefix(Ane)),D.on(i,me(ct,Ine),r.createAction(function(){r.toggleExpandAdaptiveDetailRow(t.key)})),i.appendTo(n)):xe.setEmptyText(n)}var Hne=Tt.ViewController.inherit({_isRowEditMode:function(){var e=this._getEditMode();return e===Sg},_isItemModified:function(e,t){var i=this._columnsController.getVisibleIndex(e.column.index),n=this._dataController.getRowIndexByKey(t.key),r=this._dataController.items()[n+1];return r&&r.modifiedValues&&E(r.modifiedValues[i])},_renderFormViewTemplate:function(e,t,i){var n=e.column,r=this.createAction(function(){D.trigger(i,ct)}),a=n.calculateCellValue(t.data),o=xe.getDisplayValue(n,a,t.data,t.rowType),s=xe.formatValue(o,n),l=this._editingController.isCellOrBatchEditMode(),u=this._rowsView;if(n.allowEditing&&this.getController("keyboardNavigation").isKeyboardEnabled()&&(i.attr("tabIndex",this.option("tabIndex")),l&&(D.off(i,"focus",r),D.on(i,"focus",r))),n.cellTemplate){var d=O({},t,{value:a,displayValue:o,text:s,column:n}),c=!!i.closest(qe().document).length;u.renderTemplate(i,n.cellTemplate,d,c).done(()=>{u._cellPrepared(i,t)})}else{var h=i.get(0);n.encodeHtml?h.textContent=s:h.innerHTML=s,i.addClass(Aw),(!E(s)||s==="")&&i.html("&nbsp;"),this._isRowEditMode()||this._isItemModified(e,t)&&i.addClass(Tne),u._cellPrepared(i,t)}},_getTemplate:function(e,t){var i=this,n=e.column,r=this.getController("editing");return function(a,o){var s=v(o),l=i._columnsController.getVisibleIndex(n.index),u=O({},t),d=function(){var c=i._isItemEdited(e);u.value=t.row.values[l],c||n.showEditorAlways?r.renderFormEditTemplate(u,e,a,s,!c):(u.column=n,u.columnIndex=l,i._renderFormViewTemplate(e,u,s))};d(),u.watch&&u.watch(function(){return{isItemEdited:i._isItemEdited(e),value:t.row.values[l]}},function(){s.contents().remove(),s.removeClass(Aw),d()})}},_isVisibleColumnsValid:function(e){return!(e<2||e.length-function(){for(var t=0,i=0;i<e.length;i++){var n=e[i];n.command&&t++}return t}()<=1)},_calculatePercentWidths:function(e,t){var i=this,n=0;return t.forEach(function(r,a){e[a]!==Dr&&(n+=i._getItemPercentWidth(r))}),n},_isPercentWidth:function(e){return Me(e)&&e.slice(-1)==="%"},_isColumnHidden:function(e){return this._hiddenColumns.filter(function(t){return t.index===e.index}).length>0},_getAverageColumnsWidth:function(e,t,i){var n=this,r=0,a=0;return t.forEach(function(o){if(!n._isColumnHidden(o)){var s=o.width;E(s)&&!isNaN(parseFloat(s))?r+=n._isPercentWidth(s)?n._calculatePercentWidth({visibleIndex:o.visibleIndex,columnsCount:t.length,columnsCanFit:i,bestFitWidth:o.bestFitWidth,columnWidth:s,containerWidth:e}):parseFloat(s):a++}}),(e-r)/a},_calculateColumnWidth:function(e,t,i,n){var r=oc(this,e),a=this._columnsController.columnOption(r,"width"),o=this._columnsController.columnOption(r,"bestFitWidth"),s=i.length,l;if(a&&a!=="auto")if(this._isPercentWidth(a))l=this._calculatePercentWidth({visibleIndex:e.visibleIndex,columnsCount:s,columnsCanFit:n,bestFitWidth:o,columnWidth:a,containerWidth:t});else return parseFloat(a);else{var u=this.option("columnAutoWidth");l=u||e.command?o:this._getAverageColumnsWidth(t,i,n)}return l},_calculatePercentWidth:function(e){var t=e.visibleIndex<e.columnsCount-1&&e.columnsCanFit,i=e.containerWidth*parseFloat(e.columnWidth)/100,n=e.columnsCanFit&&i<e.bestFitWidth?e.bestFitWidth:i;return t?e.containerWidth*parseFloat(e.columnWidth)/100:n},_getNotTruncatedColumnWidth:function(e,t,i,n){var r=oc(this,e),a=this._columnsController.columnOption(r,"width"),o=this._columnsController.columnOption(r,"bestFitWidth");if(a&&a!=="auto"&&!this._isPercentWidth(a))return parseFloat(a);var s=this._calculateColumnWidth(e,t,i,n);return s<o?null:s},_getItemPercentWidth:function(e){var t=0;return e.width&&this._isPercentWidth(e.width)&&(t=parseFloat(e.width)),t},_getCommandColumnsWidth:function(){var e=this,t=e._columnsController.getVisibleColumns(),i=0;return F(t,function(n,r){(r.index<0||r.command)&&(i+=e._columnsController.columnOption(oc(e,r),"bestFitWidth")||0)}),i},_isItemEdited:function(e){if(this.isFormOrPopupEditMode())return!1;if(this._isRowEditMode()){var t=this.option("editing.editRowKey");if(kt(t,this._dataController.adaptiveExpandedKey()))return!0}else{var i=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,n=this._columnsController.getVisibleIndex(e.column.index);return this._editingController.isEditCell(i,n)}},_getFormItemsByHiddenColumns:function(e){var t=[];return F(e,function(i,n){t.push({column:n,name:n.name,dataField:n.dataField,visibleIndex:n.visibleIndex})}),t},_getAdaptiveColumnVisibleIndex:function(e){for(var t=0;t<e.length;t++){var i=e[t];if(i.command===ac)return t}},_hideAdaptiveColumn:function(e,t){var i=this._getAdaptiveColumnVisibleIndex(t);E(i)&&(e[i]=Dr,this._hideVisibleColumn({isCommandColumn:!0,visibleIndex:i}))},_showHiddenCellsInView:function(e){var{$cells:t,isCommandColumn:i}=e,n=i?$v:this.addWidgetPrefix(tu);t.removeClass(n)},_showHiddenColumns:function(){for(var e=0;e<Hv.length;e++){var t=this.getView(Hv[e]);if(t&&t.isVisible()&&t.element()){var i=t.name,n=t.element().find("."+$v);this._showHiddenCellsInView({viewName:i,$cells:n,isCommandColumn:!0});var r=t.element().find("."+this.addWidgetPrefix(tu));this._showHiddenCellsInView({viewName:i,$cells:r})}}},_isCellValid:function(e){return e&&e.length&&!e.hasClass(One)&&!e.hasClass(Dw)},_hideVisibleColumn:function(e){var{isCommandColumn:t,visibleIndex:i}=e,n=this;Hv.forEach(function(r){var a=n.getView(r);a&&n._hideVisibleColumnInView({view:a,isCommandColumn:t,visibleIndex:i})})},_hideVisibleColumnInView:function(e){var{view:t,isCommandColumn:i,visibleIndex:n}=e,r=t.name,a,o=this._columnsController.getVisibleColumns()[n],s=this._editingController&&this._editingController.getEditFormRowIndex();if(t&&t.isVisible()&&o)for(var l=t.getRowsCount(),u=t._getRowElements(),d=0;d<l;d++){var c=d===s&&r===hk&&this.option("editing.mode")!=="popup";if(!c){var h=r===ck?this._columnsController.getVisibleIndex(o.index,d):n;if(h>=0){var f=u.eq(d);a=this._findCellElementInRow(f,h),this._isCellValid(a)&&this._hideVisibleCellInView({viewName:r,isCommandColumn:i,$cell:a})}}}},_findCellElementInRow(e,t){var i=e.children(),n=t,r=!1;if(e.hasClass(Fne)){var a=e.find(".".concat(Dw)),o=a.attr("colspan");if(a.length&&E(o)){var s=parseInt(o),l=a.index()+s-1;t>l?n=t-s+1:r=!0}}var u=r?void 0:i.eq(n);return u},_hideVisibleCellInView:function(e){var{$cell:t,isCommandColumn:i}=e,n=i?$v:this.addWidgetPrefix(tu);t.addClass(n)},_getEditMode:function(){return this._editingController.getEditMode()},isFormOrPopupEditMode:function(){var e=this._getEditMode();return e===Bne||e===Lne},hideRedundantColumns:function(e,t,i){if(this._hiddenColumns=[],this._isVisibleColumnsValid(t)&&i.length){var n=0,r=this.component.$element(),a=$e(r)-this._getCommandColumnsWidth(),o=(function(){return t.filter(H=>!H.command&&this._hiddenColumns.filter($=>$.index===H.index).length===0)}).bind(this),s=o(),l=s.length,u,d,c;do{c=!1,n=0;var h=this._calculatePercentWidths(e,t),f=h<100&&h!==0;for(u=0;u<t.length;u++){var p=t[u],g=this._getNotTruncatedColumnWidth(p,a,s,f),m=oc(this,p),C=this._columnsController.columnOption(m,"width"),x=this._columnsController.columnOption(m,"minWidth"),T=this._columnsController.columnOption(m,"bestFitWidth");if(e[u]===Dr){d=!0;continue}if(!g&&!p.command&&!p.fixed){c=!0;break}(!C||C==="auto")&&(g=Math.max(T||0,x||0)),(p.command!==ac||d)&&(n+=g)}if(c=c||n>$e(r),c){var R=i.pop(),A=this._columnsController.getVisibleIndex(R.index);a+=this._calculateColumnWidth(R,a,s,f),this._hideVisibleColumn({visibleIndex:A}),e[A]=Dr,this._hiddenColumns.push(R),s=o()}}while(c&&s.length>1&&i.length);l===s.length&&this._hideAdaptiveColumn(e,t)}else this._hideAdaptiveColumn(e,t)},getItemContentByColumnIndex:function(e){for(var t,i=0;i<this._$itemContents.length;i++){t=this._$itemContents.eq(i);var n=t.data("dx-form-item");if(n&&n.column&&this._columnsController.getVisibleIndex(n.column.index)===e)return t}},toggleExpandAdaptiveDetailRow:function(e,t){this.isFormOrPopupEditMode()&&this._editingController.isEditing()||this.getController("data").toggleExpandAdaptiveDetailRow(e,t)},createFormByHiddenColumns:function(e,t){var i=this,n=v(e),r={items:i._getFormItemsByHiddenColumns(i._hiddenColumns),formID:"dx-"+new ri},a=Qt()?{colCount:2}:{};this.executeAction("onAdaptiveDetailRowPreparing",{formOptions:r}),i._$itemContents=null,i._form=i._createComponent(v("<div>").appendTo(n),IC,O(a,r,{customizeItem:function(o){var s=o.column||i._columnsController.columnOption(o.name||o.dataField);s&&(o.label=o.label||{},o.label.text=o.label.text||s.caption,o.column=s,o.template=i._getTemplate(o,t,i.updateForm.bind(i))),r.customizeItem&&r.customizeItem.call(this,o)},onContentReady:function(o){r.onContentReady&&r.onContentReady.call(this,o),i._$itemContents=n.find("."+bg)}}))},hasAdaptiveDetailRowExpanded:function(){return E(this._dataController.adaptiveExpandedKey())},updateForm:function(e){this.hasAdaptiveDetailRowExpanded()&&this._form&&E(this._form._contentReadyAction)&&(e&&e.length?this._form.option("items",this._getFormItemsByHiddenColumns(e)):this._form.repaint())},updateHidingQueue:function(e){var t=e.filter(function(a){return a.visible&&!a.type&&!a.fixed&&!(E(a.groupIndex)&&a.groupIndex>=0)}),i,n;if(this._hidingColumnsQueue=[],this.option("allowColumnResizing")&&this.option("columnResizingMode")==="widget")return this._hidingColumnsQueue;for(n=0;n<t.length;n++)E(t[n].hidingPriority)&&t[n].hidingPriority>=0&&(i=!0,this._hidingColumnsQueue[t[n].hidingPriority]=t[n]);if(i)this._hidingColumnsQueue.reverse();else if(this.option("columnHidingEnabled"))for(n=0;n<t.length;n++){var r=this._columnsController.getVisibleIndex(t[n].index);this._hidingColumnsQueue[r]=t[n]}return this._hidingColumnsQueue=this._hidingColumnsQueue.filter(Object),this._hidingColumnsQueue},getHiddenColumns:function(){return this._hiddenColumns},hasHiddenColumns:function(){return this._hiddenColumns.length>0},getHidingColumnsQueue:function(){return this._hidingColumnsQueue},init:function(){var e=this;e._columnsController=e.getController("columns"),e._dataController=e.getController("data"),e._rowsView=e.getView("rowsView"),e._columnsController.addCommandColumn({type:ac,command:ac,visible:!0,adaptiveHidden:!0,cssClass:fk,alignment:"center",width:"auto",cellTemplate:Nne,fixedPosition:"right"}),e._columnsController.columnsChanged.add(function(){var t=!!e.updateHidingQueue(e._columnsController.getColumns()).length;e._columnsController.columnOption("command:adaptive","adaptiveHidden",!t,!0)}),e._editingController=e.getController("editing"),e._hidingColumnsQueue=[],e._hiddenColumns=[],e.createAction("onAdaptiveDetailRowPreparing"),e.callBase()},optionChanged:function(e){e.name==="columnHidingEnabled"&&this._columnsController.columnOption("command:adaptive","adaptiveHidden",!e.value),this.callBase(e)},publicMethods:function(){return["isAdaptiveDetailRowExpanded","expandAdaptiveDetailRow","collapseAdaptiveDetailRow"]},isAdaptiveDetailRowExpanded:function(e){return this._dataController.adaptiveExpandedKey()&&kt(this._dataController.adaptiveExpandedKey(),e)},expandAdaptiveDetailRow:function(e){this.hasAdaptiveDetailRowExpanded()||this.toggleExpandAdaptiveDetailRow(e)},collapseAdaptiveDetailRow:function(){this.hasAdaptiveDetailRowExpanded()&&this.toggleExpandAdaptiveDetailRow()},updateCommandAdaptiveAriaLabel:function(e,t){var i=this._dataController.getRowIndexByKey(e);if(i!==-1){var n=v(this.component.getRowElement(i));this.setCommandAdaptiveAriaLabel(n,t)}},setCommandAdaptiveAriaLabel:function(e,t){var i=e.find(".dx-command-adaptive");i.attr("aria-label",ue.format(t))}}),$ne={defaultOptions:function(){return{columnHidingEnabled:!1,onAdaptiveDetailRowPreparing:null}},controllers:{adaptiveColumns:Hne},extenders:{views:{rowsView:{_getCellTemplate:function(e){var t=this,i=e.column;return e.rowType===ns&&i.command==="detail"?function(n,r){t._adaptiveColumnsController.createFormByHiddenColumns(v(n),r)}:t.callBase(e)},_createRow:function(e){var t=this.callBase.apply(this,arguments);return e&&e.rowType===ns&&e.key===this._dataController.adaptiveExpandedKey()&&t.addClass(Dne),t},_renderCells:function(e,t){this.callBase(e,t);var i=this._adaptiveColumnsController,n=i.getHidingColumnsQueue().length,r=i.getHiddenColumns().length;n&&!r&&Rw(e).last().addClass(Rne),t.row.rowType==="data"&&i.setCommandAdaptiveAriaLabel(e,Ow)},_getColumnIndexByElementCore:function(e){var t=e.closest("."+bg);if(t.length&&t.closest(this.component.$element()).length){var i=t.length?t.first().data("dx-form-item"):null;return i&&i.column&&this._columnsController.getVisibleIndex(i.column.index)}else return this.callBase(e)},_cellPrepared:function(e,t){this.callBase.apply(this,arguments),t.row.rowType!==ns&&t.column.visibleWidth===Dr&&e.addClass(this.addWidgetPrefix(tu))},_getCellElement:function(e,t){var i=this._dataController.items()[e];return i&&i.rowType===ns?this._adaptiveColumnsController.getItemContentByColumnIndex(t):this.callBase.apply(this,arguments)},getContextMenuItems:function(e){if(e.row&&e.row.rowType==="detailAdaptive"){var t=this.component.getView("columnHeadersView"),i=v(e.targetElement).closest(".dx-field-item-label").next().data("dx-form-item");return e.column=i?i.column:e.column,t.getContextMenuItems&&t.getContextMenuItems(e)}return this.callBase&&this.callBase(e)},isClickableElement:function(e){var t=this.callBase?this.callBase(e):!1;return t||!!e.closest("."+fk).length},init:function(){this.callBase(),this._adaptiveColumnsController=this.getController("adaptiveColumns")}}},controllers:{export:{_updateColumnWidth:function(e,t){this.callBase(e,e.visibleWidth===Dr?e.bestFitWidth:t)}},columnsResizer:{_pointCreated:function(e,t,i){var n=this.callBase(e,t,i),r=i[e.columnIndex]||{},a=this._getNextColumnIndex(e.columnIndex),o=i[a]||{},s=a!==e.columnIndex+1&&o.command,l=r.visibleWidth===Dr||s;return n||l},_getNextColumnIndex:function(e){for(var t=this._columnsController.getVisibleColumns(),i=this.callBase(e);t[i]&&t[i].visibleWidth===Dr;)i++;return i}},draggingHeader:{_pointCreated:function(e,t,i,n){var r=this.callBase(e,t,i,n),a=t[e.columnIndex-1]||{},o=a.visibleWidth===Dr;return r||o}},editing:{_isRowEditMode:function(){return this.getEditMode()===Sg},_getFormEditItemTemplate:function(e,t){return this.getEditMode()!==Sg&&e.rowType==="detailAdaptive"?(e.columnIndex=this._columnsController.getVisibleIndex(t.index),this.getColumnTemplate(e)):this.callBase(e,t)},_closeEditItem:function(e){var t=e.closest("."+bg),i=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,n=t.length?t.first().data("dx-form-item"):null,r=n&&n.column&&this._columnsController.getVisibleIndex(n.column.index);this.isEditCell(i,r)||this.callBase(e)},_beforeUpdateItems:function(e,t){if(!this._adaptiveController.isFormOrPopupEditMode()&&this._adaptiveController.hasHiddenColumns()){var i=this._dataController.items(),n=i[t],r=xe.getIndexByKey(this._dataController.adaptiveExpandedKey(),i);this._isForceRowAdaptiveExpand=!this._adaptiveController.hasAdaptiveDetailRowExpanded(),r>=0&&e.push(r+1),e.push(t+1),this._dataController.adaptiveExpandedKey(n.key)}},_afterInsertRow:function(e){this.callBase.apply(this,arguments),this._adaptiveController.hasHiddenColumns()&&(this._adaptiveController.toggleExpandAdaptiveDetailRow(e,this.isRowEditMode()),this._isForceRowAdaptiveExpand=!0)},_collapseAdaptiveDetailRow:function(){this._isRowEditMode()&&this._isForceRowAdaptiveExpand&&(this._adaptiveController.collapseAdaptiveDetailRow(),this._isForceRowAdaptiveExpand=!1)},_cancelEditAdaptiveDetailRow:function(){this._adaptiveController.hasHiddenColumns()&&this._collapseAdaptiveDetailRow()},_afterSaveEditData:function(){this.callBase.apply(this,arguments);var e=new te;return this._isRowEditMode()&&this._adaptiveController.hasHiddenColumns()?Ae(this.getController("validating").validate(!0)).done(t=>{t&&this._cancelEditAdaptiveDetailRow(),e.resolve()}):e.resolve(),e.promise()},_beforeCancelEditData:function(){this.callBase(),this._cancelEditAdaptiveDetailRow()},_getRowIndicesForCascadeUpdating:function(e){var t=this.callBase.apply(this,arguments);return this._adaptiveController.isAdaptiveDetailRowExpanded(e.key)&&t.push(e.rowType===ns?e.rowIndex-1:e.rowIndex+1),t},_beforeCloseEditCellInBatchMode:function(e){var t=this._dataController._adaptiveExpandedKey;if(t){var i=xe.getIndexByKey(t,this._dataController.items());i>-1&&e.unshift(i)}},editRow:function(e){this._adaptiveController.isFormOrPopupEditMode()&&this._adaptiveController.collapseAdaptiveDetailRow(),this.callBase(e)},deleteRow:function(e){var t=this._dataController.getKeyByRowIndex(e);this.getEditMode()===kne&&this._adaptiveController.isAdaptiveDetailRowExpanded(t)&&this._adaptiveController.collapseAdaptiveDetailRow(),this.callBase(e)},init:function(){this.callBase(),this._adaptiveController=this.getController("adaptiveColumns")}},resizing:{_needBestFit:function(){return this.callBase()||!!this._adaptiveColumnsController.getHidingColumnsQueue().length},_correctColumnWidths:function(e,t){var i=this._adaptiveColumnsController,n=i.getHiddenColumns(),r=i.updateHidingQueue(this._columnsController.getColumns());i.hideRedundantColumns(e,t,r);var a=i.getHiddenColumns();return i.hasAdaptiveDetailRowExpanded()&&n.length!==a.length&&i.updateForm(a),!a.length&&i.collapseAdaptiveDetailRow(),this.callBase.apply(this,arguments)},_toggleBestFitMode:function(e){e&&this._adaptiveColumnsController._showHiddenColumns(),this.callBase(e)},_needStretch:function(){var e=this._adaptiveColumnsController;return this.callBase.apply(this,arguments)||e.getHidingColumnsQueue().length||e.hasHiddenColumns()},init:function(){this._adaptiveColumnsController=this.getController("adaptiveColumns"),this.callBase()},dispose:function(){this.callBase.apply(this,arguments),clearTimeout(this._updateScrollableTimeoutID)}},data:{_processItems:function(e,t){var i=t.changeType;if(e=this.callBase.apply(this,arguments),i==="loadingAll"||!E(this._adaptiveExpandedKey))return e;var n=xe.getIndexByKey(this._adaptiveExpandedKey,e),r=this.option(Vne)===!1;if(n>=0){var a=e[n];e.splice(n+1,0,{visible:!0,rowType:ns,key:a.key,data:a.data,node:a.node,modifiedValues:a.modifiedValues,isNewRow:a.isNewRow,values:a.values})}else i==="refresh"&&!(r&&t.repaintChangesOnly)&&(this._adaptiveExpandedKey=void 0);return e},_getRowIndicesForExpand:function(e){var t=this.callBase.apply(this,arguments);if(this.getController("adaptiveColumns").isAdaptiveDetailRowExpanded(e)){var i=t[t.length-1];t.push(i+1)}return t},adaptiveExpandedKey:function(e){if(E(e))this._adaptiveExpandedKey=e;else return this._adaptiveExpandedKey},toggleExpandAdaptiveDetailRow:function(e,t){var i=xe.getIndexByKey(this._adaptiveExpandedKey,this._items),n=xe.getIndexByKey(e,this._items);i>=0&&i===n&&!t&&(e=void 0,n=-1);var r=this._adaptiveExpandedKey;this._adaptiveExpandedKey=e,i>=0&&i++,n>=0&&n++;var a=this.getRowIndexDelta();this.updateItems({allowInvisibleRowIndices:!0,changeType:"update",rowIndices:[i-a,n-a]});var o=this.getController("adaptiveColumns");o.updateCommandAdaptiveAriaLabel(e,Mne),o.updateCommandAdaptiveAriaLabel(r,Ow)},init:function(){this.callBase(),this._adaptiveExpandedKey=void 0}},editorFactory:{_getFocusCellSelector:function(){return this.callBase()+", .dx-adaptive-detail-row .dx-field-item > .dx-field-item-content"},_getTooltipsSelector:function(){return this.callBase()+", .dx-field-item-content ."+this.addWidgetPrefix(Pne)}},columns:{_isColumnVisible:function(e){return this.callBase(e)&&!e.adaptiveHidden}},keyboardNavigation:{_isCellValid:function(e){return this.callBase.apply(this,arguments)&&!e.hasClass(this.addWidgetPrefix(tu))},_processNextCellInMasterDetail:function(e){this.callBase(e);var t=this._editingController.isCellOrBatchEditMode();!this._isInsideEditForm(e)&&e&&t&&D.on(e,"focus",function i(){D.off(e,"focus",i),D.trigger(e,"dxclick")})},_handleTabKeyOnMasterDetailCell:function(e,t){var i=this.callBase(e,t),n=this._getFocusedCell(),r=n&&n.parent();if(!i&&r&&r.length){var a=Rw(r),o=t==="next"?a.last():a.first(),s=r.get(0).rowIndex,l=this._adaptiveController,u=this._dataController.getKeyByRowIndex(t==="next"?s:s-1),d=n&&o&&n.get(0)===o.get(0);return l.isAdaptiveDetailRowExpanded(u)&&d}return i},init:function(){this.callBase(),this._adaptiveController=this.getController("adaptiveColumns")}}}}};De.registerModule("adaptivity",$ne);function pk(e,t,i,n,r,a){i=i||0,n=n||[],a=a||[],n[i]=n[i]||0;var o=e[i],s=a[i]+1||0,l=0,u;if(o){for(u=s;u<o.length;u++){var d=o[u],c=u+n[i],h=d.colspan||1;if(pk(e,t,i+(d.rowspan||1),n,h,a),n[i]+=h-1,l+=h,d.rowspan)for(var f=i+1;f<i+d.rowspan;f++)n[f]=n[f]||0,n[f]+=d.colspan||1;if(t(d,c,i,u)===!1||r!==void 0&&l>=r)break}a[i]=u}}function Wv(e,t,i){var n=[];pk(e,function(a,o,s){var l=a,u,d=l.colspan||1,c=o+d-1>=t&&o<i;if(n[s]=n[s]||[],c)o<t?(u=d-(t-o),o=t):u=d,o+u>i&&(u=i-o),u!==d&&(l=O({},l,{colspan:u})),n[s].push(l);else if(o>i)return!1});for(var r=0;r<n.length;r++)n[r]=n[r]||[];return n}var Wne=50,zne={_resizeCore:function(){this.callBase.apply(this,arguments),this._columnsController.resize()},_handleScroll:function(e){var t=this,i=this.getScrollable(),n=e.scrollOffset.left;t.callBase.apply(t,arguments),t.option("rtlEnabled")&&i&&(n=$e(i.$content())-$e(i.$element())-n),t._columnsController.setScrollPosition(n)}},Gne={_renderCore:function(){this.callBase.apply(this,arguments),this._columnsController.isVirtualMode()&&this._updateScrollLeftPosition()}},Une=function(){var e=function(i){return i.map(n=>n.visibleWidth||parseFloat(n.width)||Wne)},t={init:function(){this.callBase(),this._beginPageIndex=0,this._endPageIndex=0,this._position=0,this._virtualVisibleColumns={}},resetColumnsCache:function(){this.callBase(),this._virtualVisibleColumns={}},getBeginPageIndex:function(i){for(var n=this.getVisibleColumns(void 0,!0),r=e(n),a=0,o=0;o<r.length;o++){if(a>=i)return Math.floor(o/this.getColumnPageSize());a+=r[o]}return 0},getTotalWidth:function(){var i=this.option("width");return typeof i=="number"?i:this.getController("resizing")._lastWidth||lt(this.component.$element())},getEndPageIndex:function(i){var n=this.getVisibleColumns(void 0,!0),r=e(n),a=0;i+=this.getTotalWidth();for(var o=0;o<r.length;o++){if(a>=i)return Math.ceil(o/this.getColumnPageSize());a+=r[o]}return Math.ceil(r.length/this.getColumnPageSize())},getColumnPageSize:function(){return this.option("scrolling.columnPageSize")},_fireColumnsChanged:function(){var i=new Date;this.columnsChanged.fire({optionNames:{all:!0,length:1},changeTypes:{columns:!0,virtualColumnsScrolling:!0,length:2}}),this._renderTime=new Date-i},getScrollingTimeout:function(){var i=this.option("scrolling.columnRenderingThreshold"),n=this.option("scrolling.renderAsync"),r=0;return(!E(n)&&this._renderTime>i||n)&&(r=this.option("scrolling.timeout")),r},setScrollPosition:function(i){var n=this.getScrollingTimeout();n>0?(clearTimeout(this._changedTimeout),this._changedTimeout=setTimeout(()=>{this._setScrollPositionCore(i)},n)):this._setScrollPositionCore(i)},isVirtualMode:function(){return Ke()&&this.option("scrolling.columnRenderingMode")==="virtual"},resize:function(){this._setScrollPositionCore(this._position)},_setScrollPositionCore:function(i){if(this.isVirtualMode()){var n=this.getBeginPageIndex(i),r=this.getEndPageIndex(i),a=i<this._position?this._beginPageIndex>n:this._endPageIndex<r;this._position=i,a&&(this._beginPageIndex=n,this._endPageIndex=r,this._fireColumnsChanged())}},getFixedColumns:function(i,n){var r=this.callBase(i);if(this.isVirtualMode()&&!n&&r.length){var a=r.map(o=>o.command).indexOf("transparent");return r[a].colspan=this.getVisibleColumns().length-this.callBase().length+1,r}return r},getVisibleColumns:function(i,n){if(n||!this.isVirtualMode())return this.callBase(i);!this._beginPageIndex&&!this._endPageIndex&&(this._beginPageIndex=this.getBeginPageIndex(this._position),this._endPageIndex=this.getEndPageIndex(this._position));var r=this._beginPageIndex,a=this._endPageIndex,o=i+"-"+r+"-"+a;if(this._virtualVisibleColumns[o])return this._virtualVisibleColumns[o];var s=this.callBase(),l=this.getRowCount(),u=this.getColumnPageSize(),d=r*u,c=a*u,h=this.getFixedColumns(void 0,!0),f=h.map(V=>V.command).indexOf("transparent"),p=h.length?f:0,g=s.slice(0,p),m=s.slice(p,d),C=e(m).reduce((V,U)=>V+U,0);C||(d=0);var x=h.length?h.length-f-1:0,T=s.slice(s.length-x),R=s.slice(c,s.length-x),A=e(R).reduce((V,U)=>V+U,0);if(A||(c=s.length),l>1&&typeof i=="number"){for(var H=[],$=0;$<l;$++)H.push(this.callBase($));g=Wv(H,0,g.length)[i]||[],T=Wv(H,s.length-T.length,s.length)[i]||[],s=Wv(H,d,c)[i]||[]}else s=s.slice(d,c);return C&&(s.unshift({command:"virtual",width:C}),s=g.concat(s)),A&&(s.push({command:"virtual",width:A}),s=s.concat(T)),this._virtualVisibleColumns[o]=s,s},getColumnIndexOffset:function(){var i=0;if(this._beginPageIndex>0){var n=this.getFixedColumns(),r=n.map(o=>o.command).indexOf("transparent"),a=r>=0?r:0;i=this._beginPageIndex*this.getColumnPageSize()-a-1}return i>0?i:0},dispose:function(){clearTimeout(this._changedTimeout),this.callBase.apply(this,arguments)}};return t}(),Kne={defaultOptions:function(){return{scrolling:{columnRenderingMode:"standard",columnPageSize:5,columnRenderingThreshold:300}}},extenders:{controllers:{columns:Une},views:{columnHeadersView:Gne,rowsView:zne}}};De.registerModule("virtualColumns",Kne);function jne(e,t){for(var i=d=>d||1,n=[],r=(e[0]||[]).reduce((d,c)=>d+i(c.colspan),0),a=(d=>{var c=0,h=0;return()=>{var f=d[c]||[],p=f[h++];return h>=f.length&&(c++,h=0),p&&(p.colspan=i(p.colspan),p.rowspan=i(p.rowspan)),p}})(e),o=(d,c,h)=>{var f=n[d]=n[d]||[];if(f[c]=h,h.colspan>1||h.rowspan>1){for(var p=(x=>O({},x,t))(h),g=1;g<h.colspan;g++)o(d,c+g,p);for(var m=1;m<h.rowspan;m++)for(var C=0;C<h.colspan;C++)o(d+m,c+C,p)}},s=a(),l=0;s;){for(var u=0;u<r&&s;u++)n[l]&&n[l][u]||(o(l,u,s),u+=s.colspan-1,s=a());l++}return n}var ia=qe(),sc=Su(),kw={EXCEL:"xlsx",CSS:"css",PNG:"png",JPEG:"jpeg",GIF:"gif",SVG:"svg",PDF:"pdf"},vk={CSS:"text/css",EXCEL:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",PNG:"image/png",JPEG:"image/jpeg",GIF:"image/gif",SVG:"image/svg+xml",PDF:"application/pdf"},qne={_revokeObjectURLTimeout:3e4,_getDataUri:function(e,t){var i=this._getMimeType(e);return"data:".concat(i,";base64,").concat(t)},_getMimeType:function(e){return vk[e]||"application/octet-stream"},_linkDownloader:function(e,t){var i=fe.createElement("a");return i.download=e,i.href=t,i.target="_blank",i},_formDownloader:function(e,t,i,n){var r={method:"post",action:e,enctype:"multipart/form-data"},a=v("<form>").css({display:"none"}).attr(r);function o(s,l){for(var u in l)s.setAttribute(u,l[u]);return s}a.append(o(fe.createElement("input"),{type:"hidden",name:"fileName",value:t})),a.append(o(fe.createElement("input"),{type:"hidden",name:"contentType",value:i})),a.append(o(fe.createElement("input"),{type:"hidden",name:"data",value:n})),a.appendTo("body"),D.trigger(a,"submit"),D.trigger(a,"submit")&&a.remove()},_saveByProxy:function(e,t,i,n){var r=this._getMimeType(i);return this._formDownloader(e,t,r,n)},_winJSBlobSave:function(e,t,i){var n=new Windows.Storage.Pickers.FileSavePicker;n.suggestedStartLocation=Windows.Storage.Pickers.PickerLocationId.documentsLibrary;var r=kw[i];if(r){var a=this._getMimeType(i);n.fileTypeChoices.insert(a,["."+r])}n.suggestedFileName=t,n.pickSaveFileAsync().then(function(o){o&&o.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function(s){var l=e.msDetachStream();Windows.Storage.Streams.RandomAccessStream.copyAsync(l,s).then(function(){s.flushAsync().done(function(){l.close(),s.close()})})})})},_click:function(e){try{e.dispatchEvent(new MouseEvent("click",{cancelable:!0}))}catch{var t=fe.getDocument().createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,ia,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}},_saveBlobAs:function(e,t,i){if(this._blobSaved=!1,E(sc.msSaveOrOpenBlob))sc.msSaveOrOpenBlob(i,e),this._blobSaved=!0;else if(E(ia.WinJS))this._winJSBlobSave(i,e,t),this._blobSaved=!0;else{var n=ia.URL||ia.webkitURL||ia.mozURL||ia.msURL||ia.oURL;if(E(n)){var r=n.createObjectURL(i),a=this._linkDownloader(e,r);setTimeout(()=>{n.revokeObjectURL(r),this._objectUrlRevoked=!0},this._revokeObjectURLTimeout),this._click(a)}else bu.warn("window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL is not defined")}},saveAs:function(e,t,i,n,r){var a=kw[t];if(a&&(e+="."+a),E(n)&&Je.log("W0001","Export","proxyURL","19.2","This option is no longer required"),r)this._saveByProxy(n,e,t,i);else if(Ee(ia.Blob))this._saveBlobAs(e,t,i);else if(E(n)&&!E(sc.userAgent.match(/iPad/i)))this._saveByProxy(n,e,t,i);else{E(sc.userAgent.match(/iPad/i))||Je.log("E1034");var o=this._linkDownloader(e,this._getDataUri(t,i));this._click(o)}}};function lc(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _k={exports:{}};/*!
54
54
 
55
55
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files