import{a as Cw,b as Qo,f as Zn}from"./chunk-QF5VF47J.js";import{N as fw,O as _w,a as h_,b as sl,f as Xo,h as Th,i as wi,m as br,p as pw,q as Si,r as gw,s as mw}from"./chunk-OIJW4GMG.js";import{$ as yh,$b as De,$c as xr,Bb as ne,Cb as be,Da as vt,Ea as Ye,Gc as ue,Hc as Ps,Ia as $e,Ib as lw,Ic as Sh,Ja as ic,Jc as Ih,Oa as dt,Pb as Io,Qb as V,Ra as ot,Rb as dw,Rc as ol,Sb as ui,Sc as Dh,Tc as c_,Ub as cw,Wc as Ji,Xc as uw,ac as Te,ad as hw,ba as Zt,bc as ti,ca as Jd,cc as Ze,da as L,dc as Je,ec as Xn,ed as u_,fa as ga,fc as Wi,fd as vr,g as ow,gd as nc,ia as ec,ja as tc,jb as U,jc as et,k as sw,kc as J,lb as Oh,lc as ii,mc as ni,nb as Fs,ob as w,oc as je,pc as wh,qb as Eh,qc as Ne,r as rw,rc as He,ua as it,uc as Bt,va as Jt,vc as Ge,wa as ei,wc as Qn,x as aw,xb as Z,xc as oi,ya as Zi,yb as N,zb as ci}from"./chunk-3FIHWXA5.js";import{a as Ln,b as So,g as lz,j as nw}from"./chunk-K4ALXBGI.js";var dz={"[object Array]":"array","[object Date]":"date","[object Object]":"object","[object String]":"string"},Ii=function(i){if(i===null)return"null";let e=Object.prototype.toString.call(i);return typeof i=="object"?dz[e]||"object":typeof i},yr=function(i){return typeof i=="boolean"},Ah=function(i){return Oe(i)&&i.toString().indexOf("e")!==-1},Vt=function(i){return Ii(i)==="date"},f=function(i){return i!=null},A=function(i){return typeof i=="function"},B=function(i){return typeof i=="string"},Oe=function(i){return typeof i=="number"&&isFinite(i)||!isNaN(i-parseFloat(i))},z=function(i){return Ii(i)==="object"},bt=function(i){let e;for(e in i)return!1;return!0},X=function(i){if(!i||Ii(i)!=="object")return!1;let e=Object.getPrototypeOf(i);if(!e)return!0;let t=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof t=="function"&&Object.toString.call(t)===Object.toString.call(Object)},Or=function(i){return["object","array","function"].indexOf(Ii(i))===-1},Ue=function(i){return i!=null&&i===i.window},si=function(i){return!!i&&!!(i.jquery||i.dxRenderer)},Zo=function(i){return!!i&&A(i.then)},rl=function(i){return!!i&&A(i.done)&&A(i.fail)},xw=function(i){return!!(i&&i.preventDefault)};var vw=function(i,e,t){i=i||{};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let o=e[n];(!(n in i)||t)&&(i[n]=o)}return i},m=function(i){i=i||{};let e=1,t=!1;for(typeof i=="boolean"&&(t=i,i=arguments[1]||{},e++);e<arguments.length;e++){let n=arguments[e];if(n!=null)for(let o in n){let s=i[o],r=n[o],a=!1,l;o==="__proto__"||o==="constructor"||i===r||(t&&r&&(X(r)||(a=Array.isArray(r)))?(a?l=s&&Array.isArray(s)?s:[]:l=s&&X(s)?s:{},i[o]=m(t,l,r)):r!==void 0&&(i[o]=r))}}return i};var cz=function(){},Mh=function(i){return typeof console>"u"||!A(console[i])?cz:console[i].bind(console)},Er={log:Mh("log"),info:Mh("info"),warn:Mh("warn"),error:Mh("error")};var Rh=function(){let i=[new RegExp("&","g"),new RegExp('"',"g"),new RegExp("'","g"),new RegExp("<","g"),new RegExp(">","g")];return function(e){return String(e).replace(i[0],"&amp;").replace(i[1],"&quot;").replace(i[2],"&#39;").replace(i[3],"&lt;").replace(i[4],"&gt;")}}(),uz=function(i){switch(typeof i){case"string":return i.split(/\s+/,4);case"object":return[i.x||i.h||i.left,i.y||i.v||i.top,i.x||i.h||i.right,i.y||i.v||i.bottom];case"number":return[i];default:return i}},bw=function(i){let e=uz(i),t=parseInt(e&&e[0],10),n=parseInt(e&&e[1],10),o=parseInt(e&&e[2],10),s=parseInt(e&&e[3],10);return isFinite(t)||(t=0),isFinite(n)||(n=t),isFinite(o)||(o=t),isFinite(s)||(s=n),{top:n,right:o,bottom:s,left:t}};function Gi(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return A(i)?i(...t):(t.forEach((o,s)=>{B(o)&&(o=o.replace(/\$/g,"$$$$"));let r=new RegExp("\\{"+s+"\\}","gm");i=i.replace(r,o)}),i)}var al=function(){let i=/\s/g;return function(e){return!e||!e.replace(i,"")}}();var yw="24.1.10",p_="24.1.10";var hz="https://js.devexpress.com/error/"+yw.split(".").slice(0,2).join("_")+"/";function ll(i,e){let t={ERROR_MESSAGES:m(e,i),Error:function(){return function(r){let a=r[0];r=r.slice(1);let l=n(a,r),d=s(a),c=o(a,l);return m(new Error(c),{__id:a,__details:l,url:d})}([].slice.call(arguments))},log:function(r){let a="log";/^E\d+$/.test(r)?a="error":/^W\d+$/.test(r)&&(a="warn"),Er[a](a==="log"?r:function(l){let d=l[0];return l=l.slice(1),o(d,n(d,l))}([].slice.call(arguments)))}};function n(r,a){return a=[t.ERROR_MESSAGES[r]].concat(a),Gi.apply(this,a).replace(/\.*\s*?$/,"")}function o(r,a){let l=r!=null&&r.startsWith("W")?"warning":"error";return Gi.apply(this,[`{0} - {1}.

For additional information on this {2} message, see: {3}`,r,a,l,s(r)])}function s(r){return hz+r}return t}var me=ll({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',W0019:`DevExtreme: Unable to Locate a Valid License Key.

Detailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.

If you are using a 30-day trial version of DevExtreme, you must uninstall all copies of DevExtreme once your 30-day trial period expires. For terms and conditions that govern use of DevExtreme UI components/libraries, please refer to the DevExtreme End User License Agreement: https://js.devexpress.com/EULAs/DevExtremeComplete.

To use DevExtreme in a commercial project, you must purchase a license. For pricing/licensing options, please visit: https://js.devexpress.com/Buy.

If you have licensing-related questions or need help with a purchase, please email clientservices@devexpress.com.

`,W0020:`DevExtreme: License Key Has Expired.

Detailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.

A mismatch exists between the license key used and the DevExtreme version referenced in this project.

To proceed, you can:
\u2022 use a version of DevExtreme linked to your license key: https://www.devexpress.com/ClientCenter/DownloadManager
\u2022 renew your DevExpress Subscription: https://www.devexpress.com/buy/renew (once you renew your subscription, you will be entitled to product updates and support service as defined in the DevExtreme End User License Agreement)

If you have licensing-related questions or need help with a renewal, please email clientservices@devexpress.com.

`,W0021:`DevExtreme: License Key Verification Has Failed.

Detailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.

To verify your DevExtreme license, make certain to specify a correct key in the GlobalConfig. If you continue to encounter this error, please visit https://www.devexpress.com/ClientCenter/DownloadManager to obtain a valid license key.

If you have a valid license and this problem persists, please submit a support ticket via the DevExpress Support Center. We will be happy to follow-up: https://supportcenter.devexpress.com/ticket/create.

`,W0022:`DevExtreme: Pre-release software. Not suitable for commercial use.

Detailed license/registration related information and instructions: https://js.devexpress.com/Documentation/Licensing/.

Pre-release software may contain deficiencies and as such, should not be considered for use or integrated in any mission critical application.

`,W0023:`DevExtreme: the following 'devextreme' package version does not match versions of other DevExpress products used in this application:

{0}

Interoperability between different versions of the products listed herein cannot be guaranteed.

`});var Ow={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:i=>{i.trim().charAt(0)!=="{"&&(i="{"+i+"}");try{return JSON.parse(i)}catch(e){try{return JSON.parse(pz(i))}catch{throw me.Error("E3018",e,i)}}}},pz=i=>i.replace(/'/g,'"').replace(/,\s*([\]}])/g,"$1").replace(/([{,])\s*([^":\s]+)\s*:/g,'$1"$2":'),gz=["decimalSeparator","thousandsSeparator"],Ew=function(){if(!arguments.length)return Ow;let i=arguments.length<=0?void 0:arguments[0];gz.forEach(e=>{if(i[e]){let t=`Now, the ${e} is selected based on the specified locale.`;me.log("W0003","config",e,"19.2",t)}}),m(Ow,i)};typeof DevExpress<"u"&&DevExpress.config&&Ew(DevExpress.config);var xe=Ew;var qe=(i,e)=>{if(Array.isArray(i))return i.map(e);let t=[];for(let n in i)t.push(e(i[n],n));return t},x=(i,e)=>{if(i){if("length"in i)for(let t=0;t<i.length&&e.call(i[t],t,i[t])!==!1;t++);else for(let t in i)if(e.call(i[t],t,i[t])===!1)break;return i}};var mz=function(i,e,t){return function(){let n=this.callBase;this.callBase=i[e];try{return t.apply(this,arguments)}finally{this.callBase=n}}},fz=function(i){let e=function(){};return e.prototype=i.prototype,new e},_z=function(i){let e=this,t,n,o;if(!i)return e;for(n in i)o=i[n],t=typeof e.prototype[n]=="function"&&typeof o=="function",e.prototype[n]=t?mz(e.parent.prototype,n,o):o;return e},Cz=function(){let i=this,e,t,n,o=Object.prototype.hasOwnProperty.bind(i);for(!o("_includedCtors")&&!o("_includedPostCtors")&&(i._includedCtors=i._includedCtors.slice(0),i._includedPostCtors=i._includedPostCtors.slice(0)),n=0;n<arguments.length;n++){e=arguments[n],e.ctor&&i._includedCtors.push(e.ctor),e.postCtor&&i._includedPostCtors.push(e.postCtor);for(t in e)t==="ctor"||t==="postCtor"||t==="default"||(i.prototype[t]=e[t])}return i},xz=function(i){if(!Object.prototype.hasOwnProperty.bind(this)("parent")&&this.parent){let n=Object.getPrototypeOf(this);return n===i||n.subclassOf(i)}else return this.parent===i?!0:!this.parent||!this.parent.subclassOf?!1:this.parent.subclassOf(i)},ww=function(){throw me.Error("E0001")},vz=function(){let i=Object.prototype.hasOwnProperty;return function(e,t){for(let n in e){if(!i.call(e,n))return;t[n]=e[n]}}}(),m_=function(){};m_.inherit=function(i){let e=function(){if(!this||Ue(this)||typeof this.constructor!="function")throw me.Error("E0003");let t=this,n=t.ctor,o=t.constructor._includedCtors,s=t.constructor._includedPostCtors,r;for(r=0;r<o.length;r++)o[r].call(t);for(n&&n.apply(t,arguments),r=0;r<s.length;r++)s[r].call(t)};return e.prototype=fz(this),vz(this,e),e.inherit=this.inherit,e.abstract=ww,e.redefine=_z,e.include=Cz,e.subclassOf=xz,e.parent=this,e._includedCtors=this._includedCtors?this._includedCtors.slice(0):[],e._includedPostCtors=this._includedPostCtors?this._includedPostCtors.slice(0):[],e.prototype.constructor=e,e.redefine(i),e};m_.abstract=ww;var pe=m_;function Lt(i){let e=pe.inherit(i),t=e,n=new t(i),o={},s=function(r,a){x(r,function(l){A(n[l])?(a||!i[l])&&(i[l]=function(){return n[l].apply(i,arguments)}):(a&&(o[l]=i[l]),i[l]=n[l])})};return s(i,!0),i.inject=function(r){t=t.inherit(r),n=new t,s(r)},i.resetInjection=function(){m(i,o),t=e,n=new e},i}function I(){return I=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},I.apply(null,arguments)}var bz=pe.inherit({ctor:function(i){i&&(i=String(i)),this._value=this._normalize(i||this._generate())},_normalize:function(i){for(i=i.replace(/[^a-f0-9]/gi,"").toLowerCase();i.length<32;)i+="0";return[i.substr(0,8),i.substr(8,4),i.substr(12,4),i.substr(16,4),i.substr(20,12)].join("-")},_generate:function(){let i="";for(let e=0;e<32;e++)i+=Math.round(15*Math.random()).toString(16);return i},toString:function(){return this._value},valueOf:function(){return this._value},toJSON:function(){return this._value}}),Ae=bz;var ks=function(i){this._options=i||{},this._list=[],this._queue=[],this._firing=!1,this._fired=!1,this._firingIndexes=[]};ks.prototype._fireCore=function(i,e){let t=this._firingIndexes,n=this._list,o=this._options.stopOnFalse,s=t.length;for(t[s]=0;t[s]<n.length&&!(n[t[s]].apply(i,e)===!1&&o);t[s]++);t.pop()};ks.prototype.add=function(i){return typeof i=="function"&&(!this._options.unique||!this.has(i))&&this._list.push(i),this};ks.prototype.remove=function(i){let e=this._list,t=this._firingIndexes,n=e.indexOf(i);if(n>-1&&(e.splice(n,1),this._firing&&t.length))for(let o=0;o<t.length;o++)n<=t[o]&&t[o]--;return this};ks.prototype.has=function(i){let e=this._list;return i?e.indexOf(i)>-1:!!e.length};ks.prototype.empty=function(i){return this._list=[],this};ks.prototype.fireWith=function(i,e){let t=this._queue;if(e=e||[],e=e.slice?e.slice():e,this._options.syncStrategy)this._firing=!0,this._fireCore(i,e);else{if(t.push([i,e]),this._firing)return;for(this._firing=!0;t.length;){let n=t.shift();this._fireCore(n[0],n[1])}}return this._firing=!1,this._fired=!0,this};ks.prototype.fire=function(){this.fireWith(this,arguments)};ks.prototype.fired=function(){return this._fired};var yz=function(i){return new ks(i)},ge=yz;var Sw=[{method:"resolve",handler:"done",state:"resolved"},{method:"reject",handler:"fail",state:"rejected"},{method:"notify",handler:"progress"}],dl=function(){let i=this;this._state="pending",this._promise={},Sw.forEach(function(e){let t=e.method;this[t+"Callbacks"]=ge(),this[t]=function(){return this[t+"With"](this._promise,arguments)}.bind(this),this._promise[e.handler]=function(n){if(!n)return this;let o=i[t+"Callbacks"];return o.fired()?n.apply(i[t+"Context"],i[t+"Args"]):o.add(function(s,r){n.apply(s,r)}.bind(this)),this}}.bind(this)),this._promise.always=function(e){return this.done(e).fail(e)},this._promise.catch=function(e){return this.then(null,e)},this._promise.then=function(e,t){let n=new dl;return["done","fail"].forEach(function(o){let s=o==="done"?e:t;this[o](function(){if(!s){n[o==="done"?"resolve":"reject"].apply(this,arguments);return}let r=s&&s.apply(this,arguments);rl(r)?r.done(n.resolve).fail(n.reject):Zo(r)?r.then(n.resolve,n.reject):n.resolve.apply(this,f(r)?[r]:arguments)})}.bind(this)),n.promise()},this._promise.state=function(){return i._state},this._promise.promise=function(e){return e?m(e,i._promise):i._promise},this._promise.promise(this)};Sw.forEach(function(i){let e=i.method,t=i.state;dl.prototype[e+"With"]=function(n,o){let s=this[e+"Callbacks"];return this.state()==="pending"&&(this[e+"Args"]=o,this[e+"Context"]=n,t&&(this._state=t),s.fire(n,o),t!=="pending"&&(this.resolveCallbacks.empty(),this.rejectCallbacks.empty())),this}});function Et(i,e){if(rl(i))return i;if(Zo(i)){let t=new dl;return i.then(function(){t.resolveWith.apply(t,[e].concat([[].slice.call(arguments)]))},function(){t.rejectWith.apply(t,[e].concat([[].slice.call(arguments)]))}),t}return new dl().resolveWith(e,[i])}var Oz=function(){if(arguments.length===1)return Et(arguments[0]);let i=[].slice.call(arguments),e=[],t=0,n=new dl,o=function(s){return function(r){e[s]=this,i[s]=arguments.length>1?[].slice.call(arguments):r,t++,t===i.length&&n.resolveWith(e,i)}};for(let s=0;s<i.length;s++)rl(i[s])?i[s].promise().done(o(s)).fail(n.reject):t++;return t===i.length&&n.resolveWith(e,i),n.promise()};function y(){return new dl}function P(){return Oz.apply(this,arguments)}var Nt=Lt({isWrapped:function(){return!1},isWritableWrapped:function(){return!1},wrap:function(i){return i},unwrap:function(i){return i},assign:function(){Er.error("Method 'assign' should not be used for not wrapped variables. Use 'isWrapped' method for ensuring.")}});var oc=function(i,e){let t=[],n,o;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.push(n);for(t.sort(function(s,r){let a=Oe(s),l=Oe(r);return a&&l?s-r:a&&!l?-1:!a&&l?1:s<r?-1:s>r?1:0}),o=0;o<t.length;o++)n=t[o],e(n,i[n])},Ez=function(i,e,t,n){!n&&Nt.isWrapped(i[e])?Nt.assign(i[e],t):i[e]=t},en=function(i,e,t,n){let o,s;for(let r in e)if(o=i[r],s=e[r],!(r==="__proto__"||r==="constructor"||i===s)){if(X(s)){let a=t?z(o):X(o);s=en(a?o:{},s,t,n)}s!==void 0&&o!==s&&Ez(i,r,s,n)}return i};var wz=Nt.unwrap,Dw=Nt.isWrapped,Sz=Nt.assign,Iz=function(i){return i.replace(/\[/g,".").replace(/\]/g,"")},Jn=function(i){return Iz(i).split(".")},Dz=function(i,e,t){return t=t||{},sc(e==="this"?i:i[e],t)},Tw=function(i,e,t,n){if(e==="this")throw new me.Error("E4016");let o=i[e];n.unwrapObservables&&Dw(o)?Sz(o,t):i[e]=t},Aw=function(i){return i=i||{},i.unwrapObservables=i.unwrapObservables!==void 0?i.unwrapObservables:!0,i};function sc(i,e){return e.unwrapObservables?wz(i):i}var Ce=function(i){if(arguments.length>1&&(i=[].slice.call(arguments)),!i||i==="this")return function(e){return e};if(typeof i=="string"){let e=Jn(i);return function(t,n){n=Aw(n);let o=n.functionsAsIs,s="defaultValue"in n,r=sc(t,n);for(let a=0;a<e.length;a++){if(!r){if(r==null&&s)return n.defaultValue;break}let l=e[a];if(s&&z(r)&&!(l in r))return n.defaultValue;let d=sc(r[l],n);!o&&A(d)&&(d=d.call(r)),r=d}return r}}if(Array.isArray(i))return Tz(i);if(A(i))return i};function Tz(i){let e={};for(let t=0,n=i.length;t<n;t++){let o=i[t];e[o]=Ce(o)}return function(t,n){let o;return x(e,function(s){let r=this(t,n);if(r===void 0)return;let a=o||(o={}),l=s.split("."),d=l.length-1;for(let c=0;c<d;c++){let h=l[c];h in a||(a[h]={}),a=a[h]}a[l[d]]=r}),o}}function Az(i,e){return e!=null&&e.locale?i.toLocaleLowerCase(e.locale):i.toLowerCase()}function Mz(i,e){return e!=null&&e.locale?i.toLocaleUpperCase(e.locale):i.toUpperCase()}var Iw=function(i,e,t,n){if(f(t))return t;let o={};return Tw(i,e,o,n),o},cl=function(i){i=Jn(i||"this");let e=i.length-1;return function(t,n,o){o=Aw(o);let s=sc(t,o);i.forEach(function(r,a){let l=Dz(s,r,o),d=!o.functionsAsIs&&A(l)&&!Dw(l);a===e?o.merge&&X(n)&&(!f(l)||X(l))?(l=Iw(s,r,l,o),en(l,n,!1,!0)):d?s[r](n):Tw(s,r,n,o):(l=Iw(s,r,l,o),d&&(l=l.call(s)),s=l)})}},Pt=function(i,e){var t;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(i instanceof Date)return i.getTime();if(i&&i instanceof pe&&i.valueOf)return i.valueOf();if(!((n==null||(t=n.collatorOptions)===null||t===void 0?void 0:t.sensitivity)==="case"||e)&&typeof i=="string"){var s,r;if((n==null||(s=n.collatorOptions)===null||s===void 0?void 0:s.sensitivity)==="base"){let d=/[\u0300-\u036f]/g;i=i.normalize("NFD").replace(d,"")}let a=n==null||(r=n.locale)===null||r===void 0?void 0:r.toLowerCase();return(a&&!!["hy","el"].find(d=>a===d||a.startsWith(`${d}-`))?Mz:Az)(i,n)}return i};var Be=function(i,e){return f(i)?i:e},hl=function(i,e){let t=new y,n=e||this,o={promise:t.promise(),abort:function(){clearTimeout(s),t.rejectWith(n)}},s=(arguments[2]||setTimeout)(function(){let r=i.call(n);r&&r.done&&A(r.done)?r.done(function(){t.resolveWith(n)}):t.resolveWith(n)},typeof e=="number"?e:0);return o},f_=[],Mw=[],rc=[],ul,Fh=function(i,e,t){if(ul&&ul!==i)return f_.push(e),Mw.push(i),t=t||new y,rc.push(t),t;{let n=ul,o=rc.length;ul=i;let s=e();return s||(rc.length>o?s=P.apply(this,rc.slice(o)):t&&t.resolve()),ul=n,t&&s&&s.done&&s.done(t.resolve).fail(t.reject),!ul&&f_.length&&(Mw.shift()==="render"?pt:Ci)(f_.shift(),rc.shift()),s||P()}},pt=function(i,e){return Fh("render",i,e)},Ci=function(i,e){return Fh("update",i,e)},Jo=function(i){return function(){let e=this;return Fh("render",function(){return i.call(e)})}},__=function(i){return function(){let e=this;return Fh("update",function(){return i.call(e)})}},Ph=function(i,e,t){let n=[],o=0;return x(e,(s,r)=>{let a=0,l=t?t(r):r;x(i,(d,c)=>{let h=l[d];if(h!==void 0){if(Rz(h,c)){a++;return}return a=-1,!1}}),!(a<o)&&(a>o&&(n.length=0,o=a),n.push(r))}),n},Rz=function(i,e){if(Array.isArray(i)&&Array.isArray(e)){let t=!1;return x(i,(n,o)=>{if(o!==e[n])return t=!0,!1}),!t}return i===e},es=function(i){switch(Ii(i)){case"string":return i.split(/\s+/,2);case"object":return[i.x??i.h,i.y??i.v];case"number":return[i];case"array":return i;default:return null}};var pl=function(i,e){let t=es(i),n=e?parseFloat(t&&t[0]):parseInt(t&&t[0],10),o=e?parseFloat(t&&t[1]):parseInt(t&&t[1],10);return isFinite(n)||(n=0),isFinite(o)||(o=n),{h:n,v:o}},Di=function(i){if(i instanceof Ae)return i.toString();if(z(i)||Array.isArray(i))try{let e=JSON.stringify(i);return e==="{}"?i:e}catch{return i}return i},eo=function(i){return i.replace(/[[\]{}\-()*+?.\\^$|\s]/g,"\\$&")},Fw=function(i){let e=xe().serverDecimalSeparator;return f(i)&&(i=i.toString().replace(".",e)),i},E=function(){},kh=function(){return new y().resolve().promise()},At=function(i,e,t){let n=[],o,s=!t;for(let r=0;r<i.length;r++)o=!!e(i[r],r),o===s&&n.push(i[r]);return n},Fz=(i,e,t,n)=>i.length!==e.length?!1:!i.some((o,s)=>!C_(o,e[s],t+1,I({},n,{strict:!0}))),Pz=(i,e,t,n)=>{let o=Object.keys(i),s=Object.keys(e);if(o.length!==s.length)return!1;let r=new Set(s);return!o.some(a=>!r.has(a)||!C_(i[a],e[a],t+1,n))},Rw={maxDepth:3,strict:!0},C_=(i,e,t,n)=>{let{strict:o,maxDepth:s}=n,r=Pt(i,!0),a=Pt(e,!0),l=o?r===a:r==a;switch(!0){case l:case t>=s:return!0;case(z(r)&&z(a)):return Pz(r,a,t,n);case(Array.isArray(r)&&Array.isArray(a)):return Fz(r,a,t,n);default:return!1}},Ee=function(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Rw,n=I({},Rw,t);return C_(i,e,0,n)};var x_="dx-",Bh=null;function Pw(i){try{return new CSSStyleSheet}catch{let t=i.ownerDocument.createElement("style");return i.appendChild(t),t.sheet}}function kw(i,e,t){for(let n=0;n<e.length;n++){let o=e[n];try{for(let s=0;s<o.cssRules.length;s++)kz(i,o.cssRules[s],t)}catch{}}}function kz(i,e,t){var n,o,s,r;(t||((n=e.selectorText)===null||n===void 0?void 0:n.includes(x_))||((o=e.cssRules)===null||o===void 0||(o=o[0])===null||o===void 0||(o=o.selectorText)===null||o===void 0?void 0:o.includes(x_))||((s=e.name)===null||s===void 0?void 0:s.startsWith(x_))||((r=e.style)===null||r===void 0?void 0:r.fontFamily)==="DXIcons")&&i.insertRule(e.cssText,i.cssRules.length)}function Bw(i){var e;let t=i.get(0),n=(e=t.getRootNode)===null||e===void 0?void 0:e.call(t);if(!(n!=null&&n.host))return;Bh||(Bh=Pw(n),kw(Bh,t.ownerDocument.styleSheets,!1));let o=Pw(n);kw(o,n.styleSheets,!0),n.adoptedStyleSheets=[Bh,o]}function Bz(i,e,t){var n;let o=(n=i.getBoundingClientRect)===null||n===void 0?void 0:n.call(i);return o&&e>=o.left&&e<o.right&&t>=o.top&&t<o.bottom}function Vz(){let i=0,e=[];return{push(t){return e.push(t),this},shift(){return i++,e[i-1]},get length(){return e.length-i},get items(){return e}}}function Vw(i,e,t){let n=Vz().push(t);for(;n.length;){let s=n.shift();for(let r=0;r<s.childNodes.length;r++){let a=s.childNodes[r];a.nodeType===Node.ELEMENT_NODE&&Bz(a,i,e)&&getComputedStyle(a).pointerEvents!=="none"&&n.push(a)}}let o=n.items.reverse();return o.pop(),o}var Lz={querySelectorAll:(i,e)=>i.querySelectorAll(e),elementMatches(i,e){return(i.matches||i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector||(n=>{let o=i.document||i.ownerDocument;if(!o)return!1;let s=this.querySelectorAll(o,n);for(let r=0;r<s.length;r++)if(s[r]===i)return!0})).call(i,e)},createElement(i,e){return e=e||this._document,e.createElement(i)},createElementNS(i,e,t){return t=t||this._document,t.createElementNS(i,e)},createTextNode(i,e){return e=e||this._document,e.createTextNode(i)},createAttribute(i,e){return e=e||this._document,e.createAttribute(i)},isNode:i=>i&&typeof i=="object"&&"nodeType"in i&&"nodeName"in i,isElementNode:i=>i&&i.nodeType===1,isTextNode:i=>i&&i.nodeType===3,isDocument:i=>i&&i.nodeType===9,isDocumentFragment:i=>i&&i.nodeType===11,removeElement(i){let e=i&&i.parentNode;e&&e.removeChild(i)},insertElement(i,e,t){i&&e&&i!==e&&(t?i.insertBefore(e,t):i.appendChild(e))},getAttribute:(i,e)=>i.getAttribute(e),setAttribute(i,e,t){e==="style"?i.style.cssText=t:i.setAttribute(e,t)},removeAttribute(i,e){i.removeAttribute(e)},setProperty(i,e,t){i[e]=t},setText(i,e){i&&(i.textContent=e)},setClass(i,e,t){i.nodeType===1&&e&&(t?i.classList.add(e):i.classList.remove(e))},setStyle(i,e,t){i.style[e]=t||""},_document:typeof document>"u"?void 0:document,getDocument(){return this._document},getActiveElement(i){return this.getRootNode(i).activeElement},getRootNode(i){var e;return(i==null||(e=i.getRootNode)===null||e===void 0?void 0:e.call(i))??this._document},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(i){return i in this._document},listen(i,e,t,n){return!i||!("addEventListener"in i)?E:(i.addEventListener(e,t,n),()=>{i.removeEventListener(e,t)})},elementsFromPoint(i,e,t){let n=this.getRootNode(t);return n.host?Vw(i,e,n):n.elementsFromPoint(i,e)}},S=Lt(Lz);var wr=class{constructor(){this.memory=[],this.callbacks=ge()}add(e){x(this.memory,(t,n)=>e.apply(e,n)),this.callbacks.add(e)}remove(e){this.callbacks.remove(e)}fire(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.memory.push(t),this.callbacks.fire.apply(this.callbacks,t)}};var ac=new wr;var gl=i=>{var e,t;let n=i.originalEvent;if(!n)return i.target;if(!!!(!((e=n.target)===null||e===void 0)&&e.shadowRoot))return n.target;let s=n.path??((t=n.composedPath)===null||t===void 0?void 0:t.call(n));return s?.[0]??i.target};var Nz=typeof window<"u",j=()=>Nz,ma=j()?window:void 0;ma||(ma={},ma.window=ma);var q=()=>ma;var v_=i=>j()&&i in ma,lc=i=>i<768?"xs":i<992?"sm":i<1200?"md":"lg",Vh=i=>{let e=i||lc,t=S.getDocumentElement().clientWidth;return e(t)},Bs=()=>j()?ma.navigator:{userAgent:""};var Hz=["pageX","pageY","screenX","screenY","clientX","clientY"],$z=function(i,e){if(e[i]&&!e.touches||!e.touches)return e[i];let t=e.touches.length?e.touches:e.changedTouches;if(t.length)return t[0][i]};function Lw(i){Hz.forEach(function(e){i(e,function(t){return $z(e,t)})},this)}var zz=function(i){let e,t=function(){return e=i.apply(this,arguments),t=function(){return e},e};return function(){return t.apply(this,arguments)}},dn=zz;var O_=q(),Lh="dxEmptyEventType",Nw={mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},Wz={focusin:"focus",focusout:"blur"},Gz=["blur","focus","load"],Ww=["touchmove","wheel","mousewheel","touchstart"],jz=["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 Kz(i,e){return!Ue(i)&&i.nodeName!=="#document"&&S.elementMatches(i,e)}var b_=new WeakMap,Gw=0,Nh,Sr=function(){let i={};return ac.add(function(e,t){i[e]=t}),{getField:function(e,t){return i[e]&&i[e][t]},callMethod:function(e,t,n,o){return i[e]&&i[e][t]&&i[e][t].apply(n,o)}}}(),Ht=Lt({on:dc(y_(zw(function(i,e,t,n,o){ml(i,e).addHandler(o,t,n)}))),one:dc(y_(function(i,e,t,n,o){let s=function(){Ht.off(i,e,t,s),o.apply(this,arguments)};Ht.on(i,e,t,n,s)})),off:dc(Yz(zw(function(i,e,t,n){ml(i,e).removeHandler(n,t)}))),trigger:dc($w(function(i,e,t){let n=e.type,o=ml(i,e.type);if(Sr.callMethod(n,"trigger",i,[e,t]),o.callHandlers(e,t),!(Sr.getField(n,"noBubble")||e.isPropagationStopped()||Gz.indexOf(n)!==-1)){let r=[],a=function(d){let c=d.parentNode??(z(d.host)?d.host:null);c&&(r.push(c),a(c))};a(i),r.push(O_);let l=0;for(;r[l]&&!e.isPropagationStopped();)ml(r[l],e.type).callHandlers(m(e,{currentTarget:r[l]}),t),l++}(i.nodeType||Ue(i))&&(Sr.callMethod(n,"_default",i,[e,t]),Qz(n,i))})),triggerHandler:dc($w(function(i,e,t){ml(i,e.type).callHandlers(e,t)}))});function E_(i,e){let t=i[0];if(t)if(S.isNode(t)||Ue(t))e.apply(Ht,i);else if(!B(t)&&"length"in t){let n=Array.prototype.slice.call(i,0);Array.prototype.forEach.call(t,function(o){n[0]=o,E_(n,e)})}else throw me.Error("E0025")}function dc(i){return function(){E_(arguments,i)}}function Uz(){let i=!1;try{let e=Object.defineProperty({},"passive",{get:function(){return i=!0,!0}});O_.addEventListener("test",null,e)}catch{}return i}var jw=dn(Uz),Kw=(i,e)=>Ue(i)?Kw(i.document,e):i.contains?i.contains(e):!!(e.compareDocumentPosition(i)&e.DOCUMENT_POSITION_CONTAINS);function ml(i,e){let t=b_.get(i);e=e||"";let n=e.split("."),o=n.slice(1),s=!!n[0];e=n[0]||Lh,t||(t={},b_.set(i,t)),t[e]||(t[e]={handleObjects:[],nativeHandler:null});let r=t[e];return{addHandler:function(a,l,d){let c=function(v,b){let T=[v],M=v.currentTarget,G=v.relatedTarget,te,oe;e in Nw&&(te=G&&M&&(G===M||Kw(M,G))),b!==void 0&&T.push(b),Sr.callMethod(e,"handle",i,[v,d]),te||(oe=a.apply(M,T)),oe===!1&&(v.preventDefault(),v.stopPropagation())},h={handler:a,wrappedHandler:function(v,b){if(!(Nh&&v.type===Nh))if(v.data=d,v.delegateTarget=i,l){let M=v.target;for(;M&&M!==i;)Kz(M,l)&&(v.currentTarget=M,c(v,b)),M=M.parentNode}else{var T;if(v.currentTarget=v.delegateTarget||v.target,!!(!((T=v.target)===null||T===void 0)&&T.shadowRoot)){let G=gl(v);v.target=G}c(v,b)}},selector:l,type:e,data:d,namespace:o.join("."),namespaces:o,guid:++Gw};r.handleObjects.push(h);let g=r.handleObjects.length===1&&s,C;g&&(g=!Sr.callMethod(e,"setup",i,[d,o,a])),g&&(r.nativeHandler=qz(e),jw()&&Ww.indexOf(e)>-1&&(C={passive:!1}),r.removeListener=S.listen(i,Nw[e]||e,r.nativeHandler,C)),Sr.callMethod(e,"add",i,[h])},removeHandler:function(a,l){let d=function(h){let p=t[h];if(!p.handleObjects.length){delete t[h];return}let g;p.handleObjects=p.handleObjects.filter(function(b){let T=o.length&&!Hw(b.namespaces,o)||a&&b.handler!==a||l&&b.selector!==l;return T||(g=b.handler,Sr.callMethod(h,"remove",i,[b])),T}),!p.handleObjects.length&&h!==Lh&&(Sr.callMethod(h,"teardown",i,[o,g]),p.nativeHandler&&p.removeListener(),delete t[h])};if(s)d(e);else for(let h in t)d(h);Object.keys(t).length===0&&b_.delete(i)},callHandlers:function(a,l){let d=!1,c=function(h){d||(!o.length||Hw(h.namespaces,o))&&(h.wrappedHandler(a,l),d=a.isImmediatePropagationStopped())};r.handleObjects.forEach(c),o.length&&t[Lh]&&t[Lh].handleObjects.forEach(c)}}}function qz(i){return function(e,t){let n=ml(this,i);e=Ht.Event(e),n.callHandlers(e,t)}}function Hw(i,e){for(let t=0;t<e.length;t++)if(i.indexOf(e[t])<0)return!1;return!0}function y_(i){return function(e,t,n,o,s){s||(s=o,o=void 0),typeof n!="string"&&(o=n,n=void 0),!s&&typeof t=="string"&&(s=o||n,n=void 0,o=void 0),i(e,t,n,o,s)}}function Yz(i){return function(e,t,n,o){typeof n=="function"&&(o=n,n=void 0),i(e,t,n,o)}}function $w(i){return function(e,t,n){typeof t=="string"&&(t={type:t}),t.target||(t.target=e),t.currentTarget=e,t.delegateTarget||(t.delegateTarget=e),!t.type&&t.originalEvent&&(t.type=t.originalEvent.type),i(e,t instanceof Ht.Event?t:Ht.Event(t),n)}}function Xz(i){return Ht.Event=function(e,t){if(!(this instanceof Ht.Event))return new Ht.Event(e,t);e||(e={}),typeof e=="string"&&(e={type:e}),t||(t={}),i.call(this,e,t)},Object.assign(Ht.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()}}),Ht.Event}function zw(i){let e=function(t,n){if(n&&n.indexOf(" ")>-1){let o=Array.prototype.slice.call(arguments,0);n.split(" ").forEach(function(s){o[1]=s,i.apply(this,o)})}else i.apply(this,arguments)};return function(t,n){if(typeof n=="object"){let o=Array.prototype.slice.call(arguments,0);for(let s in n)o[1]=s,o[o.length-1]=n[s],e.apply(this,o)}else e.apply(this,arguments)}}function Qz(i,e){let t=Wz[i]||i;(function(n,o){return n==="click"&&o.localName==="a"})(i,e)||A(e[t])&&(Nh=i,e[t](),Nh=void 0)}function Zz(i){return function(e){return e.which==null&&e.type.indexOf("key")===0}(i)?i.charCode!=null?i.charCode:i.keyCode:function(e){return!e.which&&e.button!==void 0&&/^(?:mouse|pointer|contextmenu|drag|drop)|click/.test(e.type)}(i)?{1:1,2:3,3:1,4:2}[i.button]:i.which}function Uw(i){i&&(Ht.Event=i,Ht.Event.prototype=i.prototype)}Uw(Xz(function(i,e){var t;i instanceof Ht.Event||j()&&i instanceof O_.Event||((t=i.view)===null||t===void 0?void 0:t.Event)&&i instanceof i.view.Event?(this.originalEvent=i,this.type=i.type,this.currentTarget=void 0,Object.prototype.hasOwnProperty.call(i,"isTrusted")&&(this.isTrusted=i.isTrusted),this.timeStamp=i.timeStamp||Date.now()):Object.assign(this,i),w_("which",Zz,this),i.type.indexOf("touch")===0&&(delete e.pageX,delete e.pageY),Object.assign(this,e),this.guid=++Gw}));function w_(i,e,t){Object.defineProperty(t||Ht.Event.prototype,i,{enumerable:!0,configurable:!0,get:function(){return this.originalEvent&&e(this.originalEvent)},set:function(n){Object.defineProperty(this,i,{enumerable:!0,configurable:!0,writable:!0,value:n})}})}jz.forEach(i=>w_(i,e=>e[i]));Lw(w_);var qw=ge(),Yw=ge();Ht.set=function(i){qw.fire(),Ht.inject(i),Uw(i.Event),Yw.fire()};Ht.subscribeGlobal=function(){E_(arguments,y_(function(){let i=arguments;Ht.on.apply(this,i),qw.add(function(){let e=Array.prototype.slice.call(i,0);e.splice(3,1),Ht.off.apply(this,e)}),Yw.add(function(){Ht.on.apply(this,i)})}))};Ht.forcePassiveFalseEventNames=Ww;Ht.passiveEventHandlersSupported=jw;var _=Ht;var Ooe=_.on,Xw=_.one,Eoe=_.off,woe=_.trigger,S_=_.triggerHandler,Soe=_.Event;var cc=new WeakMap,fa,Jz=new wr,Qw=function(){},eW=function(){},tW=function(i){Jz.fire(i),fa=i;let e=fa.cleanData;fa.cleanData=function(t){Qw(t);let n=e.call(this,t);return eW(t),n}};tW({data:function(){let i=arguments[0],e=arguments[1],t=arguments[2];if(!i)return;let n=cc.get(i);return n||(n={},cc.set(i,n)),e===void 0?n:arguments.length===2?n[e]:(n[e]=t,t)},removeData:function(i,e){if(i)if(e===void 0)cc.delete(i);else{let t=cc.get(i);t&&delete t[e]}},cleanData:function(i){for(let e=0;e<i.length;e++)_.off(i[e]),cc.delete(i[e])}});function Xe(){return fa.data.apply(this,arguments)}function Zw(i){Qw=i}function Ir(i,e){return fa.removeData.call(this,i,e)}function Dr(i,e){if(!S.isElementNode(i))return;let t=i.getElementsByTagName("*");fa.cleanData(t),e&&fa.cleanData([i])}var Jw=function(i){return i==null?"":String(i)},I_=function(i){return Jw(i).charAt(0).toUpperCase()+i.substr(1)},D_=function(i){return Jw(i).replace(/([a-z\d])([A-Z])/g,"$1 $2").split(/[\s_-]+/)},uc=function(i){return qe(D_(i),function(e){return e.toLowerCase()}).join("-")};var ki=function(i,e){return qe(D_(i),function(t,n){return t=t.toLowerCase(),(e||n>0)&&(t=I_(t)),t}).join("")},eS=function(i){return I_(uc(i).replace(/-/g," "))},Tr=function(i){return qe(D_(i),function(e){return I_(e.toLowerCase())}).join(" ")},iW=["0","1","2","3","4","5","6","7","8","9"],to=function(i){let e=[],t,n,o=!1,s=!1;for(t=0;t<i.length;t++)n=i.charAt(t),s=n===n.toUpperCase()&&n!=="-"&&n!==")"&&n!=="/"||n in iW,n==="_"||n==="."?(n=" ",s=!0):t===0?(n=n.toUpperCase(),s=!0):!o&&s&&e.length>0&&e.push(" "),e.push(n),o=s;return e.join("")};var Hh=["","Webkit","Moz","O","Ms"],nW={"":"",Webkit:"-webkit-",Moz:"-moz-",O:"-o-",ms:"-ms-"},T_=dn(function(){return S.createElement("dx").style}),oW=function(i,e){i=ki(i,!0);let t;for(let n=0,o=Hh.length;n<o;n++){let s=Hh[n],r=s+i,a=ki(r);if(t=e(a,s),t===void 0&&(t=e(r,s)),t!==void 0)break}return t||""},Do=function(i){if(i in T_())return i;let e=i;i=i.charAt(0).toUpperCase()+i.substr(1);for(let t=1;t<Hh.length;t++){let n=Hh[t].toLowerCase()+i;if(n in T_())return n}return e},fl=function(i){return oW(i,function(e,t){if(e in T_())return nW[t]})},sW=["fillOpacity","columnCount","flexGrow","flexShrink","fontWeight","lineHeight","opacity","zIndex","zoom"];var Vs=function(i,e){return Oe(e)&&sW.indexOf(i)===-1&&(e+="px"),e},tS=function(i,e,t){if(i){t=Oe(t)?t+="px":t;for(let n=0;n<i.length;++n)i[n].style[e]=t}},hc=function(i,e){tS(i,"width",e)},$h=function(i,e){tS(i,"height",e)},zh=function(i,e){(arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0)&&[].slice.call(i.style).forEach(o=>{i.style.removeProperty(o)}),e.split(";").forEach(n=>{let o=n.split(":").map(s=>s.trim());if(o.length===2){let[s,r]=o;i.style[s]=r}})};var Wh=q(),rW=["auto","none","inherit","initial"],A_=function(i,e){let t=0;return e.forEach(function(n){t+=parseFloat(i[n])||0}),t},Gh=function(i,e){let t=i==="width"?"Left":"Top",n=i==="width"?"Right":"Bottom";return{padding:A_(e,["padding"+t,"padding"+n]),border:A_(e,["border"+t+"Width","border"+n+"Width"]),margin:A_(e,["margin"+t,"margin"+n])}},nS=function(i){var e;let t=(i==null||(e=i.ownerDocument)===null||e===void 0?void 0:e.defaultView)||Wh;return t.getComputedStyle&&t.getComputedStyle(i)},M_=function(i,e,t,n){var o;return e?.[t]||((o=i.style)===null||o===void 0?void 0:o[t])||n},_l={content:0,padding:1,border:2,margin:3,"content-box":0,"border-box":2},iS={width:["left","right"],height:["top","bottom"]};function pc(i,e,t,n){let o=(r,a,l)=>parseFloat(M_(r,a,l,"0"))||0,s=t==="border"?"-width":"";return o(i,n,`${t}-${iS[e][0]}${s}`)+o(i,n,`${t}-${iS[e][1]}${s}`)}var aW=function(i,e,t){let n=e==="width"?"offsetWidth":"offsetHeight",o=nS(i),s=M_(i,o,e);(s===""||s==="auto")&&(s=i[n]),s=parseFloat(s)||0;let r=M_(i,o,"boxSizing","content-box"),l=_l[t||r],d=_l[r];if(l===void 0||d===void 0)throw new Error;if(d===l)return s;let c=Math.sign(l-d),h=!1,p=!1,g=!1,C=!1;c===1&&(l+=1,d+=1);for(let v=d;v!==l;v+=c)switch(v){case _l.content:break;case _l.padding:h=c*pc(i,e,"padding",o);break;case _l.border:p=c*pc(i,e,"border",o);break;case _l.margin:g=c*pc(i,e,"margin",o)}if(h||p){let v=(h===!1?c*pc(i,e,"padding",o):h)+(p===!1?c*pc(i,e,"border",o):p);C=c*Math.max(0,Math.floor(i[n]-s-c*v))||0}return s+g+h+p+C},lW=function(i){return Ue(i)?i.innerHeight:i.offsetHeight},F_=function(i,e,t){return i.indexOf("px")>0?i=parseInt(i.replace("px","")):i.indexOf("%")>0?i=parseInt(i.replace("%",""))*lW(e)/100:isNaN(i)?i.indexOf("vh")>0?i=Wh.innerHeight/100*parseInt(i.replace("vh","")):t&&i.indexOf("em")>0&&(i=parseFloat(i.replace("em",""))*parseFloat(Wh.getComputedStyle(t).fontSize)):i=parseInt(i),i},oS=function(i,e,t){if(!i)return null;if(rW.indexOf(i)>-1)return e?null:i;if(B(i)&&(i=F_(i,t)),Oe(i))return Math.max(0,i+e);let n=e<0?" - ":" ";return"calc("+i+n+Math.abs(e)+"px)"},sS=function(i,e,t){let n=oS(i,e,t);return n!==null?n:"none"},rS=function(i,e,t){let n=oS(i,e,t);return n!==null?n:0},Ar=function(i,e){if(!i)return 0;let t=Gh("height",Wh.getComputedStyle(i));return t.padding+t.border+(e?t.margin:0)},P_=function(i){if(i){var e;let t=(e=i.getBoundingClientRect)===null||e===void 0?void 0:e.call(i);if(t!=null&&t.height)return t.height}return 0},ts={getWidth:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("width",...e)},setWidth:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("width",...e)},getHeight:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("height",...e)},setHeight:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("height",...e)},getOuterWidth:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("outerWidth",...e)},setOuterWidth:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("outerWidth",...e)},getOuterHeight:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("outerHeight",...e)},setOuterHeight:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("outerHeight",...e)},getInnerWidth:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("innerWidth",...e)},setInnerWidth:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("innerWidth",...e)},getInnerHeight:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("innerHeight",...e)},setInnerHeight:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return io("innerHeight",...e)}};function io(i,e,t){return arguments.length===2?R_(e,i):R_(e,i,t)}var W=i=>ts.getWidth(i),is=(i,e)=>ts.setWidth(i,e),Q=i=>ts.getHeight(i),Bi=(i,e)=>ts.setHeight(i,e),ae=(i,e)=>ts.getOuterWidth(i,e||!1),gc=(i,e)=>ts.setOuterWidth(i,e),ee=(i,e)=>ts.getOuterHeight(i,e||!1),k_=(i,e)=>ts.setOuterHeight(i,e),Cl=i=>ts.getInnerWidth(i);var _a=i=>ts.getInnerHeight(i);var R_=function(i,e,t){let n=e.toLowerCase().indexOf("width")>=0?"Width":"Height",o=n.toLowerCase(),s=e.indexOf("outer")===0,r=e.indexOf("inner")===0,a=arguments.length===2||typeof t=="boolean";if(si(i)){if(i.length>1&&!a){for(let l=0;l<i.length;l++)R_(i[l],e,t);return}i=i[0]}if(i){if(Ue(i))return s?i["inner"+n]:S.getDocumentElement()["client"+n];if(S.isDocument(i)){let l=S.getDocumentElement(),d=S.getBody();return Math.max(d["scroll"+n],d["offset"+n],l["scroll"+n],l["offset"+n],l["client"+n])}if(a){let l="content";return s&&(l=t?"margin":"border"),r&&(l="padding"),aW(i,o,l)}if(Oe(t)){let l=nS(i),d=Gh(o,l),c=l.boxSizing==="border-box";t=Number(t),s?t-=c?0:d.border+d.padding:r?t+=c?d.border:-d.padding:c&&(t+=d.border+d.padding)}return t+=Oe(t)?"px":"",S.setStyle(i,o,t),null}},B_=i=>Ue(i)?i:i.defaultView,xl=i=>{var e,t;if(!((e=i.getClientRects)!==null&&e!==void 0&&e.call(i).length))return{top:0,left:0};let n=(t=i.getBoundingClientRect)===null||t===void 0?void 0:t.call(i),o=B_(i.ownerDocument),s=i.ownerDocument.documentElement;return{top:n.top+o.pageYOffset-s.clientTop,left:n.left+o.pageXOffset-s.clientLeft}};var aS=/<([a-z][^/\0>\x20\t\r\n\f]+)/i,ns={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>"}};ns.tbody=ns.colgroup=ns.caption=ns.tfoot=ns.thead;ns.th=ns.td;var mc=function(i){if(typeof i!="string")return null;let t=S.createDocumentFragment().appendChild(S.createElement("div")),n=aS.exec(i),o=n&&n[1].toLowerCase(),s=ns[o]||ns.default;t.innerHTML=s.startTags+i+s.endTags;for(let r=0;r<s.tagsCount;r++)t=t.lastChild;return[...t.childNodes]},lS=function(i){let e=aS.exec(i);return e&&e[1]in ns};var dW=q(),ze,ve=function(i,e){return i?typeof i=="string"?i==="body"?(this[0]=e?e.body:S.getBody(),this.length=1,this):(e=e||S.getDocument(),i[0]==="<"?(this[0]=S.createElement(i.slice(1,-1),e),this.length=1,this):([].push.apply(this,S.querySelectorAll(e,i)),this)):S.isNode(i)||Ue(i)?(this[0]=i,this.length=1,this):Array.isArray(i)?([].push.apply(this,i),this):ze(i.toArray?i.toArray():[i]):(this.length=0,this)};ze=function(i,e){return new ve(i,e)};ze.fn={dxRenderer:!0};ve.prototype=ze.fn;var vl=function(i,e){for(let t=0;t<this.length;t++){let n=ze(this[t]);n[i].apply(n,e)}return this},V_=function(i,e,t){t!=null&&t!==!1?S.setAttribute(i,e,t):S.removeAttribute(i,e)};ve.prototype.show=function(){return this.toggle(!0)};ve.prototype.hide=function(){return this.toggle(!1)};ve.prototype.toggle=function(i){return this[0]&&this.toggleClass("dx-state-invisible",!i),this};ve.prototype.attr=function(i,e){if(this.length>1&&arguments.length>1)return vl.call(this,"attr",arguments);if(!this[0])return z(i)||e!==void 0?this:void 0;if(!this[0].getAttribute)return this.prop(i,e);if(typeof i=="string"&&arguments.length===1){let t=this[0].getAttribute(i);return t??void 0}else if(X(i))for(let t in i)this.attr(t,i[t]);else V_(this[0],i,e);return this};ve.prototype.removeAttr=function(i){return this.each(function(e,t){S.removeAttribute(t,i)}),this};ve.prototype.prop=function(i,e){if(!this[0])return this;if(typeof i=="string"&&arguments.length===1)return this[0][i];if(X(i))for(let t in i)this.prop(t,i[t]);else S.setProperty(this[0],i,e);return this};ve.prototype.addClass=function(i){return this.toggleClass(i,!0)};ve.prototype.removeClass=function(i){return this.toggleClass(i,!1)};ve.prototype.hasClass=function(i){if(!this[0]||this[0].className===void 0)return!1;let e=i.split(" ");for(let t=0;t<e.length;t++)if(this[0].classList){if(this[0].classList.contains(e[t]))return!0}else if(((B(this[0].className)?this[0].className:S.getAttribute(this[0],"class"))||"").split(" ").indexOf(e[t])>=0)return!0;return!1};ve.prototype.toggleClass=function(i,e){if(this.length>1)return vl.call(this,"toggleClass",arguments);if(!this[0]||!i)return this;e=e===void 0?!this.hasClass(i):e;let t=i.split(" ");for(let n=0;n<t.length;n++)S.setClass(this[0],t[n],e);return this};ve.prototype.html=function(i){return arguments.length?(this.empty(),typeof i=="string"&&!lS(i)||typeof i=="number"?(this[0].innerHTML=i,this):this.append(mc(i))):this[0].innerHTML};var uS=function(i,e){if(!(!this[0]||!i)){typeof i=="string"?i=mc(i):i.nodeType?i=[i]:Oe(i)&&(i=[S.createTextNode(i)]);for(let t=0;t<i.length;t++){let n=i[t],o=this[0];o.tagName==="TABLE"&&n.tagName==="TR"&&o.tBodies&&o.tBodies.length&&(o=o.tBodies[0]),S.insertElement(o,n.nodeType?n:n[0],e)}}},dS=function(i,e){if(!(!this[0]||!this[0].style)&&!(e===null||typeof e=="number"&&isNaN(e))){i=Do(i);for(let t=0;t<this.length;t++)this[t].style[i]=Vs(i,e)}};ve.prototype.css=function(i,e){if(B(i))if(arguments.length===2)dS.call(this,i,e);else{if(!this[0])return;i=Do(i);let t=dW.getComputedStyle(this[0])[i]||this[0].style[i];return Oe(t)?t.toString():t}else if(X(i))for(let t in i)dS.call(this,t,i[t]);return this};ve.prototype.prepend=function(i){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.prepend(arguments[e]);return this}return uS.apply(this,[i,this[0].firstChild]),this};ve.prototype.append=function(i){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.append(arguments[e]);return this}return uS.apply(this,[i]),this};ve.prototype.prependTo=function(i){if(this.length>1){for(let e=this.length-1;e>=0;e--)ze(this[e]).prependTo(i);return this}return i=ze(i),i[0]&&S.insertElement(i[0],this[0],i[0].firstChild),this};ve.prototype.appendTo=function(i){return this.length>1?vl.call(this,"appendTo",arguments):(S.insertElement(ze(i)[0],this[0]),this)};ve.prototype.insertBefore=function(i){return i&&i[0]&&S.insertElement(i[0].parentNode,this[0],i[0]),this};ve.prototype.insertAfter=function(i){return i&&i[0]&&S.insertElement(i[0].parentNode,this[0],i[0].nextSibling),this};ve.prototype.before=function(i){return this[0]&&S.insertElement(this[0].parentNode,i[0],this[0]),this};ve.prototype.after=function(i){return this[0]&&S.insertElement(this[0].parentNode,i[0],this[0].nextSibling),this};ve.prototype.wrap=function(i){if(this[0]){let e=ze(i);e.insertBefore(this),e.append(this)}return this};ve.prototype.wrapInner=function(i){let e=this.contents();return e.length?e.wrap(i):this.append(i),this};ve.prototype.replaceWith=function(i){if(i&&i[0])return i.is(this)?this:(i.insertBefore(this),this.remove(),i)};ve.prototype.remove=function(){return this.length>1?vl.call(this,"remove",arguments):(Dr(this[0],!0),S.removeElement(this[0]),this)};ve.prototype.detach=function(){return this.length>1?vl.call(this,"detach",arguments):(S.removeElement(this[0]),this)};ve.prototype.empty=function(){return this.length>1?vl.call(this,"empty",arguments):(Dr(this[0]),S.setText(this[0],""),this)};ve.prototype.clone=function(){let i=[];for(let e=0;e<this.length;e++)i.push(this[e].cloneNode(!0));return ze(i)};ve.prototype.text=function(i){if(!arguments.length){let t="";for(let n=0;n<this.length;n++)t+=this[n]&&this[n].textContent||"";return t}let e=A(i)?i():i;return Dr(this[0],!1),S.setText(this[0],f(e)?e:""),this};ve.prototype.val=function(i){return arguments.length===1?this.prop("value",f(i)?i:""):this.prop("value")};ve.prototype.contents=function(){if(!this[0])return ze();let i=[];return i.push.apply(i,this[0].childNodes),ze(i)};ve.prototype.find=function(i){let e=ze();if(!i)return e;let t=[],n;if(typeof i=="string")for(i=i.trim(),n=0;n<this.length;n++){let o=this[n];if(S.isElementNode(o)){let s=o.getAttribute("id"),r=s||"dx-query-children";s||V_(o,"id",r),r="[id='"+r+"'] ";let a=r+i.replace(/([^\\])(,)/g,"$1, "+r);t.push.apply(t,S.querySelectorAll(o,a)),V_(o,"id",s)}else(S.isDocument(o)||S.isDocumentFragment(o))&&t.push.apply(t,S.querySelectorAll(o,i))}else for(n=0;n<this.length;n++)i=S.isNode(i)?i:i[0],this[n]!==i&&this[n].contains(i)&&t.push(i);return e.add(t)};var cS=function(i,e){var t,n;return e=e.host??e,e.nodeType?!!(e.offsetWidth||e.offsetHeight||(t=(n=e).getClientRects)!==null&&t!==void 0&&t.call(n).length):!0};ve.prototype.filter=function(i){if(!i)return ze();if(i===":visible")return this.filter(cS);if(i===":hidden")return this.filter(function(t,n){return!cS(0,n)});let e=[];for(let t=0;t<this.length;t++){let n=this[t];if(S.isElementNode(n)&&Ii(i)==="string")S.elementMatches(n,i)&&e.push(n);else if(S.isNode(i)||Ue(i))i===n&&e.push(n);else if(A(i))i.call(n,t,n)&&e.push(n);else for(let o=0;o<i.length;o++)i[o]===n&&e.push(n)}return ze(e)};ve.prototype.not=function(i){let e=[],t=this.filter(i).toArray();for(let n=0;n<this.length;n++)t.indexOf(this[n])===-1&&e.push(this[n]);return ze(e)};ve.prototype.is=function(i){return!!this.filter(i).length};ve.prototype.children=function(i){let e=[];for(let t=0;t<this.length;t++){let n=this[t]?this[t].childNodes:[];for(let o=0;o<n.length;o++)S.isElementNode(n[o])&&e.push(n[o])}return e=ze(e),i?e.filter(i):e};ve.prototype.siblings=function(){let i=this[0];if(!i||!i.parentNode)return ze();let e=[],t=i.parentNode.childNodes||[];for(let n=0;n<t.length;n++){let o=t[n];S.isElementNode(o)&&o!==i&&e.push(o)}return ze(e)};ve.prototype.each=function(i){for(let e=0;e<this.length&&i.call(this[e],e,this[e])!==!1;e++);};ve.prototype.index=function(i){return i?(i=ze(i),this.toArray().indexOf(i[0])):this.parent().children().index(this)};ve.prototype.get=function(i){return this[i<0?this.length+i:i]};ve.prototype.eq=function(i){return i=i<0?this.length+i:i,ze(this[i])};ve.prototype.first=function(){return this.eq(0)};ve.prototype.last=function(){return this.eq(-1)};ve.prototype.select=function(){for(let i=0;i<this.length;i+=1)this[i].select&&this[i].select();return this};ve.prototype.parent=function(i){if(!this[0])return ze();let e=ze(this[0].parentNode);return!i||e.is(i)?e:ze()};ve.prototype.parents=function(i){let e=[],t=this.parent();for(;t&&t[0]&&!S.isDocument(t[0]);)S.isElementNode(t[0])&&(!i||t.is(i))&&e.push(t.get(0)),t=t.parent();return ze(e)};ve.prototype.closest=function(i){if(this.is(i))return this;let e=this.parent();for(;e&&e.length;){if(e.is(i))return e;e=e.parent()}return ze()};ve.prototype.next=function(i){if(!this[0])return ze();let e=ze(this[0].nextSibling);if(!arguments.length)return e;for(;e&&e.length;){if(e.is(i))return e;e=e.next()}return ze()};ve.prototype.prev=function(){return this[0]?ze(this[0].previousSibling):ze()};ve.prototype.add=function(i){let e=ze(i),t=this.toArray();for(let n=0;n<e.length;n++){let o=e[n];t.indexOf(o)===-1&&t.push(o)}return ze(t)};var L_=[];ve.prototype.splice=function(){return ze(L_.splice.apply(this,arguments))};ve.prototype.slice=function(){return ze(L_.slice.apply(this,arguments))};ve.prototype.toArray=function(){return L_.slice.call(this)};ve.prototype.offset=function(){if(this[0])return xl(this[0])};ve.prototype.offsetParent=function(){if(!this[0])return ze();let i=ze(this[0].offsetParent);for(;i[0]&&i.css("position")==="static";)i=ze(i[0].offsetParent);return i=i[0]?i:ze(S.getDocumentElement()),i};ve.prototype.position=function(){if(!this[0])return;let i,e=parseFloat(this.css("marginTop")),t=parseFloat(this.css("marginLeft"));if(this.css("position")==="fixed")return i=this[0].getBoundingClientRect(),{top:i.top-e,left:i.left-t};i=this.offset();let n=this.offsetParent(),o={top:0,left:0};return n[0].nodeName!=="HTML"&&(o=n.offset()),o={top:o.top+parseFloat(n.css("borderTopWidth")),left:o.left+parseFloat(n.css("borderLeftWidth"))},{top:i.top-o.top-e,left:i.left-o.left-t}};[{name:"scrollLeft",offsetProp:"pageXOffset",scrollWindow:function(i,e){i.scrollTo(e,i.pageYOffset)}},{name:"scrollTop",offsetProp:"pageYOffset",scrollWindow:function(i,e){i.scrollTo(i.pageXOffset,e)}}].forEach(function(i){let e=i.name;ve.prototype[e]=function(t){if(!this[0])return;let n=B_(this[0]);return t===void 0?n?n[i.offsetProp]:this[0][e]:(n?i.scrollWindow(n,t):this[0][e]=t,this)}});ve.prototype.data=function(i,e){if(this[0])return arguments.length<2?Xe.call(ze,this[0],i):(Xe.call(ze,this[0],i,e),this)};ve.prototype.removeData=function(i){return this[0]&&Ir(this[0],i),this};var hS=function(){return ze.apply(this,arguments)};Object.defineProperty(hS,"fn",{enumerable:!0,configurable:!0,get:function(){return ze.fn},set:function(i){ze.fn=i}});var pS={set:function(i){ze=i},get:function(){return hS}};var u=pS.get();var cW=q(),uW={getXhr:function(){return new cW.XMLHttpRequest}},jh=Lt(uW);var N_=[],hW=dn(()=>{let i=S.listen(S.getDocument(),"DOMContentLoaded",()=>{gS.fire(),i()})}),gS={add:i=>{let e=j();e&&S.getReadyState()!=="loading"?i():(N_.push(i),e&&hW())},fire:()=>{N_.forEach(i=>i()),N_=[]}},ri=Lt(gS);var mS=q(),fS=function(i){let e=S.createElement("script");for(let t in i)e[t]=i[t];return e},_S=function(i){return S.getHead().appendChild(i)},CS=function(i){i.parentNode.removeChild(i)},H_=function(i){let e=fS({text:i});_S(e),CS(e)},xS=function(i){let e=fS({src:i});return new Promise(function(t,n){let o={load:t,error:n},s=function(r){o[r.type](),CS(e)};for(let r in o)S.listen(e,r,s);_S(e)})};function Kh(i){return(i.method||"GET").toUpperCase()}var pW=function(i){let e=[];for(let t in i){let n=i[t];n!==void 0&&(n===null&&(n=""),typeof n=="function"&&(n=n()),e.push(encodeURIComponent(t)+"="+encodeURIComponent(n)))}return e.join("&")},gW=function(i){let e;return i.data&&!i.upload&&Kh(i)!=="GET"&&(e="application/x-www-form-urlencoded;charset=utf-8"),i.contentType||e},mW=function(i){let e=i.dataType||"*",t="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:t,script:t};return vw(n,i.accepts,!0),n[e]?n[e]+(e!=="*"?", */*; q=0.01":""):n["*"]},vS=function(i){let e=i.headers||{};return e["Content-Type"]=e["Content-Type"]||gW(i),e.Accept=e.Accept||mW(i),!i.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest"),e},bS=function(i){if(i.dataType==="jsonp"){let e=Math.random().toString().replace(/\D/g,""),t=i.jsonpCallback||"dxCallback"+Date.now()+"_"+e,n=i.jsonp||"callback";return i.data=i.data||{},i.data[n]=t,t}},yS=function(i,e){let t=i.data,n=typeof t=="string",o=i.url||mS.location.href;return!n&&!i.cache&&(t=t||{},t._=Date.now()),t&&!i.upload&&(n||(t=pW(t)),Kh(i)==="GET"?(t!==""&&(o+=(o.indexOf("?")>-1?"&":"?")+t),t=null):e["Content-Type"]&&e["Content-Type"].indexOf("application/x-www-form-urlencoded")>-1&&(t=t.replace(/%20/g,"+"))),{url:o,parameters:t}},OS=function(i){if(!j())return!0;let e=!1,t=S.createElement("a"),n=S.createElement("a");t.href=mS.location.href;try{n.href=i,n.href=n.href,e=t.protocol+"//"+t.host!=n.protocol+"//"+n.host}catch{e=!0}return e};var fW=q(),fc="success",$_="error",_W="timeout",CW="nocontent",xW="parsererror",vW=function(i){return 200<=i&&i<300},bW=function(i){return i!==204},yW=function(i){return i.responseType&&i.responseType!=="text"||typeof i.responseText!="string"?i.response:i.responseText},OW=function(i,e,t){let n=yW(e);switch(t){case"jsonp":H_(n);break;case"script":H_(n),i.resolve(n,fc,e);break;case"json":try{i.resolve(JSON.parse(n),fc,e)}catch(o){i.reject(e,xW,o)}break;default:i.resolve(n,fc,e)}},EW=function(i,e){return i&&setTimeout(function(){e.customStatus=_W,e.abort()},i)},wW=function(i){let e=jh.getXhr(),t=new y,n=t.promise(),o=f(i.async)?i.async:!0,s=i.dataType,r=i.timeout||0,a;i.crossDomain=OS(i.url);let l=s==="jsonp"||s==="script";i.cache===void 0&&(i.cache=!l);let d=bS(i),c=vS(i),h=yS(i,c),p=h.url,g=h.parameters;if(d&&(fW[d]=function(C){t.resolve(C,fc,e)}),i.crossDomain&&l){let C=function(){t.reject(e,$_)},v=function(){s!=="jsonp"&&t.resolve(null,fc,e)};return xS(p).then(v,C),n}if(i.crossDomain&&!("withCredentials"in e))return t.reject(e,$_),n;if(e.open(Kh(i),p,o,i.username,i.password),o&&(e.timeout=r,a=EW(r,e)),e.onreadystatechange=function(C){e.readyState===4&&(clearTimeout(a),vW(e.status)?bW(e.status)?OW(t,e,s):t.resolve(null,CW,e):t.reject(e,e.customStatus||$_))},i.upload&&(e.upload.onprogress=i.upload.onprogress,e.upload.onloadstart=i.upload.onloadstart,e.upload.onabort=i.upload.onabort),i.xhrFields)for(let C in i.xhrFields)e[C]=i.xhrFields[C];i.responseType==="arraybuffer"&&(e.responseType=i.responseType);for(let C in c)Object.prototype.hasOwnProperty.call(c,C)&&f(c[C])&&e.setRequestHeader(C,c[C]);return i.beforeSend&&i.beforeSend(e),e.send(g),n.abort=function(){e.abort()},n},z_=Lt({sendRequest:wW});var se=class{host;setHost(e){this.host=e}setTemplate(e){this.host.setTemplate(e)}};var Uh=class{instance;zone;subscriptions={};events={};constructor(e,t){this.instance=e,this.zone=t}hasEvent(e){return this.getEmitter(e).observers.length!==0}fireEvent(e,t){let n=this.getEmitter(e);n.observers.length&&((this.subscriptions[e]||[]).length===n.observers.length?n.next(t&&t[0]):this.zone.run(()=>n.next(t&&t[0])))}on(e,t){if(typeof e=="string"){let n=this.subscriptions[e]||[],o=this.getEmitter(e).subscribe(t?.bind(this.instance)),s=o.unsubscribe.bind(o);n.push({handler:t,unsubscribe:s}),this.subscriptions[e]=n}else{let n=e;Object.keys(n).forEach(o=>this.on(o,n[o]))}}off(e,t){let n=this.subscriptions[e]||[];t?n.some((o,s)=>o.handler===t?(o.unsubscribe(),n.splice(s,1),!0):!1):(n.forEach(o=>{o.unsubscribe()}),n.splice(0,n.length))}dispose(){}addEmitter(e,t){this.events[e]=t}getEmitter(e){return this.events[e]||(this.events[e]=new vt),this.events[e]}},j_=class{zone;component;lockedValueChangeEvent=!1;constructor(e,t){this.zone=e,this.component=t}fireNgEvent(e,t){if(this.lockedValueChangeEvent&&e==="valueChange")return;let n=this.component[e];n&&n.observers.length&&this.zone.run(()=>{n.next(t&&t[0])})}createEmitters(e){e.forEach(t=>{this.component[t.emit]=new vt})}};var ce=(()=>{class i{_watchers=[];getWatchMethod(){return(n,o,s)=>{let r=n();s=s||{},s.skipImmediate||o(r);let a=()=>{let l=n();this._isDifferentValues(r,l,s.deep)&&(o(l),r=l)};return this._watchers.push(a),()=>{let l=this._watchers.indexOf(a);l!==-1&&this._watchers.splice(l,1)}}}_isDifferentValues(t,n,o){let s=this._toComparable(n),r=this._toComparable(t),a=s instanceof Object&&r instanceof Object;return o&&a?this._checkObjectsFields(n,t):s!==r}_toComparable(t){return t instanceof Date?t.getTime():t}_checkObjectsFields(t,n){for(let o in t){let s=this._toComparable(t[o]),r=this._toComparable(n[o]),a=!1;if(typeof s=="object"&&typeof r=="object"&&(a=Ee(s,r)),s!==r&&!a)return!0}}checkWatchers(){for(let t of this._watchers)t()}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Jd({token:i,factory:i.\u0275fac})}return i})();function wS(i){return i.get?i.get(0):i}var SS="dx-template-wrapper";var IS=(()=>{class i{templateRef;viewContainerRef;renderer;zone;set dxTemplateOf(t){this.name=t}name;constructor(t,n,o,s,r){this.templateRef=t,this.viewContainerRef=n,this.renderer=s,this.zone=r,o.setTemplate(this)}renderTemplate(t){let n=this.viewContainerRef.createEmbeddedView(this.templateRef,{$implicit:t.model,index:t.index}),o=wS(t.container);return t.container&&n.rootNodes.forEach(s=>{this.renderer.appendChild(o,s)}),n}render(t){let n;return this.zone.isStable?n=this.zone.run(()=>this.renderTemplate(t)):n=this.renderTemplate(t),n.detectChanges(),n.rootNodes.forEach(o=>{o.nodeType===1&&S.setClass(o,SS,!0),Xw(o,"dxremove",({},s)=>{(!s||!s._angularIntegration)&&n.destroy()})}),n.rootNodes}static \u0275fac=function(n){return new(n||i)(w(Oh),w(Eh),w(se),w(Fs),w(Ye))};static \u0275dir=ci({type:i,selectors:[["","dxTemplate",""]],inputs:{dxTemplateOf:"dxTemplateOf"},standalone:!1})}return i})(),Se=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var ES="dx-visibility-change-handler",DS=(()=>{class i{_host;_hostOptionPath;_collectionContainerImpl;_initialOptions={};constructor(){this._collectionContainerImpl=new qh(this._setOption.bind(this),this._filterItems.bind(this))}_optionChangedHandler(t){let n=this._fullOptionPath();if(t.fullName.indexOf(n)===0){let o=t.fullName.slice(n.length),s=this[`${o}Change`];s&&s.next(t.value)}}_createEventEmitters(t){t.forEach(n=>{this[n.emit]=new vt})}_getOption(t){return this.isLinked?this.instance.option(this._fullOptionPath()+t):this._initialOptions[t]}_setOption(t,n){if(this.isLinked){let o=this._fullOptionPath()+t;this.instance.option(o,n)}else this._initialOptions[t]=n}_addRemovedOption(t){this.instance&&this.removedNestedComponents&&this.removedNestedComponents.push(t)}_deleteRemovedOptions(t){this.instance&&this.removedNestedComponents&&(this.removedNestedComponents=this.removedNestedComponents.filter(n=>!n.startsWith(t)))}_addRecreatedComponent(){this.instance&&this.recreatedNestedComponents&&this.recreatedNestedComponents.push({getOptionPath:()=>this._getOptionPath()})}_getOptionPath(){return this._hostOptionPath()+this._optionPath}setHost(t,n){this._host=t,this._hostOptionPath=n,this.optionChangedHandlers.subscribe(this._optionChangedHandler.bind(this))}setChildren(t,n){return this.resetOptions(t),this._collectionContainerImpl.setChildren(t,n)}_filterItems(t){return t.filter(n=>n!==this)}get instance(){return this._host&&this._host.instance}get resetOptions(){return this._host&&this._host.resetOptions}get isRecreated(){return this._host&&this._host.isRecreated}get removedNestedComponents(){return this._host&&this._host.removedNestedComponents}set removedNestedComponents(t){this._host.removedNestedComponents=t}get recreatedNestedComponents(){return this._host&&this._host.recreatedNestedComponents}set recreatedNestedComponents(t){this._host.recreatedNestedComponents=t}get isLinked(){return!!this.instance&&this._host.isLinked}get optionChangedHandlers(){return this._host&&this._host.optionChangedHandlers}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),qh=class{_setOption;_filterItems;_activatedQueries={};constructor(e,t){this._setOption=e,this._filterItems=t}setChildren(e,t){if(this._filterItems&&(t=this._filterItems(t)),t.length&&(this._activatedQueries[e]=!0),this._activatedQueries[e]){let n=t.map((o,s)=>(o._index=s,o._value));this._setOption(e,n)}}},ss=(()=>{class i extends DS{setHost(t,n){super.setHost(t,n),this._host[this._optionPath]=this._initialOptions}_fullOptionPath(){return`${this._getOptionPath()}.`}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),Dn=(()=>{class i extends DS{_index;_fullOptionPath(){return`${this._getOptionPath()}[${this._index}].`}get _value(){return this._initialOptions}get isLinked(){return this._index!==void 0&&!!this.instance&&this._host.isLinked}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),SW=function(i){let e=[];u(i).hasClass(ES)||e.push(i),e.push.apply(e,i.querySelectorAll(`.${ES}`));for(let t=0;t<e.length;t++)S_(e[t],"dxshown")};function Yh(i,e,t,n){!i.template===void 0||!e.nativeElement.hasChildNodes()||![].slice.call(e.nativeElement.childNodes).filter(r=>{if(r.tagName){let a=r.tagName.toLowerCase().substr(0,3);return!(a==="dxi"||a==="dxo")}return r.nodeName!=="#comment"&&r.textContent.replace(/\s/g,"").length}).length||(i.template={render:r=>{let a=e.nativeElement;if(S.setClass(a,SS,!0),r.container){let l=wS(r.container),d=l.contains(e.nativeElement);t.appendChild(l,e.nativeElement),d||n.body.contains(l)&&SW(a)}return a}})}var k=class{_host;_optionPath;getHost(){return this._host}setHost(e,t){this._host=e,this._optionPath=t||(()=>"")}setNestedOption(e){e.setHost(this._host,this._optionPath)}};xe({buyNowLink:"https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeAngular.aspx"});var W_,G_=()=>(W_||(W_="DX_isPlatformServer"),W_),ct=(()=>{class i{element;ngZone;watcherHelper;transferState;platformId;_initialOptions={};_optionsToUpdate={};_collectionContainerImpl;eventHelper;optionChangedHandlers=new vt;templates;instance;isLinked=!0;changedOptions={};removedNestedComponents=[];recreatedNestedComponents;widgetUpdateLocked=!1;templateUpdateRequired=!1;_updateTemplates(){if(this.templates.length&&this.templateUpdateRequired){let t={};this.templates.forEach(n=>{t[n.name]=n}),this.instance.option("integrationOptions.templates",t),this.templates=Object.values(t),this.templateUpdateRequired=!1}}_initEvents(){this.instance.on("optionChanged",t=>{this.changedOptions[t.name]=t.value;let n=t.name===t.fullName?t.value:t.component.option(t.name);this.eventHelper.fireNgEvent(`${t.name}Change`,[n]),this.optionChangedHandlers.emit(t)})}_initOptions(){this._initialOptions.integrationOptions.watchMethod=this.watcherHelper.getWatchMethod()}_initPlatform(){this.transferState.hasKey(G_())?this._initialOptions.integrationOptions.renderedOnServer=this.transferState.get(G_(),null):gw(this.platformId)&&this.transferState.set(G_(),!0)}_createEventEmitters(t){let n=this.ngZone;this.eventHelper.createEmitters(t),this._initialOptions.eventsStrategy=o=>{let s=new Uh(o,n);return t.filter(r=>r.subscribe).forEach(r=>{s.addEmitter(r.subscribe,this[r.emit])}),s},this._initialOptions.nestedComponentOptions=function(o){return{eventsStrategy:s=>new Uh(s,n),nestedComponentOptions:o.option("nestedComponentOptions")}}}_shouldOptionChange(t,n){if(this.changedOptions.hasOwnProperty(t)){let o=this.changedOptions[t];return delete this.changedOptions[t],n!==o}return!0}clearChangedOptions(){this.changedOptions={}}_getOption(t){return this.instance?this.instance.option(t):this._initialOptions[t]}lockWidgetUpdate(){!this.widgetUpdateLocked&&this.instance&&(this.instance.beginUpdate(),this.widgetUpdateLocked=!0)}unlockWidgetUpdate(){this.widgetUpdateLocked&&(this.widgetUpdateLocked=!1,this.instance.endUpdate())}_setOption(t,n){this.lockWidgetUpdate(),this._shouldOptionChange(t,n)&&(this.instance?this.instance.option(t,n):this._initialOptions[t]=n)}_createWidget(t){this._initialOptions.integrationOptions={},this._initPlatform(),this._initOptions(),this._initialOptions.onInitializing=function(){this.beginUpdate()},this.instance=this._createInstance(t,this._initialOptions),this._initEvents(),this._initialOptions={}}_destroyWidget(){if(this.removedNestedComponents=[],this.instance){let t=this.instance.element();S_(t,"dxremove",{_angularIntegration:!0}),this.instance.dispose(),S.removeElement(t)}}constructor(t,n,o,s,r,a){this.element=t,this.ngZone=n,this.watcherHelper=s,this.transferState=r,this.platformId=a,this.templates=[],o.setHost(this),this._collectionContainerImpl=new qh(this._setOption.bind(this)),this.eventHelper=new j_(n,this)}ngOnChanges(t){for(let n in t)t[n].currentValue!==this[n]&&(this._optionsToUpdate[n]=t[n].currentValue)}ngOnInit(){this._createWidget(this.element.nativeElement)}ngDoCheck(){this.applyOptions()}ngAfterContentChecked(){this.applyOptions(),this.resetOptions(),this.unlockWidgetUpdate()}ngAfterViewInit(){this._updateTemplates(),this.instance.endUpdate(),this.recreatedNestedComponents=[]}ngAfterViewChecked(){this._updateTemplates()}applyOptions(){Object.keys(this._optionsToUpdate).length&&(this.instance&&this.instance.option(this._optionsToUpdate),this._optionsToUpdate={})}resetOptions(t){this.instance&&(this.removedNestedComponents.filter(n=>n&&!this.isRecreated(n)&&t?n.startsWith(t):!0).forEach(n=>{this.instance.resetOption(n)}),this.removedNestedComponents=[],this.recreatedNestedComponents=[])}isRecreated(t){return this.recreatedNestedComponents&&this.recreatedNestedComponents.some(n=>n.getOptionPath()===t)}setTemplate(t){this.templates.push(t),this.templateUpdateRequired=!0}setChildren(t,n){return this.resetOptions(t),this._collectionContainerImpl.setChildren(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var IW=["mousemove","mouseover","mouseout"],DW=["mouseup","click","mousedown","transitionend","wheel"],K_,U_=[],TS=function(i){K_||(K_=this.callBase.bind(this)),U_.push(i)};ri.inject({add(i){return TS.call(this,i)}});var AS=(i,e,t)=>{Number(uw.major)<12&&console.warn("Your version of Angular is not supported. Please update your project to version 12 or later. Please refer to the Angular Update Guide for more information: https://update.angular.io"),S.inject({_document:i,listen(...o){let s=o[1];return IW.includes(s)?e.runOutsideAngular(()=>this.callBase.apply(this,o)):e.isStable&&DW.includes(s)?e.run(()=>this.callBase.apply(this,o)):this.callBase.apply(this,o)},isElementNode(o){return o&&o.nodeType===1},isTextNode(o){return o&&o.nodeType===3},isDocument(o){return o&&o.nodeType===9}}),jh.inject({getXhr(){if(!t)return this.callBase.apply(this);let o=t.build();return"withCredentials"in o||(o.withCredentials=!1),o}});let n=()=>{e.run(()=>{_.set({}),U_.forEach(o=>K_.call(null,o)),U_=[],ri.fire()})};n(),TS=o=>e.run(()=>o()),AS=n},st=(()=>{class i{constructor(t,n,o){AS(t,n,o)}static \u0275fac=function(n){return new(n||i)(ec(sl),ec(Ye),ec(mw,8))};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();function TW(i){return i&&typeof i[Symbol.iterator]=="function"}var Me=(()=>{class i{_differs;_host;_propertyDiffers={};constructor(t){this._differs=t}setHost(t){this._host=t}setup(t,n){if(t in n){let o=n[t].currentValue;this.setupSingle(t,o)}}setupSingle(t,n){if(n&&Array.isArray(n)){if(!this._propertyDiffers[t])try{return this._propertyDiffers[t]=this._differs.find(n).create(null),!0}catch{}}else delete this._propertyDiffers[t];return!1}getChanges(t,n){if(this._propertyDiffers[t])return this._propertyDiffers[t].diff(n)}checkChangedOptions(t,n){return this._host.changedOptions[t]===n}doCheck(t){if(this._propertyDiffers[t]&&this._host.instance){let n=this._host[t];TW(n)&&this.getChanges(t,n)&&!this.checkChangedOptions(t,n)&&(this._host.lockWidgetUpdate(),this._host.instance.option(t,n))}}static \u0275fac=function(n){return new(n||i)(ec(hw))};static \u0275prov=Jd({token:i,factory:i.\u0275fac})}return i})();var AW=ri.add,q_="DEVEXTREME_XHR_ERROR_UNLOAD",MS=function(i){return[i[0],i.length<3?"=":String(i[1]).toLowerCase(),i.length<2?!0:i[i.length-1]]},vn=function(i){return Array.isArray(i)||(i=[i]),qe(i,function(e){let t={selector:A(e)||typeof e=="string"?e:e.getter||e.field||e.selector,desc:!!(e.desc||String(e.dir).charAt(0).toLowerCase()==="d")};return e.compare&&(t.compare=e.compare),t})},RS=function(){let i={timeout:"Network connection timeout",error:"Unspecified network error",parsererror:"Unexpected server response"},e;return AW(function(){let t=q();S.listen(t,"beforeunload",function(){e=!0})}),function(t,n){return e?q_:t.status<400?function(o){let s=i[o];return s||o}(n):t.statusText}}(),_c={count:{seed:0,step:function(i){return 1+i}},sum:{seed:0,step:function(i,e){return i+e}},min:{step:function(i,e){return e<i?e:i}},max:{step:function(i,e){return e>i?e:i}},avg:{seed:[0,0],step:function(i,e){return[i[0]+e,i[1]+1]},finalize:function(i){return i[1]?i[0]/i[1]:NaN}}},FS=function(){let i=0,e;return{obtain:function(){i===0&&(e=new y),i++},release:function(){i--,i<1&&e.resolve()},promise:function(){return(i===0?new y().resolve():e).promise()},reset:function(){i=0,e&&e.resolve()}}}();function PS(i){return/^(and|&&|&)$/i.test(i)}var Ls=function(i,e,t){if(Array.isArray(i)){let n=qe(e,function(s,r){return r}),o;for(let s=0;s<n.length;s++)if(o=n[s],!Ee(e[o],t[o],{strict:!1}))return!1;return!0}return Ee(e,t,{strict:!1})};var kS=function(i){return i[0]==="!"&&Array.isArray(i[1])},MW=function(i){return i==="and"||i==="or"},BS=function(i){if(i.length>2&&Array.isArray(i[0])&&i[1]==="or"&&typeof i[0][0]=="string"&&i[0][1]==="="){let[e]=i[0];return!i.find((t,n)=>n%2!==0?t!=="or":!Array.isArray(t)||t.length!==3||t[0]!==e||t[1]!=="=")}return!1},VS=function(i){let e=i[0],t=i[1];return!!(Array.isArray(e)||A(e)&&(Array.isArray(t)||A(t)||MW(t)))},Mr=function(){let i=new y;return i.resolve.apply(i,arguments).promise()},Xh=function(){let i=new y;return i.reject.apply(i,arguments).promise()};function RW(i,e){let t;return function(){return t||(t=setTimeout(()=>{t=void 0,i.call(this)},A(e)?e():e)),t}}function LS(i,e){let t=[],n=RW(function(){i.call(this,t),t=[]},e);return function(o){return Array.isArray(o)&&t.push(...o),n.call(this,t)}}var mt=ll(me.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}"}),FW=null,bl=function(i){var e;(e=FW)===null||e===void 0||e(i)};function PW(i,e){let t,n=typeof e=="string"?e.split():e.slice();for(;n.length;)if(t=n.shift(),t in i)return!0;return!1}function NS(i,e,t,n){let o,s;if(n){for(let r=0;r<e.length;r++)if(o=e[r].items||e[r].collapsedItems||[],s=NS(i,o||[],t,n-1),s)return s}else if(Ns(i,e,t)>=0)return e}function kW(i,e,t,n){return n?NS(i,e,t,n)||[]:e}function BW(i,e){if(i.key()&&(!e._dataByKeyMap||e._dataByKeyMapLength!==e.length)){let t={},n=e.length;for(let o=0;o<n;o++)t[JSON.stringify(i.keyOf(e[o]))]=e[o];e._dataByKeyMap=t,e._dataByKeyMapLength=n}}function VW(i,e){if(i._dataByKeyMap)return i._dataByKeyMap[JSON.stringify(e)]}function LW(i,e){return i._dataByKeyMap?i._dataByKeyMap[JSON.stringify(e)]:!0}function HS(i,e,t){i._dataByKeyMap&&(i._dataByKeyMap[JSON.stringify(e)]=t,i._dataByKeyMapLength+=t?1:-1)}function $S(i,e,t){t=t||new WeakMap;let n=i?Object.create(Object.getPrototypeOf(i)):{};i&&t.set(i,n);let o=I({},i);en(n,o,!0,!0);for(let s in o){let r=o[s],a=e?.[s];z(r)&&!X(r)&&z(a)&&!t.has(r)&&(n[s]=$S(r,a,t))}for(let s in n){let r=n[s];z(r)&&t.has(r)&&(n[s]=t.get(r))}return n}function To(i,e){let t=$S(i,e);return en(t,e,!0,!0)}function no(i){let{keyInfo:e,data:t,changes:n,groupCount:o,useInsertIndex:s,immutable:r,disableCache:a,logError:l,skipCopying:d}=i,c=r===!0?[...t]:t;return n.forEach(h=>{let p=h.type==="insert"?c:kW(e,c,h.key,o);switch(!a&&BW(e,p),h.type){case"update":Cc(e,p,h.key,h.data,!0,r,l);break;case"insert":xc(e,p,h.data,s&&f(h.index)?h.index:-1,!0,l,d);break;case"remove":Y_(e,p,h.key,!0,l)}}),c}function Qh(i,e,t){return i?e&&mt.log(t):Xh(mt.Error(t))}function Cc(i,e,t,n,o,s,r){let a,l=i.key();if(l){if(PW(n,l)&&!Ls(l,t,i.keyOf(n)))return Qh(o,r,"E4017");if(a=VW(e,t),!a){let d=Ns(i,e,t);if(d<0)return Qh(o,r,"E4009");if(a=e[d],s===!0&&f(a)){let c=To(a,n);return e[d]=c,!o&&Mr(c,t)}}}else a=t;if(en(a,n,!0),!o)return xe().useLegacyStoreResult?Mr(t,n):Mr(a,t)}function xc(i,e,t,n,o,s,r){let a,l=i.key(),d=X(t)&&!r?m({},t):t;if(l){if(a=i.keyOf(d),a===void 0||typeof a=="object"&&bt(a)){if(Array.isArray(l))throw mt.Error("E4007");a=d[l]=String(new Ae)}else if(e[Ns(i,e,a)]!==void 0)return Qh(o,s,"E4008")}else a=d;if(n>=0?e.splice(n,0,d):e.push(d),HS(e,a,d),!o)return Mr(xe().useLegacyStoreResult?t:d,a)}function Y_(i,e,t,n,o){let s=Ns(i,e,t);if(s>-1&&(e.splice(s,1),HS(e,t,null)),n){if(s<0)return Qh(n,o,"E4009")}else return Mr(t)}function Ns(i,e,t){let n=i.key();if(!LW(e,t))return-1;for(let o=0,s=e.length;o<s;o++)if(Ls(n,i.keyOf(e[o]),t))return o;return-1}var oo=class i{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._events={},this._owner=e,this._options=t}static create(e,t){return t?A(t)?t(e):t:new i(e)}hasEvent(e){let t=this._events[e];return t?t.has():!1}fireEvent(e,t){let n=this._events[e];return n&&n.fireWith(this._owner,t),this._owner}on(e,t){if(X(e))x(e,(n,o)=>{this.on(n,o)});else{let n=this._events[e];n||(n=ge({syncStrategy:this._options.syncStrategy}),this._events[e]=n),(n.originalAdd||n.add).call(n,t)}}off(e,t){let n=this._events[e];n&&(A(t)?n.remove(t):n.empty())}dispose(){x(this._events,(e,t)=>{t.empty()})}};var vc=pe.inherit({toArray:function(){let i=[];for(this.reset();this.next();)i.push(this.current());return i},countable:function(){return!1}}),J_=vc.inherit({ctor:function(i){this.array=i,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}}),Zh=vc.inherit({ctor:function(i){this.iter=i},next:function(){return this.iter.next()},current:function(){return this.iter.current()},reset:function(){return this.iter.reset()}}),X_=Zh.inherit({ctor:function(i,e){this.callBase(i),this.index=-1,this.mapper=e},current:function(){return this.mapper(this.callBase(),this.index)},next:function(){let i=this.callBase();return i&&this.index++,i}}),NW=function(i,e,t){return B(i)&&B(e)&&(t!=null&&t.locale||t!=null&&t.collatorOptions)?new Intl.Collator(t?.locale||void 0,t?.collatorOptions||void 0).compare(i,e):(i=Pt(i,!1,t),e=Pt(e,!1,t),i===null&&e!==null?-1:i!==null&&e===null||i===void 0&&e!==void 0?1:i!==void 0&&e===void 0||i<e?-1:i>e?1:0)},Q_=vc.inherit({ctor:function(i,e,t,n){this.langParams=i.langParams,i instanceof X_||(i=new X_(i,this._wrap),i.langParams=this.langParams),this.iter=i,this.rules=[{getter:e,desc:t,compare:n,langParams:this.langParams}]},thenBy:function(i,e,t){let n=new Q_(this.sortedIter||this.iter,i,e,t);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(){let i=this;i.sortedIter||(x(i.rules,function(){this.getter=Ce(this.getter)}),i.sortedIter=new X_(new J_(this.iter.toArray().sort(function(e,t){return i._compare(e,t)})),i._unwrap))},_wrap:function(i,e){return{index:e,value:i}},_unwrap:function(i){return i.value},_getDefaultCompare:i=>(e,t)=>NW(e,t,i),_compare:function(i,e){let t=i.index,n=e.index;if(i=i.value,e=e.value,i===e)return t-n;for(let o=0,s=this.rules.length;o<s;o++){let r=this.rules[o],a=r.getter(i),l=r.getter(e),c=(r.compare||this._getDefaultCompare(r.langParams))(a,l);if(c)return r.desc?-c:c}return t-n}}),Z_=function(){let i={},e=r=>Pt(r,!1,i),t=function(r){if(BS(r))return(c=>{let h=Ce(c[0][0]),p=c.reduce((g,C,v)=>(v%2===0&&g.push(e(C[2])),g),[]);return g=>{let C=e(h(g));return p.some(v=>s(v)?C===v:C==v)}})(r);let a=[],l=!1,d=!1;return x(r,function(){if(Array.isArray(this)||A(this)){if(a.length>1&&l!==d)throw new mt.Error("E4019");a.push(Z_(this,i)),l=d,d=!0}else d=PS(this)}),function(c){let h=l;for(let p=0;p<a.length;p++)if(a[p](c)!==l){h=!l;break}return h}},n=function(r){var a;return f(r)?(a=i)!==null&&a!==void 0&&a.locale?r.toLocaleString(i.locale):r.toString():""};function o(r,a,l){return function(d){d=e(r(d));let c=s(a)?d===a:d==a;return l&&(c=!c),c}}function s(r){return r===""||r===0||r===!1}return function(r,a){return i=a||{},A(r)?r:VS(r)?t(r):kS(r)?function(l){let d=l[0],c=Z_(l[1],i);if(d==="!")return function(h){return!c(h)};throw mt.Error("E4003",d)}(r):function(l){l=MS(l);let d=Ce(l[0]),c=l[1],h=l[2];h=e(h);let p=(g,C)=>(g=e(d(g)),(h==null||g==null)&&h!==g?!1:C(g,h));switch(c.toLowerCase()){case"=":return o(d,h);case"<>":return o(d,h,!0);case">":return g=>p(g,(C,v)=>C>v);case"<":return g=>p(g,(C,v)=>C<v);case">=":return g=>p(g,(C,v)=>C>=v);case"<=":return g=>p(g,(C,v)=>C<=v);case"startswith":return function(g){return e(n(d(g))).indexOf(h)===0};case"endswith":return function(g){let C=e(n(d(g))),v=n(h);if(C.length<v.length)return!1;let b=C.lastIndexOf(h);return b!==-1&&b===C.length-h.length};case"contains":return function(g){return e(n(d(g))).indexOf(h)>-1};case"notcontains":return function(g){return e(n(d(g))).indexOf(h)===-1}}throw mt.Error("E4003",c)}(r)}}(),HW=Zh.inherit({ctor:function(i,e){this.callBase(i),this.langParams=i.langParams,this.criteria=Z_(e,this.langParams)},next:function(){for(;this.iter.next();)if(this.criteria(this.current()))return!0;return!1}}),$W=vc.inherit({ctor:function(i,e){this.iter=i,this.getter=e},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)return;let i={},e=[],t=this.iter,n=Ce(this.getter);for(t.reset();t.next();){let o=t.current(),s=n(o);s in i?i[s].push(o):(i[s]=[o],e.push(s))}this.groupedIter=new J_(qe(e,function(o){return{key:o,items:i[o]}}))}}),zW=Zh.inherit({ctor:function(i,e){this.callBase(i),this.getter=Ce(e)},current:function(){return this.getter(this.callBase())},countable:function(){return this.iter.countable()},count:function(){return this.iter.count()}}),WW=Zh.inherit({ctor:function(i,e,t){this.callBase(i),this.skip=Math.max(0,e),this.take=Math.max(0,t),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)}}),zS=function(i,e){e=e||{},i instanceof vc||(i=new J_(i)),e.langParams&&(i.langParams=e.langParams);let t=function(l){let d=e.errorHandler;d&&d(l),bl(l)},n=function(l){let d=new y().fail(t),c,h=l.step,p=l.finalize;try{i.reset(),"seed"in l?c=l.seed:c=i.next()?i.current():NaN;let g=c;for(;i.next();)g=h(g,i.current());d.resolve(p?p(g):g)}catch(g){d.reject(g)}return d.promise()},o=function(l){return n(_c[l])},s=function(l){return!A(l)&&!Array.isArray(l)&&(l=[].slice.call(arguments)),a(new zW(i,l))},r=function(l){return s(Ce(l))};function a(l){return zS(l,e)}return{toArray:function(){return i.toArray()},enumerate:function(){let l=new y().fail(t);try{l.resolve(i.toArray())}catch(d){l.reject(d)}return l.promise()},setLangParams(l){i.langParams=l},sortBy:function(l,d,c){return a(new Q_(i,l,d,c))},thenBy:function(l,d,c){if(i instanceof Q_)return a(i.thenBy(l,d,c));throw mt.Error("E4004")},filter:function(l){return Array.isArray(l)||(l=[].slice.call(arguments)),a(new HW(i,l))},slice:function(l,d){return d===void 0&&(d=Number.MAX_VALUE),a(new WW(i,l,d))},select:s,groupBy:function(l){return a(new $W(i,l))},aggregate:function(l,d,c){return arguments.length<2?n({step:arguments[0]}):n({seed:l,step:d,finalize:c})},count:function(){if(i.countable()){let l=new y().fail(t);try{l.resolve(i.count())}catch(d){l.reject(d)}return l.promise()}return o("count")},sum:function(l){return l?r(l).sum():o("sum")},min:function(l){return l?r(l).min():o("min")},max:function(l){return l?r(l).max():o("max")},avg:function(l){return l?r(l).avg():o("avg")}}},Rr=zS;function eC(i,e){return i=i.groupBy(e[0].selector),e.length>1&&(i=i.select(function(t){return m({},t,{items:eC(Rr(t.items),e.slice(1)).toArray()})})),i}function WS(i,e){let t=[];return x(i,function(n,o){At(e,function(r){return o.selector===r.selector}).length<1&&t.push(o)}),t.concat(e)}function GW(i,e,t){var n;e=e||{};let o=e.filter;if((n=e)!==null&&n!==void 0&&n.langParams){var s,r;(s=(r=i).setLangParams)===null||s===void 0||s.call(r,e.langParams)}if(o&&(i=i.filter(o)),t)return i;let a=e.sort,l=e.select,d=e.group,c=e.skip,h=e.take;return d&&(d=vn(d),d.keepInitialKeyOrder=!!e.group.keepInitialKeyOrder),(a||d)&&(a=vn(a||[]),d&&!d.keepInitialKeyOrder&&(a=WS(d,a)),x(a,function(p){i=i[p?"thenBy":"sortBy"](this.selector,this.desc,this.compare)})),l&&(i=i.select(l)),d&&(i=eC(i,d)),(h||c)&&(i=i.slice(c||0,h)),i}var cn={multiLevelGroup:eC,arrangeSortingInfo:WS,queryByOptions:GW};var bc=pe.abstract,GS=cn.queryByOptions,tC={},yl=pe.inherit({_langParams:{},ctor:function(i){let e=this;i=i||{},this._eventsStrategy=new oo(this),x(["onLoaded","onLoading","onInserted","onInserting","onUpdated","onUpdating","onPush","onRemoved","onRemoving","onModified","onModifying"],function(t,n){n in i&&e.on(n.slice(2).toLowerCase(),i[n])}),this._key=i.key,this._errorHandler=i.errorHandler,this._useDefaultSearch=!0},_clearCache:E,_customLoadOptions:function(){return null},key:function(){return this._key},keyOf:function(i){return this._keyGetter||(this._keyGetter=Ce(this.key())),this._keyGetter(i)},_requireKey:function(){if(!this.key())throw mt.Error("E4005")},load:function(i){let e=this;return i=i||{},this._eventsStrategy.fireEvent("loading",[i]),this._withLock(this._loadImpl(i)).done(function(t){e._eventsStrategy.fireEvent("loaded",[t,i])})},_loadImpl:function(i){return bt(this._langParams)||(i=i||{},i._langParams=I({},this._langParams,i._langParams)),GS(this.createQuery(i),i).enumerate()},_withLock:function(i){let e=new y;return i.done(function(){let t=this,n=arguments;FS.promise().done(function(){e.resolveWith(t,n)})}).fail(function(){e.rejectWith(this,arguments)}),e},createQuery:bc,totalCount:function(i){return this._totalCountImpl(i)},_totalCountImpl:function(i){return GS(this.createQuery(i),i,!0).count()},byKey:function(i,e){return this._addFailHandlers(this._withLock(this._byKeyImpl(i,e)))},_byKeyImpl:bc,insert:function(i){let e=this;return e._eventsStrategy.fireEvent("modifying"),e._eventsStrategy.fireEvent("inserting",[i]),e._addFailHandlers(e._insertImpl(i).done(function(t,n){e._eventsStrategy.fireEvent("inserted",[t,n]),e._eventsStrategy.fireEvent("modified")}))},_insertImpl:bc,update:function(i,e){let t=this;return t._eventsStrategy.fireEvent("modifying"),t._eventsStrategy.fireEvent("updating",[i,e]),t._addFailHandlers(t._updateImpl(i,e).done(function(){t._eventsStrategy.fireEvent("updated",[i,e]),t._eventsStrategy.fireEvent("modified")}))},_updateImpl:bc,push:function(i){let e={changes:i,waitFor:[]};this._eventsStrategy.fireEvent("beforePushAggregation",[e]),P(...e.waitFor).done(()=>{this._pushImpl(i),this._eventsStrategy.fireEvent("beforePush",[{changes:i}]),this._eventsStrategy.fireEvent("push",[i])})},_pushImpl:E,remove:function(i){let e=this;return e._eventsStrategy.fireEvent("modifying"),e._eventsStrategy.fireEvent("removing",[i]),e._addFailHandlers(e._removeImpl(i).done(function(t){e._eventsStrategy.fireEvent("removed",[t]),e._eventsStrategy.fireEvent("modified")}))},_removeImpl:bc,_addFailHandlers:function(i){return i.fail(this._errorHandler).fail(bl)},on(i,e){return this._eventsStrategy.on(i,e),this},off(i,e){return this._eventsStrategy.off(i,e),this}});yl.create=function(i,e){if(!(i in tC))throw mt.Error("E4020",i);return new tC[i](e)};yl.registerClass=function(i,e){return e&&(tC[e]=i),i};yl.inherit=function(i){return function(e,t){let n=i.apply(this,[e]);return yl.registerClass(n,t),n}}(yl.inherit);var Hs=yl;var YS="totalCount",iC="load",XS="byKey",jS="insert",KS="update",US="remove";function Ol(i){return i&&A(i.then)}function xa(i){return new y().resolve(i).promise()}function yc(i,e){if(!A(e))throw mt.Error("E4011",i)}function QS(i){throw mt.Error("E4012",i)}function Ca(i){return function(e){let t;e instanceof Error?t=e:t=new Error(function(n){let o=n[0],s=n[1];return!o||!o.getResponseHeader?null:RS(o,s)}(arguments)||e&&String(e)||"Unknown error"),t.message!==q_&&i.reject(t)}}function ZS(i,e){let t=i._loadFunc,n;return yc(iC,t),n=t.apply(i,[e]),Array.isArray(n)?n=xa(n):n==null?n=xa([]):Ol(n)||QS(iC),Et(n)}function jW(i,e){let t=i._totalCountFunc,n;if(!A(t))throw mt.Error("E4021");return n=t.apply(i,[e]),Ol(n)||(n=Number(n),isFinite(n)||QS(YS),n=xa(n)),Et(n)}function KW(i,e,t){let n=i._byKeyFunc,o;return yc(XS,n),o=n.apply(i,[e,t]),Ol(o)||(o=xa(o)),Et(o)}function JS(i,e,t,n){if(e.__rawData)n(e.__rawData);else{let o=e.__rawDataPromise||ZS(e,t);e._cacheRawData&&(e.__rawDataPromise=o),o.always(function(){delete e.__rawDataPromise}).done(function(s){e._cacheRawData&&(e.__rawData=s),n(s)}).fail(s=>{var r;let a=Ca(i);(r=e._errorHandler)===null||r===void 0||r.call(e,s),a(s)})}}function qS(i,e,t,n){t=t||{};let o={};"userData"in t&&(o.userData=t.userData),JS(i,e,o,function(s){let r=Rr(s,{errorHandler:e._errorHandler}),a,l,d=[],c,h;n||(a=cn.queryByOptions(r,t),a===r?c=s.slice(0):d.push(a.enumerate().done(function(p){c=p}))),(t.requireTotalCount||n)&&(l=cn.queryByOptions(r,t,!0),l===r?h=s.length:d.push(l.count().done(function(p){h=p}))),P.apply(u,d).done(function(){n?i.resolve(h):t.requireTotalCount?i.resolve(c,{totalCount:h}):i.resolve(c)}).fail(function(p){i.reject(p)})})}function UW(i,e,t){JS(i,e,{},function(n){let o=e.key(),s;for(let r=0,a=n.length;r<a;r++)if(s=n[r],Ls(o,e.keyOf(n[r]),t)){i.resolve(s);return}i.reject(mt.Error("E4009"))})}var qW=Hs.inherit({ctor:function(i){i=i||{},this.callBase(i),this._useDefaultSearch=!!i.useDefaultSearch||i.loadMode==="raw",this._loadMode=i.loadMode,this._cacheRawData=i.cacheRawData!==!1,this._loadFunc=i[iC],this._totalCountFunc=i[YS],this._byKeyFunc=i[XS],this._insertFunc=i[jS],this._updateFunc=i[KS],this._removeFunc=i[US]},_clearCache(){delete this.__rawData},createQuery:function(){throw mt.Error("E4010")},clearRawDataCache:function(){this._clearCache()},_totalCountImpl:function(i){let e=new y;return this._loadMode==="raw"&&!this._totalCountFunc?qS(e,this,i,!0):(jW(this,i).done(function(t){e.resolve(Number(t))}).fail(Ca(e)),e=this._addFailHandlers(e)),e.promise()},_pushImpl:function(i){this.__rawData&&no({keyInfo:this,data:this.__rawData,changes:i})},_loadImpl:function(i){let e=new y;return this._loadMode==="raw"?qS(e,this,i,!1):(ZS(this,i).done(function(t,n){e.resolve(t,n)}).fail(Ca(e)),e=this._addFailHandlers(e)),e.promise()},_byKeyImpl:function(i,e){let t=new y;return this._byKeyViaLoad()?(this._requireKey(),UW(t,this,i)):KW(this,i,e).done(function(n){t.resolve(n)}).fail(Ca(t)),t.promise()},_byKeyViaLoad:function(){return this._loadMode==="raw"&&!this._byKeyFunc},_insertImpl:function(i){let e=this,t=e._insertFunc,n,o=new y;return yc(jS,t),n=t.apply(e,[i]),Ol(n)||(n=xa(n)),Et(n).done(function(s){xe().useLegacyStoreResult?o.resolve(i,s):o.resolve(s||i,e.keyOf(s))}).fail(Ca(o)),o.promise()},_updateImpl:function(i,e){let t=this._updateFunc,n,o=new y;return yc(KS,t),n=t.apply(this,[i,e]),Ol(n)||(n=xa(n)),Et(n).done(function(s){xe().useLegacyStoreResult?o.resolve(i,e):o.resolve(s||e,i)}).fail(Ca(o)),o.promise()},_removeImpl:function(i){let e=this._removeFunc,t,n=new y;return yc(US,e),t=e.apply(this,[i]),Ol(t)||(t=xa()),Et(t).done(function(){n.resolve(i)}).fail(Ca(n)),n.promise()}}),va=qW;var nC=["*"];var $t=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var zt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Wt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var YW=(()=>{class i extends Dn{get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get html(){return this._getOption("html")}set html(t){this._setOption("html",t)}get icon(){return this._getOption("icon")}set icon(t){this._setOption("icon",t)}get template(){return this._getOption("template")}set template(t){this._setOption("template",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get title(){return this._getOption("title")}set title(t){this._setOption("title",t)}get titleTemplate(){return this._getOption("titleTemplate")}set titleTemplate(t){this._setOption("titleTemplate",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get onClick(){return this._getOption("onClick")}set onClick(t){this._setOption("onClick",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get type(){return this._getOption("type")}set type(t){this._setOption("type",t)}get baseSize(){return this._getOption("baseSize")}set baseSize(t){this._setOption("baseSize",t)}get box(){return this._getOption("box")}set box(t){this._setOption("box",t)}get ratio(){return this._getOption("ratio")}set ratio(t){this._setOption("ratio",t)}get shrink(){return this._getOption("shrink")}set shrink(t){this._setOption("shrink",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get beginGroup(){return this._getOption("beginGroup")}set beginGroup(t){this._setOption("beginGroup",t)}get closeMenuOnClick(){return this._getOption("closeMenuOnClick")}set closeMenuOnClick(t){this._setOption("closeMenuOnClick",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get selectable(){return this._getOption("selectable")}set selectable(t){this._setOption("selectable",t)}get selected(){return this._getOption("selected")}set selected(t){this._setOption("selected",t)}get colSpan(){return this._getOption("colSpan")}set colSpan(t){this._setOption("colSpan",t)}get cssClass(){return this._getOption("cssClass")}set cssClass(t){this._setOption("cssClass",t)}get dataField(){return this._getOption("dataField")}set dataField(t){this._setOption("dataField",t)}get editorOptions(){return this._getOption("editorOptions")}set editorOptions(t){this._setOption("editorOptions",t)}get editorType(){return this._getOption("editorType")}set editorType(t){this._setOption("editorType",t)}get helpText(){return this._getOption("helpText")}set helpText(t){this._setOption("helpText",t)}get isRequired(){return this._getOption("isRequired")}set isRequired(t){this._setOption("isRequired",t)}get itemType(){return this._getOption("itemType")}set itemType(t){this._setOption("itemType",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get validationRules(){return this._getOption("validationRules")}set validationRules(t){this._setOption("validationRules",t)}get visibleIndex(){return this._getOption("visibleIndex")}set visibleIndex(t){this._setOption("visibleIndex",t)}get alignItemLabels(){return this._getOption("alignItemLabels")}set alignItemLabels(t){this._setOption("alignItemLabels",t)}get caption(){return this._getOption("caption")}set caption(t){this._setOption("caption",t)}get captionTemplate(){return this._getOption("captionTemplate")}set captionTemplate(t){this._setOption("captionTemplate",t)}get colCount(){return this._getOption("colCount")}set colCount(t){this._setOption("colCount",t)}get colCountByScreen(){return this._getOption("colCountByScreen")}set colCountByScreen(t){this._setOption("colCountByScreen",t)}get tabPanelOptions(){return this._getOption("tabPanelOptions")}set tabPanelOptions(t){this._setOption("tabPanelOptions",t)}get tabs(){return this._getOption("tabs")}set tabs(t){this._setOption("tabs",t)}get badge(){return this._getOption("badge")}set badge(t){this._setOption("badge",t)}get tabTemplate(){return this._getOption("tabTemplate")}set tabTemplate(t){this._setOption("tabTemplate",t)}get buttonOptions(){return this._getOption("buttonOptions")}set buttonOptions(t){this._setOption("buttonOptions",t)}get horizontalAlignment(){return this._getOption("horizontalAlignment")}set horizontalAlignment(t){this._setOption("horizontalAlignment",t)}get verticalAlignment(){return this._getOption("verticalAlignment")}set verticalAlignment(t){this._setOption("verticalAlignment",t)}get locateInMenu(){return this._getOption("locateInMenu")}set locateInMenu(t){this._setOption("locateInMenu",t)}get location(){return this._getOption("location")}set location(t){this._setOption("location",t)}get menuItemTemplate(){return this._getOption("menuItemTemplate")}set menuItemTemplate(t){this._setOption("menuItemTemplate",t)}get options(){return this._getOption("options")}set options(t){this._setOption("options",t)}get showText(){return this._getOption("showText")}set showText(t){this._setOption("showText",t)}get widget(){return this._getOption("widget")}set widget(t){this._setOption("widget",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get imageAlt(){return this._getOption("imageAlt")}set imageAlt(t){this._setOption("imageAlt",t)}get imageSrc(){return this._getOption("imageSrc")}set imageSrc(t){this._setOption("imageSrc",t)}get acceptedValues(){return this._getOption("acceptedValues")}set acceptedValues(t){this._setOption("acceptedValues",t)}get formatName(){return this._getOption("formatName")}set formatName(t){this._setOption("formatName",t)}get formatValues(){return this._getOption("formatValues")}set formatValues(t){this._setOption("formatValues",t)}get key(){return this._getOption("key")}set key(t){this._setOption("key",t)}get showChevron(){return this._getOption("showChevron")}set showChevron(t){this._setOption("showChevron",t)}get linkAttr(){return this._getOption("linkAttr")}set linkAttr(t){this._setOption("linkAttr",t)}get url(){return this._getOption("url")}set url(t){this._setOption("url",t)}get collapsed(){return this._getOption("collapsed")}set collapsed(t){this._setOption("collapsed",t)}get collapsedSize(){return this._getOption("collapsedSize")}set collapsedSize(t){this._setOption("collapsedSize",t)}get collapsible(){return this._getOption("collapsible")}set collapsible(t){this._setOption("collapsible",t)}get maxSize(){return this._getOption("maxSize")}set maxSize(t){this._setOption("maxSize",t)}get minSize(){return this._getOption("minSize")}set minSize(t){this._setOption("minSize",t)}get resizable(){return this._getOption("resizable")}set resizable(t){this._setOption("resizable",t)}get size(){return this._getOption("size")}set size(t){this._setOption("size",t)}get splitter(){return this._getOption("splitter")}set splitter(t){this._setOption("splitter",t)}get heightRatio(){return this._getOption("heightRatio")}set heightRatio(t){this._setOption("heightRatio",t)}get widthRatio(){return this._getOption("widthRatio")}set widthRatio(t){this._setOption("widthRatio",t)}get expanded(){return this._getOption("expanded")}set expanded(t){this._setOption("expanded",t)}get hasItems(){return this._getOption("hasItems")}set hasItems(t){this._setOption("hasItems",t)}get id(){return this._getOption("id")}set id(t){this._setOption("id",t)}get parentId(){return this._getOption("parentId")}set parentId(t){this._setOption("parentId",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var eI=(()=>{class i extends Dn{get message(){return this._getOption("message")}set message(t){this._setOption("message",t)}get trim(){return this._getOption("trim")}set trim(t){this._setOption("trim",t)}get type(){return this._getOption("type")}set type(t){this._setOption("type",t)}get ignoreEmptyValue(){return this._getOption("ignoreEmptyValue")}set ignoreEmptyValue(t){this._setOption("ignoreEmptyValue",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get reevaluate(){return this._getOption("reevaluate")}set reevaluate(t){this._setOption("reevaluate",t)}get validationCallback(){return this._getOption("validationCallback")}set validationCallback(t){this._setOption("validationCallback",t)}get comparisonTarget(){return this._getOption("comparisonTarget")}set comparisonTarget(t){this._setOption("comparisonTarget",t)}get comparisonType(){return this._getOption("comparisonType")}set comparisonType(t){this._setOption("comparisonType",t)}get pattern(){return this._getOption("pattern")}set pattern(t){this._setOption("pattern",t)}get _optionPath(){return"validationRules"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-validation-rule"]],inputs:{message:"message",trim:"trim",type:"type",ignoreEmptyValue:"ignoreEmptyValue",max:"max",min:"min",reevaluate:"reevaluate",validationCallback:"validationCallback",comparisonTarget:"comparisonTarget",comparisonType:"comparisonType",pattern:"pattern"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),oC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var XW=(()=>{class i extends Dn{get alignItemLabels(){return this._getOption("alignItemLabels")}set alignItemLabels(t){this._setOption("alignItemLabels",t)}get badge(){return this._getOption("badge")}set badge(t){this._setOption("badge",t)}get colCount(){return this._getOption("colCount")}set colCount(t){this._setOption("colCount",t)}get colCountByScreen(){return this._getOption("colCountByScreen")}set colCountByScreen(t){this._setOption("colCountByScreen",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get icon(){return this._getOption("icon")}set icon(t){this._setOption("icon",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get tabTemplate(){return this._getOption("tabTemplate")}set tabTemplate(t){this._setOption("tabTemplate",t)}get template(){return this._getOption("template")}set template(t){this._setOption("template",t)}get title(){return this._getOption("title")}set title(t){this._setOption("title",t)}get commands(){return this._getOption("commands")}set commands(t){this._setOption("commands",t)}get groups(){return this._getOption("groups")}set groups(t){this._setOption("groups",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var QW=(()=>{class i extends Dn{get icon(){return this._getOption("icon")}set icon(t){this._setOption("icon",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get location(){return this._getOption("location")}set location(t){this._setOption("location",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var tI=(()=>{class i extends QW{get _optionPath(){return"commands"}get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-command"]],contentQueries:function(n,o,s){if(n&1&&je(s,so,4),n&2){let r;Ne(r=He())&&(o.itemsChildren=r)}},inputs:{icon:"icon",items:"items",location:"location",name:"name",text:"text"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var ZW=(()=>{class i extends Dn{get commands(){return this._getOption("commands")}set commands(t){this._setOption("commands",t)}get title(){return this._getOption("title")}set title(t){this._setOption("title",t)}get category(){return this._getOption("category")}set category(t){this._setOption("category",t)}get displayMode(){return this._getOption("displayMode")}set displayMode(t){this._setOption("displayMode",t)}get expanded(){return this._getOption("expanded")}set expanded(t){this._setOption("expanded",t)}get shapes(){return this._getOption("shapes")}set shapes(t){this._setOption("shapes",t)}get _optionPath(){return"groups"}get commandsChildren(){return this._getOption("commands")}set commandsChildren(t){this.setChildren("commands",t)}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-group"]],contentQueries:function(n,o,s){if(n&1&&je(s,tI,4),n&2){let r;Ne(r=He())&&(o.commandsChildren=r)}},inputs:{commands:"commands",title:"title",category:"category",displayMode:"displayMode",expanded:"expanded",shapes:"shapes"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var JW=(()=>{class i extends XW{renderer;document;element;get _optionPath(){return"tabs"}get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}get commandsChildren(){return this._getOption("commands")}set commandsChildren(t){this.setChildren("commands",t)}get groupsChildren(){return this._getOption("groups")}set groupsChildren(t){this.setChildren("groups",t)}constructor(t,n,o,s,r,a){super(),this.renderer=o,this.document=s,this.element=a,t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this)),r.setHost(this)}setTemplate(t){this.template=t}ngAfterViewInit(){Yh(this,this.element,this.renderer,this.document)}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1),w(Fs),w(sl),w(se,1),w($e))};static \u0275cmp=Z({type:i,selectors:[["dxi-tab"]],contentQueries:function(n,o,s){if(n&1&&(je(s,so,4),je(s,tI,4),je(s,ZW,4)),n&2){let r;Ne(r=He())&&(o.itemsChildren=r),Ne(r=He())&&(o.commandsChildren=r),Ne(r=He())&&(o.groupsChildren=r)}},inputs:{alignItemLabels:"alignItemLabels",badge:"badge",colCount:"colCount",colCountByScreen:"colCountByScreen",disabled:"disabled",icon:"icon",items:"items",tabTemplate:"tabTemplate",template:"template",title:"title",commands:"commands",groups:"groups",name:"name"},standalone:!1,features:[ue([k,se]),ne],ngContentSelectors:nC,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},styles:["[_nghost-%COMP%]{display:block}"]})}return i})(),sC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var eG=(()=>{class i extends Dn{get lat(){return this._getOption("lat")}set lat(t){this._setOption("lat",t)}get lng(){return this._getOption("lng")}set lng(t){this._setOption("lng",t)}get col(){return this._getOption("col")}set col(t){this._setOption("col",t)}get colspan(){return this._getOption("colspan")}set colspan(t){this._setOption("colspan",t)}get row(){return this._getOption("row")}set row(t){this._setOption("row",t)}get rowspan(){return this._getOption("rowspan")}set rowspan(t){this._setOption("rowspan",t)}get screen(){return this._getOption("screen")}set screen(t){this._setOption("screen",t)}get _optionPath(){return"location"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-location"]],inputs:{lat:"lat",lng:"lng",col:"col",colspan:"colspan",row:"row",rowspan:"rowspan",screen:"screen"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var so=(()=>{class i extends YW{renderer;document;element;get _optionPath(){return"items"}get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}get validationRulesChildren(){return this._getOption("validationRules")}set validationRulesChildren(t){this.setChildren("validationRules",t)}get tabsChildren(){return this._getOption("tabs")}set tabsChildren(t){this.setChildren("tabs",t)}get locationChildren(){return this._getOption("location")}set locationChildren(t){this.setChildren("location",t)}constructor(t,n,o,s,r,a){super(),this.renderer=o,this.document=s,this.element=a,t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this)),r.setHost(this)}setTemplate(t){this.template=t}ngAfterViewInit(){Yh(this,this.element,this.renderer,this.document)}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1),w(Fs),w(sl),w(se,1),w($e))};static \u0275cmp=Z({type:i,selectors:[["dxi-item"]],contentQueries:function(n,o,s){if(n&1&&(je(s,i,4),je(s,eI,4),je(s,JW,4),je(s,eG,4)),n&2){let r;Ne(r=He())&&(o.itemsChildren=r),Ne(r=He())&&(o.validationRulesChildren=r),Ne(r=He())&&(o.tabsChildren=r),Ne(r=He())&&(o.locationChildren=r)}},inputs:{disabled:"disabled",html:"html",icon:"icon",template:"template",text:"text",title:"title",titleTemplate:"titleTemplate",visible:"visible",onClick:"onClick",stylingMode:"stylingMode",type:"type",baseSize:"baseSize",box:"box",ratio:"ratio",shrink:"shrink",elementAttr:"elementAttr",hint:"hint",beginGroup:"beginGroup",closeMenuOnClick:"closeMenuOnClick",items:"items",selectable:"selectable",selected:"selected",colSpan:"colSpan",cssClass:"cssClass",dataField:"dataField",editorOptions:"editorOptions",editorType:"editorType",helpText:"helpText",isRequired:"isRequired",itemType:"itemType",label:"label",name:"name",validationRules:"validationRules",visibleIndex:"visibleIndex",alignItemLabels:"alignItemLabels",caption:"caption",captionTemplate:"captionTemplate",colCount:"colCount",colCountByScreen:"colCountByScreen",tabPanelOptions:"tabPanelOptions",tabs:"tabs",badge:"badge",tabTemplate:"tabTemplate",buttonOptions:"buttonOptions",horizontalAlignment:"horizontalAlignment",verticalAlignment:"verticalAlignment",locateInMenu:"locateInMenu",location:"location",menuItemTemplate:"menuItemTemplate",options:"options",showText:"showText",widget:"widget",height:"height",width:"width",imageAlt:"imageAlt",imageSrc:"imageSrc",acceptedValues:"acceptedValues",formatName:"formatName",formatValues:"formatValues",key:"key",showChevron:"showChevron",linkAttr:"linkAttr",url:"url",collapsed:"collapsed",collapsedSize:"collapsedSize",collapsible:"collapsible",maxSize:"maxSize",minSize:"minSize",resizable:"resizable",size:"size",splitter:"splitter",heightRatio:"heightRatio",widthRatio:"widthRatio",expanded:"expanded",hasItems:"hasItems",id:"id",parentId:"parentId"},standalone:!1,features:[ue([k,se]),ne],ngContentSelectors:nC,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},styles:["[_nghost-%COMP%]{display:block}"]})}return i})(),Ki=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var tG=(()=>{class i extends Dn{get location(){return this._getOption("location")}set location(t){this._setOption("location",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get options(){return this._getOption("options")}set options(t){this._setOption("options",t)}get cssClass(){return this._getOption("cssClass")}set cssClass(t){this._setOption("cssClass",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get icon(){return this._getOption("icon")}set icon(t){this._setOption("icon",t)}get onClick(){return this._getOption("onClick")}set onClick(t){this._setOption("onClick",t)}get template(){return this._getOption("template")}set template(t){this._setOption("template",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var Ao=(()=>{class i extends tG{get _optionPath(){return"buttons"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-button"]],inputs:{location:"location",name:"name",options:"options",cssClass:"cssClass",disabled:"disabled",hint:"hint",icon:"icon",onClick:"onClick",template:"template",text:"text",visible:"visible"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),xi=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var rC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var El=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var aC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var lC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Gt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var dC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var iG=(()=>{class i extends Dn{get alignment(){return this._getOption("alignment")}set alignment(t){this._setOption("alignment",t)}get allowEditing(){return this._getOption("allowEditing")}set allowEditing(t){this._setOption("allowEditing",t)}get allowExporting(){return this._getOption("allowExporting")}set allowExporting(t){this._setOption("allowExporting",t)}get allowFiltering(){return this._getOption("allowFiltering")}set allowFiltering(t){this._setOption("allowFiltering",t)}get allowFixing(){return this._getOption("allowFixing")}set allowFixing(t){this._setOption("allowFixing",t)}get allowGrouping(){return this._getOption("allowGrouping")}set allowGrouping(t){this._setOption("allowGrouping",t)}get allowHeaderFiltering(){return this._getOption("allowHeaderFiltering")}set allowHeaderFiltering(t){this._setOption("allowHeaderFiltering",t)}get allowHiding(){return this._getOption("allowHiding")}set allowHiding(t){this._setOption("allowHiding",t)}get allowReordering(){return this._getOption("allowReordering")}set allowReordering(t){this._setOption("allowReordering",t)}get allowResizing(){return this._getOption("allowResizing")}set allowResizing(t){this._setOption("allowResizing",t)}get allowSearch(){return this._getOption("allowSearch")}set allowSearch(t){this._setOption("allowSearch",t)}get allowSorting(){return this._getOption("allowSorting")}set allowSorting(t){this._setOption("allowSorting",t)}get autoExpandGroup(){return this._getOption("autoExpandGroup")}set autoExpandGroup(t){this._setOption("autoExpandGroup",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get calculateCellValue(){return this._getOption("calculateCellValue")}set calculateCellValue(t){this._setOption("calculateCellValue",t)}get calculateDisplayValue(){return this._getOption("calculateDisplayValue")}set calculateDisplayValue(t){this._setOption("calculateDisplayValue",t)}get calculateFilterExpression(){return this._getOption("calculateFilterExpression")}set calculateFilterExpression(t){this._setOption("calculateFilterExpression",t)}get calculateGroupValue(){return this._getOption("calculateGroupValue")}set calculateGroupValue(t){this._setOption("calculateGroupValue",t)}get calculateSortValue(){return this._getOption("calculateSortValue")}set calculateSortValue(t){this._setOption("calculateSortValue",t)}get caption(){return this._getOption("caption")}set caption(t){this._setOption("caption",t)}get cellTemplate(){return this._getOption("cellTemplate")}set cellTemplate(t){this._setOption("cellTemplate",t)}get columns(){return this._getOption("columns")}set columns(t){this._setOption("columns",t)}get cssClass(){return this._getOption("cssClass")}set cssClass(t){this._setOption("cssClass",t)}get customizeText(){return this._getOption("customizeText")}set customizeText(t){this._setOption("customizeText",t)}get dataField(){return this._getOption("dataField")}set dataField(t){this._setOption("dataField",t)}get dataType(){return this._getOption("dataType")}set dataType(t){this._setOption("dataType",t)}get editCellTemplate(){return this._getOption("editCellTemplate")}set editCellTemplate(t){this._setOption("editCellTemplate",t)}get editorOptions(){return this._getOption("editorOptions")}set editorOptions(t){this._setOption("editorOptions",t)}get encodeHtml(){return this._getOption("encodeHtml")}set encodeHtml(t){this._setOption("encodeHtml",t)}get falseText(){return this._getOption("falseText")}set falseText(t){this._setOption("falseText",t)}get filterOperations(){return this._getOption("filterOperations")}set filterOperations(t){this._setOption("filterOperations",t)}get filterType(){return this._getOption("filterType")}set filterType(t){this._setOption("filterType",t)}get filterValue(){return this._getOption("filterValue")}set filterValue(t){this._setOption("filterValue",t)}get filterValues(){return this._getOption("filterValues")}set filterValues(t){this._setOption("filterValues",t)}get fixed(){return this._getOption("fixed")}set fixed(t){this._setOption("fixed",t)}get fixedPosition(){return this._getOption("fixedPosition")}set fixedPosition(t){this._setOption("fixedPosition",t)}get format(){return this._getOption("format")}set format(t){this._setOption("format",t)}get formItem(){return this._getOption("formItem")}set formItem(t){this._setOption("formItem",t)}get groupCellTemplate(){return this._getOption("groupCellTemplate")}set groupCellTemplate(t){this._setOption("groupCellTemplate",t)}get groupIndex(){return this._getOption("groupIndex")}set groupIndex(t){this._setOption("groupIndex",t)}get headerCellTemplate(){return this._getOption("headerCellTemplate")}set headerCellTemplate(t){this._setOption("headerCellTemplate",t)}get headerFilter(){return this._getOption("headerFilter")}set headerFilter(t){this._setOption("headerFilter",t)}get hidingPriority(){return this._getOption("hidingPriority")}set hidingPriority(t){this._setOption("hidingPriority",t)}get isBand(){return this._getOption("isBand")}set isBand(t){this._setOption("isBand",t)}get lookup(){return this._getOption("lookup")}set lookup(t){this._setOption("lookup",t)}get minWidth(){return this._getOption("minWidth")}set minWidth(t){this._setOption("minWidth",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get ownerBand(){return this._getOption("ownerBand")}set ownerBand(t){this._setOption("ownerBand",t)}get renderAsync(){return this._getOption("renderAsync")}set renderAsync(t){this._setOption("renderAsync",t)}get selectedFilterOperation(){return this._getOption("selectedFilterOperation")}set selectedFilterOperation(t){this._setOption("selectedFilterOperation",t)}get setCellValue(){return this._getOption("setCellValue")}set setCellValue(t){this._setOption("setCellValue",t)}get showEditorAlways(){return this._getOption("showEditorAlways")}set showEditorAlways(t){this._setOption("showEditorAlways",t)}get showInColumnChooser(){return this._getOption("showInColumnChooser")}set showInColumnChooser(t){this._setOption("showInColumnChooser",t)}get showWhenGrouped(){return this._getOption("showWhenGrouped")}set showWhenGrouped(t){this._setOption("showWhenGrouped",t)}get sortIndex(){return this._getOption("sortIndex")}set sortIndex(t){this._setOption("sortIndex",t)}get sortingMethod(){return this._getOption("sortingMethod")}set sortingMethod(t){this._setOption("sortingMethod",t)}get sortOrder(){return this._getOption("sortOrder")}set sortOrder(t){this._setOption("sortOrder",t)}get trueText(){return this._getOption("trueText")}set trueText(t){this._setOption("trueText",t)}get type(){return this._getOption("type")}set type(t){this._setOption("type",t)}get validationRules(){return this._getOption("validationRules")}set validationRules(t){this._setOption("validationRules",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get visibleIndex(){return this._getOption("visibleIndex")}set visibleIndex(t){this._setOption("visibleIndex",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var iI=(()=>{class i extends iG{filterValueChange;filterValuesChange;groupIndexChange;selectedFilterOperationChange;sortIndexChange;sortOrderChange;visibleChange;visibleIndexChange;get _optionPath(){return"columns"}get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}get columnsChildren(){return this._getOption("columns")}set columnsChildren(t){this.setChildren("columns",t)}get validationRulesChildren(){return this._getOption("validationRules")}set validationRulesChildren(t){this.setChildren("validationRules",t)}constructor(t,n){super(),this._createEventEmitters([{emit:"filterValueChange"},{emit:"filterValuesChange"},{emit:"groupIndexChange"},{emit:"selectedFilterOperationChange"},{emit:"sortIndexChange"},{emit:"sortOrderChange"},{emit:"visibleChange"},{emit:"visibleIndexChange"}]),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-column"]],contentQueries:function(n,o,s){if(n&1&&(je(s,Ao,4),je(s,i,4),je(s,eI,4)),n&2){let r;Ne(r=He())&&(o.buttonsChildren=r),Ne(r=He())&&(o.columnsChildren=r),Ne(r=He())&&(o.validationRulesChildren=r)}},inputs:{alignment:"alignment",allowEditing:"allowEditing",allowExporting:"allowExporting",allowFiltering:"allowFiltering",allowFixing:"allowFixing",allowGrouping:"allowGrouping",allowHeaderFiltering:"allowHeaderFiltering",allowHiding:"allowHiding",allowReordering:"allowReordering",allowResizing:"allowResizing",allowSearch:"allowSearch",allowSorting:"allowSorting",autoExpandGroup:"autoExpandGroup",buttons:"buttons",calculateCellValue:"calculateCellValue",calculateDisplayValue:"calculateDisplayValue",calculateFilterExpression:"calculateFilterExpression",calculateGroupValue:"calculateGroupValue",calculateSortValue:"calculateSortValue",caption:"caption",cellTemplate:"cellTemplate",columns:"columns",cssClass:"cssClass",customizeText:"customizeText",dataField:"dataField",dataType:"dataType",editCellTemplate:"editCellTemplate",editorOptions:"editorOptions",encodeHtml:"encodeHtml",falseText:"falseText",filterOperations:"filterOperations",filterType:"filterType",filterValue:"filterValue",filterValues:"filterValues",fixed:"fixed",fixedPosition:"fixedPosition",format:"format",formItem:"formItem",groupCellTemplate:"groupCellTemplate",groupIndex:"groupIndex",headerCellTemplate:"headerCellTemplate",headerFilter:"headerFilter",hidingPriority:"hidingPriority",isBand:"isBand",lookup:"lookup",minWidth:"minWidth",name:"name",ownerBand:"ownerBand",renderAsync:"renderAsync",selectedFilterOperation:"selectedFilterOperation",setCellValue:"setCellValue",showEditorAlways:"showEditorAlways",showInColumnChooser:"showInColumnChooser",showWhenGrouped:"showWhenGrouped",sortIndex:"sortIndex",sortingMethod:"sortingMethod",sortOrder:"sortOrder",trueText:"trueText",type:"type",validationRules:"validationRules",visible:"visible",visibleIndex:"visibleIndex",width:"width"},outputs:{filterValueChange:"filterValueChange",filterValuesChange:"filterValuesChange",groupIndexChange:"groupIndexChange",selectedFilterOperationChange:"selectedFilterOperationChange",sortIndexChange:"sortIndexChange",sortOrderChange:"sortOrderChange",visibleChange:"visibleChange",visibleIndexChange:"visibleIndexChange"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),cC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var uC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var hC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var pC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var gC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var mC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var wl=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Jh=(()=>{class i extends Dn{renderer;document;element;get cssClass(){return this._getOption("cssClass")}set cssClass(t){this._setOption("cssClass",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get html(){return this._getOption("html")}set html(t){this._setOption("html",t)}get locateInMenu(){return this._getOption("locateInMenu")}set locateInMenu(t){this._setOption("locateInMenu",t)}get location(){return this._getOption("location")}set location(t){this._setOption("location",t)}get menuItemTemplate(){return this._getOption("menuItemTemplate")}set menuItemTemplate(t){this._setOption("menuItemTemplate",t)}get options(){return this._getOption("options")}set options(t){this._setOption("options",t)}get showText(){return this._getOption("showText")}set showText(t){this._setOption("showText",t)}get template(){return this._getOption("template")}set template(t){this._setOption("template",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get toolbar(){return this._getOption("toolbar")}set toolbar(t){this._setOption("toolbar",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get widget(){return this._getOption("widget")}set widget(t){this._setOption("widget",t)}get _optionPath(){return"toolbarItems"}constructor(t,n,o,s,r,a){super(),this.renderer=o,this.document=s,this.element=a,t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this)),r.setHost(this)}setTemplate(t){this.template=t}ngAfterViewInit(){Yh(this,this.element,this.renderer,this.document)}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1),w(Fs),w(sl),w(se,1),w($e))};static \u0275cmp=Z({type:i,selectors:[["dxi-toolbar-item"]],inputs:{cssClass:"cssClass",disabled:"disabled",html:"html",locateInMenu:"locateInMenu",location:"location",menuItemTemplate:"menuItemTemplate",options:"options",showText:"showText",template:"template",text:"text",toolbar:"toolbar",visible:"visible",widget:"widget"},standalone:!1,features:[ue([k,se]),ne],ngContentSelectors:nC,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},styles:["[_nghost-%COMP%]{display:block}"]})}return i})(),Ui=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var $s=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var fC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var _C=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var nG=(()=>{class i extends Dn{get cssClass(){return this._getOption("cssClass")}set cssClass(t){this._setOption("cssClass",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get icon(){return this._getOption("icon")}set icon(t){this._setOption("icon",t)}get locateInMenu(){return this._getOption("locateInMenu")}set locateInMenu(t){this._setOption("locateInMenu",t)}get location(){return this._getOption("location")}set location(t){this._setOption("location",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get options(){return this._getOption("options")}set options(t){this._setOption("options",t)}get showText(){return this._getOption("showText")}set showText(t){this._setOption("showText",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get widget(){return this._getOption("widget")}set widget(t){this._setOption("widget",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var oG=(()=>{class i extends nG{get _optionPath(){return"fileSelectionItems"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-file-selection-item"]],inputs:{cssClass:"cssClass",disabled:"disabled",icon:"icon",locateInMenu:"locateInMenu",location:"location",name:"name",options:"options",showText:"showText",text:"text",visible:"visible",widget:"widget"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var CC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var xC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var vC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var bC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var sG=(()=>{class i extends ss{get applyFilter(){return this._getOption("applyFilter")}set applyFilter(t){this._setOption("applyFilter",t)}get applyFilterText(){return this._getOption("applyFilterText")}set applyFilterText(t){this._setOption("applyFilterText",t)}get betweenEndText(){return this._getOption("betweenEndText")}set betweenEndText(t){this._setOption("betweenEndText",t)}get betweenStartText(){return this._getOption("betweenStartText")}set betweenStartText(t){this._setOption("betweenStartText",t)}get operationDescriptions(){return this._getOption("operationDescriptions")}set operationDescriptions(t){this._setOption("operationDescriptions",t)}get resetOperationText(){return this._getOption("resetOperationText")}set resetOperationText(t){this._setOption("resetOperationText",t)}get showAllText(){return this._getOption("showAllText")}set showAllText(t){this._setOption("showAllText",t)}get showOperationChooser(){return this._getOption("showOperationChooser")}set showOperationChooser(t){this._setOption("showOperationChooser",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var Xre=(()=>{class i extends sG{get _optionPath(){return"filterRow"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-filter-row"]],inputs:{applyFilter:"applyFilter",applyFilterText:"applyFilterText",betweenEndText:"betweenEndText",betweenStartText:"betweenStartText",operationDescriptions:"operationDescriptions",resetOperationText:"resetOperationText",showAllText:"showAllText",showOperationChooser:"showOperationChooser",visible:"visible"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),yC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var OC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var EC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Sl=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var jt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var rG=(()=>{class i extends Dn{get alignByColumn(){return this._getOption("alignByColumn")}set alignByColumn(t){this._setOption("alignByColumn",t)}get column(){return this._getOption("column")}set column(t){this._setOption("column",t)}get customizeText(){return this._getOption("customizeText")}set customizeText(t){this._setOption("customizeText",t)}get displayFormat(){return this._getOption("displayFormat")}set displayFormat(t){this._setOption("displayFormat",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get showInColumn(){return this._getOption("showInColumn")}set showInColumn(t){this._setOption("showInColumn",t)}get showInGroupFooter(){return this._getOption("showInGroupFooter")}set showInGroupFooter(t){this._setOption("showInGroupFooter",t)}get skipEmptyValues(){return this._getOption("skipEmptyValues")}set skipEmptyValues(t){this._setOption("skipEmptyValues",t)}get summaryType(){return this._getOption("summaryType")}set summaryType(t){this._setOption("summaryType",t)}get valueFormat(){return this._getOption("valueFormat")}set valueFormat(t){this._setOption("valueFormat",t)}get _optionPath(){return"groupItems"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-group-item"]],inputs:{alignByColumn:"alignByColumn",column:"column",customizeText:"customizeText",displayFormat:"displayFormat",name:"name",showInColumn:"showInColumn",showInGroupFooter:"showInGroupFooter",skipEmptyValues:"skipEmptyValues",summaryType:"summaryType",valueFormat:"valueFormat"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),wC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var SC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var IC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var DC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var TC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Il=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Kt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var AC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var MC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Qre=(()=>{class i extends ss{get enabled(){return this._getOption("enabled")}set enabled(t){this._setOption("enabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get indicatorSrc(){return this._getOption("indicatorSrc")}set indicatorSrc(t){this._setOption("indicatorSrc",t)}get shading(){return this._getOption("shading")}set shading(t){this._setOption("shading",t)}get shadingColor(){return this._getOption("shadingColor")}set shadingColor(t){this._setOption("shadingColor",t)}get showIndicator(){return this._getOption("showIndicator")}set showIndicator(t){this._setOption("showIndicator",t)}get showPane(){return this._getOption("showPane")}set showPane(t){this._setOption("showPane",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get _optionPath(){return"loadPanel"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-load-panel"]],inputs:{enabled:"enabled",height:"height",indicatorSrc:"indicatorSrc",shading:"shading",shadingColor:"shadingColor",showIndicator:"showIndicator",showPane:"showPane",text:"text",width:"width"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),RC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Zre=(()=>{class i extends ss{get allowClearing(){return this._getOption("allowClearing")}set allowClearing(t){this._setOption("allowClearing",t)}get calculateCellValue(){return this._getOption("calculateCellValue")}set calculateCellValue(t){this._setOption("calculateCellValue",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(t){this._setOption("displayExpr",t)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(t){this._setOption("valueExpr",t)}get _optionPath(){return"lookup"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-lookup"]],inputs:{allowClearing:"allowClearing",calculateCellValue:"calculateCellValue",dataSource:"dataSource",displayExpr:"displayExpr",valueExpr:"valueExpr"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),FC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var PC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Ut=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var qt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var kC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var qi=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Jre=(()=>{class i extends ss{get allowedPageSizes(){return this._getOption("allowedPageSizes")}set allowedPageSizes(t){this._setOption("allowedPageSizes",t)}get displayMode(){return this._getOption("displayMode")}set displayMode(t){this._setOption("displayMode",t)}get infoText(){return this._getOption("infoText")}set infoText(t){this._setOption("infoText",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get showInfo(){return this._getOption("showInfo")}set showInfo(t){this._setOption("showInfo",t)}get showNavigationButtons(){return this._getOption("showNavigationButtons")}set showNavigationButtons(t){this._setOption("showNavigationButtons",t)}get showPageSizeSelector(){return this._getOption("showPageSizeSelector")}set showPageSizeSelector(t){this._setOption("showPageSizeSelector",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get _optionPath(){return"pager"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-pager"]],inputs:{allowedPageSizes:"allowedPageSizes",displayMode:"displayMode",infoText:"infoText",label:"label",showInfo:"showInfo",showNavigationButtons:"showNavigationButtons",showPageSizeSelector:"showPageSizeSelector",visible:"visible"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),BC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var eae=(()=>{class i extends ss{get enabled(){return this._getOption("enabled")}set enabled(t){this._setOption("enabled",t)}get pageIndex(){return this._getOption("pageIndex")}set pageIndex(t){this._setOption("pageIndex",t)}get pageSize(){return this._getOption("pageSize")}set pageSize(t){this._setOption("pageSize",t)}pageIndexChange;pageSizeChange;get _optionPath(){return"paging"}constructor(t,n){super(),this._createEventEmitters([{emit:"pageIndexChange"},{emit:"pageSizeChange"}]),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-paging"]],inputs:{enabled:"enabled",pageIndex:"pageIndex",pageSize:"pageSize"},outputs:{pageIndexChange:"pageIndexChange",pageSizeChange:"pageSizeChange"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),VC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var LC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Yt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var NC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var tae=(()=>{class i extends ss{get allowDropInsideItem(){return this._getOption("allowDropInsideItem")}set allowDropInsideItem(t){this._setOption("allowDropInsideItem",t)}get allowReordering(){return this._getOption("allowReordering")}set allowReordering(t){this._setOption("allowReordering",t)}get autoScroll(){return this._getOption("autoScroll")}set autoScroll(t){this._setOption("autoScroll",t)}get boundary(){return this._getOption("boundary")}set boundary(t){this._setOption("boundary",t)}get container(){return this._getOption("container")}set container(t){this._setOption("container",t)}get cursorOffset(){return this._getOption("cursorOffset")}set cursorOffset(t){this._setOption("cursorOffset",t)}get data(){return this._getOption("data")}set data(t){this._setOption("data",t)}get dragDirection(){return this._getOption("dragDirection")}set dragDirection(t){this._setOption("dragDirection",t)}get dragTemplate(){return this._getOption("dragTemplate")}set dragTemplate(t){this._setOption("dragTemplate",t)}get dropFeedbackMode(){return this._getOption("dropFeedbackMode")}set dropFeedbackMode(t){this._setOption("dropFeedbackMode",t)}get filter(){return this._getOption("filter")}set filter(t){this._setOption("filter",t)}get group(){return this._getOption("group")}set group(t){this._setOption("group",t)}get handle(){return this._getOption("handle")}set handle(t){this._setOption("handle",t)}get onAdd(){return this._getOption("onAdd")}set onAdd(t){this._setOption("onAdd",t)}get onDragChange(){return this._getOption("onDragChange")}set onDragChange(t){this._setOption("onDragChange",t)}get onDragEnd(){return this._getOption("onDragEnd")}set onDragEnd(t){this._setOption("onDragEnd",t)}get onDragMove(){return this._getOption("onDragMove")}set onDragMove(t){this._setOption("onDragMove",t)}get onDragStart(){return this._getOption("onDragStart")}set onDragStart(t){this._setOption("onDragStart",t)}get onRemove(){return this._getOption("onRemove")}set onRemove(t){this._setOption("onRemove",t)}get onReorder(){return this._getOption("onReorder")}set onReorder(t){this._setOption("onReorder",t)}get scrollSensitivity(){return this._getOption("scrollSensitivity")}set scrollSensitivity(t){this._setOption("scrollSensitivity",t)}get scrollSpeed(){return this._getOption("scrollSpeed")}set scrollSpeed(t){this._setOption("scrollSpeed",t)}get showDragIcons(){return this._getOption("showDragIcons")}set showDragIcons(t){this._setOption("showDragIcons",t)}get _optionPath(){return"rowDragging"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-row-dragging"]],inputs:{allowDropInsideItem:"allowDropInsideItem",allowReordering:"allowReordering",autoScroll:"autoScroll",boundary:"boundary",container:"container",cursorOffset:"cursorOffset",data:"data",dragDirection:"dragDirection",dragTemplate:"dragTemplate",dropFeedbackMode:"dropFeedbackMode",filter:"filter",group:"group",handle:"handle",onAdd:"onAdd",onDragChange:"onDragChange",onDragEnd:"onDragEnd",onDragMove:"onDragMove",onDragStart:"onDragStart",onRemove:"onRemove",onReorder:"onReorder",scrollSensitivity:"scrollSensitivity",scrollSpeed:"scrollSpeed",showDragIcons:"showDragIcons"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),HC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var $C=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var zC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var WC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var GC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var aG=(()=>{class i extends ss{get allowSelectAll(){return this._getOption("allowSelectAll")}set allowSelectAll(t){this._setOption("allowSelectAll",t)}get recursive(){return this._getOption("recursive")}set recursive(t){this._setOption("recursive",t)}get selectByClick(){return this._getOption("selectByClick")}set selectByClick(t){this._setOption("selectByClick",t)}get deferred(){return this._getOption("deferred")}set deferred(t){this._setOption("deferred",t)}get mode(){return this._getOption("mode")}set mode(t){this._setOption("mode",t)}get selectAllMode(){return this._getOption("selectAllMode")}set selectAllMode(t){this._setOption("selectAllMode",t)}get sensitivity(){return this._getOption("sensitivity")}set sensitivity(t){this._setOption("sensitivity",t)}get showCheckBoxesMode(){return this._getOption("showCheckBoxesMode")}set showCheckBoxesMode(t){this._setOption("showCheckBoxesMode",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var iae=(()=>{class i extends aG{get _optionPath(){return"selection"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-selection"]],inputs:{allowSelectAll:"allowSelectAll",recursive:"recursive",selectByClick:"selectByClick",deferred:"deferred",mode:"mode",selectAllMode:"selectAllMode",sensitivity:"sensitivity",showCheckBoxesMode:"showCheckBoxesMode"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),jC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var zs=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var KC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Xt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var nI=(()=>{class i extends Dn{get groupColumn(){return this._getOption("groupColumn")}set groupColumn(t){this._setOption("groupColumn",t)}get sortOrder(){return this._getOption("sortOrder")}set sortOrder(t){this._setOption("sortOrder",t)}get summaryItem(){return this._getOption("summaryItem")}set summaryItem(t){this._setOption("summaryItem",t)}get _optionPath(){return"sortByGroupSummaryInfo"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-sort-by-group-summary-info"]],inputs:{groupColumn:"groupColumn",sortOrder:"sortOrder",summaryItem:"summaryItem"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),UC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var qC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var YC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var lG=(()=>{class i extends Dn{get alignment(){return this._getOption("alignment")}set alignment(t){this._setOption("alignment",t)}get column(){return this._getOption("column")}set column(t){this._setOption("column",t)}get cssClass(){return this._getOption("cssClass")}set cssClass(t){this._setOption("cssClass",t)}get customizeText(){return this._getOption("customizeText")}set customizeText(t){this._setOption("customizeText",t)}get displayFormat(){return this._getOption("displayFormat")}set displayFormat(t){this._setOption("displayFormat",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get showInColumn(){return this._getOption("showInColumn")}set showInColumn(t){this._setOption("showInColumn",t)}get skipEmptyValues(){return this._getOption("skipEmptyValues")}set skipEmptyValues(t){this._setOption("skipEmptyValues",t)}get summaryType(){return this._getOption("summaryType")}set summaryType(t){this._setOption("summaryType",t)}get valueFormat(){return this._getOption("valueFormat")}set valueFormat(t){this._setOption("valueFormat",t)}get _optionPath(){return"totalItems"}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnDestroy(){this._deleteRemovedOptions(this._fullOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxi-total-item"]],inputs:{alignment:"alignment",column:"column",cssClass:"cssClass",customizeText:"customizeText",displayFormat:"displayFormat",name:"name",showInColumn:"showInColumn",skipEmptyValues:"skipEmptyValues",summaryType:"summaryType",valueFormat:"valueFormat"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),XC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var nae=(()=>{class i extends ss{get calculateCustomSummary(){return this._getOption("calculateCustomSummary")}set calculateCustomSummary(t){this._setOption("calculateCustomSummary",t)}get groupItems(){return this._getOption("groupItems")}set groupItems(t){this._setOption("groupItems",t)}get recalculateWhileEditing(){return this._getOption("recalculateWhileEditing")}set recalculateWhileEditing(t){this._setOption("recalculateWhileEditing",t)}get skipEmptyValues(){return this._getOption("skipEmptyValues")}set skipEmptyValues(t){this._setOption("skipEmptyValues",t)}get texts(){return this._getOption("texts")}set texts(t){this._setOption("texts",t)}get totalItems(){return this._getOption("totalItems")}set totalItems(t){this._setOption("totalItems",t)}get _optionPath(){return"summary"}get groupItemsChildren(){return this._getOption("groupItems")}set groupItemsChildren(t){this.setChildren("groupItems",t)}get totalItemsChildren(){return this._getOption("totalItems")}set totalItemsChildren(t){this.setChildren("totalItems",t)}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-summary"]],contentQueries:function(n,o,s){if(n&1&&(je(s,rG,4),je(s,lG,4)),n&2){let r;Ne(r=He())&&(o.groupItemsChildren=r),Ne(r=He())&&(o.totalItemsChildren=r)}},inputs:{calculateCustomSummary:"calculateCustomSummary",groupItems:"groupItems",recalculateWhileEditing:"recalculateWhileEditing",skipEmptyValues:"skipEmptyValues",texts:"texts",totalItems:"totalItems"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),QC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var ZC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var JC=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var Qt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var dG=(()=>{class i extends ss{get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get fileSelectionItems(){return this._getOption("fileSelectionItems")}set fileSelectionItems(t){this._setOption("fileSelectionItems",t)}get container(){return this._getOption("container")}set container(t){this._setOption("container",t)}get multiline(){return this._getOption("multiline")}set multiline(t){this._setOption("multiline",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275cmp=Z({type:i,selectors:[["ng-component"]],standalone:!1,features:[ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})();var oae=(()=>{class i extends dG{get _optionPath(){return"toolbar"}get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}get fileSelectionItemsChildren(){return this._getOption("fileSelectionItems")}set fileSelectionItemsChildren(t){this.setChildren("fileSelectionItems",t)}constructor(t,n){super(),t.setNestedOption(this),n.setHost(this,this._fullOptionPath.bind(this))}ngOnInit(){this._addRecreatedComponent()}ngOnDestroy(){this._addRemovedOption(this._getOptionPath())}static \u0275fac=function(n){return new(n||i)(w(k,5),w(k,1))};static \u0275cmp=Z({type:i,selectors:[["dxo-toolbar"]],contentQueries:function(n,o,s){if(n&1&&(je(s,so,4),je(s,oG,4)),n&2){let r;Ne(r=He())&&(o.itemsChildren=r),Ne(r=He())&&(o.fileSelectionItemsChildren=r)}},inputs:{disabled:"disabled",items:"items",visible:"visible",fileSelectionItems:"fileSelectionItems",container:"container",multiline:"multiline"},standalone:!1,features:[ue([k]),ne],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),ex=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var tx=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})();var uI=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(w(Fs),w($e))};static \u0275dir=ci({type:i})}return i})(),cG=(()=>{class i extends uI{static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275dir=ci({type:i,features:[ne]})}return i})(),Yi=new ga("");var uG={provide:Yi,useExisting:Zt(()=>up),multi:!0};function hG(){let i=h_()?h_().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var pG=new ga(""),up=(()=>{class i extends uI{_compositionMode;_composing=!1;constructor(t,n,o){super(t,n),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!hG())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)(w(Fs),w($e),w(pG,8))};static \u0275dir=ci({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,o){n&1&&et("input",function(r){return o._handleInput(r.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(r){return o._compositionEnd(r.target.value)})},standalone:!1,features:[ue([uG]),ne]})}return i})();function ax(i){return i==null||lx(i)===0}function lx(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var ba=new ga(""),Rl=new ga(""),gG=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Al=class{static min(e){return mG(e)}static max(e){return fG(e)}static required(e){return hI(e)}static requiredTrue(e){return _G(e)}static email(e){return CG(e)}static minLength(e){return xG(e)}static maxLength(e){return vG(e)}static pattern(e){return bG(e)}static nullValidator(e){return tp()}static compose(e){return CI(e)}static composeAsync(e){return vI(e)}};function mG(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function fG(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function hI(i){return ax(i.value)?{required:!0}:null}function _G(i){return i.value===!0?null:{required:!0}}function CG(i){return ax(i.value)||gG.test(i.value)?null:{email:!0}}function xG(i){return e=>{let t=e.value?.length??lx(e.value);return t===null||t===0?null:t<i?{minlength:{requiredLength:i,actualLength:t}}:null}}function vG(i){return e=>{let t=e.value?.length??lx(e.value);return t!==null&&t>i?{maxlength:{requiredLength:i,actualLength:t}}:null}}function bG(i){if(!i)return tp;let e,t;return typeof i=="string"?(t="",i.charAt(0)!=="^"&&(t+="^"),t+=i,i.charAt(i.length-1)!=="$"&&(t+="$"),e=new RegExp(t)):(t=i.toString(),e=i),n=>{if(ax(n.value))return null;let o=n.value;return e.test(o)?null:{pattern:{requiredPattern:t,actualValue:o}}}}function tp(i){return null}function pI(i){return i!=null}function gI(i){return lw(i)?sw(i):i}function mI(i){let e={};return i.forEach(t=>{e=t!=null?Ln(Ln({},e),t):e}),Object.keys(e).length===0?null:e}function fI(i,e){return e.map(t=>t(i))}function yG(i){return!i.validate}function _I(i){return i.map(e=>yG(e)?e:t=>e.validate(t))}function CI(i){if(!i)return null;let e=i.filter(pI);return e.length==0?null:function(t){return mI(fI(t,e))}}function xI(i){return i!=null?CI(_I(i)):null}function vI(i){if(!i)return null;let e=i.filter(pI);return e.length==0?null:function(t){let n=fI(t,e).map(gI);return aw(n).pipe(rw(mI))}}function bI(i){return i!=null?vI(_I(i)):null}function oI(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function yI(i){return i._rawValidators}function OI(i){return i._rawAsyncValidators}function ix(i){return i?Array.isArray(i)?i:[i]:[]}function ip(i,e){return Array.isArray(i)?i.includes(e):i===e}function sI(i,e){let t=ix(e);return ix(i).forEach(o=>{ip(t,o)||t.push(o)}),t}function rI(i,e){return ix(e).filter(t=>!ip(i,t))}var np=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=xI(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=bI(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Nn=class extends np{name;get formDirective(){return null}get path(){return null}},Hn=class extends np{_parent=null;name=null;valueAccessor=null},op=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},OG={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Oae=So(Ln({},OG),{"[class.ng-submitted]":"isSubmitted"}),Eae=(()=>{class i extends op{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(w(Hn,2))};static \u0275dir=ci({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,o){n&2&&ui("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[ne]})}return i})(),wae=(()=>{class i extends op{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(w(Nn,10))};static \u0275dir=ci({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,o){n&2&&ui("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[ne]})}return i})();var Oc="VALID",ep="INVALID",Dl="PENDING",Ec="DISABLED",Fr=class{},sp=class extends Fr{value;source;constructor(e,t){super(),this.value=e,this.source=t}},wc=class extends Fr{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Sc=class extends Fr{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Tl=class extends Fr{status;source;constructor(e,t){super(),this.status=e,this.source=t}},nx=class extends Fr{source;constructor(e){super(),this.source=e}},ox=class extends Fr{source;constructor(e){super(),this.source=e}};function dx(i){return(hp(i)?i.validators:i)||null}function EG(i){return Array.isArray(i)?xI(i):i||null}function cx(i,e){return(hp(e)?e.asyncValidators:i)||null}function wG(i){return Array.isArray(i)?bI(i):i||null}function hp(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function EI(i,e,t){let n=i.controls;if(!(e?Object.keys(n):n).length)throw new yh(1e3,"");if(!n[t])throw new yh(1001,"")}function wI(i,e,t){i._forEachChild((n,o)=>{if(t[o]===void 0)throw new yh(1002,"")})}var Ml=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return vr(this.statusReactive)}set status(e){vr(()=>this.statusReactive.set(e))}_status=nc(()=>this.statusReactive());statusReactive=ic(void 0);get valid(){return this.status===Oc}get invalid(){return this.status===ep}get pending(){return this.status==Dl}get disabled(){return this.status===Ec}get enabled(){return this.status!==Ec}errors;get pristine(){return vr(this.pristineReactive)}set pristine(e){vr(()=>this.pristineReactive.set(e))}_pristine=nc(()=>this.pristineReactive());pristineReactive=ic(!0);get dirty(){return!this.pristine}get touched(){return vr(this.touchedReactive)}set touched(e){vr(()=>this.touchedReactive.set(e))}_touched=nc(()=>this.touchedReactive());touchedReactive=ic(!1);get untouched(){return!this.touched}_events=new ow;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(sI(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(sI(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(rI(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(rI(e,this._rawAsyncValidators))}hasValidator(e){return ip(this._rawValidators,e)}hasAsyncValidator(e){return ip(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(So(Ln({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Sc(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new Sc(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(So(Ln({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new wc(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new wc(!0,n))}markAsPending(e={}){this.status=Dl;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Tl(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(So(Ln({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Ec,this.errors=null,this._forEachChild(o=>{o.disable(So(Ln({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new sp(this.value,n)),this._events.next(new Tl(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(So(Ln({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Oc,this._forEachChild(n=>{n.enable(So(Ln({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(So(Ln({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Oc||this.status===Dl)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new sp(this.value,t)),this._events.next(new Tl(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(So(Ln({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ec:Oc}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Dl,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let n=gI(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,o)=>n&&n._find(o),this)}getError(e,t){let n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Tl(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new vt,this.statusChanges=new vt}_calculateStatus(){return this._allControlsDisabled()?Ec:this.errors?ep:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Dl)?Dl:this._anyControlsHaveStatus(ep)?ep:Oc}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),o=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),o&&this._events.next(new wc(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Sc(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){hp(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=EG(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=wG(this._rawAsyncValidators)}},rp=class extends Ml{constructor(e,t,n){super(dx(t),cx(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,n={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){wI(this,!0,e),Object.keys(e).forEach(n=>{EI(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(Object.keys(e).forEach(n=>{let o=this.controls[n];o&&o.patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((n,o)=>{n.reset(e?e[o]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&e(n,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(t,n,o)=>((n.enabled||this.disabled)&&(t[o]=n.value),t))}_reduceChildren(e,t){let n=e;return this._forEachChild((o,s)=>{n=t(n,o,s)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var sx=class extends rp{};var Dc=new ga("",{providedIn:"root",factory:()=>pp}),pp="always";function gp(i,e){return[...e.path,i]}function ap(i,e,t=pp){ux(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),IG(i,e),TG(i,e),DG(i,e),SG(i,e)}function lp(i,e,t=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),cp(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function dp(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function SG(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function ux(i,e){let t=yI(i);e.validator!==null?i.setValidators(oI(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=OI(i);e.asyncValidator!==null?i.setAsyncValidators(oI(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let o=()=>i.updateValueAndValidity();dp(e._rawValidators,o),dp(e._rawAsyncValidators,o)}function cp(i,e){let t=!1;if(i!==null){if(e.validator!==null){let o=yI(i);if(Array.isArray(o)&&o.length>0){let s=o.filter(r=>r!==e.validator);s.length!==o.length&&(t=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let o=OI(i);if(Array.isArray(o)&&o.length>0){let s=o.filter(r=>r!==e.asyncValidator);s.length!==o.length&&(t=!0,i.setAsyncValidators(s))}}}let n=()=>{};return dp(e._rawValidators,n),dp(e._rawAsyncValidators,n),t}function IG(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&SI(i,e)})}function DG(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&SI(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function SI(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function TG(i,e){let t=(n,o)=>{e.valueAccessor.writeValue(n),o&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function AG(i,e){i==null,ux(i,e)}function MG(i,e){return cp(i,e)}function hx(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function RG(i){return Object.getPrototypeOf(i.constructor)===cG}function FG(i,e){i._syncPendingControls(),e.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function px(i,e){if(!e)return null;Array.isArray(e);let t,n,o;return e.forEach(s=>{s.constructor===up?t=s:RG(s)?n=s:o=s}),o||n||t||null}function PG(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function aI(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function lI(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Ic=class extends Ml{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(dx(t),cx(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),hp(t)&&(t.nonNullable||t.initialValueIsDefault)&&(lI(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){aI(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){aI(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){lI(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var kG=i=>i instanceof Ic,BG=(()=>{class i extends Nn{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return gp(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275dir=ci({type:i,standalone:!1,features:[ne]})}return i})();var VG={provide:Hn,useExisting:Zt(()=>LG)},dI=Promise.resolve(),LG=(()=>{class i extends Hn{_changeDetectorRef;callSetDisabledState;control=new Ic;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new vt;constructor(t,n,o,s,r,a){super(),this._changeDetectorRef=r,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=px(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),hx(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){ap(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){dI.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,o=n!==0&&u_(n);dI.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?gp(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(w(Nn,9),w(ba,10),w(Rl,10),w(Yi,10),w(xr,8),w(Dc,8))};static \u0275dir=ci({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ue([VG]),ne,it]})}return i})();var Iae=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=ci({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})();var gx=new ga(""),NG={provide:Hn,useExisting:Zt(()=>HG)},HG=(()=>{class i extends Hn{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(t){}model;update=new vt;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,n,o,s,r){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=r,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=px(this,o)}ngOnChanges(t){if(this._isControlChanged(t)){let n=t.form.previousValue;n&&lp(n,this,!1),ap(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}hx(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&lp(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}static \u0275fac=function(n){return new(n||i)(w(ba,10),w(Rl,10),w(Yi,10),w(gx,8),w(Dc,8))};static \u0275dir=ci({type:i,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[ue([NG]),ne,it]})}return i})(),$G={provide:Nn,useExisting:Zt(()=>II)},II=(()=>{class i extends Nn{callSetDisabledState;get submitted(){return vr(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}_submitted=nc(()=>this._submittedReactive());_submittedReactive=ic(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new vt;constructor(t,n,o){super(),this.callSetDisabledState=o,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(cp(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return ap(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){lp(t.control||null,t,!1),PG(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this._submittedReactive.set(!0),FG(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new nx(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new ox(this.form))}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,o=this.form.get(t.path);n!==o&&(lp(n||null,t),kG(o)&&(ap(o,t,this.callSetDisabledState),t.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);AG(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&MG(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ux(this.form,this),this._oldForm&&cp(this._oldForm,this)}static \u0275fac=function(n){return new(n||i)(w(ba,10),w(Rl,10),w(Dc,8))};static \u0275dir=ci({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,o){n&1&&et("submit",function(r){return o.onSubmit(r)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[ue([$G]),ne,it]})}return i})(),zG={provide:Nn,useExisting:Zt(()=>DI)},DI=(()=>{class i extends BG{name=null;constructor(t,n,o){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){AI(this._parent)}static \u0275fac=function(n){return new(n||i)(w(Nn,13),w(ba,10),w(Rl,10))};static \u0275dir=ci({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[ue([zG]),ne]})}return i})(),WG={provide:Nn,useExisting:Zt(()=>TI)},TI=(()=>{class i extends Nn{_parent;name=null;constructor(t,n,o){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(o)}ngOnInit(){AI(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return gp(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||i)(w(Nn,13),w(ba,10),w(Rl,10))};static \u0275dir=ci({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[ue([WG]),ne]})}return i})();function AI(i){return!(i instanceof DI)&&!(i instanceof II)&&!(i instanceof TI)}var GG={provide:Hn,useExisting:Zt(()=>jG)},jG=(()=>{class i extends Hn{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(t){}model;update=new vt;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,n,o,s,r){super(),this._ngModelWarningConfig=r,this._parent=t,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=px(this,s)}ngOnChanges(t){this._added||this._setUpControl(),hx(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return gp(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||i)(w(Nn,13),w(ba,10),w(Rl,10),w(Yi,10),w(gx,8))};static \u0275dir=ci({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[ue([GG]),ne,it]})}return i})();var KG=(()=>{class i{_validator=tp;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):tp,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=ci({type:i,features:[it]})}return i})();var UG={provide:ba,useExisting:Zt(()=>qG),multi:!0};var qG=(()=>{class i extends KG{required;inputName="required";normalizeInput=u_;createValidator=t=>hI;enabled(t){return t}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Zi(i)))(o||i)}})();static \u0275dir=ci({type:i,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,o){n&2&&Io("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[ue([UG]),ne]})}return i})();var MI=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({})}return i})(),rx=class extends Ml{constructor(e,t,n){super(dx(t),cx(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,n={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(e,t={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,n={}){let o=this._adjustIndex(e);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),t&&(this.controls.splice(o,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){wI(this,!1,e),e.forEach((n,o)=>{EI(this,!1,o),this.at(o).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(e.forEach((n,o)=>{this.at(o)&&this.at(o).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((n,o)=>{n.reset(e[o],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,n)=>n._syncPendingControls()?!0:t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,n)=>{e(t,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function cI(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Dae=(()=>{class i{useNonNullable=!1;get nonNullable(){let t=new i;return t.useNonNullable=!0,t}group(t,n=null){let o=this._reduceControls(t),s={};return cI(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new rp(o,s)}record(t,n=null){let o=this._reduceControls(t);return new sx(o,n)}control(t,n,o){let s={};return this.useNonNullable?(cI(n)?s=n:(s.validators=n,s.asyncValidators=o),new Ic(t,So(Ln({},s),{nonNullable:!0}))):new Ic(t,n,o)}array(t,n,o){let s=t.map(r=>this._createControl(r));return new rx(s,n,o)}_reduceControls(t){let n={};return Object.keys(t).forEach(o=>{n[o]=this._createControl(t[o])}),n}_createControl(t){if(t instanceof Ic)return t;if(t instanceof Ml)return t;if(Array.isArray(t)){let n=t[0],o=t.length>1?t[1]:null,s=t.length>2?t[2]:null;return this.control(n,o,s)}else return this.control(t)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Jd({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var RI=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Dc,useValue:t.callSetDisabledState??pp}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[MI]})}return i})(),Tae=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:gx,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Dc,useValue:t.callSetDisabledState??pp}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[MI]})}return i})();function YG(i){return i&&i.get?i.get(0):i}var XG=YG;function H(i){return XG(i)}var QG=/matrix(3d)?\((.+?)\)/,ZG=/translate(?:3d)?\((.+?)\)/,Ti=function(i){i=u(i);let e=Tc(i);return{left:e.x,top:e.y}};function mp(i){return Ii(i)==="string"&&i[i.length-1]==="%"}function PI(i,e){i.length&&Xe(i.get(0),"dxTranslator",e)}var fp=function(i){i.length&&Ir(i.get(0),"dxTranslator")},Fl=function(i){i.x=i.x||0,i.y=i.y||0;let e=mp(i.x)?i.x:i.x+"px",t=mp(i.y)?i.y:i.y+"px";return"translate("+e+", "+t+")"},Tc=function(i){let e=i.length?Xe(i.get(0),"dxTranslator"):null;if(!e){let n=(i.css("transform")||Fl({x:0,y:0})).match(QG),o=n&&n[1];n?(n=n[2].split(","),o==="3d"?n=n.slice(12,15):(n.push(0),n=n.slice(4,7))):n=[0,0,0],e={x:parseFloat(n[0]),y:parseFloat(n[1]),z:parseFloat(n[2])},PI(i,e)}return e},Ve=function(i,e){i=u(i);let t=e.left,n=e.top,o;t===void 0?(o=Tc(i),o.y=n||0):n===void 0?(o=Tc(i),o.x=t||0):(o={x:t||0,y:n||0,z:0},PI(i,o)),i.css({transform:Fl(o)}),(mp(t)||mp(n))&&fp(i)},rs=function(i,e){i=u(i);let t,n={left:0,top:0,transform:"none"};e&&(t=i.css("transition"),n.transition="none"),i.css(n),fp(i),e&&(i.get(0).offsetHeight,i.css("transition",t))},kI=function(i){let e=i.match(ZG);if(!(!e||!e[1]))return e=e[1].split(","),e={x:parseFloat(e[0]),y:parseFloat(e[1]),z:parseFloat(e[2])},e};var BI=/cubic-bezier\((\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\)/,VI={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)"},JG=function(i,e,t,n){let o=3*i,s=3*(t-i)-o,r=1-o-s,a=3*e,l=3*(n-e)-a,d=1-a-l,c=function(p){return p*(o+p*(s+p*r))},h=function(p){return o+p*(2*s+3*p*r)};return function(p){return function(g){return g*(a+g*(l+g*d))}(function(g){let C=g,v=0,b;for(;v<14&&(b=c(C)-g,!(Math.abs(b)<.001));)C-=b/h(C),v++;return C}(p))}},mx={},LI=function(i){i=VI[i]||i;let e=i.match(BI),t;e||(t="linear",e=VI[t].match(BI)),e=e.slice(1,5);for(let o=0;o<e.length;o++)e[o]=parseFloat(e[o]);let n=t||"cubicbezier_"+e.join("_").replace(/\./g,"p");return A(mx[n])||(mx[n]=function(o,s,r,a,l){return a*JG(e[0],e[1],e[2],e[3])(s/l)+r}),n};function NI(i){return mx[i]}var ro=j()?q():{},Hae=1e3/60,HI=function(i){return setTimeout(i,16.666666666666668)},$I=function(i){clearTimeout(i)},zI=dn(function(){let i=ro.requestAnimationFrame||ro.webkitRequestAnimationFrame||ro.mozRequestAnimationFrame||ro.oRequestAnimationFrame||ro.msRequestAnimationFrame,e=ro.cancelAnimationFrame||ro.webkitCancelAnimationFrame||ro.mozCancelAnimationFrame||ro.oCancelAnimationFrame||ro.msCancelAnimationFrame;i&&e&&(HI=i,$I=e)});function Pr(){return zI(),HI.apply(ro,arguments)}function $n(){zI(),$I.apply(ro,arguments)}var vx={};lz(vx,{animation:()=>bp,inputType:()=>Oa,nativeScrolling:()=>lo,pointerEvents:()=>XI,styleProp:()=>Do,stylePropPrefix:()=>fl,supportProp:()=>Cx,touch:()=>ao,touchEvents:()=>YI,transition:()=>vp,transitionEndEventName:()=>xx});var e4=function(){let i,e=ge(),t=e.add,n=e.remove;if(!j())return e;let o=function(){let l=q();return{width:l.innerWidth,height:l.innerHeight}},s=function(){let l=o();if(l.width===i.width&&l.height===i.height)return;let d;l.width===i.width&&(d="height"),l.height===i.height&&(d="width"),i=l,e.fire(d)},r=dn(function(){i=o()}),a;return e.add=function(){let l=t.apply(e,arguments);return r(),ri.add(function(){!a&&e.has()&&(a=S.listen(q(),"resize",s))}),l},e.remove=function(){let l=n.apply(e,arguments);return!e.has()&&a&&(a(),a=void 0),l},e}(),Mo=e4;var t4=q(),_p=function(){let i;try{i=t4.sessionStorage}catch{}return i};var i4=ri.add,ya=ge(),WI=u(),zn=function(){let i;return function(e){if(!arguments.length)return i;let t=u(e);WI=t;let n=!!t.length,o=zn();i=n?t:u("body"),ya.fire(n?zn():u(),o)}}();i4(function(){zn(".dx-viewport")});function Cp(){return WI}var UI=q(),n4={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"},GI={deviceType:"desktop",platform:"generic",version:[],phone:!1,tablet:!1,android:!1,ios:!1,generic:!0,grade:"A",mac:!1},fx={generic(i){let e=/windows phone/i.test(i)||i.match(/WPDesktop/),t=!e&&/Windows(.*)arm(.*)Tablet PC/i.test(i),n=!e&&!t&&/msapphost/i.test(i),o=/((intel|ppc) mac os x)/.test(i.toLowerCase());return e||t||n||o?{deviceType:e?"phone":t?"tablet":"desktop",platform:"generic",version:[],grade:"A",mac:o}:null},appleTouchDevice(i){let e=Bs(),t=/Macintosh/i.test(i)&&e?.maxTouchPoints>2;if(!/ip(hone|od|ad)/i.test(i)&&!t)return null;let o=/ip(hone|od)/i.test(i),s=i.match(/os\s{0,}X? (\d+)_(\d+)_?(\d+)?/i),r=s?[parseInt(s[1],10),parseInt(s[2],10),parseInt(s[3]||0,10)]:[],l=UI.screen.height===480?"B":"A";return{deviceType:o?"phone":"tablet",platform:"ios",version:r,grade:l}},android(i){let e=/android|htc_|silk/i.test(i),t=/windows phone/i.test(i);if(!e||t)return null;let n=/mobile/i.test(i),o=i.match(/android (\d+)\.?(\d+)?\.?(\d+)?/i),s=o?[parseInt(o[1],10),parseInt(o[2]||0,10),parseInt(o[3]||0,10)]:[],a=s.length>1&&(s[0]<4||s[0]===4&&s[1]<4)?"B":"A";return{deviceType:n?"phone":"tablet",platform:"android",version:s,grade:a}}},jI=[fx.appleTouchDevice,fx.android,fx.generic],_x=class{constructor(e){this._window=e?.window||UI,this._realDevice=this._getDevice(),this._currentDevice=void 0,this._currentOrientation=void 0,this._eventsStrategy=new oo(this),this.changed=ge(),j()&&(ri.add(this._recalculateOrientation.bind(this)),Mo.add(this._recalculateOrientation.bind(this)))}current(e){if(e){this._currentDevice=this._getDevice(e),this._forced=!0,this.changed.fire();return}if(!this._currentDevice){e=void 0;try{e=this._getDeviceOrNameFromWindowScope()}catch{e=this._getDeviceNameFromSessionStorage()}finally{e||(e=this._getDeviceNameFromSessionStorage()),e&&(this._forced=!0)}this._currentDevice=this._getDevice(e)}return this._currentDevice}real(e){return m({},this._realDevice)}orientation(){return this._currentOrientation}isForced(){return this._forced}isRippleEmulator(){return!!this._window.tinyHippos}_getCssClasses(e){let t=[],n=this._realDevice;return e=e||this.current(),e.deviceType&&(t.push(`dx-device-${e.deviceType}`),e.deviceType!=="desktop"&&t.push("dx-device-mobile")),t.push(`dx-device-${n.platform}`),n.version&&n.version.length&&t.push(`dx-device-${n.platform}-${n.version[0]}`),this.isSimulator()&&t.push("dx-simulator"),xe().rtlEnabled&&t.push("dx-rtl"),t}attachCssClasses(e,t){this._deviceClasses=this._getCssClasses(t).join(" "),u(e).addClass(this._deviceClasses)}detachCssClasses(e){u(e).removeClass(this._deviceClasses)}isSimulator(){try{return this._isSimulator||j()&&this._window.top!==this._window.self&&this._window.top["dx-force-device"]||this.isRippleEmulator()}catch{return!1}}forceSimulator(){this._isSimulator=!0}_getDevice(e){if(e==="genericPhone"&&(e={deviceType:"phone",platform:"generic",generic:!0}),X(e))return this._fromConfig(e);{let t;if(e){if(t=n4[e],!t)throw me.Error("E0005")}else t=Bs().userAgent;return this._fromUA(t)}}_getDeviceOrNameFromWindowScope(){let e;return j()&&(this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"])&&(e=this._window.top["dx-force-device-object"]||this._window.top["dx-force-device"]),e}_getDeviceNameFromSessionStorage(){let e=_p();if(!e)return;let t=e.getItem("dx-force-device");try{return JSON.parse(t)}catch{return t}}_fromConfig(e){let t=m({},GI,this._currentDevice,e),n={phone:t.deviceType==="phone",tablet:t.deviceType==="tablet",android:t.platform==="android",ios:t.platform==="ios",generic:t.platform==="generic"};return m(t,n)}_fromUA(e){for(let t=0;t<jI.length;t+=1){let n=jI[t],o=n(e);if(o)return this._fromConfig(o)}return GI}_changeOrientation(){let e=u(this._window),t=Q(e)>W(e)?"portrait":"landscape";this._currentOrientation!==t&&(this._currentOrientation=t,this._eventsStrategy.fireEvent("orientationChanged",[{orientation:t}]))}_recalculateOrientation(){let e=W(this._window);this._currentWidth!==e&&(this._currentWidth=e,this._changeOrientation())}on(e,t){return this._eventsStrategy.on(e,t),this}off(e,t){return this._eventsStrategy.off(e,t),this}},xp=new _x,KI=zn();KI&&xp.attachCssClasses(KI);ya.add((i,e)=>{xp.detachCssClasses(e),xp.attachCssClasses(i)});var F=xp;var{maxTouchPoints:qI}=Bs(),o4={webkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},Cx=function(i){return!!Do(i)},s4=function(){let{platform:i,mac:e}=F.real();return i==="ios"||i==="android"||e},Oa=function(i){if(i==="text")return!0;let e=S.createElement("input");try{return e.setAttribute("type",i),e.value="wrongValue",!e.value}catch{return!1}},r4=function(i,e){return(i("ontouchstart")||!!e)&&!i("callPhantom")},a4=function(i){return i("PointerEvent")},YI=r4(v_,qI),XI=a4(v_),l4=!!qI;var ao=YI||XI&&l4,vp=dn(function(){return Cx("transition")}),xx=dn(function(){return o4[Do("transition")]}),bp=dn(function(){return Cx("animation")}),lo=s4();var un=i=>i??xe().rtlEnabled?"right":"left",Pe=i=>{var e;return Ue(i)?{width:i.outerWidth,height:i.outerHeight}:(e=i.getBoundingClientRect)===null||e===void 0?void 0:e.call(i)};var d4=Bs(),c4=/(webkit)[ /]([\w.]+)/,u4=/(mozilla)(?:.*? rv:([\w.]+))/,QI=i=>{i=i.toLowerCase();let e={},t=c4.exec(i)||i.indexOf("compatible")<0&&u4.exec(i)||[],n=t[1],o=t[2];return n==="webkit"&&(e.webkit=!0,i.indexOf("chrome")>=0||i.indexOf("crios")>=0?(n="chrome",o=/(?:chrome|crios)\/(\d+\.\d+)/.exec(i),o=o&&o[1]):i.indexOf("fxios")>=0?(n="mozilla",o=/fxios\/(\d+\.\d+)/.exec(i),o=o&&o[1]):i.indexOf("safari")>=0&&/version|phantomjs/.test(i)?(n="safari",o=/(?:version|phantomjs)\/([0-9.]+)/.exec(i),o=o&&o[1]):(n="unknown",o=/applewebkit\/([0-9.]+)/.exec(i),o=o&&o[1])),n&&(e[n]=!0,e.version=o),e},we=m({_fromUA:QI},QI(d4.userAgent));var ZI=q(),h4=/left|right/,p4=/top|bottom/,JI=/fit|flip|none/,g4=/scale\(.+?\)/,m4=we.safari,bx=function(i){let e={h:"center",v:"center"},t=es(i);return t&&x(t,function(){let n=String(this).toLowerCase();h4.test(n)?e.h=n:p4.test(n)&&(e.v=n)}),e},eD=function(i,e){return pl(i,e)},f4=function(i){let e=es(i),t=String(e&&e[0]).toLowerCase(),n=String(e&&e[1]).toLowerCase();return JI.test(t)||(t="none"),JI.test(n)||(n=t),{h:t,v:n}},tD=function(i){switch(i){case"center":return .5;case"right":case"bottom":return 1;default:return 0}},yx=function(i){switch(i){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return i}},Ox=function(i,e){let t=0;return i.myLocation<e.min&&(t+=e.min-i.myLocation),i.myLocation>e.max&&(t+=i.myLocation-e.max),t},iD=function(i,e,t){return e.myLocation<t.min?i==="h"?"left":"top":e.myLocation>t.max?i==="h"?"right":"bottom":"none"},Ex=function(i){i.myLocation=i.atLocation+tD(i.atAlign)*i.atSize-tD(i.myAlign)*i.mySize+i.offset},yp={fit:function(i,e){let t=!1;i.myLocation>e.max&&(i.myLocation=e.max,t=!0),i.myLocation<e.min&&(i.myLocation=e.min,t=!0),i.fit=t},flip:function(i,e){if(i.flip=!1,!(i.myAlign==="center"&&i.atAlign==="center")&&(i.myLocation<e.min||i.myLocation>e.max)){let t=m({},i,{myAlign:yx(i.myAlign),atAlign:yx(i.atAlign),offset:-i.offset});Ex(t),t.oversize=Ox(t,e),(t.myLocation>=e.min&&t.myLocation<=e.max||i.oversize>t.oversize)&&(i.myLocation=t.myLocation,i.oversize=t.oversize,i.flip=!0)}},flipfit:function(i,e){this.flip(i,e),this.fit(i,e)},none:function(i){i.oversize=0}},oD,sD=function(){let i=u("<div>").css({width:100,height:100,overflow:"scroll",position:"absolute",top:-9999}).appendTo(u("body")),e=i.get(0).offsetWidth-i.get(0).clientWidth;i.remove(),oD=e},_4={h:{location:0,flip:!1,fit:!1,oversize:0},v:{location:0,flip:!1,fit:!1,oversize:0}},rD=function(i,e){let t=u(i),n=t.offset(),o=m(!0,{},_4,{h:{location:n.left},v:{location:n.top}});if(!e)return o;let s=bx(e.my),r=bx(e.at),a=u(e.of).length&&e.of||ZI,l=eD(e.offset,e.precise),d=f4(e.collision),c=e.boundary,h=eD(e.boundaryOffset,e.precise),p={mySize:ae(t),myAlign:s.h,atAlign:r.h,offset:l.h,collision:d.h,boundaryOffset:h.h},g={mySize:ee(t),myAlign:s.v,atAlign:r.v,offset:l.v,collision:d.v,boundaryOffset:h.v};if(a.preventDefault)p.atLocation=a.pageX,g.atLocation=a.pageY,p.atSize=0,g.atSize=0;else if(a=u(a),Ue(a[0]))p.atLocation=a.scrollLeft(),g.atLocation=a.scrollTop(),F.real().deviceType==="phone"&&a[0].visualViewport?(p.atLocation=Math.max(p.atLocation,a[0].visualViewport.offsetLeft),g.atLocation=Math.max(g.atLocation,a[0].visualViewport.offsetTop),p.atSize=a[0].visualViewport.width,g.atSize=a[0].visualViewport.height):(p.atSize=a[0].innerWidth>a[0].outerWidth?a[0].innerWidth:W(a),g.atSize=a[0].innerHeight>a[0].outerHeight||m4?a[0].innerHeight:Q(a));else if(a[0].nodeType===9)p.atLocation=0,g.atLocation=0,p.atSize=W(a),g.atSize=Q(a);else{let b=Pe(a.get(0)),T=Op(a);p.atLocation=T.left,g.atLocation=T.top,p.atSize=Math.max(b.width,ae(a)),g.atSize=Math.max(b.height,ee(a))}Ex(p),Ex(g);let C=function(){let b=u(ZI),T=W(b),M=Q(b),G=b.scrollLeft(),te=b.scrollTop(),oe=S.getDocumentElement(),re=ao?oe.clientWidth/T:1,Ie=ao?oe.clientHeight/M:1;oD===void 0&&sD();let Fe=T,We=M;if(c&&!Ue(c)){let di=u(c),St=di.offset();G=St.left,te=St.top,Fe=W(di),We=Q(di)}return{h:{min:G+p.boundaryOffset,max:G+Fe/re-p.mySize-p.boundaryOffset},v:{min:te+g.boundaryOffset,max:te+We/Ie-g.mySize-g.boundaryOffset}}}();p.oversize=Ox(p,C.h),g.oversize=Ox(g,C.v),p.collisionSide=iD("h",p,C.h),g.collisionSide=iD("v",g,C.v),yp[p.collision]&&yp[p.collision](p,C.h),yp[g.collision]&&yp[g.collision](g,C.v);let v=function(b){return e.precise?b:Math.round(b)};return m(!0,o,{h:{location:v(p.myLocation),oversize:v(p.oversize),fit:p.fit,flip:p.flip,collisionSide:p.collisionSide},v:{location:v(g.myLocation),oversize:v(g.oversize),fit:g.fit,flip:g.flip,collisionSide:g.collisionSide},precise:e.precise}),o},nD=function(i,e,t,n){let o=f(i.style)&&!S.isNode(i.style),s=n?t.replace(e,""):t;if(o)zh(i,s,!1);else{let r=S.createAttribute("style");r.value=s,i.setAttributeNode(r)}},Op=function(i){var e,t;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i,o=n.get(0);if(!o)return i.offset();let s=((e=o.getAttribute)===null||e===void 0?void 0:e.call(o,"style"))||"",r=(t=s.match(g4))===null||t===void 0?void 0:t[0],a;return r?(nD(o,r,s,!0),a=Op(i,n.parent()),nD(o,r,s,!1)):a=Op(i,n.parent()),a},Ac=function(i,e){let t=u(i);if(!e)return t.offset();rs(t,!0);let n=Op(t),o=e.h&&e.v?e:rD(t,e),s=function(r){return e.precise?r:Math.round(r)};return Ve(t,{left:o.h.location-s(n.left),top:o.v.location-s(n.top)}),o},C4=function(i){return i=u(i).get(0),Ue(i)?null:i&&"pageY"in i&&"pageX"in i?{top:i.pageY,left:i.pageX}:u(i).offset()};Ac.inverseAlign||(Ac.inverseAlign=yx);Ac.normalizeAlign||(Ac.normalizeAlign=bx);var xt={calculateScrollbarWidth:sD,calculate:rD,setup:Ac,offset:C4};var aD=function(i,e){let t={};"noBubble"in e&&(t.noBubble=e.noBubble),"bindType"in e&&(t.bindType=e.bindType),"delegateType"in e&&(t.delegateType=e.delegateType),x(["setup","teardown","add","remove","trigger","handle","_default","dispose"],function(n,o){e[o]&&(t[o]=function(){let s=[].slice.call(arguments);return s.unshift(this),e[o].apply(e,s)})}),ac.fire(i,t)};aD.callbacks=ac;var Vi=aD;var ai="dxremove",wx="dxRemoveEvent";Zw(function(i){i=[].slice.call(i);for(let e=0;e<i.length;e++){let t=u(i[e]);t.prop(wx)&&(t[0][wx]=null,_.triggerHandler(t,"dxremove"))}});Vi("dxremove",{noBubble:!0,setup:function(i){u(i).prop(wx,!0)}});var Sx=(i,e)=>{if(!e)throw me.Error("E0017");return Array.isArray(i)?i.map(t=>Sx(t,e)).join(" "):i.indexOf(" ")!==-1?Sx(i.split(/\s+/g),e):`${i}.${e}`},lD=Sx;var dD=function(i,e){if(!x4(i))return!1;let t=i.nodeName.toLowerCase(),n=!isNaN(e),o=i.disabled,s=/^(input|select|textarea|button|object|iframe)$/.test(t),r=t==="a",a,l=i.isContentEditable;return s||l?a=!o:r?a=i.href||n:a=n,a};function x4(i){let e=u(i);return e.is(":visible")&&e.css("visibility")!=="hidden"&&e.parents().css("visibility")!=="hidden"}var Mc=function(i,e){return dD(e,u(e).attr("tabIndex"))},Rc=function(i,e){let t=u(e).attr("tabIndex");return(isNaN(t)||t>=0)&&dD(e,t)},Tn=function(i){let e=u(i).get(0);return S.getActiveElement(e)===e};var v4={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"},b4={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"},y4={dx:/^dx/i,mouse:/(mouse|wheel)/i,touch:/^touch/i,keyboard:/^key/i,pointer:/^(ms)?pointer/i},O4=i=>i,E4=i=>O4(_.Event(i,i),i),Ix=i=>Pl(i)==="dx",w4=i=>Pl(i)==="mouse",cD=i=>Pl(i)==="touch",Pl=i=>{let{type:e}=i,t="other";return x(y4,function(n){if(this.test(e))return t=n,!1}),t},uD=i=>Pl(i)==="pointer",co=i=>w4(i)||(uD(i)||Ix(i))&&i.pointerType==="mouse",hi=i=>i&&i.type==="dxmousewheel",Ws=i=>cD(i)||(uD(i)||Ix(i))&&i.pointerType==="touch";var rt=i=>{let{pageX:e,pageY:t,timeStamp:n}=i;return{x:e,y:t,time:n}},as=(i,e)=>({x:e.x-i.x,y:e.y-i.y,time:e.time-i.time||1}),hD=i=>{let{originalEvent:e,pointers:t}=i;return cD(i)?(e.touches||[]).length:Ix(i)?(t||[]).length:0},S4=!1;var Ep=i=>{if(S4)return!0;let{target:e}=i,t=u(e),n=e?.isContentEditable||e?.hasAttribute("contenteditable"),o=t.is("input, textarea, select")||n;if(hi(i))return t.is("textarea")&&t.hasClass("dx-texteditor-input")||n?!1:t.is("input[type='number'], textarea, select")&&t.is(":focus");if(co(i))return o||i.which>1;if(Ws(i))return o&&Tn(t)};var Ro=(i,e)=>{let t=E4(i);return e&&m(t,e),t},hn=i=>{let{originalEvent:e,delegateTarget:t}=i,n=Ro(e,i);return _.trigger(t||n.target,n),n},ke=i=>{let{key:e,which:t}=i,n=v4[e?.toLowerCase()]||e,o=b4[t];return o&&n===e?o:!n&&t?String.fromCharCode(t):n},Fc=i=>{let{key:e,which:t}=i;return e||String.fromCharCode(t)},D=lD,ft=i=>{let{ctrlKey:e,metaKey:t}=i;return e||t};var gD=q(),Pc=D(ai,"dxFX"),I4=/^([+-])=(.*)/i,kc="dxAnimData",Fx="dxAnimQueue";var D4={initAnimation:function(i,e){i.css({transitionProperty:"none"}),typeof e.from=="string"?i.addClass(e.from):Rx(i,e.from);let t=this,n=new y,o=e.cleanupWhen;e.transitionAnimation={deferred:n,finish:function(){t._finishTransition(i),o?P(n,o).always(function(){t._cleanup(i,e)}):t._cleanup(i,e),n.resolveWith(i,[e,i])}},this._completeAnimationCallback(i,e).done(function(){e.transitionAnimation.finish()}).fail(function(){n.rejectWith(i,[e,i])}),e.duration||e.transitionAnimation.finish(),i.css("transform")},animate:function(i,e){return this._startAnimation(i,e),e.transitionAnimation.deferred.promise()},_completeAnimationCallback:function(i,e){let t=this,n=Date.now()+e.delay,o=new y,s=new y,r=new y,a,l=xx()+".dxFX";e.transitionAnimation.cleanup=function(){clearTimeout(a),clearTimeout(d),_.off(i,l),_.off(i,Pc)},_.one(i,l,function(){Date.now()-n>=e.duration&&s.reject()}),_.off(i,Pc),_.on(i,Pc,function(){t.stop(i,e),o.reject()});let d=setTimeout(function(){a=setTimeout(function(){r.reject()},e.duration+e.delay+Bc._simulatedTransitionEndDelay),P(s,r).fail(function(){o.resolve()}.bind(this))});return o.promise()},_startAnimation:function(i,e){i.css({transitionProperty:"all",transitionDelay:e.delay+"ms",transitionDuration:e.duration+"ms",transitionTimingFunction:e.easing}),typeof e.to=="string"?i[0].className+=" "+e.to:e.to&&Rx(i,e.to)},_finishTransition:function(i){i.css("transition","none")},_cleanup:function(i,e){e.transitionAnimation.cleanup(),typeof e.from=="string"&&(i.removeClass(e.from),i.removeClass(e.to))},stop:function(i,e,t){e&&(t?e.transitionAnimation.finish():(X(e.to)&&x(e.to,function(n){i.css(n,i.css(n))}),this._finishTransition(i),this._cleanup(i,e)))}},pD={initAnimation:function(i,e){Rx(i,e.from)},animate:function(i,e){let t=new y,n=this;return e?(x(e.to,function(o){e.from[o]===void 0&&(e.from[o]=n._normalizeValue(i.css(o)))}),e.to.transform&&(e.from.transform=n._parseTransform(e.from.transform),e.to.transform=n._parseTransform(e.to.transform)),e.frameAnimation={to:e.to,from:e.from,currentValue:e.from,easing:LI(e.easing),duration:e.duration,startTime:new Date().valueOf(),finish:function(){this.currentValue=this.to,this.draw(),$n(e.frameAnimation.animationFrameId),t.resolve()},draw:function(){if(e.draw){e.draw(this.currentValue);return}let o=m({},this.currentValue);o.transform&&(o.transform=qe(o.transform,function(s,r){if(r==="translate")return Fl(s);if(r==="scale")return"scale("+s+")";if(r.substr(0,r.length-1)==="rotate")return r+"("+s+"deg)"}).join(" ")),i.css(o)}},e.delay?(e.frameAnimation.startTime+=e.delay,e.frameAnimation.delayTimeout=setTimeout(function(){n._startAnimation(i,e)},e.delay)):n._startAnimation(i,e),t.promise()):t.reject().promise()},_startAnimation:function(i,e){_.off(i,Pc),_.on(i,Pc,function(){e.frameAnimation&&$n(e.frameAnimation.animationFrameId)}),this._animationStep(i,e)},_parseTransform:function(i){let e={};return x(i.match(/\w+\d*\w*\([^)]*\)\s*/g),function(t,n){let o=kI(n),s=n.match(/scale\((.+?)\)/),r=n.match(/(rotate.)\((.+)deg\)/);o&&(e.translate=o),s&&s[1]&&(e.scale=parseFloat(s[1])),r&&r[1]&&(e[r[1]]=parseFloat(r[2]))}),e},stop:function(i,e,t){let n=e&&e.frameAnimation;n&&($n(n.animationFrameId),clearTimeout(n.delayTimeout),t&&n.finish(),delete e.frameAnimation)},_animationStep:function(i,e){let t=e&&e.frameAnimation;if(!t)return;let n=new Date().valueOf();if(n>=t.startTime+t.duration){t.finish();return}t.currentValue=this._calcStepValue(t,n-t.startTime),t.draw();let o=this;t.animationFrameId=Pr(function(){o._animationStep(i,e)})},_calcStepValue:function(i,e){let t=function(n,o){let s=Array.isArray(o)?[]:{};return x(o,function(r,a){if(typeof a=="string"&&parseFloat(a)===!1)return!0;s[r]=typeof a=="object"?t(n[r],a):function(l){let d=e/i.duration,c=e,h=1*n[l],p=o[l]-n[l],g=i.duration;return NI(i.easing)(d,c,h,p,g)}(r)}),s};return t(i.from,i.to)},_normalizeValue:function(i){let e=parseFloat(i);return e===!1?i:e}},T4={initAnimation:function(){},animate:function(){return new y().resolve().promise()},stop:E,isSynchronous:!0},A4=function(i){i=i||{};let e={transition:vp()?D4:pD,frame:pD,noAnimation:T4},t=i.strategy||"transition";return i.type==="css"&&!vp()&&(t="noAnimation"),e[t]},mD=function(i,e,t,n){x(["from","to"],function(){if(!t(i[this]))throw me.Error("E0010",e,this,n)})},fD=function(i,e){return mD(i,e,function(t){return X(t)},"a plain object")},M4=function(i,e){return mD(i,e,function(t){return typeof t=="string"},"a string")},R4={setup:function(){}},F4={validateConfig:function(i){M4(i,"css")},setup:function(){}},P4={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"}},Dx={validateConfig:function(i){fD(i,"slide")},setup:function(i,e){let t=Ti(i);if(e.type!=="slide"){let n=e.type==="slideIn"?e.from:e.to;n.position=m({of:gD},P4[e.direction]),Mx(i,n)}this._setUpConfig(t,e.from),this._setUpConfig(t,e.to),fp(i)},_setUpConfig:function(i,e){e.left="left"in e?e.left:"+=0",e.top="top"in e?e.top:"+=0",this._initNewPosition(i,e)},_initNewPosition:function(i,e){let t={left:e.left,top:e.top};delete e.left,delete e.top;let n=this._getRelativeValue(t.left);n!==void 0?t.left=n+i.left:e.left=0,n=this._getRelativeValue(t.top),n!==void 0?t.top=n+i.top:e.top=0,e.transform=Fl({x:t.left,y:t.top})},_getRelativeValue:function(i){let e;if(typeof i=="string"&&(e=I4.exec(i)))return parseInt(e[1]+"1")*e[2]}},Tx={setup:function(i,e){let t=e.from,n=e.to,o=e.type==="fadeOut"?1:0,s=e.type==="fadeOut"?0:1,r=X(t)?String(t.opacity??o):String(t),a=X(n)?String(n.opacity??s):String(n);switch(e.skipElementInitialStyles||(r=i.css("opacity")),e.type){case"fadeIn":a=1;break;case"fadeOut":a=0}e.from={visibility:"visible",opacity:r},e.to={opacity:a}}},k4={validateConfig:function(i){fD(i,"pop")},setup:function(i,e){let t=e.from,n=e.to,o="opacity"in t?t.opacity:i.css("opacity"),s="opacity"in n?n.opacity:1,r="scale"in t?t.scale:0,a="scale"in n?n.scale:1;e.from={opacity:o};let l=Tc(i);e.from.transform=this._getCssTransform(l,r),e.to={opacity:s},e.to.transform=this._getCssTransform(l,a)},_getCssTransform:function(i,e){return Fl(i)+"scale("+e+")"}},_D={custom:R4,slide:Dx,slideIn:Dx,slideOut:Dx,fade:Tx,fadeIn:Tx,fadeOut:Tx,pop:k4,css:F4},B4=function(i){let e=_D[i.type];if(!e)throw me.Error("E0011",i.type);return e},V4={type:"custom",from:{},to:{},duration:400,start:E,complete:E,easing:"ease",delay:0},L4={duration:400,easing:"ease",delay:0};function N4(){let i=this.element,e=this.config;if(Mx(i,e.from),Mx(i,e.to),this.configurator.setup(i,e),i.data(kc,this),Bc.off&&(e.duration=0,e.delay=0),this.strategy.initAnimation(i,e),e.start){let t=H(i);e.start.apply(this,[t,e])}}var H4=function(i){let e=i.element,t=i.config;if(e.removeData(kc),t.complete){let n=H(e);t.complete.apply(this,[n,t])}i.deferred.resolveWith(this,[e,t])},$4=function(){let i=this,e=i.element,t=i.config;return i.isStarted=!0,i.strategy.animate(e,t).done(function(){H4(i)}).fail(function(){i.deferred.rejectWith(this,[e,t])})},z4=function(i){let e=this,t=e.element,n=e.config;clearTimeout(e.startTimeout),e.isStarted||e.start(),e.strategy.stop(t,n,i)},Ax=D(ai,"dxFXStartAnimation"),W4=function(i){_.off(i.element,Ax),_.on(i.element,Ax,function(){Bc.stop(i.element)}),i.deferred.always(function(){_.off(i.element,Ax)})},CD=function(i,e){let t=e.type==="css"?L4:V4,n=m(!0,{},t,e),o=B4(n),s=A4(n),r={element:u(i),config:n,configurator:o,strategy:s,isSynchronous:s.isSynchronous,setup:N4,start:$4,stop:z4,deferred:new y};return A(o.validateConfig)&&o.validateConfig(n),W4(r),r},G4=function(i,e){let t=u(i);if(!t.length)return new y().resolve().promise();let n=CD(t,e);return j4(t,n),n.deferred.promise()};function j4(i,e){let t=Px(i);K4(i,t),t.push(e),wp(i)||kx(i,t)}function Px(i){return i.data(Fx)||[]}function K4(i,e){i.data(Fx,e)}var xD=function(i){i.removeData(Fx)};function wp(i){return!!i.data(kc)}function kx(i,e){if(e=Px(i),!e.length)return;let t=e.shift();e.length===0&&xD(i),U4(t).done(function(){wp(i)||kx(i)})}function U4(i){return i.setup(),Bc.off||i.isSynchronous?i.start():i.startTimeout=setTimeout(function(){i.start()}),i.deferred.promise()}function Mx(i,e){if(!e||!e.position)return;let t=u(gD),n=0,o=0,s=xt.calculate(i,e.position),r=i.offset(),a=i.position();a.top>r.top&&(o=t.scrollTop()),a.left>r.left&&(n=t.scrollLeft()),m(e,{left:s.h.location-r.left+a.left-n,top:s.v.location-r.top+a.top-o}),delete e.position}function Rx(i,e){x(e,function(t,n){try{i.css(t,A(n)?n():n)}catch{}})}var q4=function(i,e){let t=u(i),n=Px(t);x(n,function(s,r){r.config.delay=0,r.config.duration=0,r.isSynchronous=!0}),wp(t)||kx(t,n);let o=t.data(kc);o&&o.stop(e),t.removeData(kc),xD(t)},Bc={off:!1,animationTypes:_D,animate:G4,createAnimation:CD,isAnimating:wp,stop:q4,_simulatedTransitionEndDelay:100},fe=Bc;var Bx=new wr;var Sp=new WeakMap,Y4=0,kr=function(i,e){if(f(e)){Sp.set(i,e);return}if(!Sp.has(i)){let t="dxPrivateComponent"+Y4++;return Sp.set(i,t),t}return Sp.get(i)};function Ip(i,e,t){let n=Xe(i.get(0)),o=kr(e.constructor);n[o]=e,t&&_.one(i,ai,function(){t.call(e)}),n.dxComponents||(n.dxComponents=[]),n.dxComponents.push(o)}function Dp(i,e){let t=kr(e);return Xe(i.get(0),t)}var X4=function(i,e,t){t?e[i]=t:t=e,kr(t,i),Bx.fire(i,t)},Q4=function(i,e){u.fn[i]=function(t){let n=typeof t=="string",o;if(n){let s=t,r=[].slice.call(arguments).slice(1);this.each(function(){let a=e.getInstance(this);if(!a)throw me.Error("E0009",i);let d=a[s].apply(a,r);o===void 0&&(o=d)})}else this.each(function(){let s=e.getInstance(this);s?s.option(t):new e(this,t)}),o=this;return o}};Bx.add(Q4);var K=X4;var Vx=q(),Z4=i=>{if(!i.getRootNode)return;let e=i.getRootNode().host;if(!B(e))return e},uo=()=>{let i=S.getActiveElement();if(i&&i!==S.getBody()){var e;(e=i.blur)===null||e===void 0||e.call(i)}},vD=()=>{let i=Vx.getSelection();if(i&&i.type!=="Caret"){if(i.empty)i.empty();else if(i.removeAllRanges)try{i.removeAllRanges()}catch{}}},bD=(i,e)=>{let t=u(i),n=u(e);if(t[0]===n[0])return t[0];let o=t.parents(),s=n.parents(),r=Math.min(o.length,s.length);for(let a=-r;a<0;a++)if(o.get(a)===s.get(a))return o.get(a)};var Ea=i=>{let e=f(i)&&(i.nodeType||si(i))?u(i):u("<div>").html(i).contents();return e.length===1&&(e.is("script")?e=Ea(e.html().trim()):e.is("table")&&(e=e.children("tbody").contents())),e},Vc=(i,e)=>{let t=i.originalEvent&&i.originalEvent.clipboardData||Vx.clipboardData;if(!e)return t&&t.getData("Text");t&&t.setData("Text",e)},bn=(i,e)=>e?Ue(i)?bn(i.document,e):i.contains(e)||bn(i,Z4(e)):!1,yD=(i,e,t)=>{let n=Vx.getComputedStyle(u(i).get(0)),o=t&&t.includePaddings;return u("<div>").text(e).css({fontStyle:n.fontStyle,fontVariant:n.fontVariant,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFamily:n.fontFamily,letterSpacing:n.letterSpacing,border:n.border,paddingTop:o?n.paddingTop:"",paddingRight:o?n.paddingRight:"",paddingBottom:o?n.paddingBottom:"",paddingLeft:o?n.paddingLeft:"",visibility:"hidden",whiteSpace:"pre",position:"absolute",float:"left"})},J4=(i,e)=>(e&&S.insertElement(i.parentNode,e,i),i),OD=(i,e)=>{if(e&&e[0])return e.is(i)?i:(x(e,(t,n)=>{J4(i[0],n)}),i.remove(),e)},ls=i=>{let e=i?.get(0),t=e?.getRootNode().host;return!!u(t||e).closest(q().document).length};var ej=pe.inherit({ctor:function(i){this._$element=u(i),this._cancelCallback=ge(),this._acceptCallback=ge()},getElement:function(){return this._$element},validate:function(i){return!hi(i)},validatePointers:function(i){return hD(i)===1},allowInterruptionByMouseWheel:function(){return!0},configure:function(i){m(this,i)},addCancelCallback:function(i){this._cancelCallback.add(i)},removeCancelCallback:function(){this._cancelCallback.empty()},_cancel:function(i){this._cancelCallback.fire(this,i)},addAcceptCallback:function(i){this._acceptCallback.add(i)},removeAcceptCallback:function(){this._acceptCallback.empty()},_accept:function(i){this._acceptCallback.fire(this,i)},_requestAccept:function(i){this._acceptRequestEvent=i},_forgetAccept:function(){this._accept(this._acceptRequestEvent),this._acceptRequestEvent=null},start:E,move:E,end:E,cancel:E,reset:function(){this._acceptRequestEvent&&this._accept(this._acceptRequestEvent)},_fireEvent:function(i,e,t){let n=m({type:i,originalEvent:e,target:this._getEmitterTarget(e),delegateTarget:this.getElement().get(0)},t);return e=hn(n),e.cancel&&this._cancel(e),e},_getEmitterTarget:function(i){return(this.delegateSelector?u(i.target).closest(this.delegateSelector):this.getElement()).get(0)},dispose:E}),Br=ej;var tj=pe.inherit({ctor:function(i,e){this._eventName=i,this._originalEvents=D(e,"dxPointerEvents"),this._handlerCount=0,this.noBubble=this._isNoBubble()},_isNoBubble:function(){let i=this._eventName;return i==="dxpointerenter"||i==="dxpointerleave"},_handler:function(i){let e=this._getDelegateTarget(i),t={type:this._eventName,pointerType:i.pointerType||Pl(i),originalEvent:i,delegateTarget:e,timeStamp:we.mozilla?new Date().getTime():i.timeStamp},n=gl(i);return t.target=n,this._fireEvent(t)},_getDelegateTarget:function(i){let e;return this.noBubble&&(e=i.delegateTarget),e},_fireEvent:function(i){return hn(i)},_setSelector:function(i){this._selector=this.noBubble&&i?i.selector:null},_getSelector:function(){return this._selector},setup:function(){return!0},add:function(i,e){if(this._handlerCount<=0||this.noBubble){i=this.noBubble?i:S.getDocument(),this._setSelector(e);let t=this;_.on(i,this._originalEvents,this._getSelector(),function(n){t._handler(n)})}this.noBubble||this._handlerCount++},remove:function(i){this._setSelector(i),this.noBubble||this._handlerCount--},teardown:function(i){this._handlerCount&&!this.noBubble||(i=this.noBubble?i:S.getDocument(),this._originalEvents!==".dxPointerEvents"&&_.off(i,this._originalEvents,this._getSelector()))},dispose:function(i){i=this.noBubble?i:S.getDocument(),_.off(i,this._originalEvents)}}),kl=tj;var ij={dxpointerdown:"touchstart",dxpointermove:"touchmove",dxpointerup:"touchend",dxpointercancel:"touchcancel",dxpointerover:"",dxpointerout:"",dxpointerenter:"",dxpointerleave:""},ED=function(i){let e=[];return x(i.touches,function(t,n){e.push(m({pointerId:n.identifier},n))}),{pointers:e,pointerId:i.changedTouches[0].identifier}},nj=function(i){return F.real().platform==="ios"&&(i==="dxpointerdown"||i==="dxpointerup")},Lx=kl.inherit({ctor:function(){this.callBase.apply(this,arguments),this._pointerId=0},_handler:function(i){if(nj(this._eventName)){let e=i.changedTouches[0];if(this._pointerId===e.identifier&&this._pointerId!==0)return;this._pointerId=e.identifier}return this.callBase.apply(this,arguments)},_fireEvent:function(i){return this.callBase(m(ED(i.originalEvent),i))}});Lx.map=ij;Lx.normalize=ED;var Lc=Lx;var Tp=function(i,e){ri.add(function(){i.split(" ").forEach(function(t){S.listen(S.getDocument(),t,e,!0)})})},oj=function(i,e,t){t=t||function(){};let n=[],o=function(r){let a=-1;return x(n,function(l,d){return e(r,d)?(a=l,!1):!0}),a},s=function(r){let a=o(r);a>-1&&n.splice(a,1)};Tp(i.dxpointerdown,function(r){o(r)===-1&&(t(r),n.push(r))}),Tp(i.dxpointermove,function(r){n[o(r)]=r}),Tp(i.dxpointerup,s),Tp(i.dxpointercancel,s),this.pointers=function(){return n},this.reset=function(){n=[]}},wD=oj;var Nx={dxpointerdown:"mousedown",dxpointermove:"mousemove",dxpointerup:"mouseup",dxpointercancel:"pointercancel",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"};we.safari&&(Nx.dxpointercancel+=" dragstart");var ID=function(i){return i.pointerId=1,{pointers:Hx.pointers(),pointerId:1}},Hx,SD=!1,DD=function(){SD||(Hx=new wD(Nx,function(){return!0}),SD=!0)},Nc=kl.inherit({ctor:function(){this.callBase.apply(this,arguments),DD()},_fireEvent:function(i){return this.callBase(m(ID(i.originalEvent),i))}});Nc.map=Nx;Nc.normalize=ID;Nc.activate=DD;Nc.resetObserver=function(){Hx.reset()};var wa=Nc;var sj={dxpointerdown:"touchstart mousedown",dxpointermove:"touchmove mousemove",dxpointerup:"touchend mouseup",dxpointercancel:"touchcancel",dxpointerover:"mouseover",dxpointerout:"mouseout",dxpointerenter:"mouseenter",dxpointerleave:"mouseleave"},TD=!1,rj=function(){TD||(wa.activate(),TD=!0)},$x=kl.inherit({EVENT_LOCK_TIMEOUT:100,ctor:function(){this.callBase.apply(this,arguments),rj()},_handler:function(i){let e=co(i);if(e||(this._skipNextEvents=!0),!(e&&this._mouseLocked)){if(e&&this._skipNextEvents){this._skipNextEvents=!1,this._mouseLocked=!0,clearTimeout(this._unlockMouseTimer);let t=this;this._unlockMouseTimer=setTimeout(function(){t._mouseLocked=!1},this.EVENT_LOCK_TIMEOUT);return}return this.callBase(i)}},_fireEvent:function(i){let e=co(i.originalEvent)?wa.normalize:Lc.normalize;return this.callBase(m(e(i.originalEvent),i))},dispose:function(){this.callBase(),this._skipNextEvents=!1,this._mouseLocked=!1,clearTimeout(this._unlockMouseTimer)}});$x.map=sj;$x.resetObserver=wa.resetObserver;var zx=$x;var aj=(i,e)=>{let{tablet:t,phone:n}=e,o=dj();return o||(i.touch&&!(t||n)?zx:i.touch?Lc:wa)},AD=aj(vx,F.real());x(AD.map,(i,e)=>{Vi(i,new AD(i,e))});var lj={down:"dxpointerdown",up:"dxpointerup",move:"dxpointermove",cancel:"dxpointercancel",enter:"dxpointerenter",leave:"dxpointerleave",over:"dxpointerover",out:"dxpointerout"};function dj(){let i=xe().pointerEventStrategy;return{"mouse-and-touch":zx,touch:Lc,mouse:wa}[i]}var le=lj;var Vr="dxmousewheel";var Wx={setup:function(i){let e=u(i);_.on(e,D("wheel","dxWheel"),Wx._wheelHandler.bind(Wx))},teardown:function(i){_.off(i,".dxWheel")},_wheelHandler:function(i){let{deltaMode:e,deltaY:t,deltaX:n,deltaZ:o}=i.originalEvent;hn({type:Vr,originalEvent:i,delta:this._normalizeDelta(t,e),deltaX:n,deltaY:t,deltaZ:o,deltaMode:e,pointerType:"mouse"}),i.stopPropagation()},_normalizeDelta(i){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)===0?-i:-30*i}};Vi(Vr,Wx);var Ap="dxEventManager";var cj=pe.inherit({ctor:function(){this._attachHandlers(),this.reset(),this._proxiedCancelHandler=this._cancelHandler.bind(this),this._proxiedAcceptHandler=this._acceptHandler.bind(this)},_attachHandlers:function(){ri.add(function(){let i=S.getDocument();_.subscribeGlobal(i,D(le.down,Ap),this._pointerDownHandler.bind(this)),_.subscribeGlobal(i,D(le.move,Ap),this._pointerMoveHandler.bind(this)),_.subscribeGlobal(i,D([le.up,le.cancel].join(" "),Ap),this._pointerUpHandler.bind(this)),_.subscribeGlobal(i,D(Vr,Ap),this._mouseWheelHandler.bind(this))}.bind(this))},_eachEmitter:function(i){let e=this._activeEmitters||[],t=0;for(;e.length>t;){let n=e[t];if(i(n)===!1)break;e[t]===n&&t++}},_applyToEmitters:function(i,e){this._eachEmitter(function(t){t[i].call(t,e)})},reset:function(){this._eachEmitter(this._proxiedCancelHandler),this._activeEmitters=[]},resetEmitter:function(i){this._proxiedCancelHandler(i)},_pointerDownHandler:function(i){co(i)&&i.which>1||this._updateEmitters(i)},_updateEmitters:function(i){this._isSetChanged(i)&&(this._cleanEmitters(i),this._fetchEmitters(i))},_isSetChanged:function(i){let e=this._closestEmitter(i),t=this._emittersSet||[],n=e.length!==t.length;return x(e,function(o,s){return n=n||t[o]!==s,!n}),this._emittersSet=e,n},_closestEmitter:function(i){let e=this,t=[],n=u(i.target);function o(s,r){r&&r.validatePointers(i)&&r.validate(i)&&(r.addCancelCallback(e._proxiedCancelHandler),r.addAcceptCallback(e._proxiedAcceptHandler),t.push(r))}for(;n.length;){let s=Xe(n.get(0),"dxEmitter")||[];x(s,o),n=n.parent()}return t},_acceptHandler:function(i,e){let t=this;this._eachEmitter(function(n){n!==i&&t._cancelEmitter(n,e)})},_cancelHandler:function(i,e){this._cancelEmitter(i,e)},_cancelEmitter:function(i,e){let t=this._activeEmitters;e?i.cancel(e):i.reset(),i.removeCancelCallback(),i.removeAcceptCallback();let n=t.indexOf(i);n>-1&&t.splice(n,1)},_cleanEmitters:function(i){this._applyToEmitters("end",i),this.reset(i)},_fetchEmitters:function(i){this._activeEmitters=this._emittersSet.slice(),this._applyToEmitters("start",i)},_pointerMoveHandler:function(i){this._applyToEmitters("move",i)},_pointerUpHandler:function(i){this._updateEmitters(i)},_mouseWheelHandler:function(i){this._allowInterruptionByMouseWheel()&&(i.pointers=[null],this._pointerDownHandler(i),this._adjustWheelEvent(i),this._pointerMoveHandler(i),i.pointers=[],this._pointerUpHandler(i))},_allowInterruptionByMouseWheel:function(){let i=!0;return this._eachEmitter(function(e){return i=e.allowInterruptionByMouseWheel()&&i,i}),i},_adjustWheelEvent:function(i){let e=null;if(this._eachEmitter(function(s){if(!s.gesture)return;let r=s.getDirection(i);if(r!=="horizontal"&&!i.shiftKey||r!=="vertical"&&i.shiftKey)return e=s,!1}),!e)return;let t=e.getDirection(i),o=t==="both"&&!i.shiftKey||t==="vertical"?"pageY":"pageX";i[o]+=i.delta},isActive:function(i){let e=!1;return this._eachEmitter(function(t){e=e||t.getElement().is(i)}),e}}),MD=new cj;var uj=function(i){let e=i.emitter,t=i.events[0],n=i.events;x(n,function(o,s){Vi(s,{noBubble:!i.bubble,setup:function(r){let a=Xe(r,"dxEmitterSubscription")||{},l=Xe(r,"dxEmitter")||{},d=l[t]||new e(r);a[s]=!0,l[t]=d,Xe(r,"dxEmitter",l),Xe(r,"dxEmitterSubscription",a)},add:function(r,a){Xe(r,"dxEmitter")[t].configure(m({delegateSelector:a.selector},a.data),a.type)},teardown:function(r){let a=Xe(r,"dxEmitterSubscription"),l=Xe(r,"dxEmitter"),d=l[t];delete a[s];let c=!0;x(n,function(h,p){return c=c&&!a[p],c}),c&&(MD.isActive(r)&&MD.resetEmitter(d),d&&d.dispose(),delete l[t])}})})},ho=uj;var RD=Math.abs;var hj=Br.inherit({start:function(i){this._startEventData=rt(i),this._startTimer(i)},_startTimer:function(i){let e="timeout"in this?this.timeout:750;this._holdTimer=setTimeout(function(){this._requestAccept(i),this._fireEvent("dxhold",i,{target:i.target}),this._forgetAccept()}.bind(this),e)},move:function(i){this._touchWasMoved(i)&&this._cancel(i)},_touchWasMoved:function(i){let e=as(this._startEventData,rt(i));return RD(e.x)>5||RD(e.y)>5},end:function(){this._stopTimer()},_stopTimer:function(){clearTimeout(this._holdTimer)},cancel:function(){this._stopTimer()},dispose:function(){this._stopTimer()}});ho({emitter:hj,bubble:!0,events:["dxhold"]});var yn={name:"dxhold"};var pj=D("contextmenu","dxContexMenu"),gj=D(yn.name,"dxContexMenu");var mj=pe.inherit({setup:function(i){let e=u(i);_.on(e,pj,this._contextMenuHandler.bind(this)),(ao||F.isSimulator())&&_.on(e,gj,this._holdHandler.bind(this))},_holdHandler:function(i){co(i)&&!F.isSimulator()||this._fireContextMenu(i)},_contextMenuHandler:function(i){this._fireContextMenu(i)},_fireContextMenu:function(i){return hn({type:"dxcontextmenu",originalEvent:i})},teardown:function(i){_.off(i,".dxContexMenu")}});Vi("dxcontextmenu",new mj);var Mp="dxcontextmenu";var Gx=function(i){return function(e){let t=u(e||"body"),n=t.filter(".dx-visibility-change-handler").add(t.find(".dx-visibility-change-handler"));for(let o=0;o<n.length;o++)_.triggerHandler(n[o],i)}},Bl=Gx("dxshown"),FD=Gx("dxhiding"),Li=Gx("dxresize");var fj=ge({syncStrategy:!0}),On=class{render(e){e=e||{};let t=e.onRendered;delete e.onRendered;let n;return e.renovated&&e.transclude&&this._element?n=u("<div>").append(this._element).contents():n=this._renderCore(e),this._ensureResultInContainer(n,e.container),fj.fire(n,e.container),t&&t(),n}_ensureResultInContainer(e,t){if(!t)return;let n=u(t),o=bn(n.get(0),e.get(0));n.append(e),!(o||!bn(S.getBody(),n.get(0)))&&Bl(e)}_renderCore(){throw me.Error("E0001")}};var tn=class extends On{_renderCore(){return u()}};function _j(i){return i.reduce((e,t)=>{let n=(e.get(t)??0)+1;return e.set(t,n),e},new Map)}var PD=function(i){return Array.isArray(i)?i:[i]},kD=function(i){return[...new Set(i)]};var jx=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=_j(e);return i.filter(n=>{let o=t.get(n);return o&&t.set(n,o-1),!o})},Sa=function(i,e,t,n){let o={},{useLegacyVisibleIndex:s}=xe(),r=0,a=l=>!f(l[e])&&(!n||n(l));i.forEach(l=>{let d=l[e];d>=0?(o[d]=o[d]||[],l===t?o[d].unshift(l):o[d].push(l)):l[e]=void 0}),s||i.forEach(l=>{if(a(l)){for(;o[r];)r++;o[r]=[l],r++}}),r=0,oc(o,function(l,d){d.forEach(c=>{l>=0&&(c[e]=r++)})}),s&&i.forEach(l=>{a(l)&&(l[e]=r++)})},BD=(i,e)=>i.reduce((t,n)=>{let o=e(n);return t[o]=t[o]??[],t[o].push(n),t},{});var Fo=function(i){return i===0?0:i/Math.abs(i)},It=function(i,e,t){let n=!e&&e!==0,o=!t&&t!==0;return n&&(e=o?i:Math.min(i,t)),o&&(t=n?i:Math.max(i,e)),Math.min(Math.max(i,e),t)},An=function(i,e,t){return i>=e&&i<=t};function VD(i){return Math.abs(parseInt(i.toExponential().split("e")[1]))}function Cj(i){let e=i.toExponential().split("e"),t=parseFloat(e[0]);return{exponent:parseInt(e[1]),mantissa:t}}function Rp(i,e){let t=Cj(i);return parseFloat(`${t.mantissa}e${t.exponent+e}`)}function xj(){return 3e-4.toPrecision(3)!=="0.000300"}function Hc(i,e){let t=vj(e||0)+2,n=i.toString().split("."),o=i,s=Math.abs(i),r,a=Ah(i),l=s>1?10:0;return n.length===1?i:(a||(Ah(e)&&(t=n[0].length+VD(e)),i=s,i=i-Math.floor(i)+l),t=xj()&&VD(i)>6||t>7?15:7,!a&&(r=parseFloat(i.toPrecision(t)).toString().split("."),r[0]===l.toString())?parseFloat(n[0]+"."+r[1]):parseFloat(o.toPrecision(t)))}function vj(i){let e=i.toString();if(e.indexOf(".")<0)return 0;let t=e.split("."),n=t[1].indexOf("e");return n>=0?n:t[1].length}var bj=ri.add,LD=Math.abs;var Fp=10;var yj=function(){return Do("pointer-events")},Oj=dn(function(){let i=F.real().deviceType==="desktop";if(!yj()||!i)return E;let e=u("<div>").addClass("dx-gesture-cover").css("pointerEvents","none");return _.subscribeGlobal(e,"dxmousewheel",function(t){t.preventDefault()}),bj(function(){e.appendTo("body")}),function(t,n){e.css("pointerEvents",t?"all":"none"),t&&e.css("cursor",n)}}),Ej=function(i,e){Oj()(i,e)},Kx=Br.inherit({gesture:!0,configure:function(i){this.getElement().css("msTouchAction",i.immediate?"pinch-zoom":""),this.callBase(i)},allowInterruptionByMouseWheel:function(){return this._stage!==2},getDirection:function(){return this.direction},_cancel:function(){this.callBase.apply(this,arguments),this._toggleGestureCover(!1),this._stage=0},start:function(i){if(i._needSkipEvent||Ep(i)){this._cancel(i);return}this._startEvent=Ro(i),this._startEventData=rt(i),this._stage=1,this._init(i),this._setupImmediateTimer()},_setupImmediateTimer:function(){if(clearTimeout(this._immediateTimer),this._immediateAccepted=!1,!!this.immediate){if(this.immediateTimeout===0){this._immediateAccepted=!0;return}this._immediateTimer=setTimeout(function(){this._immediateAccepted=!0}.bind(this),this.immediateTimeout??180)}},move:function(i){if(this._stage===1&&this._directionConfirmed(i)){if(this._stage=2,this._resetActiveElement(),this._toggleGestureCover(!0),this._clearSelection(i),this._adjustStartEvent(i),this._start(this._startEvent),this._stage===0)return;this._requestAccept(i),this._move(i),this._forgetAccept()}else this._stage===2&&(this._clearSelection(i),this._move(i))},_directionConfirmed:function(i){let e=this._getTouchBoundary(i),t=as(this._startEventData,rt(i)),n=LD(t.x),o=LD(t.y),s=this._validateMove(e,n,o),r=this._validateMove(e,o,n),a=this.getDirection(i);return a==="both"&&(s||r)||a==="horizontal"&&s||a==="vertical"&&r||this._immediateAccepted},_validateMove:function(i,e,t){return e&&e>=i&&(this.immediate?e>=t:!0)},_getTouchBoundary:function(i){return this.immediate||hi(i)?0:Fp},_adjustStartEvent:function(i){let e=this._getTouchBoundary(i),t=as(this._startEventData,rt(i));this._startEvent.pageX+=Fo(t.x)*e,this._startEvent.pageY+=Fo(t.y)*e},_resetActiveElement:function(){F.real().platform==="ios"&&this.getElement().find(":focus").length&&uo()},_toggleGestureCover:function(i){this._toggleGestureCoverImpl(i)},_toggleGestureCoverImpl:function(i){this._stage===2&&Ej(i,this.getElement().css("cursor"))},_clearSelection:function(i){hi(i)||Ws(i)||vD()},end:function(i){this._toggleGestureCover(!1),this._stage===2?this._end(i):this._stage===1&&this._stop(i),this._stage=0},dispose:function(){clearTimeout(this._immediateTimer),this.callBase.apply(this,arguments),this._toggleGestureCover(!1)},_init:E,_start:E,_move:E,_stop:E,_end:E});Kx.initialTouchBoundary=Fp;Kx.touchBoundary=function(i){if(f(i)){Fp=i;return}return Fp};var Vl=Kx;var js="dxdragstart",Po="dxdrag",Ks="dxdragend",$c="dxdragenter",zc="dxdragleave",qx="dxdrop";var Gs=[],Ll=[],Ux=[],Yx={setup:function(i,e){Gs.includes(i)||(Gs.push(i),Ll.push([]),Ux.push(e||{}))},add:function(i,e){let t=Gs.indexOf(i);this.updateEventsCounter(i,e.type,1);let n=e.selector;Ll[t].includes(n)||Ll[t].push(n)},updateEventsCounter:function(i,e,t){if([$c,zc,qx].indexOf(e)>-1){let n=Xe(i,"dxDragEventsCount")||0;Xe(i,"dxDragEventsCount",Math.max(0,n+t))}},remove:function(i,e){this.updateEventsCounter(i,e.type,-1)},teardown:function(i){if(!Xe(i,"dxDragEventsCount")){let t=Gs.indexOf(i);Gs.splice(t,1),Ll.splice(t,1),Ux.splice(t,1),Ir(i,"dxDragEventsCount")}}};Vi($c,Yx);Vi(zc,Yx);Vi(qx,Yx);var wj=function(i){let e=Gs.indexOf(i.get(0)),t=Ll[e].filter(o=>o),n=i.find(t.join(", "));return Ll[e].includes(void 0)&&(n=n.add(i)),n},Sj=function(i){let e=Gs.indexOf(i.get(0));return Ux[e]},Ij=function(i,e){return i.itemPositionFunc?i.itemPositionFunc(e):e.offset()},Dj=function(i,e){return i.itemSizeFunc?i.itemSizeFunc(e):{width:e.get(0).getBoundingClientRect().width,height:e.get(0).getBoundingClientRect().height}},Tj=Vl.inherit({ctor:function(i){this.callBase(i),this.direction="both"},_init:function(i){this._initEvent=i},_start:function(i){if(i=this._fireEvent("dxdragstart",this._initEvent),this._maxLeftOffset=i.maxLeftOffset,this._maxRightOffset=i.maxRightOffset,this._maxTopOffset=i.maxTopOffset,this._maxBottomOffset=i.maxBottomOffset,i.targetElements||i.targetElements===null){let e=PD(i.targetElements||[]);this._dropTargets=qe(e,function(t){return u(t).get(0)})}else this._dropTargets=Gs},_move:function(i){let e=rt(i),t=this._calculateOffset(e);i=this._fireEvent("dxdrag",i,{offset:t}),this._processDropTargets(i),i._cancelPreventDefault||i.preventDefault()},_calculateOffset:function(i){return{x:this._calculateXOffset(i),y:this._calculateYOffset(i)}},_calculateXOffset:function(i){if(this.direction!=="vertical"){let e=i.x-this._startEventData.x;return this._fitOffset(e,this._maxLeftOffset,this._maxRightOffset)}return 0},_calculateYOffset:function(i){if(this.direction!=="horizontal"){let e=i.y-this._startEventData.y;return this._fitOffset(e,this._maxTopOffset,this._maxBottomOffset)}return 0},_fitOffset:function(i,e,t){return e!=null&&(i=Math.max(i,-e)),t!=null&&(i=Math.min(i,t)),i},_processDropTargets:function(i){let e=this._findDropTarget(i);e===this._currentDropTarget||(this._fireDropTargetEvent(i,zc),this._currentDropTarget=e,this._fireDropTargetEvent(i,$c))},_fireDropTargetEvent:function(i,e){if(!this._currentDropTarget)return;let t={type:e,originalEvent:i,draggingElement:this._$element.get(0),target:this._currentDropTarget};hn(t)},_findDropTarget:function(i){let e=this,t;return x(Gs,function(n,o){if(!e._checkDropTargetActive(o))return;let s=u(o);x(wj(s),function(r,a){let l=u(a);e._checkDropTarget(Sj(s),l,u(t),i)&&(t=a)})}),t},_checkDropTargetActive:function(i){let e=!1;return x(this._dropTargets,function(t,n){return e=e||n===i||bn(n,i),!e}),e},_checkDropTarget:function(i,e,t,n){if(e.get(0)===u(n.target).get(0))return!1;let s=Ij(i,e);if(n.pageX<s.left||n.pageY<s.top)return!1;let r=Dj(i,e);return n.pageX>s.left+r.width||n.pageY>s.top+r.height||t.length&&t.closest(e).length||i.checkDropTarget&&!i.checkDropTarget(e,n)?!1:e},_end:function(i){let e=rt(i);this._fireEvent("dxdragend",i,{offset:this._calculateOffset(e)}),this._fireDropTargetEvent(i,qx),delete this._currentDropTarget}});ho({emitter:Tj,events:["dxdragstart","dxdrag","dxdragend"]});var Xx="KeyboardProcessor",ND=i=>({keyName:ke(i),key:i.key,code:i.code,ctrl:i.ctrlKey,location:i.location,metaKey:i.metaKey,shift:i.shiftKey,alt:i.altKey,which:i.which,originalEvent:i}),HD=pe.inherit({_keydown:D("keydown",Xx),_compositionStart:D("compositionstart",Xx),_compositionEnd:D("compositionend",Xx),ctor:function(i){i=i||{},i.element&&(this._element=u(i.element)),i.focusTarget&&(this._focusTarget=i.focusTarget),this._handler=i.handler,this._element&&(this._processFunction=e=>{let t=u(this._focusTarget).toArray(),n=this._focusTarget&&this._focusTarget!==e.target&&!t.includes(e.target),o=this._isComposingJustFinished&&e.which===229||this._isComposing||n;this._isComposingJustFinished=!1,o||this.process(e)},this._toggleProcessingWithContext=this.toggleProcessing.bind(this),_.on(this._element,this._keydown,this._processFunction),_.on(this._element,this._compositionStart,this._toggleProcessingWithContext),_.on(this._element,this._compositionEnd,this._toggleProcessingWithContext))},dispose:function(){this._element&&(_.off(this._element,this._keydown,this._processFunction),_.off(this._element,this._compositionStart,this._toggleProcessingWithContext),_.off(this._element,this._compositionEnd,this._toggleProcessingWithContext)),this._element=void 0,this._handler=void 0},process:function(i){this._handler(ND(i))},toggleProcessing:function(i){let{type:e}=i;this._isComposing=e==="compositionstart",this._isComposingJustFinished=!this._isComposing}});HD.createKeyDownOptions=ND;var Pp=HD;function pi(i,e){return e?D(i,e):i}function Qx(i,e){return typeof i=="function"?i(e):i.execute(e)}var Zx={on:(i,e,t,n)=>{let{selector:o,showTimeout:s,hideTimeout:r,namespace:a}=n;_.on(i,pi("dxactive",a),o,{timeout:s},l=>Qx(e,{event:l,element:l.currentTarget})),_.on(i,pi("dxinactive",a),o,{timeout:r},l=>Qx(t,{event:l,element:l.currentTarget}))},off:(i,e)=>{let{namespace:t,selector:n}=e;_.off(i,pi("dxactive",t),n),_.off(i,pi("dxinactive",t),n)}},Nl={on:function(i,e){let{namespace:t}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_.on(i,pi("dxresize",t),e)},off:function(i){let{namespace:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_.off(i,pi("dxresize",e))}},Jx={on:(i,e,t,n)=>{let{selector:o,namespace:s}=n;_.on(i,pi("dxhoverend",s),o,r=>t(r)),_.on(i,pi("dxhoverstart",s),o,r=>Qx(e,{element:r.target,event:r}))},off:(i,e)=>{let{selector:t,namespace:n}=e;_.off(i,pi("dxhoverstart",n),t),_.off(i,pi("dxhoverend",n),t)}},Hl={on:(i,e,t,n)=>{let{namespace:o}=n;_.on(i,pi("dxhiding",o),t),_.on(i,pi("dxshown",o),e)},off:(i,e)=>{let{namespace:t}=e;_.off(i,pi("dxhiding",t)),_.off(i,pi("dxshown",t))}},$l={on:(i,e,t,n)=>{let{namespace:o}=n;_.on(i,pi("focusin",o),e),_.on(i,pi("focusout",o),t)},off:(i,e)=>{let{namespace:t}=e;_.off(i,pi("focusin",t)),_.off(i,pi("focusout",t))},trigger:i=>_.trigger(i,"focus")},ev={on:function(i,e){let{namespace:t}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_.on(i,pi("dxclick",t),e)},off:function(i){let{namespace:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_.off(i,pi("dxclick",e))}},tv={on:function(i,e){let{namespace:t}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_.on(i,pi("click",t),e)},off:function(i){let{namespace:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_.off(i,pi("click",e))}},Aj=0,Wc={},Mj=()=>"keyboardProcessorId"+Aj++,po={on:(i,e,t)=>{let n=Mj();return Wc[n]=new Pp({element:i,focusTarget:e,handler:t}),n},off:i=>{i&&Wc[i]&&(Wc[i].dispose(),delete Wc[i])},_getProcessor:i=>Wc[i]};var iv=function(){let i=[];return{add:function(e){i.includes(e)||i.push(e)},remove:function(e){let t=i.indexOf(e);t!==-1&&i.splice(t,1)},fire:function(){let e=i.pop(),t=!!e;return t&&e(),t},hasCallback:function(){return i.length>0}}}();var ie=ll(me.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: {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" and "endDayHour" options must be integers in the [0, 24] range, with "endDayHour" being greater than "startDayHour".',E1059:"The following column names are not unique: {0}",E1060:"All editable columns must have names",E1061:'The "offset" option must be an integer in the [-1440, 1440] range, divisible by 5 without a remainder.',E1062:'The "cellDuration" must be a positive integer, evenly dividing the ("endDayHour" - "startDayHour") interval into minutes.',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.",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",W1021:`The '{0}' is not rendered because none of the DOM elements match the value of the "container" property.`,W1022:"{0} JSON parsing error: '{1}'",W1023:"Appointments require unique keys. Otherwise, the agenda view may not work correctly.",W1024:"The client-side export is enabled. Implement the 'onExporting' function.",W1025:"'scrolling.mode' is set to 'virtual' or 'infinite'. Specify the height of the component."});var ko=(()=>{class i{constructor(t,n){n=n||{},this._action=t,this._context=n.context||q(),this._beforeExecute=n.beforeExecute,this._afterExecute=n.afterExecute,this._component=n.component,this._validatingTargetName=n.validatingTargetName;let o=this._excludeValidators={};if(n.excludeValidators)for(let s=0;s<n.excludeValidators.length;s++)o[n.excludeValidators[s]]=!0}execute(){let t={action:this._action,args:Array.prototype.slice.call(arguments),context:this._context,component:this._component,validatingTargetName:this._validatingTargetName,cancel:!1,handled:!1},n=this._beforeExecute,o=this._afterExecute,s=t.args[0]||{};if(!this._validateAction(t)||(n?.call(this._context,t),t.cancel))return;let r=this._executeAction(t);if(!s.cancel)return o?.call(this._context,t),r}_validateAction(t){let n=this._excludeValidators,{executors:o}=i;for(let r in o)if(!n[r]){var s;let a=o[r];if((s=a.validate)===null||s===void 0||s.call(a,t),t.cancel)return!1}return!0}_executeAction(t){let n,{executors:o}=i;for(let r in o){var s;let a=o[r];if((s=a.execute)===null||s===void 0||s.call(a,t),t.handled){n=t.result;break}}return n}static registerExecutor(t,n){if(X(t)){x(t,i.registerExecutor);return}i.executors[t]=n}static unregisterExecutor(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];x(n,function(){delete i.executors[this]})}}return i.executors={},i})();var $D=i=>e=>{if(!e.args.length)return;let t=e.args[0],n=t[e.validatingTargetName]||t.element;n&&i(u(n))&&(e.cancel=!0)};ko.registerExecutor({disabled:{validate:$D(i=>i.is(".dx-state-disabled, .dx-state-disabled *"))},readOnly:{validate:$D(i=>i.is(".dx-state-readonly, .dx-state-readonly *:not(.dx-state-independent)"))},undefined:{execute:i=>{i.action||(i.result=void 0,i.handled=!0)}},func:{execute:i=>{A(i.action)&&(i.result=i.action.call(i.context,i.args[0]),i.handled=!0)}}});var Rj=function(i,e){return 1/i===1/e},zD=function(i,e){return i=Pt(i,!0),e=Pt(e,!0),i&&e&&si(i)&&si(e)?e.is(i):i!==i&&e!==e?!0:i===0&&e===0?Rj(i,e):i===null||typeof i!="object"||S.isElementNode(i)?i===e:!1};var nv={},Bo=i=>{let e=F.current();return i.reduce((t,n)=>{let{device:o,options:s}=n,r=o||{};return(A(r)?r(e):Fj(e,r))&&m(!0,t,s),t},{})},WD=(i,e)=>typeof i!="string"?i:{[i]:e},Fj=(i,e)=>bt(e)||Ph(i,[e]).length>0,ov=i=>i.substr(i.lastIndexOf(".")+1),sv=i=>i.substr(0,i.lastIndexOf(".")),GD=function(i,e){return nv[e]=nv[e]||Ce(e),nv[e](i,{functionsAsIs:!0})},jD=function(){return arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]};var rv={},av={},kp=class{constructor(e,t){this._options=e,this._optionsByReference=t,this._changingCallback,this._changedCallback,this._namePreparedCallbacks}_setByReference(e,t){m(!0,e,t);for(let n in this._optionsByReference)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}_setPreparedValue(e,t,n,o){let s=this.get(this._options,e,!1);if(!zD(s,t)){let r=Jn(e);!o&&this._changingCallback(e,s,t),av[e]=av[e]||cl(e),av[e](this._options,t,{functionsAsIs:!0,merge:f(n)?n:!this._optionsByReference[e],unwrapObservables:r.length>1&&!!this._optionsByReference[r[0]]}),!o&&this._changedCallback(e,t,s)}}_prepareRelevantNames(e,t,n,o){if(X(n))for(let s in n)this._prepareRelevantNames(e,`${t}.${s}`,n[s]);this._namePreparedCallbacks(e,t,n,o)}get(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._options,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return rv[t]=rv[t]||Ce(t),rv[t](e,{functionsAsIs:!0,unwrapObservables:n})}set(e,t,n,o){e=WD(e,t);for(let s in e)this._prepareRelevantNames(e,s,e[s],o);for(let s in e)this._setPreparedValue(s,e[s],n,o)}onRelevantNamesPrepared(e){this._namePreparedCallbacks=e}onChanging(e){this._changingCallback=e}onChanged(e){this._changedCallback=e}dispose(){this._changingCallback=E,this._changedCallback=E}};var Bp=class{constructor(e,t,n,o){this._deprecatedCallback,this._startChangeCallback,this._endChangeCallback,this._default=t,this._deprecated=o,this._deprecatedNames=[],this._initDeprecatedNames(),this._optionManager=new kp(e,n),this._optionManager.onRelevantNamesPrepared((s,r,a,l)=>this._setRelevantNames(s,r,a,l)),this._cachedOptions={},this._rules=[]}set _initial(e){this._initialOptions=e}get _initial(){if(!this._initialOptions){let e=this._getByRules(this.silent("defaultOptionsRules"));this._initialOptions=this._default,this._optionManager._setByReference(this._initialOptions,e)}return this._initialOptions}_initDeprecatedNames(){for(let e in this._deprecated)this._deprecatedNames.push(e)}_getByRules(e){return e=Array.isArray(e)?this._rules.concat(e):this._rules,Bo(e)}_notifyDeprecated(e){let t=this._deprecated[e];t&&this._deprecatedCallback(e,t)}_setRelevantNames(e,t,n,o){if(t){let s=this._normalizeName(t,o);s&&s!==t&&(this._setField(e,s,n),this._clearField(e,t))}}_setField(e,t,n){let o="",s=null;do o=o?`.${o}`:"",o=ov(t)+o,t=sv(t),s=t?this._optionManager.get(e,t,!1):e;while(!s);s[o]=n}_clearField(e,t){delete e[t];let n=sv(t),o=n?this._optionManager.get(e,n,!1):e;o&&delete o[ov(t)]}_normalizeName(e,t){if(this._deprecatedNames.length&&e){for(let n=0;n<this._deprecatedNames.length;n++)if(this._deprecatedNames[n]===e){let o=this._deprecated[e];if(o)return!t&&this._notifyDeprecated(e),o.alias||e}}return e}addRules(e){this._rules=e.concat(this._rules)}applyRules(e){let t=this._getByRules(e);this.silent(t)}dispose(){this._deprecatedCallback=E,this._startChangeCallback=E,this._endChangeCallback=E,this._optionManager.dispose()}onChanging(e){this._optionManager.onChanging(e)}onChanged(e){this._optionManager.onChanged(e)}onDeprecated(e){this._deprecatedCallback=e}onStartChange(e){this._startChangeCallback=e}onEndChange(e){this._endChangeCallback=e}isInitial(e){let t=this.silent(e),n=this.initial(e);return A(t)&&A(n)?t.toString()===n.toString():Ee(t,n)}initial(e){return GD(this._initial,e)}option(e,t){if(arguments.length<2&&Ii(e)!=="object")return this._optionManager.get(void 0,this._normalizeName(e));this._startChangeCallback();try{this._optionManager.set(e,t)}finally{this._endChangeCallback()}}silent(e,t){if(arguments.length<2&&Ii(e)!=="object")return this._optionManager.get(void 0,e,void 0,!0);this._optionManager.set(e,t,void 0,!0)}reset(e){if(e){let n=Jn(e).reduce((s,r)=>s?s[r]:this.initial(r),null),o=z(n)?I({},n):n;this._optionManager.set(e,o,!1)}}getAliasesByName(e){return Object.keys(this._deprecated).filter(t=>e===this._deprecated[t].alias)}isDeprecated(e){return Object.prototype.hasOwnProperty.call(this._deprecated,e)}cache(e,t){if(arguments.length<2)return this._cachedOptions[e];this._cachedOptions[e]=m(this._cachedOptions[e],t)}};var Vp=class{constructor(){this._postponedOperations={}}add(e,t,n){if(e in this._postponedOperations)n&&this._postponedOperations[e].promises.push(n);else{let o=new y;this._postponedOperations[e]={fn:t,completePromise:o,promises:n?[n]:[]}}return this._postponedOperations[e].completePromise.promise()}callPostponedOperations(){for(let e in this._postponedOperations){let t=this._postponedOperations[e];f(t)&&(t.promises&&t.promises.length?P(...t.promises).done(t.fn).then(t.completePromise.resolve):t.fn().done(t.completePromise.resolve))}this._postponedOperations={}}};var KD=i=>i.charAt(2).toLowerCase()+i.substr(3),Pj=i=>i.indexOf("_",0)===0,lv=pe.inherit({_setDeprecatedOptions(){this._deprecatedOptions={}},_getDeprecatedOptions(){return this._deprecatedOptions},_getDefaultOptions:()=>({onInitialized:null,onOptionChanged:null,onDisposing:null,defaultOptionsRules:null}),_defaultOptionsRules:()=>[],_setOptionsByDevice(i){this._options.applyRules(i)},_convertRulesToOptions:i=>Bo(i),_isInitialOptionValue(i){return this._options.isInitial(i)},_setOptionsByReference(){this._optionsByReference={}},_getOptionsByReference(){return this._optionsByReference},ctor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{_optionChangedCallbacks:e,_disposingCallbacks:t}=i;this.NAME=kr(this.constructor),this._eventsStrategy=oo.create(this,i.eventsStrategy),this._updateLockCount=0,this._optionChangedCallbacks=e||ge(),this._disposingCallbacks=t||ge(),this.postponedOperations=new Vp,this._createOptions(i)},_createOptions(i){this.beginUpdate();try{this._setOptionsByReference(),this._setDeprecatedOptions(),this._options=new Bp(this._getDefaultOptions(),this._getDefaultOptions(),this._getOptionsByReference(),this._getDeprecatedOptions()),this._options.onChanging((e,t,n)=>this._initialized&&this._optionChanging(e,t,n)),this._options.onDeprecated((e,t)=>this._logDeprecatedOptionWarning(e,t)),this._options.onChanged((e,t,n)=>this._notifyOptionChanged(e,t,n)),this._options.onStartChange(()=>this.beginUpdate()),this._options.onEndChange(()=>this.endUpdate()),this._options.addRules(this._defaultOptionsRules()),i&&i.onInitializing&&i.onInitializing.apply(this,[i]),this._setOptionsByDevice(i.defaultOptionsRules),this._initOptions(i)}finally{this.endUpdate()}},_initOptions(i){this.option(i)},_init(){this._createOptionChangedAction(),this.on("disposing",i=>{this._disposingCallbacks.fireWith(this,[i])})},_logDeprecatedOptionWarning(i,e){let t=e.message||`Use the '${e.alias}' option instead`;me.log("W0001",this.NAME,i,e.since,t)},_logDeprecatedComponentWarning(i,e){me.log("W0000",this.NAME,i,`Use the '${e}' widget instead`)},_createOptionChangedAction(){this._optionChangedAction=this._createActionByOption("onOptionChanged",{excludeValidators:["disabled","readOnly"]})},_createDisposingAction(){this._disposingAction=this._createActionByOption("onDisposing",{excludeValidators:["disabled","readOnly"]})},_optionChanged(i){switch(i.name){case"onDisposing":case"onInitialized":case"defaultOptionsRules":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:E,_notifyOptionChanged(i,e,t){if(this._initialized){let n=[i].concat(this._options.getAliasesByName(i));for(let o=0;o<n.length;o++){let s=n[o],r={name:Jn(s)[0],fullName:s,value:e,previousValue:t};Pj(s)||(this._optionChangedCallbacks.fireWith(this,[m(this._defaultActionArgs(),r)]),this._optionChangedAction(m({},r))),!this._disposed&&this._cancelOptionChange!==s&&this._optionChanged(r)}}},initialOption(i){return this._options.initial(i)},_defaultActionConfig(){return{context:this,component:this}},_defaultActionArgs(){return{component:this}},_createAction(i,e){let t;return n=>(f(n)||(n={}),X(n)||(n={actionValue:n}),t=t||new ko(i,m({},e,this._defaultActionConfig())),t.execute.call(t,m(n,this._defaultActionArgs())))},_createActionByOption(i,e){var t=this;let n,o,s;e=m({},e);let r=function(){if(!o){if(e=e||{},typeof i!="string")throw me.Error("E0008");i.indexOf("on")===0&&(o=KD(i)),s=t.option(i)}if(!(!n&&!s&&!e.beforeExecute&&!e.afterExecute&&!t._eventsStrategy.hasEvent(o))){if(!n){let h=e.beforeExecute;e.beforeExecute=function(){for(var p=arguments.length,g=new Array(p),C=0;C<p;C++)g[C]=arguments[C];h&&h.apply(t,g),t._eventsStrategy.fireEvent(o,g[0].args)},n=t._createAction(s,e)}for(var l=arguments.length,d=new Array(l),c=0;c<l;c++)d[c]=arguments[c];return xe().wrapActionsBeforeExecute?((t.option("beforeActionExecute")||E)(t,n,e)||n).apply(t,d):n.apply(t,d)}};return xe().wrapActionsBeforeExecute?r:(this.option("onActionCreated")||E)(this,r,e)||r},on(i,e){return this._eventsStrategy.on(i,e),this},off(i,e){return this._eventsStrategy.off(i,e),this},hasActionSubscription:function(i){return!!this._options.silent(i)||this._eventsStrategy.hasEvent(KD(i))},isOptionDeprecated(i){return this._options.isDeprecated(i)},_setOptionWithoutOptionChange(i,e){this._cancelOptionChange=i,this.option(i,e),this._cancelOptionChange=!1},_getOptionValue(i,e){let t=this.option(i);return A(t)?t.bind(e)():t},option(){return this._options.option(...arguments)},resetOption(i){this.beginUpdate(),this._options.reset(i),this.endUpdate()}});var Mn=class extends On{constructor(e){super(),this._render=e}_renderCore(e){return Ea(this._render(e))}};var Lr=class extends On{constructor(e){super(),this.name=e}};var UD={},Lp;function qD(i,e){UD[i]=e}function YD(i){if(B(i)){if(Lp=UD[i],!Lp)throw me.Error("E0020",i)}else Lp=i}function dv(){return Lp}qD("default",{compile:i=>Ea(i),render:(i,e,t)=>i.clone()});YD("default");var Np=class extends On{constructor(e){super(),this._element=e}_renderCore(e){let t=e.transclude;return!t&&!this._compiledTemplate&&(this._compiledTemplate=dv().compile(this._element)),u("<div>").append(t?this._element:dv().render(this._compiledTemplate,e.model,e.index)).contents()}source(){return u(this._element).clone()}};var Hp=(i,e)=>{let t=u(i).contents().filter(`[data-options*="${e}"]`);return[].slice.call(t).map(n=>{let o=u(n).attr("data-options")||"";return{element:n,options:xe().optionsParser(o)[e]}}).filter(n=>!!n.options)},XD=i=>{let e=BD(i,n=>n.options.name);if(e[void 0])throw me.Error("E0023");let t={};return Object.keys(e).forEach(n=>{var o;let s=(o=Ph(F.current(),e[n],r=>r.options)[0])===null||o===void 0?void 0:o.element;s&&(t[n]=s)}),t},QD=i=>{let e=i.render.bind(i);return m({},i,{render(t){let n=e(t);return t&&t.onRendered&&t.onRendered(),n}})},kj=i=>{let e=i.render.bind(i);return m({},i,{render(t){let n=u(t.container);return e(I({},t,{container:H(n)}))}})},ZD=i=>{let e=[];return"model"in i&&e.push(i.model),"index"in i&&e.push(i.index),e.push(i.container),e},JD=i=>typeof i=="string"?Ea(i):i,cv=i=>si(i)&&i[0]||i,eT=i=>new Np(i),Bj=(i,e,t,n)=>{let o=null;return(!n||n.indexOf(i)===-1)&&(o=e[i],o&&!(o instanceof On)&&(A(o.render)&&(o=kj(o)),t||(o=QD(o)))),o},uv=(i,e,t,n,o,s)=>i==null?new tn:i instanceof Lr?s[i.name]:i instanceof On?i:A(i.render)&&!si(i)?n?i:QD(i):i.nodeType||si(i)?e(u(i)):Bj(i,t,n,o)||s[i]||e(i);var Vj=new Mn(i=>{let{model:e,parent:t}=i,n=e.widget;if(!n)return u();let o=u("<div>"),s=e.options||{};return t?t._createComponent(o,n,s):o[n](s),o}),Gc=class{constructor(e,t){this._tempTemplates=[],this._defaultTemplates={},this._anonymousTemplateName=t||"template",this._createElement=e||eT,this._createTemplateIfNeeded=this._createTemplateIfNeeded.bind(this)}static createDefaultOptions(){return{integrationOptions:{watchMethod:function(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).skipImmediate||t(e()),E},templates:{"dx-polymorph-widget":Vj},useDeferUpdateForTemplates:!0}}}get anonymousTemplateName(){return this._anonymousTemplateName}addDefaultTemplates(e){this._defaultTemplates=m({},this._defaultTemplates,e)}dispose(){this._tempTemplates.forEach(e=>{e.template.dispose&&e.template.dispose()}),this._tempTemplates=[]}extractTemplates(e){let t=this._extractTemplates(e),n=this._extractAnonymousTemplate(e);return{templates:t,anonymousTemplateMeta:n}}_extractTemplates(e){let t=Hp(e,"dxTemplate"),n=XD(t);return t.forEach(o=>{let{element:s,options:{name:r}}=o;s===n[r]?u(s).addClass("dx-template-wrapper").detach():u(s).remove()}),Object.keys(n).map(o=>({name:o,template:this._createTemplate(n[o])}))}_extractAnonymousTemplate(e){let t=e.contents().detach();return t.filter((o,s)=>{let r=s.nodeType===3,a=u(s).text().trim().length<1;return!(r&&a)}).length>0?{template:this._createTemplate(t),name:this._anonymousTemplateName}:{}}_createTemplateIfNeeded(e){let t=this._tempTemplates.filter(o=>o.source===cv(e))[0];if(t)return t.template;let n=this._createTemplate(e);return this._tempTemplates.push({template:n,source:cv(e)}),n}_createTemplate(e){return this._createElement(JD(e))}getTemplate(e,t,n,o){let{isAsyncTemplate:s,skipTemplates:r}=n;return A(e)?new Mn(a=>{let l=e.apply(o,ZD(a));if(!f(l))return new tn;let d=!1,c=uv(l,p=>p.nodeType||si(p)&&!u(p).is("script")?new Mn(()=>p):(d=!0,this._createTemplate(p)),t,s,r,this._defaultTemplates),h=c.render(a);return d&&c.dispose&&c.dispose(),h}):uv(e,this._createTemplateIfNeeded,t,s,r,this._defaultTemplates)}};function _e(i,e){if(i==null)return{};var t={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.indexOf(n)!==-1)continue;t[n]=i[n]}return t}var Lj=[],Nj=".";function Hj(i){let{major:e,minor:t,patch:n}=i;return[e,t,n].join(Nj)}function hv(i){let[e,t,n]=i.split(".").map(Number);return{major:e,minor:t,patch:n}}function $j(i){return i.map(e=>`${e.packageName}: ${e.version}`).join(`
`)}function zj(i,e){return i.major===e.major&&i.minor===e.minor&&i.patch===e.patch}function tT(i){let{major:e,minor:t,patch:n}=i;return t===1?{major:e-1,minor:2,patch:n}:{major:e,minor:t-1,patch:n}}function iT(i){let e=Lj.filter(t=>!zj(hv(t.version),i));return e.length?(me.log("W0023",$j([{packageName:"devextreme",version:Hj(i)},...e])),!1):!0}function nT(i){return new Uint8Array(atob(i).split("").map(e=>e.charCodeAt(0)))}function oT(i){var e;return new Uint8Array(((e=i.match(/.{1,2}/g))===null||e===void 0?void 0:e.map(t=>parseInt(t,16)))??[])}function sT(i){let e=new Uint8Array(i.length);for(let t=0;t<i.length;t+=1)e[t]=255&i.charCodeAt(t);return e}function rT(i){let e=new Uint8Array(4*i.length);for(let t=0;t<e.length;t+=1)e[t]=i[t>>2]>>>8*(3-t%4);return e}function aT(i){let e=new Uint32Array(1+(i.length-1>>2));for(let t=0;t<i.length;t+=1)e[t>>2]|=i[t]<<8*(3-t%4);return e}function pv(i,e){return(i<<e|i>>>32-e)>>>0}function gv(i,e){let t=new Uint8Array(i.length+e.length);return t.set(i,0),t.set(e,i.length),t}var $p={e:65537,n:new Uint8Array([200,219,153,203,140,7,228,253,193,243,62,137,139,60,68,242,48,142,113,88,185,235,253,105,80,74,32,170,96,74,111,250,7,205,154,3,146,115,153,53,45,132,123,56,61,208,184,201,63,24,109,223,0,179,169,102,139,224,73,233,45,173,138,66,98,88,69,76,177,111,113,218,192,33,101,152,25,134,34,173,32,82,230,44,247,200,253,170,192,246,30,12,96,205,100,249,181,93,0,231])},lT="Tv3jUCG8VU28WQMlFQFESQ";var Wj="3021300906052b0e03021a05000414";function dT(i){let e=(8*$p.n.length+6)/8,t=gv(oT(Wj),i);if(t.length+10>e)throw Error("Key is too short for SHA1 signing algorithm");let n=new Uint8Array(e-t.length);return n.fill(255,0,n.length-1),n[0]=0,n[1]=1,n[n.length-1]=0,gv(n,t)}function cT(i){try{let e=BigInt(0),t=BigInt(1),n=BigInt(8),o=(h,p,g)=>{let C=t,v=h,b=p;for(;b;)b&t&&(C=C*v%g),v=v*v%g,b>>=t;return C},s=h=>h.reduce((p,g)=>(p<<n)+BigInt(g),e),r=s(i.actual),a=s(i.signature),l=BigInt(i.key.e),d=s(i.key.n);return o(a,l,d)===r}catch{return!0}}function Gj(i){let e=new Uint8Array(i.length+1);e.set(sT(i)),e[e.length-1]=128;let t=aT(new Uint8Array(e)),n=new Uint32Array(16*Math.ceil((t.length+2)/16));return n.set(t,0),n[n.length-1]=8*(e.length-1),n}function uT(i){let e=Gj(i),t=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]);for(let n=0;n<e.length;n+=16){let o=new Uint32Array(80);for(let c=0;c<16;c+=1)o[c]=e[n+c];for(let c=16;c<80;c+=1){let h=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=h<<1|h>>>31}let s=t[0],r=t[1],a=t[2],l=t[3],d=t[4];for(let c=0;c<80;c+=1){let[h,p]=c<20?[r&a|~r&l,1518500249]:c<40?[r^a^l,1859775393]:c<60?[r&a|r&l|a&l,2400959708]:[r^a^l,3395469782],g=pv(s,5)+h+d+p+o[c];d=l,l=a,a=pv(r,30),r=s,s=g}t[0]+=s,t[1]+=r,t[2]+=a,t[3]+=l,t[4]+=d}return rT(t)}var fv=()=>typeof HTMLElement<"u"&&typeof customElements<"u",gT=fv()?HTMLElement:class{};var Ia={trigger:"dx-license-trigger",panel:"dx-license"},go={buyNow:"buy-now",licensingDoc:"licensing-doc",version:"version"},mT={opacity:"1",visibility:"visible","clip-path":"none",filter:"none"},fT=I({},mT,{width:"100%",height:"auto","line-height":"normal",display:"block","z-index":"1500",position:"static",transform:"translate(0px, 0px)","background-color":"#FF7200",border:"none",margin:"auto","box-sizing":"border-box","text-align":"center"}),jj=I({},fT,{display:"flex","align-items":"center","flex-direction":"row",position:"relative",top:"0px",left:"0px",padding:"0.5rem"}),Kj={width:"1rem",cursor:"pointer",height:"1rem"},hT=I({},mT,{display:"inline",position:"static",padding:"0px",margin:"0px",color:"white","font-family":"'Segoe UI','Open Sans Condensed',-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif","font-size":"0.875rem","font-wight":"600"});function Us(i,e){let t=e?I({},i,e):i;return Object.keys(t).reduce((n,o)=>`${n}${[o,`${t[o]} !important;`].join(": ")}`,"")}var pT=(()=>{class i extends gT{constructor(){var t,n,o,s,r;super(),this._observer=null,this._inReassign=!1,this._hidden=!1,this._spanStyles=Us(hT,(t=i.customStyles)===null||t===void 0?void 0:t.textStyles),this._linkStyles=Us(hT,(n=i.customStyles)===null||n===void 0?void 0:n.linkStyles),this._containerStyles=Us(jj,(o=i.customStyles)===null||o===void 0?void 0:o.containerStyles),this._contentStyles=Us(fT,(s=i.customStyles)===null||s===void 0?void 0:s.contentStyles),this._buttonStyles=Us(Kj,(r=i.customStyles)===null||r===void 0?void 0:r.contentStyles)}_createSpan(t){let n=document.createElement("span");return n.innerText=t,n.style.cssText=this._spanStyles,n}_createLink(t,n){let o=document.createElement("a");return o.innerText=t,o.style.cssText=this._linkStyles,o.href=n,o.target="_blank",o}_createButton(){let t=document.createElement("div");t.style.cssText=this._buttonStyles;let n=document.createElementNS("http://www.w3.org/2000/svg","polygon"),o=document.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("points","13.4 12.7 8.7 8 13.4 3.4 12.6 2.6 8 7.3 3.4 2.6 2.6 3.4 7.3 8 2.6 12.6 3.4 13.4 8 8.7 12.7 13.4 13.4 12.7"),n.style.cssText=Us({fill:"#fff",opacity:".5","stroke-width":"0px"}),o.setAttribute("id","Layer_1"),o.setAttribute("data-name","Layer 1"),o.setAttribute("version","1.1"),o.setAttribute("viewBox","0 0 16 16"),o.style.cssText=Us({"vertical-align":"baseline"}),o.appendChild(n),t.appendChild(o),t.onclick=()=>{this._hidden=!0,this.style.cssText=Us({display:"none"})},t}_createContentContainer(){let t=document.createElement("div");return t.style.cssText=this._contentStyles,t.append(this._createSpan("For evaluation purposes only. Redistribution prohibited. Please "),this._createLink("register",this.getAttribute(go.licensingDoc)),this._createSpan(" an existing license or "),this._createLink("purchase a new license",this.getAttribute(go.buyNow)),this._createSpan(` to continue use of DevExpress product libraries (v${this.getAttribute(go.version)}).`)),t}_reassignComponent(){this.innerHTML="",this.style.cssText=this._containerStyles,this.append(this._createContentContainer(),this._createButton())}connectedCallback(){this._reassignComponent(),this._observer||(this._observer=new MutationObserver(()=>{if(this._hidden){var t;(t=this._observer)===null||t===void 0||t.disconnect();return}this._inReassign?this._inReassign=!1:(this._inReassign=!0,this._reassignComponent())}),this._observer.observe(this,{childList:!0,attributes:!0,subtree:!0}))}disconnectedCallback(){setTimeout(()=>{document.getElementsByTagName(Ia.panel).length||document.body.prepend(this)},100)}}return i.customStyles=void 0,i})(),mv=class extends gT{connectedCallback(){if(this.style.cssText=Us({display:"none"}),!document.getElementsByTagName(Ia.panel).length){let t=document.createElement(Ia.panel);t.setAttribute(go.version,this.getAttribute(go.version)),t.setAttribute(go.buyNow,this.getAttribute(go.buyNow)),t.setAttribute(go.licensingDoc,this.getAttribute(go.licensingDoc)),t.setAttribute("data-permanent","true"),document.body.prepend(t)}}};function _T(i){customElements.get(Ia.trigger)||(pT.customStyles=i,customElements.define(Ia.trigger,mv),customElements.define(Ia.panel,pT))}function CT(i,e,t,n){_T(n);let o=document.createElement(Ia.trigger);o.setAttribute(go.buyNow,i),o.setAttribute(go.licensingDoc,e),o.setAttribute(go.version,t),document.body.appendChild(o)}function xT(i,e,t,n){fv()&&CT(i,e,t,n)}var Wn;(function(i){i.corrupted="corrupted",i.verified="verified",i.internal="internal"})(Wn||(Wn={}));var Uj=["customerId","maxVersionAllowed","format","internalUsageId"],qj=1,Yj=3,Xj=".",Qj="https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeJQuery.aspx",Zj="https://go.devexpress.com/Licensing_Documentation_DevExtremeJQuery.aspx",vT={kind:Wn.corrupted,error:"general"},Jj={kind:Wn.corrupted,error:"verification"},eK={kind:Wn.corrupted,error:"decoding"},tK={kind:Wn.corrupted,error:"deserialization"},iK={kind:Wn.corrupted,error:"payload"},nK={kind:Wn.corrupted,error:"version"},_v=!1;function oK(i){let{text:e,signature:t}=i;return cT({key:$p,signature:nT(t),actual:dT(uT(e))})}function sK(i){if(i===void 0)return vT;let e=i.split(Xj);if(e.length!==2||e[0].length===0||e[1].length===0)return vT;if(!oK({text:e[0],signature:e[1]}))return Jj;let t="";try{t=atob(e[0])}catch{return eK}let n={};try{n=JSON.parse(t)}catch{return tK}let{customerId:o,maxVersionAllowed:s,format:r,internalUsageId:a}=n,l=_e(n,Uj);return a!==void 0?{kind:Wn.internal,internalUsageId:a}:o===void 0||s===void 0||r===void 0?iK:r!==qj?nK:{kind:Wn.verified,payload:I({customerId:o,maxVersionAllowed:s},l)}}function bT(i){return isNaN(i)||i<Yj}function rK(i){let{licenseKey:e,version:t}=i,n=!1;try{n=bT(t.patch);let{major:o,minor:s}=n?tT(t):t;if(!e)return{preview:n,error:"W0019"};let r=sK(e);return r.kind===Wn.corrupted?{preview:n,error:"W0021"}:r.kind===Wn.internal?{preview:n,internal:!0,error:r.internalUsageId===lT?void 0:"W0020"}:o&&s?10*o+s>r.payload.maxVersionAllowed?{preview:n,error:"W0020"}:{preview:n,error:void 0}:{preview:n,error:"W0021"}}catch{return{preview:n,error:"W0021"}}}function aK(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p_;if(_v)return;_v=!0;let t=hv(e),n=iT(t),{internal:o,error:s}=rK({licenseKey:i,version:t});if(!n&&o)return;if(s&&!o){let a=xe().buyNowLink??Qj,l=xe().licensingDocLink??Zj;xT(a,l,p_)}let r=bT(t.patch);if(s){me.log(r?"W0022":s);return}r&&!o&&me.log("W0022")}function Cv(){return _v}var yT={validateLicense:aK};var{abstract:zp}=lv,xv=lv.inherit({_getDefaultOptions(){return m(this.callBase(),{width:void 0,height:void 0,rtlEnabled:xe().rtlEnabled,elementAttr:{},disabled:!1,integrationOptions:{}},this._useTemplates()?Gc.createDefaultOptions():{})},ctor(i,e){this._customClass=null,this._createElement(i),Ip(this._$element,this,this._dispose),this.callBase(e);let t=Cv();yT.validateLicense(xe().licenseKey),!t&&Cv()&&xe({licenseKey:""})},_createElement(i){this._$element=u(i)},_getSynchronizableOptionsForCreateComponent:()=>["rtlEnabled","disabled","templatesRenderAsynchronously"],_checkFunctionValueDeprecation:function(i){this.option("_ignoreFunctionValueDeprecation")||i.forEach(e=>{A(this.option(e))&&me.log("W0017",e)})},_visibilityChanged:zp,_dimensionChanged:zp,_init(){this.callBase(),this._checkFunctionValueDeprecation(["width","height","maxHeight","maxWidth","minHeight","minWidth","popupHeight","popupWidth"]),this._attachWindowResizeCallback(),this._initTemplateManager()},_setOptionsByDevice(i){this.callBase([].concat(this.constructor._classCustomRules||[],i||[]))},_isInitialOptionValue(i){return!(this.constructor._classCustomRules&&Object.prototype.hasOwnProperty.call(this._convertRulesToOptions(this.constructor._classCustomRules),i))&&this.callBase(i)},_attachWindowResizeCallback(){if(this._isDimensionChangeSupported()){let i=this._windowResizeCallBack=this._dimensionChanged.bind(this);Mo.add(i)}},_isDimensionChangeSupported(){return this._dimensionChanged!==zp},_renderComponent(){Bw(this.$element()),this._initMarkup(),j()&&this._render()},_initMarkup(){let{rtlEnabled:i}=this.option()||{};this._renderElementAttributes(),this._toggleRTLDirection(i),this._renderVisibilityChange(),this._renderDimensions()},_render(){this._attachVisibilityChangeHandlers()},_renderElementAttributes(){let{elementAttr:i}=this.option()||{},e=m({},i),t=e.class;delete e.class,this.$element().attr(e).removeClass(this._customClass).addClass(t),this._customClass=t},_renderVisibilityChange(){this._isDimensionChangeSupported()&&this._attachDimensionChangeHandlers(),this._isVisibilityChangeSupported()&&this.$element().addClass("dx-visibility-change-handler")},_renderDimensions(){let i=this.$element(),e=i.get(0),t=this._getOptionValue("width",e),n=this._getOptionValue("height",e);this._isCssUpdateRequired(e,n,t)&&i.css({width:t===null?"":t,height:n===null?"":n})},_isCssUpdateRequired:(i,e,t)=>!!(f(t)||f(e)||i.style.width||i.style.height),_attachDimensionChangeHandlers(){let i=this.$element(),e=`${this.NAME}VisibilityChange`;Nl.off(i,{namespace:e}),Nl.on(i,()=>this._dimensionChanged(),{namespace:e})},_attachVisibilityChangeHandlers(){if(this._isVisibilityChangeSupported()){let i=this.$element(),e=`${this.NAME}VisibilityChange`;this._isHidden=!this._isVisible(),Hl.off(i,{namespace:e}),Hl.on(i,()=>this._checkVisibilityChanged("shown"),()=>this._checkVisibilityChanged("hiding"),{namespace:e})}},_isVisible(){return this.$element().is(":visible")},_checkVisibilityChanged(i){this._isVisible()&&(i==="hiding"&&!this._isHidden?(this._visibilityChanged(!1),this._isHidden=!0):i==="shown"&&this._isHidden&&(this._isHidden=!1,this._visibilityChanged(!0)))},_isVisibilityChangeSupported(){return this._visibilityChanged!==zp&&j()},_clean:E,_modelByElement(){let{modelByElement:i}=this.option(),e=this.$element();return i?i(e):void 0},_invalidate(){if(this._isUpdateAllowed())throw me.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()&&Mo.remove(this._windowResizeCallBack)},_toggleRTLDirection(i){this.$element().toggleClass("dx-rtl",i)},_createComponent(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=At(this._getSynchronizableOptionsForCreateComponent(),l=>!(l in t)),{integrationOptions:o}=this.option(),{nestedComponentOptions:s}=this.option();s=s||E;let r=m({integrationOptions:o},s(this));n.forEach(l=>r[l]=this.option(l)),this._extendConfig(t,r);let a;if(B(e)?a=u(i)[e](t)[e]("instance"):i&&(a=e.getInstance(i),a?a.option(t):a=new e(i,t)),a){let l=d=>{let{name:c,value:h}=d;n.includes(c)&&a.option(c,h)};this.on("optionChanged",l),a.on("disposing",()=>this.off("optionChanged",l))}return a},_extendConfig(i,e){x(e,(t,n)=>{!Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=n)})},_defaultActionConfig(){let i=this.$element(),e=this._modelByElement(i);return m(this.callBase(),{context:e})},_defaultActionArgs(){let i=this.$element(),e=this._modelByElement(i),t=this.element();return m(this.callBase(),{element:t,model:e})},_optionChanged(i){switch(i.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(i)}},_removeAttributes(i){let e=i.attributes;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n){let{name:o}=n;(!o.indexOf("aria-")||o.indexOf("dx-")!==-1||o==="role"||o==="style"||o==="tabindex")&&i.removeAttribute(o)}}},_removeClasses(i){i.className=i.className.split(" ").filter(e=>e.lastIndexOf("dx-",0)!==0).join(" ")},_updateDOMComponent(i){i?this._renderComponent():this._requireRefresh&&(this._requireRefresh=!1,this._refresh())},endUpdate(){let i=this._isInitializingRequired();this.callBase(),this._isUpdateAllowed()&&this._updateDOMComponent(i)},$element(){return this._$element},element(){let i=this.$element();return H(i)},dispose(){let i=this.$element().get(0);Dr(i,!0),i.textContent="",this._removeAttributes(i),this._removeClasses(i)},resetOption(i){if(this.callBase(i),i==="width"||i==="height"){let e=this.initialOption(i);!f(e)&&this.$element().css(i,"")}},_getAnonymousTemplateName(){},_initTemplateManager(){if(this._templateManager||!this._useTemplates())return;let{integrationOptions:i={}}=this.option(),{createTemplate:e}=i;this._templateManager=new Gc(e,this._getAnonymousTemplateName()),this._initTemplates()},_initTemplates(){let{templates:i,anonymousTemplateMeta:e}=this._templateManager.extractTemplates(this.$element()),t=this.option(`integrationOptions.templates.${e.name}`);i.forEach(n=>{let{name:o,template:s}=n;this._options.silent(`integrationOptions.templates.${o}`,s)}),e.name&&!t&&(this._options.silent(`integrationOptions.templates.${e.name}`,e.template),this._options.silent("_hasAnonymousTemplateContent",!0))},_getTemplateByOption(i){return this._getTemplate(this.option(i))},_getTemplate(i){let e=this.option("integrationOptions.templates"),t=this.option("templatesRenderAsynchronously"),n=this.option("integrationOptions.skipTemplates");return this._templateManager.getTemplate(i,e,{isAsyncTemplate:t,skipTemplates:n},this)},_saveTemplate(i,e){this._setOptionWithoutOptionChange("integrationOptions.templates."+i,this._templateManager._createTemplate(e))},_useTemplates:()=>!0});xv.getInstance=function(i){return Dp(u(i),this)};xv.defaultOptions=function(i){this._classCustomRules=this._classCustomRules||[],this._classCustomRules.push(i)};var pn=xv;function Wp(i,e,t){function n(s){return typeof s=="string"?s.split("."):typeof s=="number"?[s]:s}i=n(i),e=n(e);let o=Math.max(i.length,e.length);isFinite(t)&&(o=Math.min(o,t));for(let s=0;s<o;s++){let r=parseInt(i[s]||0,10),a=parseInt(e[s]||0,10);if(r<a)return-1;if(r>a)return 1}return 0}function OT(i){return i&&[i.target,i.delegateTarget,i.relatedTarget,i.currentTarget].filter(e=>!!e)}var ET=(i,e)=>{_.one(OT(i),ai,e)},wT=(i,e)=>{_.off(OT(i),ai,e)};var de="dxclick";var vv=null,jc=null,ST=()=>{jc=null},IT=function(i){let e=i.originalEvent,t=jc===e||e&&e.DXCLICK_FIRED;(!i.which||i.which===1)&&!vv&&!t&&(e&&(e.DXCLICK_FIRED=!0),wT(jc,ST),jc=e,ET(jc,ST),hn({type:"dxclick",originalEvent:i}))},lK=Br.inherit({ctor:function(i){this.callBase(i),_.on(this.getElement(),"click",IT)},start:function(i){vv=null},cancel:function(){vv=!0},dispose:function(){_.off(this.getElement(),"click",IT)}});(function(){if(!F.real().generic){let e=null,t=!1,n=function(d){return u(d).is("input, textarea, select, button ,:focus, :focus *")},o=function(d){e=d.target,t=d.isDefaultPrevented()},s=function(d){let c=gl(d);return u(c)},r=function(d){let c=s(d);!t&&e&&!c.is(e)&&!u(e).is("label")&&n(c)&&uo(),e=null,t=!1},a="NATIVE_CLICK_FIXER",l=S.getDocument();_.subscribeGlobal(l,D(le.down,a),o),_.subscribeGlobal(l,D("click",a),r)}})();ho({emitter:lK,bubble:!0,events:["dxclick"]});var DT="dxactive";var Gp=pe.inherit({ctor:function(i,e){this._timeout=i,this._fire=e},start:function(){let i=this;this._schedule(function(){i.force()})},_schedule:function(i){this.stop(),this._timer=setTimeout(i,this._timeout)},stop:function(){clearTimeout(this._timer)},force:function(){this._fired||(this.stop(),this._fire(),this._fired=!0)},fired:function(){return this._fired}}),Vo,bv=Br.inherit({ctor:function(){this.callBase.apply(this,arguments),this._active=new Gp(0,E),this._inactive=new Gp(0,E)},configure:function(i,e){switch(e){case"dxactive":i.activeTimeout=i.timeout;break;case"dxinactive":i.inactiveTimeout=i.timeout}this.callBase(i)},start:function(i){if(Vo){let e=bn(this.getElement().get(0),Vo.getElement().get(0)),t=!Vo._active.fired();if(e&&t){this._cancel();return}Vo._inactive.force()}Vo=this,this._initEvents(i),this._active.start()},_initEvents:function(i){let e=this,t=this._getEmitterTarget(i),n=co(i),s=F.isSimulator()||!n,r=Be(this.activeTimeout,30),a=Be(this.inactiveTimeout,400);this._active=new Gp(s?r:0,function(){e._fireEvent("dxactive",i,{target:t})}),this._inactive=new Gp(s?a:0,function(){e._fireEvent("dxinactive",i,{target:t}),Vo=null})},cancel:function(i){this.end(i)},end:function(i){let e=i.type!==le.up;e?this._active.stop():this._active.force(),this._inactive.start(),e&&this._inactive.force()},dispose:function(){this._active.stop(),this._inactive.stop(),Vo===this&&(Vo=null),this.callBase()},lockInactive:function(){return this._active.force(),this._inactive.stop(),Vo=null,this._cancel(),this._inactive.force.bind(this._inactive)}});bv.lock=function(i){let e=Vo?Vo.lockInactive():E;i.done(e)};ho({emitter:bv,events:["dxactive","dxinactive"]});var jp=bv.lock;var Nr="dxhoverstart",cK=D(le.enter,"dxHoverStart");var Hr="dxhoverend",uK=D(le.leave,"dxHoverEnd"),TT=pe.inherit({noBubble:!0,ctor:function(){this._handlerArrayKeyPath=this._eventNamespace+"_HandlerStore"},setup:function(i){Xe(i,this._handlerArrayKeyPath,{})},add:function(i,e){let t=this,n=function(o){t._handler(o)};_.on(i,this._originalEventName,e.selector,n),Xe(i,this._handlerArrayKeyPath)[e.guid]=n},_handler:function(i){Ws(i)||F.isSimulator()||hn({type:this._eventName,originalEvent:i,delegateTarget:i.delegateTarget})},remove:function(i,e){let t=Xe(i,this._handlerArrayKeyPath)[e.guid];_.off(i,this._originalEventName,e.selector,t)},teardown:function(i){Ir(i,this._handlerArrayKeyPath)}}),hK=TT.inherit({ctor:function(){this._eventNamespace="dxHoverStart",this._eventName=Nr,this._originalEventName=cK,this.callBase()},_handler:function(i){(i.pointers||[]).length||this.callBase(i)}}),pK=TT.inherit({ctor:function(){this._eventNamespace="dxHoverEnd",this._eventName=Hr,this._originalEventName=uK,this.callBase()}});Vi(Nr,new hK);Vi(Hr,new pK);function AT(i,e,t){i=i==="role"||i==="id"?i:`aria-${i}`,e=f(e)?e.toString():null,t.attr(i,e)}var yv=pn.inherit({_feedbackHideTimeout:400,_feedbackShowTimeout:30,_supportedKeys:()=>({}),_getDefaultOptions(){return m(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(){let i=F.real(),e=i.platform,t=i.version;return e==="ios"&&Wp(t,"13.3")<=0},options:{useResizeObserver:!1}}])},_init(){this.callBase(),this._initContentReadyAction()},_innerWidgetOptionChanged:function(i,e){let t=yv.getOptionsFromContainer(e);i&&i.option(t),this._options.cache(e.name,t)},_bindInnerWidgetOptions(i,e){let t=()=>this._options.silent(e,m({},i.option()));t(),i.on("optionChanged",t)},_getAriaTarget(){return this._focusTarget()},_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initMarkup(){let{disabled:i,visible:e}=this.option();this.$element().addClass("dx-widget"),this._toggleDisabledState(i),this._toggleVisibility(e),this._renderHint(),this._isFocusable()&&this._renderFocusTarget(),this.callBase()},_render(){this.callBase(),this._renderContent(),this._renderFocusState(),this._attachFeedbackEvents(),this._attachHoverEvents(),this._toggleIndependentState()},_renderHint(){let{hint:i}=this.option();this.$element().attr("title",i||null)},_renderContent(){pt(()=>this._disposed?void 0:this._renderContentImpl()).done(()=>this._disposed?void 0:this._fireContentReadyAction())},_renderContentImpl:E,_fireContentReadyAction:Jo(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(i){this.$element().toggleClass("dx-state-invisible",!i)},_renderFocusState(){this._attachKeyboardEvents(),this._isFocusable()&&(this._renderFocusTarget(),this._attachFocusEvents(),this._renderAccessKey())},_renderAccessKey(){let i=this._focusTarget(),{accessKey:e}=this.option();i.attr("accesskey",e)},_isFocusable(){let{focusStateEnabled:i,disabled:e}=this.option();return i&&!e},_eventBindingTarget(){return this.$element()},_focusTarget(){return this._getActiveElement()},_isFocusTarget:function(i){return u(this._focusTarget()).toArray().includes(i)},_findActiveTarget(i){return i.find(this._activeStateUnit).not(".dx-state-disabled")},_getActiveElement(){let i=this._eventBindingTarget();return this._activeStateUnit?this._findActiveTarget(i):i},_renderFocusTarget(){let{tabIndex:i}=this.option();this._focusTarget().attr("tabIndex",i)},_keyboardEventBindingTarget(){return this._eventBindingTarget()},_refreshFocusEvent(){this._detachFocusEvents(),this._attachFocusEvents()},_focusEventTarget(){return this._focusTarget()},_focusInHandler(i){i.isDefaultPrevented()||this._createActionByOption("onFocusIn",{beforeExecute:()=>this._updateFocusState(i,!0),excludeValidators:["readOnly"]})({event:i})},_focusOutHandler(i){i.isDefaultPrevented()||this._createActionByOption("onFocusOut",{beforeExecute:()=>this._updateFocusState(i,!1),excludeValidators:["readOnly","disabled"]})({event:i})},_updateFocusState(i,e){let{target:t}=i;this._isFocusTarget(t)&&this._toggleFocusClass(e,u(t))},_toggleFocusClass(i,e){(e&&e.length?e:this._focusTarget()).toggleClass("dx-state-focused",i)},_hasFocusClass(i){return u(i||this._focusTarget()).hasClass("dx-state-focused")},_isFocused(){return this._hasFocusClass()},_getKeyboardListeners:()=>[],_attachKeyboardEvents(){this._detachKeyboardEvents();let{focusStateEnabled:i,onKeyboardHandled:e}=this.option(),t=this._getKeyboardListeners().length;(i||t||!!e)&&(this._keyboardListenerId=po.on(this._keyboardEventBindingTarget(),this._focusTarget(),s=>this._keyboardHandler(s)))},_keyboardHandler(i,e){if(!e){let{originalEvent:o,keyName:s,which:r}=i,a=this._supportedKeys(o),l=a[s]||a[r];if(l!==void 0&&!l.bind(this)(o,i))return!1}let t=this._getKeyboardListeners(),{onKeyboardHandled:n}=this.option();return t.forEach(o=>o&&o._keyboardHandler(i)),n&&n(i),!0},_refreshFocusState(){this._cleanFocusState(),this._renderFocusState()},_cleanFocusState(){this._focusTarget().removeAttr("tabIndex"),this._toggleFocusClass(!1),this._detachFocusEvents(),this._detachKeyboardEvents()},_detachKeyboardEvents(){po.off(this._keyboardListenerId),this._keyboardListenerId=null},_attachHoverEvents(){let{hoverStateEnabled:i}=this.option(),e=this._activeStateUnit,t=this._eventBindingTarget();Jx.off(t,{selector:e,namespace:"UIFeedback"}),i&&Jx.on(t,new ko(n=>{let{event:o,element:s}=n;this._hoverStartHandler(o),this.option("hoveredElement",u(s))},{excludeValidators:["readOnly"]}),n=>{this.option("hoveredElement",null),this._hoverEndHandler(n)},{selector:e,namespace:"UIFeedback"})},_attachFeedbackEvents(){let{activeStateEnabled:i}=this.option(),e=this._activeStateUnit,t=this._eventBindingTarget();Zx.off(t,{namespace:"UIFeedback",selector:e}),i&&Zx.on(t,new ko(n=>{let{event:o,element:s}=n;return this._toggleActiveState(u(s),!0,o)}),new ko(n=>{let{event:o,element:s}=n;return this._toggleActiveState(u(s),!1,o)},{excludeValidators:["disabled","readOnly"]}),{showTimeout:this._feedbackShowTimeout,hideTimeout:this._feedbackHideTimeout,selector:e,namespace:"UIFeedback"})},_detachFocusEvents(){let i=this._focusEventTarget();$l.off(i,{namespace:`${this.NAME}Focus`})},_attachFocusEvents(){let i=this._focusEventTarget();$l.on(i,e=>this._focusInHandler(e),e=>this._focusOutHandler(e),{namespace:`${this.NAME}Focus`,isFocusable:(e,t)=>u(t).is(Mc)})},_hoverStartHandler:E,_hoverEndHandler:E,_toggleActiveState(i,e){this.option("isActive",e),i.toggleClass("dx-state-active",e)},_updatedHover(){let i=this._options.silent("hoveredElement");this._hover(i,i)},_findHoverTarget(i){return i&&i.closest(this._activeStateUnit||this._eventBindingTarget())},_hover(i,e){let{hoverStateEnabled:t,disabled:n,isActive:o}=this.option();if(e=this._findHoverTarget(e),e&&e.toggleClass("dx-state-hover",!1),i&&t&&!n&&!o){let s=this._findHoverTarget(i);s&&s.toggleClass("dx-state-hover",!0)}},_toggleDisabledState(i){this.$element().toggleClass("dx-state-disabled",!!i),this.setAria("disabled",i||void 0)},_toggleIndependentState(){this.$element().toggleClass("dx-state-independent",this.option("ignoreParentReadOnly"))},_setWidgetOption(i,e){if(!this[i])return;if(X(e[0])){x(e[0],(s,r)=>this._setWidgetOption(i,[s,r]));return}let t=e[0],n=e[1];e.length===1&&(n=this.option(t));let o=this[`${i}OptionMap`];this[i].option(o?o(t):t,n)},_optionChanged(i){let{name:e,value:t,previousValue:n}=i;switch(e){case"disabled":this._toggleDisabledState(t),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(t,n);break;case"isActive":this._updatedHover();break;case"visible":this._toggleVisibility(t),this._isVisibilityChangeSupported()&&this._checkVisibilityChanged(t?"shown":"hiding");break;case"onKeyboardHandled":this._attachKeyboardEvents();break;case"onContentReady":this._initContentReadyAction();break;default:this.callBase(i)}},_isVisible(){let{visible:i}=this.option();return this.callBase()&&i},beginUpdate(){this._ready(!1),this.callBase()},endUpdate(){this.callBase(),this._initialized&&this._ready(!0)},_ready(i){if(arguments.length===0)return this._isReady;this._isReady=i},setAria(){if(!X(arguments.length<=0?void 0:arguments[0]))AT(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],(arguments.length<=2?void 0:arguments[2])||this._getAriaTarget());else{let i=(arguments.length<=1?void 0:arguments[1])||this._getAriaTarget();x(arguments.length<=0?void 0:arguments[0],(e,t)=>AT(e,t,i))}},isReady(){return this._ready()},repaint(){this._refresh()},focus(){$l.trigger(this._focusTarget())},registerKeyHandler(i,e){let t=this._supportedKeys();this._supportedKeys=()=>m(t,{[i]:e})}});yv.getOptionsFromContainer=i=>{let{name:e,fullName:t,value:n}=i,o={};if(e===t)o=n;else{let s=t.split(".").pop();o[s]=n}return o};var at=yv;var gK=i=>{let t=u(i).closest('[class^="dx-swatch-"], [class*=" dx-swatch-"]'),n=zn();if(!t.length)return n;let o=new RegExp("(\\s|^)(dx-swatch-.*?)(\\s|$)"),s=t[0].className.match(o)[2],r=n.children("."+s);return r.length||(r=u("<div>").addClass(s).appendTo(n)),r},Kp={getSwatchContainer:gK};var mK=q(),Ov={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"}},MT={h:0,v:0},$r=class{constructor(e){let{position:t,container:n,visualContainer:o,$root:s,$content:r,$wrapper:a,onPositioned:l,onVisualPositionChanged:d,restorePosition:c,_fixWrapperPosition:h,_skipContentPositioning:p}=e;this._props={position:t,container:n,visualContainer:o,restorePosition:c,onPositioned:l,onVisualPositionChanged:d,_fixWrapperPosition:h,_skipContentPositioning:p},this._$root=s,this._$content=r,this._$wrapper=a,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(t),this.updateVisualContainer(o)}get $container(){return this.updateContainer(),this._$markupContainer}get $visualContainer(){return this._$visualContainer}get position(){return this._position}set fixWrapperPosition(e){this._props._fixWrapperPosition=e,this.styleWrapperPosition()}set restorePosition(e){this._props.restorePosition=e}restorePositionOnNextRender(e){this._shouldRenderContentInitialPosition=e||!this._visualPosition}openingHandled(){let e=this._props.restorePosition;this.restorePositionOnNextRender(e)}updatePosition(e){this._props.position=e,this._position=this._normalizePosition(e),this.updateVisualContainer()}updateContainer(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._props.container;this._props.container=e,this._$markupContainer=e?u(e):Kp.getSwatchContainer(this._$root),this.updateVisualContainer(this._props.visualContainer)}updateVisualContainer(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._props.visualContainer;this._props.visualContainer=e,this._$visualContainer=this._getVisualContainer()}detectVisualPositionChange(e){this._updateVisualPositionValue(),this._raisePositionedEvents(e)}positionContent(){this._shouldRenderContentInitialPosition?this._renderContentInitialPosition():(Ve(this._$content,this._visualPosition),this.detectVisualPositionChange())}positionWrapper(){this._$visualContainer&&xt.setup(this._$wrapper,{my:"top left",at:"top left",of:this._$visualContainer})}styleWrapperPosition(){let t=Ue(this.$visualContainer.get(0))||this._props._fixWrapperPosition?"fixed":"absolute";this._$wrapper.css("position",t)}_updateVisualPositionValue(){this._previousVisualPosition=this._visualPosition,this._visualPosition=Ti(this._$content)}_renderContentInitialPosition(){this._renderBoundaryOffset(),rs(this._$content);let e=this._$wrapper.css("overflow");if(this._$wrapper.css("overflow","hidden"),!this._props._skipContentPositioning){let t=xt.setup(this._$content,this._position);this._initialPosition=t}this._$wrapper.css("overflow",e),this.detectVisualPositionChange()}_raisePositionedEvents(e){let t=this._previousVisualPosition,n=this._visualPosition;(t?.top!==n.top||t?.left!==n.left)&&this._props.onVisualPositionChanged({previousPosition:t,position:n,event:e}),this._props.onPositioned({position:this._initialPosition})}_renderBoundaryOffset(){let e=this._position??{boundaryOffset:MT};this._$content.css("margin",`${e.v}px ${e.h}px`)}_getVisualContainer(){var e,t;let n=this._props.container,o=this._props.visualContainer,s=xw((e=this._props.position)===null||e===void 0?void 0:e.of)?this._props.position.of.target:(t=this._props.position)===null||t===void 0?void 0:t.of;return o?u(o):n?u(n):s?u(s):u(mK)}_normalizePosition(e){let t={boundaryOffset:MT};return f(e)?m(!0,{},t,this._positionToObject(e)):t}_positionToObject(e){return B(e)?m({},Ov[e]):e}};var Up=1500,zr=[],RT=i=>(Up=Be(i,Up),Up),qp=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Up,{length:e}=zr,t=(e?zr[e-1]:i)+1;return zr.push(t),t},Kc=i=>{let e=zr.indexOf(i);e>=0&&zr.splice(e,1)},FT=i=>zr.length&&zr[zr.length-1]===i;var fK=ri.add,zl=q(),kT=ya;var Ev=[];fK(()=>{_.subscribeGlobal(S.getDocument(),le.down,i=>{for(let e=Ev.length-1;e>=0;e--)if(!Ev[e]._proxiedDocumentDownHandler(i))return})});var Yp=at.inherit({_supportedKeys(){return m(this.callBase(),{escape(){this.hide()}})},_getDefaultOptions(){return m(this.callBase(),{activeStateEnabled:!1,visible:!1,deferRendering:!0,shading:!0,shadingColor:"",wrapperAttr:{},position:m({},Ov.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,from:{opacity:1,scale:1},to:{opacity:0,scale:.55}}},closeOnOutsideClick:!1,hideOnOutsideClick:!1,_ignorePreventScrollEventsDeprecation:!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,preventScrollEvents:!0,onPositioned:null,propagateOutsideClick:!1,ignoreChildEvents:!0,_checkParentVisibility:!0,_hideOnParentScrollTarget:void 0,_fixWrapperPosition:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>!j(),options:{width:null,height:null,animation:null,_checkParentVisibility:!1}}])},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{animation:!0})},$wrapper(){return this._$wrapper},_eventBindingTarget(){return this._$content},_setDeprecatedOptions(){this.callBase(),m(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.1",alias:"hideOnOutsideClick"}})},ctor(i,e){this.callBase(i,e),e&&"preventScrollEvents"in e&&!e._ignorePreventScrollEventsDeprecation&&this._logDeprecatedPreventScrollEventsInfo()},_logDeprecatedPreventScrollEventsInfo(){this._logDeprecatedOptionWarning("preventScrollEvents",{since:"23.1",message:"If you enable this option, end-users may experience scrolling issues."})},_init(){this.callBase(),this._initActions(),this._initHideOnOutsideClickHandler(),this._initTabTerminatorHandler(),this._customWrapperClass=null,this._$wrapper=u("<div>").addClass("dx-overlay-wrapper"),this._$content=u("<div>").addClass("dx-overlay-content"),this._initInnerOverlayClass(),this.$element().addClass("dx-overlay"),this._$wrapper.attr("data-bind","dxControlsDescendantBindings: true"),this._toggleViewPortSubscription(!0),this._initHideTopOverlayHandler(this.option("hideTopOverlayHandler")),this._parentsScrollSubscriptionInfo={handler:e=>{this._hideOnParentsScrollHandler(e)}},this.warnPositionAsFunction()},warnPositionAsFunction(){A(this.option("position"))&&me.log("W0018")},_initInnerOverlayClass(){this._$content.toggleClass("dx-inner-overlay",this.option("innerOverlay"))},_initHideTopOverlayHandler(i){this._hideTopOverlayHandler=i},_getActionsList:()=>["onShowing","onShown","onHiding","onHidden","onPositioned","onVisualPositionChanged"],_initActions(){this._actions={};let i=this._getActionsList();x(i,(e,t)=>{this._actions[t]=this._createActionByOption(t,{excludeValidators:["disabled","readOnly"]})||E})},_initHideOnOutsideClickHandler(){var i=this;this._proxiedDocumentDownHandler=function(){return i._documentDownHandler(...arguments)}},_initMarkup(){this.callBase(),this._renderWrapperAttributes(),this._initPositionController()},_documentDownHandler(i){this._showAnimationProcessing&&this._stopAnimation();let e=u(zl.document).is(i.target)||bn(zl.document,i.target),t=u(i.target).closest(".dx-inner-overlay").length;return e&&!t&&!(this._$content.is(i.target)||bn(this._$content.get(0),i.target))&&this._shouldHideOnOutsideClick(i)&&this._outsideClickHandler(i),this.option("propagateOutsideClick")},_shouldHideOnOutsideClick(i){let{hideOnOutsideClick:e}=this.option();return A(e)?e(i):e},_outsideClickHandler(i){this.option("shading")&&i.preventDefault(),this.hide()},_getAnonymousTemplateName:()=>"content",_initTemplates(){this._templateManager.addDefaultTemplates({content:new tn}),this.callBase()},_isTopOverlay(){let i=this._overlayStack();for(let e=i.length-1;e>=0;e--){let t=i[e]._findTabbableBounds();if(t.first||t.last)return i[e]===this}return!1},_overlayStack:()=>Ev,_zIndexInitValue:()=>Yp.baseZIndex(),_toggleViewPortSubscription(i){var e=this;kT.remove(this._viewPortChangeHandle),i&&(this._viewPortChangeHandle=function(){e._viewPortChangeHandler(...arguments)},kT.add(this._viewPortChangeHandle))},_viewPortChangeHandler(){this._positionController.updateContainer(this.option("container")),this._refresh()},_renderWrapperAttributes(){let{wrapperAttr:i}=this.option(),e=m({},i),t=e.class;delete e.class,this.$wrapper().attr(e).removeClass(this._customWrapperClass).addClass(t),this._customWrapperClass=t},_renderVisibilityAnimate(i){return this._stopAnimation(),i?this._show():this._hide()},_getAnimationConfig(){return this._getOptionValue("animation",this)},_toggleBodyScroll:E,_animateShowing(){var i=this;let e=this._getAnimationConfig()??{},t=this._normalizeAnimation(e.show,"to"),n=t?.start??E,o=t?.complete??E;this._animate(t,function(){if(!i._isAnimationPaused){i.option("focusStateEnabled")&&_.trigger(i._focusTarget(),"focus");for(var s=arguments.length,r=new Array(s),a=0;a<s;a++)r[a]=arguments[a];o.call(i,...r),i._showAnimationProcessing=!1,i._isHidden=!1,i._actions.onShown(),i._toggleSafariScrolling(),i._showingDeferred.resolve()}},function(){if(!i._isAnimationPaused){for(var s=arguments.length,r=new Array(s),a=0;a<s;a++)r[a]=arguments[a];n.call(i,...r),i._showAnimationProcessing=!0}})},_processShowingHidingCancel(i,e,t){Zo(i)?i.then(n=>{n?t():e()}).catch(()=>e()):i?t():e()},_show(){if(this._showingDeferred=y(),this._parentHidden=this._isParentHidden(),this._showingDeferred.done(()=>{delete this._parentHidden}),this._parentHidden)return this._isHidden=!0,this._showingDeferred.resolve();if(this._currentVisible)return y().resolve().promise();if(this._currentVisible=!0,this._isHidingActionCanceled)delete this._isHidingActionCanceled,this._showingDeferred.reject();else{let i=()=>{this._stopAnimation(),this._toggleBodyScroll(this.option("enableBodyScroll")),this._toggleVisibility(!0),this._$content.css("visibility","hidden"),this._$content.toggleClass("dx-state-invisible",!1),this._updateZIndexStackPosition(!0),this._positionController.openingHandled(),this._renderContent();let e={cancel:!1};this._actions.onShowing(e),this._processShowingHidingCancel(e.cancel,()=>{this._$content.css("visibility",""),this._renderVisibility(!0),this._animateShowing()},()=>{this._toggleVisibility(!1),this._$content.css("visibility",""),this._$content.toggleClass("dx-state-invisible",!0),this._isShowingActionCanceled=!0,this._moveFromContainer(),this._toggleBodyScroll(!0),this.option("visible",!1),this._showingDeferred.resolve()})};this.option("templatesRenderAsynchronously")?(this._stopShowTimer(),this._asyncShowTimeout=setTimeout(i)):i()}return this._showingDeferred.promise()},_normalizeAnimation(i,e){return i&&(i=m({type:"slide",skipElementInitialStyles:!0},i),z(i[e])&&m(i[e],{position:this._positionController.position})),i},_animateHiding(){var i=this;let e=this._getAnimationConfig()??{},t=this._normalizeAnimation(e.hide,"from"),n=t?.start??E,o=t?.complete??E;this._animate(t,function(){var s;i._$content.css("pointerEvents",""),i._renderVisibility(!1);for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];o.call(i,...a),i._hideAnimationProcessing=!1,(s=i._actions)===null||s===void 0||s.onHidden(),i._hidingDeferred.resolve()},function(){i._$content.css("pointerEvents","none");for(var s=arguments.length,r=new Array(s),a=0;a<s;a++)r[a]=arguments[a];n.call(i,...r),i._hideAnimationProcessing=!0})},_hide(){if(!this._currentVisible)return y().resolve().promise();this._currentVisible=!1,this._hidingDeferred=y();let i={cancel:!1};if(this._isShowingActionCanceled)delete this._isShowingActionCanceled,this._hidingDeferred.reject();else{this._actions.onHiding(i),this._toggleSafariScrolling(),this._toggleBodyScroll(!0);let e=()=>{this._isHidingActionCanceled=!0,this._toggleBodyScroll(this.option("enableBodyScroll")),this.option("visible",!0),this._hidingDeferred.resolve()},t=()=>{this._forceFocusLost(),this._toggleShading(!1),this._toggleSubscriptions(!1),this._stopShowTimer(),this._animateHiding()};this._processShowingHidingCancel(i.cancel,t,e)}return this._hidingDeferred.promise()},_forceFocusLost(){let i=S.getActiveElement();!!this._$content.find(i).length&&uo()},_animate(i,e,t){i?(t=t||i.start||E,fe.animate(this._$content,m({},i,{start:t,complete:e}))):e()},_stopAnimation(){fe.stop(this._$content,!0)},_renderVisibility(i){i&&this._isParentHidden()||(this._currentVisible=i,this._stopAnimation(),i||FD(this._$content),i?(this._checkContainerExists(),this._moveToContainer(),this._renderGeometry(),Bl(this._$content),Li(this._$content)):(this._toggleVisibility(i),this._$content.toggleClass("dx-state-invisible",!i),this._updateZIndexStackPosition(i),this._moveFromContainer()),this._toggleShading(i),this._toggleSubscriptions(i))},_updateZIndexStackPosition(i){let e=this._overlayStack(),t=e.indexOf(this);i?(t===-1&&(this._zIndex=qp(this._zIndexInitValue()),e.push(this)),this._$wrapper.css("zIndex",this._zIndex),this._$content.css("zIndex",this._zIndex)):t!==-1&&(e.splice(t,1),Kc(this._zIndex))},_toggleShading(i){this._$wrapper.toggleClass("dx-overlay-shader",i&&this.option("shading")),this._$wrapper.css("backgroundColor",this.option("shading")?this.option("shadingColor"):""),this._toggleTabTerminator(i&&this.option("shading"))},_initTabTerminatorHandler(){var i=this;this._proxiedTabTerminatorHandler=function(){i._tabKeyHandler(...arguments)}},_toggleTabTerminator(i){let e=D("keydown",this.NAME);i?_.on(S.getDocument(),e,this._proxiedTabTerminatorHandler):_.off(S.getDocument(),e,this._proxiedTabTerminatorHandler)},_findTabbableBounds(){let i=this._$wrapper.find("*"),e=i.length-1,t={first:null,last:null};for(let n=0;n<=e&&(!t.first&&i.eq(n).is(Rc)&&(t.first=i.eq(n)),!t.last&&i.eq(e-n).is(Rc)&&(t.last=i.eq(e-n)),!(t.first&&t.last));n++);return t},_tabKeyHandler(i){if(ke(i)!=="tab"||!this._isTopOverlay())return;let e=this._findTabbableBounds(),t=e.first,n=e.last,o=!i.shiftKey&&i.target===n.get(0),s=i.shiftKey&&i.target===t.get(0),r=e.length===0,a=!bn(this._$wrapper.get(0),i.target);if(o||s||r||a){i.preventDefault();let l=i.shiftKey?n:t;_.trigger(l,"focusin"),_.trigger(l,"focus")}},_toggleSubscriptions(i){j()&&(this._toggleHideTopOverlayCallback(i),this._toggleHideOnParentsScrollSubscription(i))},_toggleHideTopOverlayCallback(i){this._hideTopOverlayHandler&&(i?iv.add(this._hideTopOverlayHandler):iv.remove(this._hideTopOverlayHandler))},_toggleHideOnParentsScrollSubscription(i){let e=D("scroll",this.NAME),{prevTargets:t,handler:n}=this._parentsScrollSubscriptionInfo??{};_.off(t,e,n);let o=this.option("hideOnParentScroll");if(i&&o){let s=this._getHideOnParentScrollTarget().parents();F.real().deviceType==="desktop"&&(s=s.add(zl)),_.on(s,e,n),this._parentsScrollSubscriptionInfo.prevTargets=s}},_hideOnParentsScrollHandler(i){let e=!1,t=this.option("hideOnParentScroll");A(t)&&(e=t(i)),!e&&!this._showAnimationProcessing&&this.hide()},_getHideOnParentScrollTarget(){let i=u(this.option("_hideOnParentScrollTarget"));return i.length?i:this._$wrapper},_render(){this.callBase(),this._appendContentToElement(),this._renderVisibilityAnimate(this.option("visible"))},_appendContentToElement(){this._$content.parent().is(this.$element())||this._$content.appendTo(this.$element())},_renderContent(){let i=!this._currentVisible&&this.option("deferRendering");if(this.option("visible")&&this._isParentHidden()){this._isHidden=!0;return}this._contentAlreadyRendered||i||(this._contentAlreadyRendered=!0,this._appendContentToElement(),this.callBase())},_isParentHidden(){if(!this.option("_checkParentVisibility"))return!1;if(this._parentHidden!==void 0)return this._parentHidden;let i=this.$element().parent();if(i.is(":visible"))return!1;let e=!1;return i.add(i.parents()).each((t,n)=>{if(u(n).css("display")==="none")return e=!0,!1}),e||!S.getBody().contains(i.get(0))},_renderContentImpl(){let i=y(),e=this.option("contentTemplate"),t=this._getTemplate(e),n=this._templateManager.anonymousTemplateName===e;return t&&t.render({container:H(this.$content()),noModel:!0,transclude:n,onRendered:()=>{i.resolve(),this.option("templatesRenderAsynchronously")&&this._dimensionChanged()}}),this._toggleWrapperScrollEventsSubscription(this.option("preventScrollEvents")),i.done(()=>{this.option("visible")&&this._moveToContainer()}),i.promise()},_getPositionControllerConfig(){let{container:i,visualContainer:e,_fixWrapperPosition:t,restorePosition:n,_skipContentPositioning:o}=this.option();return{container:i,visualContainer:e,$root:this.$element(),$content:this._$content,$wrapper:this._$wrapper,onPositioned:this._actions.onPositioned,onVisualPositionChanged:this._actions.onVisualPositionChanged,restorePosition:n,_fixWrapperPosition:t,_skipContentPositioning:o}},_initPositionController(){this._positionController=new $r(this._getPositionControllerConfig())},_toggleWrapperScrollEventsSubscription(i){let e=D(Po,this.NAME);_.off(this._$wrapper,e),i&&_.on(this._$wrapper,e,{validate:()=>!0,getDirection:()=>"both",_toggleGestureCover(t){t||this._toggleGestureCoverImpl(t)},_clearSelection:E,isNative:!0},t=>{let{originalEvent:n}=t.originalEvent,{type:o}=n||{},s=o==="wheel",r=o==="mousemove",a=s&&!ft(t);t._cancelPreventDefault=!0,n&&t.cancelable!==!1&&(!r&&!s||a)&&t.preventDefault()})},_moveFromContainer(){this._$content.appendTo(this.$element()),this._$wrapper.detach()},_checkContainerExists(){let i=this._positionController.$container;if(i===void 0)return;i.length>0||ie.log("W1021",this.NAME)},_moveToContainer(){let i=this._positionController.$container;this._$wrapper.appendTo(i),this._$content.appendTo(this._$wrapper)},_renderGeometry(i){let{visible:e}=this.option();e&&j()&&(this._stopAnimation(),this._renderGeometryImpl())},_renderGeometryImpl(){this._positionController.updatePosition(this._getOptionValue("position")),this._renderWrapper(),this._renderDimensions(),this._renderPosition()},_renderPosition(){this._positionController.positionContent()},_isAllWindowCovered(){return Ue(this._positionController.$visualContainer.get(0))&&this.option("shading")},_toggleSafariScrolling(){let i=this.option("visible"),e=u(S.getBody()),t=F.real().platform==="ios"&&we.safari,n=this._isAllWindowCovered(),o=e.hasClass("dx-prevent-safari-scrolling"),s=!o&&i&&n,r=o&&(!i||!n||this._disposed);t&&(r?(e.removeClass("dx-prevent-safari-scrolling"),zl.scrollTo(0,this._cachedBodyScrollTop),this._cachedBodyScrollTop=void 0):s&&(this._cachedBodyScrollTop=zl.pageYOffset,e.addClass("dx-prevent-safari-scrolling")))},_renderWrapper(){this._positionController.styleWrapperPosition(),this._renderWrapperDimensions(),this._positionController.positionWrapper()},_renderWrapperDimensions(){let{$visualContainer:i}=this._positionController,e=S.getDocumentElement(),t=Ue(i.get(0)),n=t?e.clientWidth:ae(i),o=t?zl.innerHeight:ee(i);this._$wrapper.css({width:n,height:o})},_renderDimensions(){let i=this._$content.get(0);this._$content.css({minWidth:this._getOptionValue("minWidth",i),maxWidth:this._getOptionValue("maxWidth",i),minHeight:this._getOptionValue("minHeight",i),maxHeight:this._getOptionValue("maxHeight",i),width:this._getOptionValue("width",i),height:this._getOptionValue("height",i)})},_focusTarget(){return this._$content},_attachKeyboardEvents(){this._keyboardListenerId=po.on(this._$content,null,i=>this._keyboardHandler(i))},_keyboardHandler(i){let e=i.originalEvent;(u(e.target).is(this._$content)||!this.option("ignoreChildEvents"))&&this.callBase(...arguments)},_isVisible(){return this.option("visible")},_visibilityChanged(i){i?this.option("visible")&&this._renderVisibilityAnimate(i):this._renderVisibilityAnimate(i)},_dimensionChanged(){this._renderGeometry()},_clean(){let i=this.option();!this._contentAlreadyRendered&&!i.isRenovated&&this.$content().empty(),this._renderVisibility(!1),this._stopShowTimer(),this._cleanFocusState()},_stopShowTimer(){this._asyncShowTimeout&&clearTimeout(this._asyncShowTimeout),this._asyncShowTimeout=null},_dispose(){fe.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")&&Kc(this._zIndex),this._$wrapper.remove(),this._$content.remove()},_toggleRTLDirection(i){this._$content.toggleClass("dx-rtl",i)},_optionChanged(i){let{value:e,name:t}=i;if(this._getActionsList().includes(t)){this._initActions();return}switch(t){case"animation":case"closeOnOutsideClick":case"hideOnOutsideClick":case"propagateOutsideClick":break;case"shading":this._toggleShading(this.option("visible")),this._toggleSafariScrolling();break;case"shadingColor":this._toggleShading(this.option("visible"));break;case"width":case"height":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(e).done(()=>{var n;return(n=this._animateDeferred)===null||n===void 0?void 0:n.resolveWith(this)}).fail(()=>{var n;return(n=this._animateDeferred)===null||n===void 0?void 0:n.reject()});break;case"container":this._positionController.updateContainer(e),this._invalidate(),this._toggleSafariScrolling();break;case"visualContainer":this._positionController.updateVisualContainer(e),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),this._toggleHideTopOverlayCallback(this.option("visible"));break;case"hideOnParentScroll":case"_hideOnParentScrollTarget":this._toggleHideOnParentsScrollSubscription(this.option("visible"));break;case"rtlEnabled":this._contentAlreadyRendered=!1,this.callBase(i);break;case"_fixWrapperPosition":this._positionController.fixWrapperPosition=e;break;case"wrapperAttr":this._renderWrapperAttributes();break;case"restorePosition":this._positionController.restorePosition=e;break;case"preventScrollEvents":this._logDeprecatedPreventScrollEventsInfo(),this._toggleWrapperScrollEventsSubscription(e);break;default:this.callBase(i)}},toggle(i){i=i===void 0?!this.option("visible"):i;let e=y();if(i===this.option("visible"))return e.resolveWith(this,[i]).promise();let t=y();return this._animateDeferred=t,this.option("visible",i),t.promise().done(()=>{delete this._animateDeferred,e.resolveWith(this,[this.option("visible")])}).fail(()=>{delete this._animateDeferred,e.reject()}),e.promise()},$content(){return this._$content},show(){return this.toggle(!0)},hide(){return this.toggle(!1)},content(){return H(this._$content)},repaint(){this._contentAlreadyRendered?(this._positionController.restorePositionOnNextRender(!0),this._renderGeometry({forceStopAnimation:!0}),Li(this._$content)):this.callBase()}});Yp.baseZIndex=i=>RT(i);K("dxOverlay",Yp);var BT=Yp;var nn=BT;var _K=pe.abstract,CK=F.real();var LT=pe.inherit(function(){let i=D("scroll","dxScrollEmitter");return{ctor:function(e){this._element=e,this._locked=!1,this._proxiedScroll=t=>{this._disposed||this._scroll(t)},_.on(this._element,i,this._proxiedScroll)},_scroll:_K,check:function(e,t){this._locked&&t()},dispose:function(){this._disposed=!0,_.off(this._element,i,this._proxiedScroll)}}}()),NT=LT.inherit({ctor:function(i,e){this.callBase(i),this._timeout=e},_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(){let i=this;this._timer=setTimeout(function(){i._clearTimer()},this._timeout)},dispose:function(){this.callBase(),this._clearTimer()}}),VT=NT.inherit({ctor:function(i){this.callBase(i,400),this._lastWheelDirection=null},check:function(i,e){this._checkDirectionChanged(i),this.callBase(i,e)},_checkDirectionChanged:function(i){if(!hi(i)){this._lastWheelDirection=null;return}let e=i.shiftKey||!1,t=this._lastWheelDirection!==null&&e!==this._lastWheelDirection;this._lastWheelDirection=e,this._locked=this._locked&&!t}}),wv=NT.inherit({ctor:function(i){this.callBase(i,400)}});(function(){let{ios:i,android:e}=CK;(i||e)&&(wv=LT.inherit({_scroll:function(){this._locked=!0;let t=this;$n(this._scrollFrame),this._scrollFrame=Pr(function(){t._locked=!1})},check:function(t,n){$n(this._scrollFrame),$n(this._checkFrame);let o=this,s=this.callBase;this._checkFrame=Pr(function(){s.call(o,t,n),o._locked=!1})},dispose:function(){this.callBase(),$n(this._scrollFrame),$n(this._checkFrame)}}))})();var xK=Vl.inherit(function(){let i=Math.round(16.666666666666668);return{ctor:function(e){this.callBase.apply(this,arguments),this.direction="both",this._pointerLocker=new wv(e),this._wheelLocker=new VT(e)},validate:function(){return!0},configure:function(e){e.scrollTarget&&(this._pointerLocker.dispose(),this._wheelLocker.dispose(),this._pointerLocker=new wv(e.scrollTarget),this._wheelLocker=new VT(e.scrollTarget)),this.callBase(e)},_init:function(e){this._wheelLocker.check(e,function(){hi(e)&&this._accept(e)}.bind(this)),this._pointerLocker.check(e,function(){let t=this.isNative&&co(e);!hi(e)&&!t&&this._accept(e)}.bind(this)),this._fireEvent("dxscrollinit",e),this._prevEventData=rt(e)},move:function(e){this.callBase.apply(this,arguments),e.isScrollingEvent=this.isNative||e.isScrollingEvent},_start:function(e){this._savedEventData=rt(e),this._fireEvent("dxscrollstart",e),this._prevEventData=rt(e)},_move:function(e){let t=rt(e);this._fireEvent("dxscroll",e,{delta:as(this._prevEventData,t)}),as(this._savedEventData,t).time>200&&(this._savedEventData=this._prevEventData),this._prevEventData=rt(e)},_end:function(e){let t=as(this._prevEventData,rt(e)),n={x:0,y:0};if(!hi(e)&&t.time<100){let o=as(this._savedEventData,this._prevEventData),s=i/o.time;n={x:o.x*s,y:o.y*s}}this._fireEvent("dxscrollend",e,{velocity:n})},_stop:function(e){this._fireEvent("dxscrollstop",e)},cancel:function(e){this.callBase.apply(this,arguments),this._fireEvent("dxscrollcancel",e)},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)}}}());ho({emitter:xK,events:["dxscrollinit","dxscrollstart","dxscroll","dxscrollend","dxscrollstop","dxscrollcancel"]});var on={init:"dxscrollinit",start:"dxscrollstart",move:"dxscroll",end:"dxscrollend",stop:"dxscrollstop",cancel:"dxscrollcancel",scroll:"scroll"};function Xp(i,e){let t={left:0,top:0},n=e;for(;(o=n)!==null&&o!==void 0&&o.offsetParent&&!n.classList.contains(i);){var o;let s=n.offsetParent,r=n.getBoundingClientRect(),a=s.getBoundingClientRect();t.left+=r.left-a.left,t.top+=r.top-a.top,n=n.offsetParent}return t}var Da="vertical",Qp="horizontal",Zp="both";var Jp="dx-scrollable-content";function HT(i,e,t,n,o){let s=I({top:0,left:0,right:0,bottom:0},o),r=e===Da,a=r?"top":"left",l=r?"bottom":"right",d=r?"height":"width",c=t[`offset${Tr(d)}`],h=t[`client${Tr(d)}`],p=t.getBoundingClientRect()[d],g=i.getBoundingClientRect()[d],C=1;Math.abs(p-c)>1&&(C=p/c);let v=Xp(Jp,i)[a]/C,b=n[a],T=b-v+s[a],M=b-v-g/C+h-s[l];return T<=0&&M>=0?b:b-(Math.abs(T)>Math.abs(M)?M:T)}var eg=function(){return[{device:()=>!lo,options:{useNative:!1}},{device:i=>!F.isSimulator()&&F.real().deviceType==="desktop"&&i.platform==="generic",options:{bounceEnabled:!1,scrollByThumb:!0,scrollByContent:ao,showScrollbar:"onHover"}}]};var Sv="dxScrollbar";var vK="dx-scrollbar-hoverable",$T="horizontal";var qs={onScroll:"onScroll",onHover:"onHover",always:"always",never:"never"},Wl=null,bK=at.inherit({_getDefaultOptions(){return m(this.callBase(),{direction:null,visible:!1,activeStateEnabled:!1,visibilityMode:qs.onScroll,containerSize:0,contentSize:0,expandable:!0,scaleRatio:1})},_init(){this.callBase(),this._isHovered=!1},_initMarkup(){this._renderThumb(),this.callBase()},_render(){this.callBase(),this._renderDirection(),this._update(),this._attachPointerDownHandler(),this.option("hoverStateEnabled",this._isHoverMode()),this.$element().toggleClass(vK,this.option("hoverStateEnabled"))},_renderThumb(){this._$thumb=u("<div>").addClass("dx-scrollable-scroll"),u("<div>").addClass("dx-scrollable-scroll-content").appendTo(this._$thumb),this.$element().addClass("dx-scrollable-scrollbar").append(this._$thumb)},isThumb(i){return!!this.$element().find(i).length},_isHoverMode(){let i=this.option("visibilityMode");return(i===qs.onHover||i===qs.always)&&this.option("expandable")},_renderDirection(){let i=this.option("direction");this.$element().addClass(`dx-scrollbar-${i}`),this._dimension=i===$T?"width":"height",this._prop=i===$T?"left":"top"},_attachPointerDownHandler(){_.on(this._$thumb,D(le.down,Sv),this.feedbackOn.bind(this))},feedbackOn(i){i?.preventDefault(),this.$element().addClass("dx-scrollable-scrollbar-active"),Wl=this},feedbackOff(){this.$element().removeClass("dx-scrollable-scrollbar-active"),Wl=null},cursorEnter(){this._isHovered=!0,this._needScrollbar()&&this.option("visible",!0)},cursorLeave(){this._isHovered=!1,this.option("visible",!1)},_renderDimensions(){this._$thumb.css({width:this.option("width"),height:this.option("height")})},_toggleVisibility(i){this.option("visibilityMode")===qs.onScroll&&this._$thumb.css("opacity"),i=this._adjustVisibility(i),this.option().visible=i,this._$thumb.toggleClass("dx-state-invisible",!i)},_adjustVisibility(i){if(this._baseContainerToContentRatio&&!this._needScrollbar())return!1;switch(this.option("visibilityMode")){case qs.onScroll:break;case qs.onHover:i=i||!!this._isHovered;break;case qs.never:i=!1;break;case qs.always:i=!0}return i},moveTo(i){if(this._isHidden())return;X(i)&&(i=i[this._prop]||0);let e={};e[this._prop]=this._calculateScrollBarPosition(i),Ve(this._$thumb,e)},_calculateScrollBarPosition(i){return-i*this._thumbRatio},_update(){let i=Math.round(this.option("containerSize")),e=Math.round(this.option("contentSize")),t=Math.round(this.option("baseContainerSize")),n=Math.round(this.option("baseContentSize"));isNaN(t)&&(t=i,n=e),this._baseContainerToContentRatio=n?t/n:t,this._realContainerToContentRatio=e?i/e:i;let o=Math.round(Math.max(Math.round(i*this._realContainerToContentRatio),15));this._thumbRatio=(i-o)/(this.option("scaleRatio")*(e-i)),this.option(this._dimension,o/this.option("scaleRatio")),this.$element().css("display",this._needScrollbar()?"":"none")},_isHidden(){return this.option("visibilityMode")===qs.never},_needScrollbar(){return!this._isHidden()&&this._baseContainerToContentRatio<1},containerToContentRatio(){return this._realContainerToContentRatio},_normalizeSize(i){return X(i)?i[this._dimension]||0:i},_clean(){this.callBase(),this===Wl&&(Wl=null),_.off(this._$thumb,`.${Sv}`)},_optionChanged(i){if(!this._isHidden())switch(i.name){case"containerSize":case"contentSize":this.option()[i.name]=this._normalizeSize(i.value),this._update();break;case"baseContentSize":case"baseContainerSize":case"scaleRatio":this._update();break;case"visibilityMode":case"direction":this._invalidate();break;default:this.callBase.apply(this,arguments)}},update:Jo(function(){this._adjustVisibility()&&this.option("visible",!0)})});ri.add(()=>{_.subscribeGlobal(S.getDocument(),D(le.up,Sv),()=>{Wl&&Wl.feedbackOff()})});var tg=bK;var zT="dxNativeScrollable";var yK="dx-scrollable-scrollbar-simulated",OK="dx-scrollable-scrollbars-hidden",Uc="vertical",ig="horizontal";var EK=pe.inherit({ctor(i){this._init(i)},_init(i){this._component=i,this._$element=i.$element(),this._$container=u(i.container()),this._$content=i.$content(),this._direction=i.option("direction"),this._useSimulatedScrollbar=i.option("useSimulatedScrollbar"),this.option=i.option.bind(i),this._createActionByOption=i._createActionByOption.bind(i),this._isLocked=i._isLocked.bind(i),this._isDirection=i._isDirection.bind(i),this._allowedDirection=i._allowedDirection.bind(i),this._getMaxOffset=i._getMaxOffset.bind(i),this._isRtlNativeStrategy=i._isRtlNativeStrategy.bind(i)},render(){let e=F.real().platform;this._$element.addClass("dx-scrollable-native").addClass(`dx-scrollable-native-${e}`).toggleClass(OK,!this._isScrollbarVisible()),this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._renderScrollbars()},updateRtlPosition(i){i&&this.option("rtlEnabled")&&this._isScrollbarVisible()&&this._useSimulatedScrollbar&&this._moveScrollbars()},_renderScrollbars(){this._scrollbars={},this._hideScrollbarTimeout=0,this._$element.addClass(yK),this._renderScrollbar(Uc),this._renderScrollbar(ig)},_renderScrollbar(i){this._isDirection(i)&&(this._scrollbars[i]=new tg(u("<div>").appendTo(this._$element),{direction:i,expandable:this._component.option("scrollByThumb")}))},handleInit:E,handleStart:E,handleMove(i){if(this._isLocked()){i.cancel=!0;return}this._allowedDirection()&&(i.originalEvent.isScrollingEvent=!0)},handleEnd:E,handleCancel:E,handleStop:E,_eachScrollbar(i){i=i.bind(this),x(this._scrollbars||{},(e,t)=>{i(t,e)})},createActions(){this._scrollAction=this._createActionByOption("onScroll"),this._updateAction=this._createActionByOption("onUpdated")},_createActionArgs(){let{left:i,top:e}=this.location();return{event:this._eventForUserAction,scrollOffset:this._getScrollOffset(),reachedLeft:this._isRtlNativeStrategy()?this._isReachedRight(-i):this._isReachedLeft(i),reachedRight:this._isRtlNativeStrategy()?this._isReachedLeft(-Math.abs(i)):this._isReachedRight(i),reachedTop:this._isDirection(Uc)?Math.round(e)>=0:void 0,reachedBottom:this._isDirection(Uc)?Math.round(Math.abs(e)-this._getMaxOffset().top)>=0:void 0}},_getScrollOffset(){let{top:i,left:e}=this.location();return{top:-i,left:this._normalizeOffsetLeft(-e)}},_normalizeOffsetLeft(i){return this._isRtlNativeStrategy()?this._getMaxOffset().left+i:i},_isReachedLeft(i){return this._isDirection(ig)?Math.round(i)>=0:void 0},_isReachedRight(i){return this._isDirection(ig)?Math.round(Math.abs(i)-this._getMaxOffset().left)>=0:void 0},_isScrollbarVisible(){let{showScrollbar:i}=this.option();return i!=="never"&&i!==!1},handleScroll(i){this._eventForUserAction=i,this._moveScrollbars(),this._scrollAction(this._createActionArgs())},_moveScrollbars(){let{top:i,left:e}=this._getScrollOffset();this._eachScrollbar(t=>{t.moveTo({top:-i,left:-e}),t.option("visible",!0)}),this._hideScrollbars()},_hideScrollbars(){clearTimeout(this._hideScrollbarTimeout),this._hideScrollbarTimeout=setTimeout(()=>{this._eachScrollbar(i=>{i.option("visible",!1)})},500)},location(){return{left:-this._$container.scrollLeft(),top:-this._$container.scrollTop()}},disabledChanged:E,update(){this._update(),this._updateAction(this._createActionArgs())},_update(){this._updateDimensions(),this._updateScrollbars()},_updateDimensions(){this._containerSize={height:Q(this._$container),width:W(this._$container)},this._componentContentSize={height:Q(this._component.$content()),width:W(this._component.$content())},this._contentSize={height:Q(this._$content),width:W(this._$content)}},_updateScrollbars(){this._eachScrollbar(function(i,e){let t=e===Uc?"height":"width";i.option({containerSize:this._containerSize[t],contentSize:this._componentContentSize[t]}),i.update()})},_allowedDirections(){return{vertical:this._isDirection(Uc)&&this._contentSize.height>this._containerSize.height,horizontal:this._isDirection(ig)&&this._contentSize.width>this._containerSize.width}},dispose(){let{className:i}=this._$element.get(0),e=new RegExp("dx-scrollable-native\\S*","g");e.test(i)&&this._$element.removeClass(i.match(e).join(" ")),_.off(this._$element,`.${zT}`),_.off(this._$container,`.${zT}`),this._removeScrollbars(),clearTimeout(this._hideScrollbarTimeout)},_removeScrollbars(){this._eachScrollbar(i=>{i.$element().remove()})},scrollBy(i){let e=this.location();this._$container.scrollTop(Math.round(-e.top-i.top)),this._$container.scrollLeft(Math.round(-e.left-i.left))},validate(i){return this.option("disabled")||hi(i)&&this._isScrolledInMaxDirection(i)?!1:!!this._allowedDirection()},_isScrolledInMaxDirection(i){let e=this._$container.get(0),t;return i.delta>0?t=i.shiftKey?!e.scrollLeft:!e.scrollTop:i.shiftKey?t=e.scrollLeft>=this._getMaxOffset().left:t=e.scrollTop>=this._getMaxOffset().top,t},getDirection(){return this._allowedDirection()}}),Gl=EK;var{abstract:wK}=pe,SK=pe.inherit({ctor(){this._finished=!0,this._stopped=!1,this._proxiedStepCore=this._stepCore.bind(this)},start(){this._stopped=!1,this._finished=!1,this._stepCore()},stop(){this._stopped=!0,$n(this._stepAnimationFrame)},_stepCore(){if(this._isStopped()){this._stop();return}if(this._isFinished()){this._finished=!0,this._complete();return}this._step(),this._stepAnimationFrame=Pr(this._proxiedStepCore)},_step:wK,_isFinished:E,_stop:E,_complete:E,_isStopped(){return this._stopped},inProgress(){return!(this._stopped||this._finished)}}),ng=SK;var WT="dxSimulatedScrollable",IK="dxScrollableStrategy",og=`${WT}Cursor`,Iv=`${WT}Keyboard`;var DK="dx-scrollable-scrollbars-alwaysvisible";var ds="vertical",sn="horizontal";var TK=Math.round(1e3/60);var AK=400/TK,MK=(1-.92**AK)/(1-.92),Ys={PAGE_UP:"pageUp",PAGE_DOWN:"pageDown",END:"end",HOME:"home",LEFT:"leftArrow",UP:"upArrow",RIGHT:"rightArrow",DOWN:"downArrow",TAB:"tab"},GT=ng.inherit({ctor(i){this.callBase(),this.scroller=i},VELOCITY_LIMIT:1,_isFinished(){return Math.abs(this.scroller._velocity)<=this.VELOCITY_LIMIT},_step(){this.scroller._scrollStep(this.scroller._velocity),this.scroller._velocity*=this._acceleration()},_acceleration(){return this.scroller._inBounds()?.92:.5},_complete(){this.scroller._scrollComplete()}}),RK=GT.inherit({VELOCITY_LIMIT:.2,_isFinished(){return this.scroller._crossBoundOnNextStep()||this.callBase()},_acceleration:()=>.92,_complete(){this.scroller._move(this.scroller._bounceLocation),this.callBase()}}),Dv=pe.inherit({ctor(i){this._initOptions(i),this._initAnimators(),this._initScrollbar()},_initOptions(i){this._location=0,this._topReached=!1,this._bottomReached=!1,this._axis=i.direction===sn?"x":"y",this._prop=i.direction===sn?"left":"top",this._dimension=i.direction===sn?"width":"height",this._scrollProp=i.direction===sn?"scrollLeft":"scrollTop",x(i,(e,t)=>{this[`_${e}`]=t})},_initAnimators(){this._inertiaAnimator=new GT(this),this._bounceAnimator=new RK(this)},_initScrollbar(){this._scrollbar=new tg(u("<div>").appendTo(this._$container),{direction:this._direction,visible:this._scrollByThumb,visibilityMode:this._visibilityModeNormalize(this._scrollbarVisible),expandable:this._scrollByThumb}),this._$scrollbar=this._scrollbar.$element()},_visibilityModeNormalize:i=>i===!0?"onScroll":i===!1?"never":i,_scrollStep(i){let e=this._location;this._location+=i,this._suppressBounce(),this._move(),!(Math.abs(e-this._location)<1)&&_.triggerHandler(this._$container,{type:"scroll"})},_suppressBounce(){this._bounceEnabled||this._inBounds(this._location)||(this._velocity=0,this._location=this._boundLocation())},_boundLocation(i){return i=i!==void 0?i:this._location,Math.max(Math.min(i,this._maxOffset),this._minOffset)},_move(i){this._location=i!==void 0?i*this._getScaleRatio():this._location,this._moveContent(),this._moveScrollbar()},_moveContent(){let i=this._location;this._$container[this._scrollProp](-i/this._getScaleRatio()),this._moveContentByTranslator(i)},_getScaleRatio(){if(j()&&!this._scaleRatio){let i=this._$element.get(0),e=this._getRealDimension(i,this._dimension),t=this._getBaseDimension(i,this._dimension);this._scaleRatio=Math.round(e/t*100)/100}return this._scaleRatio||1},_getRealDimension:(i,e)=>Math.round(Pe(i)[e]),_getBaseDimension(i,e){let t=`offset${Tr(e)}`;return i[t]},_moveContentByTranslator(i){let e,t=-this._maxScrollPropValue;if(i>0&&(e=i),i<=t&&(e=i-t),this._translateOffset===e)return;let n={};if(n[this._prop]=e,this._translateOffset=e,!e){rs(this._$content);return}Ve(this._$content,n)},_moveScrollbar(){this._scrollbar.moveTo(this._location)},_scrollComplete(){this._inBounds()&&(this._hideScrollbar(),this._completeDeferred&&this._completeDeferred.resolve()),this._scrollToBounds()},_scrollToBounds(){this._inBounds()||(this._bounceAction(),this._setupBounce(),this._bounceAnimator.start())},_setupBounce(){let e=(this._bounceLocation=this._boundLocation())-this._location;this._velocity=e/MK},_inBounds(i){return i=i!==void 0?i:this._location,this._boundLocation(i)===i},_crossBoundOnNextStep(){let i=this._location,e=i+this._velocity;return i<this._minOffset&&e>=this._minOffset||i>this._maxOffset&&e<=this._maxOffset},_initHandler(i){this._stopScrolling(),this._prepareThumbScrolling(i)},_stopScrolling:Jo(function(){this._hideScrollbar(),this._inertiaAnimator.stop(),this._bounceAnimator.stop()}),_prepareThumbScrolling(i){if(hi(i.originalEvent))return;let e=u(i.originalEvent.target),t=this._isScrollbar(e);t&&this._moveToMouseLocation(i),this._thumbScrolling=t||this._isThumb(e),this._crossThumbScrolling=!this._thumbScrolling&&this._isAnyThumbScrolling(e),this._thumbScrolling&&this._scrollbar.feedbackOn()},_isThumbScrollingHandler(i){return this._isThumb(i)},_moveToMouseLocation(i){let e=i[`page${this._axis.toUpperCase()}`]-this._$element.offset()[this._prop],t=this._location+e/this._containerToContentRatio()-Q(this._$container)/2;this._scrollStep(-Math.round(t))},_startHandler(){this._showScrollbar()},_moveHandler(i){this._crossThumbScrolling||(this._thumbScrolling&&(i[this._axis]=-Math.round(i[this._axis]/this._containerToContentRatio())),this._scrollBy(i))},_scrollBy(i){i=i[this._axis],this._inBounds()||(i*=.5),this._scrollStep(i)},_scrollByHandler(i){!i.x&&!i.y||(this._scrollBy(i),this._scrollComplete())},_containerToContentRatio(){return this._scrollbar.containerToContentRatio()},_endHandler(i){return this._completeDeferred=y(),this._velocity=i[this._axis],this._inertiaHandler(),this._resetThumbScrolling(),this._completeDeferred.promise()},_inertiaHandler(){this._suppressInertia(),this._inertiaAnimator.start()},_suppressInertia(){(!this._inertiaEnabled||this._thumbScrolling)&&(this._velocity=0)},_resetThumbScrolling(){this._thumbScrolling=!1,this._crossThumbScrolling=!1},_stopHandler(){this._thumbScrolling&&this._scrollComplete(),this._resetThumbScrolling(),this._scrollToBounds()},_disposeHandler(){this._stopScrolling(),this._$scrollbar.remove()},_updateHandler(){this._update(),this._moveToBounds()},_update(){return this._stopScrolling(),Ci(()=>{this._resetScaleRatio(),this._updateLocation(),this._updateBounds(),this._updateScrollbar(),pt(()=>{this._moveScrollbar(),this._scrollbar.update()})})},_resetScaleRatio(){this._scaleRatio=null},_updateLocation(){this._location=(Ti(this._$content)[this._prop]-this._$container[this._scrollProp]())*this._getScaleRatio()},_updateBounds(){this._maxOffset=this._getMaxOffset(),this._minOffset=this._getMinOffset()},_getMaxOffset:()=>0,_getMinOffset(){return this._maxScrollPropValue=Math.max(this._contentSize()-this._containerSize(),0),-this._maxScrollPropValue},_updateScrollbar:__(function(){let i=this._containerSize(),e=this._contentSize(),t=this._getBaseDimension(this._$container.get(0),this._dimension),n=this._getBaseDimension(this._$content.get(0),this._dimension);pt(()=>{this._scrollbar.option({containerSize:i,contentSize:e,baseContainerSize:t,baseContentSize:n,scaleRatio:this._getScaleRatio()})})}),_moveToBounds:Jo(__(Jo(function(){let i=this._boundLocation(),e=i!==this._location;this._location=i,this._move(),e&&this._scrollAction()}))),_createActionsHandler(i){this._scrollAction=i.scroll,this._bounceAction=i.bounce},_showScrollbar(){this._scrollbar.option("visible",!0)},_hideScrollbar(){this._scrollbar.option("visible",!1)},_containerSize(){return this._getRealDimension(this._$container.get(0),this._dimension)},_contentSize(){let i=this._$content.css(`overflow${this._axis.toUpperCase()}`)==="hidden",e=this._getRealDimension(this._$content.get(0),this._dimension);if(!i){let t=this._$content[0][`scroll${Tr(this._dimension)}`]*this._getScaleRatio();e=Math.max(t,e)}return e},_validateEvent(i){let e=u(i.originalEvent.target);return this._isThumb(e)||this._isScrollbar(e)},_isThumb(i){return this._scrollByThumb&&this._scrollbar.isThumb(i)},_isScrollbar(i){return this._scrollByThumb&&i&&i.is(this._$scrollbar)},_reachedMin(){return Math.round(this._location-this._minOffset)<=0},_reachedMax(){return Math.round(this._location-this._maxOffset)>=0},_cursorEnterHandler(){this._resetScaleRatio(),this._updateScrollbar(),this._scrollbar.cursorEnter()},_cursorLeaveHandler(){this._scrollbar.cursorLeave()},dispose:E}),Lo,jl,sg=pe.inherit({ctor(i){this._init(i)},_init(i){this._component=i,this._$element=i.$element(),this._$container=u(i.container()),this._$wrapper=i._$wrapper,this._$content=i.$content(),this.option=i.option.bind(i),this._createActionByOption=i._createActionByOption.bind(i),this._isLocked=i._isLocked.bind(i),this._isDirection=i._isDirection.bind(i),this._allowedDirection=i._allowedDirection.bind(i),this._getMaxOffset=i._getMaxOffset.bind(i)},render(){this._$element.addClass("dx-scrollable-simulated"),this._createScrollers(),this.option("useKeyboard")&&this._$container.prop("tabIndex",0),this._attachKeyboardHandler(),this._attachCursorHandlers()},_createScrollers(){this._scrollers={},this._isDirection(sn)&&this._createScroller(sn),this._isDirection(ds)&&this._createScroller(ds),this._$element.toggleClass(DK,this.option("showScrollbar")==="always")},_createScroller(i){this._scrollers[i]=new Dv(this._scrollerOptions(i))},_scrollerOptions(i){return{direction:i,$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(i){for(let e in this._scrollers){let t=this._getPropByDirection(e);if(f(i[t])){let n=this._scrollers[e];i[t]*=n._getScaleRatio()}}return i},_isAnyThumbScrolling(i){let e=!1;return this._eventHandler("isThumbScrolling",i).done((t,n)=>{e=t||n}),e},handleInit(i){this._suppressDirections(i),this._eventForUserAction=i,this._eventHandler("init",i)},_suppressDirections(i){if(hi(i.originalEvent)){this._prepareDirections(!0);return}this._prepareDirections(),this._eachScroller(function(e,t){let n=u(i.originalEvent.target),o=e._validateEvent(i)||this.option("scrollByContent")&&this._isContent(n);this._validDirections[t]=o})},_isContent(i){return!!i.closest(this._$element).length},_prepareDirections(i){i=i||!1,this._validDirections={},this._validDirections[sn]=i,this._validDirections[ds]=i},_eachScroller(i){i=i.bind(this),x(this._scrollers,(e,t)=>{i(t,e)})},handleStart(i){this._eventForUserAction=i,this._eventHandler("start").done(this._startAction)},_saveActive(){jl=this},_resetActive(){jl===this&&(jl=null)},handleMove(i){if(this._isLocked()){i.cancel=!0,this._resetActive();return}this._saveActive(),i.preventDefault&&i.preventDefault(),this._adjustDistance(i,i.delta),this._eventForUserAction=i,this._eventHandler("move",i.delta)},_adjustDistance(i,e){e.x*=this._validDirections[sn],e.y*=this._validDirections[ds];let t=this._tryGetDevicePixelRatio();t&&hi(i.originalEvent)&&(e.x=Math.round(e.x/t*100)/100,e.y=Math.round(e.y/t*100)/100)},_tryGetDevicePixelRatio(){if(j())return q().devicePixelRatio},handleEnd(i){return this._resetActive(),this._refreshCursorState(i.originalEvent&&i.originalEvent.target),this._adjustDistance(i,i.velocity),this._eventForUserAction=i,this._eventHandler("end",i.velocity).done(this._endAction)},handleCancel(i){return this._resetActive(),this._eventForUserAction=i,this._eventHandler("end",{x:0,y:0})},handleStop(){this._resetActive(),this._eventHandler("stop")},handleScroll(){this._updateRtlConfig(),this._scrollAction()},_attachKeyboardHandler(){_.off(this._$element,`.${Iv}`),!this.option("disabled")&&this.option("useKeyboard")&&_.on(this._$element,D("keydown",Iv),this._keyDownHandler.bind(this))},_keyDownHandler(i){if(clearTimeout(this._updateHandlerTimeout),this._updateHandlerTimeout=setTimeout(()=>{ke(i)===Ys.TAB&&this._eachScroller(t=>{t._updateHandler()})}),!this._$container.is(S.getActiveElement(this._$container.get(0))))return;let e=!0;switch(ke(i)){case Ys.DOWN:this._scrollByLine({y:1});break;case Ys.UP:this._scrollByLine({y:-1});break;case Ys.RIGHT:this._scrollByLine({x:1});break;case Ys.LEFT:this._scrollByLine({x:-1});break;case Ys.PAGE_DOWN:this._scrollByPage(1);break;case Ys.PAGE_UP:this._scrollByPage(-1);break;case Ys.HOME:this._scrollToHome();break;case Ys.END:this._scrollToEnd();break;default:e=!1}e&&(i.stopPropagation(),i.preventDefault())},_scrollByLine(i){let e=this._tryGetDevicePixelRatio(),t=40;e&&(t=Math.abs(t/e*100)/100),this.scrollBy({top:(i.y||0)*-t,left:(i.x||0)*-t})},_scrollByPage(i){let e=this._wheelProp(),t=this._dimensionByProp(e),n={},o=t==="width"?W:Q;n[e]=i*-o(this._$container),this.scrollBy(n)},_dimensionByProp:i=>i==="left"?"width":"height",_getPropByDirection:i=>i===sn?"left":"top",_scrollToHome(){let i=this._wheelProp(),e={};e[i]=0,this._component.scrollTo(e)},_scrollToEnd(){let i=this._wheelProp(),e=this._dimensionByProp(i),t={},n=e==="width"?W:Q;t[i]=n(this._$content)-n(this._$container),this._component.scrollTo(t)},createActions(){this._startAction=this._createActionHandler("onStart"),this._endAction=this._createActionHandler("onEnd"),this._updateAction=this._createActionHandler("onUpdated"),this._createScrollerActions()},_createScrollerActions(){this._scrollAction=this._createActionHandler("onScroll"),this._bounceAction=this._createActionHandler("onBounce"),this._eventHandler("createActions",{scroll:this._scrollAction,bounce:this._bounceAction})},_createActionHandler(i){let e=this._createActionByOption(i);return()=>{e(m(this._createActionArgs(),arguments))}},_createActionArgs(){let{horizontal:i,vertical:e}=this._scrollers,t=this._getScrollOffset();return this._scrollOffset={top:e&&t.top,left:i&&t.left},{event:this._eventForUserAction,scrollOffset:this._scrollOffset,reachedLeft:i&&i._reachedMax(),reachedRight:i&&i._reachedMin(),reachedTop:e&&e._reachedMax(),reachedBottom:e&&e._reachedMin()}},_getScrollOffset(){return{top:-this.location().top,left:-this.location().left}},_eventHandler(i){let e=[].slice.call(arguments).slice(1),t=qe(this._scrollers,n=>n[`_${i}Handler`].apply(n,e));return P.apply(u,t).promise()},location(){let i=Ti(this._$content);return i.top-=this._$container.scrollTop(),i.left-=this._$container.scrollLeft(),i},disabledChanged(){this._attachCursorHandlers()},_attachCursorHandlers(){_.off(this._$element,`.${og}`),!this.option("disabled")&&this._isHoverMode()&&(_.on(this._$element,D("mouseenter",og),this._cursorEnterHandler.bind(this)),_.on(this._$element,D("mouseleave",og),this._cursorLeaveHandler.bind(this)))},_isHoverMode(){return this.option("showScrollbar")==="onHover"},_cursorEnterHandler(i){i=i||{},i.originalEvent=i.originalEvent||{},!(jl||i.originalEvent._hoverHandled)&&(Lo&&Lo._cursorLeaveHandler(),Lo=this,this._eventHandler("cursorEnter"),i.originalEvent._hoverHandled=!0)},_cursorLeaveHandler(i){Lo!==this||jl===Lo||(this._eventHandler("cursorLeave"),Lo=null,this._refreshCursorState(i&&i.relatedTarget))},_refreshCursorState(i){if(!this._isHoverMode()&&(!i||jl))return;let t=u(i).closest(".dx-scrollable-simulated:not(.dx-state-disabled)"),n=t.length&&t.data(IK);Lo&&Lo!==n&&Lo._cursorLeaveHandler(),n&&n._cursorEnterHandler()},update(){let i=this._eventHandler("update").done(this._updateAction);return P(i,Ci(()=>{let e=this._allowedDirections();return pt(()=>{let t=e.vertical?"pan-x":"";t=e.horizontal?"pan-y":t,t=e.vertical&&e.horizontal?"none":t,this._$container.css("touchAction",t)}),P().promise()}))},_allowedDirections(){let i=this.option("bounceEnabled"),e=this._scrollers[ds],t=this._scrollers[sn];return{vertical:e&&(e._minOffset<0||i),horizontal:t&&(t._minOffset<0||i)}},_updateBounds(){this._scrollers[sn]&&this._scrollers[sn]._updateBounds()},_isHorizontalAndRtlEnabled(){return this.option("rtlEnabled")&&this.option("direction")!==ds},updateRtlPosition(i){if(i&&(this._rtlConfig={scrollRight:0,clientWidth:this._$container.get(0).clientWidth,windowPixelRatio:this._getWindowDevicePixelRatio()}),this._updateBounds(),this._isHorizontalAndRtlEnabled()){let e=this._getMaxOffset().left-this._rtlConfig.scrollRight;e<=0&&(e=0,this._rtlConfig.scrollRight=this._getMaxOffset().left),this._getScrollOffset().left!==e&&(this._rtlConfig.skipUpdating=!0,this._component.scrollTo({left:e}),this._rtlConfig.skipUpdating=!1)}},_updateRtlConfig(){if(this._isHorizontalAndRtlEnabled()&&!this._rtlConfig.skipUpdating){let{clientWidth:i,scrollLeft:e}=this._$container.get(0),t=this._getWindowDevicePixelRatio();this._rtlConfig.windowPixelRatio===t&&this._rtlConfig.clientWidth===i&&(this._rtlConfig.scrollRight=this._getMaxOffset().left-e),this._rtlConfig.clientWidth=i,this._rtlConfig.windowPixelRatio=t}},_getWindowDevicePixelRatio:()=>j()?q().devicePixelRatio:1,scrollBy(i){let e=this._scrollers[ds],t=this._scrollers[sn];e&&(i.top=e._boundLocation(i.top+e._location)-e._location),t&&(i.left=t._boundLocation(i.left+t._location)-t._location),this._prepareDirections(!0),this._startAction(),this._eventHandler("scrollBy",{x:i.left,y:i.top}),this._endAction(),this._updateRtlConfig()},validate(i){return hi(i)&&ft(i)||this.option("disabled")?!1:this.option("bounceEnabled")?!0:hi(i)?this._validateWheel(i):this._validateMove(i)},_validateWheel(i){let e=this._scrollers[this._wheelDirection(i)],t=e._reachedMin(),n=e._reachedMax(),o=!t||!n,s=!t&&!n,r=t&&i.delta>0,a=n&&i.delta<0,l=o&&(s||r||a);return l=l||this._validateWheelTimer!==void 0,l&&(clearTimeout(this._validateWheelTimer),this._validateWheelTimer=setTimeout(()=>{this._validateWheelTimer=void 0},500)),l},_validateMove(i){return!this.option("scrollByContent")&&!u(i.target).closest(".dx-scrollable-scrollbar").length?!1:this._allowedDirection()},getDirection(i){return hi(i)?this._wheelDirection(i):this._allowedDirection()},_wheelProp(){return this._wheelDirection()===sn?"left":"top"},_wheelDirection(i){switch(this.option("direction")){case sn:return sn;case ds:return ds;default:return i&&i.shiftKey?sn:ds}},dispose(){this._resetActive(),Lo===this&&(Lo=null),this._eventHandler("dispose"),this._detachEventHandlers(),this._$element.removeClass("dx-scrollable-simulated"),this._eventForUserAction=null,clearTimeout(this._validateWheelTimer),clearTimeout(this._updateHandlerTimeout)},_detachEventHandlers(){_.off(this._$element,`.${og}`),_.off(this._$container,`.${Iv}`)}});var us="dxScrollable",FK="dxScrollableStrategy";var cs="vertical",Xs="horizontal",Tv="both",Av=pn.inherit({_getDefaultOptions(){return m(this.callBase(),{disabled:!1,onScroll:null,direction:cs,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,_onVisibilityChanged:E})},_defaultOptionsRules(){return this.callBase().concat(eg(),[{device:()=>lo&&F.real().platform==="android"&&!we.mozilla,options:{useSimulatedScrollbar:!0}}])},_initOptions(i){this.callBase(i),"useSimulatedScrollbar"in i||this._setUseSimulatedScrollbar()},_setUseSimulatedScrollbar(){this.initialOption("useSimulatedScrollbar")||this.option("useSimulatedScrollbar",!this.option("useNative"))},_init(){this.callBase(),this._initScrollableMarkup(),this._locked=!1},_visibilityChanged(i){i?(this.update(),this._updateRtlPosition(),this._savedScrollOffset&&this.scrollTo(this._savedScrollOffset),delete this._savedScrollOffset,this.option("_onVisibilityChanged")(this)):this._savedScrollOffset=this.scrollOffset()},_initScrollableMarkup(){let i=this.$element().addClass("dx-scrollable"),e=this._$container=u("<div>").addClass("dx-scrollable-container"),t=this._$wrapper=u("<div>").addClass("dx-scrollable-wrapper");(this._$content=u("<div>").addClass("dx-scrollable-content")).append(i.contents()).appendTo(e),e.appendTo(t),t.appendTo(i)},_dimensionChanged(){this.update(),this._updateRtlPosition()},_initMarkup(){this.callBase(),this._renderDirection()},_render(){this._renderStrategy(),this._attachEventHandlers(),this._renderDisabledState(),this._createActions(),this.update(),this.callBase(),this._updateRtlPosition(!0)},_updateRtlPosition(i){this._strategy.updateRtlPosition(i)},_getMaxOffset(){let{scrollWidth:i,clientWidth:e,scrollHeight:t,clientHeight:n}=u(this.container()).get(0);return{left:i-e,top:t-n}},_attachEventHandlers(){let i=this._strategy,e={getDirection:i.getDirection.bind(i),validate:this._validate.bind(this),isNative:this.option("useNative"),scrollTarget:this._$container};_.off(this._$wrapper,`.${us}`),_.on(this._$wrapper,D(on.init,us),e,this._initHandler.bind(this)),_.on(this._$wrapper,D(on.start,us),i.handleStart.bind(i)),_.on(this._$wrapper,D(on.move,us),i.handleMove.bind(i)),_.on(this._$wrapper,D(on.end,us),i.handleEnd.bind(i)),_.on(this._$wrapper,D(on.cancel,us),i.handleCancel.bind(i)),_.on(this._$wrapper,D(on.stop,us),i.handleStop.bind(i)),_.off(this._$container,`.${us}`),_.on(this._$container,D("scroll",us),i.handleScroll.bind(i))},_validate(i){return this._isLocked()?!1:(this._updateIfNeed(),this._moveIsAllowed(i))},_moveIsAllowed(i){return this._strategy.validate(i)},handleMove(i){this._strategy.handleMove(i)},_prepareDirections(i){this._strategy._prepareDirections(i)},_initHandler(){let i=this._strategy;i.handleInit.apply(i,arguments)},_renderDisabledState(){this.$element().toggleClass("dx-scrollable-disabled",this.option("disabled")),this.option("disabled")?this._lock():this._unlock()},_renderDirection(){this.$element().removeClass(`dx-scrollable-${Xs}`).removeClass(`dx-scrollable-${cs}`).removeClass(`dx-scrollable-${Tv}`).addClass(`dx-scrollable-${this.option("direction")}`)},_renderStrategy(){this._createStrategy(),this._strategy.render(),this.$element().data(FK,this._strategy)},_createStrategy(){this._strategy=this.option("useNative")?new Gl(this):new sg(this)},_createActions(){this._strategy&&this._strategy.createActions()},_clean(){this._strategy&&this._strategy.dispose()},_optionChanged(i){switch(i.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":case"_onVisibilityChanged":break;case"width":this.callBase(i),this._updateRtlPosition();break;default:this.callBase(i)}},_resetInactiveDirection(){let i=this._getInactiveProp();if(!i||!j())return;let e=this.scrollOffset();e[i]=0,this.scrollTo(e)},_getInactiveProp(){let i=this.option("direction");if(i===cs)return"left";if(i===Xs)return"top"},_location(){return this._strategy.location()},_normalizeLocation(i){if(X(i)){let t=Be(i.left,i.x),n=Be(i.top,i.y);return{left:f(t)?-t:void 0,top:f(n)?-n:void 0}}let e=this.option("direction");return{left:e!==cs?-i:void 0,top:e!==Xs?-i:void 0}},_isLocked(){return this._locked},_lock(){this._locked=!0},_unlock(){this.option("disabled")||(this._locked=!1)},_isDirection(i){let e=this.option("direction");return i===cs?e!==Xs:i===Xs?e!==cs:e===i},_updateAllowedDirection(){let i=this._strategy._allowedDirections();this._isDirection(Tv)&&i.vertical&&i.horizontal?this._allowedDirectionValue=Tv:this._isDirection(Xs)&&i.horizontal?this._allowedDirectionValue=Xs:this._isDirection(cs)&&i.vertical?this._allowedDirectionValue=cs:this._allowedDirectionValue=null},_allowedDirection(){return this._allowedDirectionValue},$content(){return this._$content},content(){return H(this._$content)},container(){return H(this._$container)},scrollOffset(){return this._strategy._getScrollOffset()},_isRtlNativeStrategy(){let{useNative:i,rtlEnabled:e}=this.option();return i&&e},scrollTop(){return this.scrollOffset().top},scrollLeft(){return this.scrollOffset().left},clientHeight(){return Q(this._$container)},scrollHeight(){return ee(this.$content())},clientWidth(){return W(this._$container)},scrollWidth(){return ae(this.$content())},update(){if(this._strategy)return P(this._strategy.update()).done(()=>{this._updateAllowedDirection()})},scrollBy(i){i=this._normalizeLocation(i),!(!i.top&&!i.left)&&(this._updateIfNeed(),this._strategy.scrollBy(i))},scrollTo(i){i=this._normalizeLocation(i),this._updateIfNeed();let e=this._location();this.option("useNative")||(i=this._strategy._applyScaleRatio(i),e=this._strategy._applyScaleRatio(e)),this._isRtlNativeStrategy()&&(e.left-=this._getMaxOffset().left);let t=this._normalizeLocation({left:e.left-Be(i.left,e.left),top:e.top-Be(i.top,e.top)});!t.top&&!t.left||this._strategy.scrollBy(t)},scrollToElement(i,e){let t=u(i),n=this.$content().find(i).length,o=t.parents(".dx-scrollable").length-t.parents(".dx-scrollable-content").length===0;if(!n||!o)return;let s={top:0,left:0},r=this.option("direction");r!==cs&&(s.left=this.getScrollElementPosition(t,Xs,e)),r!==Xs&&(s.top=this.getScrollElementPosition(t,cs,e)),this.scrollTo(s)},getScrollElementPosition(i,e,t){let n=this.scrollOffset();return HT(i.get(0),e,u(this.container()).get(0),n,t)},_updateIfNeed(){this.option("updateManually")||this.update()},_useTemplates:()=>!1,isRenovated:()=>!!Av.IS_RENOVATED_WIDGET});K(us,Av);var Kl=Av;var Xi=Kl;var Ta=ge();var XT=q(),PK=ri.add,kK=zn,BK=ya,qc=new y,QT="link[rel=dx-theme]",VK="data-theme",LK="data-active",jT="dx-hairlines",ZT="any",Qs,Rv,Zs,Gn,Wr,KT=15e3,Mv="dx.";function Fv(){if(!j())return null;let i=u("<div>",Qs).addClass("dx-theme-marker").appendTo(Qs.documentElement),e;try{return e=XT.getComputedStyle(i.get(0)).fontFamily,!e||(e=e.replace(/["']/g,""),e.substr(0,Mv.length)!==Mv)?null:e.substr(Mv.length)}finally{i.remove()}}function UT(i){let e,t,n=!0;Wr=i;function o(){Wr=null,clearInterval(t),n=!0,Ta.fire(),Ta.empty(),qc.resolve()}if(qT()||!KT)o();else{if(!n){Wr&&(Wr=i);return}e=Date.now(),n=!1,t=setInterval(function(){let s=qT(),r=!s&&Date.now()-e>KT;r&&ie.log("W0004",Wr),(s||r)&&o()},10)}}function qT(){if(!Wr)return!0;let i=Wr===ZT;if(qc.state()==="resolved"&&i)return!0;let e=Fv();return e&&i?!0:e===Wr}function NK(){let i=u(QT,Qs);i.length&&(Zs={},Rv=u(mc("<link rel=stylesheet>"),Qs),i.each(function(){let e=u(this,Qs),t=e.attr(VK),n=e.attr("href"),o=e.attr(LK)==="true";Zs[t]={url:n,isActive:o}}),i.last().after(Rv),i.remove())}function HK(i){let e=i?i.split("."):[],t=null;if(Zs){if(i in Zs)return i;x(Zs,function(n,o){let s=n.split(".");if(!(e[0]&&s[0]!==e[0])&&!(e[1]&&e[1]!==s[1])&&!(e[2]&&e[2]!==s[2])&&((!t||o.isActive)&&(t=n),o.isActive))return!1})}return t}function $K(i){try{i!==Qs&&(Zs=null)}catch{Zs=null}Qs=i}function JT(i){i=i||{},$K(i.context||S.getDocument()),Qs&&(NK(),Gn=void 0,yt(i))}function yt(i){if(!arguments.length)return Gn=Gn||Fv(),Gn;tA(kK()),i=i||{},typeof i=="string"&&(i={theme:i});let e=i._autoInit,t=i.loadCallback,n;if(Gn=HK(i.theme||Gn),Gn&&(n=Zs[Gn]),t&&Ta.add(t),n)Rv.attr("href",Zs[Gn].url),(Ta.has()||qc.state()!=="resolved"||i._forceTimeout)&&UT(Gn);else if(e)j()&&UT(ZT),Ta.fire(),Ta.empty();else throw ie.Error("E0021",Gn);qc.done(()=>eA(Cp(),Gn))}function zK(i){i=i||yt();let e=[],t=i&&i.split(".");return t&&(e.push("dx-theme-"+t[0],"dx-theme-"+t[0]+"-typography"),t.length>1&&e.push("dx-color-scheme-"+t[1]+(wt(i)?"-"+t[2]:""))),e}var rg;function eA(i,e){rg=zK(e).join(" "),u(i).addClass(rg),function(){let t=j()&&XT.devicePixelRatio;if(!t||t<2)return;let n=u("<div>");n.css("border",".5px solid transparent"),u("body").append(n),ee(n)===1&&(u(i).addClass(jT),rg+=" "+jT),n.remove()}()}function tA(i){u(i).removeClass(rg)}function Pv(i,e){return e||(e=Gn||Fv()),new RegExp(i).test(e)}function wt(i){return ht(i)||Ot(i)}function ht(i){return Pv("material",i)}function Ot(i){return Pv("fluent",i)}function ag(i){return Pv("generic",i)}function WK(i,e){let t=S.getDocument(),n=t.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=e,n.innerHTML=i,t.body.appendChild(n);let o=n.offsetWidth;n.style.fontFamily="Roboto, RobotoFallback, Arial";let s=n.offsetWidth;return n.parentNode.removeChild(n),o!==s}function iA(i,e){return new Promise(t=>{let n=()=>{clearInterval(o),clearTimeout(s),t()},o=setInterval(()=>{WK(i,e)&&n()},15),s=setTimeout(n,2e3)})}function YT(){if(JT({_autoInit:!0,_forceTimeout:!0}),u(QT,Qs).length)throw ie.Error("E0022")}j()?YT():PK(YT);BK.add(function(i,e){qc.done(function(){tA(e),eA(i)})});F.changed.add(function(){JT({_autoInit:!0})});var nA="dx-inkripple-showing",oA="dx-inkripple-hiding";var kv=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{useHoldAnimation:e,waveSizeCoefficient:t,isCentered:n,wavesNumber:o}=i;return{waveSizeCoefficient:t||2,isCentered:n||!1,wavesNumber:o||1,durations:UK(e??!0)}},Ul=function(i){let e=kv(i);return{showWave:Bv.bind(this,e),hideWave:Vv.bind(this,e)}},GK=function(i){let e=i.children(".dx-inkripple");return e.length===0&&(e=u("<div>").addClass("dx-inkripple").appendTo(i)),e},sA=function(i,e){let t=GK(u(i)),n=t.children(".dx-inkripple-wave").toArray();for(let o=n.length;o<e;o++){let s=u("<div>").appendTo(t).addClass("dx-inkripple-wave");n.push(s[0])}return u(n)},jK=function(i,e){let t=u(e.element),n=ae(t),o=ee(t),s=parseInt(Math.sqrt(n*n+o*o)),r=Math.min(4e3,parseInt(s*i.waveSizeCoefficient)),a,l;if(i.isCentered)a=(n-r)/2,l=(o-r)/2;else{let d=e.event,c=t.offset(),h=d.pageX-c.left,p=d.pageY-c.top;a=h-r/2,l=p-r/2}return{left:a,top:l,height:r,width:r}};function Bv(i,e){let t=sA(e.element,i.wavesNumber).eq(e.wave||0);i.hidingTimeout&&clearTimeout(i.hidingTimeout),rA(t),t.css(jK(i,e)),i.showingTimeout=setTimeout(KK.bind(this,i,t),0)}function KK(i,e){let t=i.durations.showingScale+"ms";e.addClass(nA).css("transitionDuration",t)}function UK(i){return{showingScale:i?1e3:300,hidingScale:300,hidingOpacity:300}}function rA(i){i.removeClass(oA).css("transitionDuration","")}function Vv(i,e){i.showingTimeout&&clearTimeout(i.showingTimeout);let t=sA(e.element,e.wavesNumber).eq(e.wave||0),n=i.durations,o=n.hidingScale+"ms, "+n.hidingOpacity+"ms";t.addClass(oA).removeClass(nA).css("transitionDuration",o);let s=Math.max(n.hidingScale,n.hidingOpacity);i.hidingTimeout=setTimeout(rA.bind(this,t),s)}var qK=function(i,e,t,n,o){let s,r=((a,l,d)=>l(()=>a,d))(i,e,function(a){if(s&&s(),Or(a)){o(a);return}s=function(l,d,c,h,p){let g={},C=c.slice(),v=c.map(function(b){let T=h[b];return d(T?()=>T(l):()=>l[b],function(M){if(g[b]=M,C.length){let G=C.indexOf(b);G>=0&&C.splice(G,1)}C.length||p(g)})});return function(){v.forEach(b=>b())}}(a,e,t,n,o)});return function(){s&&s(),r&&r()}},Ai=class extends On{constructor(e,t,n,o){super(),this._render=e,this._fields=t,this._fieldsMap=o||{},this._watchMethod=n}_renderCore(e){let t=u(e.container),n=qK(e.model,this._watchMethod,this._fields,this._fieldsMap,o=>{t.empty(),this._render(t,o,e.model)});return _.on(t,ai,n),t.contents()}};var Js=i=>!i||typeof i!="string"?!1:/^\s*<svg[^>]*>(.|\r?\n)*?<\/svg>\s*$/i.test(i)?"svg":/data:.*base64|\.|[^<\s]\/{1,1}/.test(i)?"image":/^[\w-_]+$/.test(i)?"dxIcon":/^\s?([\w-_:]\s?)+$/.test(i)?"fontIcon":!1,Mi=i=>{switch(Js(i)){case"image":return u("<img>").attr("src",i).addClass("dx-icon");case"fontIcon":return u("<i>").addClass(`dx-icon ${i}`);case"dxIcon":return u("<i>").addClass(`dx-icon dx-icon-${i}`);case"svg":return u("<i>").addClass("dx-icon dx-svg-icon").append(i);default:return null}};function Lv(i){let e=[],t=!1;function n(){for(;e.length;){t=!0;let s=e.shift()();if(s!==void 0){if(s.then){P(s).always(n);return}throw me.Error("E0015")}}t=!1}return{add:function(o,s){i?(e[0]&&s&&s(e[0]),e=[o]):e.push(o),t||n()},busy:function(){return t}}}var yCe=Lv().add;var aA={};var lA=function(i,e,t){t=t||[],e=e||{};let n=function(r,a){return{name:r,args:a}},o=function(r){let a=new y,l,d,c,h,p,g=function(v){let b=e.errorHandler;b&&b(v),bl(v),a.reject(v)};function C(v){switch(v.name){case"sortBy":return p=[v.args],!0;case"thenBy":if(!p)throw mt.Error("E4004");return p.push(v.args),!0}return!1}try{l=e.adapter,A(l)||(l=aA[l]),d=l(e),c=[].concat(t).concat(r);let v=d.optimize;for(v&&v(c);c.length;){if(h=c[0],!C(h)){if(p){c.unshift(n("multiSort",[p])),p=null;continue}if(String(h.name)!=="enumerate"&&(!d[h.name]||d[h.name].apply(d,h.args)===!1))break}c.shift()}(function(){let b=c[0],T=[];b&&b.name==="multiSort"&&(c.shift(),x(b.args[0],function(){T.push(n(T.length?"thenBy":"sortBy",this))})),c=T.concat(c)})(),d.exec(i).done(function(b,T){if(!c.length)a.resolve(b,T);else{let M=Rr(b,{errorHandler:e.errorHandler});x(c,function(){M=M[this.name].apply(M,this.args)}),M.done(a.resolve).fail(a.reject)}}).fail(g)}catch(v){g(v)}return a.promise()},s={};return x(["sortBy","thenBy","filter","slice","select","groupBy"],function(){let r=String(this);s[r]=function(){return lA(i,e,t.concat(n(r,arguments)))}}),x(["count","min","max","sum","avg","aggregate","enumerate"],function(){let r=String(this);s[r]=function(){return o.call(this,n(r,arguments))}}),s},dA=lA;var cA={array:Rr,remote:dA};var XK=function(){let i=Array.isArray(arguments[0])?"array":"remote";return cA[i].apply(this,arguments)},Mt=XK;var QK=Hs.inherit({ctor:function(i){Array.isArray(i)?i={data:i}:i=i||{},this.callBase(i);let e=i.data;if(e&&!Array.isArray(e))throw mt.Error("E4006");this._array=e||[]},createQuery:function(){return Mt(this._array,{errorHandler:this._errorHandler})},_byKeyImpl:function(i){let e=Ns(this,this._array,i);return e===-1?Xh(mt.Error("E4009")):Mr(this._array[e])},_insertImpl:function(i){return xc(this,this._array,i)},_pushImpl:function(i){no({keyInfo:this,data:this._array,changes:i})},_updateImpl:function(i,e){return Cc(this,this._array,i,e)},_removeImpl:function(i){return Y_(this,this._array,i)},clear:function(){this._eventsStrategy.fireEvent("modifying"),this._array=[],this._eventsStrategy.fireEvent("modified")}},"array"),hs=QK;var ZK=["items"],lg="canceled",Nv=i=>i.state()==="pending",Hv=i=>{switch(i.length){case 0:return;case 1:return i[0]}return[].slice.call(i)},JK=(i,e,t)=>qe(i,n=>{let o=_e(n,ZK);return I({},o,{items:uA(n.items,e-1,t)})}),uA=(i,e,t)=>Array.isArray(i)?e?JK(i,e,t):qe(i,t):i,hA=(i,e,t)=>{let n=t?vn(t).length:0;return uA(i,n,e)},dg=(i,e)=>{var t;return(t=i)!==null&&t!==void 0&&t.data&&(e=i,i=i.data),Array.isArray(i)||(i=[i]),{data:i,extra:e}},eU=i=>{let e={};return x(["useDefaultSearch","key","load","loadMode","cacheRawData","byKey","lookup","totalCount","insert","update","remove"],function(){e[this]=i[this],delete i[this]}),new va(e)},tU=i=>{let e=i.type;return delete i.type,Hs.create(e,i)},iU=(i,e)=>new va({load:()=>z_.sendRequest({url:i,dataType:"json"}),loadMode:e?.fromUrlLoadMode}),gn=(i,e)=>{let t;return typeof i=="string"&&(i={paginate:!1,store:iU(i,e)}),i===void 0&&(i=[]),Array.isArray(i)||i instanceof Hs?i={store:i}:i=m({},i),i.store===void 0&&(i.store=[]),t=i.store,"load"in i?t=eU(i):Array.isArray(t)?t=new hs(t):X(t)&&(t=tU(m({},t))),i.store=t,i};var cg=class{constructor(){this._counter=-1,this._deferreds={}}add(e){return this._counter++,this._deferreds[this._counter]=e,this._counter}remove(e){return delete this._deferreds[e]}cancel(e){return e in this._deferreds?(this._deferreds[e].reject(lg),!0):!1}cancelAll(){for(;this._counter>-1;)this.cancel(this._counter),this._counter--}};var gi=pe.inherit({ctor(i){if(i=gn(i),this._eventsStrategy=new oo(this,{syncStrategy:!0}),this._store=i.store,this._changedTime=0,i.pushAggregationTimeout!==0){let t=i.pushAggregationTimeout===void 0?()=>5*this._changedTime:i.pushAggregationTimeout,n,o,s=LS(r=>{n.resolve(),P(...o).done(()=>this._onPush(r)),o=void 0,n=void 0},t);this._onPushHandler=r=>{this._aggregationTimeoutId=s(r.changes),n||(n=new y),o=r.waitFor,r.waitFor.push(n.promise())},this._store.on("beforePushAggregation",this._onPushHandler)}else this._onPushHandler=t=>this._onPush(t),this._store.on("push",this._onPushHandler);this._storeLoadOptions=this._extractLoadOptions(i),this._mapFunc=i.map,this._postProcessFunc=i.postProcess,this._pageIndex=i.pageIndex!==void 0?i.pageIndex:0,this._pageSize=i.pageSize!==void 0?i.pageSize:20,this._loadingCount=0,this._loadQueue=this._createLoadQueue(),this._searchValue="searchValue"in i?i.searchValue:null,this._searchOperation=i.searchOperation||"contains",this._searchExpr=i.searchExpr,this._paginate=i.paginate,this._reshapeOnPush=i.reshapeOnPush??!1,x(["onChanged","onLoadError","onLoadingChanged","onCustomizeLoadResult","onCustomizeStoreLoadOptions"],(t,n)=>{n in i&&this.on(n.substr(2,1).toLowerCase()+n.substr(3),i[n])}),this._operationManager=new cg,this._init()},_init(){this._items=[],this._userData={},this._totalCount=-1,this._isLoaded=!1,f(this._paginate)||(this._paginate=!this.group()),this._isLastPage=!this._paginate},dispose(){var i;this._store.off("beforePushAggregation",this._onPushHandler),this._store.off("push",this._onPushHandler),this._eventsStrategy.dispose(),clearTimeout(this._aggregationTimeoutId),(i=this._delayedLoadTask)===null||i===void 0||i.abort(),this._operationManager.cancelAll(),delete this._store,delete this._items,delete this._delayedLoadTask,this._disposed=!0},_extractLoadOptions(i){let e={},t=["sort","filter","langParams","select","group","requireTotalCount"],n=this._store._customLoadOptions();return n&&(t=t.concat(n)),x(t,function(){e[this]=i[this]}),e},loadOptions(){return this._storeLoadOptions},items(){return this._items},pageIndex(i){if(!Oe(i))return this._pageIndex;this._pageIndex=i,this._isLastPage=!this._paginate},paginate(i){if(!yr(i))return this._paginate;this._paginate!==i&&(this._paginate=i,this.pageIndex(0))},pageSize(i){if(!Oe(i))return this._pageSize;this._pageSize=i},isLastPage(){return this._isLastPage},generateStoreLoadOptionAccessor(i){return e=>{let t=Hv(e);if(t===void 0)return this._storeLoadOptions[i];this._storeLoadOptions[i]=t}},sort(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return this.generateStoreLoadOptionAccessor("sort")(e)},filter(){let i=Hv(arguments);if(i===void 0)return this._storeLoadOptions.filter;this._storeLoadOptions.filter=i,this.pageIndex(0)},group(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return this.generateStoreLoadOptionAccessor("group")(e)},select(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return this.generateStoreLoadOptionAccessor("select")(e)},requireTotalCount(i){if(!yr(i))return this._storeLoadOptions.requireTotalCount;this._storeLoadOptions.requireTotalCount=i},searchValue(i){if(arguments.length<1)return this._searchValue;this._searchValue=i,this.pageIndex(0)},searchOperation(i){if(!B(i))return this._searchOperation;this._searchOperation=i,this.pageIndex(0)},searchExpr(i){let e=arguments.length;if(e===0)return this._searchExpr;e>1&&(i=[].slice.call(arguments)),this._searchExpr=i,this.pageIndex(0)},store(){return this._store},key(){var i;return(i=this._store)===null||i===void 0?void 0:i.key()},totalCount(){return this._totalCount},isLoaded(){return this._isLoaded},isLoading(){return this._loadingCount>0},beginLoading(){this._changeLoadingCount(1)},endLoading(){this._changeLoadingCount(-1)},_createLoadQueue:()=>Lv(),_changeLoadingCount(i){let e=this.isLoading();this._loadingCount+=i;let t=this.isLoading();e^t&&this._eventsStrategy.fireEvent("loadingChanged",[t])},_scheduleLoadCallbacks(i){this.beginLoading(),i.always(()=>{this.endLoading()})},_scheduleFailCallbacks(i){var e=this;i.fail(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];n[0]!==lg&&e._eventsStrategy.fireEvent("loadError",n)})},_fireChanged(i){let e=new Date;this._eventsStrategy.fireEvent("changed",i),this._changedTime=new Date-e},_scheduleChangedCallbacks(i){i.done(()=>this._fireChanged())},loadSingle(i,e){let t=new y,n=this.key(),o=this._store,s=this._createStoreLoadOptions();return this._scheduleFailCallbacks(t),arguments.length<2&&(e=i,i=n),delete s.skip,delete s.group,delete s.refresh,delete s.pageIndex,delete s.searchString,(i===n||o instanceof va&&!o._byKeyViaLoad()?o.byKey(e,s):(s.take=1,s.filter=s.filter?[s.filter,[i,e]]:[i,e],o.load(s))).fail(t.reject).done(r=>{let a=Array.isArray(r)&&!r.length;!f(r)||a?t.reject(new mt.Error("E4009")):(Array.isArray(r)||(r=[r]),t.resolve(this._applyMapFunction(r)[0]))}),t.promise()},load(){let i=new y,e=()=>{if(!this._disposed&&Nv(i))return this._loadFromStore(t,i)};this._scheduleLoadCallbacks(i),this._scheduleFailCallbacks(i),this._scheduleChangedCallbacks(i);let t=this._createLoadOperation(i);return this._eventsStrategy.fireEvent("customizeStoreLoadOptions",[t]),this._loadQueue.add(()=>(typeof t.delay=="number"?this._delayedLoadTask=hl(e,t.delay):e(),i.promise())),i.promise({operationId:t.operationId})},_onPush(i){if(this._reshapeOnPush)this.load();else{let e={changes:i};this._eventsStrategy.fireEvent("changing",[e]);let t=this.group(),n=this.items(),o=0,s=this.paginate()||t?i.filter(r=>r.type==="update"):i;t&&(o=Array.isArray(t)?t.length:1),this._mapFunc&&s.forEach(r=>{r.type==="insert"&&(r.data=this._mapFunc(r.data))}),e.postProcessChanges&&(s=e.postProcessChanges(s)),no({keyInfo:this.store(),data:n,changes:s,groupCount:o,useInsertIndex:!0}),this._fireChanged([{changes:i}])}},_createLoadOperation(i){let e=this._operationManager.add(i),t=this._createStoreLoadOptions();return this._store&&!bt(t?.langParams)&&(this._store._langParams=I({},this._store._langParams,t.langParams)),i.always(()=>this._operationManager.remove(e)),{operationId:e,storeLoadOptions:t}},reload(){return this.store()._clearCache(),this._init(),this.load()},cancel(i){return this._operationManager.cancel(i)},cancelAll(){return this._operationManager.cancelAll()},_addSearchOptions(i){this._disposed||(this.store()._useDefaultSearch?this._addSearchFilter(i):(i.searchOperation=this._searchOperation,i.searchValue=this._searchValue,i.searchExpr=this._searchExpr))},_createStoreLoadOptions(){let i=m({},this._storeLoadOptions);return this._addSearchOptions(i),this._paginate&&this._pageSize&&(i.skip=this._pageIndex*this._pageSize,i.take=this._pageSize),i.userData=this._userData,i},_addSearchFilter(i){let e=this._searchValue,t=this._searchOperation,n=this._searchExpr,o=[];e&&(n||(n="this"),Array.isArray(n)||(n=[n]),x(n,function(s,r){o.length&&o.push("or"),o.push([r,t,e])}),i.filter?i.filter=[o,i.filter]:i.filter=o)},_loadFromStore(i,e){let t=(n,o)=>{if(this._disposed||!Nv(e))return;let s=m(dg(n,o),i);this._eventsStrategy.fireEvent("customizeLoadResult",[s]),P(s.data).done(r=>{s.data=r,this._processStoreLoadResult(s,e)}).fail(e.reject)};return i.data?new y().resolve(i.data).done(t):this.store().load(i.storeLoadOptions).done(t).fail(e.reject)},_processStoreLoadResult(i,e){let t=i.data,n=i.extra,o=i.storeLoadOptions,s=()=>(this._isLoaded=!0,this._totalCount=isFinite(n.totalCount)?n.totalCount:-1,e.resolve(t,n)),r=()=>{this.store().totalCount(o).done(function(a){n.totalCount=a,s()}).fail(e.reject)};this._disposed||(t=this._applyPostProcessFunction(this._applyMapFunction(t)),z(n)||(n={}),this._items=t,(!t.length||!this._paginate||this._pageSize&&t.length<this._pageSize)&&(this._isLastPage=!0),o.requireTotalCount&&!isFinite(n.totalCount)?r():s())},_applyMapFunction(i){return this._mapFunc?hA(i,this._mapFunc,this.group()):i},_applyPostProcessFunction(i){return this._postProcessFunc?this._postProcessFunc(i):i},on(i,e){return this._eventsStrategy.on(i,e),this},off(i,e){return this._eventsStrategy.off(i,e),this}});var ql=class{constructor(e){this.options=e,this._setOption("disabledItemKeys",[]),this._clearItemKeys()}_clearItemKeys(){this._setOption("addedItemKeys",[]),this._setOption("removedItemKeys",[]),this._setOption("removedItems",[]),this._setOption("addedItems",[])}validate(){}_setOption(e,t){this.options[e]=t}onSelectionChanged(){let{addedItemKeys:e}=this.options,{removedItemKeys:t}=this.options,{addedItems:n}=this.options,{removedItems:o}=this.options,{selectedItems:s}=this.options,{selectedItemKeys:r}=this.options,a=this.options.onSelectionChanged||E;this._clearItemKeys(),a({selectedItems:s,selectedItemKeys:r,addedItemKeys:e,removedItemKeys:t,addedItems:n,removedItems:o})}equalKeys(e,t){return this.options.equalByReference&&z(e)&&z(t)?e===t:Ee(e,t)}getSelectableItems(e){return e.filter(t=>!(t!=null&&t.disabled))}_clearSelection(e,t,n,o){return e=e||[],e=Array.isArray(e)?e:[e],this.validate(),this.selectedItemKeys(e,t,n,o)}_removeTemplateProperty(e){return Array.isArray(e)?e.map(t=>this._removeTemplateProperty(t)):(z(e)&&delete e.template,e)}_loadFilteredData(e,t,n,o){let s=encodeURI(JSON.stringify(this._removeTemplateProperty(e))).length,r=this.options.maxFilterLengthInRequest&&s>this.options.maxFilterLengthInRequest,a=y(),l={filter:r?void 0:e,select:r?this.options.dataFields():n||this.options.dataFields()};return e&&e.length===0?a.resolve([]):this.options.load(l).done(d=>{let c=X(d)?d.data:d;t&&!o?c=c.filter(t):r&&(c=Mt(c).filter(e).toArray()),a.resolve(c)}).fail(a.reject.bind(a)),a}updateSelectedItemKeyHash(e){for(let t=0;t<e.length;t++){let n=Di(e[t]);z(n)||(this.options.keyHashIndices[n]=this.options.keyHashIndices[n]||[],this.options.keyHashIndices[n].push(t))}}_isAnyItemSelected(e){for(let t=0;t<e.length;t++)if(this.options.isItemSelected(e[t]))return;return!1}_getFullSelectAllState(){let e=this.options.plainItems(),t=this.options.filter(),n=this.options.ignoreDisabledItems?this.options.selectedItems:this.options.selectedItems.filter(r=>!(r!=null&&r.disabled));t&&(n=Mt(n).filter(t).toArray());let o=n.length,s=e.length-this.getSelectableItems(e).length;if(!o)return this._isAnyItemSelected(e);if(o>=this.options.totalCount()-s)return!0}_getVisibleSelectAllState(){let e=this.getSelectableItems(this.options.plainItems()),t=!1,n=!1;for(let o=0;o<e.length;o++){let s=e[o],r=this.options.getItemData(s),a=this.options.keyOf(r);this.options.isSelectableItem(s)&&(this.isItemKeySelected(a)?t=!0:n=!0)}return t?n?void 0:!0:!1}};var ug=class extends ql{getSelectedItems(){return this._loadFilteredData(this.options.selectionFilter)}getSelectedItemKeys(){let e=y(),t=this,n=this.options.key(),o=B(n)?[n]:n;return this._loadFilteredData(this.options.selectionFilter,null,o).done(s=>{let r=s.map(a=>t.options.keyOf(a));e.resolve(r)}).fail(e.reject),e.promise()}selectedItemKeys(e,t,n,o){if(o){let s=this.options.filter();!s||JSON.stringify(s)===JSON.stringify(this.options.selectionFilter)&&n?this._setOption("selectionFilter",n?[]:null):this._addSelectionFilter(n,s,o)}else{t||this._setOption("selectionFilter",[]);for(let s=0;s<e.length;s++)n?this.removeSelectedItem(e[s]):this.addSelectedItem(e[s],o,!t)}return this.onSelectionChanged(),y().resolve()}setSelectedItems(e){this._setOption("selectionFilter",null);for(let t=0;t<e.length;t++)this.addSelectedItem(e[t])}isItemDataSelected(e){return this.isItemKeySelected(e)}isItemKeySelected(e){let{selectionFilter:t,sensitivity:n}=this.options;return t?!!Mt([e],{langParams:{collatorOptions:{sensitivity:n}}}).filter(t).toArray().length:!0}_getKeyExpr(){let e=this.options.key();return Array.isArray(e)&&e.length===1?e[0]:e}_normalizeKey(e){let t=this.options.key();return Array.isArray(t)&&t.length===1?e[t[0]]:e}_getFilterByKey(e){let t=this._getKeyExpr(),n=[t,"=",this._normalizeKey(e)];if(Array.isArray(t)){n=[];for(let o=0;o<t.length;o++)n.push([t[o],"=",e[t[o]]]),o!==t.length-1&&n.push("and")}return n}addSelectedItem(e,t,n){let o=this._getFilterByKey(e);this._addSelectionFilter(!1,o,t,n)}removeSelectedItem(e){let t=this._getFilterByKey(e);this._addSelectionFilter(!0,t)}validate(){let{key:e}=this.options;if(e&&e()===void 0)throw ie.Error("E1042","Deferred selection")}_findSubFilter(e,t){if(!e)return-1;let n=JSON.stringify(t);for(let o=0;o<e.length;o++){let s=e[o];if(s&&JSON.stringify(s)===n)return o}return-1}_isLastSubFilter(e,t){return e&&t?this._findSubFilter(e,t)===e.length-1||this._findSubFilter([e],t)===0:!1}_addFilterOperator(e,t){return e.length>1&&B(e[1])&&e[1]!==t&&(e=[e]),e.length&&e.push(t),e}_denormalizeFilter(e){return e&&B(e[0])&&(e=[e]),e}_isOnlyNegativeFiltersLeft(e){return e.every((t,n)=>n%2===0?Array.isArray(t)&&t[0]==="!":t==="and")}_addSelectionFilter(e,t,n,o){var s;let r=this,a=e?["!",t]:t,l=e?"and":"or",d=!0,c=r.options.selectionFilter||[];if(c=r._denormalizeFilter(c),(s=c)!==null&&s!==void 0&&s.length&&!o){let h=r._removeSameFilter(c,t,e,n),p=r._removeSameFilter(c,t,!e);e&&(h!==-1||p!==-1)&&this._isOnlyNegativeFiltersLeft(c)&&(c=[]);let C=this._isKeyFilter(t)&&this._hasKeyFiltersOnlyStartingFromIndex(c,p);d=t.length&&!C}d&&(c=r._addFilterOperator(c,l),c.push(a)),c=r._normalizeFilter(c),r._setOption("selectionFilter",!e&&!c.length?null:c)}_normalizeFilter(e){return e&&e.length===1&&(e=e[0]),e}_removeFilterByIndex(e,t,n){let o=e[1];t>0?e.splice(t-1,2):e.splice(t,2),n&&o==="and"&&e.splice(0,e.length)}_isSimpleKeyFilter(e,t){return e.length===3&&e[0]===t&&e[1]==="="}_isKeyFilter(e){if(e.length===2&&e[0]==="!")return this._isKeyFilter(e[1]);let t=this._getKeyExpr();if(Array.isArray(t)){if(e.length!==2*t.length-1)return!1;for(let n=0;n<t.length;n++)if(n>0&&e[2*n-1]!=="and"||!this._isSimpleKeyFilter(e[2*n],t[n]))return!1;return!0}return this._isSimpleKeyFilter(e,t)}_hasKeyFiltersOnlyStartingFromIndex(e,t){if(t>=0){for(let n=t;n<e.length;n++)if(typeof e[n]!="string"&&!this._isKeyFilter(e[n]))return!1;return!0}return!1}_removeSameFilter(e,t,n,o){if(t=n?["!",t]:t,JSON.stringify(t)===JSON.stringify(e))return e.splice(0,e.length),0;let s=this._findSubFilter(e,t);if(s>=0)return this._removeFilterByIndex(e,s,o),s;for(let r=0;r<e.length;r++)if(Array.isArray(e[r])&&e[r].length>2){let a=this._removeSameFilter(e[r],t,!1,o);if(a>=0)return e[r].length?e[r].length===1&&(e[r]=e[r][0]):this._removeFilterByIndex(e,r,o),a}return-1}getSelectAllState(){let e=this.options.filter(),{selectionFilter:t}=this.options;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}}loadSelectedItemsWithFilter(){let e=this.options.filter(),{selectionFilter:t}=this.options,n=e?[e,"and",t]:t;return this._loadFilteredData(n)}};var hg=function(i,e){let t=e(i);if(z(t))try{return JSON.stringify(t)}catch{return t}return t},nU=function(i,e,t,n){let o=hg(i,n);return e[t[o]]},pA=function(i,e){if(i.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(i[t]!==e[t])return!1;return!0},pg=function(i,e,t,n){let o={},s={},r=0,a=0,l=[];i.forEach(function(c,h){let p=hg(c,t);o[p]=h}),e.forEach(function(c,h){let p=hg(c,t);s[p]=h});let d=Math.max(i.length,e.length);for(let c=0;c<d+r;c++){let h=e[c],p=c-r+a,g=i[p];if(!h||g&&!nU(g,e,s,t))g&&(l.push({type:"remove",key:t(g),index:c,oldItem:g}),a++,c--);else{let v=hg(h,t),b=o[v],T=i[b];if(!T)r++,l.push({type:"insert",data:h,index:c});else if(b===p)n(T,h)||l.push({type:"update",data:h,key:t(h),index:c,oldItem:T});else return}}return l};var $v=function(i,e){this.getLocalFilter=function(a,l,d,c){return l=l===void 0?Ee:l,s.bind(this,l,a,d,c)},this.getExpr=function(a){if(!a)return;let l;return i.forEach(function(d,c){l=l||[];let h;c>0&&l.push(e?"and":"or"),B(a)||A(a)?h=r(a,d):h=function(p,g){let C=[];for(let v=0,b=p.length;v<b;v++){let T=p[v],M=Ce(T),G=g&&M(g),te=r(T,G);if(!te)break;v>0&&C.push(e?"or":"and"),C.push(te)}return C}(a,d),l.push(h)}),l&&l.length===1&&(l=l[0]),l},this.getCombinedFilter=function(a,l){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=this.getExpr(a),h=c;return(d||e)&&l&&(c?(h=[],h.push(c),h.push(l)):h=l),h};let t,n=function(a,l){if(!t){t={};let d=o(i,a,l);for(let c=0;c<d.length;c++)t[Di(d[c])]=!0}return t},o=function(a,l,d){return Array.isArray(d)?a.map(c=>l(c)):a};function s(a,l,d,c,h){let p=l(h),g,C;if(!d&&(g=Di(p),!z(g)))return n(l,c)[g]?!e:!!e;for(C=0;C<i.length;C++)if(a(i[C],p))return!e;return!!e}function r(a,l){if(l!==void 0)return[a,e?"<>":"=",l]}};var gg=class extends ql{constructor(e){super(e),this._initSelectedItemKeyHash()}_initSelectedItemKeyHash(){this._setOption("keyHashIndices",this.options.equalByReference?null:{})}getSelectedItemKeys(){return this.options.selectedItemKeys.slice(0)}getSelectedItems(){return this.options.selectedItems.slice(0)}_preserveSelectionUpdate(e,t){let{keyOf:n}=this.options,o,s,r;if(!n)return;let a=t&&e.length>1&&!this.options.equalByReference;for(a&&(o={}),r=0;r<e.length;r++){let l=e[r],d=n(l);t?(s=this.removeSelectedItem(d,o,l?.disabled),o&&s>=0&&(o[s]=!0)):this.addSelectedItem(d,l)}a&&this._batchRemoveSelectedItems(o)}_batchRemoveSelectedItems(e){let t=this.options.selectedItemKeys.slice(0),n=this.options.selectedItems.slice(0);this.options.selectedItemKeys.length=0,this.options.selectedItems.length=0;for(let o=0;o<t.length;o++)e[o]||(this.options.selectedItemKeys.push(t[o]),this.options.selectedItems.push(n[o]));this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(this.options.selectedItemKeys)}_loadSelectedItemsCore(e,t,n,o){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,r=y(),a=this.options.key();if(!e.length&&!n)return r.resolve([]),r;if(n&&t&&!o)return r.resolve(this.getSelectedItems()),r;let l=new $v(e,n),d=l.getCombinedFilter(a,o,s),c=[];if(t){let{selectedItems:g}=this.options;c=d&&e.length!==g.length?Mt(g).filter(d).toArray():g.slice(0)}let h=c.length?c:this.options.plainItems(!0).filter(this.options.isSelectableItem).map(this.options.getItemData),p=l.getLocalFilter(this.options.keyOf,this.equalKeys.bind(this),this.options.equalByReference,a);return h=h.filter(p),c.length||!n&&h.length===e.length?r.resolve(h):r=this._loadFilteredData(d,p,null,n),r}_replaceSelectionUpdate(e){let t=[],{keyOf:n}=this.options;if(n){for(let o=0;o<e.length;o++){let s=e[o],r=n(s);t.push(r)}this.setSelectedItems(t,e)}}_warnOnIncorrectKeys(e){let{allowNullValue:t}=this.options;for(let n=0;n<e.length;n++){let o=e[n];(!t||o!==null)&&!this.isItemKeySelected(o)&&ie.log("W1002",o)}}_isMultiSelectEnabled(){let{mode:e}=this.options;return e==="all"||e==="multiple"}_requestInProgress(){var e;return((e=this._lastLoadDeferred)===null||e===void 0?void 0:e.state())==="pending"}_concatRequestsItems(e,t,n,o){let s,r=t?e:[];return o?s=o:s=jx(e,this.options.selectedItemKeys),{addedItems:n.added.concat(s),removedItems:n.removed.concat(r),keys:e}}_collectLastRequestData(e,t,n,o){let s=t&&n,r={added:[],removed:[]},a=this._isMultiSelectEnabled(),l=a?this._lastRequestData:{};return a&&(this._shouldMergeWithLastRequest&&(s?(this._lastLoadDeferred.reject(),l={}):pA(e,this.options.selectedItemKeys)||(r.added=l.addedItems,r.removed=l.removedItems,t||this._lastLoadDeferred.reject())),l=this._concatRequestsItems(e,t,r,this._shouldMergeWithLastRequest?void 0:o)),l}_updateKeysByLastRequestData(e,t,n){let o=e;if(this._isMultiSelectEnabled()&&this._shouldMergeWithLastRequest&&!t&&!n){var s,r;o=jx(e.concat((s=this._lastRequestData)===null||s===void 0?void 0:s.addedItems),(r=this._lastRequestData)===null||r===void 0?void 0:r.removedItems),o=kD(o)}return o}_loadSelectedItems(e,t,n,o){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,r=this,a=y(),l=r.options.filter();return this._shouldMergeWithLastRequest=this._requestInProgress(),this._lastRequestData=this._collectLastRequestData(e,t,n,o),P(r._lastLoadDeferred).always(()=>{let d=r._updateKeysByLastRequestData(e,t,n);r._shouldMergeWithLastRequest=!1,r._loadSelectedItemsCore(d,t,n,l,s).done(a.resolve).fail(a.reject)}),r._lastLoadDeferred=a,a}selectedItemKeys(e,t,n,o,s){let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,a=this,l=a._loadSelectedItems(e,n,o,s,r);return l.done(d=>{t?a._preserveSelectionUpdate(d,n):a._replaceSelectionUpdate(d),a.onSelectionChanged()}),l}addSelectedItem(e,t){if(f(t)&&!this.options.ignoreDisabledItems&&t.disabled){this.options.disabledItemKeys.indexOf(e)===-1&&this.options.disabledItemKeys.push(e);return}let n=this._getKeyHash(e);this._indexOfSelectedItemKey(n)===-1&&(!z(n)&&this.options.keyHashIndices&&(this.options.keyHashIndices[n]=[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(e,t){let{selectedItemKeys:n}=this.options;for(let o=0;o<n.length;o++)if((!t||!t[o])&&this.equalKeys(n[o],e))return o;return-1}_getSelectedIndexByHash(e,t){let n=this.options.keyHashIndices[e];return n&&n.length>1&&t&&(n=n.filter(o=>!t[o])),n&&n[0]>=0?n[0]:-1}_indexOfSelectedItemKey(e,t){let n;return this.options.equalByReference?n=this.options.selectedItemKeys.indexOf(e):z(e)?n=this._getSelectedIndexByKey(e,t):n=this._getSelectedIndexByHash(e,t),n}_shiftSelectedKeyIndices(e){for(let t=e;t<this.options.selectedItemKeys.length;t++){let n=this.options.selectedItemKeys[t],o=Di(n),s=this.options.keyHashIndices[o];if(s)for(let r=0;r<s.length;r++)s[r]>e&&s[r]--}}removeSelectedItem(e,t,n){if(!this.options.ignoreDisabledItems&&n)return;let o=this._getKeyHash(e),s=!!t,r=this._indexOfSelectedItemKey(o,t);if(r<0||(this.options.removedItemKeys.push(e),this.options.removedItems.push(this.options.selectedItems[r]),s)||(this.options.selectedItemKeys.splice(r,1),this.options.selectedItems.splice(r,1),z(o)||!this.options.keyHashIndices))return r;let a=this.options.keyHashIndices[o];return a&&(a.shift(),a.length||delete this.options.keyHashIndices[o],this._shiftSelectedKeyIndices(r)),r}_updateAddedItemKeys(e,t){for(let n=0;n<e.length;n++)this.isItemKeySelected(e[n])||(this.options.addedItemKeys.push(e[n]),this.options.addedItems.push(t[n]))}_updateRemovedItemKeys(e,t,n){for(let o=0;o<t.length;o++)this.isItemKeySelected(t[o])||(this.options.removedItemKeys.push(t[o]),this.options.removedItems.push(n[o]))}_isItemSelectionInProgress(e,t){return t&&this._lastRequestData&&this._requestInProgress()?(this._lastRequestData.addedItems??[]).includes(e):!1}_getKeyHash(e){return this.options.equalByReference?e:Di(e)}setSelectedItems(e,t){this._updateAddedItemKeys(e,t);let n=this.options.selectedItemKeys,o=this.options.selectedItems;this.options.equalByReference||(this._initSelectedItemKeyHash(),this.updateSelectedItemKeyHash(e)),this._setOption("selectedItemKeys",e),this._setOption("selectedItems",t),this._updateRemovedItemKeys(e,n,o)}isItemDataSelected(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.options.keyOf(e);return this.isItemKeySelected(n,t)}isItemKeySelected(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this._isItemSelectionInProgress(e,t.checkPending);if(!n){let o=this._getKeyHash(e);n=this._indexOfSelectedItemKey(o)!==-1}return n}getSelectAllState(e){return e?this._getVisibleSelectAllState():this._getFullSelectAllState()}loadSelectedItemsWithFilter(){let e=this.options.key(),t=this.getSelectedItemKeys(),n=this.options.filter();if(!t.length)return y().resolve([]);let s=new $v(t).getCombinedFilter(e,n,!0);return this._loadFilteredData(s)}};var Yl=class{constructor(e){this.options=m(this._getDefaultOptions(),e,{selectedItemKeys:e.selectedKeys||[]}),this._selectionStrategy=this.options.deferred?new ug(this.options):new gg(this.options),this._focusedItemIndex=-1,this.options.equalByReference||this._selectionStrategy.updateSelectedItemKeyHash(this.options.selectedItemKeys)}_getDefaultOptions(){return{allowNullValue:!1,deferred:!1,equalByReference:!1,mode:"multiple",selectedItems:[],selectionFilter:[],maxFilterLengthInRequest:0,onSelectionChanged:E,key:E,keyOf:e=>e,load:()=>y().resolve([]),totalCount:()=>-1,isSelectableItem:()=>!0,isItemSelected:()=>!1,getItemData:e=>e,dataFields:E,filter:E}}validate(){this._selectionStrategy.validate()}getSelectedItemKeys(){return this._selectionStrategy.getSelectedItemKeys()}getSelectedItems(){return this._selectionStrategy.getSelectedItems()}selectionFilter(e){if(e===void 0)return this.options.selectionFilter;let t=this.options.selectionFilter!==e&&JSON.stringify(this.options.selectionFilter)!==JSON.stringify(e);this.options.selectionFilter=e,t&&this.onSelectionChanged()}setSelection(e,t){return this.selectedItemKeys(e,!1,!1,!1,t)}select(e){return this.selectedItemKeys(e,!0)}deselect(e){return this.selectedItemKeys(e,!0,!0)}selectedItemKeys(e,t,n,o,s){return e=e??[],e=Array.isArray(e)?e:[e],this.validate(),this._selectionStrategy.selectedItemKeys(e,t,n,o,s)}clearSelection(){return this.selectedItemKeys([])}_addSelectedItem(e,t){this._selectionStrategy.addSelectedItem(t,e)}_removeSelectedItem(e){this._selectionStrategy.removeSelectedItem(e)}_setSelectedItems(e,t){this._selectionStrategy.setSelectedItems(e,t)}onSelectionChanged(){this._selectionStrategy.onSelectionChanged()}changeItemSelection(e,t,n){var o,s;let r,a=this.options.plainItems(),l=a[e],d,{isVirtualPaging:c}=this.options,h=(o=(s=this.options).allowLoadByRange)===null||o===void 0?void 0:o.call(s),{alwaysSelectByShift:p}=this.options,g,C=!1,v=!1,b=te=>te>=0&&!a.filter(oe=>oe.loadIndex===te).length;if(c&&f(l)&&(h&&(g=l.loadIndex-e,e=l.loadIndex),C=b(this._focusedItemIndex),f(this._shiftFocusedItemIndex)&&(v=b(this._shiftFocusedItemIndex))),!this.isSelectable()||!this.isDataItem(l))return!1;let T=this.options.getItemData(l),M=this.options.keyOf(T);t=t||{};let G=t.shift;if(p===!1&&G&&(G=h!==!1||!C&&!v),G&&this.options.mode==="multiple"&&this._focusedItemIndex>=0)h&&(C||v)?(r=e!==this._shiftFocusedItemIndex||this._focusedItemIndex!==this._shiftFocusedItemIndex,r&&(d=this.changeItemSelectionWhenShiftKeyInVirtualPaging(e))):r=this.changeItemSelectionWhenShiftKeyPressed(e,a,g);else if(t.control){if(this._resetItemSelectionWhenShiftKeyPressed(),!n){let te=this._selectionStrategy.isItemDataSelected(T);this.options.mode==="single"&&this.clearSelectedItems(),te?this._removeSelectedItem(M):this._addSelectedItem(T,M)}r=!0}else{this._resetItemSelectionWhenShiftKeyPressed();let te=this._selectionStrategy.equalKeys(this.options.selectedItemKeys[0],M);(this.options.selectedItemKeys.length!==1||!te)&&(this._setSelectedItems([M],[T]),r=!0)}if(r)return P(d).done(()=>{this._focusedItemIndex=e,!n&&this.onSelectionChanged()}),!0}isDataItem(e){return this.options.isSelectableItem(e)}isSelectable(){return this.options.mode==="single"||this.options.mode==="multiple"}isItemDataSelected(e){return this._selectionStrategy.isItemDataSelected(e,{checkPending:!0})}isItemSelected(e,t){return this._selectionStrategy.isItemKeySelected(e,t)}_resetItemSelectionWhenShiftKeyPressed(){delete this._shiftFocusedItemIndex}_resetFocusedItemIndex(){this._focusedItemIndex=-1}changeItemSelectionWhenShiftKeyInVirtualPaging(e){let t=this.options.getLoadOptions(e,this._focusedItemIndex,this._shiftFocusedItemIndex),n=y(),o=t.skip;return this.options.load(t).done(s=>{this.changeItemSelectionWhenShiftKeyPressed(e,s,o),n.resolve()}),n.promise()}changeItemSelectionWhenShiftKeyPressed(e,t,n){let o=!1,s,r=f(n),a=r?this._focusedItemIndex-n:this._focusedItemIndex,{keyOf:l}=this.options,d=t[a],c=this.options.getItemData(d),h=l(c),p=d&&this.isItemDataSelected(c);f(this._shiftFocusedItemIndex)||(this._shiftFocusedItemIndex=this._focusedItemIndex);let g,C,v,b;if(this._shiftFocusedItemIndex!==this._focusedItemIndex)for(s=this._focusedItemIndex<this._shiftFocusedItemIndex?1:-1,v=r?this._focusedItemIndex-n:this._focusedItemIndex,b=r?this._shiftFocusedItemIndex-n:this._shiftFocusedItemIndex,a=v;a!==b;a+=s)(r||this.isDataItem(t[a]))&&(C=l(this.options.getItemData(t[a])),this._removeSelectedItem(C),o=!0);if(e!==this._shiftFocusedItemIndex)for(s=e<this._shiftFocusedItemIndex?1:-1,v=r?e-n:e,b=r?this._shiftFocusedItemIndex-n:this._shiftFocusedItemIndex,a=v;a!==b;a+=s)(r||this.isDataItem(t[a]))&&(g=this.options.getItemData(t[a]),C=l(g),this._addSelectedItem(g,C),o=!0);return(r||this.isDataItem(d))&&!p&&(this._addSelectedItem(c,h),o=!0),o}clearSelectedItems(){this._setSelectedItems([],[])}selectAll(e){return this._resetFocusedItemIndex(),e?this._onePageSelectAll(!1):this.selectedItemKeys([],!0,!1,!0)}deselectAll(e){return this._resetFocusedItemIndex(),e?this._onePageSelectAll(!0):this.selectedItemKeys([],!0,!0,!0)}_onePageSelectAll(e){let t=this._selectionStrategy.getSelectableItems(this.options.plainItems());for(let n=0;n<t.length;n++){let o=t[n];if(this.isDataItem(o)){let s=this.options.getItemData(o),r=this.options.keyOf(s),a=this.isItemSelected(r);!a&&!e&&this._addSelectedItem(s,r),a&&e&&this._removeSelectedItem(r)}}return this.onSelectionChanged(),y().resolve()}getSelectAllState(e){return this._selectionStrategy.getSelectAllState(e)}loadSelectedItemsWithFilter(){return this._selectionStrategy.loadSelectedItemsWithFilter()}};var oU={load:()=>y().reject(),loadSingle:()=>y().reject(),loadFromStore:()=>y().reject(),loadNextPage:()=>y().reject(),loadOptions:E,userData:E,cancel:E,cancelAll:E,filter:E,addSearchFilter:E,group:E,paginate:E,pageSize:E,pageIndex:E,resetDataSourcePageIndex:E,totalCount:E,isLastPage:E,isLoading:E,isLoaded:E,searchValue:E,searchOperation:E,searchExpr:E,select:E,key:E,keyOf:E,store:E,items:E,applyMapFunction:E,getDataSource:E,reload:E,on:E,off:E},zv=class{constructor(e){if(!e)return oU;this._dataSource=e}load(){return this._dataSource.load()}loadSingle(e,t){return arguments.length<2&&(t=e,e=this.key()),this._dataSource.loadSingle(e,t)}loadFromStore(e){return this.store().load(e)}loadNextPage(){return this.pageIndex(1+this.pageIndex()),this.load()}loadOptions(){return this._dataSource.loadOptions()}userData(){return this._dataSource._userData}cancel(e){this._dataSource.cancel(e)}cancelAll(){this._dataSource.cancelAll()}filter(e){return this._dataSource.filter(e)}addSearchFilter(e){this._dataSource._addSearchFilter(e)}group(e){return this._dataSource.group(e)}paginate(){return this._dataSource.paginate()}pageSize(){return this._dataSource._pageSize}pageIndex(e){return this._dataSource.pageIndex(e)}resetDataSourcePageIndex(){this.pageIndex()&&(this.pageIndex(0),this.load())}totalCount(){return this._dataSource.totalCount()}isLastPage(){return this._dataSource.isLastPage()||!this._dataSource._pageSize}isLoading(){return this._dataSource.isLoading()}isLoaded(){return this._dataSource.isLoaded()}searchValue(e){return arguments.length?this._dataSource.searchValue(e):this._dataSource.searchValue()}searchOperation(e){return this._dataSource.searchOperation(e)}searchExpr(e){return arguments.length?this._dataSource.searchExpr(e):this._dataSource.searchExpr()}select(){return this._dataSource.select(...arguments)}key(){return this._dataSource.key()}keyOf(e){return this.store().keyOf(e)}store(){return this._dataSource.store()}items(){return this._dataSource.items()}applyMapFunction(e){return this._dataSource._applyMapFunction(e)}getDataSource(){return this._dataSource||null}reload(){return this._dataSource.reload()}on(e,t){this._dataSource.on(e,t)}off(e,t){this._dataSource.off(e,t)}},mg=zv;var gA="_dataSourceChangedHandler";var mA="_getSpecificDataSourceOption",fA="_normalizeDataSource",sU={postCtor:function(){this.on("disposing",function(){this._disposeDataSource()}.bind(this))},_refreshDataSource:function(){this._initDataSource(),this._loadDataSource()},_initDataSource:function(){let i=mA in this?this[mA]():this.option("dataSource"),e,t;this._disposeDataSource(),i&&(i instanceof gi?(this._isSharedDataSource=!0,this._dataSource=i):(e="_dataSourceOptions"in this?this._dataSourceOptions():{},t=this._dataSourceType?this._dataSourceType():gi,i=gn(i,{fromUrlLoadMode:"_dataSourceFromUrlLoadMode"in this&&this._dataSourceFromUrlLoadMode()}),this._dataSource=new t(m(!0,{},e,i))),fA in this&&(this._dataSource=this[fA](this._dataSource)),this._addDataSourceHandlers(),this._initDataController())},_initDataController:function(){var i;let e=(i=this.option)===null||i===void 0?void 0:i.call(this,"_dataController"),t=this._dataSource;e?this._dataController=e:this._dataController=new mg(t)},_addDataSourceHandlers:function(){gA in this&&this._addDataSourceChangeHandler(),"_dataSourceLoadErrorHandler"in this&&this._addDataSourceLoadErrorHandler(),"_dataSourceLoadingChangedHandler"in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()},_addReadyWatcher:function(){this.readyWatcher=function(i){this._ready&&this._ready(!i)}.bind(this),this._dataSource.on("loadingChanged",this.readyWatcher)},_addDataSourceChangeHandler:function(){let i=this._dataSource;this._proxiedDataSourceChangedHandler=function(e){this[gA](i.items(),e)}.bind(this),i.on("changed",this._proxiedDataSourceChangedHandler)},_addDataSourceLoadErrorHandler:function(){this._proxiedDataSourceLoadErrorHandler=this._dataSourceLoadErrorHandler.bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)},_addDataSourceLoadingChangedHandler:function(){this._proxiedDataSourceLoadingChangedHandler=this._dataSourceLoadingChangedHandler.bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)},_loadDataSource:function(){let i=this._dataSource;i&&(i.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():i.load())},_loadSingle:function(i,e){return i=i==="this"?this._dataSource.key()||"this":i,this._dataSource.loadSingle(i,e)},_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._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)},getDataSource:function(){return this._dataSource||null}},fg=sU;var _A={"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-MV":"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","hi-Latn":"en-IN","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","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 CA=(i,e)=>{let t=i[e];return t?t!=="root"&&t:e.substr(0,e.lastIndexOf("-"))};var mn=Lt({locale:(()=>{let i="en";return e=>{if(!e)return i;i=e}})(),getValueByClosestLocale:function(i){let e=this.locale(),t=i(e),n;for(;!t&&!n;)e=CA(_A,e),e?t=i(e):n=!0;return t===void 0&&e!=="en"?i("en"):t}});var xA={en:{Yes:"Yes",No:"No",Cancel:"Cancel",CheckState:"Check state",Close:"Close",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","dxList-listAriaLabel":"Items","dxList-listAriaLabel-deletable":"Deletable items","dxListEditDecorator-delete":"Delete","dxListEditDecorator-more":"More","dxList-selectAll-indeterminate":"Half-checked","dxList-selectAll-checked":"Checked","dxList-selectAll-notChecked":"Not checked","dxList-ariaRoleDescription":"List","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","dxDateRangeBox-invalidStartDateMessage":"Start value must be a date","dxDateRangeBox-invalidEndDateMessage":"End value must be a date","dxDateRangeBox-startDateOutOfRangeMessage":"Start date is out of range","dxDateRangeBox-endDateOutOfRangeMessage":"End date is out of range","dxDateRangeBox-startDateLabel":"Start Date","dxDateRangeBox-endDateLabel":"End Date","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-emptyHeaderWithColumnChooserText":"Use {0} to display columns","dxDataGrid-emptyHeaderWithGroupPanelText":"Drag a column from the group panel here","dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText":"Use {0} or drag a column from the group panel","dxDataGrid-emptyHeaderColumnChooserText":"column chooser","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-ariaSearchBox":"Search box","dxDataGrid-applyFilterText":"Apply filter","dxDataGrid-trueText":"true","dxDataGrid-falseText":"false","dxDataGrid-sortingAscendingText":"Sort Ascending","dxDataGrid-sortingDescendingText":"Sort Descending","dxDataGrid-sortingClearText":"Clear Sorting","dxDataGrid-ariaNotSortedColumn":"Not sorted column","dxDataGrid-ariaSortedAscendingColumn":"Column sorted in ascending order","dxDataGrid-ariaSortedDescendingColumn":"Column sorted in descending order","dxDataGrid-ariaSortIndex":"Sort index {0}","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-headerFilterLabel":"Filter options","dxDataGrid-headerFilterIndicatorLabel":"Show filter options for column '{0}'","dxDataGrid-headerFilterEmptyValue":"(Blanks)","dxDataGrid-headerFilterOK":"OK","dxDataGrid-headerFilterCancel":"Cancel","dxDataGrid-ariaAdaptiveCollapse":"Hide additional data","dxDataGrid-ariaAdaptiveExpand":"Display additional data","dxDataGrid-ariaColumn":"Column","dxDataGrid-ariaColumnHeader":"Column header","dxDataGrid-ariaValue":"Value","dxDataGrid-ariaError":"Error","dxDataGrid-ariaRevertButton":"Press Escape to discard the changes","dxDataGrid-ariaFilterCell":"Filter cell","dxDataGrid-ariaCollapse":"Collapse","dxDataGrid-ariaModifiedCell":"Modified","dxDataGrid-ariaDeletedCell":"Deleted","dxDataGrid-ariaEditableCell":"Editable","dxDataGrid-ariaExpand":"Expand","dxDataGrid-ariaCollapsedRow":"Collapsed row","dxDataGrid-ariaExpandedRow":"Expanded row","dxDataGrid-ariaDataGrid":"Data grid with {0} rows and {1} columns","dxDataGrid-ariaSearchInGrid":"Search in the data grid","dxDataGrid-ariaSelectAll":"Select all","dxDataGrid-ariaSelectRow":"Select row","dxDataGrid-ariaToolbar":"Data grid toolbar","dxDataGrid-ariaEditForm":"Edit form","dxDataGrid-filterBuilderPopupTitle":"Filter Builder","dxDataGrid-filterPanelCreateFilter":"Create Filter","dxDataGrid-filterPanelClearFilter":"Clear","dxDataGrid-filterPanelFilterEnabledHint":"Enable the filter","dxDataGrid-masterDetail":"Cell with details","dxTreeList-ariaTreeList":"Tree list with {0} rows and {1} columns","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-pageSize":"Items per page: {0}","dxPager-pageSizesAllText":"All","dxPager-page":"Page {0}","dxPager-prevPage":"Previous Page","dxPager-nextPage":"Next Page","dxPager-ariaLabel":"Page Navigation","dxPager-ariaPageSize":"Page size","dxPager-ariaPageNumber":"Page number","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-confirmRecurrenceEditTitle":"Edit Recurring Appointment","dxScheduler-confirmRecurrenceDeleteTitle":"Delete Recurring Appointment","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-currentDay":"Today","dxCalendar-currentMonth":"Current month","dxCalendar-currentYear":"Current year","dxCalendar-currentYearRange":"Current year range","dxCalendar-todayButtonText":"Today","dxCalendar-ariaWidgetName":"Calendar","dxCalendar-previousMonthButtonLabel":"Previous month","dxCalendar-previousYearButtonLabel":"Previous year","dxCalendar-previousDecadeButtonLabel":"Previous decade","dxCalendar-previousCenturyButtonLabel":"Previous century","dxCalendar-nextMonthButtonLabel":"Next month","dxCalendar-nextYearButtonLabel":"Next year","dxCalendar-nextDecadeButtonLabel":"Next decade","dxCalendar-nextCenturyButtonLabel":"Next century","dxCalendar-captionMonthLabel":"Month selection","dxCalendar-captionYearLabel":"Year selection","dxCalendar-captionDecadeLabel":"Decade selection","dxCalendar-captionCenturyLabel":"Century selection","dxCalendar-selectedDate":"The selected date is {0}","dxCalendar-selectedDateRange":"The selected date range is from {0} to {1}","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","dxTagBox-tagRoleDescription":"Tag. Press the delete button to remove this tag","dxTagBox-ariaRoleDescription":"Tag box","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-borderWidth":"Border Width","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","dxHtmlEditor-borderStyleNone":"none","dxHtmlEditor-borderStyleHidden":"hidden","dxHtmlEditor-borderStyleDotted":"dotted","dxHtmlEditor-borderStyleDashed":"dashed","dxHtmlEditor-borderStyleSolid":"solid","dxHtmlEditor-borderStyleDouble":"double","dxHtmlEditor-borderStyleGroove":"groove","dxHtmlEditor-borderStyleRidge":"ridge","dxHtmlEditor-borderStyleInset":"inset","dxHtmlEditor-borderStyleOutset":"outset","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-editingDownloadSingleItemErrorMessage":"Item was not downloaded","dxFileManager-editingDownloadMultipleItemsErrorMessage":"{0} items were not downloaded","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}","dxGallery-itemName":"Gallery item","dxMultiView-elementAriaRoleDescription":"MultiView","dxMultiView-elementAriaLabel":"Use the arrow keys or swipe to navigate between views","dxMultiView-itemAriaRoleDescription":"View","dxMultiView-itemAriaLabel":"{0} of {1}","dxSplitter-resizeHandleAriaLabel":"Split bar","dxSplitter-resizeHandleAriaRoleDescription":"Separator"}};var rU=m(!0,{},xA),aU=(i,e)=>{var t;return i[e]||e?.toLowerCase&&((t=Object.entries(i).find(n=>{let[o]=n;return o.toLowerCase()===e.toLowerCase()}))===null||t===void 0?void 0:t[1])||{}},Wv={},lU=Lt({engine:function(){return"base"},_dictionary:rU,load:function(i){m(!0,this._dictionary,i)},_localizablePrefix:"@",setup:function(i){this._localizablePrefix=i},localizeString:function(i){let e=this,t=new RegExp("(^|[^a-zA-Z_0-9"+e._localizablePrefix+"-]+)("+e._localizablePrefix+"{1,2})([a-zA-Z_0-9-]+)","g"),n=e._localizablePrefix+e._localizablePrefix;return i.replace(t,(o,s,r,a)=>{let l=e._localizablePrefix+a,d;return r!==n&&(d=e.format(a)),d||(Wv[a]=eS(a)),s+(d||l)})},getMessagesByLocales:function(){return this._dictionary},getDictionary:function(i){return i?Wv:m({},Wv,this.getMessagesByLocales()[mn.locale()])},getFormatter:function(i){return this._getFormatterBase(i)||this._getFormatterBase(i,"en")},_getFormatterBase:function(i,e){let t=mn.getValueByClosestLocale(n=>aU(this._dictionary,n)[i]);if(t)return function(){let n=arguments.length===1&&Array.isArray(arguments[0])?arguments[0].slice(0):Array.prototype.slice.call(arguments,0);return n.unshift(t),Gi.apply(this,n)}},format:function(i){let e=this.getFormatter(i),t=Array.prototype.slice.call(arguments,1);return e&&e.apply(this,t)||""}}),O=lU;var dU=function(i,e,t){let n=function(){let o;return function(s){o!==s&&(t(s,o),o=s)}}();return{dispose:i(e,n),force(){n(e())}}},vA=pe.inherit({ctor(i,e,t){this._$element=i,this._options=e,this._rawData=t,Ip(i,this,this._dispose),this._render()},_render(){let i=u("<div>").addClass("dx-item-content-placeholder");this._$element.append(i),this._watchers=[],this._renderWatchers()},_renderWatchers(){this._startWatcher("disabled",this._renderDisabled.bind(this)),this._startWatcher("visible",this._renderVisible.bind(this))},_startWatcher(i,e){let t=this._rawData,n=this._options.fieldGetter(i),o=dU(this._options.watchMethod(),()=>n(t),(s,r)=>{this._dirty=!0,e(s,r)});this._watchers.push(o)},setDataField(){if(this._dirty=!1,x(this._watchers,(i,e)=>{e.force()}),this._dirty)return!0},_renderDisabled(i,e){this._$element.toggleClass("dx-state-disabled",!!i),this._$element.attr("aria-disabled",!!i),this._updateOwnerFocus(i)},_updateOwnerFocus(i){let e=this._options.owner;e&&i&&e._resetItemFocus(this._$element)},_renderVisible(i,e){this._$element.toggleClass("dx-state-invisible",i!==void 0&&!i)},_dispose(){x(this._watchers,(i,e)=>{e.dispose()})}});vA.getInstance=function(i){return Dp(i,this)};var mo=vA;var _g="dx-item";var cU="dx-empty-collection";var uU=/^([^.]+\[\d+\]\.)+([\w.]+)$/;var bA=at.inherit({_activeStateUnit:`.${_g}`,_supportedKeys(){let i=function(e,t){ft(t)||(t.preventDefault(),t.stopPropagation(),this._moveFocus(e,t))};return m(this.callBase(),{space:function(e){e.preventDefault(),this._enterKeyHandler(e)},enter:this._enterKeyHandler,leftArrow:i.bind(this,"left"),rightArrow:i.bind(this,"right"),upArrow:i.bind(this,"up"),downArrow:i.bind(this,"down"),pageUp:i.bind(this,"up"),pageDown:i.bind(this,"down"),home:i.bind(this,"first"),end:i.bind(this,"last")})},_enterKeyHandler(i){let e=u(this.option("focusedElement"));if(!e.length)return;let t=this._getItemData(e);t!=null&&t.onClick&&this._itemEventHandlerByHandler(e,t.onClick,{event:i}),this._itemClickHandler(m({},i,{target:e.get(0),currentTarget:e.get(0)}))},_getDefaultOptions(){return m(this.callBase(),{selectOnFocus:!1,loopItemFocus:!0,items:[],itemTemplate:"item",onItemRendered:null,onItemClick:null,onItemHold:null,itemHoldTimeout:750,onItemContextMenu:null,onFocusedItemChanged:null,noDataText:O.format("dxCollectionWidget-noDataText"),encodeNoDataText:!1,dataSource:null,_dataController:null,_itemAttributes:{},itemTemplateProperty:"template",focusOnSelectedItem:!0,focusedElement:null,displayExpr:void 0,disabledExpr:i=>i?i.disabled:void 0,visibleExpr:i=>i?i.visible:void 0})},_init(){this._compileDisplayGetter(),this._initDataController(),this.callBase(),this._cleanRenderedItems(),this._refreshDataSource()},_compileDisplayGetter(){let i=this.option("displayExpr");this._displayGetter=i?Ce(this.option("displayExpr")):void 0},_initTemplates(){this._initItemsFromMarkup(),this._initDefaultItemTemplate(),this.callBase()},_getAnonymousTemplateName:()=>"item",_initDefaultItemTemplate(){let i=this._getFieldsMap();this._templateManager.addDefaultTemplates({item:new Ai((e,t)=>{X(t)?this._prepareDefaultItemTemplate(t,e):(i&&A(i.text)&&(t=i.text(t)),e.text(String(Be(t,""))))},this._getBindableFields(),this.option("integrationOptions.watchMethod"),i)})},_getBindableFields:()=>["text","html"],_getFieldsMap(){if(this._displayGetter)return{text:this._displayGetter}},_prepareDefaultItemTemplate(i,e){f(i.text)&&e.text(i.text),f(i.html)&&e.html(i.html)},_initItemsFromMarkup(){let i=Hp(this.$element(),"dxItem");if(!i.length||this.option("items").length)return;let e=i.map(t=>{let{element:n,options:o}=t;return/\S/.test(n.innerHTML)&&!o.template?o.template=this._prepareItemTemplate(n):u(n).remove(),o});this.option("items",e)},_prepareItemTemplate(i){let e="tmpl-"+new Ae,t=u(i).detach().clone().removeAttr("data-options").addClass("dx-template-wrapper");return this._saveTemplate(e,t),e},_dataSourceOptions:()=>({paginate:!1}),_cleanRenderedItems(){this._renderedItemsCount=0},_focusTarget(){return this.$element()},_focusInHandler(i){if(this.callBase.apply(this,arguments),!this._isFocusTarget(i.target))return;let e=u(this.option("focusedElement"));if(e.length)this._setFocusedItem(e);else{let t=this._getActiveItem();t.length&&this.option("focusedElement",H(t))}},_focusOutHandler(){this.callBase.apply(this,arguments);let i=u(this.option("focusedElement"));this._updateFocusedItemState(i,!1)},_findActiveTarget(i){return i.find(this._activeStateUnit)},_getActiveItem(i){let e=u(this.option("focusedElement"));if(e.length)return e;let t=this.option("focusOnSelectedItem")?this.option("selectedIndex"):0,n=this._getActiveElement(),o=n.length-1;return t<0&&(t=i?o:0),n.eq(t)},_moveFocus(i){let e=this._getAvailableItems(),t;switch(i){case"pageup":case"up":t=this._prevItem(e);break;case"pagedown":case"down":t=this._nextItem(e);break;case"right":t=this.option("rtlEnabled")?this._prevItem(e):this._nextItem(e);break;case"left":t=this.option("rtlEnabled")?this._nextItem(e):this._prevItem(e);break;case"first":t=e.first();break;case"last":t=e.last();break;default:return!1}t.length!==0&&this.option("focusedElement",H(t))},_getVisibleItems(i){return i=i||this._itemElements(),i.filter(":visible")},_getAvailableItems(i){return this._getVisibleItems(i)},_prevItem(i){let e=this._getActiveItem(),t=i.index(e),n=i.last(),o=u(i[t-1]),s=this.option("loopItemFocus");return o.length===0&&s&&(o=n),o},_nextItem(i){let e=this._getActiveItem(!0),t=i.index(e),n=i.first(),o=u(i[t+1]),s=this.option("loopItemFocus");return o.length===0&&s&&(o=n),o},_selectFocusedItem(i){this.selectItem(i)},_updateFocusedItemState(i,e,t){let n=u(i);n.length&&(this._refreshActiveDescendant(),this._refreshItemId(n,t),this._toggleFocusClass(e,n)),this._updateParentActiveDescendant()},_refreshActiveDescendant(i){this.setAria("activedescendant",f(this.option("focusedElement"))?this.getFocusedItemId():null,i)},_refreshItemId(i,e){!e&&this.option("focusedElement")?this.setAria("id",this.getFocusedItemId(),i):this.setAria("id",null,i)},_isDisabled:i=>i&&u(i).attr("aria-disabled")==="true",_setFocusedItem(i){if(!i||!i.length)return;this._updateFocusedItemState(i,!0),this.onFocusedItemChanged(this.getFocusedItemId());let{selectOnFocus:e}=this.option(),t=this._isDisabled(i);e&&!t&&this._selectFocusedItem(i)},_findItemElementByItem(i){let e=u(),t=this;return this.itemElements().each(function(){let n=u(this);if(n.data(t._itemDataKey())===i)return e=n,!1}),e},_getIndexByItem(i){return this.option("items").indexOf(i)},_itemOptionChanged(i,e,t,n){let o=this._findItemElementByItem(i);if(!o.length)return;this.constructor.ItemClass.getInstance(o).setDataField(e,t)||this._refreshItem(o,i),e==="disabled"&&t&&this._resetItemFocus(o)},_resetItemFocus(i){i.is(this.option("focusedElement"))&&this.option("focusedElement",null)},_refreshItem(i){let e=this._getItemData(i),t=i.data(this._itemIndexKey());this._renderItem(this._renderedItemsCount+t,e,null,i)},_updateParentActiveDescendant:E,_optionChanged(i){if(i.name==="items"){let e=i.fullName.match(uU);if(e&&e.length){let t=e[e.length-1],n=i.fullName.replace(`.${t}`,""),o=this.option(n);this._itemOptionChanged(o,t,i.value,i.previousValue);return}}switch(i.name){case"items":case"_itemAttributes":case"itemTemplateProperty":case"useItemTextAsTitle":this._cleanRenderedItems(),this._invalidate();break;case"dataSource":this._refreshDataSource(),this._renderEmptyMessage();break;case"noDataText":case"encodeNoDataText":this._renderEmptyMessage();break;case"itemTemplate":case"visibleExpr":case"disabledExpr":this._invalidate();break;case"onItemRendered":this._createItemRenderAction();break;case"onItemClick":case"selectOnFocus":case"loopItemFocus":case"focusOnSelectedItem":break;case"onItemHold":case"itemHoldTimeout":this._attachHoldEvent();break;case"onItemContextMenu":this._attachContextMenuEvent();break;case"onFocusedItemChanged":this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged");break;case"focusedElement":this._updateFocusedItemState(i.previousValue,!1,!0),this._setFocusedItem(u(i.value));break;case"displayExpr":this._compileDisplayGetter(),this._initDefaultItemTemplate(),this._invalidate();break;default:this.callBase(i)}},_invalidate(){return this.option("focusedElement",null),this.callBase.apply(this,arguments)},_loadNextPage(){return this._expectNextPageLoading(),this._dataController.loadNextPage()},_expectNextPageLoading(){this._startIndexForAppendedItems=0},_expectLastItemLoading(){this._startIndexForAppendedItems=-1},_forgetNextPageLoading(){this._startIndexForAppendedItems=null},_dataSourceChangedHandler(i){let e=this.option("items");this._initialized&&e&&this._shouldAppendItems()?(this._renderedItemsCount=e.length,(!this._isLastPage()||this._startIndexForAppendedItems!==-1)&&(this.option().items=e.concat(i.slice(this._startIndexForAppendedItems))),this._forgetNextPageLoading(),this._refreshContent()):this.option("items",i.slice())},_refreshContent(){this._prepareContent(),this._renderContent()},_dataSourceLoadErrorHandler(){this._forgetNextPageLoading(),this.option("items",this.option("items"))},_shouldAppendItems(){return this._startIndexForAppendedItems!=null&&this._allowDynamicItemsAppend()},_allowDynamicItemsAppend:()=>!1,_clean(){this._cleanFocusState(),this._cleanItemContainer(),this._inkRipple&&delete this._inkRipple,this._resetActiveState()},_cleanItemContainer(){u(this._itemContainer()).empty()},_dispose(){this.callBase(),clearTimeout(this._itemFocusTimeout)},_refresh(){this._cleanRenderedItems(),this.callBase.apply(this,arguments)},_itemContainer(){return this.$element()},_itemClass:()=>_g,_itemContentClass(){return this._itemClass()+"-content"},_selectedItemClass:()=>"dx-item-selected",_itemResponseWaitClass:()=>"dx-item-response-wait",_itemSelector(){return`.${this._itemClass()}`},_itemDataKey:()=>"dxItemData",_itemIndexKey:()=>"dxItemIndex",_itemElements(){return this._itemContainer().find(this._itemSelector())},_initMarkup(){this.callBase(),this.onFocusedItemChanged=this._createActionByOption("onFocusedItemChanged"),this.$element().addClass("dx-collection"),this._prepareContent()},_prepareContent:Jo(function(){this._renderContentImpl()}),_renderContent(){this._fireContentReadyAction()},_render(){this.callBase(),this._attachClickEvent(),this._attachHoldEvent(),this._attachContextMenuEvent()},_getPointerEvent:()=>le.down,_attachClickEvent(){let i=this._itemSelector(),e=this._getPointerEvent(),t=D(de,this.NAME),n=D(e,this.NAME),o=new ko(s=>{let{event:r}=s;this._itemPointerDownHandler(r)});_.off(this._itemContainer(),t,i),_.off(this._itemContainer(),n,i),_.on(this._itemContainer(),t,i,s=>this._itemClickHandler(s)),_.on(this._itemContainer(),n,i,s=>{o.execute({element:u(s.target),event:s})})},_itemClickHandler(i,e,t){this._itemDXEventHandler(i,"onItemClick",e,t)},_itemPointerDownHandler(i){this.option("focusStateEnabled")&&(this._itemFocusHandler=function(){if(clearTimeout(this._itemFocusTimeout),this._itemFocusHandler=null,i.isDefaultPrevented())return;let e=u(i.target),t=e.closest(this._itemElements()),n=this._closestFocusable(e);t.length&&this._isFocusTarget(n?.get(0))&&this.option("focusedElement",H(t))}.bind(this),this._itemFocusTimeout=setTimeout(this._forcePointerDownFocus.bind(this)))},_closestFocusable(i){if(i.is(Mc))return i;for(i=i.parent();i.length&&!S.isDocument(i.get(0))&&!S.isDocumentFragment(i.get(0));){if(i.is(Mc))return i;i=i.parent()}},_forcePointerDownFocus(){this._itemFocusHandler&&this._itemFocusHandler()},_updateFocusState(){this.callBase.apply(this,arguments),this._forcePointerDownFocus()},_attachHoldEvent(){let i=this._itemContainer(),e=this._itemSelector(),t=D(yn.name,this.NAME);_.off(i,t,e),_.on(i,t,e,{timeout:this._getHoldTimeout()},this._itemHoldHandler.bind(this))},_getHoldTimeout(){return this.option("itemHoldTimeout")},_shouldFireHoldEvent(){return this.hasActionSubscription("onItemHold")},_itemHoldHandler(i){this._shouldFireHoldEvent()?this._itemDXEventHandler(i,"onItemHold"):i.cancel=!0},_attachContextMenuEvent(){let i=this._itemContainer(),e=this._itemSelector(),t=D(Mp,this.NAME);_.off(i,t,e),_.on(i,t,e,this._itemContextMenuHandler.bind(this))},_shouldFireContextMenuEvent(){return this.hasActionSubscription("onItemContextMenu")},_itemContextMenuHandler(i){this._shouldFireContextMenuEvent()?this._itemDXEventHandler(i,"onItemContextMenu"):i.cancel=!0},_renderContentImpl(){let i=this.option("items")||[];this._renderedItemsCount?this._renderItems(i.slice(this._renderedItemsCount)):this._renderItems(i)},_renderItems(i){i.length&&x(i,(e,t)=>{this._renderItem(this._renderedItemsCount+e,t)}),this._renderEmptyMessage()},_getItemsContainer(){return this._itemContainer()},_setAttributes(i){let e=I({},this.option("_itemAttributes")),{class:t}=e;if(t){let n=i.get(0).className;e.class=[n,t].join(" ")}i.attr(e)},_renderItem(i,e,t,n){let o=i?.item??i;t=t||this._getItemsContainer();let s=this._renderItemFrame(o,e,t,n);this._setElementData(s,e,o),this._setAttributes(s),this._attachItemClickEvent(e,s);let r=this._getItemContent(s),a=this._renderItemContent({index:o,itemData:e,container:H(r),contentClass:this._itemContentClass(),defaultTemplateName:this.option("itemTemplate")}),l=this;return P(a).done(d=>{l._postprocessRenderItem({itemElement:s,itemContent:d,itemData:e,itemIndex:o}),l._executeItemRenderAction(i,e,H(s))}),s},_getItemContent(i){let e=i.find(".dx-item-content-placeholder");return e.removeClass("dx-item-content-placeholder"),e},_attachItemClickEvent(i,e){!i||!i.onClick||_.on(e,de,t=>{this._itemEventHandlerByHandler(e,i.onClick,{event:t})})},_renderItemContent(i){let e=this._getItemTemplateName(i),t=this._getTemplate(e);this._addItemContentClasses(i);let n=u(this._createItemByTemplate(t,i));return n.hasClass("dx-template-wrapper")?this._renderItemContentByNode(i,n):i.container},_renderItemContentByNode(i,e){return u(i.container).replaceWith(e),i.container=H(e),this._addItemContentClasses(i),e},_addItemContentClasses(i){let e=[_g+"-content",i.contentClass];u(i.container).addClass(e.join(" "))},_appendItemToContainer(i,e,t){e.appendTo(i)},_renderItemFrame(i,e,t,n){let o=u("<div>");if(new this.constructor.ItemClass(o,this._itemOptions(),e||{}),n&&n.length?n.replaceWith(o):this._appendItemToContainer.call(this,t,o,i),this.option("useItemTextAsTitle")){let s=this._displayGetter?this._displayGetter(e):e;o.attr("title",s)}return o},_itemOptions(){let i=this;return{watchMethod:()=>i.option("integrationOptions.watchMethod"),owner:i,fieldGetter(e){let t=i.option(`${e}Expr`);return Ce(t)}}},_postprocessRenderItem:E,_executeItemRenderAction(i,e,t){this._getItemRenderAction()({itemElement:t,itemIndex:i,itemData:e})},_setElementData(i,e,t){i.addClass([_g,this._itemClass()].join(" ")).data(this._itemDataKey(),e).data(this._itemIndexKey(),t)},_createItemRenderAction(){return this._itemRenderAction=this._createActionByOption("onItemRendered",{element:this.element(),excludeValidators:["disabled","readOnly"],category:"rendering"})},_getItemRenderAction(){return this._itemRenderAction||this._createItemRenderAction()},_getItemTemplateName(i){let e=i.itemData,t=i.templateProperty||this.option("itemTemplateProperty");return e&&e[t]||i.defaultTemplateName},_createItemByTemplate(i,e){return i.render({model:e.itemData,container:e.container,index:e.index,onRendered:this._onItemTemplateRendered(i,e)})},_onItemTemplateRendered:()=>E,_emptyMessageContainer(){return this._itemContainer()},_renderEmptyMessage(i){i=i||this.option("items");let e=this.option("noDataText"),t=!e||i&&i.length||this._dataController.isLoading();t&&this._$noData&&(this._$noData.remove(),this._$noData=null,this.setAria("label",void 0)),t||(this._$noData=this._$noData||u("<div>").addClass("dx-empty-message"),this._$noData.appendTo(this._emptyMessageContainer()),this.option("encodeNoDataText")?this._$noData.text(e):this._$noData.html(e)),this.$element().toggleClass(cU,!t)},_itemDXEventHandler(i,e,t,n){this._itemEventHandler(i.target,e,m(t,{event:i}),n)},_itemEventHandler(i,e,t,n){let o=this._createActionByOption(e,m({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(i,o,t)},_itemEventHandlerByHandler(i,e,t,n){let o=this._createAction(e,m({validatingTargetName:"itemElement"},n));return this._itemEventHandlerImpl(i,o,t)},_itemEventHandlerImpl(i,e,t){let n=this._closestItemElement(u(i)),o=m({},t);return e(m(t,this._extendActionArgs(n),o))},_extendActionArgs(i){return{itemElement:H(i),itemIndex:this._itemElements().index(i),itemData:this._getItemData(i)}},_closestItemElement(i){return u(i).closest(this._itemSelector())},_getItemData(i){return u(i).data(this._itemDataKey())},_getSummaryItemsSize(i,e,t){let n=0;return e&&x(e,(o,s)=>{i==="width"?n+=ae(s,t||!1):i==="height"&&(n+=ee(s,t||!1))}),n},getFocusedItemId(){return this._focusedItemId||(this._focusedItemId=`dx-${new Ae}`),this._focusedItemId},itemElements(){return this._itemElements()},itemsContainer(){return this._itemContainer()}}).include(fg);bA.ItemClass=mo;var Gv=bA;var{abstract:Rn}=pe,hU=pe.inherit({ctor(i){this._collectionWidget=i},getIndexByItemData:Rn,getItemDataByIndex:Rn,getKeysByItems:Rn,getItemsByKeys:Rn,itemsGetter:Rn,getKeyByIndex(i){let e=this._denormalizeItemIndex(i);return this.getKeysByItems([this.getItemDataByIndex(e)])[0]},_equalKeys(i,e){return this._collectionWidget._isKeySpecified()?Ee(i,e):i===e},beginCache(){this._cache={}},endCache(){this._cache=null},getIndexByKey:Rn,getNormalizedIndex(i){return this._isNormalizedItemIndex(i)?i:this._isItemIndex(i)?this._normalizeItemIndex(i):this._isNode(i)?this._getNormalizedItemIndex(i):this._normalizeItemIndex(this.getIndexByItemData(i))},getIndex(i){return this._isNormalizedItemIndex(i)?this._denormalizeItemIndex(i):this._isItemIndex(i)?i:this._isNode(i)?this._denormalizeItemIndex(this._getNormalizedItemIndex(i)):this.getIndexByItemData(i)},getItemElement(i){if(this._isNormalizedItemIndex(i))return this._getItemByNormalizedIndex(i);if(this._isItemIndex(i))return this._getItemByNormalizedIndex(this._normalizeItemIndex(i));if(this._isNode(i))return u(i);let e=this._normalizeItemIndex(this.getIndexByItemData(i));return this._getItemByNormalizedIndex(e)},_isNode:i=>S.isNode(i&&si(i)?i.get(0):i),deleteItemAtIndex:Rn,itemPlacementFunc(i,e){return this._itemsFromSameParent(i,e)&&i<e?"after":"before"},moveItemAtIndexToIndex:Rn,_isNormalizedItemIndex:i=>typeof i=="number"&&Math.round(i)===i,_isItemIndex:Rn,_getNormalizedItemIndex:Rn,_normalizeItemIndex:Rn,_denormalizeItemIndex:Rn,_getItemByNormalizedIndex:Rn,_itemsFromSameParent:Rn}),yA=hU;var pU=yA.inherit({_getPlainItems(){return this._collectionWidget.option("items")||[]},getIndexByItemData(i){let e=this._collectionWidget.keyOf.bind(this._collectionWidget);return e?this.getIndexByKey(e(i)):this._getPlainItems().indexOf(i)},getItemDataByIndex(i){return this._getPlainItems()[i]},deleteItemAtIndex(i){this._getPlainItems().splice(i,1)},itemsGetter(){return this._getPlainItems()},getKeysByItems(i){let e=this._collectionWidget.keyOf.bind(this._collectionWidget),t=i;if(e){t=[];for(let n=0;n<i.length;n++)t.push(e(i[n]))}return t},getIndexByKey(i){let e=this._cache,t=e&&e.keys||this.getKeysByItems(this._getPlainItems());if(e&&!e.keys&&(e.keys=t),typeof i=="object"){for(let n=0,{length:o}=t;n<o;n++)if(this._equalKeys(i,t[n]))return n}else return t.indexOf(i);return-1},getItemsByKeys:(i,e)=>(e||i).slice(),moveItemAtIndexToIndex(i,e){let t=this._getPlainItems(),n=t[i];t.splice(i,1),t.splice(e,0,n)},_isItemIndex:i=>typeof i=="number"&&Math.round(i)===i,_getNormalizedItemIndex(i){return this._collectionWidget._itemElements().index(i)},_normalizeItemIndex:i=>i,_denormalizeItemIndex:i=>i,_getItemByNormalizedIndex(i){return i>-1?this._collectionWidget._itemElements().eq(i):null},_itemsFromSameParent:()=>!0}),Xl=pU;var No=function(i){return i!==-1},gU=Gv.inherit({_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{selectedItem:!0})},_getDefaultOptions(){return m(this.callBase(),{selectionMode:"none",selectionRequired:!1,selectByClick:!0,selectedItems:[],selectedItemKeys:[],maxFilterLengthInRequest:1500,keyExpr:null,selectedIndex:-1,selectedItem:null,onSelectionChanged:null,onItemReordered:null,onItemDeleting:null,onItemDeleted:null})},ctor(i,e){this._userOptions=e||{},this.callBase(i,e)},_init(){this._initEditStrategy(),this.callBase(),this._initKeyGetter(),this._initSelectionModule()},_initKeyGetter(){this._keyGetter=Ce(this.option("keyExpr"))},_getKeysByItems(i){return this._editStrategy.getKeysByItems(i)},_getItemsByKeys(i,e){return this._editStrategy.getItemsByKeys(i,e)},_getKeyByIndex(i){return this._editStrategy.getKeyByIndex(i)},_getIndexByKey(i){return this._editStrategy.getIndexByKey(i)},_getIndexByItemData(i){return this._editStrategy.getIndexByItemData(i)},_isKeySpecified(){return!!this._dataController.key()},_getCombinedFilter(){return this._dataController.filter()},key(){return this.option("keyExpr")?this.option("keyExpr"):this._dataController.key()},keyOf(i){let e=i;return this.option("keyExpr")?e=this._keyGetter(i):this._dataController.store()&&(e=this._dataController.keyOf(i)),e},_nullValueSelectionSupported:()=>!1,_initSelectionModule(){let i=this,{itemsGetter:e}=i._editStrategy;this._selection=new Yl({allowNullValue:this._nullValueSelectionSupported(),mode:this.option("selectionMode"),maxFilterLengthInRequest:this.option("maxFilterLengthInRequest"),equalByReference:!this._isKeySpecified(),onSelectionChanged(t){(t.addedItemKeys.length||t.removedItemKeys.length)&&(i.option("selectedItems",i._getItemsByKeys(t.selectedItemKeys,t.selectedItems)),i._updateSelectedItems(t))},filter:i._getCombinedFilter.bind(i),totalCount(){let t=i.option("items"),n=i._dataController.totalCount();return n>=0?n:i._getItemsCount(t)},key:i.key.bind(i),keyOf:i.keyOf.bind(i),load(t){var n;let o=i._dataController;return t.customQueryParams=(n=o.loadOptions())===null||n===void 0?void 0:n.customQueryParams,t.userData=o.userData(),o.store()?o.loadFromStore(t).done(s=>{if(i._disposed)return;let r=dg(s).data;o.applyMapFunction(r)}):y().resolve(this.plainItems())},dataFields:()=>i._dataController.select(),plainItems:e.bind(i._editStrategy)})},_getItemsCount(i){return i.reduce((e,t)=>e+(t.items?this._getItemsCount(t.items):1),0)},_initEditStrategy(){let i=Xl;this._editStrategy=new i(this)},_getSelectedItemIndices(i){let e=this,t=[];return i=i||this._selection.getSelectedItemKeys(),e._editStrategy.beginCache(),x(i,(n,o)=>{let s=e._getIndexByKey(o);No(s)&&t.push(s)}),e._editStrategy.endCache(),t},_initMarkup(){this._rendering=!0,this._dataController.isLoading()||this._syncSelectionOptions().done(()=>this._normalizeSelectedItems()),this.callBase()},_render(){this.callBase(),this._rendering=!1},_fireContentReadyAction(){this._rendering=!1,this._rendered=!0,this.callBase.apply(this,arguments)},_syncSelectionOptions(i){i=i||this._chooseSelectOption();let e,t,n,o;switch(i){case"selectedIndex":e=this._editStrategy.getItemDataByIndex(this.option("selectedIndex")),f(e)?(this._setOptionWithoutOptionChange("selectedItems",[e]),this._setOptionWithoutOptionChange("selectedItem",e),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([e]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedItem",null));break;case"selectedItems":if(o=this.option("selectedItems")||[],t=o.length?this._editStrategy.getIndexByItemData(o[0]):-1,this.option("selectionRequired")&&!No(t))return this._syncSelectionOptions("selectedIndex");this._setOptionWithoutOptionChange("selectedItem",o[0]),this._setOptionWithoutOptionChange("selectedIndex",t),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems(o));break;case"selectedItem":if(e=this.option("selectedItem"),t=this._editStrategy.getIndexByItemData(e),this.option("selectionRequired")&&!No(t))return this._syncSelectionOptions("selectedIndex");f(e)?(this._setOptionWithoutOptionChange("selectedItems",[e]),this._setOptionWithoutOptionChange("selectedIndex",t),this._setOptionWithoutOptionChange("selectedItemKeys",this._editStrategy.getKeysByItems([e]))):(this._setOptionWithoutOptionChange("selectedItems",[]),this._setOptionWithoutOptionChange("selectedItemKeys",[]),this._setOptionWithoutOptionChange("selectedIndex",-1));break;case"selectedItemKeys":if(n=this.option("selectedItemKeys"),this.option("selectionRequired")){let s=this._getIndexByKey(n[0]);if(!No(s))return this._syncSelectionOptions("selectedIndex")}return this._selection.setSelection(n)}return y().resolve().promise()},_chooseSelectOption(){let i="selectedIndex",e=function(t){let n=this.option(t);return f(n)&&n.length||t in this._userOptions}.bind(this);return e("selectedItems")?i="selectedItems":e("selectedItem")?i="selectedItem":e("selectedItemKeys")&&(i="selectedItemKeys"),i},_compareKeys(i,e){if(i.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(i[t]!==e[t])return!1;return!0},_normalizeSelectedItems(){if(this.option("selectionMode")==="none")this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems");else if(this.option("selectionMode")==="single"){let i=this.option("selectedItems");if(i.length>1||!i.length&&this.option("selectionRequired")&&this.option("items")&&this.option("items").length){let e=this._selection.getSelectedItems(),t=i[0]===void 0?e[0]:i[0];return t===void 0&&(t=this._editStrategy.itemsGetter()[0]),this.option("grouped")&&t&&t.items&&(t.items=[t.items[0]]),this._selection.setSelection(this._getKeysByItems([t])),this._setOptionWithoutOptionChange("selectedItems",[t]),this._syncSelectionOptions("selectedItems")}this._selection.setSelection(this._getKeysByItems(i))}else{let i=this._getKeysByItems(this.option("selectedItems")),e=this._selection.getSelectedItemKeys();this._compareKeys(e,i)||this._selection.setSelection(i)}return y().resolve().promise()},_itemClickHandler(i){let e=y().resolve(),{callBase:t}=this;this._createAction(n=>{e=this._itemSelectHandler(n.event)??e},{validatingTargetName:"itemElement"})({itemElement:u(i.currentTarget),event:i}),e.always(()=>{t.apply(this,arguments)})},_itemSelectHandler(i){var e;let t;if(!this.option("selectByClick"))return;let n=i.currentTarget;return this.isItemSelected(n)?this.unselectItem(i.currentTarget):t=this.selectItem(i.currentTarget),(e=t)===null||e===void 0?void 0:e.promise()},_selectedItemElement(i){return this._itemElements().eq(i)},_postprocessRenderItem(i){if(this.option("selectionMode")!=="none"){let e=u(i.itemElement),t=this._editStrategy.getNormalizedIndex(e),n=this._isItemSelected(t);this._processSelectableItem(e,n)}},_processSelectableItem(i,e){i.toggleClass(this._selectedItemClass(),e),this._setAriaSelectionAttribute(i,String(e))},_updateSelectedItems(i){let e=this,{addedItemKeys:t}=i,{removedItemKeys:n}=i;if(e._rendered&&(t.length||n.length)){let o=e._selectionChangePromise;if(!e._rendering){let s=[],r,a=[];e._editStrategy.beginCache();for(let l=0;l<t.length;l++)r=e._getIndexByKey(t[l]),s.push(r),e._addSelection(r);for(let l=0;l<n.length;l++)r=e._getIndexByKey(n[l]),a.push(r),e._removeSelection(r);e._editStrategy.endCache(),e._updateSelection(s,a)}P(o).done(()=>{e._fireSelectionChangeEvent(i.addedItems,i.removedItems)})}},_fireSelectionChangeEvent(i,e){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:i,removedItems:e})},_updateSelection:E,_setAriaSelectionAttribute(i,e){this.setAria("selected",e,i)},_removeSelection(i){let e=this._editStrategy.getItemElement(i);No(i)&&(this._processSelectableItem(e,!1),_.triggerHandler(e,"stateChanged",!1))},_addSelection(i){let e=this._editStrategy.getItemElement(i);No(i)&&(this._processSelectableItem(e,!0),_.triggerHandler(e,"stateChanged",!0))},_isItemSelected(i){let e=this._getKeyByIndex(i);return this._selection.isItemSelected(e,{checkPending:!0})},_optionChanged(i){switch(i.name){case"selectionMode":this._invalidate();break;case"dataSource":(!i.value||Array.isArray(i.value)&&!i.value.length)&&this.option("selectedItemKeys",[]),this.callBase(i);break;case"selectedIndex":case"selectedItem":case"selectedItems":case"selectedItemKeys":this._syncSelectionOptions(i.name).done(()=>this._normalizeSelectedItems());break;case"keyExpr":this._initKeyGetter();break;case"selectionRequired":this._normalizeSelectedItems();break;case"selectByClick":case"onSelectionChanged":case"onItemDeleting":case"onItemDeleted":case"onItemReordered":case"maxFilterLengthInRequest":break;default:this.callBase(i)}},_clearSelectedItems(){this._setOptionWithoutOptionChange("selectedItems",[]),this._syncSelectionOptions("selectedItems")},_waitDeletingPrepare(i){if(i.data("dxItemDeleting"))return y().resolve().promise();i.data("dxItemDeleting",!0);let e=y(),t={cancel:!1},n=this._itemEventHandler(i,"onItemDeleting",t,{excludeValidators:["disabled","readOnly"]});return P(n).always(function(o){let s=!n,r=!s&&n.state()==="resolved",a=!!arguments.length,l=s||r&&!a||r&&o;P(Et(t.cancel)).always(()=>{i.data("dxItemDeleting",!1)}).done(d=>{l&&!d?e.resolve():e.reject()}).fail(e.reject)}),e.promise()},_deleteItemFromDS(i){let e=this._dataController,t=y(),n=this.option("disabled"),o=e.store();if(!o)return y().resolve().promise();if(!o.remove)throw ie.Error("E1011");return this.option("disabled",!0),o.remove(e.keyOf(this._getItemData(i))).done(s=>{s!==void 0?t.resolve():t.reject()}).fail(()=>{t.reject()}),t.always(()=>{this.option("disabled",n)}),t},_tryRefreshLastPage(){let i=y();return this._isLastPage()||this.option("grouped")?i.resolve():this._refreshLastPage().done(()=>{i.resolve()}),i.promise()},_refreshLastPage(){return this._expectLastItemLoading(),this._dataController.load()},_updateSelectionAfterDelete(i){let e=this._getKeyByIndex(i);this._selection.deselect([e])},_updateIndicesAfterIndex(i){let e=this._itemElements();for(let t=i+1;t<e.length;t++)u(e[t]).data(this._itemIndexKey(),t-1)},_simulateOptionChange(i){let e=this.option(i);e instanceof gi||this._optionChangedAction({name:i,fullName:i,value:e})},isItemSelected(i){return this._isItemSelected(this._editStrategy.getNormalizedIndex(i))},selectItem(i){if(this.option("selectionMode")==="none")return;let e=this._editStrategy.getNormalizedIndex(i);if(!No(e))return;let t=this._getKeyByIndex(e);if(this._selection.isItemSelected(t))return;if(this.option("selectionMode")==="single")return this._selection.setSelection([t]);let n=this.option("selectedItemKeys")||[];return this._selection.setSelection([...n,t],[t])},unselectItem(i){let e=this._editStrategy.getNormalizedIndex(i);if(!No(e))return;let t=this._selection.getSelectedItemKeys();if(this.option("selectionRequired")&&t.length<=1)return;let n=this._getKeyByIndex(e);this._selection.isItemSelected(n,{checkPending:!0})&&this._selection.deselect([n])},_deleteItemElementByIndex(i){this._updateSelectionAfterDelete(i),this._updateIndicesAfterIndex(i),this._editStrategy.deleteItemAtIndex(i)},_afterItemElementDeleted(i,e){let t=this._dataController.getDataSource()?"dataSource":"items";this._simulateOptionChange(t),this._itemEventHandler(i,"onItemDeleted",e,{beforeExecute(){i.remove()},excludeValidators:["disabled","readOnly"]}),this._renderEmptyMessage()},deleteItem(i){let e=this,t=y(),n=this._editStrategy.getItemElement(i),o=this._editStrategy.getNormalizedIndex(i),s=this._itemResponseWaitClass();return No(o)?this._waitDeletingPrepare(n).done(()=>{n.addClass(s);let r=e._extendActionArgs(n);e._deleteItemFromDS(n).done(()=>{e._deleteItemElementByIndex(o),e._afterItemElementDeleted(n,r),e._tryRefreshLastPage().done(()=>{t.resolveWith(e)})}).fail(()=>{n.removeClass(s),t.rejectWith(e)})}).fail(()=>{t.rejectWith(e)}):t.rejectWith(e),t.promise()},reorderItem(i,e){let t=y(),n=this,o=this._editStrategy,s=o.getItemElement(i),r=o.getItemElement(e),a=o.getNormalizedIndex(i),l=o.getNormalizedIndex(e),d=this._dataController.getDataSource()?"dataSource":"items";return No(a)&&No(l)&&a!==l?t.resolveWith(this):t.rejectWith(this),t.promise().done(function(){r[o.itemPlacementFunc(a,l)](s),o.moveItemAtIndexToIndex(a,l),this._updateIndicesAfterIndex(a),n.option("selectedItems",n._getItemsByKeys(n._selection.getSelectedItemKeys(),n._selection.getSelectedItems())),d==="items"&&n._simulateOptionChange(d),n._itemEventHandler(s,"onItemReordered",{fromIndex:o.getIndex(a),toIndex:o.getIndex(l)},{excludeValidators:["disabled","readOnly"]})})}}),Ql=gU;var jn=Ql;var OA=q(),mU={observe:E,unobserve:E,disconnect:E},jv=class{constructor(){if(!j()||!OA.ResizeObserver)return mU;this._callbacksMap=new Map,this._observer=new OA.ResizeObserver(e=>{e.forEach(t=>{var n;(n=this._callbacksMap.get(t.target))===null||n===void 0||n(t)})})}observe(e,t){this._callbacksMap.set(e,t),this._observer.observe(e)}unobserve(e){this._callbacksMap.delete(e),this._observer.unobserve(e)}disconnect(){this._callbacksMap.clear(),this._observer.disconnect()}},fU=new jv,ps=fU;var _U=10;function CU(i){return Fo(i)*Math.round(Math.abs(i))}function xU(i,e){let t=Math.pow(_U,e),n=Rp(i,e);return CU(n)/t}function Cg(i,e){let t=e||0;return(t>0?xU(...arguments):i).toFixed(t)}var vU={thousandsSeparator:",",decimalSeparator:"."},EA="'";function bU(i){return i.split(",").slice(1).map(function(e){let t=0;return e.split("").filter(function(n,o){t+=n==="'";let s=n==="#"||n==="0",r=t%2;return s&&!r}).length})}function yU(i){let e=i.split(";");return e.length===1&&e.push("-"+e[0]),e}function Kv(i){return i.toString().split("").reverse().join("")}function OU(i){return i.indexOf("%")!==-1&&!i.match(/'[^']*%[^']*'/g)}function MA(i){return i.replace(/'.+'/g,"")}function wA(i){if(!i)return 0;let e=MA(i);return e.length-e.replace(/[#]/g,"").length}function SA(i){if(!i)return 0;let e=MA(i);return e.length-e.replace(/[0]/g,"").length}function IA(i,e,t){if(!i)return"";for(i.length>t&&(i=i.substr(0,t));i.length>e&&i.slice(-1)==="0";)i=i.substr(0,i.length-1);for(;i.length<e;)i+="0";return i}function EU(i,e,t){if(!e.length)return i;let n=[],o=0;for(;i;){let s=e[o];if(!s)break;n.push(i.slice(0,s)),i=i.slice(s),o<e.length-1&&o++}return n.join(t)}function DA(i,e){return i.split(EA).map(function(t,n){let o=n%2;return!t&&o?EA:o?t:t.replace(/[,#0]+/,e)}).join("")}function wU(i){let e=!1;for(let t=0;t<i.length;t++)if(i[t]==="'"&&(e=!e),i[t]==="."&&!e)return t;return i.length}function RA(i,e){return e=e||vU,function(t){if(typeof t!="number"||isNaN(t))return"";let n=yU(i),o=1/t===1/0,s=t>0||o,r=n[s?0:1],a=wU(r),l=[r.substr(0,a),r.substr(a+1)],d=SA(l[1]),c=d+wA(l[1]);OU(r)&&(t=Rp(t,2)),s||(t=-t);let h=SA(l[0]),p=wA(l[0])||e.unlimitedIntegerDigits?void 0:h,g=Math.floor(t).toString().length,C=It(c,0,15-g),v=bU(l[0]).reverse(),b=Cg(t,C<0?0:C).split("."),T=IA(Kv(b[0]),h,p),M=IA(b[1],d,c);T=EU(T,v,e.thousandsSeparator);let G=Kv(DA(Kv(l[0]),T)),te=c?DA(l[1],M):"";return G+(te.match(/\d/)?e.decimalSeparator:"")+te}}function Yc(i,e,t){let n=(e?.01:1)*parseFloat(i)||0;return t?-n:n}function TA(i,e,t,n){let o=i,s,r,a;do a&&(s=r.length===a.length?"0":"1",i=n?s+i:i+s),r=a||e(Yc(o,t)),o=n?"1"+o:o+"1",a=e(Yc(o,t));while(r!==a&&(n?r.length===a.length:r.length<=a.length));if(n&&a.length>r.length){let l=e(12345).indexOf("12345")===-1;do i="1"+i;while(l&&Yc(i,t)<1e5)}return i}function AA(i,e,t,n){let o=e(Yc(i,t,n)),s=i.split("."),r=s[0]+".3"+s[1].slice(1),a=Yc(r,t,n),l=e(a).indexOf("3")-1;return o=o.replace(/(\d)\D(\d)/g,"$1,$2"),l>=0&&(o=o.slice(0,l)+"."+o.slice(l+1)),o=o.replace(/1+/,"1").replace(/1/g,"#"),t||(o=o.replace(/%/g,"'%'")),o}function FA(i){let e=".",t=i(1).indexOf("100")>=0;e=TA(e,i,t,!0),e=TA(e,i,t,!1);let n=AA(e,i,t,!1),o=AA(e,i,t,!0);return o==="-"+n?n:n+";"+o}var PA={_formatNumberCore:function(i,e,t){if(e==="currency"){t.precision=t.precision||0;let n=this.format(i,m({},t,{type:"fixedpoint"})),o=this.getCurrencySymbol().symbol.replace(/\$/g,"$$$$");return n=n.replace(/^(\D*)(\d.*)/,"$1"+o+"$2"),n}return this.callBase.apply(this,arguments)},getCurrencySymbol:function(){return{symbol:"$"}},getOpenXmlCurrencyFormat:function(){return"$#,##0{0}_);\\($#,##0{0}\\)"}};var kA=(i,e)=>{if(!e)return;let t=i;if(typeof i=="string"){t="";for(let s=0;s<i.length;s++)i[s]!=="$"&&(t+="\\"),t+=i[s]}let n={".00":"{0}","'":"\\'","\\(":"\\(","\\)":"\\)"," ":"\\ ",'"':"&quot;","\\\xA4":t},o=e.split(";");for(let s=0;s<o.length;s++)for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[s]=o[s].replace(new RegExp(r,"g"),n[r]));return o.length===2?o[0]+"_);"+o[1]:o[0]};var BA={af:"\xA4#,##0.00;(\xA4#,##0.00)","af-NA":"\xA4#,##0.00;(\xA4#,##0.00)",agq:"#,##0.00\xA4",ak:"\xA4#,##0.00",am:"\xA4#,##0.00;(\xA4#,##0.00)",ar:"\xA4#,##0.00;(\xA4#,##0.00)","ar-AE":"\xA4#,##0.00;(\xA4#,##0.00)","ar-BH":"\xA4#,##0.00;(\xA4#,##0.00)","ar-DJ":"\xA4#,##0.00;(\xA4#,##0.00)","ar-DZ":"\xA4#,##0.00;(\xA4#,##0.00)","ar-EG":"\xA4#,##0.00;(\xA4#,##0.00)","ar-EH":"\xA4#,##0.00;(\xA4#,##0.00)","ar-ER":"\xA4#,##0.00;(\xA4#,##0.00)","ar-IL":"\xA4#,##0.00;(\xA4#,##0.00)","ar-IQ":"\xA4#,##0.00;(\xA4#,##0.00)","ar-JO":"\xA4#,##0.00;(\xA4#,##0.00)","ar-KM":"\xA4#,##0.00;(\xA4#,##0.00)","ar-KW":"\xA4#,##0.00;(\xA4#,##0.00)","ar-LB":"\xA4#,##0.00;(\xA4#,##0.00)","ar-LY":"\xA4#,##0.00;(\xA4#,##0.00)","ar-MA":"\xA4#,##0.00;(\xA4#,##0.00)","ar-MR":"\xA4#,##0.00;(\xA4#,##0.00)","ar-OM":"\xA4#,##0.00;(\xA4#,##0.00)","ar-PS":"\xA4#,##0.00;(\xA4#,##0.00)","ar-QA":"\xA4#,##0.00;(\xA4#,##0.00)","ar-SA":"\xA4#,##0.00;(\xA4#,##0.00)","ar-SD":"\xA4#,##0.00;(\xA4#,##0.00)","ar-SO":"\xA4#,##0.00;(\xA4#,##0.00)","ar-SS":"\xA4#,##0.00;(\xA4#,##0.00)","ar-SY":"\xA4#,##0.00;(\xA4#,##0.00)","ar-TD":"\xA4#,##0.00;(\xA4#,##0.00)","ar-TN":"\xA4#,##0.00;(\xA4#,##0.00)","ar-YE":"\xA4#,##0.00;(\xA4#,##0.00)",as:"\xA4\xA0#,##,##0.00",asa:"#,##0.00\xA0\xA4",ast:"#,##0.00\xA0\xA4",az:"#,##0.00\xA0\xA4","az-Cyrl":"#,##0.00\xA0\xA4","az-Latn":"#,##0.00\xA0\xA4",bas:"#,##0.00\xA0\xA4",be:"#,##0.00\xA0\xA4","be-tarask":"#,##0.00\xA0\xA4",bem:"\xA4#,##0.00;(\xA4#,##0.00)",bez:"#,##0.00\xA4",bg:"0.00\xA0\xA4;(0.00\xA0\xA4)",bm:"\xA4#,##0.00;(\xA4#,##0.00)",bn:"#,##,##0.00\xA4;(#,##,##0.00\xA4)","bn-IN":"#,##,##0.00\xA4;(#,##,##0.00\xA4)",bo:"\xA4\xA0#,##0.00","bo-IN":"\xA4\xA0#,##0.00",br:"#,##0.00\xA0\xA4",brx:"\xA4\xA0#,##,##0.00",bs:"#,##0.00\xA0\xA4","bs-Cyrl":"#,##0.00\xA0\xA4","bs-Latn":"#,##0.00\xA0\xA4",ca:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","ca-AD":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","ca-ES-valencia":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","ca-FR":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","ca-IT":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",ccp:"#,##,##0.00\xA4;(#,##,##0.00\xA4)","ccp-IN":"#,##,##0.00\xA4;(#,##,##0.00\xA4)",ce:"#,##0.00\xA0\xA4",ceb:"\xA4#,##0.00;(\xA4#,##0.00)",cgg:"\xA4#,##0.00",chr:"\xA4#,##0.00;(\xA4#,##0.00)",ckb:"\xA4\xA0#,##0.00","ckb-IR":"\xA4\xA0#,##0.00",cs:"#,##0.00\xA0\xA4",cy:"\xA4#,##0.00;(\xA4#,##0.00)",da:"#,##0.00\xA0\xA4","da-GL":"#,##0.00\xA0\xA4",dav:"\xA4#,##0.00;(\xA4#,##0.00)",de:"#,##0.00\xA0\xA4","de-AT":"#,##0.00\xA0\xA4","de-BE":"#,##0.00\xA0\xA4","de-CH":"#,##0.00\xA0\xA4","de-IT":"#,##0.00\xA0\xA4","de-LI":"#,##0.00\xA0\xA4","de-LU":"#,##0.00\xA0\xA4",dje:"#,##0.00\xA4",doi:"\xA4#,##0.00",dsb:"#,##0.00\xA0\xA4",dua:"#,##0.00\xA0\xA4",dyo:"#,##0.00\xA0\xA4",dz:"\xA4#,##,##0.00",ebu:"\xA4#,##0.00;(\xA4#,##0.00)",ee:"\xA4#,##0.00;(\xA4#,##0.00)","ee-TG":"\xA4#,##0.00;(\xA4#,##0.00)",el:"#,##0.00\xA0\xA4","el-CY":"#,##0.00\xA0\xA4",en:"\xA4#,##0.00;(\xA4#,##0.00)","en-001":"\xA4#,##0.00;(\xA4#,##0.00)","en-150":"#,##0.00\xA0\xA4","en-AE":"\xA4#,##0.00;(\xA4#,##0.00)","en-AG":"\xA4#,##0.00;(\xA4#,##0.00)","en-AI":"\xA4#,##0.00;(\xA4#,##0.00)","en-AS":"\xA4#,##0.00;(\xA4#,##0.00)","en-AT":"\xA4\xA0#,##0.00","en-AU":"\xA4#,##0.00;(\xA4#,##0.00)","en-BB":"\xA4#,##0.00;(\xA4#,##0.00)","en-BE":"#,##0.00\xA0\xA4","en-BI":"\xA4#,##0.00;(\xA4#,##0.00)","en-BM":"\xA4#,##0.00;(\xA4#,##0.00)","en-BS":"\xA4#,##0.00;(\xA4#,##0.00)","en-BW":"\xA4#,##0.00;(\xA4#,##0.00)","en-BZ":"\xA4#,##0.00;(\xA4#,##0.00)","en-CA":"\xA4#,##0.00;(\xA4#,##0.00)","en-CC":"\xA4#,##0.00;(\xA4#,##0.00)","en-CH":"\xA4\xA0#,##0.00;\xA4-#,##0.00","en-CK":"\xA4#,##0.00;(\xA4#,##0.00)","en-CM":"\xA4#,##0.00;(\xA4#,##0.00)","en-CX":"\xA4#,##0.00;(\xA4#,##0.00)","en-CY":"\xA4#,##0.00;(\xA4#,##0.00)","en-DE":"#,##0.00\xA0\xA4","en-DG":"\xA4#,##0.00;(\xA4#,##0.00)","en-DK":"#,##0.00\xA0\xA4","en-DM":"\xA4#,##0.00;(\xA4#,##0.00)","en-ER":"\xA4#,##0.00;(\xA4#,##0.00)","en-FI":"#,##0.00\xA0\xA4","en-FJ":"\xA4#,##0.00;(\xA4#,##0.00)","en-FK":"\xA4#,##0.00;(\xA4#,##0.00)","en-FM":"\xA4#,##0.00;(\xA4#,##0.00)","en-GB":"\xA4#,##0.00;(\xA4#,##0.00)","en-GD":"\xA4#,##0.00;(\xA4#,##0.00)","en-GG":"\xA4#,##0.00;(\xA4#,##0.00)","en-GH":"\xA4#,##0.00;(\xA4#,##0.00)","en-GI":"\xA4#,##0.00;(\xA4#,##0.00)","en-GM":"\xA4#,##0.00;(\xA4#,##0.00)","en-GU":"\xA4#,##0.00;(\xA4#,##0.00)","en-GY":"\xA4#,##0.00;(\xA4#,##0.00)","en-HK":"\xA4#,##0.00;(\xA4#,##0.00)","en-IE":"\xA4#,##0.00;(\xA4#,##0.00)","en-IL":"\xA4#,##0.00;(\xA4#,##0.00)","en-IM":"\xA4#,##0.00;(\xA4#,##0.00)","en-IN":"\xA4#,##0.00;(\xA4#,##0.00)","en-IO":"\xA4#,##0.00;(\xA4#,##0.00)","en-JE":"\xA4#,##0.00;(\xA4#,##0.00)","en-JM":"\xA4#,##0.00;(\xA4#,##0.00)","en-KE":"\xA4#,##0.00;(\xA4#,##0.00)","en-KI":"\xA4#,##0.00;(\xA4#,##0.00)","en-KN":"\xA4#,##0.00;(\xA4#,##0.00)","en-KY":"\xA4#,##0.00;(\xA4#,##0.00)","en-LC":"\xA4#,##0.00;(\xA4#,##0.00)","en-LR":"\xA4#,##0.00;(\xA4#,##0.00)","en-LS":"\xA4#,##0.00;(\xA4#,##0.00)","en-MG":"\xA4#,##0.00;(\xA4#,##0.00)","en-MH":"\xA4#,##0.00;(\xA4#,##0.00)","en-MO":"\xA4#,##0.00;(\xA4#,##0.00)","en-MP":"\xA4#,##0.00;(\xA4#,##0.00)","en-MS":"\xA4#,##0.00;(\xA4#,##0.00)","en-MT":"\xA4#,##0.00;(\xA4#,##0.00)","en-MU":"\xA4#,##0.00;(\xA4#,##0.00)","en-MV":"\xA4\xA0#,##0.00","en-MW":"\xA4#,##0.00;(\xA4#,##0.00)","en-MY":"\xA4#,##0.00;(\xA4#,##0.00)","en-NA":"\xA4#,##0.00;(\xA4#,##0.00)","en-NF":"\xA4#,##0.00;(\xA4#,##0.00)","en-NG":"\xA4#,##0.00;(\xA4#,##0.00)","en-NL":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","en-NR":"\xA4#,##0.00;(\xA4#,##0.00)","en-NU":"\xA4#,##0.00;(\xA4#,##0.00)","en-NZ":"\xA4#,##0.00;(\xA4#,##0.00)","en-PG":"\xA4#,##0.00;(\xA4#,##0.00)","en-PH":"\xA4#,##0.00;(\xA4#,##0.00)","en-PK":"\xA4#,##0.00;(\xA4#,##0.00)","en-PN":"\xA4#,##0.00;(\xA4#,##0.00)","en-PR":"\xA4#,##0.00;(\xA4#,##0.00)","en-PW":"\xA4#,##0.00;(\xA4#,##0.00)","en-RW":"\xA4#,##0.00;(\xA4#,##0.00)","en-SB":"\xA4#,##0.00;(\xA4#,##0.00)","en-SC":"\xA4#,##0.00;(\xA4#,##0.00)","en-SD":"\xA4#,##0.00;(\xA4#,##0.00)","en-SE":"#,##0.00\xA0\xA4","en-SG":"\xA4#,##0.00;(\xA4#,##0.00)","en-SH":"\xA4#,##0.00;(\xA4#,##0.00)","en-SI":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","en-SL":"\xA4#,##0.00;(\xA4#,##0.00)","en-SS":"\xA4#,##0.00;(\xA4#,##0.00)","en-SX":"\xA4#,##0.00;(\xA4#,##0.00)","en-SZ":"\xA4#,##0.00;(\xA4#,##0.00)","en-TC":"\xA4#,##0.00;(\xA4#,##0.00)","en-TK":"\xA4#,##0.00;(\xA4#,##0.00)","en-TO":"\xA4#,##0.00;(\xA4#,##0.00)","en-TT":"\xA4#,##0.00;(\xA4#,##0.00)","en-TV":"\xA4#,##0.00;(\xA4#,##0.00)","en-TZ":"\xA4#,##0.00;(\xA4#,##0.00)","en-UG":"\xA4#,##0.00;(\xA4#,##0.00)","en-UM":"\xA4#,##0.00;(\xA4#,##0.00)","en-VC":"\xA4#,##0.00;(\xA4#,##0.00)","en-VG":"\xA4#,##0.00;(\xA4#,##0.00)","en-VI":"\xA4#,##0.00;(\xA4#,##0.00)","en-VU":"\xA4#,##0.00;(\xA4#,##0.00)","en-WS":"\xA4#,##0.00;(\xA4#,##0.00)","en-ZA":"\xA4#,##0.00;(\xA4#,##0.00)","en-ZM":"\xA4#,##0.00;(\xA4#,##0.00)","en-ZW":"\xA4#,##0.00;(\xA4#,##0.00)",eo:"\xA4\xA0#,##0.00",es:"#,##0.00\xA0\xA4","es-419":"\xA4#,##0.00","es-AR":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","es-BO":"\xA4#,##0.00","es-BR":"\xA4#,##0.00","es-BZ":"\xA4#,##0.00","es-CL":"\xA4#,##0.00","es-CO":"\xA4#,##0.00","es-CR":"\xA4#,##0.00","es-CU":"\xA4#,##0.00","es-DO":"\xA4#,##0.00;(\xA4#,##0.00)","es-EA":"#,##0.00\xA0\xA4","es-EC":"\xA4#,##0.00","es-GQ":"#,##0.00\xA0\xA4","es-GT":"\xA4#,##0.00","es-HN":"\xA4#,##0.00","es-IC":"#,##0.00\xA0\xA4","es-MX":"\xA4#,##0.00","es-NI":"\xA4#,##0.00","es-PA":"\xA4#,##0.00","es-PE":"\xA4#,##0.00","es-PH":"#,##0.00\xA0\xA4","es-PR":"\xA4#,##0.00","es-PY":"\xA4#,##0.00","es-SV":"\xA4#,##0.00","es-US":"\xA4#,##0.00","es-UY":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","es-VE":"\xA4#,##0.00",et:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",eu:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",ewo:"#,##0.00\xA0\xA4",fa:"\u200E\xA4\xA0#,##0.00;\u200E(\xA4\xA0#,##0.00)","fa-AF":"\xA4\xA0#,##0.00;\u200E(\xA4\xA0#,##0.00)",ff:"#,##0.00\xA0\xA4","ff-Adlm":"\xA4\xA0#,##0.00","ff-Adlm-BF":"\xA4\xA0#,##0.00","ff-Adlm-CM":"\xA4\xA0#,##0.00","ff-Adlm-GH":"\xA4\xA0#,##0.00","ff-Adlm-GM":"\xA4\xA0#,##0.00","ff-Adlm-GW":"\xA4\xA0#,##0.00","ff-Adlm-LR":"\xA4\xA0#,##0.00","ff-Adlm-MR":"\xA4\xA0#,##0.00","ff-Adlm-NE":"\xA4\xA0#,##0.00","ff-Adlm-NG":"\xA4\xA0#,##0.00","ff-Adlm-SL":"\xA4\xA0#,##0.00","ff-Adlm-SN":"\xA4\xA0#,##0.00","ff-Latn":"#,##0.00\xA0\xA4","ff-Latn-BF":"#,##0.00\xA0\xA4","ff-Latn-CM":"#,##0.00\xA0\xA4","ff-Latn-GH":"#,##0.00\xA0\xA4","ff-Latn-GM":"#,##0.00\xA0\xA4","ff-Latn-GN":"#,##0.00\xA0\xA4","ff-Latn-GW":"#,##0.00\xA0\xA4","ff-Latn-LR":"#,##0.00\xA0\xA4","ff-Latn-MR":"#,##0.00\xA0\xA4","ff-Latn-NE":"#,##0.00\xA0\xA4","ff-Latn-NG":"#,##0.00\xA0\xA4","ff-Latn-SL":"#,##0.00\xA0\xA4",fi:"#,##0.00\xA0\xA4",fil:"\xA4#,##0.00;(\xA4#,##0.00)",fo:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fo-DK":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",fr:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-BE":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-BF":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-BI":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-BJ":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-BL":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-CA":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-CD":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-CF":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-CG":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-CH":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-CI":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-CM":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-DJ":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-DZ":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-GA":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-GF":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-GN":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-GP":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-GQ":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-HT":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-KM":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-LU":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-MA":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-MC":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-MF":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-MG":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-ML":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-MQ":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-MR":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-MU":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-NC":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-NE":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-PF":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-PM":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-RE":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-RW":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-SC":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-SN":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-SY":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-TD":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-TG":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-TN":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-VU":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-WF":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","fr-YT":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",fur:"\xA4\xA0#,##0.00",fy:"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)",ga:"\xA4#,##0.00;(\xA4#,##0.00)","ga-GB":"\xA4#,##0.00;(\xA4#,##0.00)",gd:"\xA4#,##0.00;(\xA4#,##0.00)",gl:"#,##0.00\xA0\xA4",gsw:"#,##0.00\xA0\xA4","gsw-FR":"#,##0.00\xA0\xA4","gsw-LI":"#,##0.00\xA0\xA4",gu:"\xA4#,##,##0.00;(\xA4#,##,##0.00)",guz:"\xA4#,##0.00;(\xA4#,##0.00)",gv:"\xA4#,##0.00",ha:"\xA4\xA0#,##0.00","ha-GH":"\xA4\xA0#,##0.00","ha-NE":"\xA4\xA0#,##0.00",haw:"\xA4#,##0.00;(\xA4#,##0.00)",he:"#,##0.00\xA0\xA4",hi:"\xA4#,##,##0.00","hi-Latn":"\xA4#,##,##0.00",hr:"#,##0.00\xA0\xA4","hr-BA":"#,##0.00\xA0\xA4",hsb:"#,##0.00\xA0\xA4",hu:"#,##0.00\xA0\xA4",hy:"#,##0.00\xA0\xA4",ia:"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)",id:"\xA4#,##0.00",ig:"\xA4#,##0.00;(\xA4#,##0.00)",ii:"\xA4\xA0#,##0.00",is:"#,##0.00\xA0\xA4",it:"#,##0.00\xA0\xA4","it-CH":"#,##0.00\xA0\xA4","it-SM":"#,##0.00\xA0\xA4","it-VA":"#,##0.00\xA0\xA4",ja:"\xA4#,##0.00;(\xA4#,##0.00)",jgo:"\xA4\xA0#,##0.00",jmc:"\xA4#,##0.00",jv:"\xA4\xA0#,##0.00",ka:"#,##0.00\xA0\xA4",kab:"#,##0.00\xA4",kam:"\xA4#,##0.00;(\xA4#,##0.00)",kde:"\xA4#,##0.00;(\xA4#,##0.00)",kea:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",kgp:"\xA4\xA0#,##0.00",khq:"#,##0.00\xA4",ki:"\xA4#,##0.00;(\xA4#,##0.00)",kk:"#,##0.00\xA0\xA4",kkj:"\xA4\xA0#,##0.00",kl:"\xA4#,##0.00;\xA4-#,##0.00",kln:"\xA4#,##0.00;(\xA4#,##0.00)",km:"#,##0.00\xA4;(#,##0.00\xA4)",kn:"\xA4#,##0.00;(\xA4#,##0.00)",ko:"\xA4#,##0.00;(\xA4#,##0.00)","ko-KP":"\xA4#,##0.00;(\xA4#,##0.00)",kok:"\xA4#,##0.00;(\xA4#,##0.00)",ks:"\xA4#,##0.00","ks-Arab":"\xA4#,##0.00","ks-Deva":"\xA4\xA0#,##0.00",ksb:"#,##0.00\xA4",ksf:"#,##0.00\xA0\xA4",ksh:"#,##0.00\xA0\xA4",ku:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",kw:"\xA4#,##0.00",ky:"#,##0.00\xA0\xA4",lag:"\xA4\xA0#,##0.00",lb:"#,##0.00\xA0\xA4",lg:"#,##0.00\xA4",lkt:"\xA4\xA0#,##0.00",ln:"#,##0.00\xA0\xA4","ln-AO":"#,##0.00\xA0\xA4","ln-CF":"#,##0.00\xA0\xA4","ln-CG":"#,##0.00\xA0\xA4",lo:"\xA4#,##0.00;\xA4-#,##0.00",lrc:"\xA4\xA0#,##0.00","lrc-IQ":"\xA4\xA0#,##0.00",lt:"#,##0.00\xA0\xA4",lu:"#,##0.00\xA4",luo:"#,##0.00\xA4",luy:"\xA4#,##0.00;\xA4-\xA0#,##0.00",lv:"#,##0.00\xA0\xA4",mai:"\xA4\xA0#,##0.00",mas:"\xA4#,##0.00;(\xA4#,##0.00)","mas-TZ":"\xA4#,##0.00;(\xA4#,##0.00)",mer:"\xA4#,##0.00;(\xA4#,##0.00)",mfe:"\xA4\xA0#,##0.00",mg:"\xA4#,##0.00",mgh:"\xA4\xA0#,##0.00",mgo:"\xA4\xA0#,##0.00",mi:"\xA4\xA0#,##0.00",mk:"#,##0.00\xA0\xA4",ml:"\xA4#,##0.00;(\xA4#,##0.00)",mn:"\xA4\xA0#,##0.00",mni:"\xA4\xA0#,##0.00","mni-Beng":"\xA4\xA0#,##0.00",mr:"\xA4#,##0.00;(\xA4#,##0.00)",ms:"\xA4#,##0.00;(\xA4#,##0.00)","ms-BN":"\xA4#,##0.00;(\xA4#,##0.00)","ms-ID":"\xA4#,##0.00","ms-SG":"\xA4#,##0.00;(\xA4#,##0.00)",mt:"\xA4#,##0.00",mua:"\xA4#,##0.00;(\xA4#,##0.00)",my:"\xA4\xA0#,##0.00",mzn:"\xA4\xA0#,##0.00",naq:"\xA4#,##0.00",nb:"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","nb-SJ":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)",nd:"\xA4#,##0.00;(\xA4#,##0.00)",nds:"\xA4\xA0#,##0.00","nds-NL":"\xA4\xA0#,##0.00",ne:"\xA4\xA0#,##,##0.00","ne-IN":"\xA4\xA0#,##,##0.00",nl:"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","nl-AW":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","nl-BE":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","nl-BQ":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","nl-CW":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","nl-SR":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)","nl-SX":"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)",nmg:"#,##0.00\xA0\xA4",nn:"#,##0.00\xA0\xA4",nnh:"\xA4\xA0#,##0.00",no:"\xA4\xA0#,##0.00;(\xA4\xA0#,##0.00)",nus:"\xA4#,##0.00;(\xA4#,##0.00)",nyn:"\xA4#,##0.00",om:"\xA4#,##0.00","om-KE":"\xA4#,##0.00",or:"\xA4#,##0.00;(\xA4#,##0.00)",os:"\xA4\xA0#,##0.00","os-RU":"\xA4\xA0#,##0.00",pa:"\xA4\xA0#,##0.00","pa-Arab":"\xA4\xA0#,##0.00","pa-Guru":"\xA4\xA0#,##0.00",pcm:"\xA4#,##0.00",pl:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",ps:"\xA4#,##0.00;(\xA4#,##0.00)","ps-PK":"\xA4#,##0.00;(\xA4#,##0.00)",pt:"\xA4\xA0#,##0.00","pt-AO":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-CH":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-CV":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-GQ":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-GW":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-LU":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-MO":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-MZ":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-PT":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-ST":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","pt-TL":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",qu:"\xA4\xA0#,##0.00","qu-BO":"\xA4\xA0#,##0.00","qu-EC":"\xA4\xA0#,##0.00",rm:"#,##0.00\xA0\xA4",rn:"#,##0.00\xA4",ro:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","ro-MD":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",rof:"\xA4#,##0.00",ru:"#,##0.00\xA0\xA4","ru-BY":"#,##0.00\xA0\xA4","ru-KG":"#,##0.00\xA0\xA4","ru-KZ":"#,##0.00\xA0\xA4","ru-MD":"#,##0.00\xA0\xA4","ru-UA":"#,##0.00\xA0\xA4",rw:"\xA4\xA0#,##0.00",rwk:"#,##0.00\xA4",sa:"\xA4\xA0#,##0.00",sah:"#,##0.00\xA0\xA4",saq:"\xA4#,##0.00;(\xA4#,##0.00)",sat:"\xA4\xA0#,##0.00","sat-Olck":"\xA4\xA0#,##0.00",sbp:"#,##0.00\xA4",sc:"#,##0.00\xA0\xA4",sd:"\xA4\xA0#,##0.00","sd-Arab":"\xA4\xA0#,##0.00","sd-Deva":"\xA4\xA0#,##0.00",se:"#,##0.00\xA0\xA4","se-FI":"#,##0.00\xA0\xA4","se-SE":"#,##0.00\xA0\xA4",seh:"#,##0.00\xA4",ses:"#,##0.00\xA4",sg:"\xA4#,##0.00;\xA4-#,##0.00",shi:"#,##0.00\xA4","shi-Latn":"#,##0.00\xA4","shi-Tfng":"#,##0.00\xA4",si:"\xA4#,##0.00;(\xA4#,##0.00)",sk:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",sl:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",smn:"#,##0.00\xA0\xA4",sn:"\xA4#,##0.00;(\xA4#,##0.00)",so:"\xA4#,##0.00;(\xA4#,##0.00)","so-DJ":"\xA4#,##0.00;(\xA4#,##0.00)","so-ET":"\xA4#,##0.00;(\xA4#,##0.00)","so-KE":"\xA4#,##0.00;(\xA4#,##0.00)",sq:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sq-MK":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sq-XK":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",sr:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Cyrl":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Cyrl-BA":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Cyrl-ME":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Cyrl-XK":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Latn":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Latn-BA":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Latn-ME":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)","sr-Latn-XK":"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",su:"\xA4#,##0.00","su-Latn":"\xA4#,##0.00",sv:"#,##0.00\xA0\xA4","sv-AX":"#,##0.00\xA0\xA4","sv-FI":"#,##0.00\xA0\xA4",sw:"\xA4\xA0#,##0.00","sw-CD":"\xA4\xA0#,##0.00","sw-KE":"\xA4\xA0#,##0.00","sw-UG":"\xA4\xA0#,##0.00",ta:"\xA4#,##0.00;(\xA4#,##0.00)","ta-LK":"\xA4#,##0.00;(\xA4#,##0.00)","ta-MY":"\xA4#,##0.00;(\xA4#,##0.00)","ta-SG":"\xA4#,##0.00;(\xA4#,##0.00)",te:"\xA4#,##0.00;(\xA4#,##0.00)",teo:"\xA4#,##0.00;(\xA4#,##0.00)","teo-KE":"\xA4#,##0.00;(\xA4#,##0.00)",tg:"#,##0.00\xA0\xA4",th:"\xA4#,##0.00;(\xA4#,##0.00)",ti:"\xA4#,##0.00","ti-ER":"\xA4#,##0.00",tk:"#,##0.00\xA0\xA4",to:"\xA4\xA0#,##0.00",tr:"\xA4#,##0.00;(\xA4#,##0.00)","tr-CY":"\xA4#,##0.00;(\xA4#,##0.00)",tt:"#,##0.00\xA0\xA4",twq:"#,##0.00\xA4",tzm:"#,##0.00\xA0\xA4",ug:"\xA4#,##0.00;(\xA4#,##0.00)",uk:"#,##0.00\xA0\xA4",und:"\xA4\xA0#,##0.00",ur:"\xA4#,##0.00;(\xA4#,##0.00)","ur-IN":"\xA4#,##0.00;(\xA4#,##0.00)",uz:"#,##0.00\xA0\xA4","uz-Arab":"\xA4\xA0#,##0.00","uz-Cyrl":"#,##0.00\xA0\xA4","uz-Latn":"#,##0.00\xA0\xA4",vai:"\xA4#,##0.00;(\xA4#,##0.00)","vai-Latn":"\xA4#,##0.00;(\xA4#,##0.00)","vai-Vaii":"\xA4#,##0.00;(\xA4#,##0.00)",vi:"#,##0.00\xA0\xA4",vun:"\xA4#,##0.00",wae:"\xA4\xA0#,##0.00",wo:"\xA4\xA0#,##0.00",xh:"\xA4#,##0.00",xog:"#,##0.00\xA0\xA4",yav:"#,##0.00\xA0\xA4;(#,##0.00\xA0\xA4)",yi:"\xA4\xA0#,##0.00",yo:"\xA4#,##0.00;(\xA4#,##0.00)","yo-BJ":"\xA4#,##0.00;(\xA4#,##0.00)",yrl:"\xA4\xA0#,##0.00","yrl-CO":"\xA4\xA0#,##0.00","yrl-VE":"\xA4\xA0#,##0.00",yue:"\xA4#,##0.00;(\xA4#,##0.00)","yue-Hans":"\xA4#,##0.00;(\xA4#,##0.00)","yue-Hant":"\xA4#,##0.00;(\xA4#,##0.00)",zgh:"#,##0.00\xA4",zh:"\xA4#,##0.00;(\xA4#,##0.00)","zh-Hans":"\xA4#,##0.00;(\xA4#,##0.00)","zh-Hans-HK":"\xA4#,##0.00;(\xA4#,##0.00)","zh-Hans-MO":"\xA4#,##0.00;(\xA4#,##0.00)","zh-Hans-SG":"\xA4#,##0.00;(\xA4#,##0.00)","zh-Hant":"\xA4#,##0.00;(\xA4#,##0.00)","zh-Hant-HK":"\xA4#,##0.00;(\xA4#,##0.00)","zh-Hant-MO":"\xA4#,##0.00;(\xA4#,##0.00)",zu:"\xA4#,##0.00;(\xA4#,##0.00)"};var SU=["standard","accounting"];var IU=/([^\s0]+)?(\s*)0*[.,]*0*(\s*)([^\s0]+)?/,Uv={},VA=i=>{let e=mn.locale()+"/"+JSON.stringify(i);return Uv[e]||(Uv[e]=new Intl.NumberFormat(mn.locale(),i).format),Uv[e]},DU=i=>new Intl.NumberFormat(mn.locale(),{style:"currency",currency:i}),LA={engine:function(){return"intl"},_formatNumberCore:function(i,e,t){return e==="exponential"?this.callBase.apply(this,arguments):VA(this._normalizeFormatConfig(e,t,i))(i)},_normalizeFormatConfig:function(i,e,t){let n;if(i==="decimal"){let o=String(t).split(".")[1];n={minimumIntegerDigits:e.precision||void 0,useGrouping:!1,maximumFractionDigits:o&&o.length,round:t<0?"ceil":"floor"}}else n=this._getPrecisionConfig(e.precision);if(i==="percent")n.style="percent";else if(i==="currency"){let o=e.useCurrencyAccountingStyle??xe().defaultUseCurrencyAccountingStyle;n.style="currency",n.currency=e.currency||xe().defaultCurrency,n.currencySign=SU[+o]}return n},_getPrecisionConfig:function(i){let e;return i===null?e={minimumFractionDigits:0,maximumFractionDigits:20}:e={minimumFractionDigits:i||0,maximumFractionDigits:i||0},e},format:function(i,e){return typeof i!="number"?i:(e=this._normalizeFormat(e),e.currency==="default"&&(e.currency=xe().defaultCurrency),!e||typeof e!="function"&&!e.type&&!e.formatter?VA(e)(i):this.callBase.apply(this,arguments))},_getCurrencySymbolInfo:function(i){let e=DU(i);return this._extractCurrencySymbolInfo(e.format(0))},_extractCurrencySymbolInfo:function(i){let e=IU.exec(i)||[],t=e[1]?"before":"after",n=e[1]||e[4]||"",o=e[2]||e[3]||"";return{position:t,symbol:n,delimiter:o}},getCurrencySymbol:function(i){return i||(i=xe().defaultCurrency),{symbol:this._getCurrencySymbolInfo(i).symbol}},getOpenXmlCurrencyFormat:function(i){let e=i||xe().defaultCurrency,t=this._getCurrencySymbolInfo(e).symbol,n=mn.getValueByClosestLocale(o=>BA[o]);return kA(t,n)}};var TU=typeof Intl<"u";var NA=["currency","fixedpoint","exponential","percent","decimal"],qv={1:"K",2:"M",3:"B",4:"T"},HA={largenumber:"auto",thousands:1,millions:2,billions:3,trillions:4},Yv=Lt({engine:function(){return"base"},numericFormats:NA,defaultLargeNumberFormatPostfixes:qv,_parseNumberFormatString:function(i){let e={};if(!i||typeof i!="string")return;let t=i.toLowerCase().split(" ");if(x(t,(n,o)=>{NA.includes(o)?e.formatType=o:o in HA&&(e.power=HA[o])}),e.power&&!e.formatType&&(e.formatType="fixedpoint"),e.formatType)return e},_calculateNumberPower:function(i,e,t,n){let o=Math.abs(i),s=0;if(o>1)for(;o&&o>=e&&(n===void 0||s<n);)s++,o/=e;else if(o>0&&o<1)for(;o<1&&(t===void 0||s>t);)s--,o*=e;return s},_getNumberByPower:function(i,e,t){let n=i;for(;e>0;)n/=t,e--;for(;e<0;)n*=t,e++;return n},_formatNumber:function(i,e,t){e.power==="auto"&&(e.power=this._calculateNumberPower(i,1e3,0,4)),e.power&&(i=this._getNumberByPower(i,e.power,1e3));let n=this.defaultLargeNumberFormatPostfixes[e.power]||"",o=this._formatNumberCore(i,e.formatType,t);return o=o.replace(/(\d|.$)(\D*)$/,"$1"+n+"$2"),o},_formatNumberExponential:function(i,e){let t=this._calculateNumberPower(i,10),n=this._getNumberByPower(i,t,10);e.precision===void 0&&(e.precision=1),n.toFixed(e.precision||0)>=10&&(t++,n/=10);let o=(t>=0?"+":"")+t.toString();return this._formatNumberCore(n,"fixedpoint",e)+"E"+o},_addZeroes:function(i,e){let t=Math.pow(10,e),n=i<0?"-":"";i=(Math.abs(i)*t>>>0)/t;let o=i.toString();for(;o.length<e;)o="0"+o;return n+o},_addGroupSeparators:function(i){let e=i.toString().split(".");return e[0].replace(/\B(?=(\d{3})+(?!\d))/g,xe().thousandsSeparator)+(e[1]?xe().decimalSeparator+e[1]:"")},_formatNumberCore:function(i,e,t){return e==="exponential"?this._formatNumberExponential(i,t):(e!=="decimal"&&t.precision!==null&&(t.precision=t.precision||0),e==="percent"&&(i*=100),t.precision!==void 0&&(e==="decimal"?i=this._addZeroes(i,t.precision):i=t.precision===null?i.toPrecision():Cg(i,t.precision)),e!=="decimal"?i=this._addGroupSeparators(i):i=i.toString().replace(".",xe().decimalSeparator),e==="percent"&&(i+="%"),i)},_normalizeFormat:function(i){return i?(typeof i=="function"||X(i)||(i={type:i}),i):{}},_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(i,e){let t=this.format(90,"decimal");if(typeof i!="string"||t[1]==="0")return i;let n=e?t[1]:"0",o=e?"0":t[1],s=e?t[0]:"9",r=new RegExp("["+n+"-"+s+"]","g");return i.replace(r,a=>String.fromCharCode(a.charCodeAt(0)+(o.charCodeAt(0)-n.charCodeAt(0))))},getNegativeEtalonRegExp:function(i){let e=this._getSeparators(),t=new RegExp("[0-9"+eo(e.decimalSeparator+e.thousandsSeparator)+"]+","g"),n=this.format(-1,i).replace(t,"1");return["\\","(",")","[","]","*","+","$","^","?","|","{","}"].forEach(o=>{n=n.replace(new RegExp(`\\${o}`,"g"),`\\${o}`)}),n=n.replace(/ /g,"\\s"),n=n.replace(/1/g,".*"),new RegExp(n,"g")},getSign:function(i,e){if(!e)return i.replace(/[^0-9-]/g,"").charAt(0)==="-"?-1:1;let t=this.getNegativeEtalonRegExp(e);return i.match(t)?-1:1},format:function(i,e){if(typeof i!="number"||typeof e=="number")return i;if(e=e&&e.formatter||e,typeof e=="function")return e(i);e=this._normalizeFormat(e),e.type||(e.type="decimal");let t=this._parseNumberFormatString(e.type);if(!t){let n=this._getSeparators();return n.unlimitedIntegerDigits=e.unlimitedIntegerDigits,this.convertDigits(RA(e.type,n)(i))}return this._formatNumber(i,t,e)},parse:function(i,e){if(!i)return;if(e&&e.parser)return e.parser(i);i=this.convertDigits(i,!0),e&&typeof e!="string"&&me.log("W0011");let t=this.getDecimalSeparator(),n=new RegExp("[^0-9"+eo(t)+"]","g"),o=i.replace(n,"").replace(t,".").replace(/\.$/g,"");if(o==="."||o==="")return null;if(this._calcSignificantDigits(o)>15)return NaN;let s=+o*this.getSign(i,e);e=this._normalizeFormat(e);let r=this._parseNumberFormatString(e.type),a=r?.power;if(a){if(a==="auto"){let l=i.match(/\d(K|M|B|T)/);l&&(a=Object.keys(qv).find(d=>qv[d]===l[1]))}s*=Math.pow(10,3*a)}return r?.formatType==="percent"&&(s/=100),s},_calcSignificantDigits:function(i){let[e,t]=i.split("."),n=s=>{let r=-1;for(let a=0;a<s.length;a++)if(s[a]!=="0"){r=a;break}return r>-1?s.length-r:0},o=0;return e&&(o+=n(e.split(""))),t&&(o+=n(t.split("").reverse())),o}});Yv.inject(PA);TU&&Yv.inject(LA);var Qe=Yv;var AU=/^[\d\w.+_-]+@[\d\w._-]+\.[\w]+$/i,mi={valid:"valid",invalid:"invalid",pending:"pending"},gs=class{constructor(){this.NAME="base"}defaultMessage(e){return O.getFormatter(`validation-${this.NAME}`)(e)}defaultFormattedMessage(e){return O.getFormatter(`validation-${this.NAME}-formatted`)(e)}_isValueEmpty(e){return!Xc.required.validate(e,{})}validate(e,t){let n=Array.isArray(e)?e:[e],o=!0;return n.length?n.every(s=>(o=this._validate(s,t),o)):o=this._validate(null,t),o}},Xv=class extends gs{constructor(){super(),this.NAME="required"}_validate(e,t){return!f(e)||e===!1?!1:(e=String(e),(t.trim||!f(t.trim))&&(e=e.trim()),e!=="")}},Qv=class extends gs{constructor(){super(),this.NAME="numeric"}_validate(e,t){return t.ignoreEmptyValue!==!1&&this._isValueEmpty(e)?!0:t.useCultureSettings&&B(e)?!isNaN(Qe.parse(e)):Oe(e)}},Zv=class extends gs{constructor(){super(),this.NAME="range"}_validate(e,t){if(t.ignoreEmptyValue!==!1&&this._isValueEmpty(e))return!0;let n=Xc.numeric.validate(e,t),o=f(e)&&e!=="",s=n?parseFloat(e):o&&e.valueOf(),{min:r}=t,{max:a}=t;if(!(n||Vt(e))&&!o)return!1;if(f(r))return f(a)?s>=r&&s<=a:s>=r;if(f(a))return s<=a;throw me.Error("E0101")}},Jv=class extends gs{constructor(){super(),this.NAME="stringLength"}_validate(e,t){return e=String(e??""),(t.trim||!f(t.trim))&&(e=e.trim()),t.ignoreEmptyValue&&this._isValueEmpty(e)?!0:Xc.range.validate(e.length,m({},t))}},xg=class extends gs{constructor(){super(),this.NAME="custom"}validate(e,t){if(t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;let{validator:n}=t,o=n&&A(n.option)&&n.option("dataGetter"),s=A(o)&&o(),r={value:e,validator:n,rule:t};return s&&m(r,s),t.validationCallback(r)}},eb=class extends xg{constructor(){super(),this.NAME="async"}validate(e,t){if(f(t.reevaluate)||m(t,{reevaluate:!0}),t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;let{validator:n}=t,o=n&&A(n.option)&&n.option("dataGetter"),s=A(o)&&o(),r={value:e,validator:n,rule:t};s&&m(r,s);let a=t.validationCallback(r);if(!Zo(a))throw me.Error("E0103");return this._getWrappedPromise(Et(a).promise())}_getWrappedPromise(e){let t=y();return e.then(n=>{t.resolve(n)},n=>{let o={isValid:!1};f(n)&&(B(n)?o.message=n:z(n)&&f(n.message)&&B(n.message)&&(o.message=n.message)),t.resolve(o)}),t.promise()}},tb=class extends gs{constructor(){super(),this.NAME="compare"}_validate(e,t){if(!t.comparisonTarget)throw me.Error("E0102");if(t.ignoreEmptyValue&&this._isValueEmpty(e))return!0;m(t,{reevaluate:!0});let n=t.comparisonTarget();switch(t.comparisonType||"=="){case"==":return e==n;case"!=":return e!=n;case"===":return e===n;case"!==":return e!==n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n}}},ib=class extends gs{constructor(){super(),this.NAME="pattern"}_validate(e,t){if(t.ignoreEmptyValue!==!1&&this._isValueEmpty(e))return!0;let{pattern:n}=t;return B(n)&&(n=new RegExp(n)),n.test(e)}},nb=class extends gs{constructor(){super(),this.NAME="email"}_validate(e,t){return t.ignoreEmptyValue!==!1&&this._isValueEmpty(e)?!0:Xc.pattern.validate(e,m({},t,{pattern:AU}))}},Xc={required:new Xv,numeric:new Qv,range:new Zv,stringLength:new Jv,custom:new xg,async:new eb,compare:new tb,pattern:new ib,email:new nb},MU=pe.inherit({ctor(i,e){this.group=i,this.validators=[],this._isRemovable=e,this._pendingValidators=[],this._onValidatorStatusChanged=this._onValidatorStatusChanged.bind(this),this._resetValidationInfo(),this._eventsStrategy=new oo(this)},validate(){let i={isValid:!0,brokenRules:[],validators:[],status:mi.valid,complete:null};return this._unsubscribeFromAllChangeEvents(),this._pendingValidators=[],this._resetValidationInfo(),x(this.validators,(e,t)=>{let n=t.validate();i.isValid=i.isValid&&n.isValid,n.brokenRules&&(i.brokenRules=i.brokenRules.concat(n.brokenRules)),i.validators.push(t),n.status===mi.pending&&this._addPendingValidator(t),this._subscribeToChangeEvents(t)}),this._pendingValidators.length?i.status=mi.pending:(i.status=i.isValid?mi.valid:mi.invalid,this._unsubscribeFromAllChangeEvents(),this._raiseValidatedEvent(i)),this._updateValidationInfo(i),m({},this._validationInfo.result)},_subscribeToChangeEvents(i){i.on("validating",this._onValidatorStatusChanged),i.on("validated",this._onValidatorStatusChanged)},_unsubscribeFromChangeEvents(i){i.off("validating",this._onValidatorStatusChanged),i.off("validated",this._onValidatorStatusChanged)},_unsubscribeFromAllChangeEvents(){x(this.validators,(i,e)=>{this._unsubscribeFromChangeEvents(e)})},_updateValidationInfo(i){this._validationInfo.result=i,i.status===mi.pending&&(this._validationInfo.deferred||(this._validationInfo.deferred=y(),this._validationInfo.result.complete=this._validationInfo.deferred.promise()))},_addPendingValidator(i){At(this._pendingValidators,t=>t===i)[0]||this._pendingValidators.push(i)},_removePendingValidator(i){let e=this._pendingValidators.indexOf(i);e>=0&&this._pendingValidators.splice(e,1)},_orderBrokenRules(i){let e=[];return x(this.validators,(t,n)=>{let o=At(i,s=>s.validator===n);o.length&&(e=e.concat(o))}),e},_updateBrokenRules(i){if(!this._validationInfo.result)return;let{brokenRules:e}=this._validationInfo.result,t=At(e,n=>n.validator!==i.validator);i.brokenRules&&(e=t.concat(i.brokenRules)),this._validationInfo.result.brokenRules=this._orderBrokenRules(e)},_onValidatorStatusChanged(i){if(i.status===mi.pending){this._addPendingValidator(i.validator);return}this._resolveIfComplete(i)},_resolveIfComplete(i){if(this._removePendingValidator(i.validator),this._updateBrokenRules(i),!this._pendingValidators.length){if(this._unsubscribeFromAllChangeEvents(),!this._validationInfo.result)return;this._validationInfo.result.status=this._validationInfo.result.brokenRules.length===0?mi.valid:mi.invalid,this._validationInfo.result.isValid=this._validationInfo.result.status===mi.valid;let e=m({},this._validationInfo.result,{complete:null}),{deferred:t}=this._validationInfo;this._validationInfo.deferred=null,this._raiseValidatedEvent(e),t&&setTimeout(()=>{t.resolve(e)})}},_raiseValidatedEvent(i){this._eventsStrategy.fireEvent("validated",[i])},_resetValidationInfo(){this._validationInfo={result:null,deferred:null}},_synchronizeValidationInfo(){this._validationInfo.result&&(this._validationInfo.result.validators=this.validators)},removeRegisteredValidator(i){let e=this.validators.indexOf(i);e>-1&&(this.validators.splice(e,1),this._synchronizeValidationInfo(),this._resolveIfComplete({validator:i}))},registerValidator(i){this.validators.includes(i)||(this.validators.push(i),this._synchronizeValidationInfo())},reset(){x(this.validators,(i,e)=>{e.reset()}),this._pendingValidators=[],this._resetValidationInfo()},on(i,e){return this._eventsStrategy.on(i,e),this},off(i,e){return this._eventsStrategy.off(i,e),this}}),Aa={groups:[],getGroupConfig(i){let e=At(this.groups,t=>t.group===i);if(e.length)return e[0]},findGroup(i,e){var t;let o=((t=i.data())===null||t===void 0||(t=t.dxComponents)===null||t===void 0?void 0:t.includes("dxValidationGroup"))&&i.dxValidationGroup("instance");if(o)return o;let s=i.parents(".dx-validationgroup").first();return s.length?s.dxValidationGroup("instance"):e},initGroups(){this.groups=[],this.addGroup(void 0,!1)},addGroup(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this.getGroupConfig(i);return t||(t=new MU(i,e),this.groups.push(t)),t},removeGroup(i){let e=this.getGroupConfig(i),t=this.groups.indexOf(e);return t>-1&&this.groups.splice(t,1),e},_setDefaultMessage(i){let{rule:e,validator:t,name:n}=i;f(e.message)||(t.defaultFormattedMessage&&f(n)?e.message=t.defaultFormattedMessage(n):e.message=t.defaultMessage())},_addBrokenRule(i){let{result:e,rule:t}=i;e.brokenRule||(e.brokenRule=t),e.brokenRules||(e.brokenRules=[]),e.brokenRules.push(t)},validate(i,e,t){var n;let o={name:t,value:i,brokenRule:null,brokenRules:null,isValid:!0,validationRules:e,pendingRules:null,status:mi.valid,complete:null},s=e==null||(n=e[0])===null||n===void 0?void 0:n.validator,r=[];return x(e||[],(a,l)=>{let d=Xc[l.type],c;if(d){if(f(l.isValid)&&l.value===i&&!l.reevaluate)return l.isValid?!0:(o.isValid=!1,this._addBrokenRule({result:o,rule:l}),!1);if(l.value=i,l.type==="async")return r.push({rule:l,ruleValidator:d}),!0;if(c=d.validate(i,l),l.isValid=c,c||(o.isValid=!1,this._setDefaultMessage({rule:l,validator:d,name:t}),this._addBrokenRule({result:o,rule:l})),!l.isValid)return!1}else throw me.Error("E0100")}),o.isValid&&!o.brokenRules&&r.length&&(o=this._validateAsyncRules({value:i,items:r,result:o,name:t})),this._synchronizeGroupValidationInfo(s,o),o.status=o.pendingRules?mi.pending:o.isValid?mi.valid:mi.invalid,o},_synchronizeGroupValidationInfo(i,e){if(!i)return;let t=Aa.getGroupConfig(i._validationGroup);t._updateBrokenRules.call(t,{validator:i,brokenRules:e.brokenRules??[]})},_validateAsyncRules(i){let{result:e,value:t,items:n,name:o}=i,s=[];return x(n,(r,a)=>{let l=a.ruleValidator.validate(t,a.rule);if(!Zo(l))this._updateRuleConfig({rule:a.rule,ruleResult:this._getPatchedRuleResult(l),validator:a.ruleValidator,name:o});else{e.pendingRules||(e.pendingRules=[]),e.pendingRules.push(a.rule);let d=l.then(c=>{let h=this._getPatchedRuleResult(c);return this._updateRuleConfig({rule:a.rule,ruleResult:h,validator:a.ruleValidator,name:o}),h});s.push(d)}}),s.length&&(e.complete=Promise.all(s).then(r=>this._getAsyncRulesResult({result:e,values:r}))),e},_updateRuleConfig(i){let{rule:e,ruleResult:t,validator:n,name:o}=i;e.isValid=t.isValid,t.isValid||(f(t.message)&&B(t.message)&&t.message.length?e.message=t.message:this._setDefaultMessage({rule:e,validator:n,name:o}))},_getPatchedRuleResult(i){let e;return z(i)?(e=m({},i),f(e.isValid)||(e.isValid=!0)):e={isValid:yr(i)?i:!0},e},_getAsyncRulesResult(i){let{values:e,result:t}=i;return x(e,(n,o)=>{if(o.isValid===!1){t.isValid=o.isValid;let s=t.pendingRules[n];this._addBrokenRule({result:t,rule:s})}}),t.pendingRules=null,t.complete=null,t.status=t.isValid?mi.valid:mi.invalid,t},registerValidatorInGroup(i,e){let t=Aa.addGroup(i);t.registerValidator.call(t,e)},removeRegisteredValidator(i,e){let t=Aa.getGroupConfig(i);if(t){t.removeRegisteredValidator.call(t,e);let n=t.validators,o=t._isRemovable;n.length===0&&o&&this.removeGroup(i)}},initValidationOptions(i){let e={};return i&&["isValid","validationStatus","validationError","validationErrors"].forEach(n=>{n in i&&m(e,this.synchronizeValidationOptions({name:n,value:i[n]},i))}),e},synchronizeValidationOptions(i,e){let{name:t,value:n}=i;switch(t){case"validationStatus":{let o=n===mi.valid||n===mi.pending;return e.isValid!==o?{isValid:o}:{}}case"isValid":{let{validationStatus:o}=e,s=o;return n&&o===mi.invalid?s=mi.valid:!n&&o!==mi.invalid&&(s=mi.invalid),s!==o?{validationStatus:s}:{}}case"validationErrors":{let o=!n||!n.length?null:n[0];return e.validationError!==o?{validationError:o}:{}}case"validationError":{let{validationErrors:o}=e;if(!n&&o)return{validationErrors:null};if(n&&!o)return{validationErrors:[n]};if(n&&o&&n!==o[0])return o[0]=n,{validationErrors:o.slice()}}}return{}},validateGroup(i){let e=Aa.getGroupConfig(i);if(!e)throw me.Error("E0110");return e.validate()},resetGroup(i){let e=Aa.getGroupConfig(i);if(!e)throw me.Error("E0110");return e.reset()}};Aa.initGroups();var Ni=Aa;var fi=Ni;var vg="dx-invalid-message",RU="dx-invalid-message-auto",FU="dx-invalid-message-always",PU="dx-invalid-message-content";var $A=nn.inherit({_getDefaultOptions(){return m(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,preventScrollEvents:!1,positionSide:"top",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(){let{target:i}=this.option();this.option("position.of",i)},_ensureMessageNotEmpty(){this._textMarkup=this._getTextMarkup();let i=this.option("visible")&&this._textMarkup;this._toggleVisibilityClasses(i)},_toggleVisibilityClasses(i){i?(this.$element().addClass(vg),this.$wrapper().addClass(vg)):(this.$element().removeClass(vg),this.$wrapper().removeClass(vg))},_updateContentId(){let{container:i,contentId:e}=this.option(),t=e??u(i).attr("aria-describedby");this.$content().addClass(PU).attr("id",t)},_renderInnerHtml(i){let e=i&&u(i);e?.html(this._textMarkup)},_getTextMarkup(){let i=this.option("validationErrors")??[],e="";return i.forEach(t=>{e+=(e?"<br />":"")+Rh(t?.message??"")}),e},_toggleModeClass(){let i=this.option("mode");this.$wrapper().toggleClass(RU,i==="auto").toggleClass(FU,i==="always")},updateMaxWidth(){let i=this.option("target"),e=ae(i),t="100%";e&&(t=Math.max(e,100)),this.option({maxWidth:t})},_getPositionsArray(i,e){switch(i){case"top":return[`${e} bottom`,`${e} top`];case"left":return["right","left"];case"right":return["left","right"];default:return[`${e} top`,`${e} bottom`]}},_updatePosition(){let{positionSide:i,rtlEnabled:e,offset:t,boundary:n}=this.option(),o=un(e),s=this._getPositionsArray(i,o),r=I({},t);this.$element().addClass(`dx-invalid-message-${i}`),e&&i!=="left"&&i!=="right"&&(r.h=-r.h),i==="top"&&(r.v=-r.v),i==="left"&&(r.h=-r.h),this.option("position",{offset:r,boundary:n,my:s[0],at:s[1],collision:"none flip"})},_optionChanged(i){let{name:e,value:t,previousValue:n}=i;switch(e){case"target":this._updatePositionByTarget(),this.updateMaxWidth(),this.callBase(i);break;case"boundary":this.option("position.boundary",t);break;case"mode":this._toggleModeClass(t);break;case"rtlEnabled":case"offset":case"positionSide":this.$element().removeClass(`dx-invalid-message-${n}`),this._updatePosition();break;case"container":this._updateContentId(),this.callBase(i);break;case"contentId":this._updateContentId();break;case"validationErrors":this._ensureMessageNotEmpty(),this._renderInnerHtml(this.$content());break;default:this.callBase(i)}}});K("dxValidationMessage",$A);var zA=$A;var bg=zA;var WA="dx-invalid-message-auto";var kU="dx-show-invalid-badge",GA="dx-validation-target";var BU=["outlined","filled","underlined"],jA={validationMessageMode:"mode",validationMessagePosition:"positionSide",validationMessageOffset:"offset",validationBoundary:"boundary"},ob=at.inherit({ctor(){this.showValidationMessageTimeout=null,this.validationRequest=ge(),this.callBase.apply(this,arguments)},_createElement(i){this.callBase(i);let e=this.$element();e&&Xe(e[0],GA,this)},_initOptions(i){this.callBase.apply(this,arguments),this.option(fi.initValidationOptions(i))},_init(){this._initialValue=this.option("value"),this.callBase(),this._options.cache("validationTooltipOptions",this.option("validationTooltipOptions")),this.$element().addClass(kU)},_getDefaultOptions(){return m(this.callBase(),{value:null,name:"",onValueChanged:null,readOnly:!1,isValid:!0,validationError:null,validationErrors:null,validationStatus:"valid",validationMessageMode:"auto",validationMessagePosition:"bottom",validationBoundary:void 0,validationMessageOffset:{h:0,v:0},validationTooltipOptions:{},_showValidationMessage:!0,isDirty:!1})},_attachKeyboardEvents(){this.option("readOnly")||this.callBase()},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{validationError:!0})},_createValueChangeAction(){this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})},_suppressValueChangeAction(){this._valueChangeActionSuppressed=!0},_resumeValueChangeAction(){this._valueChangeActionSuppressed=!1},_initMarkup(){var i;this._toggleReadOnlyState(),this._setSubmitElementName(this.option("name")),this.callBase(),this._renderValidationState(),(i=this.option("_onMarkupRendered"))===null||i===void 0||i()},_raiseValueChangeAction(i,e){this._valueChangeAction||this._createValueChangeAction(),this._valueChangeAction(this._valueChangeArgs(i,e))},_valueChangeArgs(i,e){return{value:i,previousValue:e,event:this._valueChangeEventInstance}},_saveValueChangeEvent(i){this._valueChangeEventInstance=i},_focusInHandler(i){let e=this.option("validationMessageMode")==="auto";if(this._canValueBeChangedByClick()&&e){var t;let n=(t=this._validationMessage)===null||t===void 0?void 0:t.$wrapper();n?.removeClass(WA),clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>n?.addClass(WA),150)}return this.callBase(i)},_canValueBeChangedByClick:()=>!1,_getStylingModePrefix:()=>"dx-editor-",_renderStylingMode(){let i=this.option("stylingMode"),e=this._getStylingModePrefix(),t=BU.map(o=>e+o);t.forEach(o=>this.$element().removeClass(o));let n=e+i;if(!t.includes(n)){let o=this._getDefaultOptions().stylingMode,s=this._convertRulesToOptions(this._defaultOptionsRules()).stylingMode;n=e+(s||o)}this.$element().addClass(n)},_getValidationErrors(){let i=this.option("validationErrors");return!i&&this.option("validationError")&&(i=[this.option("validationError")]),i},_disposeValidationMessage(){this._$validationMessage&&(this._$validationMessage.remove(),this.setAria("describedby",null),this._$validationMessage=void 0,this._validationMessage=void 0)},_toggleValidationClasses(i){this.$element().toggleClass("dx-invalid",i),this.setAria("invalid",i||void 0)},_renderValidationState(){let i=this.option("isValid")&&this.option("validationStatus")!=="invalid",e=this._getValidationErrors(),t=this.$element();if(this._toggleValidationClasses(!i),!(!j()||this.option("_showValidationMessage")===!1)&&(this._disposeValidationMessage(),!i&&e)){let{validationMessageMode:n,validationMessageOffset:o,validationBoundary:s,rtlEnabled:r}=this.option();this._$validationMessage=u("<div>").appendTo(t);let a=`dx-${new Ae}`;this.setAria("describedby",a),this._validationMessage=new bg(this._$validationMessage,m({validationErrors:e,rtlEnabled:r,target:this._getValidationMessageTarget(),visualContainer:t,mode:n,positionSide:this._getValidationMessagePosition(),offset:o,boundary:s,contentId:a},this._options.cache("validationTooltipOptions"))),this._bindInnerWidgetOptions(this._validationMessage,"validationTooltipOptions")}},_getValidationMessagePosition(){return this.option("validationMessagePosition")},_getValidationMessageTarget(){return this.$element()},_toggleReadOnlyState(){let i=this.option("readOnly");this._toggleBackspaceHandler(i),this.$element().toggleClass("dx-state-readonly",!!i),this._setAriaReadonly(i)},_setAriaReadonly(i){this.setAria("readonly",i||void 0)},_toggleBackspaceHandler(i){let e=this._keyboardEventBindingTarget(),t=D("keydown","editorReadOnly");_.off(e,t),i&&_.on(e,t,n=>{ke(n)==="backspace"&&n.preventDefault()})},_dispose(){let i=this.$element()[0];Xe(i,GA,null),clearTimeout(this.showValidationMessageTimeout),this._disposeValidationMessage(),this.callBase()},_setSubmitElementName(i){let e=this._getSubmitElement();e&&(i.length>0?e.attr("name",i):e.removeAttr("name"))},_getSubmitElement:()=>null,_setValidationMessageOption(i){var e;let{name:t,value:n}=i,o=jA[t]?jA[t]:t;(e=this._validationMessage)===null||e===void 0||e.option(o,n)},_hasActiveElement:E,_optionChanged(i){var e;switch(i.name){case"onValueChanged":this._createValueChangeAction();break;case"readOnly":this._toggleReadOnlyState(),this._refreshFocusState();break;case"value":i.value!=i.previousValue&&(this.option("isDirty",this._initialValue!==i.value),this.validationRequest.fire({value:i.value,editor:this})),this._valueChangeActionSuppressed||(this._raiseValueChangeAction(i.value,i.previousValue),this._saveValueChangeEvent(void 0));break;case"width":this.callBase(i),(e=this._validationMessage)===null||e===void 0||e.updateMaxWidth();break;case"name":this._setSubmitElementName(i.value);break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(fi.synchronizeValidationOptions(i,this.option())),this._renderValidationState();break;case"validationBoundary":case"validationMessageMode":case"validationMessagePosition":case"validationMessageOffset":this._setValidationMessageOption(i);break;case"rtlEnabled":this._setValidationMessageOption(i),this.callBase(i);break;case"validationTooltipOptions":this._innerWidgetOptionChanged(this._validationMessage,i);break;case"_showValidationMessage":case"isDirty":break;default:this.callBase(i)}},_resetToInitialValue(){this.option("value",this._initialValue)},blur(){this._hasActiveElement()&&uo()},clear(){let i=this._getDefaultOptions();this.option("value",i.value)},reset(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;arguments.length&&(this._initialValue=i),this._resetToInitialValue(),this.option("isDirty",!1),this.option("isValid",!0)}});ob.isEditor=i=>i instanceof ob;var KA=ob;var vi=KA;var VU=Bs();var UA=at.inherit({_getDefaultOptions(){return m(this.callBase(),{indicatorSrc:"",activeStateEnabled:!1,hoverStateEnabled:!1,_animatingSegmentCount:1,_animatingSegmentInner:!1})},_defaultOptionsRules(){let i=yt();return this.callBase().concat([{device(){return F.real().platform==="android"&&!/chrome/i.test(VU.userAgent)},options:{viaImage:!0}},{device:()=>wt(i),options:{_animatingSegmentCount:2,_animatingSegmentInner:!0}},{device:()=>ag(i),options:{_animatingSegmentCount:7}}])},_useTemplates:()=>!1,_init(){this.callBase(),this.$element().addClass("dx-loadindicator");let e={role:"alert",label:O.format("Loading")};this.setAria(e)},_initMarkup(){this.callBase(),this._renderWrapper(),this._renderIndicatorContent(),this._renderMarkup()},_renderWrapper(){this._$wrapper=u("<div>").addClass("dx-loadindicator-wrapper"),this.$element().append(this._$wrapper)},_renderIndicatorContent(){this._$content=u("<div>").addClass("dx-loadindicator-content"),this._$wrapper.append(this._$content)},_renderMarkup(){let{viaImage:i,indicatorSrc:e}=this.option();bp()&&!i&&!e?this._renderMarkupForAnimation():this._renderMarkupForImage()},_renderMarkupForAnimation(){let i=this.option("_animatingSegmentInner");this._$indicator=u("<div>").addClass("dx-loadindicator-icon"),this._$content.append(this._$indicator);for(let e=this.option("_animatingSegmentCount");e>=0;--e){let t=u("<div>").addClass("dx-loadindicator-segment").addClass("dx-loadindicator-segment"+e);i&&t.append(u("<div>").addClass("dx-loadindicator-segment-inner")),this._$indicator.append(t)}},_renderMarkupForImage(){let{indicatorSrc:i}=this.option();i?(this._$wrapper.addClass("dx-loadindicator-image"),this._$wrapper.css("backgroundImage",`url(${i})`)):bp()&&this._renderMarkupForAnimation()},_renderDimensions(){this.callBase(),this._updateContentSizeForAnimation()},_updateContentSizeForAnimation(){if(!this._$indicator)return;let i=this.option("width"),e=this.option("height");if(i||e){i=W(this.$element()),e=Q(this.$element());let t=Math.min(e,i);this._$wrapper.css({height:t,width:t,fontSize:t})}},_clean(){this.callBase(),this._removeMarkupForAnimation(),this._removeMarkupForImage()},_removeMarkupForAnimation(){this._$indicator&&(this._$indicator.remove(),delete this._$indicator)},_removeMarkupForImage(){this._$wrapper.css("backgroundImage","none")},_optionChanged(i){switch(i.name){case"_animatingSegmentCount":case"_animatingSegmentInner":case"indicatorSrc":this._invalidate();break;default:this.callBase(i)}}});K("dxLoadIndicator",UA);var qA=UA;var bi=qA;var ms=class{constructor(e,t,n){this.instance=null,this.$container=null,this.$placeMarker=null,this.editor=t,this.name=e,this.options=n||{}}_addPlaceMarker(e){this.$placeMarker=u("<div>").appendTo(e)}_addToContainer(e){let{$placeMarker:t,$container:n}=this;t?t.replaceWith(e):e.appendTo(n)}_attachEvents(e,t){throw"Not implemented"}_create(){throw"Not implemented"}_isRendered(){return!!this.instance}_isVisible(){let{editor:e,options:t}=this;return t.visible||!e.option("readOnly")}_isDisabled(){throw"Not implemented"}_shouldRender(){return this._isVisible()&&!this._isRendered()}dispose(){let{instance:e,$placeMarker:t}=this;e&&(e.dispose?e.dispose():e.remove(),this.instance=null),t&&t.remove()}render(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.$container;if(this.$container=e,this._isVisible()){let{instance:t,$element:n}=this._create();this.instance=t,this._attachEvents(t,n)}else this._addPlaceMarker(e)}update(){return this._shouldRender()&&this.render(),!!this.instance}};var LU=le.down;var Zl=class extends ms{_create(){let e=u("<span>").addClass("dx-clear-button-area").append(u("<span>").addClass("dx-icon").addClass("dx-icon-clear"));return this._addToContainer(e),this.update(!0),{instance:e,$element:e}}_isVisible(){let{editor:e}=this;return e._isClearButtonVisible()}_attachEvents(e,t){let{editor:n}=this,o=n.NAME;_.on(t,D(LU,o),s=>{s.preventDefault(),s.pointerType!=="mouse"&&n._clearValueHandler(s)}),_.on(t,D(de,o),s=>n._clearValueHandler(s))}_legacyRender(e,t){e.toggleClass("dx-show-clear-button",t)}update(){!(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&super.update();let{editor:t,instance:n}=this,o=t.$element(),s=this._isVisible();n&&n.toggleClass("dx-state-invisible",!s),this._legacyRender(o,s)}};var yg=class{constructor(e){this.NAME="dxLabel",this._props=e,this._id=`dx-texteditor-label-${new Ae}`,this._render(),this._toggleMarkupVisibility()}_isVisible(){return!!this._props.text&&this._props.mode!=="hidden"}_render(){this._$before=u("<div>").addClass("dx-label-before"),this._$labelSpan=u("<span>"),this._$label=u("<div>").addClass("dx-label").append(this._$labelSpan),this._$after=u("<div>").addClass("dx-label-after"),this._$root=u("<div>").addClass("dx-texteditor-label").attr("id",this._id).append(this._$before).append(this._$label).append(this._$after),this._updateMark(),this._updateText(),this._updateBeforeWidth(),this._updateMaxWidth()}_toggleMarkupVisibility(){let e=this._isVisible();this._updateEditorBeforeButtonsClass(e),this._updateEditorLabelClass(e),e?this._$root.appendTo(this._props.$editor):this._$root.detach(),this._attachEvents()}_attachEvents(){let e=D(de,this.NAME),t=D(Nr,this.NAME),n=D(DT,this.NAME);_.off(this._$labelSpan,e),_.off(this._$labelSpan,t),_.off(this._$labelSpan,n),this._isVisible()&&this._isOutsideMode()&&(_.on(this._$labelSpan,e,o=>{q().getSelection().toString()===""&&(this._props.onClickHandler(),o.preventDefault())}),_.on(this._$labelSpan,t,o=>{this._props.onHoverHandler(o)}),_.on(this._$labelSpan,n,o=>{this._props.onActiveHandler(o)}))}_updateEditorLabelClass(e){if(this._props.$editor.removeClass("dx-texteditor-with-floating-label").removeClass("dx-texteditor-label-outside").removeClass("dx-texteditor-with-label"),e){let t=this._props.mode==="floating"?"dx-texteditor-with-floating-label":"dx-texteditor-with-label";this._props.$editor.addClass(t),this._isOutsideMode()&&this._props.$editor.addClass("dx-texteditor-label-outside")}}_isOutsideMode(){return this._props.mode==="outside"}_updateEditorBeforeButtonsClass(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._isVisible();if(this._props.$editor.removeClass("dx-texteditor-with-before-buttons"),e){let t=this._props.containsButtonsBefore?"dx-texteditor-with-before-buttons":"";this._props.$editor.addClass(t)}}_updateMark(){this._$labelSpan.attr("data-mark",this._props.mark)}_updateText(){this._$labelSpan.text(this._props.text)}_updateBeforeWidth(){if(this._isVisible()){let e=this._props.beforeWidth??this._props.getBeforeWidth();this._$before.css({width:e}),this._updateLabelTransform()}}_updateLabelTransform(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;if(this._$labelSpan.css("transform",""),this._isVisible()&&this._isOutsideMode()){let n=(this._props.rtlEnabled?1:-1)*(W(this._$before)+e);this._$labelSpan.css("transform",`translateX(${n}px)`)}}_updateMaxWidth(){if(this._isVisible()&&!this._isOutsideMode()){let e=this._props.containerWidth??this._props.getContainerWidth();this._$label.css({maxWidth:e})}}$element(){return this._$root}isVisible(){return this._isVisible()}getId(){if(this._isVisible())return this._id}updateMode(e){this._props.mode=e,this._toggleMarkupVisibility(),this._updateBeforeWidth(),this._updateMaxWidth()}updateText(e){this._props.text=e,this._updateText(),this._toggleMarkupVisibility(),this._updateBeforeWidth(),this._updateMaxWidth()}updateMark(e){this._props.mark=e,this._updateMark()}updateContainsButtonsBefore(e){this._props.containsButtonsBefore=e,this._updateEditorBeforeButtonsClass()}updateBeforeWidth(e){this._props.beforeWidth=e,this._updateBeforeWidth()}updateMaxWidth(e){this._props.containerWidth=e,this._updateMaxWidth()}};var eu=Array.isArray;function Ig(i){var e=typeof i;return e==="string"||e==="number"}function nt(i){return i==null}function tu(i){return i===null||i===!1||i===!0||i===void 0}function Rt(i){return typeof i=="function"}function iu(i){return typeof i=="string"}function NU(i){return typeof i=="number"}function En(i){return i===null}function HU(i){return i===void 0}function Gr(i,e){var t={};if(i)for(var n in i)t[n]=i[n];if(e)for(var o in e)t[o]=e[o];return t}function db(i){return!En(i)&&typeof i=="object"}var Ri={},$U="$F";function cb(i){return i.substr(2).toLowerCase()}function JA(i,e){i.appendChild(e)}function ub(i,e,t){En(t)?JA(i,e):i.insertBefore(e,t)}function zU(i,e){return e?document.createElementNS("http://www.w3.org/2000/svg",i):document.createElement(i)}function WU(i,e,t){i.replaceChild(e,t)}function eM(i,e){i.removeChild(e)}function tM(i){for(var e=0;e<i.length;e++)i[e]()}function GU(i,e,t){var n=i.children;return t&4?n.$LI:t&8192?i.childFlags===2?n:n[e?0:n.length-1]:n}function Fn(i,e){for(var t;i;){if(t=i.flags,t&2033)return i.dom;i=GU(i,e,t)}return null}function su(i,e){do{var t=i.flags;if(t&2033){eM(e,i.dom);return}var n=i.children;if(t&4&&(i=n.$LI),t&8&&(i=n),t&8192)if(i.childFlags===2)i=n;else{for(var o=0,s=n.length;o<s;++o)su(n[o],e);return}}while(i)}function iM(i,e,t){do{var n=i.flags;if(n&2033){ub(e,i.dom,t);return}var o=i.children;if(n&4&&(i=o.$LI),n&8&&(i=o),n&8192)if(i.childFlags===2)i=o;else{for(var s=0,r=o.length;s<r;++s)iM(o[s],e,t);return}}while(i)}function nM(i,e,t){return i.constructor.getDerivedStateFromProps?Gr(t,i.constructor.getDerivedStateFromProps(e,t)):t}var nu={v:!1},Jl={componentComparator:null,createVNode:null,renderComplete:null};function Zc(i,e){i.textContent=e}function oM(i,e){return db(i)&&i.event===e.event&&i.data===e.data}function sM(i,e){for(var t in e)HU(i[t])&&(i[t]=e[t]);return i}function hb(i,e){return!!Rt(i)&&(i(e),!0)}var Jc="$";function Tg(i,e,t,n,o,s,r,a){this.childFlags=i,this.children=e,this.className=t,this.dom=null,this.flags=n,this.key=o===void 0?null:o,this.props=s===void 0?null:s,this.ref=r===void 0?null:r,this.type=a}function tt(i,e,t,n,o,s,r,a){var l=o===void 0?1:o,d=new Tg(l,n,t,i,r,s,a,e);return Jl.createVNode&&Jl.createVNode(d),l===0&&lM(d,d.children),d}function jU(i,e,t){if(i&4)return t;var n=(i&32768?e.render:e).defaultHooks;return nt(n)?t:nt(t)?n:sM(t,n)}function KU(i,e,t){var n=(i&32768?e.render:e).defaultProps;return nt(n)?t:nt(t)?Gr(n,null):sM(t,n)}function UU(i,e){return i&12?i:e.prototype&&e.prototype.render?4:e.render?32776:8}function Re(i,e,t,n,o){i=UU(i,e);var s=new Tg(1,null,null,i,n,KU(i,e,t),jU(i,e,o),e);return Jl.createVNode&&Jl.createVNode(s),s}function ru(i,e){return new Tg(1,nt(i)||i===!0||i===!1?"":i,null,16,e,null,null,null)}function fn(i,e,t){var n=tt(8192,8192,null,i,e,null,t,null);switch(n.childFlags){case 1:n.children=Ag(),n.childFlags=2;break;case 16:n.children=[ru(i)],n.childFlags=4;break}return n}function Ft(i){var e=i.props;if(e){var t=i.flags;t&481&&(e.children!==void 0&&nt(i.children)&&lM(i,e.children),e.className!==void 0&&(nt(i.className)&&(i.className=e.className||null),e.className=void 0)),e.key!==void 0&&(i.key=e.key,e.key=void 0),e.ref!==void 0&&(t&8?i.ref=Gr(i.ref,e.ref):i.ref=e.ref,e.ref=void 0)}return i}function qU(i){var e=i.children,t=i.childFlags;return fn(t===2?Hi(e):e.map(Hi),t,i.key)}function Hi(i){var e=i.flags&-16385,t=i.props;if(e&14&&!En(t)){var n=t;t={};for(var o in n)t[o]=n[o]}return(e&8192)===0?new Tg(i.childFlags,i.children,i.className,e,i.key,t,i.ref,i.type):qU(i)}function Ag(){return ru("",null)}function rM(i,e,t,n){for(var o=i.length;t<o;t++){var s=i[t];if(!tu(s)){var r=n+Jc+t;if(eu(s))rM(s,e,0,r);else{if(Ig(s))s=ru(s,r);else{var a=s.key,l=iu(a)&&a[0]===Jc;(s.flags&81920||l)&&(s=Hi(s)),s.flags|=65536,l?a.substring(0,n.length)!==n&&(s.key=n+a):En(a)?s.key=r:s.key=n+a}e.push(s)}}}}function aM(i){switch(i){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case $U:return 8192;default:return 1}}function lM(i,e){var t,n=1;if(tu(e))t=e;else if(Ig(e))n=16,t=e;else if(eu(e)){for(var o=e.length,s=0;s<o;++s){var r=e[s];if(tu(r)||eu(r)){t=t||e.slice(0,s),rM(e,t,s,"");break}else if(Ig(r))t=t||e.slice(0,s),t.push(ru(r,Jc+s));else{var a=r.key,l=(r.flags&81920)>0,d=En(a),c=iu(a)&&a[0]===Jc;l||d||c?(t=t||e.slice(0,s),(l||c)&&(r=Hi(r)),(d||c)&&(r.key=Jc+s),t.push(r)):t&&t.push(r),r.flags|=65536}}t=t||e,t.length===0?n=1:n=8}else t=e,t.flags|=65536,e.flags&81920&&(t=Hi(e)),n=2;return i.children=t,i.childFlags=n,i}function au(i){return tu(i)||Ig(i)?ru(i,null):eu(i)?fn(i,0,null):i.flags&16384?Hi(i):i}var Ma="http://www.w3.org/1999/xlink",sb="http://www.w3.org/XML/1998/namespace",YA={"xlink:actuate":Ma,"xlink:arcrole":Ma,"xlink:href":Ma,"xlink:role":Ma,"xlink:show":Ma,"xlink:title":Ma,"xlink:type":Ma,"xml:base":sb,"xml:lang":sb,"xml:space":sb};function Mg(i){return{onClick:i,onDblClick:i,onFocusIn:i,onFocusOut:i,onKeyDown:i,onKeyPress:i,onKeyUp:i,onMouseDown:i,onMouseMove:i,onMouseUp:i,onTouchEnd:i,onTouchMove:i,onTouchStart:i}}var dM=Mg(0),rb=Mg(null),cM=Mg(!0);function XA(i,e){var t=e.$EV;return t||(t=e.$EV=Mg(null)),t[i]||++dM[i]===1&&(rb[i]=i2(i)),t}function uM(i,e){var t=e.$EV;t&&t[i]&&(--dM[i]===0&&(document.removeEventListener(cb(i),rb[i]),rb[i]=null),t[i]=null)}function YU(i,e,t,n){if(Rt(t))XA(i,n)[i]=t;else if(db(t)){if(oM(e,t))return;XA(i,n)[i]=t}else uM(i,n)}function XU(i){return Rt(i.composedPath)?i.composedPath()[0]:i.target}function hM(i,e,t,n){var o=XU(i);do{if(e&&o.disabled)return;var s=o.$EV;if(s){var r=s[t];if(r&&(n.dom=o,r.event?r.event(r.data,i):r(i),i.cancelBubble))return}o=o.parentNode}while(!En(o))}function QU(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function ZU(){return this.defaultPrevented}function JU(){return this.cancelBubble}function pM(i){var e={dom:document};return i.isDefaultPrevented=ZU,i.isPropagationStopped=JU,i.stopPropagation=QU,Object.defineProperty(i,"currentTarget",{configurable:!0,get:function(){return e.dom}}),e}function e2(i){return function(e){if(e.button!==0){e.stopPropagation();return}hM(e,!0,i,pM(e))}}function t2(i){return function(e){hM(e,!1,i,pM(e))}}function i2(i){var e=i==="onClick"||i==="onDblClick"?e2(i):t2(i);return document.addEventListener(cb(i),e),e}function n2(i,e){var t=document.createElement("i");return t.innerHTML=e,t.innerHTML===i.innerHTML}function QA(i,e,t){if(i[e]){var n=i[e];n.event?n.event(n.data,t):n(t)}else{var o=e.toLowerCase();i[o]&&i[o](t)}}function lu(i,e){var t=function(n){var o=this.$V;if(o){var s=o.props||Ri,r=o.dom;if(iu(i))QA(s,i,n);else for(var a=0;a<i.length;++a)QA(s,i[a],n);if(Rt(e)){var l=this.$V,d=l.props||Ri;e(d,r,!1,l)}}};return Object.defineProperty(t,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),t}function Ra(i,e,t){var n="$"+e,o=i[n];if(o){if(o[1].wrapped)return;i.removeEventListener(o[0],o[1]),i[n]=null}Rt(t)&&(i.addEventListener(e,t),i[n]=[e,t])}function pb(i){return i==="checkbox"||i==="radio"}var o2=lu("onInput",gb),s2=lu(["onClick","onChange"],gb);function gM(i){i.stopPropagation()}gM.wrapped=!0;function r2(i,e){pb(e.type)?(Ra(i,"change",s2),Ra(i,"click",gM)):Ra(i,"input",o2)}function gb(i,e){var t=i.type,n=i.value,o=i.checked,s=i.multiple,r=i.defaultValue,a=!nt(n);t&&t!==e.type&&e.setAttribute("type",t),!nt(s)&&s!==e.multiple&&(e.multiple=s),!nt(r)&&!a&&(e.defaultValue=r+""),pb(t)?(a&&(e.value=n),nt(o)||(e.checked=o)):a&&e.value!==n?(e.defaultValue=n,e.value=n):nt(o)||(e.checked=o)}function Qc(i,e){if(i.type==="option")a2(i,e);else{var t=i.children,n=i.flags;if(n&4)Qc(t.$LI,e);else if(n&8)Qc(t,e);else if(i.childFlags===2)Qc(t,e);else if(i.childFlags&12)for(var o=0,s=t.length;o<s;++o)Qc(t[o],e)}}function a2(i,e){var t=i.props||Ri,n=i.dom;n.value=t.value,t.value===e||eu(e)&&e.indexOf(t.value)!==-1?n.selected=!0:(!nt(e)||!nt(t.selected))&&(n.selected=t.selected||!1)}var l2=lu("onChange",mM);function d2(i){Ra(i,"change",l2)}function mM(i,e,t,n){var o=!!i.multiple;!nt(i.multiple)&&o!==e.multiple&&(e.multiple=o);var s=i.selectedIndex;s===-1&&(e.selectedIndex=-1);var r=n.childFlags;if(r!==1){var a=i.value;NU(s)&&s>-1&&e.options[s]&&(a=e.options[s].value),t&&nt(a)&&(a=i.defaultValue),Qc(n,a)}}var c2=lu("onInput",fM),u2=lu("onChange");function h2(i,e){Ra(i,"input",c2),e.onChange&&Ra(i,"change",u2)}function fM(i,e,t){var n=i.value,o=e.value;if(nt(n)){if(t){var s=i.defaultValue;!nt(s)&&s!==o&&(e.defaultValue=s,e.value=s)}}else o!==n&&(e.defaultValue=n,e.value=n)}function _M(i,e,t,n,o,s){i&64?gb(n,t):i&256?mM(n,t,o,e):i&128&&fM(n,t,o),s&&(t.$V=e)}function p2(i,e,t){i&64?r2(e,t):i&256?d2(e):i&128&&h2(e,t)}function CM(i){return i.type&&pb(i.type)?!nt(i.checked):!nt(i.value)}function Ct(){return{current:null}}function Dg(i){i&&!hb(i,null)&&i.current&&(i.current=null)}function ed(i,e,t){i&&(Rt(i)||i.current!==void 0)&&t.push(function(){!hb(i,e)&&i.current!==void 0&&(i.current=e)})}function Ho(i,e){tr(i),su(i,e)}function tr(i){var e=i.flags,t=i.children,n;if(e&481){n=i.ref;var o=i.props;Dg(n);var s=i.childFlags;if(!En(o))for(var r=Object.keys(o),a=0,l=r.length;a<l;a++){var d=r[a];cM[d]&&uM(d,i.dom)}s&12?ou(t):s===2&&tr(t)}else t&&(e&4?(Rt(t.componentWillUnmount)&&t.componentWillUnmount(),Dg(i.ref),t.$UN=!0,tr(t.$LI)):e&8?(n=i.ref,!nt(n)&&Rt(n.onComponentWillUnmount)&&n.onComponentWillUnmount(Fn(i,!0),i.props||Ri),tr(t)):e&1024?Ho(t,i.ref):e&8192&&i.childFlags&12&&ou(t))}function ou(i){for(var e=0,t=i.length;e<t;++e)tr(i[e])}function Eg(i){i.textContent=""}function wg(i,e,t){ou(t),e.flags&8192?su(e,i):Eg(i)}function g2(i){var e=i.event;return function(t){e(i.data,t)}}function m2(i,e,t,n){if(db(t)){if(oM(e,t))return;t=g2(t)}Ra(n,cb(i),t)}function f2(i,e,t){if(nt(e)){t.removeAttribute("style");return}var n=t.style,o,s;if(iu(e)){n.cssText=e;return}if(!nt(i)&&!iu(i)){for(o in e)s=e[o],s!==i[o]&&n.setProperty(o,s);for(o in i)nt(e[o])&&n.removeProperty(o)}else for(o in e)s=e[o],n.setProperty(o,s)}function _2(i,e,t,n){var o=i&&i.__html||"",s=e&&e.__html||"";o!==s&&!nt(s)&&!n2(n,s)&&(En(t)||(t.childFlags&12?ou(t.children):t.childFlags===2&&tr(t.children),t.children=null,t.childFlags=1),n.innerHTML=s)}function ab(i,e,t,n,o,s,r){switch(i){case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":case"selectedIndex":break;case"autoFocus":n.autofocus=!!t;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[i]=!!t;break;case"defaultChecked":case"value":case"volume":if(s&&i==="value")break;var a=nt(t)?"":t;n[i]!==a&&(n[i]=a);break;case"style":f2(e,t,n);break;case"dangerouslySetInnerHTML":_2(e,t,r,n);break;default:cM[i]?YU(i,e,t,n):i.charCodeAt(0)===111&&i.charCodeAt(1)===110?m2(i,e,t,n):nt(t)?n.removeAttribute(i):o&&YA[i]?n.setAttributeNS(YA[i],i,t):n.setAttribute(i,t);break}}function mb(i,e,t,n,o){var s=!1,r=(e&448)>0;r&&(s=CM(t),s&&p2(e,n,t));for(var a in t)ab(a,null,t[a],n,o,s,null);r&&_M(e,i,n,t,!0,s)}function xM(i,e,t){var n=au(i.render(e,i.state,t)),o=t;return Rt(i.getChildContext)&&(o=Gr(t,i.getChildContext())),i.$CX=o,n}function fb(i,e,t,n,o,s){var r=new e(t,n),a=r.$N=!!(e.getDerivedStateFromProps||r.getSnapshotBeforeUpdate);if(r.$SVG=o,r.$L=s,i.children=r,r.$BS=!1,r.context=n,r.props===Ri&&(r.props=t),a)r.state=nM(r,t,r.state);else if(Rt(r.componentWillMount)){r.$BR=!0,r.componentWillMount();var l=r.$PS;if(!En(l)){var d=r.state;if(En(d))r.state=l;else for(var c in l)d[c]=l[c];r.$PS=null}r.$BR=!1}return r.$LI=xM(r,t,n),r}function Rg(i,e){var t=i.props||Ri;return i.flags&32768?i.type.render(t,i.ref,e):i.type(t,e)}function Fi(i,e,t,n,o,s){var r=i.flags|=16384;r&481?_b(i,e,t,n,o,s):r&4?v2(i,e,t,n,o,s):r&8?(b2(i,e,t,n,o,s),xb(i,s)):r&512||r&16?vM(i,e,o):r&8192?x2(i,t,e,n,o,s):r&1024&&C2(i,t,e,o,s)}function C2(i,e,t,n,o){Fi(i.children,i.ref,e,!1,null,o);var s=Ag();vM(s,t,n),i.dom=s.dom}function x2(i,e,t,n,o,s){var r=i.children,a=i.childFlags;a&12&&r.length===0&&(a=i.childFlags=2,r=i.children=Ag()),a===2?Fi(r,t,e,n,o,s):Fa(r,t,e,n,o,s)}function vM(i,e,t){var n=i.dom=document.createTextNode(i.children);En(e)||ub(e,n,t)}function _b(i,e,t,n,o,s){var r=i.flags,a=i.props,l=i.className,d=i.childFlags,c=i.dom=zU(i.type,n=n||(r&32)>0),h=i.children;if(!nt(l)&&l!==""&&(n?c.setAttribute("class",l):c.className=l),d===16)Zc(c,h);else if(d!==1){var p=n&&i.type!=="foreignObject";d===2?(h.flags&16384&&(i.children=h=Hi(h)),Fi(h,c,t,p,null,s)):(d===8||d===4)&&Fa(h,c,t,p,null,s)}En(e)||ub(e,c,o),En(a)||mb(i,r,a,c,n),ed(i.ref,c,s)}function Fa(i,e,t,n,o,s){for(var r=0;r<i.length;++r){var a=i[r];a.flags&16384&&(i[r]=a=Hi(a)),Fi(a,e,t,n,o,s)}}function v2(i,e,t,n,o,s){var r=fb(i,i.type,i.props||Ri,t,n,s);Fi(r.$LI,e,r.$CX,n,o,s),Cb(i.ref,r,s)}function b2(i,e,t,n,o,s){Fi(i.children=au(Rg(i,t)),e,t,n,o,s)}function y2(i){return function(){i.componentDidMount()}}function Cb(i,e,t){ed(i,e,t),Rt(e.componentDidMount)&&t.push(y2(e))}function O2(i,e){return function(){i.onComponentDidMount(Fn(e,!0),e.props||Ri)}}function xb(i,e){var t=i.ref;nt(t)||(hb(t.onComponentWillMount,i.props||Ri),Rt(t.onComponentDidMount)&&e.push(O2(t,i)))}function E2(i,e,t,n,o,s){tr(i),(e.flags&i.flags&2033)!==0?(Fi(e,null,n,o,null,s),WU(t,e.dom,i.dom)):(Fi(e,t,n,o,Fn(i,!0),s),su(i,t))}function ir(i,e,t,n,o,s,r){var a=e.flags|=16384;i.flags!==a||i.type!==e.type||i.key!==e.key||a&2048?i.flags&16384?E2(i,e,t,n,o,r):Fi(e,t,n,o,s,r):a&481?T2(i,e,n,o,a,r):a&4?R2(i,e,t,n,o,s,r):a&8?F2(i,e,t,n,o,s,r):a&16?P2(i,e):a&512?e.dom=i.dom:a&8192?I2(i,e,t,n,o,r):D2(i,e,n,r)}function w2(i,e,t){i!==e&&(i!==""?t.firstChild.nodeValue=e:Zc(t,e))}function S2(i,e){i.textContent!==e&&(i.textContent=e)}function I2(i,e,t,n,o,s){var r=i.children,a=e.children,l=i.childFlags,d=e.childFlags,c=null;d&12&&a.length===0&&(d=e.childFlags=2,a=e.children=Ag());var h=(d&2)!==0;if(l&12){var p=r.length;(l&8&&d&8||h||!h&&a.length>p)&&(c=Fn(r[p-1],!1).nextSibling)}vb(l,d,r,a,t,n,o,c,i,s)}function D2(i,e,t,n){var o=i.ref,s=e.ref,r=e.children;if(vb(i.childFlags,e.childFlags,i.children,r,o,t,!1,null,i,n),e.dom=i.dom,o!==s&&!tu(r)){var a=r.dom;eM(o,a),JA(s,a)}}function T2(i,e,t,n,o,s){var r=e.dom=i.dom,a=i.props,l=e.props,d=!1,c=!1,h;if(n=n||(o&32)>0,a!==l){var p=a||Ri;if(h=l||Ri,h!==Ri){d=(o&448)>0,d&&(c=CM(h));for(var g in h){var C=p[g],v=h[g];C!==v&&ab(g,C,v,r,n,c,i)}}if(p!==Ri)for(var b in p)nt(h[b])&&!nt(p[b])&&ab(b,p[b],null,r,n,c,i)}var T=e.children,M=e.className;i.className!==M&&(nt(M)?r.removeAttribute("class"):n?r.setAttribute("class",M):r.className=M),o&4096?S2(r,T):vb(i.childFlags,e.childFlags,i.children,T,r,t,n&&e.type!=="foreignObject",null,i,s),d&&_M(o,e,r,h,!1,c);var G=e.ref,te=i.ref;te!==G&&(Dg(te),ed(G,r,s))}function A2(i,e,t,n,o,s){tr(i),Fa(e,t,n,o,Fn(i,!0),s),su(i,t)}function vb(i,e,t,n,o,s,r,a,l,d){switch(i){case 2:switch(e){case 2:ir(t,n,o,s,r,a,d);break;case 1:Ho(t,o);break;case 16:tr(t),Zc(o,n);break;default:A2(t,n,o,s,r,d);break}break;case 1:switch(e){case 2:Fi(n,o,s,r,a,d);break;case 1:break;case 16:Zc(o,n);break;default:Fa(n,o,s,r,a,d);break}break;case 16:switch(e){case 16:w2(t,n,o);break;case 2:Eg(o),Fi(n,o,s,r,a,d);break;case 1:Eg(o);break;default:Eg(o),Fa(n,o,s,r,a,d);break}break;default:switch(e){case 16:ou(t),Zc(o,n);break;case 2:wg(o,l,t),Fi(n,o,s,r,a,d);break;case 1:wg(o,l,t);break;default:var c=t.length|0,h=n.length|0;c===0?h>0&&Fa(n,o,s,r,a,d):h===0?wg(o,l,t):e===8&&i===8?B2(t,n,o,s,r,c,h,a,l,d):k2(t,n,o,s,r,c,h,a,d);break}break}}function M2(i,e,t,n,o){o.push(function(){i.componentDidUpdate(e,t,n)})}function bM(i,e,t,n,o,s,r,a,l){var d=i.state,c=i.props,h=!!i.$N,p=Rt(i.shouldComponentUpdate);if(h&&(e=nM(i,t,e!==d?Gr(d,e):e)),r||!p||p&&i.shouldComponentUpdate(t,e,o)){!h&&Rt(i.componentWillUpdate)&&i.componentWillUpdate(t,e,o),i.props=t,i.state=e,i.context=o;var g=null,C=xM(i,t,o);h&&Rt(i.getSnapshotBeforeUpdate)&&(g=i.getSnapshotBeforeUpdate(c,d)),ir(i.$LI,C,n,i.$CX,s,a,l),i.$LI=C,Rt(i.componentDidUpdate)&&M2(i,c,d,g,l)}else i.props=t,i.state=e,i.context=o}function R2(i,e,t,n,o,s,r){var a=e.children=i.children;if(!En(a)){a.$L=r;var l=e.props||Ri,d=e.ref,c=i.ref,h=a.state;if(!a.$N){if(Rt(a.componentWillReceiveProps)){if(a.$BR=!0,a.componentWillReceiveProps(l,n),a.$UN)return;a.$BR=!1}En(a.$PS)||(h=Gr(h,a.$PS),a.$PS=null)}bM(a,h,l,t,n,o,!1,s,r),c!==d&&(Dg(c),ed(d,a,r))}}function F2(i,e,t,n,o,s,r){var a=!0,l=e.props||Ri,d=e.ref,c=i.props,h=!nt(d),p=i.children;if(h&&Rt(d.onComponentShouldUpdate)&&(a=d.onComponentShouldUpdate(c,l)),a!==!1){h&&Rt(d.onComponentWillUpdate)&&d.onComponentWillUpdate(c,l);var g=au(Rg(e,n));ir(p,g,t,n,o,s,r),e.children=g,h&&Rt(d.onComponentDidUpdate)&&d.onComponentDidUpdate(c,l)}else e.children=p}function P2(i,e){var t=e.children,n=e.dom=i.dom;t!==i.children&&(n.nodeValue=t)}function k2(i,e,t,n,o,s,r,a,l){for(var d=s>r?r:s,c=0,h,p;c<d;++c)h=e[c],p=i[c],h.flags&16384&&(h=e[c]=Hi(h)),ir(p,h,t,n,o,a,l),i[c]=h;if(s<r)for(c=d;c<r;++c)h=e[c],h.flags&16384&&(h=e[c]=Hi(h)),Fi(h,t,n,o,a,l);else if(s>r)for(c=d;c<s;++c)Ho(i[c],t)}function B2(i,e,t,n,o,s,r,a,l,d){var c=s-1,h=r-1,p=0,g=i[p],C=e[p],v,b;e:{for(;g.key===C.key;){if(C.flags&16384&&(e[p]=C=Hi(C)),ir(g,C,t,n,o,a,d),i[p]=C,++p,p>c||p>h)break e;g=i[p],C=e[p]}for(g=i[c],C=e[h];g.key===C.key;){if(C.flags&16384&&(e[h]=C=Hi(C)),ir(g,C,t,n,o,a,d),i[c]=C,c--,h--,p>c||p>h)break e;g=i[c],C=e[h]}}if(p>c){if(p<=h)for(v=h+1,b=v<r?Fn(e[v],!0):a;p<=h;)C=e[p],C.flags&16384&&(e[p]=C=Hi(C)),++p,Fi(C,t,n,o,b,d)}else if(p>h)for(;p<=c;)Ho(i[p++],t);else V2(i,e,n,s,r,c,h,p,t,o,a,l,d)}function V2(i,e,t,n,o,s,r,a,l,d,c,h,p){var g,C,v,b=0,T=a,M=a,G=s-a+1,te=r-a+1,oe=new Int32Array(te+1),re=G===n,Ie=!1,Fe=0,We=0;if(o<4||(G|te)<32)for(b=T;b<=s;++b)if(g=i[b],We<te){for(a=M;a<=r;a++)if(C=e[a],g.key===C.key){if(oe[a-M]=b+1,re)for(re=!1;T<b;)Ho(i[T++],l);Fe>a?Ie=!0:Fe=a,C.flags&16384&&(e[a]=C=Hi(C)),ir(g,C,l,t,d,c,p),++We;break}!re&&a>r&&Ho(g,l)}else re||Ho(g,l);else{var di={};for(b=M;b<=r;++b)di[e[b].key]=b;for(b=T;b<=s;++b)if(g=i[b],We<te)if(a=di[g.key],a!==void 0){if(re)for(re=!1;b>T;)Ho(i[T++],l);oe[a-M]=b+1,Fe>a?Ie=!0:Fe=a,C=e[a],C.flags&16384&&(e[a]=C=Hi(C)),ir(g,C,l,t,d,c,p),++We}else re||Ho(g,l);else re||Ho(g,l)}if(re)wg(l,h,i),Fa(e,l,t,d,c,p);else if(Ie){var St=L2(oe);for(a=St.length-1,b=te-1;b>=0;b--)oe[b]===0?(Fe=b+M,C=e[Fe],C.flags&16384&&(e[Fe]=C=Hi(C)),v=Fe+1,Fi(C,l,t,d,v<o?Fn(e[v],!0):c,p)):a<0||b!==St[a]?(Fe=b+M,C=e[Fe],v=Fe+1,iM(C,l,v<o?Fn(e[v],!0):c)):a--}else if(We!==te)for(b=te-1;b>=0;b--)oe[b]===0&&(Fe=b+M,C=e[Fe],C.flags&16384&&(e[Fe]=C=Hi(C)),v=Fe+1,Fi(C,l,t,d,v<o?Fn(e[v],!0):c,p))}var er,Og,ZA=0;function L2(i){var e=0,t=0,n=0,o=0,s=0,r=0,a=0,l=i.length;for(l>ZA&&(ZA=l,er=new Int32Array(l),Og=new Int32Array(l));t<l;++t)if(e=i[t],e!==0){if(n=er[o],i[n]<e){Og[t]=n,er[++o]=t;continue}for(s=0,r=o;s<r;)a=s+r>>1,i[er[a]]<e?s=a+1:r=a;e<i[er[s]]&&(s>0&&(Og[t]=er[s-1]),er[s]=t)}s=o+1;var d=new Int32Array(s);for(r=er[s-1];s-- >0;)d[s]=r,r=Og[r],er[s]=0;return d}var N2=typeof document<"u";N2&&window.Node&&(Node.prototype.$EV=null,Node.prototype.$V=null);function H2(i,e,t,n){var o=[],s=e.$V;nu.v=!0,nt(s)?nt(i)||(i.flags&16384&&(i=Hi(i)),Fi(i,e,n,!1,null,o),e.$V=i,s=i):nt(i)?(Ho(s,e),e.$V=null):(i.flags&16384&&(i=Hi(i)),ir(s,i,e,n,!1,null,o),s=e.$V=i),tM(o),nu.v=!1,Rt(t)&&t(),Rt(Jl.renderComplete)&&Jl.renderComplete(s,e)}function Pa(i,e,t,n){t===void 0&&(t=null),n===void 0&&(n=Ri),H2(i,e,t,n)}var Sg=[],$2=typeof Promise<"u"?Promise.resolve().then.bind(Promise.resolve()):function(i){window.setTimeout(i,0)},lb=!1;function yM(i,e,t,n){var o=i.$PS;if(Rt(e)&&(e=e(o?Gr(i.state,o):i.state,i.props,i.context)),nt(o))i.$PS=e;else for(var s in e)o[s]=e[s];if(i.$BR)Rt(t)&&i.$L.push(t.bind(i));else{if(!nu.v&&Sg.length===0){OM(i,n),Rt(t)&&t.call(i);return}if(Sg.indexOf(i)===-1&&Sg.push(i),n&&(i.$F=!0),lb||(lb=!0,$2(bb)),Rt(t)){var r=i.$QU;r||(r=i.$QU=[]),r.push(t)}}}function z2(i){for(var e=i.$QU,t=0;t<e.length;++t)e[t].call(i);i.$QU=null}function bb(){var i;for(lb=!1;i=Sg.shift();)if(!i.$UN){var e=i.$F;i.$F=!1,OM(i,e),i.$QU&&z2(i)}}function OM(i,e){if(e||!i.$BR){var t=i.$PS;i.$PS=null;var n=[];nu.v=!0,bM(i,Gr(i.state,t),i.props,Fn(i.$LI,!0).parentNode,i.context,i.$SVG,e,null,n),tM(n),nu.v=!1}else i.state=i.$PS,i.$PS=null}var ka=function(e,t){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=e||Ri,this.context=t||Ri};ka.prototype.forceUpdate=function(e){this.$UN||yM(this,{},e,!0)};ka.prototype.setState=function(e,t){this.$UN||this.$BS||yM(this,e,t,!1)};ka.prototype.render=function(e,t,n){return null};var fs={lockCount:0,lock(){this.lockCount++},callbacks:[],callEffects(){if(this.lockCount--,this.lockCount<0)throw new Error("Unexpected Effect Call");if(this.lockCount===0){let i=this.callbacks;this.callbacks=[],i.forEach(e=>e())}}};var yb=(i,e)=>{if(!(i instanceof Object&&e instanceof Object))return i===e;let n=Object.keys(i),o=Object.keys(e);return n.length!==o.length?!1:!n.some(r=>i[r]!==e[r])},Dt=class extends ka{constructor(){super(...arguments),this._pendingContext=this.context}componentWillReceiveProps(e,t){this._pendingContext=t??{}}shouldComponentUpdate(e,t){return!yb(this.props,e)||!yb(this.state,t)||!yb(this.context,this._pendingContext)}},$i=class extends Dt{constructor(){super(...arguments),this._effects=[]}createEffects(){return[]}updateEffects(){}componentWillMount(){fs.lock()}componentWillUpdate(e,t,n){fs.lock()}componentDidMount(){fs.callbacks.push(()=>{this._effects=this.createEffects()}),fs.callEffects()}componentDidUpdate(){fs.callbacks.push(()=>this.updateEffects()),fs.callEffects()}destroyEffects(){this._effects.forEach(e=>e.dispose())}componentWillUnmount(){this.destroyEffects()}},fo=class extends $i{constructor(){super(...arguments),this.vDomElement=null}vDomUpdateClasses(){let e=this.vDomElement,t=e.className.length?e.className.split(" "):[],n=t.filter(s=>e.dxClasses.previous.indexOf(s)<0),o=e.dxClasses.previous.filter(s=>t.indexOf(s)<0);n.forEach(s=>{let r=e.dxClasses.removed.indexOf(s);r>-1?e.dxClasses.removed.splice(r,1):e.dxClasses.added.includes(s)||e.dxClasses.added.push(s)}),o.forEach(s=>{let r=e.dxClasses.added.indexOf(s);r>-1?e.dxClasses.added.splice(r,1):e.dxClasses.removed.includes(s)||e.dxClasses.removed.push(s)})}componentDidMount(){let e=Fn(this.$LI,!0);this.vDomElement=e,super.componentDidMount(),e.dxClasses=e.dxClasses||{removed:[],added:[],previous:[]},e.dxClasses.previous=e?.className.length?e.className.split(" "):[]}componentDidUpdate(){super.componentDidUpdate();let e=this.vDomElement;e!==null&&(e.dxClasses.added.forEach(t=>e.classList.add(t)),e.dxClasses.removed.forEach(t=>e.classList.remove(t)),e.dxClasses.previous=e.className.length?e.className.split(" "):[])}shouldComponentUpdate(e,t){let n=super.shouldComponentUpdate(e,t);return n&&this.vDomUpdateClasses(),n}};var W2=0,Fg=function(i){let e=W2++;return{id:e,defaultValue:i,Provider:class extends ka{getChildContext(){return Object.assign(Object.assign({},this.context),{[e]:this.props.value||i})}render(){return this.props.children}}}};var Ke=class{constructor(e,t){this.dependency=t,this.effect=e,this.destroy=e()}update(e){let t=this.dependency;e&&(this.dependency=e),(!e||e.some((n,o)=>t[o]!==n))&&(this.dispose(),this.destroy=this.effect())}dispose(){this.destroy&&this.destroy()}};var _s=()=>new Ke(()=>{bb()},[]);var G2="a runtime error occured! Use Inferno in development environment to find the error.";function EM(i){return i==null}function wM(i){return i===null||i===!1||i===!0||i===void 0}function SM(i){return typeof i=="function"}function Ba(i){return i===null}function IM(i){throw i||(i=G2),new Error(`Inferno Error: ${i}`)}function j2(i,e){let t=document.createElement("i");return t.innerHTML=e,t.innerHTML===i.innerHTML}function K2(i){let e,t;for(;i;){if(e=i.flags,e&2033)return i.dom;t=i.children,e&8192?i=i.childFlags===2?t:t[t.length-1]:e&4?i=t.$LI:i=t}return null}function U2(i,e){return!!(e&&e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html&&j2(i,e.dangerouslySetInnerHTML.__html))}function q2(i,e,t,n,o,s,r){let a=i.type,l=i.ref,d=i.props||Ri,c;if(s){let h=fb(i,a,d,n,o,r),p=h.$LI;c=du(p,e,t,h.$CX,o,r),Cb(l,h,r)}else{let h=au(Rg(i,n));c=du(h,e,t,n,o,r),i.children=h,xb(i,r)}return c}function DM(i,e,t,n,o,s){let r=i.childFlags,a=i.children,l=i.props,d=i.flags;if(r!==1){if(r===2)Ba(t)?Fi(a,e,n,o,null,s):(t=du(a,e,t,n,o,s),t=t?t.nextSibling:null);else if(r===16)Ba(t)?e.appendChild(document.createTextNode(a)):e.childNodes.length!==1||t.nodeType!==3?e.textContent=a:t.nodeValue!==a&&(t.nodeValue=a),t=null;else if(r&12){let c=!1;for(let h=0,p=a.length;h<p;++h){let g=a[h];Ba(t)||c&&(g.flags&16)>0?Fi(g,e,n,o,t,s):(t=du(g,e,t,n,o,s),t=t?t.nextSibling:null),c=(g.flags&16)>0}}if((d&8192)===0){let c=null;for(;t;)c=t.nextSibling,e.removeChild(t),t=c}}else!Ba(e.firstChild)&&!U2(e,l)&&(e.textContent="",d&448&&(e.defaultValue=""))}function Y2(i,e,t,n,o,s){let r=i.props,a=i.className,l=i.flags,d=i.ref;return o=o||(l&32)>0,t.nodeType!==1?(_b(i,null,n,o,null,s),e.replaceChild(i.dom,t)):(i.dom=t,DM(i,t,t.firstChild,n,o,s),Ba(r)||mb(i,l,r,t,o),EM(a)?t.className!==""&&t.removeAttribute("class"):o?t.setAttribute("class",a):t.className=a,ed(d,t,s)),i.dom}function TM(i,e,t){if(t.nodeType!==3)e.replaceChild(i.dom=document.createTextNode(i.children),t);else{let n=i.children;t.nodeValue!==n&&(t.nodeValue=n),i.dom=t}return i.dom}function X2(i,e,t,n,o,s){let r=i.children;return i.childFlags===2?(TM(r,e,t),r.dom):(DM(i,e,t,n,o,s),K2(r[r.length-1]))}function du(i,e,t,n,o,s){let r=i.flags|=16384;return r&14?q2(i,e,t,n,o,(r&4)>0,s):r&481?Y2(i,e,t,n,o,s):r&16?TM(i,e,t):r&512?i.dom=t:r&8192?X2(i,e,t,n,o,s):(IM(),null)}function AM(i,e,t){let n=e.firstChild;if(Ba(n))Pa(i,e,t);else{let o=[];for(wM(i)||(n=du(i,e,n,{},!1,o));n&&(n=n.nextSibling);)e.removeChild(n);if(o.length>0){let s;for(;(s=o.shift())!==void 0;)s()}}e.$V=i,SM(t)&&t()}function MM(i){return i==null}function Q2(i){return typeof i=="string"}function RM(i){return i===void 0}var Z2={onComponentDidMount:1,onComponentDidUpdate:1,onComponentShouldUpdate:1,onComponentWillMount:1,onComponentWillUnmount:1,onComponentWillUpdate:1};function td(i,e,t){var n=arguments,o,s=null,r=null,a=null,l=0,d,c=arguments.length-2;if(c===1)o=t;else if(c>1)for(o=[];c-- >0;)o[c]=n[c+2];if(Q2(i)){if(l=aM(i),!MM(e)){d={};for(var h in e)h==="className"||h==="class"?a=e[h]:h==="key"?r=e.key:h==="children"&&RM(o)?o=e.children:h==="ref"?s=e.ref:(h==="contenteditable"&&(l|=4096),d[h]=e[h])}}else{if(l=2,RM(o)||(e||(e={}),e.children=o),!MM(e)){d={};for(var p in e)p==="key"?r=e.key:p==="ref"?s=e.ref:Z2[p]===1?(s||(s={}),s[p]=e[p]):d[p]=e[p]}return Re(l,i,d,r,s)}return l&8192?fn(c===1?[o]:o,0,r):tt(l,i,a,o,0,d,r,s)}var J2=i=>{var e,t;return((e=i.container)===null||e===void 0?void 0:e.get(0))||((t=i.item)===null||t===void 0?void 0:t.get(0))};function FM(i,e,t){setTimeout(()=>{Pa(td(i,e),J2(e))},0)}var PM=(i,e,t)=>{let n=e[i];return!!n&&typeof n!="string"};var e3=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"]),t3=i=>typeof i=="number"?!0:!Number.isNaN(Number(i)),i3=(i,e)=>e3.has(i)?e:`${e}px`,n3=/[A-Z]/g,o3=i=>i.replace(n3,"-$&").toLowerCase();function id(i){if(i instanceof Object)return Object.entries(i).reduce((e,[t,n])=>(e[o3(t)]=t3(n)?i3(t,n):n,e),{})}var kM=i=>{let{parentNode:e}=i;if(e){let t=i.nextSibling;Dr(i),e.$V=i.$V,Pa(null,e),e.insertBefore(i,t),i.innerHTML="",delete e.$V}delete i.$V},Va=Lt({createElement:(i,e)=>td(i,e),remove:kM,onAfterRender:()=>{fs.callEffects()},onPreRender:()=>{fs.lock()},render:(i,e,t,n)=>{if(n)Pa(td(i,e),t);else{let{parentNode:o}=t,s=t?.nextSibling,r=S.createElement("div");r.appendChild(t);let a=S.createDocumentFragment().appendChild(r);!!t.$V&&kM(t),AM(td(i,e),a),t.$V=a.$V,o&&o.insertBefore(t,s)}}});var BM=(i,e)=>Object.keys(i).length!==Object.keys(e).length?!1:Object.keys(i).every(t=>i[t]===e[t]);var s3=["isEqual"];function r3(i){return!!i.toArray}function VM(i,e){let t={template:e,model:I({},i)},n=i.data??{},{isEqual:o}=n,s=_e(n,s3);return o&&(t.model.data=s,t.isEqual=o),t}function a3(i,e){let{data:t,index:n}=i.model??{data:{}};t&&Object.keys(t).forEach(s=>{t[s]&&S.isNode(t[s])&&(t[s]=H(u(t[s])))});let o=i.template.render(I({container:e,transclude:i.transclude},{renovated:i.renovated},i.transclude?{}:{model:t},!i.transclude&&Number.isFinite(n)?{index:n}:{}));return o===void 0?[]:r3(o)?o.toArray():[u(o).get(0)]}function l3(i,e){e.forEach(t=>{!!!i.find(o=>t===o)&&t.parentNode&&u(t).remove()})}var cu=class extends $i{constructor(e){super(e),this.renderTemplate=this.renderTemplate.bind(this)}renderTemplate(){let e=Fn(this.$LI,!0);if(!(e!=null&&e.parentNode))return()=>{};let t=e.parentNode,n=u(t),o=n.contents().toArray(),s=a3(this.props,H(n));return OD(u(e),u(s)),()=>{let r=u(t).contents().toArray();l3(o,r),t.appendChild(e)}}shouldComponentUpdate(e){let{model:t,template:n}=this.props,{isEqual:o,model:s,template:r}=e,a=o??BM;if(n!==r)return!0;if(!f(t)||!f(s))return t!==s;let{data:l,index:d}=t,{data:c,index:h}=s;return d!==h?!0:!a(l,c)}createEffects(){return[new Ke(this.renderTemplate,[this.props.template,this.props.model])]}updateEffects(){this._effects[0].update([this.props.template,this.props.model])}componentWillUnmount(){}render(){return null}};function Ob(i){return Array.isArray(i)?[...i]:I({},i)}function LM(i,e,t){let n=t.length>0&&e&&i!==e?Ob(e):Ob(i),o=t[0];return t.length>1?n[o]=LM(i[o],e?.[o],t.slice(1)):o&&(X(i[o])?n[o]=Ob(i[o]):n[o]=i[o]),n}function NM(i,e,t,n){let o=e[t],s=i[t],r=i;X(o)||t!==n&&Array.isArray(o)?r[t]=LM(o,s,Jn(n).slice(1)):r[t]=o}var Eb=(i,e)=>t=>{Object.prototype.hasOwnProperty.call(i,t)&&i[t]===void 0&&(i[t]=e(t))},HM=(()=>{class i extends pn{get _propsInfo(){return{allowNull:[],twoWay:[],elements:[],templates:[],props:[]}}constructor(t,n){super(t,n),this._shouldRaiseContentReady=!1,this.validateKeyDownHandler()}validateKeyDownHandler(){let n=this.getSupportedKeyNames().length>0,o=typeof this._viewComponent.prototype.keyDown=="function";if(n&&!o)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){let n=this._getContentReadyOptions().reduce((o,s)=>(o[s]=!0,o),{});return this._checkContentReadyOption=o=>!!n[o],this._checkContentReadyOption(t)}_getContentReadyOptions(){return["rtlEnabled"]}_fireContentReady(){this._actionsMap.onContentReady({})}_getDefaultOptions(){let t=this._getViewComponentDefaultProps();return m(!0,super._getDefaultOptions(),t,this._propsInfo.twoWay.reduce((n,o)=>{let[s,r,a]=o;return I({},n,{[s]:t[r],[a]:l=>this.option(s,l)})},{}),this._propsInfo.templates.reduce((n,o)=>I({},n,{[o]:null}),{}))}_getUnwrappedOption(){let t={};return Object.keys(this.option()).forEach(n=>{t[n]=this.option(n)}),t}_initializeComponent(){var t;super._initializeComponent(),(t=this._templateManager)===null||t===void 0||t.addDefaultTemplates(this.getDefaultTemplates());let n=this._getUnwrappedOption();this._props=this._optionsWithDefaultTemplates(n),this._propsInfo.templates.forEach(o=>{this._componentTemplates[o]=this._createTemplateComponent(this._props[o])}),Object.keys(this._getActionConfigsFull()).forEach(o=>this._addAction(o)),this._viewRef=Ct(),this.defaultKeyHandlers=this._createDefaultKeyHandlers()}_initMarkup(){let t=this.getProps();this._renderWrapper(t)}_renderWrapper(t){let n=this.$element()[0];this._isNodeReplaced||Va.onPreRender(),Va.render(this._viewComponent,t,n,this._isNodeReplaced),this._isNodeReplaced||(this._isNodeReplaced=!0,Va.onAfterRender(),this._shouldRaiseContentReady=!0),this._shouldRaiseContentReady&&(this._fireContentReady(),this._shouldRaiseContentReady=!1)}_silent(t,n){this._options.silent(t,n)}_render(){}_removeWidget(){Va.remove(this.$element()[0])}_dispose(){this._removeWidget(),super._dispose()}get elementAttr(){let t=this.$element()[0];if(!this._elementAttr){let{attributes:s}=t,r=Array.from(s).filter(a=>{var l;return!this._propsInfo.templates.includes(a.name)&&((l=s[a.name])===null||l===void 0?void 0:l.specified)}).reduce((a,l)=>{let{name:d,value:c}=l,h=a,p=d in t;return h[d]=c===""&&p?t[d]:c,h},{});this._elementAttr=r,this._storedClasses=t.getAttribute("class")||""}let n=t.style,o={};for(let s=0;s<n.length;s+=1)o[n[s]]=n.getPropertyValue(n[s]);return this._elementAttr.style=o,this._elementAttr.class=this._storedClasses,this._elementAttr}_getAdditionalActionConfigs(){return{onContentReady:{excludeValidators:["disabled","readOnly"]}}}_getAdditionalProps(){return[]}_patchOptionValues(t){let{allowNull:n,elements:o,props:s,twoWay:r}=this._propsInfo,a=this._getViewComponentDefaultProps(),l=Object.keys(a),d=this._getDefaultOptions(),{children:c,onKeyboardHandled:h,ref:p}=t,C={ref:p,children:c,onKeyDown:h?(v,b)=>{h(b)}:void 0};return[...s,...this._getAdditionalProps()].forEach(v=>{Object.prototype.hasOwnProperty.call(t,v)&&(C[v]=t[v])}),n.forEach(Eb(C,()=>null)),l.forEach(Eb(C,v=>d[v])),r.forEach(v=>{let[b,T]=v;Eb(C,()=>d[T])(b)}),o.forEach(v=>{if(v in C){let b=C[v];si(b)&&(C[v]=this._patchElementParam(b))}}),C}getSupportedKeyNames(){return[]}prepareStyleProp(t){return typeof t.style=="string"?I({},t,{style:{},cssText:t.style}):t}getProps(){let{elementAttr:t}=this.option(),n=this._patchOptionValues(I({},this._props,{ref:this._viewRef,children:this._extractDefaultSlot(),aria:this._aria}));return this._propsInfo.templates.forEach(o=>{n[o]=this._componentTemplates[o]}),this.prepareStyleProp(I({},n,this.elementAttr,t,{className:[...(this.elementAttr.class??"").split(" "),...(t?.class??"").split(" ")].filter((o,s,r)=>o&&r.indexOf(o)===s).join(" ").trim(),class:""},this._actionsMap))}_getActionConfigs(){return{}}_getActionConfigsFull(){return I({},this._getActionConfigs(),this._getAdditionalActionConfigs())}getDefaultTemplates(){let t=Object.values(this._templatesInfo),n={};return t.forEach(o=>{n[o]="dx-renovation-template-mock"}),n}get _templatesInfo(){return{}}_optionsWithDefaultTemplates(t){let n=Object.entries(this._templatesInfo).reduce((o,s)=>{let[r,a]=s;return I({},o,{[r]:t[r]??a})},{});return I({},t,n)}_init(){super._init(),this.customKeyHandlers={},this._actionsMap={},this._aria={},this._componentTemplates={}}_createDefaultKeyHandlers(){let t={};return this.getSupportedKeyNames().forEach(o=>{t[o]=s=>this.viewRef.keyDown(Pp.createKeyDownOptions(s))}),t}_addAction(t,n){let o=n;if(!o){let s=this._createActionByOption(t,this._getActionConfigsFull()[t]);o=r=>(Object.keys(r).forEach(a=>{f(r[a])&&S.isNode(r[a])&&(r[a]=H(u(r[a])))}),s(r))}this._actionsMap[t]=o}_optionChanged(t){let{fullName:n,name:o,previousValue:s,value:r}=t;NM(this._props,this.option(),o,n),this._propsInfo.templates.includes(o)&&r!==s&&(this._componentTemplates[o]=this._createTemplateComponent(r)),o&&this._getActionConfigsFull()[o]&&this._addAction(o),this._shouldRaiseContentReady=this._shouldRaiseContentReady||this._checkContentReadyOption(n),super._optionChanged(t),this._invalidate()}_extractDefaultSlot(){return this.option("_hasAnonymousTemplateContent")?Va.createElement(cu,{template:this._getTemplate(this._templateManager.anonymousTemplateName),transclude:!0,renovated:!0}):null}_createTemplateComponent(t){if(!t)return;let n=this._getTemplate(t);if(!(B(n)&&n==="dx-renovation-template-mock"))return o=>Va.createElement(cu,VM(o,n))}_wrapKeyDownHandler(t){return n=>{let{keyName:o,originalEvent:s,which:r}=n,a=this.customKeyHandlers,l=a[o]||a[r];return l!==void 0&&!l.bind(this)(s,n)?(s.cancel=!0,s):t?.(s,n)}}_toPublicElement(t){return H(u(t))}_patchElementParam(t){try{let n=u(t),o=n?.get(0);return o!=null&&o.nodeType?o:t}catch{return t}}repaint(){this._isNodeReplaced=!1,this._shouldRaiseContentReady=!0,this._removeWidget(),this._refresh()}_supportedKeys(){return I({},this.defaultKeyHandlers,this.customKeyHandlers)}registerKeyHandler(t,n){this.customKeyHandlers[t]=n}setAria(t,n){this._aria[t]=n,this._initMarkup()}_getViewComponentDefaultProps(){return this._viewComponent.defaultProps||{}}}return i.IS_RENOVATED_WIDGET=!1,i})(),nd=HM;HM.IS_RENOVATED_WIDGET=!0;var Pg=class extends nd{get _validationGroupConfig(){return fi.getGroupConfig(this._findGroup())}getDefaultTemplateNames(){return["content"]}getSupportedKeyNames(){return["space","enter"]}getProps(){let e=super.getProps();return e.onClick=n=>{let{event:o}=n;this._clickAction({event:o,validationGroup:this._validationGroupConfig})},Js(e.icon)==="svg"&&(e.iconTemplate=this._createTemplateComponent(()=>e.icon)),e}get _templatesInfo(){return{template:"content"}}_toggleActiveState(e,t){let n=this.viewRef;t?n.activate():n.deactivate()}_getSubmitAction(){let e=!0,t="valid";return this._createAction(n=>{let{event:o,submitInput:s}=n;if(e){let r=this._validationGroupConfig;if(r!==void 0&&r!==""){let a=r.validate();t=a.status,a.status==="pending"&&(e=!1,this.option("disabled",!0),a.complete.then(l=>{let{status:d}=l;this.option("disabled",!1),t=d,t==="valid"&&s.click(),e=!0}))}}t!=="valid"&&o.preventDefault(),o.stopPropagation()})}_initializeComponent(){super._initializeComponent(),this._addAction("onSubmit",this._getSubmitAction()),this._clickAction=this._createClickAction()}_initMarkup(){super._initMarkup();let e=this.$element().find(".dx-button-content").first(),t=e.children().filter(".dx-template-wrapper"),n=e.children().filter(".dx-button-submit-input");t.length&&(t.addClass("dx-button-content"),t.append(n),e.replaceWith(t))}_patchOptionValues(e){return super._patchOptionValues(I({},e,{templateData:e._templateData}))}_findGroup(){let e=this.$element(),t=this.option("validationGroup");return t!==void 0&&t!==""?t:fi.findGroup(e,this._modelByElement(e))}_createClickAction(){return this._createActionByOption("onClick",{excludeValidators:["readOnly"]})}_optionChanged(e){e.name==="onClick"&&(this._clickAction=this._createClickAction()),super._optionChanged(e)}};function yi(i){return Object.keys(i).filter(e=>i[e]).join(" ")}var d3=["iconTemplate","position","source"],c3=i=>{let{iconClassName:e,props:{iconTemplate:t,source:n},sourceType:o}=i;return fn([o==="dxIcon"&&tt(1,"i",e),o==="fontIcon"&&tt(1,"i",e),o==="image"&&tt(1,"img",e,null,1,{alt:"",src:n}),t&&tt(1,"i",e,t({}),0)],0)},u3={position:"left",source:""},h3=i=>i&&(i.defaultProps?e=>Ft(Re(2,i,I({},e))):i),$M=(()=>{class i extends Dt{constructor(t){super(t),this.state={}}get sourceType(){return Js(this.props.source)}get cssClass(){return this.props.position!=="left"?"dx-icon-right":""}get iconClassName(){let t={"dx-icon":!0,[this.cssClass]:!!this.cssClass},{source:n}=this.props;return this.sourceType==="dxIcon"?yi(I({},t,{[`dx-icon-${n}`]:!0})):this.sourceType==="fontIcon"?yi(I({},t,{[String(n)]:!!n})):this.sourceType==="image"?yi(t):this.sourceType==="svg"?yi(I({},t,{"dx-svg-icon":!0})):""}get restAttributes(){let t=this.props;return _e(t,d3)}render(){let t=this.props;return c3({props:I({},t,{iconTemplate:h3(t.iconTemplate)}),sourceType:this.sourceType,cssClass:this.cssClass,iconClassName:this.iconClassName,restAttributes:this.restAttributes})}}return i.defaultProps=u3,i})();var p3=["config"],g3=i=>Ft(tt(1,"div","dx-inkripple",null,1,I({},i.restAttributes))),m3={config:Object.freeze({})},zM=(()=>{class i extends Dt{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=(()=>{let{config:t}=this.props;return kv(t)})()}get restAttributes(){let t=this.props;return _e(t,p3)}hideWave(t){Vv(this.getConfig,t)}showWave(t){Bv(this.getConfig,t)}componentWillUpdate(t,n,o){this.props.config!==t.config&&(this.__getterCache.getConfig=void 0)}render(){let t=this.props;return g3({props:I({},t),getConfig:this.getConfig,restAttributes:this.restAttributes})}}return i.defaultProps=m3,i})();function Pi(i){return(e,t,n,o)=>{let s=o?D(i,o):i;if(t)return _.on(e,s,n,t),()=>{_.off(e,s,t)}}}var WM=Pi(de),dEe=Pi(on.scroll),cEe=Pi(on.init),uEe=Pi(on.start),hEe=Pi(on.move),pEe=Pi(on.end),gEe=Pi(on.stop),mEe=Pi(on.cancel),fEe=Pi(le.down),_Ee=Pi(le.up),CEe=Pi(le.move),xEe=Pi("mouseenter"),vEe=Pi("mouseleave"),bEe=Pi("keydown"),GM=Pi("dxactive"),jM=Pi("dxinactive"),KM=Pi("dxhoverstart"),UM=Pi("dxhoverend"),qM=Pi("focusin"),YM=Pi("focusout");var jr={className:"",activeStateEnabled:!1,disabled:!1,focusStateEnabled:!1,hoverStateEnabled:!1,tabIndex:0,visible:!0};var li=Fg(void 0);var f3=["children","rtlEnabled"],_3=i=>i.props.children,C3={},XM=(()=>{class i extends Dt{constructor(t){super(t),this.state={},this.__getterCache={}}getChildContext(){return I({},this.context,{[li.id]:this.config||li.defaultValue})}get config(){return this.__getterCache.config!==void 0?this.__getterCache.config:this.__getterCache.config={rtlEnabled:this.props.rtlEnabled}}get restAttributes(){let t=this.props;return _e(t,f3)}componentWillUpdate(t,n,o){this.props.rtlEnabled!==t.rtlEnabled&&(this.__getterCache.config=void 0)}render(){let t=this.props;return _3({props:I({},t),config:this.config,restAttributes:this.restAttributes})}}return i.defaultProps=C3,i})();function QM(i,e){return i!==void 0?i:e?.rtlEnabled!==void 0?e.rtlEnabled:xe().rtlEnabled}function ZM(i,e){let t=f(i),n=f(xe().rtlEnabled)&&!t&&!f(e?.rtlEnabled);return t&&i!==e?.rtlEnabled||n}var x3=["_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"];var v3=i=>Object.keys(i).reduce((e,t)=>i[t]?I({},e,{[t==="role"||t==="id"?t:`aria-${t}`]:String(i[t])}):e,{}),b3=i=>{let e=Ft(tt(1,"div",i.cssClasses,i.props.children,0,I({},i.attributes,{tabIndex:i.tabIndex,title:i.props.hint,style:id(i.styles)}),null,i.widgetElementRef));return i.shouldRenderConfigProvider?Re(2,XM,{rtlEnabled:i.rtlEnabled,children:e}):e},od=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(jr),Object.getOwnPropertyDescriptors({_feedbackHideTimeout:400,_feedbackShowTimeout:30,cssText:"",aria:Object.freeze({}),classes:"",name:"",addWidgetClass:!0}))),sd=(()=>{class i extends fo{get config(){return this.context[li.id]?this.context[li.id]:li.defaultValue}constructor(t){super(t),this.widgetElementRef=Ct(),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)}createEffects(){return[new Ke(this.setRootElementRef,[]),new Ke(this.activeEffect,[this.props._feedbackShowTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.disabled,this.props.onActive]),new Ke(this.inactiveEffect,[this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),new Ke(this.clickEffect,[this.props.disabled,this.props.name,this.props.onClick]),new Ke(this.focusInEffect,[this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),new Ke(this.focusOutEffect,[this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),new Ke(this.hoverStartEffect,[this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),new Ke(this.hoverEndEffect,[this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),new Ke(this.keyboardEffect,[this.props.focusStateEnabled,this.props.onKeyDown]),new Ke(this.resizeEffect,[this.props.name,this.props.onDimensionChanged]),new Ke(this.windowResizeEffect,[this.props.onDimensionChanged]),new Ke(this.visibilityEffect,[this.props.name,this.props.onVisibilityChange]),new Ke(this.checkDeprecation,[this.props.height,this.props.width]),new Ke(this.applyCssTextEffect,[this.props.cssText]),_s()]}updateEffects(){var t,n,o,s,r,a,l,d,c,h,p,g,C;(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]),(n=this._effects[2])===null||n===void 0||n.update([this.props._feedbackHideTimeout,this.props.activeStateEnabled,this.props.activeStateUnit,this.props.onInactive,this.state.active]),(o=this._effects[3])===null||o===void 0||o.update([this.props.disabled,this.props.name,this.props.onClick]),(s=this._effects[4])===null||s===void 0||s.update([this.props.disabled,this.props.focusStateEnabled,this.props.name,this.props.onFocusIn]),(r=this._effects[5])===null||r===void 0||r.update([this.props.focusStateEnabled,this.props.name,this.props.onFocusOut,this.state.focused]),(a=this._effects[6])===null||a===void 0||a.update([this.props.activeStateUnit,this.props.disabled,this.props.hoverStateEnabled,this.props.onHoverStart,this.state.active]),(l=this._effects[7])===null||l===void 0||l.update([this.props.activeStateUnit,this.props.hoverStateEnabled,this.props.onHoverEnd,this.state.hovered]),(d=this._effects[8])===null||d===void 0||d.update([this.props.focusStateEnabled,this.props.onKeyDown]),(c=this._effects[9])===null||c===void 0||c.update([this.props.name,this.props.onDimensionChanged]),(h=this._effects[10])===null||h===void 0||h.update([this.props.onDimensionChanged]),(p=this._effects[11])===null||p===void 0||p.update([this.props.name,this.props.onVisibilityChange]),(g=this._effects[12])===null||g===void 0||g.update([this.props.height,this.props.width]),(C=this._effects[13])===null||C===void 0||C.update([this.props.cssText])}setRootElementRef(){let{onRootElementRendered:t,rootElementRef:n}=this.props;n&&(n.current=this.widgetElementRef.current),t?.(this.widgetElementRef.current)}activeEffect(){let{_feedbackShowTimeout:t,activeStateEnabled:n,activeStateUnit:o,disabled:s,onActive:r}=this.props,a=o;if(n&&!s)return GM(this.widgetElementRef.current,l=>{this.setState(d=>({active:!0})),r?.(l)},{timeout:t,selector:a},"UIFeedback")}inactiveEffect(){let{_feedbackHideTimeout:t,activeStateEnabled:n,activeStateUnit:o,onInactive:s}=this.props,r=o;if(n)return jM(this.widgetElementRef.current,a=>{this.state.active&&(this.setState(l=>({active:!1})),s?.(a))},{timeout:t,selector:r},"UIFeedback")}clickEffect(){let{disabled:t,name:n,onClick:o}=this.props,s=n;if(o&&!t)return ev.on(this.widgetElementRef.current,o,{namespace:s}),()=>ev.off(this.widgetElementRef.current,{namespace:s})}focusInEffect(){let{disabled:t,focusStateEnabled:n,name:o,onFocusIn:s}=this.props,r=`${o}Focus`;if(n&&!t)return qM(this.widgetElementRef.current,a=>{a.isDefaultPrevented()||(this.setState(l=>({focused:!0})),s?.(a))},null,r)}focusOutEffect(){let{focusStateEnabled:t,name:n,onFocusOut:o}=this.props,s=`${n}Focus`;if(t)return YM(this.widgetElementRef.current,r=>{!r.isDefaultPrevented()&&this.state.focused&&(this.setState(a=>({focused:!1})),o?.(r))},null,s)}hoverStartEffect(){let{activeStateUnit:t,disabled:n,hoverStateEnabled:o,onHoverStart:s}=this.props,r=t;if(o&&!n)return KM(this.widgetElementRef.current,a=>{!this.state.active&&this.setState(l=>({hovered:!0})),s?.(a)},{selector:r},"UIFeedback")}hoverEndEffect(){let{activeStateUnit:t,hoverStateEnabled:n,onHoverEnd:o}=this.props,s=t;if(n)return UM(this.widgetElementRef.current,r=>{this.state.hovered&&(this.setState(a=>({hovered:!1})),o?.(r))},{selector:s},"UIFeedback")}keyboardEffect(){let{focusStateEnabled:t,onKeyDown:n}=this.props;if(t&&n){let o=po.on(this.widgetElementRef.current,this.widgetElementRef.current,s=>n(s));return()=>po.off(o)}}resizeEffect(){let t=`${this.props.name}VisibilityChange`,{onDimensionChanged:n}=this.props;if(n)return Nl.on(this.widgetElementRef.current,n,{namespace:t}),()=>Nl.off(this.widgetElementRef.current,{namespace:t})}windowResizeEffect(){let{onDimensionChanged:t}=this.props;if(t)return Mo.add(t),()=>{Mo.remove(t)}}visibilityEffect(){let{name:t,onVisibilityChange:n}=this.props,o=`${t}VisibilityChange`;if(n)return Hl.on(this.widgetElementRef.current,()=>n(!0),()=>n(!1),{namespace:o}),()=>Hl.off(this.widgetElementRef.current,{namespace:o})}checkDeprecation(){let{height:t,width:n}=this.props;A(n)&&me.log("W0017","width"),A(t)&&me.log("W0017","height")}applyCssTextEffect(){let{cssText:t}=this.props;t!==""&&(this.widgetElementRef.current.style.cssText=t)}get shouldRenderConfigProvider(){let{rtlEnabled:t}=this.props;return ZM(t,this.config)}get rtlEnabled(){let{rtlEnabled:t}=this.props;return QM(t,this.config)}get attributes(){let{aria:t,disabled:n,focusStateEnabled:o,visible:s}=this.props,r=o&&!n&&this.props.accessKey;return I({},m({},r&&{accessKey:r}),v3(I({},t,{disabled:n,hidden:!s})),m({},this.restAttributes))}get styles(){let{height:t,width:n}=this.props,o=this.restAttributes.style||{},s=Vs("width",A(n)?n():n),r=Vs("height",A(t)?t():t);return I({},o,{height:r??o.height,width:s??o.width})}get cssClasses(){let{activeStateEnabled:t,addWidgetClass:n,className:o,classes:s,disabled:r,focusStateEnabled:a,hoverStateEnabled:l,onVisibilityChange:d,visible:c}=this.props,h=!!a&&!r,p=!!l&&!r,g=!!t&&!r,C={"dx-widget":!!n,[String(s)]:!!s,[String(o)]:!!o,"dx-state-disabled":!!r,"dx-state-invisible":!c,"dx-state-focused":!!this.state.focused&&h,"dx-state-active":!!this.state.active&&g,"dx-state-hover":!!this.state.hovered&&p&&!this.state.active,"dx-rtl":!!this.rtlEnabled,"dx-visibility-change-handler":!!d};return yi(C)}get tabIndex(){let{disabled:t,focusStateEnabled:n,tabIndex:o}=this.props;return n&&!t?o:void 0}get restAttributes(){let t=this.props;return _e(t,x3)}focus(){$l.trigger(this.widgetElementRef.current)}blur(){let t=S.getActiveElement(this.widgetElementRef.current);this.widgetElementRef.current===t&&t.blur()}activate(){this.setState(t=>({active:!0}))}deactivate(){this.setState(t=>({active:!1}))}render(){let t=this.props;return b3({props:I({},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})}}return i.defaultProps=od,i})();var y3=["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"],O3=["outlined","text","contained"],E3=i=>{let{icon:e,iconPosition:t,stylingMode:n,text:o,type:s}=i,a={"dx-button":!0,[`dx-button-mode-${n&&O3.includes(n)?n:"contained"}`]:!0,[`dx-button-${s??"normal"}`]:!0,"dx-button-has-text":!!o,"dx-button-has-icon":!!e,"dx-button-icon-right":t!=="left"};return yi(a)},w3=i=>{let{children:e,iconPosition:t,iconTemplate:n,template:o,text:s}=i.props,r=!i.props.template&&!e&&s!=="",a=t==="left",l=!i.props.template&&!e&&(i.iconSource||i.props.iconTemplate)&&Re(2,$M,{source:i.iconSource,position:t,iconTemplate:n});return Ft(Re(2,sd,I({accessKey:i.props.accessKey,activeStateEnabled:i.props.activeStateEnabled,aria:i.aria,className:i.props.className,classes:i.cssClasses,disabled:i.props.disabled,focusStateEnabled:i.props.focusStateEnabled,height:i.props.height,hint:i.props.hint,hoverStateEnabled:i.props.hoverStateEnabled,onActive:i.onActive,onClick:i.onWidgetClick,onInactive:i.onInactive,onKeyDown:i.keyDown,rtlEnabled:i.props.rtlEnabled,tabIndex:i.props.tabIndex,visible:i.props.visible,width:i.props.width},i.restAttributes,{children:tt(1,"div","dx-button-content",[i.props.template&&o({data:i.buttonTemplateData}),!i.props.template&&e,a&&l,r&&tt(1,"span","dx-button-text",s,0),!a&&l,i.props.useSubmitBehavior&&tt(64,"input","dx-button-submit-input",null,1,{type:"submit",tabIndex:-1},null,i.submitInputRef),i.props.useInkRipple&&Re(2,zM,{config:i.inkRippleConfig},null,i.inkRippleRef)],0,null,null,i.contentRef)}),null,i.widgetRef))},S3=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(jr),Object.getOwnPropertyDescriptors({activeStateEnabled:!0,hoverStateEnabled:!0,icon:"",iconPosition:"left",stylingMode:"contained",text:"",type:"normal",useInkRipple:!1,useSubmitBehavior:!1,templateData:Object.freeze({})}))),tR=jD([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>ht(yt()),options:{useInkRipple:!0}}]),JM=i=>i&&(i.defaultProps?e=>Ft(Re(2,i,I({},e))):i),La=class extends fo{constructor(e){super(e),this.state={},this.contentRef=Ct(),this.inkRippleRef=Ct(),this.submitInputRef=Ct(),this.widgetRef=Ct(),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),this.emitClickEvent=this.emitClickEvent.bind(this)}createEffects(){return[new Ke(this.submitEffect,[this.props.onSubmit,this.props.useSubmitBehavior]),_s()]}updateEffects(){var e;(e=this._effects[0])===null||e===void 0||e.update([this.props.onSubmit,this.props.useSubmitBehavior])}submitEffect(){let{onSubmit:e,useSubmitBehavior:t}=this.props;if(t&&e)return tv.on(this.submitInputRef.current,n=>e({event:n,submitInput:this.submitInputRef.current}),{namespace:"UIFeedback"}),()=>tv.off(this.submitInputRef.current,{namespace:"UIFeedback"})}onActive(e){let{useInkRipple:t}=this.props;t&&this.inkRippleRef.current.showWave({element:this.contentRef.current,event:e})}onInactive(e){let{useInkRipple:t}=this.props;t&&this.inkRippleRef.current.hideWave({element:this.contentRef.current,event:e})}onWidgetClick(e){let{onClick:t,useSubmitBehavior:n}=this.props;t?.({event:e}),n&&this.submitInputRef.current.click()}keyDown(e){let{onKeyDown:t}=this.props,{keyName:n,originalEvent:o,which:s}=e,r=t?.(e);if(r!=null&&r.cancel)return r;(n==="space"||s==="space"||n==="enter"||s==="enter")&&(o.preventDefault(),this.emitClickEvent())}emitClickEvent(){this.contentRef.current.click()}get aria(){let{icon:e,text:t}=this.props,n=t??"";if(!t&&e)switch(Js(e)){case"image":{let r=/^(?!(?:https?:\/\/)|(?:ftp:\/\/)|(?:www\.))[^\s]+$/;n=!e.includes("base64")&&r.test(e)?e.replace(/.+\/([^.]+)\..+$/,"$1"):"";break}case"dxIcon":n=O.format(ki(e,!0))||e;break;case"fontIcon":n=e;break;case"svg":{var o;n=((o=/<title>(.*?)<\/title>/.exec(e))===null||o===void 0?void 0:o[1])??"";break}}return I({role:"button"},n?{label:n}:{})}get cssClasses(){return E3(this.props)}get iconSource(){let{icon:e}=this.props;return e??""}get inkRippleConfig(){return this.__getterCache.inkRippleConfig!==void 0?this.__getterCache.inkRippleConfig:this.__getterCache.inkRippleConfig=(()=>{let{icon:e,text:t}=this.props;return!t&&e?{isCentered:!0,useHoldAnimation:!1,waveSizeCoefficient:1}:{}})()}get buttonTemplateData(){let{icon:e,templateData:t,text:n}=this.props;return I({icon:e,text:n},t)}get restAttributes(){let e=this.props;return _e(e,y3)}focus(){this.widgetRef.current.focus()}activate(){this.widgetRef.current.activate()}deactivate(){this.widgetRef.current.deactivate()}componentWillUpdate(e,t,n){super.componentWillUpdate(),(this.props.icon!==e.icon||this.props.text!==e.text)&&(this.__getterCache.inkRippleConfig=void 0)}render(){let e=this.props;return w3({props:I({},e,{template:JM(e.template),iconTemplate:JM(e.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,emitClickEvent:this.emitClickEvent,aria:this.aria,cssClasses:this.cssClasses,iconSource:this.iconSource,inkRippleConfig:this.inkRippleConfig,buttonTemplateData:this.buttonTemplateData,restAttributes:this.restAttributes})}};La.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(S3),Object.getOwnPropertyDescriptors(I({},Bo(tR)))));var eR=[];function iR(i){eR.push(i),La.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(La.defaultProps),Object.getOwnPropertyDescriptors(Bo(tR)),Object.getOwnPropertyDescriptors(Bo(eR))))}var rd=class extends Pg{getProps(){let e=super.getProps();return e.onKeyDown=this._wrapKeyDownHandler(e.onKeyDown),e}focus(){var e;return(e=this.viewRef)===null||e===void 0?void 0:e.focus(...arguments)}activate(){var e;return(e=this.viewRef)===null||e===void 0?void 0:e.activate(...arguments)}deactivate(){var e;return(e=this.viewRef)===null||e===void 0?void 0:e.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 La}};K("dxButton",rd);rd.defaultOptions=iR;var _t=rd;var kg=class extends ms{_attachEvents(e,t){let{editor:n}=this;_.on(t,Nr,()=>{n.$element().addClass("dx-custom-button-hovered")}),_.on(t,Hr,()=>{n.$element().removeClass("dx-custom-button-hovered")}),_.on(t,de,o=>{o.stopPropagation()})}_create(){let{editor:e}=this,t=u("<div>");this._addToContainer(t);let n=e._createComponent(t,_t,m({},this.options,{ignoreParentReadOnly:!0,disabled:this._isDisabled(),integrationOptions:this._prepareIntegrationOptions(e)}));return{$element:t,instance:n}}_prepareIntegrationOptions(e){return m({},e.option("integrationOptions"),{skipTemplates:["content"]})}update(){let e=super.update();return this.instance&&this.instance.option("disabled",this._isDisabled()),e}_isVisible(){let{editor:e}=this;return e.option("visible")}_isDisabled(){return this.options.disabled!==void 0?this.instance?this.instance.option("disabled"):this.options.disabled:this.editor.option("readOnly")}};function I3(i){(()=>{if(!i||typeof i!="object"||Array.isArray(i))throw ie.Error("E1053")})(),(()=>{if(!("name"in i))throw ie.Error("E1054")})(),(()=>{let{name:e}=i;if(typeof e!="string")throw ie.Error("E1055")})(),(()=>{let{location:e}=i;"location"in i&&e!=="after"&&e!=="before"&&(i.location="after")})()}function nR(i,e){if(i.indexOf(e)!==-1)throw ie.Error("E1055",e);i.push(e)}function D3(i,e){return!!e.find(t=>t.name===i)}var ad=class{constructor(e,t){this.buttons=[],this.defaultButtonsInfo=t,this.editor=e}_compileButtonInfo(e){let t=[];return e.map(n=>{let o=typeof n=="string";if(o||I3(n),o||D3(n.name,this.defaultButtonsInfo)){let a=this.defaultButtonsInfo.find(l=>{let{name:d}=l;return d===n||d===n.name});if(!a)throw ie.Error("E1056",this.editor.NAME,n);return nR(t,n),a}let{name:r}=n;return nR(t,r),m(n,{Ctor:kg})})}_createButton(e){let{Ctor:t,options:n,name:o}=e,s=new t(o,this.editor,n);return this.buttons.push(s),s}_renderButtons(e,t,n){let o=null;return(e?this._compileButtonInfo(e):this.defaultButtonsInfo).forEach(r=>{let{location:a="after"}=r;a===n&&this._createButton(r).render((o=o??u("<div>").addClass("dx-texteditor-buttons-container"),n==="before"?t.prepend(o):t.append(o),o))}),o}clean(){this.buttons.forEach(e=>e.dispose()),this.buttons=[]}getButton(e){let t=this.buttons.find(n=>{let{name:o}=n;return o===e});return t&&t.instance}renderAfterButtons(e,t){return this._renderButtons(e,t,"after")}renderBeforeButtons(e,t){return this._renderButtons(e,t,"before")}updateButtons(e){this.buttons.forEach(t=>{(!e||e.indexOf(t.name)!==-1)&&t.update()})}};var sR="dx-texteditor";var rR="dx-texteditor-input";var Bg=["KeyDown","KeyPress","KeyUp","Change","Cut","Copy","Paste","Input"],T3=["tab","enter","shift","control","alt","escape","pageUp","pageDown","end","home","leftArrow","upArrow","rightArrow","downArrow"],A3=yg;function oR(i){if(f(i)&&!Array.isArray(i))throw ie.Error("E1053")}var M3=vi.inherit({ctor(i,e){e&&oR(e.buttons),this._buttonCollection=new ad(this,this._getDefaultButtons()),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._labelContainerElement=null,this.callBase.apply(this,arguments)},_getDefaultOptions(){return m(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:i=>f(i)&&i!==!1?i:"",stylingMode:xe().editorStylingMode||"outlined",showValidationMark:!0,label:"",labelMode:"static",labelMark:""})},_defaultOptionsRules(){return this.callBase().concat([{device(){let i=yt();return ht(i)},options:{labelMode:"floating",stylingMode:xe().editorStylingMode||"filled"}},{device(){let i=yt();return Ot(i)},options:{labelMode:"outside"}}])},_getDefaultButtons:()=>[{name:"clear",Ctor:Zl}],_isClearButtonVisible(){return this.option("showClearButton")&&!this.option("readOnly")},_input(){return this.$element().find(".dx-texteditor-input").first()},_isFocused(){return Tn(this._input())||this.callBase()},_inputWrapper(){return this.$element()},_buttonsContainer(){return this._inputWrapper().find(".dx-texteditor-buttons-container").eq(0)},_isControlKey:i=>T3.includes(i),_renderStylingMode(){this.callBase(),this._updateButtonsStyling(this.option("stylingMode"))},_initMarkup(){this.$element().addClass("dx-texteditor"),this._renderInput(),this._renderButtonContainers(),this._renderStylingMode(),this._renderInputType(),this._renderPlaceholder(),this._renderProps(),this.callBase(),this._renderValue(),this._renderLabel()},_render(){this.callBase(),this._refreshValueChangeEvent(),this._refreshEvents(),this._renderEnterKeyAction(),this._renderEmptinessEvent()},_renderInput(){this._$textEditorContainer=u("<div>").addClass("dx-texteditor-container").appendTo(this.$element()),this._$textEditorInputContainer=u("<div>").addClass("dx-texteditor-input-container").appendTo(this._$textEditorContainer),this._$textEditorInputContainer.append(this._createInput())},_getInputContainer(){return this._$textEditorInputContainer},_renderPendingIndicator(){this.$element().addClass("dx-validation-pending");let i=this._getInputContainer(),e=u("<div>").addClass("dx-pending-indicator").appendTo(i);this._pendingIndicator=this._createComponent(e,bi)},_disposePendingIndicator(){this._pendingIndicator&&(this._pendingIndicator.dispose(),this._pendingIndicator.$element().remove(),this._pendingIndicator=null,this.$element().removeClass("dx-validation-pending"))},_renderValidationState(){this.callBase(),this.option("validationStatus")==="pending"?(!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()),this._toggleValidMark()},_getButtonsContainer(){return this._$textEditorContainer},_renderButtonContainers(){let i=this.option("buttons"),e=this._getButtonsContainer();this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(i,e),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(i,e)},_cleanButtonContainers(){var i,e;(i=this._$beforeButtonsContainer)===null||i===void 0||i.remove(),(e=this._$afterButtonsContainer)===null||e===void 0||e.remove(),this._buttonCollection.clean()},_clean(){this._buttonCollection.clean(),this._disposePendingIndicator(),this._unobserveLabelContainerResize(),this._$beforeButtonsContainer=null,this._$afterButtonsContainer=null,this._$textEditorContainer=null,this.callBase()},_createInput(){let i=u("<input>");return this._applyInputAttributes(i,this.option("inputAttr")),i},_setSubmitElementName(i){let e=this.option("inputAttr.name");return this.callBase(i||e||"")},_applyInputAttributes(i,e){let t=m(this._getDefaultAttributes(),e);i.attr(t).addClass("dx-texteditor-input"),this._setInputMinHeight(i)},_setInputMinHeight(i){i.css("minHeight",this.option("height")?"0":"")},_getPlaceholderAttr(){let{ios:i,mac:e}=F.real(),{placeholder:t}=this.option();return t||(i||e?" ":null)},_getDefaultAttributes(){return{autocomplete:"off",placeholder:this._getPlaceholderAttr()}},_updateButtons(i){this._buttonCollection.updateButtons(i)},_updateButtonsStyling(i){x(this.option("buttons"),(e,t)=>{let{options:n,name:o}=t;if(n&&!n.stylingMode&&this.option("visible")){let s=this.getButton(o);s.option&&s.option("stylingMode",i==="underlined"?"text":"contained")}})},_renderValue(){return this._renderInputValue().promise()},_renderInputValue(i){i=i??this.option("value");let e=this.option("text"),t=this.option("displayValue"),n=this.option("displayValueFormatter");return t!==void 0&&i!==null?e=n(t):f(e)||(e=n(i)),this.option("text",e),this._input().val()!==(f(e)?e:"")?this._renderDisplayText(e):this._toggleEmptinessEventHandler(),y().resolve()},_renderDisplayText(i){this._input().val(i),this._toggleEmptinessEventHandler()},_isValueValid(){if(this._input().length){let{validity:i}=this._input().get(0);if(i)return i.valid}return!0},_toggleEmptiness(i){this.$element().toggleClass("dx-texteditor-empty",i),this._togglePlaceholder(i)},_togglePlaceholder(i){this.$element().find(".dx-placeholder").eq(0).toggleClass("dx-state-invisible",!i)},_renderProps(){this._toggleReadOnlyState(),this._toggleSpellcheckState(),this._toggleTabIndex()},_toggleDisabledState(i){this.callBase.apply(this,arguments),this._input().prop("disabled",i)},_toggleTabIndex(){let i=this._input(),e=this.option("disabled"),t=this.option("focusStateEnabled");e||!t?i.attr("tabIndex",-1):i.removeAttr("tabIndex")},_toggleReadOnlyState(){this._input().prop("readOnly",this._readOnlyPropValue()),this.callBase()},_readOnlyPropValue(){return this.option("readOnly")},_toggleSpellcheckState(){this._input().prop("spellcheck",this.option("spellcheck"))},_unobserveLabelContainerResize(){this._labelContainerElement&&(ps.unobserve(this._labelContainerElement),this._labelContainerElement=null)},_getLabelContainer(){return this._input()},_getLabelContainerWidth(){return W(this._getLabelContainer())},_getLabelBeforeWidth(){return(this._$beforeButtonsContainer&&W(this._$beforeButtonsContainer))??0},_updateLabelWidth(){this._label.updateBeforeWidth(this._getLabelBeforeWidth()),this._label.updateMaxWidth(this._getLabelContainerWidth())},_getFieldElement(){return this._getLabelContainer()},_setFieldAria(i){var e;let t=this.option("inputAttr"),n=t?.["aria-label"],o=(e=this._label)===null||e===void 0?void 0:e.getId(),s=n?void 0:o;if(s||i){let r={labelledby:s,label:n};this.setAria(r,this._getFieldElement())}},_renderLabel(){this._unobserveLabelContainerResize(),this._labelContainerElement=u(this._getLabelContainer()).get(0);let{label:i,labelMode:e,labelMark:t,rtlEnabled:n}=this.option(),o={onClickHandler:()=>{this.focus()},onHoverHandler:s=>{s.stopPropagation()},onActiveHandler:s=>{s.stopPropagation()},$editor:this.$element(),text:i,mark:t,mode:e,rtlEnabled:n,containsButtonsBefore:!!this._$beforeButtonsContainer,getContainerWidth:()=>this._getLabelContainerWidth(),getBeforeWidth:()=>this._getLabelBeforeWidth()};this._label=new A3(o),this._setFieldAria(),this._labelContainerElement&&ps.observe(this._labelContainerElement,this._updateLabelWidth.bind(this))},_renderPlaceholder(){this._renderPlaceholderMarkup(),this._attachPlaceholderEvents()},_renderPlaceholderMarkup(){this._$placeholder&&(this._$placeholder.remove(),this._$placeholder=null);let i=this._input(),e=this.option("placeholder"),t={id:e?`dx-${new Ae}`:void 0,"data-dx_placeholder":e},n=this._$placeholder=u("<div>").attr(t);n.insertAfter(i),n.addClass("dx-placeholder")},_attachPlaceholderEvents(){let i=D(le.up,this.NAME);_.on(this._$placeholder,i,()=>{_.trigger(this._input(),"focus")}),this._toggleEmptinessEventHandler()},_placeholder(){return this._$placeholder||u()},_clearValueHandler(i){let e=this._input();i.stopPropagation(),this._saveValueChangeEvent(i),this._clearValue(),!this._isFocused()&&_.trigger(e,"focus"),_.trigger(e,"input")},_clearValue(){this.clear()},_renderEvents(){let i=this._input();x(Bg,(e,t)=>{if(this.hasActionSubscription(`on${t}`)){let n=this._createActionByOption(`on${t}`,{excludeValidators:["readOnly"]});_.on(i,D(t.toLowerCase(),this.NAME),o=>{this._disposed||n({event:o})})}})},_refreshEvents(){let i=this._input();x(Bg,(e,t)=>{_.off(i,D(t.toLowerCase(),this.NAME))}),this._renderEvents()},_keyPressHandler(){this.option("text",this._input().val())},_keyDownHandler(i){let e=this._input(),t=i.ctrlKey&&ke(i)==="enter",n=e.val()!==this.option("value");t&&n&&_.trigger(e,"change")},_getValueChangeEventOptionName:()=>"valueChangeEvent",_renderValueChangeEvent(){let i=D(this._renderValueEventName(),`${this.NAME}TextChange`),e=D(this.option(this._getValueChangeEventOptionName()),`${this.NAME}ValueChange`),t=D("keydown",`${this.NAME}TextChange`),n=this._input();_.on(n,i,this._keyPressHandler.bind(this)),_.on(n,e,this._valueChangeEventHandler.bind(this)),_.on(n,t,this._keyDownHandler.bind(this))},_cleanValueChangeEvent(){let i=`.${this.NAME}ValueChange`,e=`.${this.NAME}TextChange`;_.off(this._input(),i),_.off(this._input(),e)},_refreshValueChangeEvent(){this._cleanValueChangeEvent(),this._renderValueChangeEvent()},_renderValueEventName:()=>"input change keypress",_focusTarget(){return this._input()},_focusEventTarget(){return this.element()},_isInput(i){return i===this._input().get(0)},_preventNestedFocusEvent(i){if(i.isDefaultPrevented())return!0;let e=this._isNestedTarget(i.relatedTarget);return i.type==="focusin"?e=e&&this._isNestedTarget(i.target)&&!this._isInput(i.target):e||this._toggleFocusClass(!1,this.$element()),e&&i.preventDefault(),e},_isNestedTarget(i){return!!this.$element().find(i).length},_focusClassTarget(){return this.$element()},_focusInHandler(i){this._preventNestedFocusEvent(i),this.callBase.apply(this,arguments)},_focusOutHandler(i){this._preventNestedFocusEvent(i),this.callBase.apply(this,arguments)},_toggleFocusClass(i,e){this.callBase(i,this._focusClassTarget(e))},_hasFocusClass(i){return this.callBase(u(i||this.$element()))},_renderEmptinessEvent(){let i=this._input();_.on(i,"input blur",this._toggleEmptinessEventHandler.bind(this))},_toggleEmptinessEventHandler(){let i=this._input().val(),e=(i===""||i===null)&&this._isValueValid();this._toggleEmptiness(e)},_valueChangeEventHandler(i,e){this.option("readOnly")||(this._saveValueChangeEvent(i),this.option("value",arguments.length>1?e:this._input().val()),this._saveValueChangeEvent(void 0))},_renderEnterKeyAction(){this._enterKeyAction=this._createActionByOption("onEnterKey",{excludeValidators:["readOnly"]}),_.off(this._input(),"keyup.onEnterKey.dxTextEditor"),_.on(this._input(),"keyup.onEnterKey.dxTextEditor",this._enterKeyHandlerUp.bind(this))},_enterKeyHandlerUp(i){this._disposed||ke(i)==="enter"&&this._enterKeyAction({event:i})},_updateValue(){this._options.silent("text",null),this._renderValue()},_dispose(){this._enterKeyAction=void 0,this.callBase()},_getSubmitElement(){return this._input()},_hasActiveElement(){return this._input().is(S.getActiveElement(this._input()[0]))},_optionChanged(i){let{name:e,fullName:t,value:n}=i,o=e.replace("on","");if(Bg.includes(o)){this._refreshEvents();return}switch(e){case"valueChangeEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onValueChanged":this._createValueChangeAction();break;case"focusStateEnabled":this.callBase(i),this._toggleTabIndex();break;case"spellcheck":this._toggleSpellcheckState();break;case"mode":this._renderInputType();break;case"onEnterKey":this._renderEnterKeyAction();break;case"placeholder":this._renderPlaceholder(),this._setFieldAria(!0),this._input().attr({placeholder:this._getPlaceholderAttr()});break;case"label":this._label.updateText(n),this._setFieldAria(!0);break;case"labelMark":this._label.updateMark(n);break;case"labelMode":this._label.updateMode(n),this._setFieldAria();break;case"width":this.callBase(i),this._label.updateMaxWidth(this._getLabelContainerWidth());break;case"readOnly":case"disabled":this._updateButtons(),this.callBase(i);break;case"showClearButton":this._updateButtons(["clear"]);break;case"text":case"showValidationMark":break;case"value":this._updateValue(),this.callBase(i);break;case"inputAttr":this._applyInputAttributes(this._input(),this.option(e));break;case"stylingMode":this._renderStylingMode(),this._updateLabelWidth();break;case"buttons":t===e&&oR(n),this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")),this._updateLabelWidth(),this._label.updateContainsButtonsBefore(!!this._$beforeButtonsContainer);break;case"visible":this.callBase(i),n&&this.option("buttons")&&(this._cleanButtonContainers(),this._renderButtonContainers(),this._updateButtonsStyling(this.option("stylingMode")));break;case"displayValueFormatter":this._invalidate();break;default:this.callBase(i)}},_renderInputType(){this._setInputType(this.option("mode"))},_setInputType(i){let e=this._input();i==="search"&&(i="text");try{e.prop("type",i)}catch{e.prop("type","text")}},getButton(i){return this._buttonCollection.getButton(i)},focus(){_.trigger(this._input(),"focus")},clear(){this._showValidMark&&(this._showValidMark=!1,this._renderValidationState());let i=this._getDefaultOptions();this.option("value")===i.value?(this._options.silent("text",""),this._renderValue()):this.option("value",i.value)},_resetInputText(){this._options.silent("text",this._initialValue),this._renderValue()},_isValueEqualToInitial(){let{value:i}=this.option(),e=this._initialValue;return i===e},_resetToInitialValue(){this._isValueEqualToInitial()?this._resetInputText():this.callBase(),this._disposePendingIndicator(),this._showValidMark=!1,this._toggleValidMark()},_toggleValidMark(){this.$element().toggleClass("dx-valid",!!this._showValidMark)},reset(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;arguments.length?this.callBase(i):this.callBase()},on(i,e){let t=this.callBase(i,e),n=i.charAt(0).toUpperCase()+i.substr(1);return Bg.includes(n)&&this._refreshEvents(),t}}),aR=M3;var Vg=class{constructor(e){this._value=" ",m(this,e)}next(e){if(!arguments.length)return this._next;this._next=e}_prepareHandlingArgs(e,t){t=t||{};let n=Object.prototype.hasOwnProperty.call(e,"value")?"value":"text";return e[n]=t.str??e[n],e.start=t.start??e.start,e.length=t.length??e.length,e.index+=1,e}first(e){return e=e||0,this.next().first(e+1)}isAccepted(e){return!1}adjustedCaret(e,t,n){return t?this._adjustedForward(e,0,n):this._adjustedBackward(e,0,n)}_adjustedForward(e,t,n){}_adjustedBackward(e,t,n){}isValid(e){}reset(){}clear(e){}text(){}value(){}rawValue(){}handle(e){}},Lg=class extends Vg{next(){}handle(){return 0}text(){return""}value(){return""}first(){return 0}rawValue(){return""}adjustedCaret(){return 0}isValid(){return!0}},uu=class extends Vg{text(){return(this._value!==" "?this._value:this.maskChar)+this.next().text()}value(){return this._value+this.next().value()}rawValue(){return this._value+this.next().rawValue()}handle(e){let 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}));let n=t[0],o=t.substring(1);return this._tryAcceptChar(n,e),this._accepted()?this.next().handle(this._prepareHandlingArgs(e,{str:o,length:e.length-1}))+1:this.handle(this._prepareHandlingArgs(e,{str:o,length:e.length-1}))}clear(e){this._tryAcceptChar(" ",e),this.next().clear(this._prepareHandlingArgs(e))}reset(){this._accepted(!1),this.next().reset()}_tryAcceptChar(e,t){if(this._accepted(!1),!this._isAllowed(e,t))return;let n=e===" "?this.maskChar:e;t.fullText=t.fullText.substring(0,t.index)+n+t.fullText.substring(t.index+1),this._accepted(!0),this._value=e}_accepted(e){if(!arguments.length)return!!this._isAccepted;this._isAccepted=!!e}first(e){return this._value===" "?e||0:super.first(e)}_isAllowed(e,t){return e===" "?!0:this._isValid(e,t)}_isValid(e,t){let{allowedChars:n}=this;return n instanceof RegExp?n.test(e):A(n)?n(e,t.index,t.fullText):Array.isArray(n)?n.includes(e):n===e}isAccepted(e){return e===0?this._accepted():this.next().isAccepted(e-1)}_adjustedForward(e,t,n){return t>=e?t:this.next()._adjustedForward(e,t+1,n)||t+1}_adjustedBackward(e,t){return t>=e-1?e:this.next()._adjustedBackward(e,t+1)||t+1}isValid(e){return this._isValid(this._value,e)&&this.next().isValid(this._prepareHandlingArgs(e))}},hu=class extends uu{value(){return this.next().value()}handle(e){let t=Object.prototype.hasOwnProperty.call(e,"value"),n=t?e.value:e.text;if(!n.length||!e.length)return 0;if(e.start||t)return this.next().handle(this._prepareHandlingArgs(e,{start:e.start&&e.start-1}));let o=n[0],s=n.substring(1);this._tryAcceptChar(o);let r=this._isAllowed(o)?this._prepareHandlingArgs(e,{str:s,length:e.length-1}):e;return this.next().handle(r)+1}clear(e){this._accepted(!1),this.next().clear(this._prepareHandlingArgs(e))}_tryAcceptChar(e){this._accepted(this._isValid(e))}_isValid(e){return e===this.maskChar}first(e){return e=e||0,this.next().first(e+1)}_adjustedForward(e,t,n){return t>=e&&n===this.maskChar?t:e===t+1&&this._accepted()?e:this.next()._adjustedForward(e,t+1,n)}_adjustedBackward(e,t){return t>=e-1?0:this.next()._adjustedBackward(e,t+1)}isValid(e){return this.next().isValid(this._prepareHandlingArgs(e))}};var R3="blur beforedeactivate";var F3=["deleteContentBackward","deleteSoftLineBackward","deleteContent","deleteHardLineBackward"],P3=["historyUndo","historyRedo"],k3=["focusIn","focusOut","input","paste","cut","drop","beforeInput"];function B3(i){return" ".repeat(i)}var Ng=class{constructor(e){this.editor=e}_editorOption(){return this.editor.option(...arguments)}_editorInput(){return this.editor._input()}_editorCaret(e){if(!e)return this.editor._caret();this.editor._caret(e)}_attachChangeEventHandler(){if(!this._editorOption("valueChangeEvent").split(" ").includes("change"))return;let e=this._editorInput(),t=D(R3,"dxMask");_.on(e,t,n=>{this.editor._changeHandler(n)})}_beforeInputHandler(){this._previousText=this._editorOption("text"),this._prevCaret=this._editorCaret()}_inputHandler(e){let{originalEvent:t}=e;if(!t)return;let{inputType:n}=t;if(P3.includes(n))this._handleHistoryInputEvent();else if(F3.includes(n))this._handleBackwardDeleteInputEvent();else{let o=this._editorCaret();if(!o.end)return;this._clearSelectedText(),this._autoFillHandler(t),this._editorCaret(o),this._handleInsertTextInputEvent(t.data)}this._editorOption("text")===this._previousText&&e.stopImmediatePropagation()}_handleHistoryInputEvent(){let e=this._editorCaret();this._updateEditorMask({start:e.start,length:e.end-e.start,text:""}),this._editorCaret(this._prevCaret)}_handleBackwardDeleteInputEvent(){this._clearSelectedText();let e=this._editorCaret();this.editor.setForwardDirection(),this.editor._adjustCaret(),this._editorCaret().start!==e.start&&(this.editor.setBackwardDirection(),this.editor._adjustCaret())}_clearSelectedText(){var e,t;let n=((e=this._prevCaret)===null||e===void 0?void 0:e.end)-((t=this._prevCaret)===null||t===void 0?void 0:t.start)||1,o=this._editorCaret();this._isAutoFill()||(this.editor.setBackwardDirection(),this._updateEditorMask({start:o.start,length:n,text:B3(n)}))}_handleInsertTextInputEvent(e){var t;let n=e??"";this.editor.setForwardDirection(),this._updateEditorMask({start:((t=this._prevCaret)===null||t===void 0?void 0:t.start)??0,length:n.length||1,text:n})||this._editorCaret(this._prevCaret)}_updateEditorMask(e){let t=e.text.length,n=this.editor._handleChain(e);if(this.editor._displayMask(),this.editor.isForwardDirection()){let{start:o,end:s}=this._editorCaret(),r=n-t;n>1&&t===1&&this._editorCaret({start:o+r,end:s+r}),this.editor._adjustCaret()}return!!n}_focusInHandler(){if(this.editor._showMaskPlaceholder(),this.editor.setForwardDirection(),!this.editor._isValueEmpty()&&this._editorOption("isValid"))this.editor._adjustCaret();else{let e=this.editor._maskRulesChain.first();this._caretTimeout=setTimeout(()=>{this._editorCaret({start:e,end:e})},0)}}_focusOutHandler(e){this.editor._changeHandler(e),this._editorOption("showMaskMode")==="onFocus"&&this.editor._isValueEmpty()&&(this._editorOption("text",""),this.editor._renderDisplayText(""))}_delHandler(e){let{editor:t}=this;t._maskKeyHandler(e,()=>{t._hasSelection()||t._handleKey(" ")})}_cutHandler(e){let t=this._editorCaret(),n=this._editorInput().val().substring(t.start,t.end);this.editor._maskKeyHandler(e,()=>Vc(e,n))}_dropHandler(){this._clearDragTimer(),this._dragTimer=setTimeout(()=>{let e=this.editor._convertToValue(this._editorInput().val());this._editorOption("value",e)})}_pasteHandler(e){let{editor:t}=this;if(this._editorOption("disabled"))return;let n=this._editorCaret();t._maskKeyHandler(e,()=>{let o=Vc(e),s=t._maskRulesChain.text().substring(n.end),r=t._handleChain({text:o,start:n.start,length:o.length}),a=n.start+r;t._handleChain({text:s,start:a,length:s.length}),t._caret({start:a,end:a})})}_autoFillHandler(e){let{editor:t}=this,n=this._editorInput().val();this._inputHandlerTimer=setTimeout(()=>{this._isAutoFill()&&(t._maskKeyHandler(e,()=>{t._handleChain({text:n,start:0,length:n.length})}),t._validateMask())})}_isAutoFill(){let e=this._editorInput();if(we.webkit){let t=e.get(0);return t?.matches(":-webkit-autofill")??!1}return!1}_clearDragTimer(){clearTimeout(this._dragTimer)}_clearTimers(){this._clearDragTimer(),clearTimeout(this._caretTimeout),clearTimeout(this._inputHandlerTimer)}getHandler(e){return t=>{var n;(n=this[`_${e}Handler`])===null||n===void 0||n.call(this,t)}}attachEvents(){let e=this._editorInput();k3.forEach(t=>{let n=D(t.toLowerCase(),"dxMask");_.on(e,n,this.getHandler(t))}),this._attachChangeEventHandler()}detachEvents(){this._clearTimers(),_.off(this._editorInput(),".dxMask")}clean(){this._clearTimers()}};var{ios:V3,mac:L3}=F.real(),N3=V3||L3,H3=function(i){let e;try{e={start:i.selectionStart,end:i.selectionEnd}}catch{e={start:0,end:0}}return e},$3=function(i,e){let t=S.getBody();if(!(!t.contains(i)&&!t.contains(i.getRootNode().host)))try{i.selectionStart=e.start,i.selectionEnd=e.end}catch{}},z3=function(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(i=u(i).get(0),!f(e))return H3(i);!t&&N3&&S.getActiveElement(i)!==i||$3(i,e)},lR=z3;var dR=lR;var W3={0:/[0-9]/,9:/[0-9\s]/,"#":/[-+0-9\s]/,L:i=>Hg(i),l:i=>Hg(i)||uR(i),C:/\S/,c:/./,A:i=>Hg(i)||cR(i),a:i=>Hg(i)||cR(i)||uR(i)};function cR(i){return/[0-9]/.test(i)}function Hg(i){let e=i.charCodeAt();return e>64&&e<91||e>96&&e<123||e>127}function uR(i){return i===" "}var G3=aR.inherit({_getDefaultOptions(){return m(this.callBase(),{mask:"",maskChar:"_",maskRules:{},maskInvalidMessage:O.format("validation-mask"),useMaskedValue:!1,showMaskMode:"always"})},_supportedKeys(){let i=this,e={del:i._maskStrategy.getHandler("del"),enter:i._changeHandler},t=i.callBase();return x(e,(n,o)=>{let s=t[n];t[n]=function(r){i.option("mask")&&o.call(i,r),s&&s(r)}}),t},_getSubmitElement(){return this.option("mask")?this._$hiddenElement:this.callBase()},_init(){this.callBase(),this._initMaskStrategy()},_initMaskStrategy(){this._maskStrategy=new Ng(this)},_initMarkup(){this._renderHiddenElement(),this.callBase()},_attachMouseWheelEventHandlers(){if(!(this._onMouseWheel!==E))return;let e=this._input(),t=D(Vr,this.NAME),n=this._createAction(o=>{let{event:s}=o;Tn(e)&&!ft(s)&&(this._onMouseWheel(s),s.preventDefault(),s.stopPropagation())});_.off(e,t),_.on(e,t,o=>{n({event:o})})},_onMouseWheel:E,_useMaskBehavior(){return!!this.option("mask")},_attachDropEventHandler(){if(!this._useMaskBehavior())return;let e=D("drop",this.NAME),t=this._input();_.off(t,e),_.on(t,e,n=>n.preventDefault())},_render(){this._attachMouseWheelEventHandlers(),this._renderMask(),this.callBase(),this._attachDropEventHandler()},_renderHiddenElement(){this.option("mask")&&(this._$hiddenElement=u("<input>").attr("type","hidden").appendTo(this._inputWrapper()))},_removeHiddenElement(){this._$hiddenElement&&this._$hiddenElement.remove()},_renderMask(){this.$element().removeClass("dx-texteditor-masked"),this._maskRulesChain=null,this._maskStrategy.detachEvents(),this.option("mask")&&(this.$element().addClass("dx-texteditor-masked"),this._maskStrategy.attachEvents(),this._parseMask(),this._renderMaskedValue())},_changeHandler(i){let e=this._input(),t=e.val();if(t===this._changedValue)return;this._changedValue=t;let n=Ro(i,{type:"change"});_.trigger(e,n)},_parseMask(){this._maskRules=m({},W3,this.option("maskRules")),this._maskRulesChain=this._parseMaskRule(0)},_parseMaskRule(i){let e=this.option("mask");if(i>=e.length)return new Lg;let t=e[i],n=t==="\\",o=n?new hu({maskChar:e[i+1]}):this._getMaskRule(t);return o.next(this._parseMaskRule(i+1+n)),o},_getMaskRule(i){let e;return x(this._maskRules,(t,n)=>{if(t===i)return e={pattern:t,allowedChars:n},!1}),f(e)?new uu(m({maskChar:this.option("maskChar")||" "},e)):new hu({maskChar:i})},_renderMaskedValue(){if(!this._maskRulesChain)return;let i=this.option("value")||"";this._maskRulesChain.clear(this._normalizeChainArguments());let e={length:i.length};e[this._isMaskedValueMode()?"text":"value"]=i,this._handleChain(e),this._displayMask()},_replaceSelectedText(i,e,t){if(t===void 0)return i;let n=i.slice(0,e.start),o=i.slice(e.end);return n+t+o},_isMaskedValueMode(){return this.option("useMaskedValue")},_displayMask(i){i=i||this._caret(),this._renderValue(),this._caret(i)},_isValueEmpty(){return al(this._value)},_shouldShowMask(){return this.option("showMaskMode")==="onFocus"?Tn(this._input())||!this._isValueEmpty():!0},_showMaskPlaceholder(){if(this._shouldShowMask()){let i=this._maskRulesChain.text();this.option("text",i),this.option("showMaskMode")==="onFocus"&&this._renderDisplayText(i)}},_renderValue(){if(this._maskRulesChain&&(this._showMaskPlaceholder(),this._$hiddenElement)){let i=this._maskRulesChain.value(),e=al(i)?"":this._getPreparedValue();this._$hiddenElement.val(e)}return this.callBase()},_getPreparedValue(){return this._convertToValue().replace(/\s+$/,"")},_valueChangeEventHandler(i){if(!this._maskRulesChain){this.callBase.apply(this,arguments);return}this._saveValueChangeEvent(i),this.option("value",this._getPreparedValue())},_isControlKeyFired(i){return this._isControlKey(ke(i))||ft(i)},_handleChain(i){let e=this._maskRulesChain.handle(this._normalizeChainArguments(i));return this._updateMaskInfo(),e},_normalizeChainArguments(i){return i=i||{},i.index=0,i.fullText=this._maskRulesChain.text(),i},_convertToValue(i){return this._isMaskedValueMode()?i=this._replaceMaskCharWithEmpty(i||this._textValue||""):i=i||this._value||"",i},_replaceMaskCharWithEmpty(i){return i.replace(new RegExp(this.option("maskChar"),"g")," ")},_maskKeyHandler(i,e){if(this.option("readOnly"))return;this.setForwardDirection(),i.preventDefault(),this._handleSelection();let t=this._input().val(),n=()=>{t!==this._input().val()&&_.trigger(this._input(),"input")},o=e();o?o.then(n):(this.setForwardDirection(),this._adjustCaret(),this._displayMask(),this._maskRulesChain.reset(),n())},_handleKey(i,e){this._direction(e||"forward"),this._adjustCaret(i),this._handleKeyChain(i),this._moveCaret()},_handleSelection(){if(!this._hasSelection())return;let i=this._caret(),e=new Array(i.end-i.start+1).join(" ");this._handleKeyChain(e)},_handleKeyChain(i){let e=this._caret(),t=this.isForwardDirection()?e.start:e.start-1,n=this.isForwardDirection()?e.end:e.end-1,o=t===n?1:n-t;this._handleChain({text:i,start:t,length:o})},_tryMoveCaretBackward(){this.setBackwardDirection();let i=this._caret().start;return this._adjustCaret(),!i||i!==this._caret().start},_adjustCaret(i){let e=this._caret().start,t=this.isForwardDirection(),n=this._maskRulesChain.adjustedCaret(e,t,i);this._caret({start:n,end:n})},_moveCaret(){let i=this._caret().start,e=i+(this.isForwardDirection()?0:-1),t=this._maskRulesChain.isAccepted(e)?i+(this.isForwardDirection()?1:-1):i;this._caret({start:t,end:t})},_caret(i,e){let t=this._input();if(t.length){if(!arguments.length)return dR(t);dR(t,i,e)}},_hasSelection(){let i=this._caret();return i.start!==i.end},_direction(i){if(!arguments.length)return this._typingDirection;this._typingDirection=i},setForwardDirection(){this._direction("forward")},setBackwardDirection(){this._direction("backward")},isForwardDirection(){return this._direction()==="forward"},_updateMaskInfo(){this._textValue=this._maskRulesChain.text(),this._value=this._maskRulesChain.value()},_clean(){this._maskStrategy&&this._maskStrategy.clean(),this.callBase()},_validateMask(){if(!this._maskRulesChain)return;let i=al(this.option("value"))||this._maskRulesChain.isValid(this._normalizeChainArguments());this.option({isValid:i,validationError:i?null:{editorSpecific:!0,message:this.option("maskInvalidMessage")}})},_updateHiddenElement(){this._removeHiddenElement(),this.option("mask")&&(this._input().removeAttr("name"),this._renderHiddenElement()),this._setSubmitElementName(this.option("name"))},_updateMaskOption(){this._updateHiddenElement(),this._renderMask(),this._validateMask(),this._refreshValueChangeEvent()},_processEmptyMask(i){if(i)return;let e=this.option("value");this.option({text:e,isValid:!0,validationError:null}),this.validationRequest.fire({value:e,editor:this}),this._renderValue()},_optionChanged(i){switch(i.name){case"mask":this._updateMaskOption(),this._processEmptyMask(i.value);break;case"maskChar":case"maskRules":case"useMaskedValue":this._updateMaskOption();break;case"value":this._renderMaskedValue(),this._validateMask(),this.callBase(i),this._changedValue=this._input().val();break;case"maskInvalidMessage":break;case"showMaskMode":this.option("text",""),this._renderValue();break;default:this.callBase(i)}},clear(){let{value:i}=this._getDefaultOptions();this.option("value")===i&&this._renderMaskedValue(),this.callBase()}}),wb=G3;K("dxTextEditor",wb);var $g=wb;var j3=q(),K3=["backspace","tab","enter","pageUp","pageDown","end","home","leftArrow","rightArrow","downArrow","upArrow","del"];var hR=$g.inherit({ctor(i,e){e&&(this._showClearButton=e.showClearButton),this.callBase.apply(this,arguments)},_getDefaultOptions(){return m(this.callBase(),{value:"",mode:"text",maxLength:null})},_initMarkup(){this.$element().addClass("dx-textbox"),this.callBase(),this.setAria("role","textbox")},_renderInputType(){this.callBase(),this._renderSearchMode()},_useTemplates:()=>!1,_renderProps(){this.callBase(),this._toggleMaxLengthProp()},_toggleMaxLengthProp(){let i=this._getMaxLength();i&&i>0?this._input().attr("maxLength",i):this._input().removeAttr("maxLength")},_renderSearchMode(){let i=this._$element;this.option("mode")==="search"?(i.addClass("dx-searchbox"),this._renderSearchIcon(),this._showClearButton===void 0&&(this._showClearButton=this.option("showClearButton"),this.option("showClearButton",!0))):(i.removeClass("dx-searchbox"),this._$searchIcon&&this._$searchIcon.remove(),this.option("showClearButton",this._showClearButton===void 0?this.option("showClearButton"):this._showClearButton),delete this._showClearButton)},_renderSearchIcon(){let i=u("<div>").addClass("dx-icon").addClass("dx-icon-search");i.prependTo(this._input().parent()),this._$searchIcon=i},_getLabelContainerWidth(){if(this._$searchIcon){let i=this._input().parent();return W(i)-this._getLabelBeforeWidth()}return this.callBase()},_getLabelBeforeWidth(){let i=this.callBase();return this._$searchIcon&&(i+=ae(this._$searchIcon)),i},_optionChanged(i){switch(i.name){case"maxLength":this._toggleMaxLengthProp();break;case"mode":this.callBase(i),this._updateLabelWidth();break;case"mask":this.callBase(i),this._toggleMaxLengthProp();break;default:this.callBase(i)}},_onKeyDownCutOffHandler(i){let e=this._getMaxLength();if(e&&!i.ctrlKey&&!this._hasSelection()){let t=u(i.target),n=ke(i);return this._cutOffExtraChar(t),t.val().length<e||K3.includes(n)||j3.getSelection().toString()!==""}return!0},_onChangeCutOffHandler(i){let e=u(i.target);this.option("maxLength")&&this._cutOffExtraChar(e)},_cutOffExtraChar(i){let e=this._getMaxLength(),t=i.val();e&&t.length>e&&i.val(t.substr(0,e))},_getMaxLength(){return!!this.option("mask")?null:this.option("maxLength")}});K("dxTextBox",hR);var pR=hR;var gR=pR;var _o=gR;function mR(i){return class{constructor(){throw new Error(`Module '${i}' not found`)}static getInstance(){}}}var fR=mR("TextBox"),$o={_getDefaultOptions:function(){return m(this.callBase(),{searchMode:"",searchExpr:null,searchValue:"",searchEnabled:!1,searchEditorOptions:{}})},_initMarkup:function(){this._renderSearch(),this.callBase()},_renderSearch:function(){let i=this.$element(),e=this.option("searchEnabled"),t=this._addWidgetPrefix("search"),n=this._addWidgetPrefix("with-search");if(!e){i.removeClass(n),this._removeSearchBox();return}let o=this._getSearchEditorOptions();this._searchEditor?this._searchEditor.option(o):(i.addClass(n),this._$searchEditorElement=u("<div>").addClass(t).prependTo(i),this._searchEditor=this._createComponent(this._$searchEditorElement,fR,o))},_removeSearchBox:function(){this._$searchEditorElement&&this._$searchEditorElement.remove(),delete this._$searchEditorElement,delete this._searchEditor},_getSearchEditorOptions:function(){let i=this,e=i.option("searchEditorOptions"),t=O.format("Search");return m({mode:"search",placeholder:t,tabIndex:i.option("tabIndex"),value:i.option("searchValue"),valueChangeEvent:"input",inputAttr:{"aria-label":t},onValueChanged:function(n){let o=i.option("searchTimeout");i._valueChangeDeferred=new y,clearTimeout(i._valueChangeTimeout),i._valueChangeDeferred.done(function(){this.option("searchValue",n.value)}.bind(i)),n.event&&n.event.type==="input"&&o?i._valueChangeTimeout=setTimeout(function(){i._valueChangeDeferred.resolve()},o):i._valueChangeDeferred.resolve()}},e)},_getAriaTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_focusTarget:function(){return this.option("searchEnabled")?this._itemContainer(!0):this.callBase()},_updateFocusState:function(i,e){this.option("searchEnabled")&&this._toggleFocusClass(e,this.$element()),this.callBase(i,e)},getOperationBySearchMode:function(i){return i==="equals"?"=":i},_optionChanged:function(i){switch(i.name){case"searchEnabled":case"searchEditorOptions":this._invalidate();break;case"searchExpr":case"searchMode":case"searchValue":if(!this._dataSource){ie.log("W1009");return}i.name==="searchMode"?this._dataSource.searchOperation(this.getOperationBySearchMode(i.value)):this._dataSource[i.name](i.value),this._dataSource.load();break;case"searchTimeout":break;default:this.callBase(i)}},focus:function(){if(!this.option("focusedElement")&&this.option("searchEnabled")){this._searchEditor&&this._searchEditor.focus();return}this.callBase()},_cleanAria:function(){let i=this.$element();this.setAria({role:null,activedescendant:null},i),i.attr("tabIndex",null)},_clean(){this.callBase(),this._cleanAria()},_refresh:function(){this._valueChangeDeferred&&this._valueChangeDeferred.resolve(),this.callBase()},setEditorClass:function(i){fR=i}};var U3=pe.inherit({ctor(){this._dataStructure=[],this._itemsCount=0,this._visibleItemsCount=0},_indexByKey:{},_convertItemsToNodes(i,e){let t=this;x(i,(n,o)=>{let s=f(e)?e:t._getParentId(o),r=t._convertItemToNode(o,s);t._dataStructure.push(r),t._checkForDuplicateId(r.internalFields.key),t._indexByKey[r.internalFields.key]=t._dataStructure.length-1,t._itemHasChildren(o)&&t._convertItemsToNodes(t._dataAccessors.getters.items(o),r.internalFields.key)})},_checkForDuplicateId(i){if(f(this._indexByKey[i]))throw ie.Error("E1040",i)},_getParentId(i){return this._dataType==="plain"?this._dataAccessors.getters.parentKey(i):void 0},_itemHasChildren(i){if(this._dataType==="plain")return;let e=this._dataAccessors.getters.items(i);return e&&e.length},_getUniqueKey(i){let e=this._dataAccessors.getters.key,t=e(i);return e&&(t||t===0)&&Or(t)?t:this.getItemsCount()},_convertItemToNode(i,e){this._itemsCount++,i.visible!==!1&&this._visibleItemsCount++;let t={internalFields:{disabled:this._dataAccessors.getters.disabled(i,{defaultValue:!1}),expanded:this._dataAccessors.getters.expanded(i,{defaultValue:!1}),selected:this._dataAccessors.getters.selected(i,{defaultValue:!1}),key:this._getUniqueKey(i),parentKey:f(e)?e:this._rootValue,item:this._makeObjectFromPrimitive(i),childrenKeys:[]}};return m(t,i),delete t.items,t},setChildrenKeys(){let i=this;x(this._dataStructure,(e,t)=>{if(t.internalFields.parentKey===i._rootValue)return;let n=i.getParentNode(t);n&&n.internalFields.childrenKeys.push(t.internalFields.key)})},_makeObjectFromPrimitive(i){if(Or(i)){let e=i;i={},this._dataAccessors.setters.key(i,e)}return i},_convertToPublicNode(i,e){if(!i)return null;let t={text:this._dataAccessors.getters.display(i),key:i.internalFields.key,selected:i.internalFields.selected,expanded:i.internalFields.expanded,disabled:i.internalFields.disabled,parent:e||null,itemData:i.internalFields.item,children:[],items:[]};return t.parent&&(t.parent.children.push(t),t.parent.items.push(t)),t},convertToPublicNodes(i,e){if(!i.length)return[];let t=this,n=[];return x(i,(o,s)=>{s=Or(s)?t._getByKey(s):s;let r=t._convertToPublicNode(s,e);r.children=t.convertToPublicNodes(s.internalFields.childrenKeys,r),n.push(r),s.internalFields.publicNode=r}),n},setDataAccessors(i){this._dataAccessors=i},_getByKey(i){return this._dataStructure[this.getIndexByKey(i)]||null},getParentNode(i){return this._getByKey(i.internalFields.parentKey)},getByKey(i,e){if(e==null)return null;let t=null,n=this;return function(o,s){return x(o,(r,a)=>{if((a.internalFields&&a.internalFields.key||n._dataAccessors.getters.key(a)).toString()===s.toString())return t=a,!1}),t}(i,e)},getItemsCount(){return this._itemsCount},getVisibleItemsCount(){return this._visibleItemsCount},updateIndexByKey(){let i=this;this._indexByKey={},x(this._dataStructure,(e,t)=>{i._checkForDuplicateId(t.internalFields.key),i._indexByKey[t.internalFields.key]=e})},updateChildrenKeys(){this._indexByKey={},this.removeChildrenKeys(),this.updateIndexByKey(),this.setChildrenKeys()},removeChildrenKeys(){this._indexByKey={},x(this._dataStructure,(i,e)=>{e.internalFields.childrenKeys=[]})},getIndexByKey(i){return this._indexByKey[i]},createPlainStructure(i,e,t){return this._itemsCount=0,this._visibleItemsCount=0,this._rootValue=e,this._dataType=t,this._indexByKey={},this._convertItemsToNodes(i),this.setChildrenKeys(),this._dataStructure}}),_R=U3;var ld="expanded",Na="selected",q3="disabled";$o.setEditorClass(_o);var Y3=pe.inherit({ctor(i){this.options={},m(this.options,this._defaultOptions(),i),this.options.dataConverter.setDataAccessors(this.options.dataAccessors),this._selectedNodesKeys=[],this._expandedNodesKeys=[],this._dataStructure=[],this._createInternalDataStructure(),this.getTreeNodes()},setOption(i,e){this.options[i]=e,i==="recursiveSelection"&&this._updateSelection()},_defaultOptions:()=>({dataAccessors:void 0,items:[],multipleSelection:!0,recursiveSelection:!1,recursiveExpansion:!1,rootValue:0,searchValue:"",dataType:"tree",searchMode:"contains",dataConverter:new _R,onNodeChanged:E,sort:null}),_createInternalDataStructure(){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(){this.options.recursiveSelection&&(this._setChildrenSelection(),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(Na)},_updateExpansion(i){this.options.recursiveExpansion&&(i?this._updateOneBranch(i):this._setParentExpansion()),this._expandedNodesKeys=this._updateNodesKeysArray(ld)},_updateNodesKeysArray(i){let e=this,t=[];return x(e._getDataBySelectionMode(),(n,o)=>{e._isNodeVisible(o)&&o.internalFields[i]&&(i===ld||e.options.multipleSelection?t.push(o.internalFields.key):(t.length&&e.toggleSelection(t[0],!1,!0),t=[o.internalFields.key]))}),t},_getDataBySelectionMode(){return this.options.multipleSelection?this.getData():this.getFullData()},_isNodeVisible:i=>i.internalFields.item.visible!==!1,_getByKey(i,e){return i===this._dataStructure?this.options.dataConverter._getByKey(e):this.options.dataConverter.getByKey(i,e)},_setChildrenSelection(){let i=this;x(this._dataStructure,(e,t)=>{if(!t.internalFields.childrenKeys.length)return;let n=t.internalFields.selected;n===!0&&i._toggleChildrenSelection(t,n)})},_setParentSelection(){let i=this;x(this._dataStructure,(e,t)=>{i.options.dataConverter.getParentNode(t)&&t.internalFields.parentKey!==i.options.rootValue&&i._iterateParents(t,o=>{let s=i._calculateSelectedState(o);i._setFieldState(o,Na,s)})})},_setParentExpansion(){let i=this;x(this._dataStructure,(e,t)=>{t.internalFields.expanded&&i._updateOneBranch(t.internalFields.key)})},_updateOneBranch(i){let e=this,t=this.getNodeByKey(i);e._iterateParents(t,n=>{e._setFieldState(n,ld,!0)})},_iterateChildren(i,e,t,n){if(!A(t))return;let o=this,s=i.internalFields.key;n=n||[],n.indexOf(s)===-1&&(n.push(s),x(i.internalFields.childrenKeys,(r,a)=>{let l=o.getNodeByKey(a);t(l),l.internalFields.childrenKeys.length&&e&&o._iterateChildren(l,e,t,n)}))},_iterateParents(i,e,t){if(i.internalFields.parentKey===this.options.rootValue||!A(e))return;t=t||[];let{key:n}=i.internalFields;if(t.indexOf(n)===-1){t.push(n);let o=this.options.dataConverter.getParentNode(i);o&&(e(o),o.internalFields.parentKey!==this.options.rootValue&&this._iterateParents(o,e,t))}},_calculateSelectedState(i){let e=i.internalFields.childrenKeys.length,t=0,n=0,o=!1;for(let s=0;s<=e-1;s++){let r=this.getNodeByKey(i.internalFields.childrenKeys[s]),a=r.internalFields.item.visible===!1,l=r.internalFields.selected;if(a){n++;continue}l?t++:l===void 0&&(t+=.5)}return t&&(o=t===e-n?!0:void 0),o},_toggleChildrenSelection(i,e){let t=this;this._iterateChildren(i,!0,n=>{t._isNodeVisible(n)&&t._setFieldState(n,Na,e)})},_setFieldState(i,e,t){i.internalFields[e]!==t&&(i.internalFields[e]=t,i.internalFields.publicNode&&(i.internalFields.publicNode[e]=t),this.options.dataAccessors.setters[e](i.internalFields.item,t),this.options.onNodeChanged(i))},_markChildren(i){let e=this;x(i,(t,n)=>{let o=e.getIndexByKey(n),s=e.getNodeByKey(n);e._dataStructure[o]=0,s.internalFields.childrenKeys.length&&e._markChildren(s.internalFields.childrenKeys)})},_removeNode(i){let e=this.getNodeByKey(i);this._dataStructure[this.getIndexByKey(i)]=0,this._markChildren(e.internalFields.childrenKeys);let t=this,n=0,o=m([],this._dataStructure);x(o,(s,r)=>{r||(t._dataStructure.splice(s-n,1),n++)})},_addNode(i){let{dataConverter:e}=this.options,t=e._convertItemToNode(i,this.options.dataAccessors.getters.parentKey(i));this._dataStructure=this._dataStructure.concat(t),this._initialDataStructure=this._initialDataStructure.concat(t),e._dataStructure=e._dataStructure.concat(t)},_updateFields(){this.options.dataConverter.updateChildrenKeys(),this._updateSelection(),this._updateExpansion()},getSelectedNodesKeys(){return this._selectedNodesKeys},getExpandedNodesKeys(){return this._expandedNodesKeys},getData(){return this._dataStructure},getFullData(){return this._initialDataStructure},getNodeByItem(i){let e=null;return x(this._dataStructure,(t,n)=>{if(n.internalFields.item===i)return e=n,!1}),e},getNodesByItems(i){let e=this,t=[];return x(i,(n,o)=>{let s=e.getNodeByItem(o);s&&t.push(s)}),t},getNodeByKey(i,e){return this._getByKey(e||this._getDataBySelectionMode(),i)},getTreeNodes(){return this.options.dataConverter.convertToPublicNodes(this.getRootNodes())},getItemsCount(){return this.options.dataConverter.getItemsCount()},getVisibleItemsCount(){return this.options.dataConverter.getVisibleItemsCount()},getPublicNode:i=>i.internalFields.publicNode,getRootNodes(){return this.getChildrenNodes(this.options.rootValue)},getChildrenNodes(i){return Mt(this._dataStructure,{langParams:this.options.langParams}).filter(["internalFields.parentKey",i]).toArray()},getIndexByKey(i){return this.options.dataConverter.getIndexByKey(i)},addItem(i){this._addNode(i),this._updateFields()},removeItem(i){this._removeNode(i),this._updateFields()},toggleSelection(i,e,t){let n=this._isSingleModeUnselect(e),o=this._getByKey(t||n?this._initialDataStructure:this._dataStructure,i);this._setFieldState(o,Na,e),this.options.recursiveSelection&&!t&&(e?this._setChildrenSelection():this._toggleChildrenSelection(o,e),this._setParentSelection()),this._selectedNodesKeys=this._updateNodesKeysArray(Na)},_isSingleModeUnselect(i){return!this.options.multipleSelection&&!i},toggleNodeDisabledState(i,e){let t=this.getNodeByKey(i);this._setFieldState(t,q3,e)},toggleSelectAll(i){if(!f(i))return;let e=this,t=e._selectedNodesKeys[e._selectedNodesKeys.length-1],n=e._isSingleModeUnselect(i)?this._initialDataStructure:this._dataStructure;x(n,(o,s)=>{e._isNodeVisible(s)&&e._setFieldState(s,Na,i)}),e._selectedNodesKeys=e._updateNodesKeysArray(Na),!i&&e.options.selectionRequired&&e.toggleSelection(t,!0)},isAllSelected(){return this.getSelectedNodesKeys().length?this.getSelectedNodesKeys().length===this.getVisibleItemsCount()?!0:void 0:!1},toggleExpansion(i,e){let t=this.getNodeByKey(i);this._setFieldState(t,ld,e),e&&this._updateExpansion(i),this._expandedNodesKeys=this._updateNodesKeysArray(ld)},isFiltered(i){return!this.options.searchValue.length||!!this._filterDataStructure(this.options.searchValue,[i]).length},_createCriteria(i,e,t){let n=[];return Array.isArray(i)?(x(i,(o,s)=>{n.push([s,t,e],"or")}),n.pop(),n):[i,t,e]},_filterDataStructure(i,e){let t=this.options.searchExpr||this.options.dataAccessors.getters.display,n=$o.getOperationBySearchMode(this.options.searchMode),o=this._createCriteria(t,i,n);return e=e||this._initialDataStructure,Mt(e,{langParams:this.options.langParams}).filter(o).toArray()},search(i){let e=this,t=this._filterDataStructure(i),{dataConverter:n}=this.options;return function o(s,r){let{length:a}=s;for(;r<a;){let l=s[r];if(l.internalFields.parentKey===e.options.rootValue){r++;continue}let d=n.getParentNode(l);if(!d){ie.log("W1007",l.internalFields.parentKey,l.internalFields.key),r++;continue}if(d.internalFields.expanded||e._setFieldState(d,ld,!0),s.includes(d)){r++;continue}s.splice(r,0,d),o(s,r)}}(t,0),this.options.sort&&(t=cn.queryByOptions(Mt(t),{sort:this.options.sort,langParams:this.options.langParams}).toArray()),n._indexByKey={},x(t,(o,s)=>{s.internalFields.childrenKeys=[],n._indexByKey[s.internalFields.key]=o}),n._dataStructure=t,n.setChildrenKeys(),n._dataStructure}}),CR=Y3;var X3=jn.inherit({_getDefaultOptions(){return m(this.callBase(),{keyExpr:"id",displayExpr:"text",selectedExpr:"selected",disabledExpr:"disabled",itemsExpr:"items",hoverStateEnabled:!0,parentIdExpr:"parentId",expandedExpr:"expanded"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this._initAccessors(),this._initDataAdapter(),this._initDynamicTemplates()},_initDataSource(){this.callBase(),this._dataSource&&this._dataSource.paginate(!1)},_initDataAdapter(){let i=this._createDataAdapterAccessors();this._dataAdapter=new CR(m({dataAccessors:{getters:i.getters,setters:i.setters},items:this.option("items")},this._getDataAdapterOptions()))},_getDataAdapterOptions:E,_getItemExtraPropNames:E,_initDynamicTemplates(){let i=["text","html","items","icon"].concat(this._getItemExtraPropNames());this._templateManager.addDefaultTemplates({item:new Ai(this._addContent.bind(this),i,this.option("integrationOptions.watchMethod"),{text:this._displayGetter,items:this._itemsGetter})})},_addContent(i,e){i.html(e.html).append(this._getIconContainer(e)).append(this._getTextContainer(e))},_getLinkContainer(i,e,t){let{linkAttr:n,url:o}=t,s=z(n)?n:{};return u("<a>").addClass("dx-item-url").attr(I({},s,{href:o})).append(i).append(e)},_getIconContainer(i){if(!i.icon)return;let e=Mi(i.icon);if(e.is("img")){let t=this.NAME.startsWith("dxPrivateComponent")?"":`${this.NAME} `;e.attr("alt",`${t}item icon`)}return e},_getTextContainer:i=>u("<span>").text(i.text),_initAccessors(){let i=this;x(this._getAccessors(),(e,t)=>{i._compileAccessor(t)}),this._compileDisplayGetter()},_getAccessors:()=>["key","selected","items","disabled","parentId","expanded"],_getChildNodes(i){let e=this,t=[];return x(i.internalFields.childrenKeys,(n,o)=>{let s=e._dataAdapter.getNodeByKey(o);t.push(s)}),t},_hasChildren:i=>i&&i.internalFields.childrenKeys.length,_compileAccessor(i){let e=`_${i}Getter`,t=`_${i}Setter`,n=this.option(`${i}Expr`);if(!n){this[e]=E,this[t]=E;return}if(A(n)){this[t]=function(o,s){o[n()]=s},this[e]=function(o){return o[n()]};return}this[e]=Ce(n),this[t]=cl(n)},_createDataAdapterAccessors(){let i=this,e={getters:{},setters:{}};return x(this._getAccessors(),(t,n)=>{let o=`_${n}Getter`,s=`_${n}Setter`,r=n==="parentId"?"parentKey":n;e.getters[r]=i[o],e.setters[r]=i[s]}),e.getters.display=this._displayGetter?this._displayGetter:t=>t.text,e},_initMarkup(){this.callBase(),this._addWidgetClass()},_addWidgetClass(){this._focusTarget().addClass(this._widgetClass())},_widgetClass:E,_renderItemFrame(i,e){let t=this.callBase.apply(this,arguments);return t.toggleClass("dx-state-disabled",!!this._disabledGetter(e)),t},_optionChanged(i){switch(i.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(i);break;default:this.callBase(i)}}}),xR=X3;var zg=xR;var Q3=at,Wg=Q3;var Z3=zg,vR=Z3;var Sb=class extends Xl{_getPlainItems(){return qe(this._collectionWidget.option("items"),function e(t){return t.items?[t].concat(qe(t.items,e)):t})}_stringifyItem(e){return JSON.stringify(e,(t,n)=>t==="template"?this._getTemplateString(n):n)}_getTemplateString(e){let t;return typeof e=="object"?t=u(e).text():t=e.toString(),t}},bR=Sb;var Co="dx-menu-item",J3=`${Co}-content`,Ib=`${Co}-selected`,yR=`${Co}-wrapper`;var eq=`${Co}-expanded`;var tq=`${Co}-has-text`,iq=`${Co}-has-icon`,nq=`${Co}-has-submenu`,OR=`${Co}-popout`,oq=`${OR}-container`,ER=`${Co}-text`;var sq={show:50,hide:300},rq=`${ER}-with-url`;var aq=(()=>{class i extends vR{_getDefaultOptions(){return m(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 Co}_setAriaSelectionAttribute(t,n){}_selectedItemClass(){return Ib}_widgetClass(){return"dx-menu-base"}_focusTarget(){return this._itemContainer()}_clean(){this.option("focusedElement",null),super._clean()}_supportedKeys(){return m(super._supportedKeys(),{space:()=>{let t=u(this.option("focusedElement"));!t.length||!this._isSelectionEnabled()||this.selectItem(t[0])},pageUp:E,pageDown:E})}_isSelectionEnabled(){return this.option("selectionMode")==="single"}_init(){this._activeStateUnit=`.${Co}`,super._init(),this._renderSelectedItem(),this._initActions()}_getLinkContainer(t,n,o){let{linkAttr:s,url:r}=o;return t?.addClass("dx-icon-with-url"),n?.addClass(rq),super._getLinkContainer(t,n,{linkAttr:s,url:r})}_addContent(t,n){let{html:o,url:s}=n;if(s){t.html(o);let r=this._getLinkContainer(this._getIconContainer(n),this._getTextContainer(n),n);t.append(r)}else super._addContent(t,n);t.append(this._getPopoutContainer(n)),this._addContentClasses(n,t.parent())}_getTextContainer(t){let{text:n}=t;if(!n)return;let o=u("<span>").addClass(ER),s=X(t)?n:String(t);return o.text(s)}_getItemExtraPropNames(){return["url","linkAttr"]}_getPopoutContainer(t){let{items:n}=t,o;if(n&&n.length){let s=u("<div>").addClass(OR);o=u("<span>").addClass(oq).append(s)}return o}_getDataAdapterOptions(){return{rootValue:0,multipleSelection:!1,recursiveSelection:!1,recursiveExpansion:!1,searchValue:""}}_selectByItem(t){if(!t)return;let n=this._dataAdapter.getNodeByItem(t);this._dataAdapter.toggleSelection(n.internalFields.key,!0)}_renderSelectedItem(){let t=this._dataAdapter.getSelectedNodesKeys(),n=t.length&&t[0],o=this.option("selectedItem");if(!n){this._selectByItem(o);return}let s=this._dataAdapter.getNodeByKey(n);if(s.selectable!==!1){if(!o){this.option("selectedItem",s.internalFields.item);return}o!==s.internalFields.item&&(this._dataAdapter.toggleSelection(n,!1),this._selectByItem(o))}}_initActions(){}_initMarkup(){super._initMarkup(),this.option("useInkRipple")&&this._renderInkRipple()}_renderInkRipple(){this._inkRipple=Ul()}_toggleActiveState(t,n,o){if(super._toggleActiveState.apply(this,arguments),!this._inkRipple)return;let s={element:t,event:o};n?this._inkRipple.showWave(s):this._inkRipple.hideWave(s)}_getShowSubmenuMode(){let t=this.option("showSubmenuMode");return t=z(t)?t.name:t,this._isDesktopDevice()?t:"onClick"}_initSelectedItems(){}_isDesktopDevice(){return F.real().deviceType==="desktop"}_initEditStrategy(){let t=bR;this._editStrategy=new t(this)}_addCustomCssClass(t){t.addClass(this.option("cssClass"))}_itemWrapperSelector(){return`.${yR}`}_hoverStartHandler(t){let n=this._getItemElementByEventArgs(t);!n||this._isItemDisabled(n)||(t.stopPropagation(),this._getShowSubmenuMode()==="onHover"&&(clearTimeout(this._showSubmenusTimeout),this._showSubmenusTimeout=setTimeout(this._showSubmenu.bind(this,n),this._getSubmenuDelay("show"))))}_getAvailableItems(t){return super._getAvailableItems(t).filter(function(){return u(this).css("visibility")!=="hidden"})}_isItemDisabled(t){return this._disabledGetter(t.data(this._itemDataKey()))}_showSubmenu(t){this._addExpandedClass(t)}_addExpandedClass(t){u(t).addClass(eq)}_getSubmenuDelay(t){let{delay:n}=this.option("showSubmenuMode");return f(n)?z(n)?n[t]:n:sq[t]}_getItemElementByEventArgs(t){let n=u(t.target);if(n.hasClass(this._itemClass())||n.get(0)===t.currentTarget)return n;for(;!n.hasClass(this._itemClass());)if(n=n.parent(),n.hasClass("dx-submenu"))return null;return n}_hoverEndHandler(t){clearTimeout(this._showSubmenusTimeout)}_hasSubmenu(t){return t&&t.internalFields.childrenKeys.length}_renderContentImpl(){this._renderItems(this._dataAdapter.getRootNodes())}_renderItems(t,n){if(!t.length)return;this.hasIcons=!1;let o=this._renderContainer(this.$element(),n),s=-1,r=-1;x(t,(a,l)=>{let d=l.visible!==!1;d&&s<0&&(s=a),s<a&&(l.beginGroup||a===r)&&(r=d?a:a+1),a===r&&s<a&&this._renderSeparator(o),this._renderItem(a,l,o)}),this.hasIcons||o.addClass("dx-menu-no-icons")}_renderContainer(t,n){let o=u("<ul>");return this.setAria("role","none",o),o.appendTo(t).addClass("dx-menu-items-container")}_createDOMElement(t){let n=u("<li>");return this.setAria("role","none",n),n.appendTo(t).addClass(yR)}_renderItem(t,n,o,s){let{items:r=[]}=this.option(),a=s??this._createDOMElement(o);r[t+1]&&r[t+1].beginGroup&&a.addClass("dx-menu-last-group-item");let l=super._renderItem(t,n.internalFields.item,a);n.internalFields.item===this.option("selectedItem")&&l.addClass(Ib),l.attr("tabIndex",-1),this._hasSubmenu(n)&&this.setAria("haspopup","true",l)}_renderItemFrame(t,n,o){let s=o.children(`.${Co}`);return s.length?s:super._renderItemFrame.apply(this,arguments)}_refreshItem(t,n){let o=this._dataAdapter.getNodeByItem(n),s=t.data(this._itemIndexKey()),r=t.closest("ul"),a=t.closest("li");this._renderItem(s,o,r,a)}_addContentClasses(t,n){let o=t.text?!!t.text.length:!1,s=!!t.icon,r=t.items?!!t.items.length:!1;n.toggleClass(tq,o),n.toggleClass(iq,s),this.hasIcons||(this.hasIcons=s),n.toggleClass(nq,r)}_getItemContent(t){let n=super._getItemContent(t);return n.length||(n=t.children(`.${J3}`)),n}_postprocessRenderItem(t){let n=u(t.itemElement),o=this._dataAdapter.getSelectedNodesKeys();if(!o.length||!this._selectedGetter(t.itemData)||!this._isItemSelectable(t.itemData)){this._setAriaSelectionAttribute(n,"false");return}this._dataAdapter.getNodeByItem(t.itemData).internalFields.key===o[0]?(n.addClass(this._selectedItemClass()),this._setAriaSelectionAttribute(n,"true")):this._setAriaSelectionAttribute(n,"false")}_isItemSelectable(t){return t.selectable!==!1}_renderSeparator(t){u("<li>").appendTo(t).addClass("dx-menu-separator")}_itemClickHandler(t){if(t._skipHandling)return;let n=this._createAction(this._updateSubmenuVisibilityOnClick.bind(this));this._itemDXEventHandler(t,"onItemClick",{},{beforeExecute:this._itemClick,afterExecute:n.bind(this)}),t._skipHandling=!0}_itemClick(t){let{event:n,itemData:o}=t.args[0],s=this._getItemElementByEventArgs(n),r=s&&s.find(".dx-item-url").get(0);o.url&&r&&r.click()}_updateSubmenuVisibilityOnClick(t){this._updateSelectedItemOnClick(t),this._getShowSubmenuMode()==="onClick"&&this._addExpandedClass(t.args[0].itemElement)}_updateSelectedItemOnClick(t){let n=t.args?t.args[0]:t;if(!this._isItemSelectAllowed(n.itemData))return;let o=this._dataAdapter.getSelectedNodesKeys(),s=o.length&&this._dataAdapter.getNodeByKey(o[0]);s&&this._toggleItemSelection(s,!1),!s||s.internalFields.item!==n.itemData?this.selectItem(n.itemData):(this._fireSelectionChangeEvent(null,this.option("selectedItem")),this._setOptionWithoutOptionChange("selectedItem",null))}_isItemSelectAllowed(t){let n=this._isSelectionEnabled()&&this.option("selectByClick");return!this._isContainerEmpty()&&n&&this._isItemSelectable(t)&&!this._itemsGetter(t)}_isContainerEmpty(){return this._itemContainer().is(":empty")}_syncSelectionOptions(){return kh()}_optionChanged(t){switch(t.name){case"showSubmenuMode":break;case"selectedItem":{let n=this._dataAdapter.getNodeByItem(t.value),o=this._dataAdapter.getSelectedNodesKeys()[0];if(n&&n.internalFields.key!==o){if(n.selectable===!1)break;o&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(o),!1),this._toggleItemSelection(n,!0),this._updateSelectedItems()}break}case"cssClass":case"position":case"selectByClick":case"animation":case"useInkRipple":this._invalidate();break;default:super._optionChanged(t)}}_toggleItemSelection(t,n){let o=this._getElementByItem(t.internalFields.item);o&&u(o).toggleClass(Ib),this._dataAdapter.toggleSelection(t.internalFields.key,n)}_getElementByItem(t){let n;return x(this._itemElements(),(o,s)=>u(s).data(this._itemDataKey())!==t?!0:(n=s,!1)),n}_updateSelectedItems(t,n){(t||n)&&this._fireSelectionChangeEvent(n,t)}_fireSelectionChangeEvent(t,n){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:[t],removedItems:[n]})}selectItem(t){let n=t.nodeType?this._getItemData(t):t,o=this._dataAdapter.getSelectedNodesKeys()[0],s=this.option("selectedItem"),r=this._dataAdapter.getNodeByItem(n);r.internalFields.key!==o&&(o&&this._toggleItemSelection(this._dataAdapter.getNodeByKey(o),!1),this._toggleItemSelection(r,!0),this._updateSelectedItems(s,n),this._setOptionWithoutOptionChange("selectedItem",n))}unselectItem(t){let n=t.nodeType?this._getItemData(t):t,o=this._dataAdapter.getNodeByItem(n),s=this.option("selectedItem");o.internalFields.selected&&(this._toggleItemSelection(o,!1),this._updateSelectedItems(s,null),this._setOptionWithoutOptionChange("selectedItem",null))}}return i.ItemClass=mo,i})(),Gg=aq;var lq="dx-menu-phone-overlay";var wR=["onShowing","onShown","onSubmenuCreated","onHiding","onHidden","onPositioning","onLeftFirstItem","onLeftLastItem","onCloseRootSubmenu","onExpandLastSubmenu"],dq=["up","down","first","last"];var SR=q(),jg=class extends Gg{getShowEvent(e){if(z(e)){if(e.name!==null)return e.name??"dxcontextmenu"}else return e;return null}getShowDelay(e){return z(e)&&e.delay}_getDefaultOptions(){return m(super._getDefaultOptions(),{showEvent:"dxcontextmenu",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:()=>!j(),options:{animation:null}}])}_setDeprecatedOptions(){super._setDeprecatedOptions(),m(this._deprecatedOptions,{closeOnOutsideClick:{since:"22.2",alias:"hideOnOutsideClick"}})}_initActions(){this._actions={},x(wR,(e,t)=>{this._actions[t]=this._createActionByOption(t)||E})}_setOptionsByReference(){super._setOptionsByReference(),m(this._optionsByReference,{animation:!0,selectedItem:!0})}_focusInHandler(){}_itemContainer(){return this._overlay?this._overlay.$content():u()}_eventBindingTarget(){return this._itemContainer()}itemsContainer(){return this._overlay?this._overlay.$content():void 0}_supportedKeys(){return m(super._supportedKeys(),{space:()=>{let e=u(this.option("focusedElement"));this.hide(),!(!e.length||!this._isSelectionEnabled())&&this.selectItem(e[0])},escape:this.hide})}_getActiveItem(e){let t=this._getAvailableItems(),n=t.filter(".dx-state-focused"),o=t.filter(".dx-state-hover");return o.closest(".dx-menu-items-container").find(".dx-menu-item").index(n)>=0?n:o.length?o:super._getActiveItem()}_moveFocus(e){let t=this._getItemsByLocation(e),n=this._getActiveItem(!0),o=this.itemsContainer().find(".dx-state-hover"),r=!!(u(this.option("focusedElement")).length||o.length),a;switch(e){case"up":a=r?this._prevItem(t):n,this._setFocusedElement(a),n.is(t.first())&&this._actions.onLeftFirstItem(n);break;case"down":a=r?this._nextItem(t):n,this._setFocusedElement(a),n.is(t.last())&&this._actions.onLeftLastItem(n);break;case"right":a=this.option("rtlEnabled")?this._hideSubmenuHandler():this._expandSubmenuHandler(t,e),this._setFocusedElement(a);break;case"left":a=this.option("rtlEnabled")?this._expandSubmenuHandler(t,e):this._hideSubmenuHandler(),this._setFocusedElement(a);break;case"first":a=t.first(),this._setFocusedElement(a);break;case"last":a=t.last(),this._setFocusedElement(a);break;default:return super._moveFocus(e)}}_setFocusedElement(e){e&&e.length!==0&&(this.option("focusedElement",H(e)),this._scrollToElement(e))}_scrollToElement(e){let n=e.closest(".dx-scrollable").dxScrollable("instance");n?.scrollToElement(e)}_getItemsByLocation(e){let t=this._getActiveItem(!0),n;return dq.includes(e)&&(n=t.closest(".dx-menu-items-container").children().children()),n=this._getAvailableItems(n),n}_getAriaTarget(){return this.$element()}_refreshActiveDescendant(){if(f(this._overlay)){let e=this._overlay.$content();super._refreshActiveDescendant(e)}}_hideSubmenuHandler(){let e=this._getActiveItem(!0),t=e.parents(".dx-menu-item-expanded").first();if(t.length)return this._hideSubmenusOnSameLevel(t),this._hideSubmenu(e.closest(".dx-submenu")),t;this._actions.onCloseRootSubmenu(e)}_expandSubmenuHandler(e,t){let n=this._getActiveItem(!0),o=this._getItemData(n),s=this._dataAdapter.getNodeByItem(o),r=this._hasSubmenu(s),a=n.children(".dx-submenu");if(r&&!n.hasClass("dx-state-disabled"))return(!a.length||a.css("visibility")==="hidden")&&this._showSubmenu(n),this._nextItem(this._getItemsByLocation(t));this._actions.onExpandLastSubmenu(n)}_clean(){this._overlay&&(this._overlay.$element().remove(),this._overlay=null),this._detachShowContextMenuEvents(this._getTarget()),this._shownSubmenus=[],super._clean()}_initMarkup(){this.$element().addClass("dx-has-context-menu"),super._initMarkup()}_render(){super._render(),this._renderVisibility(this.option("visible")),this._addWidgetClass()}_isTargetOutOfComponent(e){return!(u(e).closest(".dx-context-menu").length!==0)}_focusOutHandler(e){let{relatedTarget:t}=e;t&&this._isTargetOutOfComponent(t)&&this.hide(),super._focusOutHandler(e)}_renderContentImpl(){this._detachShowContextMenuEvents(this._getTarget()),this._attachShowContextMenuEvents()}_attachKeyboardEvents(){!this._keyboardListenerId&&this._focusTarget().length&&super._attachKeyboardEvents()}_renderContextMenuOverlay(){if(this._overlay)return;let e=this._getOverlayOptions();this._overlay=this._createComponent(u("<div>").appendTo(this._$element),nn,e);let t=this._overlay.$content();t.addClass("dx-context-menu"),this._addCustomCssClass(t),this._addPlatformDependentClass(t),this._attachContextMenuEvent()}preventShowingDefaultContextMenuAboveOverlay(){let e=this._itemContainer(),t=D(Mp,this.NAME);_.off(e,t,".dx-submenu"),_.on(e,t,".dx-submenu",n=>{n.stopPropagation(),n.preventDefault(),_.off(e,t,".dx-submenu")})}_itemContextMenuHandler(e){super._itemContextMenuHandler(e),e.stopPropagation()}_addPlatformDependentClass(e){F.current().phone&&e.addClass(lq)}_detachShowContextMenuEvents(e){let t=this.getShowEvent(this.option("showEvent"));if(!t)return;let n=D(t,this.NAME);this._showContextMenuEventHandler?_.off(S.getDocument(),n,e,this._showContextMenuEventHandler):_.off(u(e),n)}_attachShowContextMenuEvents(){let e=this._getTarget(),t=this.getShowEvent(this.option("showEvent"));if(!t)return;let n=D(t,this.NAME),o=this._createAction(r=>{let a=this.getShowDelay(this.option("showEvent"));a?setTimeout(()=>this._show(r.event),a):this._show(r.event)},{validatingTargetName:"target"}),s=r=>o({event:r,target:u(r.currentTarget)});o=this._createAction(o),si(e)||e.nodeType||Ue(e)?(this._showContextMenuEventHandler=void 0,_.on(e,n,s)):(this._showContextMenuEventHandler=s,_.on(S.getDocument(),n,e,this._showContextMenuEventHandler))}_hoverEndHandler(e){super._hoverEndHandler(e),e.stopPropagation()}_renderDimensions(){}_renderContainer(e,t){let n=t||this._itemContainer();e=u("<div>"),e.appendTo(n).addClass("dx-submenu").css("visibility",t?"hidden":"visible"),e.parent().hasClass("dx-overlay-content")||this._addCustomCssClass(e);let o=super._renderContainer(e);return t?o:this.option("width")?o.css("minWidth",this.option("width")):this.option("height")?o.css("minHeight",this.option("height")):o}_renderSubmenuItems(e,t){this._renderItems(this._getChildNodes(e),t);let n=t.children(".dx-submenu");this._actions.onSubmenuCreated({itemElement:H(t),itemData:e.internalFields.item,submenuElement:H(n)}),this._initScrollable(n),this.setAria({role:"menu"},n)}_getOverlayOptions(){let e=this.option("position");return{focusStateEnabled:this.option("focusStateEnabled"),animation:this.option("animation"),innerOverlay:!0,hideOnOutsideClick:n=>this._hideOnOutsideClickHandler(n),propagateOutsideClick:!0,hideOnParentScroll:!0,deferRendering:!1,position:{at:e.at,my:e.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),visualContainer:SR}}_overlayShownActionHandler(e){this._actions.onShown(e)}_overlayHidingActionHandler(e){this._actions.onHiding(e),e.cancel||(this._hideAllShownSubmenus(),this._setOptionWithoutOptionChange("visible",!1))}_overlayHiddenActionHandler(e){this._actions.onHidden(e)}_shouldHideOnOutsideClick(e){let{closeOnOutsideClick:t,hideOnOutsideClick:n}=this.option();return A(n)?n(e):A(t)?t(e):n||t}_hideOnOutsideClickHandler(e){if(!this._shouldHideOnOutsideClick(e))return!1;if(S.isDocument(e.target))return!0;let t=this._getActiveItemsContainer(e.target),n=this._getItemsContainers(),o=this._searchActiveItem(e.target),s=this.$element().parents(".dx-menu-item"),r=o[0]===s[0]&&o.length&&s.length;return this._isIncludeOverlay(t,n)&&o.length||r?(this._getShowSubmenuMode()==="onClick"&&this._hideAllShownChildSubmenus(o),!1):!0}_getActiveItemsContainer(e){return u(e).closest(".dx-menu-items-container")}_getItemsContainers(){return this._overlay.$content().find(".dx-menu-items-container")}_searchActiveItem(e){return u(e).closest(".dx-menu-item").eq(0)}_isIncludeOverlay(e,t){let n=!1;return x(t,(o,s)=>{e.is(s)&&!n&&(n=!0)}),n}_hideAllShownChildSubmenus(e){let t=e.find(".dx-submenu"),n=m([],this._shownSubmenus);t.length>0&&x(n,(o,s)=>{let r=this._searchActiveItem(s.context).parent();r.parent().is(e.parent().parent())&&!r.is(e.parent())&&this._hideSubmenu(s)})}_initScrollable(e){this._createComponent(e,Xi,{useKeyboard:!1,_onVisibilityChanged:t=>{t.scrollTo(0)}})}_setSubMenuHeight(e,t,n){let o=e.find(".dx-menu-items-container"),s=ee(o),r=this._getMaxHeight(t,!n),a=Math.min(s,r);e.css("height",n?a:"100%")}_getMaxHeight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=ee(SR),o=si(e),s=S.getDocument(),r=e.length&&e[0]===s;if(!o||r)return n;let a=e[0].getBoundingClientRect().top,l=ee(e);return(t?Math.max(a,n-a-l):Math.max(a+l,n-a))-10}_dimensionChanged(){this._shownSubmenus&&this._shownSubmenus.forEach(e=>{let t=e.closest(".dx-menu-item");this._setSubMenuHeight(e,t,!0),this._scrollToElement(t);let n=this._getSubmenuPosition(t);xt.setup(e,n)})}_getSubmenuBorderWidth(){return wt(yt())?0:1}_showSubmenu(e){let t=this._dataAdapter.getNodeByItem(this._getItemData(e));if(this._hideSubmenusOnSameLevel(e),!this._hasSubmenu(t))return;let n=e.children(".dx-submenu"),o=n.length;super._showSubmenu(e),o||(this._renderSubmenuItems(t,e),n=e.children(".dx-submenu")),this._setSubMenuHeight(n,e,!0),this._isSubmenuVisible(n)||this._drawSubmenu(e)}_hideSubmenusOnSameLevel(e){let t=e.parent(".dx-menu-item-wrapper").siblings().find(".dx-menu-item-expanded");t.length&&(t.removeClass("dx-menu-item-expanded"),this._hideSubmenu(t.find(".dx-submenu")))}_hideSubmenuGroup(e){this._isSubmenuVisible(e)&&this._hideSubmenuCore(e)}_isSubmenuVisible(e){return e.css("visibility")==="visible"}_drawSubmenu(e){let t=this.option("animation")?this.option("animation").show:{},n=e.children(".dx-submenu"),o=this._getSubmenuPosition(e);this._overlay&&this._overlay.option("visible")&&(f(this._shownSubmenus)||(this._shownSubmenus=[]),this._shownSubmenus.includes(n)||this._shownSubmenus.push(n),t&&fe.stop(n),xt.setup(n,o),t&&(X(t.to)&&(t.to.position=o),this._animate(n,t)),n.css("visibility","visible"))}_animate(e,t){fe.animate(e,t)}_getSubmenuPosition(e){let t=this.option("submenuDirection").toLowerCase(),o={collision:"flip",of:e.parent(".dx-menu-item-wrapper"),offset:{h:0,v:-1}};switch(t){case"left":o.at="left top",o.my="right top";break;case"right":o.at="right top",o.my="left top";break;default:this.option("rtlEnabled")?(o.at="left top",o.my="right top"):(o.at="right top",o.my="left top")}return o}_updateSubmenuVisibilityOnClick(e){if(!e.args.length)return;let{itemData:t}=e.args[0],n=this._dataAdapter.getNodeByItem(t);if(!n)return;let o=u(e.args[0].itemElement),s=o.find(".dx-submenu");if(this._hasSubmenu(n)&&!s.length&&(this._renderSubmenuItems(n,o),s=o.find(".dx-submenu")),o.context===s.context&&s.css("visibility")==="visible")return;this._updateSelectedItemOnClick(e);let a=t&&t.closeMenuOnClick===!1;if(!(!t||t.disabled||a))if(s.length===0){let l=u(o.parents(".dx-submenu")[0]);this._hideSubmenu(l),!e.canceled&&this._overlay&&this._overlay.option("visible")&&this.option("visible",!1)}else this._shownSubmenus&&this._shownSubmenus.length>0&&this._shownSubmenus[0].is(s)&&this._hideSubmenu(s),this._showSubmenu(o)}_hideSubmenu(e){let t=m([],this._shownSubmenus);x(t,(n,o)=>{(e.is(o)||bn(e[0],o[0]))&&(o.parent().removeClass("dx-menu-item-expanded"),this._hideSubmenuCore(o))})}_hideSubmenuCore(e){let t=this._shownSubmenus.indexOf(e),n=this.option("animation")?this.option("animation").hide:null;t>=0&&this._shownSubmenus.splice(t,1),this._stopAnimate(e),n&&this._animate(e,n),e.css("visibility","hidden"),e.dxScrollable("instance").scrollTo(0),this.option("focusedElement",null)}_stopAnimate(e){fe.stop(e,!0)}_hideAllShownSubmenus(){let e=m([],this._shownSubmenus);this._overlay.$content().find(".dx-menu-item-expanded").removeClass("dx-menu-item-expanded"),x(e,(n,o)=>{this._hideSubmenu(o)})}_visibilityChanged(e){e&&this._renderContentImpl()}_optionChanged(e){if(wR.includes(e.name)){this._initActions();return}switch(e.name){case"visible":this._renderVisibility(e.value);break;case"showEvent":case"position":case"submenuDirection":this._invalidate();break;case"target":e.previousValue&&this._detachShowContextMenuEvents(e.previousValue),this._invalidate();break;case"closeOnOutsideClick":case"hideOnOutsideClick":break;default:super._optionChanged(e)}}_renderVisibility(e){return e?this._show():this._hide()}_toggleVisibility(){}_show(e){let t={jQEvent:e},n=y().reject().promise();if(this._actions.onShowing(t),t.cancel)return n;let o=this._positionContextMenu(e);if(o){var s;this._overlay||(this._renderContextMenuOverlay(),this._overlay.$content().addClass(this._widgetClass()),this._renderFocusState(),this._attachHoverEvents(),this._attachClickEvent(),this._renderItems(this._dataAdapter.getRootNodes()));let r=u(this._overlay.content()).children(".dx-submenu");this._setOptionWithoutOptionChange("visible",!0),this._overlay.option({height:()=>this._getMaxHeight(o.of),maxHeight:()=>{let a=r.find(".dx-menu-items-container"),l=this._getSubmenuBorderWidth();return ee(a)+2*l},position:o}),r.length&&this._setSubMenuHeight(r,o.of,!1),n=this._overlay.show(),e&&e.stopPropagation(),this._setAriaAttributes(),(e==null||(s=e.originalEvent)===null||s===void 0?void 0:s.type)===yn.name&&this.preventShowingDefaultContextMenuAboveOverlay()}return n}_renderItems(e,t){super._renderItems(e,t);let n=u(this._overlay.content()).children(".dx-submenu");n.length&&this._initScrollable(n)}_setAriaAttributes(){this._overlayContentId=`dx-${new Ae}`,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||u(S.getDocument())}_getContextMenuPosition(){return m({},this.option("position"),{of:this._getTarget()})}_positionContextMenu(e){let t=this._getContextMenuPosition(),n=this._isInitialOptionValue("position"),o=this._createActionByOption("onPositioning");e&&e.preventDefault&&n&&(t.of=e);let s={position:t,event:e};return o(s),s.cancel?t=null:s.event&&(s.event.cancel=!0,e.preventDefault()),t}_refresh(){if(!j())super._refresh();else if(this._overlay){let e=this._overlay.option("position");super._refresh(),this._overlay&&this._overlay.option("position",e)}else super._refresh()}_hide(){let e;return this._overlay&&(e=this._overlay.hide(),this._setOptionWithoutOptionChange("visible",!1)),this._cleanAriaAttributes(),this.option("focusedElement",null),e||y().reject().promise()}toggle(e){let t=this.option("visible");return e=e===void 0?!t:e,this._renderVisibility(e)}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}};K("dxContextMenu",jg);var Kg=jg;var Db=Kg;var Tb=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ki,zs,KC,mC,st,Se,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ki,zs,KC,mC,Se]})}return i})();var Mb="dx-state-focused",cq="dx-cell-focus-disabled";var AR=".dx-datagrid-rowsview .dx-row",IR=`${AR} > td`,MR=".dx-treelist-rowsview .dx-row",DR=`${MR} > td`,TR={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:[".dx-row-focused",`${AR}[tabindex]`,`${IR}[tabindex]`,`${IR}`,`${MR}[tabindex]`,`${DR}[tabindex]`,`${DR}`],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]"]},Ab=!1,Ug=!1,dd=null;function uq(i,e,t,n,o,s){if(pq(e,t.originalEvent,s))return;let a=ke(t);a==="enter"||a==="space"?(Rb(t.target,e),n&&n({event:t})):a==="tab"?o.addClass(Mb):pu(i,e,t)}function Rb(i,e){let t=u(i),n=t.attr("aria-label"),s=RR(n,e.element()).index(t);dd=m({},{ariaLabel:n,index:s},{viewInstance:e})}function RR(i,e){let t=u(e),n;if(i){let o=i?.replace(/\\/g,"\\\\").replace(/"/g,'\\"');n=t.find(`[aria-label="${o}"][tabindex]`)}else n=t.find("[tabindex]");return n}function hq(i,e){let t=e?.getRootNode()||S.getDocument();for(let n in i){let o=i[n],s=u(t).find(o).first();if(s.length)return s}}function pq(i,e,t){let n={event:e,handled:!1};return t?t(n):i._createActionByOption("onKeyDown")(n),n.handled}function FR(){Ug=S.getDocument().visibilityState==="visible"}function PR(){_.on(S.getDocument(),"visibilitychange",FR)}function Fb(){_.off(S.getDocument(),"visibilitychange",FR)}function kR(i,e){Ug=!0,i.focus({preventScroll:e}),Ug=!1}function qg(i,e,t,n,o,s){if(e.option("useLegacyKeyboardNavigation"))return E;let r=()=>u(e.element()),a=c=>uq(i,e,c,o,r(),s),l=()=>{Ab=!0,r().removeClass(Mb)},d=()=>{!Ab&&!Ug&&r().addClass(Mb),Ab=!1};return _.on(t,"keydown",n,a),_.on(t,"mousedown",n,l),_.on(t,"focusin",n,d),()=>{_.off(t,"keydown",n,a),_.off(t,"mousedown",n,l),_.off(t,"focusin",n,d)}}function cd(i){if(!i.option("useLegacyKeyboardNavigation")&&dd){let e=dd.viewInstance;if(e){let n=RR(dd.ariaLabel,e.element()).eq(dd.index);dd=null,_.trigger(n,"focus")}}}function pu(i,e,t){let n=ke(t);if(t.ctrlKey&&(n==="upArrow"||n==="downArrow")){let o=Object.keys(TR),s=o.indexOf(i);for(;s>=0&&s<o.length;){s=n==="upArrow"?--s:++s;let r=o[s],a=TR[r],l=hq(a,t.target);if(l&&l.length){l.attr("tabindex",e.option("tabindex")||0),_.trigger(l,"focus"),l.removeClass(cq);break}}}}function BR(i,e){i.option("useLegacyKeyboardnavigation")||e.attr("tabindex",i.option("tabindex")||0)}var Kr=function(i,e,t,n,o){let s=e.getController("keyboardNavigation");e.option("useLegacyKeyboardNavigation")||s&&!s.isKeyboardEnabled()||(e.createAction("onKeyDown"),qg(i,e,t,n,o,r=>{e.executeAction("onKeyDown",r)}))};var nr="dxdblclick";var VR=D(de,"dxDblClick");var gq=pe.inherit({ctor(){this._handlerCount=0,this._forgetLastClick()},_forgetLastClick(){this._firstClickTarget=null,this._lastClickTimeStamp=-300},add(){this._handlerCount<=0&&_.on(S.getDocument(),VR,this._clickHandler.bind(this)),this._handlerCount+=1},_clickHandler(i){let e=i.timeStamp||Date.now(),t=e-this._lastClickTimeStamp;!(t<0)&&t<300?(hn({type:"dxdblclick",target:bD(this._firstClickTarget,i.target),originalEvent:i}),this._forgetLastClick()):(this._firstClickTarget=i.target,this._lastClickTimeStamp=e,clearTimeout(this._lastClickClearTimeout),this._lastClickClearTimeout=setTimeout(()=>{this._forgetLastClick()},600))},remove(){this._handlerCount-=1,this._handlerCount<=0&&(this._forgetLastClick(),_.off(S.getDocument(),VR,void 0),clearTimeout(this._lastClickClearTimeout),this._handlerCount=0)}}),LR=new gq;Vi(nr,LR);var NR=i=>class extends i{_applyColumnState(e){var t;let n=this.option("rtlEnabled"),o=this._getColumnAlignment(e.column.alignment,n),s=m(!0,{columnAlignment:o},e),r=s.rootElement.hasClass("dx-group-panel-item"),a=this._createIndicatorContainer(s,r),l=u("<span>").addClass(this._getIndicatorClassName(e.name)),d=(t=this.component)===null||t===void 0?void 0:t.getController("columns"),c=d?.getHeaderContentAlignment(o)||o;return s.container=a,s.indicator=l,this._renderIndicator(s),a[(r||!e.showColumnLines)&&c==="left"?"appendTo":"prependTo"](e.rootElement),l}_getIndicatorClassName(e){}_getColumnAlignment(e,t){return t=t||this.option("rtlEnabled"),e&&e!=="center"?e:un(t)}_createIndicatorContainer(e,t){let n=this._getIndicatorContainer(e.rootElement),o=e.columnAlignment==="left"?"right":"left";return n.length||(n=u("<div>").addClass("dx-column-indicators")),this.setAria("role","presentation",n),n.css("float",e.showColumnLines&&!t?o:null)}_getIndicatorContainer(e){return e&&e.find(".dx-column-indicators")}_getIndicatorElements(e){let t=this._getIndicatorContainer(e);return t&&t.children()}_renderIndicator(e){let t=e.container,n=e.indicator;t&&n&&t.append(n)}_updateIndicators(e){let t=this,n=t.getColumns(),o=t.getColumnElements(),s;if(!(!o||n.length!==o.length))for(let r=0;r<n.length;r++){s=o.eq(r),t._updateIndicator(s,n[r],e);let a=s.parent().data("options");a&&a.cells&&(a.cells[s.index()].column=n[r])}}_updateIndicator(e,t,n){if(!t.command)return this._applyColumnState({name:n,rootElement:e,column:t,showColumnLines:this.option("showColumnLines")})}};var mq=["rowsView"],Ur={borderedTop:"dx-bordered-top-view",borderedBottom:"dx-bordered-bottom-view"},fq=i=>{let{columnHeadersView:e,rowsView:t}=i;return e!=null&&e.isVisible()?e.element():t.element()},_q=i=>{let{filterPanelView:e,footerView:t,rowsView:n}=i;return e!=null&&e.isVisible()?e.element():t!=null&&t.isVisible()?t.element():n.element()},HR=(i,e)=>{let t=Object.values(i).find(n=>{var o;return n==null||(o=n.element())===null||o===void 0?void 0:o.hasClass(e)});return t?.element()??null},Cq=(i,e)=>{var t;if(!Object.keys(e).includes(i))return!1;let{rowsView:n}=e,o=_e(e,mq);return f(n==null||(t=n.element)===null||t===void 0?void 0:t.call(n))?Object.values(o).filter(s=>{var r;return s==null||(r=s.isVisible)===null||r===void 0?void 0:r.call(s)}).every(s=>f(s?.element())):!1},$R=(i,e)=>{if(!Cq(i,e))return;let t=HR(e,Ur.borderedTop),n=HR(e,Ur.borderedBottom),o=fq(e),s=_q(e);t&&!t.is(o)&&t.removeClass(Ur.borderedTop),n&&!n.is(s)&&n.removeClass(Ur.borderedBottom),o.hasClass(Ur.borderedTop)||o.addClass(Ur.borderedTop),s.hasClass(Ur.borderedBottom)||s.addClass(Ur.borderedBottom)};var Yg=class{constructor(e){let t=this;t._updateLockCount=0,t.component=e,t._actions={},t._actionConfigs={},x(this.callbackNames()||[],function(n,o){let s=t.callbackFlags(o)||{};s.unique=!0,s.syncStrategy=!0,t[this]=ge(s)})}_endUpdateCore(){}init(){}callbackNames(){}callbackFlags(e){}publicMethods(){return[]}beginUpdate(){this._updateLockCount++}endUpdate(){this._updateLockCount>0&&(this._updateLockCount--,this._updateLockCount||this._endUpdateCore())}option(e){let{component:t}=this,n=t._optionCache;return arguments.length===1&&n?(e in n||(n[e]=t.option(e)),n[e]):t.option.apply(t,arguments)}_silentOption(e,t){let{component:n}=this,o=n._optionCache;return o&&(o[e]=t),n._setOptionWithoutOptionChange(e,t)}localize(e){let t=this.component._optionCache;return t?(e in t||(t[e]=O.format(e)),t[e]):O.format(e)}on(e,t){return this.component.on.apply(this.component,arguments)}off(){return this.component.off.apply(this.component,arguments)}optionChanged(e){e.name in this._actions&&(this.createAction(e.name,this._actionConfigs[e.name]),e.handled=!0)}getAction(e){return this._actions[e]}setAria(e,t,n){let o=n.get(0),s=e!=="role"&&e!=="id"?"aria-":"";o.setAttribute?o.setAttribute(s+e,t):n.attr(s+e,t)}_createComponent(e,t,n){return this.component._createComponent(e,t,n)}getController(e){return this.component._controllers[e]}createAction(e,t){if(A(e)){let n=this.component._createAction(e.bind(this),t);return function(o){n({event:o})}}this._actions[e]=this.component._createActionByOption(e,t),this._actionConfigs[e]=t}executeAction(e,t){let n=this._actions[e];return n&&n(t)}dispose(){let e=this;x(e.callbackNames()||[],function(){e[this].empty()})}addWidgetPrefix(e){return`dx-${this.component.NAME.slice(2).toLowerCase()}${e?`-${e}`:""}`}getWidgetContainerClass(){let e=this.component.NAME==="dxDataGrid"?null:"container";return this.addWidgetPrefix(e)}elementIsInsideGrid(e){return e.closest(`.${this.getWidgetContainerClass()}`).parent().is(this.component.$element())}},gu=class extends Yg{},kb=class extends gu{getView(e){return this.component._views[e]}getViews(){return this.component._views}},Xg=class extends Yg{constructor(e){super(e),this.renderCompleted=ge(),this.resizeCompleted=ge()}_isReady(){return this.component.isReady()}_endUpdateCore(){super._endUpdateCore(),!this._isReady()&&this._requireReady&&(this._requireRender=!1,this.component._requireResize=!1),this._requireRender&&(this._requireRender=!1,this.render(this._$parent))}_invalidate(e,t){this._requireRender=!0,this.component._requireResize=j()&&(this.component._requireResize||e),this._requireReady=this._requireReady||t}_renderCore(e){}_resizeCore(){}_parentElement(){return this._$parent}element(){return this._$element}getElementHeight(){let e=this.element();if(!e)return 0;let t=parseFloat(e.css("marginTop"))||0,n=parseFloat(e.css("marginBottom"))||0,{offsetHeight:o}=e.get(0);return o+t+n}isVisible(){return!0}getTemplate(e){return this.component._getTemplate(e)}getView(e){return this.component._views[e]}_getBorderedViews(){return{columnHeadersView:this.component._views.columnHeadersView,rowsView:this.component._views.rowsView,filterPanelView:this.component._views.filterPanelView,footerView:this.component._views.footerView}}render(e,t){let n=this._$element,o=this.isVisible();if(!(!n&&!e)&&(this._requireReady=!1,n||(n=this._$element=u("<div>").appendTo(e),this._$parent=e),n.toggleClass("dx-hidden",!o),this.component._views&&$R(this.name,this._getBorderedViews()),o)){this.component._optionCache={};let s=this._renderCore(t);this.component._optionCache=void 0,s?s.done(()=>{this.renderCompleted.fire(t)}):this.renderCompleted.fire(t)}}resize(){this.isResizing=!0,this._resizeCore(),this.resizeCompleted.fire(),this.isResizing=!1}focus(e){this.element().get(0).focus({preventScroll:e})}};function zR(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t={};return Object.entries(e).forEach(n=>{let[o,s]=n,r=i[o];if(r)if(A(s))t[o]=s(r);else{let a=r;t[o]=a.inherit(s)}}),t}function xq(i,e,t){let n=t.publicMethods();n&&x(n,(o,s)=>{if(t[s])if(!i[s])i[s]=function(){return t[s](...arguments)};else throw ie.Error("E1005",s);else throw ie.Error("E1006",e,s)})}function vq(i,e){let{modules:t}=e,{modulesOrder:n}=e;function o(c){let h={};return x(c,(p,g)=>{let C=new g(i);C.name=p,xq(i,p,C),h[p]=C}),h}n&&t.sort((c,h)=>{let p=n.indexOf(c.name),g=n.indexOf(h.name);return p<0&&(p=1e6),g<0&&(g=1e6),p-g});let s={},r={};t.forEach(c=>{let{name:h,controllers:p={},views:g={}}=c;Object.entries(p).forEach(C=>{let[v,b]=C;if(s[v])throw ie.Error("E1001",h,v);if(!(b?.prototype instanceof gu))throw ie.Error("E1002",h,v);s[v]=b}),Object.entries(g).forEach(C=>{let[v,b]=C;if(r[v])throw ie.Error("E1003",h,v);if(!(b?.prototype instanceof Xg))throw ie.Error("E1004",h,v);r[v]=b})});let a=t.filter(c=>{let{extenders:h}=c;return!!h}),l=a.reduce((c,h)=>{let{extenders:p}=h;return I({},c,zR(c,p?.controllers))},s),d=a.reduce((c,h)=>{let{extenders:p}=h;return I({},c,zR(c,p?.views))},r);i._controllers=o(l),i._views=o(d)}var bq=function(i,e,t){t=t||[],i._controllers&&x(i._controllers,function(){this[e]&&this[e].apply(this,t)}),i._views&&x(i._views,function(){this[e]&&this[e].apply(this,t)})},ye={modules:[],View:Xg,ViewController:kb,Controller:gu,registerModule(i,e){let{modules:t}=this;for(let n=0;n<t.length;n++)if(t[n].name===i)return;e.name=i,t.push(e)},registerModulesOrder(i){this.modulesOrder=i},unregisterModule(i){this.modules=At(this.modules,e=>e.name!==i)},processModules:vq,callModuleItemsMethod:bq};var yq={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,quarter:7776e6,year:31536e6};function mu(i){return yq[i]}var _u=7;var fu=["millisecond","second","minute","hour","day","week","month","quarter","year"],Oq=function(i,e,t){let n=e.getTime()-i.getTime(),o=mu(t)||1;return Math.floor(n/o)},Eq=function(i,e){switch(Jg(i)){case"millisecond":return"second";case"second":return"minute";case"minute":return"hour";case"hour":return"day";case"day":return e?"week":"month";case"week":return"month";case"month":return"quarter";case"quarter":case"year":return"year";default:return 0}},jR=function(i){let e,t,n,o=["millisecond","second","minute","hour","day","month","year"],s={};for(e=o.length-1;e>=0;e--)n=o[e],t=Math.floor(i/mu(n)),t>0&&(s[n+"s"]=t,i-=Qg(n,t));return s},wq=function(i){let e=0;return z(i)&&x(i,function(t,n){e+=Qg(t.substr(0,t.length-1),n)}),B(i)&&(e=Qg(i,1)),e};function Qg(i,e){return mu(i)*e}function Jg(i){let e=-1,t;return B(i)?i:z(i)?(x(i,function(n,o){for(t=0;t<fu.length;t++)o&&(n===fu[t]+"s"||n===fu[t])&&e<t&&(e=t)}),fu[e]):""}var Sq={millisecond:"millisecond",second:"longtime",minute:"shorttime",hour:"shorttime",day:"day",week:"day",month:"month",quarter:"quarter",year:"year"};function Iq(i){return Sq[Jg(i)]||""}var KR=function(i){return Math.floor(i/3)},UR=function(i){return 3*KR(i)};function qR(i,e,t,n){i=new Date(i.getTime());let o=new Date(i.getTime()),s,r,a=Jg(e);switch(a){case"second":i=new Date(1e3*Math.floor(o.getTime()/1e3));break;case"minute":i=new Date(6e4*Math.floor(o.getTime()/6e4));break;case"hour":i=new Date(36e5*Math.floor(o.getTime()/36e5));break;case"year":i.setMonth(0);case"month":i.setDate(1);case"day":i.setHours(0,0,0,0);break;case"week":i=eF(i,n||0),i.setHours(0,0,0,0);break;case"quarter":s=UR(i.getMonth()),r=i.getMonth(),i.setDate(1),i.setHours(0,0,0,0),r!==s&&i.setMonth(s)}return t&&a!=="hour"&&a!=="minute"&&a!=="second"&&nF(o,i),i}function YR(i){return qR(i,"day")}var Dq=function(i){let e=YR(i);return e.setDate(e.getDate()+1),new Date(e.getTime()-1)},Tq=function(i,e){let t=0,n={year:i.getFullYear()!==e.getFullYear(),month:i.getMonth()!==e.getMonth(),day:i.getDate()!==e.getDate(),hour:i.getHours()!==e.getHours(),minute:i.getMinutes()!==e.getMinutes(),second:i.getSeconds()!==e.getSeconds(),millisecond:i.getMilliseconds()!==e.getMilliseconds()};return x(n,function(o,s){s&&t++}),t===0&&oF(i,e)!==0&&(n.hour=!0,t++),n.count=t,n};function XR(i,e,t){let n=new Date(i.getTime()),o=B(e)?ZR(e.toLowerCase()):Oe(e)?jR(e):e;return o.years&&n.setFullYear(n.getFullYear()+o.years*t),o.quarters&&n.setMonth(n.getMonth()+3*o.quarters*t),o.months&&n.setMonth(n.getMonth()+o.months*t),o.weeks&&n.setDate(n.getDate()+7*o.weeks*t),o.days&&n.setDate(n.getDate()+o.days*t),o.hours&&n.setTime(n.getTime()+36e5*o.hours*t),o.minutes&&n.setTime(n.getTime()+6e4*o.minutes*t),o.seconds&&n.setTime(n.getTime()+1e3*o.seconds*t),o.milliseconds&&n.setTime(n.getTime()+o.milliseconds*t),n}var QR=function(i,e,t){let n=t?-1:1;return Vt(i)?XR(i,e,n):Hc(i+e*n,e)},Aq=function(i,e,t){let n=[],o;for(n.push(Vt(i)?new Date(i.getTime()):i),o=i;o<e;)o=QR(o,t),n.push(o);return n},Mq=function(i,e){if(i==="month")return Kn(e.getFullYear(),e.getMonth(),1);if(i==="year")return Kn(e.getFullYear(),0,e.getDate());if(i==="decade")return Kn(xu(e),e.getMonth(),e.getDate());if(i==="century")return Kn(Cu(e),e.getMonth(),e.getDate())},Rq=function(i,e){if(i==="month")return Kn(e.getFullYear(),e.getMonth(),Zg(e));if(i==="year")return Kn(e.getFullYear(),11,e.getDate());if(i==="decade")return Kn(xu(e)+9,e.getMonth(),e.getDate());if(i==="century")return Kn(Cu(e)+90,e.getMonth(),e.getDate())},Fq=function(i,e){let t=Kn(e.getFullYear(),e.getMonth(),1);return i==="month"||(t.setMonth(0),i==="year")||(i==="decade"&&t.setFullYear(xu(e)),i==="century"&&t.setFullYear(Cu(e))),t},Pq=function(i,e){let t=new Date(e);return t.setDate(Zg(e)),i==="month"||(t.setMonth(11),t.setDate(Zg(t)),i==="year")||(i==="decade"&&t.setFullYear(xu(e)+9),i==="century"&&t.setFullYear(Cu(e)+99)),t};function Zg(i){return Kn(i.getFullYear(),i.getMonth()+1,0).getDate()}var kq=function(i){switch(i){case"month":return"year";case"year":return"decade";case"decade":return"century"}},Bq=function(i){switch(i){case"century":return"decade";case"decade":return"year";case"year":return"month"}},Vq=function(i){let e=1;return i==="year"&&(e=12),i==="decade"&&(e=120),i==="century"&&(e=1200),e},Lq=function(i){let e=1;return i==="decade"&&(e=12),i==="century"&&(e=120),e};function ZR(i){let e={};switch(i){case"year":e.years=1;break;case"month":e.months=1;break;case"quarter":e.months=3;break;case"week":e.weeks=1;break;case"day":e.days=1;break;case"hour":e.hours=1;break;case"minute":e.minutes=1;break;case"second":e.seconds=1;break;case"millisecond":e.milliseconds=1}return e}function Nq(i,e){return Vb(i,e)&&i.getDate()===e.getDate()}function Vb(i,e){return JR(i,e)&&i.getMonth()===e.getMonth()}function JR(i,e){return i&&e&&i.getFullYear()===e.getFullYear()}function Hq(i,e){return i&&e&&i.getHours()===e.getHours()&&i.getMinutes()===e.getMinutes()}var $q=function(i,e){if(!f(i)||!f(e))return;let t=i.getFullYear()-i.getFullYear()%10,n=e.getFullYear()-e.getFullYear()%10;return i&&e&&t===n},zq=function(i,e){if(!f(i)||!f(e))return;let t=i.getFullYear()-i.getFullYear()%100,n=e.getFullYear()-e.getFullYear()%100;return i&&e&&t===n};function Cu(i){return i&&i.getFullYear()-i.getFullYear()%100}function xu(i){return i&&i.getFullYear()-i.getFullYear()%10}var Wq=function(){return"yyyy/MM/dd"},Gq=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!f(i))return;let t=new Date(i.getTime()),n=t.getMonth()+e;return t.setMonth(n),Kn(t.getFullYear(),n,1)},jq=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!f(i))return;let t=new Date(i.getTime()),n=t.getMonth()+e;return t.setMonth(n),Kn(t.getFullYear(),n+1,0)};function eF(i,e){let t=(i.getDay()-e+_u)%_u,n=new Date(i);return n.setDate(i.getDate()-t),n}function WR(i){return Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())}function Kq(i){let e=WR(i)-WR(tF(i.getFullYear()));return 1+Math.floor(e/mu("day"))}function tF(i){return new Date(i,0,1)}function Bb(i){return new Date(i,11,31)}function GR(i,e){let t=i.getDay()-e+1;return t<=0&&(t+=_u),t}function Lb(i,e,t){let n=GR(tF(i.getFullYear()),e),o=GR(Bb(i.getFullYear()),e),s=_u-n+1,r=Math.ceil((Kq(i)-s)/7);switch(t){case"fullWeek":if(s===_u&&r++,r===0){let a=Bb(i.getFullYear()-1);return Lb(a,e,t)}return r;case"firstDay":{s>0&&r++;let a=n===7||o===7;return(r>52&&!a||r===54)&&(r=1),r}case"firstFourDays":{s>3&&r++;let a=n===4||o===4;if(r>52&&!a&&(r=1),r===0){let l=Bb(i.getFullYear()-1);return Lb(l,e,t)}return r}}}var Uq=function(i,e){let t=Ha.getDatesInterval(i,e,"day"),n=new Date(i);return t>=6&&(n=new Date(n.setDate(n.getDate()+7))),n},qq=function(i,e,t,n){return n==="date"&&(e=e&&Ha.correctDateWithUnitBeginning(e,"day"),t=t&&Ha.correctDateWithUnitBeginning(t,"day"),i=i&&Ha.correctDateWithUnitBeginning(i,"day")),iF(i,e,t)===i},Yq=function(i){let{firstMin:e,firstMax:t,secondMin:n,secondMax:o}=i;return e<=n&&n<=t||e>n&&e<o||e<o&&t>o},Xq=function(i){let e=Math.floor(i),t=i%1*60;return{hours:e,minutes:t}},Qq=function(i,e){let t=this.dateTimeFromDecimal(e),n=new Date(i);return(i.getHours()===t.hours&&i.getMinutes()<t.minutes||i.getHours()<t.hours)&&n.setHours(t.hours,t.minutes,0,0),n};function iF(i,e,t){let n=i;return f(i)?(f(e)&&i<e&&(n=e),f(t)&&i>t&&(n=t),n):i}function nF(i,e){if(!f(i))return;let t=e.getHours()-i.getHours();if(t===0)return;let n=t===1||t===-23?-1:1,o=new Date(e.getTime()+36e5*n);(n>0||o.getDate()===e.getDate())&&e.setTime(o.getTime())}var Zq=function(i){let e=new Date(i.getTime());return e.setHours(e.getHours()+1),e.setMinutes(0),e};function oF(i,e){return 60*(e.getTimezoneOffset()-i.getTimezoneOffset())*1e3}var Jq=function(i){return new Date(i)},e5=function(i,e,t){let n=[],o=new Date(i.getTime());for(;o<e;)n.push(new Date(o.getTime())),o=this.addInterval(o,t);return n},Kn=function(i){let e=new Date(...arguments);return e.setFullYear(i),e},t5=()=>typeof Intl<"u"?Intl.DateTimeFormat().resolvedOptions().timeZone:null,Ha={dateUnitIntervals:fu,convertMillisecondsToDateUnits:jR,dateToMilliseconds:wq,getNextDateUnit:Eq,convertDateUnitToMilliseconds:Qg,getDateUnitInterval:Jg,getDateFormatByTickInterval:Iq,getDatesDifferences:Tq,correctDateWithUnitBeginning:qR,trimTime:YR,setToDayEnd:Dq,roundDateByStartDayHour:Qq,dateTimeFromDecimal:Xq,addDateInterval:XR,addInterval:QR,getSequenceByInterval:Aq,getDateIntervalByString:ZR,sameHoursAndMinutes:Hq,sameDate:Nq,sameMonthAndYear:Vb,sameMonth:Vb,sameYear:JR,sameDecade:$q,sameCentury:zq,getDifferenceInMonth:Vq,getDifferenceInMonthForCells:Lq,getFirstYearInDecade:xu,getFirstDecadeInCentury:Cu,getShortDateFormat:Wq,getViewFirstCellDate:Mq,getViewLastCellDate:Rq,getViewDown:Bq,getViewUp:kq,getLastMonthDay:Zg,getLastMonthDate:jq,getFirstMonthDate:Gq,getFirstWeekDate:eF,getWeekNumber:Lb,normalizeDateByWeek:Uq,getQuarter:KR,getFirstQuarterMonth:UR,dateInRange:qq,intervalsOverlap:Yq,roundToHour:Zq,normalizeDate:iF,getViewMinBoundaryDate:Fq,getViewMaxBoundaryDate:Pq,fixTimezoneGap:nF,getTimezonesDifference:oF,makeDate:Jq,getDatesInterval:Oq,getDatesOfInterval:e5,createDateWithFullYear:Kn,getMachineTimezoneName:t5};Ha.sameView=function(i,e,t){return Ha[ki("same "+i)](e,t)};var Y=Ha;function xo(i,e){for(;i.length<e;)i="0"+i;return i}var vu={3:"abbreviated",4:"wide",5:"narrow"},Nb={y:function(i,e,t){let n=i[t?"getUTCFullYear":"getFullYear"]();return e===2&&(n%=100),xo(n.toString(),e)},M:function(i,e,t,n){let o=i[t?"getUTCMonth":"getMonth"](),s=vu[e];return s?n.getMonthNames(s,"format")[o]:xo((o+1).toString(),Math.min(e,2))},L:function(i,e,t,n){let o=i[t?"getUTCMonth":"getMonth"](),s=vu[e];return s?n.getMonthNames(s,"standalone")[o]:xo((o+1).toString(),Math.min(e,2))},Q:function(i,e,t,n){let o=i[t?"getUTCMonth":"getMonth"](),s=Math.floor(o/3),r=vu[e];return r?n.getQuarterNames(r)[s]:xo((s+1).toString(),Math.min(e,2))},E:function(i,e,t,n){let o=i[t?"getUTCDay":"getDay"](),s=vu[e<3?3:e];return n.getDayNames(s)[o]},a:function(i,e,t,n){let s=i[t?"getUTCHours":"getHours"]()<12?0:1,r=vu[e];return n.getPeriodNames(r)[s]},d:function(i,e,t){return xo(i[t?"getUTCDate":"getDate"]().toString(),Math.min(e,2))},H:function(i,e,t){return xo(i[t?"getUTCHours":"getHours"]().toString(),Math.min(e,2))},h:function(i,e,t){let n=i[t?"getUTCHours":"getHours"]();return xo((n%12||12).toString(),Math.min(e,2))},m:function(i,e,t){return xo(i[t?"getUTCMinutes":"getMinutes"]().toString(),Math.min(e,2))},s:function(i,e,t){return xo(i[t?"getUTCSeconds":"getSeconds"]().toString(),Math.min(e,2))},S:function(i,e,t){return xo(i[t?"getUTCMilliseconds":"getMilliseconds"]().toString(),3).substr(0,e)},x:function(i,e,t){let n=t?0:i.getTimezoneOffset(),o=n>0?"-":"+",s=Math.abs(n),r=Math.floor(s/60),a=s%60,l=xo(r.toString(),2),d=xo(a.toString(),2);return o+l+(e>=3?":":"")+(e>1||a?d:"")},X:function(i,e,t){return t||!i.getTimezoneOffset()?"Z":Nb.x(i,e,t)},Z:function(i,e,t){return Nb.X(i,e>=5?3:2,t)}},em=function(i,e){return function(t){let n,o,s,r=0,a=!1,l,d="";if(!t)return null;if(!i)return t;let c=i[i.length-1]==="Z"||i.slice(-3)==="'Z'";for(n=0;n<i.length;n++)s=i[n],o=Nb[s],l=s===i[n+1],r++,l||(o&&!a&&(d+=o(t,r,c,e)),r=0),s==="'"&&!l?a=!a:(a||!o)&&(d+=s),s==="'"&&l&&n++;return d}};var rF=" .,:;/\\<>()-[]\u060C";var qr=function(i){let e=i&&Qe.convertDigits(i,!1).charCodeAt(0),t=Qe.convertDigits("0",!1).charCodeAt(0);return t<=e&&e<t+10},i5=function(i,e,t,n){let o=i[t],s=i[t+1];if(!n&&(o==="."||o===" "&&i.slice(t-1,t+3)===". m."||o==="-"&&!qr(s)))return!0;let r=n&&e.some(a=>i[t]!==a[t]);return rF.indexOf(o)<0&&n===qr(o)&&(!n||r)},n5=function(i,e){if(!qr(i[e]))for(;e>0&&!qr(i[e-1])&&(i[e-1]==="."||rF.indexOf(i[e-1])<0);)e--;return e},o5=function(i,e,t,n){let o=0,s=[],r=function(a){return i[o]!==a[o]&&(n===void 0||qr(i[o])===n)};for(Array.isArray(e)||(e=[e]),o=0;o<i.length;o++)if(t.indexOf(o)<0&&e.filter(r).length){o=n5(i,o);do{if(n=qr(i[o]),!s.length&&!n&&qr(e[0][o]))break;s.push(o),t.unshift(o),o++}while(i[o]&&i5(i,e,o,n));break}return s.length===1&&(i[t[0]-1]==="0"||i[t[0]-1]==="\u0660")&&t.unshift(t[0]-1),s},s5=function(i,e,t,n){let o=e[0],s=o<n.length?n[o]:o;return e.forEach(function(r,a){i=i.substr(0,s+a)+(t.length>1?t[a]:t)+i.substr(s+a+1)}),e.length===1&&(i=i.replace("0"+t,t+t),i=i.replace("\u0660"+t,t+t)),i},r5=function(i,e,t,n){let o,s,r;if(!qr(i[e[0]]||"0")){let a=Math.max(e.length<=3?3:4,t.length);for(;e.length>a;){for(s=e.pop(),r=n[s],n[s]=-1,o=s+1;o<n.length;o++)n[o]--;i=i.substr(0,r)+i.substr(r+1)}for(s=e[e.length-1]+1,r=s<n.length?n[s]:s;e.length<a;){for(e.push(e[e.length-1]+1),o=s;o<n.length;o++)n[o]++;i=i.substr(0,r)+" "+i.substr(r)}}return i=s5(i,e,t,n),i},sF=function(i,e){return Array.isArray(i)?i.map(function(t){return(e(t)||"").toString()}):(e(i)||"").toString()},a5=/[a-zA-Z]/g,l5=function(i,e,t,n){let o=e.split("").map(function(s,r){return t.indexOf(r)<0&&(s.match(a5)||s==="'")?n[r]:-1});return i=i.split("").map(function(s,r){let a=s,l=o.indexOf(r)>=0,d=r>0&&o.indexOf(r-1)>=0,c=o.indexOf(r+1)>=0;return l&&(d||(a="'"+a),c||(a+="'")),a}).join(""),i},tm=function(i){let e=[],t=sF(new Date(2009,8,8,6,5,4),i),n=t.split("").map(function(a,l){return l}),o=t,s={},r=[{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(o&&(r.forEach(function(a){let l=o5(t,sF(a.date,i),e,a.isDigit),d=a.pattern==="M"&&!s.d?"L":a.pattern;o=r5(o,l,d,n),s[d]=l.length}),o=l5(o,t,e,n),e.length))return o};var sr={3:"abbreviated",4:"wide",5:"narrow"},aF=function(i,e){return i>2?Object.keys(sr).map(function(t){return["format","standalone"].map(function(n){return e.getMonthNames(sr[t],n).join("|")}).join("|")}).join("|"):i===2?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},d5={":":function(i,e){let t=i>1?`{${i}}`:"",n=eo(e.getTimeSeparator());return n!==":"&&(n=`${n}|:`),`${n}${t}`},y:function(i){return i===2?`[0-9]{${i}}`:"[0-9]+?"},M:aF,L:aF,Q:function(i,e){return i>2?e.getQuarterNames(sr[i],"format").join("|"):"0?[1-4]"},E:function(i,e){return"\\D*"},a:function(i,e){return e.getPeriodNames(sr[i<3?3:i],"format").join("|")},d:function(i){return i===2?"3[01]|[12][0-9]|0?[1-9]":"0??[1-9]|[12][0-9]|3[01]"},H:function(i){return i===2?"2[0-3]|1[0-9]|0?[0-9]":"0??[0-9]|1[0-9]|2[0-3]"},h:function(i){return i===2?"1[012]|0?[1-9]":"0??[1-9]|1[012]"},m:function(i){return i===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},s:function(i){return i===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},S:function(i){return`[0-9]{1,${i}}`},w:function(i){return i===2?"[1-5][0-9]|0?[0-9]":"0??[0-9]|[1-5][0-9]"},x:function(i){return i===3?"[+-](?:2[0-3]|[01][0-9]):(?:[0-5][0-9])|Z":"[+-](?:2[0-3]|[01][0-9])(?:[0-5][0-9])|Z"}},or=Number,Hb=function(i,e){return i.map(t=>t.toLowerCase()).indexOf(e.toLowerCase())},lF=function(i,e,t){return e>2?["format","standalone"].map(function(n){return Object.keys(sr).map(function(o){let s=t.getMonthNames(sr[o],n);return Hb(s,i)})}).reduce(function(n,o){return n.concat(o)}).filter(function(n){return n>=0})[0]:or(i)-1},c5={y:function(i,e){let t=or(i);return e===2?t<30?2e3+t:1900+t:t},M:lF,L:lF,Q:function(i,e,t){return e>2?t.getQuarterNames(sr[e],"format").indexOf(i):or(i)-1},E:function(i,e,t){let n=t.getDayNames(sr[e<3?3:e],"format");return Hb(n,i)},a:function(i,e,t){let n=t.getPeriodNames(sr[e<3?3:e],"format");return Hb(n,i)},d:or,H:or,h:or,m:or,s:or,S:function(i,e){for(e=Math.max(e,3),i=i.slice(0,3);e<3;)i+="0",e++;return or(i)}},im=["y","M","d","h","m","s","S"],$b={y:"setFullYear",M:"setMonth",L:"setMonth",a:function(i,e,t){let n=i.getHours(),o=t.h;o!==void 0&&o!==n&&n--,!e&&n===12?n=0:e&&n!==12&&(n+=12),i.setHours(n)},d:"setDate",H:"setHours",h:"setHours",m:"setMinutes",s:"setSeconds",S:"setMilliseconds"},u5=function(i,e){let t=i[e];if(!t)return 0;let n=0;do e++,n++;while(i[e]===t);return n},h5=function(i,e){let t="";for(let n=0;n<e;n++)t+=i;return t},zb=function(i,e){let t="",n="",o,s=[],r=function(){n&&(s.push(`'${n}'`),t+=`${eo(n)})`,n="")};for(let a=0;a<i.length;a++){let l=i[a],d=l==="'",c=d5[l];if(!(d&&(o=!o,i[a-1]!=="'")))if(c&&!o){let h=u5(i,a),p=h5(l,h);r(),s.push(p),t+=`(${c(h,e)})`,a+=h-1}else n||(t+="("),n+=l}return r(),g5(s)||Er.warn(`The following format may be parsed incorrectly: ${i}.`),{patterns:s,regexp:new RegExp(`^${t}$`,"i")}},p5=["d","H","h","m","s","w","M","L","Q"],g5=function(i){let e=o=>{if(!o)return!1;let s=o[0];return["y","S"].includes(s)||p5.includes(s)&&o.length<3},t=!0,n=0;return i.every((o,s,r)=>(e(o)&&((a=>a[0]!=="S"&&a.length!==2)(o)&&(t=++n<2),e(r[s+1])||(n=0)),t))},dF=function(){return $b},m5=function(i,e,t,n,o){let s=e[0],r=$b[s],a=c5[s];if(r&&a){let l=a(t,e.length,n);o[e]=l,i[r]?i[r](l):r(i,l,o)}},f5=function(i,e,t){let n=$b[e],o="g"+n.substr(1),s=t[o]();i[n](s)},_5=function(i){return i.map(function(e){return e[0]==="'"?"":e[0]==="H"?"h":e[0]})},C5=function(i){let e=i.map(function(t){return im.indexOf(t)});return Math.max.apply(Math,e)},x5=function(i){let e=i.filter(function(t){return im.indexOf(t)<0});return im.concat(e)},cF=function(i,e){let t=zb(i,e);return function(n){let o=t.regexp.exec(n);if(o){let s=new Date,r=new Date(s.getFullYear(),0,1),a=_5(t.patterns),l=C5(a),d=x5(a),c={};return d.forEach(function(h,p){if(!h||p<im.length&&p>l)return;let g=a.indexOf(h);if(g>=0){let C=t.patterns[g],v=o[g+1];m5(r,C,v,e,c)}else f5(r,h,s)}),r}return null}};var v5=["January","February","March","April","May","June","July","August","September","October","November","December"],b5=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],y5=["AM","PM"],O5=["Q1","Q2","Q3","Q4"],uF=(i,e)=>{let t={abbreviated:3,short:2,narrow:1};return qe(i,n=>n.substr(0,t[e]))},rr={getMonthNames:function(i){return uF(v5,i)},getDayNames:function(i){return uF(b5,i)},getQuarterNames:function(i){return O5},getPeriodNames:function(i){return y5}};var hF={"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-MV":5,"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 E5=/[\u200E\u200F]/g,w5=/[\u202F]/g,$a=i=>e=>{if(!i.timeZoneName){let t=e.getFullYear(),n=String(t).length<3,s=n?t+400:t,r=new Date(Date.UTC(s,e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));n&&r.setFullYear(t);let a=m({timeZone:"UTC"},i);return Gb(r,a)}return Gb(e,i)},Wb={},S5=i=>{let e=mn.locale()+"/"+JSON.stringify(i);return Wb[e]||(Wb[e]=new Intl.DateTimeFormat(mn.locale(),i).format),Wb[e]};function Gb(i,e){return S5(e)(i).replace(E5,"").replace(w5," ")}var jb=i=>new Intl.NumberFormat(mn.locale()).format(i),I5=(()=>{let i={};return e=>{if(!(e in i)){if(jb(0)==="0")return i[e]=!1,!1;i[e]={};for(let t=0;t<10;++t)i[e][jb(t)]=t}return i[e]}})(),nm=i=>{let e=I5(mn.locale());return e?i.split("").map(t=>t in e?String(e[t]):t).join(""):i},pF=i=>i.replace(/(\D)0+(\d)/g,"$1$2"),D5=(i,e)=>pF(i)===pF(e),Kb=i=>i.replace("d\u2019","de "),Ub={day:{day:"numeric"},date:{year:"numeric",month:"long",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(Ub,"shortdateshorttime",{get:function(){let i=Intl.DateTimeFormat(mn.locale()).resolvedOptions();return{year:i.year,month:i.month,day:i.day,hour:"numeric",minute:"numeric"}}});var T5=i=>typeof i=="string"&&Ub[i.toLowerCase()],gF={standalone:function(i,e){let t=new Date(1999,i,13,1);return $a({month:e})(t)},format:function(i,e){let t=new Date(0,i,13,1),o=Kb($a({day:"numeric",month:e})(t)).split(" ").filter(s=>s.indexOf("13")<0);return o.length===1?o[0]:o.length===2?o[0].length>o[1].length?o[0]:o[1]:gF.standalone(i,e)}},mF={engine:function(){return"intl"},getMonthNames:function(i,e){let t={wide:"long",abbreviated:"short",narrow:"narrow"}[i||"wide"];return e=e==="format"?e:"standalone",Array.apply(null,new Array(12)).map((n,o)=>gF[e](o,t))},getDayNames:function(i){return(t=>Array.apply(null,new Array(7)).map((n,o)=>$a({weekday:t})(new Date(0,0,o))))({wide:"long",abbreviated:"short",short:"narrow",narrow:"narrow"}[i||"wide"])},getPeriodNames:function(){let i=$a({hour:"numeric",hour12:!0});return[1,13].map(e=>{let t=jb(1),n=i(new Date(0,0,1,e)).split(t);return n.length!==2?"":(n[0].length>n[1].length?n[0]:n[1]).trim()})},format:function(i,e){if(!i)return;if(!e)return i;typeof e!="function"&&!e.formatter&&(e=e.type||e);let t=T5(e);if(t)return $a(t)(i);let n=typeof e;return e.formatter||n==="function"||n==="string"?this.callBase.apply(this,arguments):$a(e)(i)},parse:function(i,e){let t;return e&&!e.parser&&typeof i=="string"&&(i=Kb(i),t=n=>Kb(this.format(n,e))),this.callBase(i,t||e)},_parseDateBySimpleFormat:function(i,e){i=nm(i);let t=this.getFormatParts(e),n=i.split(/\D+/).filter(r=>r.length>0);if(t.length!==n.length)return;let o=this._generateDateArgs(t,n),s=r=>{let a=((l,d)=>{let c=d?12:0;return new Date(l.year,l.month,l.day,(l.hours+c)%24,l.minutes,l.seconds)})(o,r);if(D5(nm(this.format(a,e)),i))return a};return s(!1)||s(!0)},_generateDateArgs:function(i,e){let t=new Date,n={year:t.getFullYear(),month:t.getMonth(),day:t.getDate(),hours:0,minutes:0,seconds:0};return i.forEach((o,s)=>{let r=e[s],a=parseInt(r,10);o==="month"&&(a-=1),n[o]=a}),n},formatUsesMonthName:function(i){return typeof i=="object"&&!(i.type||i.format)?i.month==="long":this.callBase.apply(this,arguments)},formatUsesDayName:function(i){return typeof i=="object"&&!(i.type||i.format)?i.weekday==="long":this.callBase.apply(this,arguments)},getTimeSeparator:function(){return nm(Gb(new Date(2001,1,1,11,11),{hour:"numeric",minute:"numeric",hour12:!1})).replace(/\d/g,"")},getFormatParts:function(i){if(typeof i=="string")return this.callBase(i);let e=m({},Ub[i.toLowerCase()]),t=new Date(2001,2,4,5,6,7),n=$a(e)(t);return n=nm(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(o=>({name:o.name,index:n.indexOf(o.value)})).filter(o=>o.index>-1).sort((o,s)=>o.index-s.index).map(o=>o.name)}};var A5=typeof Intl<"u",qb={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"},M5={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"]},fF=Lt({engine:function(){return"base"},_getPatternByFormat:function(i){return qb[i.toLowerCase()]},_expandPattern:function(i){return this._getPatternByFormat(i)||i},formatUsesMonthName:function(i){return this._expandPattern(i).indexOf("MMMM")!==-1},formatUsesDayName:function(i){return this._expandPattern(i).indexOf("EEEE")!==-1},getFormatParts:function(i){let e=this._getPatternByFormat(i)||i,t=[];return x(e.split(/\W+/),(n,o)=>{x(M5,(s,r)=>{r.includes(o)&&t.push(s)})}),t},getMonthNames:function(i){return rr.getMonthNames(i)},getDayNames:function(i){return rr.getDayNames(i)},getQuarterNames:function(i){return rr.getQuarterNames(i)},getPeriodNames:function(i){return rr.getPeriodNames(i)},getTimeSeparator:function(){return":"},is24HourFormat:function(i){let e=new Date(2017,0,20,11,0,0,0),t=new Date(2017,0,20,23,0,0,0),n=this.format(e,i),o=this.format(t,i);for(let s=0;s<n.length;s++)if(n[s]!==o[s])return!isNaN(parseInt(n[s]))},format:function(i,e){if(!i)return;if(!e)return i;let t;if(typeof e=="function")t=e;else if(e.formatter)t=e.formatter;else if(e=e.type||e,B(e))return e=qb[e.toLowerCase()]||e,Qe.convertDigits(em(e,this)(i));if(t)return t(i)},parse:function(i,e){let t=this,n,o;if(!i)return;if(!e)return this.parse(i,"shortdate");if(e.parser)return e.parser(i);if(typeof e=="string"&&!qb[e.toLowerCase()])n=e;else{o=r=>{let a=t.format(r,e);return Qe.convertDigits(a,!0)};try{n=tm(o)}catch{}}if(n)return i=Qe.convertDigits(i,!0),cF(n,this)(i);me.log("W0012");let s=new Date(i);if(!(!s||isNaN(s.getTime())))return s},firstDayOfWeekIndex:function(){let i=mn.getValueByClosestLocale(e=>hF[e]);return i===void 0?0:i}});A5&&fF.inject(mF);var he=fF;var om=Lt({format:function(i,e){let t=B(e)&&e!==""||X(e)||A(e),n=Oe(i)||Vt(i);if(!t||!n)return f(i)?i.toString():"";if(A(e))return e(i);if(B(e)&&(e={type:e}),Oe(i))return Qe.format(i,e);if(Vt(i))return he.format(i,e)},getTimeFormat:function(i){return i?"longtime":"shorttime"},_normalizeFormat:function(i){return Array.isArray(i)?i.length===1?i[0]:function(e){return i.map(function(t){return he.format(e,t)}).join(" ")}:i},getDateFormatByDifferences:function(i,e){let t=[],n=e&&i.millisecond&&!(i.year||i.month||i.day);if(n){let o=function(s){return s.getSeconds()+s.getMilliseconds()/1e3+"s"};t.push(o)}else i.millisecond&&t.push("millisecond");if((i.hour||i.minute||!n&&i.second)&&t.unshift(this.getTimeFormat(i.second)),i.year&&i.month&&i.day)return e&&e==="month"?"monthandyear":(t.unshift("shortdate"),this._normalizeFormat(t));if(i.year&&i.month)return"monthandyear";if(i.year&&i.quarter)return"quarterandyear";if(i.year)return"year";if(i.quarter)return"quarter";if(i.month&&i.day){if(e){let o=function(s){return he.getMonthNames("abbreviated")[s.getMonth()]+" "+he.format(s,"day")};t.unshift(o)}else t.unshift("monthandday");return this._normalizeFormat(t)}if(i.month)return"month";if(i.day){if(e)t.unshift("day");else{let o=function(s){return he.format(s,"dayofweek")+", "+he.format(s,"day")};t.unshift(o)}return this._normalizeFormat(t)}return this._normalizeFormat(t)},getDateFormatByTicks:function(i){let e,t,n;if(i.length>1)for(e=Y.getDatesDifferences(i[0],i[1]),n=1;n<i.length-1;n++)t=Y.getDatesDifferences(i[n],i[n+1]),e.count<t.count&&(e=t);else e={year:!0,month:!0,day:!0,hour:i[0].getHours()>0,minute:i[0].getMinutes()>0,second:i[0].getSeconds()>0,millisecond:i[0].getMilliseconds()>0};return this.getDateFormatByDifferences(e)},getDateFormatByTickInterval:function(i,e,t){let n,o=function(a,l,d){switch(l){case"year":case"quarter":a.month=d;case"month":a.day=d;case"week":case"day":a.hour=d;case"hour":a.minute=d;case"minute":a.second=d;case"second":a.millisecond=d}};t=B(t)?t.toLowerCase():t;let s=Y.getDatesDifferences(i,e);return i!==e&&function(a,l,d){!d.getMilliseconds()&&d.getSeconds()?d.getSeconds()-l.getSeconds()===1&&(a.millisecond=!0,a.second=!1):!d.getSeconds()&&d.getMinutes()?d.getMinutes()-l.getMinutes()===1&&(a.second=!0,a.minute=!1):!d.getMinutes()&&d.getHours()?d.getHours()-l.getHours()===1&&(a.minute=!0,a.hour=!1):!d.getHours()&&d.getDate()>1?d.getDate()-l.getDate()===1&&(a.hour=!0,a.day=!1):d.getDate()===1&&d.getMonth()?d.getMonth()-l.getMonth()===1&&(a.day=!0,a.month=!1):!d.getMonth()&&d.getFullYear()&&d.getFullYear()-l.getFullYear()===1&&(a.month=!0,a.year=!1)}(s,i>e?e:i,i>e?i:e),n=Y.getDateUnitInterval(s),o(s,n,!0),n=Y.getDateUnitInterval(t||"second"),o(s,n,!1),s[{week:"day"}[n]||n]=!0,this.getDateFormatByDifferences(s)}});var _F=nn.inherit({_supportedKeys(){return m(this.callBase(),{escape:E})},_getDefaultOptions(){return m(this.callBase(),{message:O.format("Loading"),width:222,height:90,animation:null,showIndicator:!0,indicatorSrc:"",showPane:!0,delay:0,templatesRenderAsynchronously:!1,hideTopOverlayHandler:null,focusStateEnabled:!1,propagateOutsideClick:!0,preventScrollEvents:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"generic"},options:{shadingColor:"transparent"}},{device:()=>ht(),options:{message:"",width:60,height:60,maxHeight:60,maxWidth:60}},{device:()=>Ot(),options:{width:"auto",height:"auto"}}])},_init(){this.callBase.apply(this,arguments)},_render(){this.callBase(),this.$element().addClass("dx-loadpanel"),this.$wrapper().addClass("dx-loadpanel-wrapper"),this._updateWrapperAria()},_updateWrapperAria(){if(this.$wrapper().removeAttr("aria-label").removeAttr("role"),!this.option("showIndicator")){let e=this._getAriaAttributes();this.$wrapper().attr(e)}},_getAriaAttributes(){let{message:i}=this.option();return{role:"alert","aria-label":i||O.format("Loading")}},_renderContentImpl(){this.callBase(),this.$content().addClass("dx-loadpanel-content"),this._$loadPanelContentWrapper=u("<div>").addClass("dx-loadpanel-content-wrapper"),this._$loadPanelContentWrapper.appendTo(this.$content()),this._togglePaneVisible(),this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage()},_show(){let i=this.option("delay");if(!i)return this.callBase();let e=y(),t=this.callBase.bind(this);return this._clearShowTimeout(),this._showTimeout=setTimeout(()=>{t().done(()=>{e.resolve()})},i),e.promise()},_hide(){return this._clearShowTimeout(),this.callBase()},_clearShowTimeout(){clearTimeout(this._showTimeout)},_renderMessage(){if(!this._$loadPanelContentWrapper)return;let i=this.option("message");if(!i)return;let e=u("<div>").addClass("dx-loadpanel-message").text(i);this._$loadPanelContentWrapper.append(e)},_renderLoadIndicator(){!this._$loadPanelContentWrapper||!this.option("showIndicator")||(this._$indicator||(this._$indicator=u("<div>").addClass("dx-loadpanel-indicator").appendTo(this._$loadPanelContentWrapper)),this._createComponent(this._$indicator,bi,{elementAttr:this._getAriaAttributes(),indicatorSrc:this.option("indicatorSrc")}))},_cleanPreviousContent(){this.$content().find(".dx-loadpanel-message").remove(),this.$content().find(".dx-loadpanel-indicator").remove(),delete this._$indicator},_togglePaneVisible(){this.$content().toggleClass("dx-loadpanel-pane-hidden",!this.option("showPane"))},_optionChanged(i){switch(i.name){case"delay":break;case"message":case"showIndicator":this._cleanPreviousContent(),this._renderLoadIndicator(),this._renderMessage(),this._updateWrapperAria();break;case"showPane":this._togglePaneVisible();break;case"indicatorSrc":this._renderLoadIndicator();break;default:this.callBase(i)}},_dispose(){this._clearShowTimeout(),this.callBase()}});K("dxLoadPanel",_F);var CF=_F;var sm=CF;var R5=["year","month","day"],F5=["year","month","day","hour","minute"],Xb=function(i){return i==="date"||i==="datetime"},Yb=function(i){let e,t=[],n=["year","month","day","hour","minute","second"],o=i.headerFilter&&i.headerFilter.groupInterval,s=o==="quarter"?"month":o;if(Xb(i.dataType)&&o!==null)return t=i.dataType==="datetime"?F5:R5,e=n.indexOf(s),e>=0&&(t=n.slice(0,e),t.push(o)),t;if(f(o))return Array.isArray(o)?o:[o]},vo=function(){let i=function(o,s){let r=o.dataField||o.selector;return s==="search"&&(r=o.displayField||o.calculateDisplayValue||r),r},e=function(o,s){let r=this,a,l,d,c=i(r,s);if(Array.isArray(o)&&f(o[0])&&f(o[1]))return l=[c,">=",o[0]],d=[c,"<=",o[1]],Xb(r.dataType)&&(h=o[1],h.getHours()+h.getMinutes()+h.getSeconds()+h.getMilliseconds()<1)&&(a=new Date(o[1].getTime()),r.dataType==="date"&&a.setDate(o[1].getDate()+1),d=[c,"<",a]),[l,"and",d];var h},t=function(o,s,r){let a=this,l,d,c,h=function(g){return Vt(g)?[g.getFullYear(),g.getMonth(),g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds()]:qe((""+g).split("/"),function(C,v){return v===1?Number(C)-1:Number(C)})}(o),p=i(a,r);switch(r==="headerFilter"?c=Yb(a)[h.length-1]:a.dataType==="datetime"&&(c="minute"),c){case"year":l=new Date(h[0],0,1),d=new Date(h[0]+1,0,1);break;case"month":l=new Date(h[0],h[1],1),d=new Date(h[0],h[1]+1,1);break;case"quarter":l=new Date(h[0],3*h[1],1),d=new Date(h[0],3*h[1]+3,1);break;case"hour":l=new Date(h[0],h[1],h[2],h[3]),d=new Date(h[0],h[1],h[2],h[3]+1);break;case"minute":l=new Date(h[0],h[1],h[2],h[3],h[4]),d=new Date(h[0],h[1],h[2],h[3],h[4]+1);break;case"second":l=new Date(h[0],h[1],h[2],h[3],h[4],h[5]),d=new Date(h[0],h[1],h[2],h[3],h[4],h[5]+1);break;default:l=new Date(h[0],h[1],h[2]),d=new Date(h[0],h[1],h[2]+1)}switch(s){case"<":return[p,"<",l];case"<=":return[p,"<",d];case">":return[p,">=",d];case">=":return[p,">=",l];case"<>":return[[p,"<",l],"or",[p,">=",d]];default:return[[p,">=",l],"and",[p,"<",d]]}},n=function(o,s,r){let a=i(this,r),l=Yb(this);if(r==="headerFilter"&&l&&f(o)){let d=(""+o).split("/"),c=Number(d[d.length-1]),h=l[d.length-1],p=[a,">=",c],g=[a,"<",c+h];return[p,"and",g]}return[a,s||"=",o]};return{defaultCalculateFilterExpression:function(o,s,r){let a=this,l=i(a,r),d=a.calculateDisplayValue&&r==="search",c=d&&a.lookup&&a.lookup.dataType||a.dataType,h=null;if((r==="headerFilter"||r==="filterBuilder")&&o===null)h=[l,s||"=",null],c==="string"&&(h=[h,s==="="?"or":"and",[l,s||"=",""]]);else if(c==="string"&&(!a.lookup||d))h=[l,s||"contains",o];else{if(s==="between")return e.apply(a,[o,r]);if(Xb(c)&&f(o))return t.apply(a,arguments);if(c==="number")return n.apply(a,arguments);h=[l,s||"=",o]}return h},getGroupInterval:Yb}}();var P5="scrolling.legacyMode";var k5="scrolling.rowRenderingMode",B5={year:i=>i&&i.getFullYear(),month:i=>i&&i.getMonth()+1,day:i=>i&&i.getDate(),quarter:i=>i&&Math.floor(i.getMonth()/3)+1,hour:i=>i&&i.getHours(),minute:i=>i&&i.getMinutes(),second:i=>i&&i.getSeconds()},V5=function(){let i=arguments[1],e=this.calculateCellValue(i);if(!f(e))return null;if(OF(this.dataType)){let t=arguments[0];return B5[t](e)}if(this.dataType==="number"){let t=arguments[0];return Math.floor(Number(e)/t)*t}},L5=function(i,e){return A(i)&&A(e)&&i.originalCallback&&e.originalCallback?i.originalCallback===e.originalCallback&&i.columnIndex===e.columnIndex:i===e};function OF(i){return i==="date"||i==="datetime"}var xF=function(i){i.get(0).textContent="\xA0"},Qb=function(i){i=i||[];let e=vn(i);for(let t=0;t<i.length;t++)i&&i[t]&&i[t].isExpanded!==void 0&&(e[t].isExpanded=i[t].isExpanded),i&&i[t]&&i[t].groupInterval!==void 0&&(e[t].groupInterval=i[t].groupInterval);return e},EF=function(i,e){let t=om.format(i,e.format)||i&&i.toString()||"",n={value:i,valueText:e.getDisplayFormat?e.getDisplayFormat(t):t,target:e.target||"row",groupInterval:e.groupInterval};return e.customizeText?e.customizeText.call(e,n):n.valueText},vF=function(i,e){let t=i.displayFormat||i.columnCaption&&e[`${i.summaryType}OtherColumn`]||e[i.summaryType];return EF(i.value,{format:i.valueFormat,getDisplayFormat:n=>t?Gi(t,n,i.columnCaption):n,customizeText:i.customizeText})},bF=function(i){let e=i.data&&i.data(),t=e&&e.dxComponents,n=t&&t[0];return n&&e[n]},wF=function(i,e){if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!wF(i[t],e[t]))return!1;return!0}return A(i)&&i.columnIndex>=0&&A(e)&&e.columnIndex>=0?i.columnIndex===e.columnIndex&&Pt(i.filterValue)===Pt(e.filterValue)&&Pt(i.selectedFilterOperation)===Pt(e.selectedFilterOperation):Pt(i)==Pt(e)},N5=i=>({index:i.index,columnIndex:i.columnIndex,x:i.x,y:i.y}),yF=(i,e,t)=>{let n=!1;if(t&&(n=t(e)),!n){let o=N5(e);i.push(o)}};function H5(i){return Array.isArray(i)||(i=[i]),i.map((e,t)=>B(e)?{selector:e,isExpanded:t<i.length-1}:e)}var R={renderNoDataText(i){let e=this;if(i=i||this.element(),!i)return;let t=e.addWidgetPrefix("nodata"),n=i.find(`.${t}`).last(),o=this._dataController.isEmpty(),s=this._dataController.isLoading();n.length||(n=u("<span>").addClass(t)),n.parent().is(i)||n.appendTo(i),o&&!s?n.removeClass("dx-hidden").text(e._getNoDataText()):n.addClass("dx-hidden")},renderLoadPanel(i,e,t){let n=this,o;n._loadPanel&&n._loadPanel.$element().remove(),o=n.option("loadPanel"),o&&(o.enabled==="auto"?!t:o.enabled)?(o=m({shading:!1,message:o.text,container:e},o),n._loadPanel=n._createComponent(u("<div>").appendTo(e),sm,o)):n._loadPanel=null},calculateLoadPanelPosition(i){let e=u(q());return Q(i)>Q(e)?{of:e,boundary:i,collision:"fit"}:{of:i}},getIndexByKey(i,e,t){let n=-1;if(i!==void 0&&Array.isArray(e)){t=arguments.length<=2?"key":t;for(let o=0;o<e.length;o++){let s=f(t)?e[o][t]:e[o];if(Ee(i,s)){n=o;break}}}return n},combineFilters(i,e){let t=[];e=e||"and";for(let o=0;o<i.length;o++){var n;if(i[o]){if(((n=i[o])===null||n===void 0?void 0:n.length)===1&&i[o][0]==="!"){if(e==="and")return["!"];if(e==="or")continue}t.length&&t.push(e),t.push(i[o])}}if(t.length===1&&(t=t[0]),t.length)return t},checkChanges(i,e){let t=0;for(let n=0;n<e.length;n++)i[e[n]]&&t++;return i.length&&i.length===t},equalFilterParameters:wF,proxyMethod(i,e,t){i[e]||(i[e]=function(){let n=this._dataSource;return n?n[e].apply(n,arguments):t})},formatValue:EF,getFormatOptionsByColumn:(i,e)=>({format:i.format,getDisplayFormat:i.getDisplayFormat,customizeText:i.customizeText,target:e,trueText:i.trueText,falseText:i.falseText}),getDisplayValue(i,e,t,n){return i.displayValueMap&&i.displayValueMap[e]!==void 0?i.displayValueMap[e]:i.calculateDisplayValue&&t&&n!=="group"?i.calculateDisplayValue(t):i.lookup&&!(n==="group"&&(i.calculateGroupValue||i.calculateDisplayValue))?i.lookup.calculateCellValue(e):e},getGroupRowSummaryText(i,e){let t="(";for(let n=0;n<i.length;n++){let o=i[n];t+=(n>0?", ":"")+vF(o,e)}return t+")"},getSummaryText:vF,normalizeSortingInfo:Qb,getFormatByDataType(i){switch(i){case"date":return"shortDate";case"datetime":return"shortDateShortTime";default:return}},getHeaderFilterGroupParameters(i,e){let t=[],n=i.dataField||i.name,o=vo.getGroupInterval(i);return o?(x(o,(s,r)=>{t.push(e?{selector:n,groupInterval:r,isExpanded:s<o.length-1}:V5.bind(i,r))}),t):(e?t=[{selector:n,isExpanded:!1}]:(t=function(s){let r=i.calculateCellValue(s);return(r===void 0||r==="")&&(r=null),r},i.sortingMethod&&(t=[{selector:t,compare:i.sortingMethod.bind(i)}])),t)},equalSortParameters(i,e,t){if(i=Qb(i),e=Qb(e),Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;for(let n=0;n<i.length;n++)if(!L5(i[n].selector,e[n].selector)||i[n].desc!==e[n].desc||i[n].groupInterval!==e[n].groupInterval||!t&&!!i[n].isExpanded!=!!e[n].isExpanded)return!1;return!0}return(!i||!i.length)==(!e||!e.length)},getPointsByColumns(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=[],r=i.length,a,l={left:0,top:0},d={width:0,height:0},c=n,h;for(let g=0;g<=r;g++){var p;g<r&&(a=i.eq(g),l=a.offset(),d=Pe(a.get(0)),h=a.css("direction")==="rtl");let C=l.left+d.width,v=l.top+d.height,b={index:c,columnIndex:c,item:(p=a)===null||p===void 0?void 0:p.get(0),x:!t&&h!==(g===r)?C:l.left,y:t&&g===r?v:l.top};if(!t&&g>0){let T=i.eq(g-1).offset(),{width:M}=Pe(i[g-1]),G=h?T.left:T.left+M;if(T.top<b.y&&(b.y=T.top),o&&Math.round(G)!==Math.round(b.x)){let te=I({},b,{item:i[g-1],x:G});h?(b.isRightBoundary=!0,te.isLeftBoundary=!0):(b.isLeftBoundary=!0,te.isRightBoundary=!0),yF(s,te,e)}}yF(s,b,e),c++}return s},getExpandCellTemplate:()=>({allowRenderToDetachedContainer:!0,render(i,e){let t=u(i);if(f(e.value)&&!(e.data&&e.data.isContinuation)&&!e.row.isNewRow){let n=e.component.getView("rowsView");t.addClass("dx-datagrid-expand").addClass("dx-selection-disabled"),u("<div>").addClass(e.value?"dx-datagrid-group-opened":"dx-datagrid-group-closed").appendTo(t),n.setAria("label",e.value?n.localize("dxDataGrid-ariaCollapse"):n.localize("dxDataGrid-ariaExpand"),t)}else xF(t)}}),setEmptyText:xF,isDateType:OF,getSelectionRange(i){try{if(i)return{selectionStart:i.selectionStart,selectionEnd:i.selectionEnd}}catch{}return{}},setSelectionRange(i,e){try{i&&i.setSelectionRange&&i.setSelectionRange(e.selectionStart,e.selectionEnd)}catch{}},focusAndSelectElement(i,e){let t=e.is(":focus");_.trigger(e,"focus");let n=i.option("editing.selectTextOnEditStart"),o=e.get(0);if(!t&&n&&e.is(".dx-texteditor-input")&&!e.is("[readonly]")){let s=bF(e.closest(".dx-texteditor"));P(s&&s._loadItemDeferred).done(()=>{o.select()})}},getWidgetInstance:bF,getLastResizableColumnIndex(i,e){let t=i.some(o=>o&&!o.command&&!o.fixed&&o.allowResizing!==!1),n;for(n=i.length-1;i[n];n--){let o=i[n],s=e&&e[n],r=!t||o.allowResizing!==!1;if(!o.command&&!o.fixed&&s!=="adaptiveHidden"&&r)break}return n},isElementInCurrentGrid(i,e){return e&&e.length?e.closest(`.${i.getWidgetContainerClass()}`).parent().is(i.component.$element()):!1},isVirtualRowRendering(i){let e=i.option(k5),t=i.option("scrolling.mode")==="virtual",n=i.option("scrolling.mode")==="infinite";return i.option(P5)===!1&&(t||n)?!0:e==="virtual"},getPixelRatio:i=>i.devicePixelRatio||1,getContentHeightLimit(i){return i.mozilla?8e6:15e6/this.getPixelRatio(q())},normalizeLookupDataSource(i){let e;return i.items?e=i.items:(e=i.dataSource,A(e)&&!Nt.isWrapped(e)&&(e=e({}))),gn(e)},getWrappedLookupDataSource(i,e,t){if(!e)return[];let n=this.normalizeLookupDataSource(i.lookup);if(i.calculateCellValue!==i.defaultCalculateCellValue)return n;let o=e.remoteOperations().groupPaging,s=i.displayField&&B(i.displayField),r,a,l,d=(h,p)=>{let g=p.skip??0,C=p.take?g+p.take:h.length;return h.slice(g,C)};return I({},n,{__dataGridSourceFilter:t,load:h=>{let p=new y;return(g=>{let C=H5(s?[i.dataField,i.displayField]:i.dataField),v=new y;return r&&(!o||g.skip===l&&g.take===a)?v.resolve(d(r,g)):(l=g.skip,a=g.take,e.load({filter:t,group:C,take:o?g.take:void 0,skip:o?g.skip:void 0}).done(T=>{r=T,v.resolve(o?T:d(T,g))}).fail(v.fail)),v})(h).done(g=>{if(g.length===0){p.resolve([]);return}let C=this.combineFilters(g.flatMap(b=>b.key).map(b=>[i.lookup.valueExpr,b]),"or");new gi(I({},n,h,{filter:this.combineFilters([C,h.filter],"and"),paginate:!1})).load().done(p.resolve).fail(p.fail)}).fail(p.fail),p},key:i.lookup.valueExpr,byKey(h){let p=y();return this.load({filter:[i.lookup.valueExpr,"=",h]}).done(g=>{p.resolve(g[0])}),p.promise()}})},logHeaderFilterDeprecatedWarningIfNeed(i){let e=i._logDeprecatedOptionWarning.bind(i);f(i.option("headerFilter.allowSearch"))&&e("headerFilter.allowSearch",{since:"23.1",alias:"headerFilter.search.enabled"}),f(i.option("headerFilter.searchTimeout"))&&e("headerFilter.searchTimeout",{since:"23.1",alias:"headerFilter.search.timeout"});let t=i.NAME==="dxPivotGrid"?"dataSource.fields":"columns",n=i.option(t);if(!Array.isArray(n))return;let o=s=>{s.forEach(r=>{var a;let l=r.headerFilter||{};f(l.allowSearch)&&e(`${t}[].headerFilter.allowSearch`,{since:"23.1",alias:`${t}[].headerFilter.search.enabled`}),f(l.searchMode)&&e(`${t}[].headerFilter.searchMode`,{since:"23.1",alias:`${t}[].headerFilter.search.mode`}),(a=r.columns)!==null&&a!==void 0&&a.length&&o(r.columns)})};o(n)}};var Zb="dx-master-detail-row";var Jb="dxCellHintVisible";var $5={render(i){i.container.append(i.content)}},z5=function(i,e){let t,n,o;function s(r){return setTimeout(()=>{t=n=null},r)}_.on(e,"touchstart touchend",".dx-row",r=>{clearTimeout(o),r.type==="touchstart"?(t=r.target,n=r.currentTarget,o=s(1e3)):o=s()}),_.on(e,[de,nr,le.down].join(" "),".dx-row",i.createAction(r=>{let{event:a}=r;t&&(a.target=t,a.currentTarget=n),u(a.target).closest("a").length||(r.rowIndex=i.getRowIndex(a.currentTarget),r.rowIndex>=0&&(r.rowElement=H(u(a.currentTarget)),r.columns=i.getColumns(),a.type===le.down?i._rowPointerDown(r):a.type===de?i._rowClick(r):i._rowDblClick(r)))}))},rm=function(i){return i==="auto"?"":Oe(i)?`${i}px`:i},SF=function(i,e,t){i.style.width=i.style.maxWidth=e.width==="auto"?"":t},W5=function(i,e){if(!i||!e)return;let t=i.attributes,n=e.attributes,o;for(o=0;o<t.length;o++){let s=t[o].nodeName;e.hasAttribute(s)||i.removeAttribute(s)}for(o=0;o<n.length;o++)i.setAttribute(n[o].nodeName,n[o].nodeValue)},G5=function(i){i.resolve()},ey=i=>typeof i=="number"?`${i.toFixed(3)}px`:i==="adaptiveHidden"?"0.0001px":i,bo=class extends NR(ye.View){init(){this._scrollLeft=-1,this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._columnChooserController=this.getController("columnChooser"),this._editorFactoryController=this.getController("editorFactory"),this._selectionController=this.getController("selection"),this._columnChooserView=this.getView("columnChooserView"),this._delayedTemplates=[],this._templateDeferreds=new Set,this._templatesCache={},this._templateTimeouts=new Set,this.createAction("onCellClick"),this.createAction("onRowClick"),this.createAction("onCellDblClick"),this.createAction("onRowDblClick"),this.createAction("onCellHoverChanged",{excludeValidators:["disabled","readOnly"]}),this.createAction("onCellPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onRowPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering",afterExecute:e=>{this._afterRowPrepared(e)}}),this._columnsController.columnsChanged.add(this._columnOptionChanged.bind(this)),this._dataController&&this._dataController.changed.add(this._handleDataChanged.bind(this))}dispose(){if(j()){var e,t;let n=q();(e=this._templateTimeouts)===null||e===void 0||e.forEach(o=>n.clearTimeout(o)),(t=this._templateTimeouts)===null||t===void 0||t.clear()}}optionChanged(e){switch(super.optionChanged(e),e.name){case"cellHintEnabled":case"onCellPrepared":case"onRowPrepared":case"onCellHoverChanged":this._invalidate(!0,!0),e.handled=!0;break;case"keyboardNavigation":e.fullName==="keyboardNavigation.enabled"&&this._invalidate(!0,!0),e.handled=!0}}_createScrollableOptions(){let e=this.option("scrolling"),t=this.option("scrolling.useNative"),n=m({},e,{direction:"both",bounceEnabled:!1,useKeyboard:!1});return t===void 0&&(t=!0),t==="auto"?(delete n.useNative,delete n.useSimulatedScrollbar):(n.useNative=!!t,n.useSimulatedScrollbar=!t),n}_updateCell(e,t){t.rowType&&this._cellPrepared(e,t)}_needToSetCellWidths(){return this.option("columnAutoWidth")}_createCell(e){let{column:t}=e,n=t.alignment||un(this.option("rtlEnabled")),o=this._needToSetCellWidths(),s=S.createElement("td");s.style.textAlign=n;let r=u(s);return e.rowType==="data"&&t.headerId&&!t.type&&this.component.option("showColumnHeaders")&&this.setAria("describedby",t.headerId,r),t.cssClass&&r.addClass(t.cssClass),Array.isArray(t.elementAttr)&&t.elementAttr.forEach(a=>{let{name:l,value:d}=a;r.attr(l,d)}),t.command==="expand"&&(r.addClass(t.cssClass),r.addClass(this.addWidgetPrefix("group-space"))),t.colspan>1?r.attr("colSpan",t.colspan):!t.isBand&&t.visibleWidth!=="auto"&&o&&((t.width||t.minWidth)&&(s.style.minWidth=rm(t.minWidth||t.width)),t.width&&SF(s,t,rm(t.width))),r}_createRow(e,t){t=t||"tr";let n=u(`<${t}>`).addClass("dx-row");return t==="tr"&&this.setAria("role","row",n),n}_isAltRow(e){return e&&e.dataIndex%2===1}_createTable(e,t){let n=u("<table>").addClass(this.addWidgetPrefix("table")).addClass(this.addWidgetPrefix("table-fixed"));if(e&&!t?(n.attr("id",`dx-${new Ae}`).append(this._createColGroup(e)),we.safari&&n.append(u("<thead>").append("<tr>")),this.setAria("role","presentation",n)):this.setAria("hidden",!0,n),this.setAria("role","presentation",u("<tbody>").appendTo(n)),t)return n;we.mozilla&&_.on(n,"mousedown","td",s=>{s.ctrlKey&&s.preventDefault()}),this.option("cellHintEnabled")&&_.on(n,"mousemove",".dx-row > td",this.createAction(s=>{let r=s.event,a=u(r.target),l=u(r.currentTarget),d=l.parent(),c=this._columnsController.getVisibleColumns(),h=d.data("options"),p=l.index(),g=h&&h.cells&&h.cells[p],C=g?g.column:c[p],v=d.hasClass("dx-header-row"),b=d.hasClass("dx-data-row"),T=d.hasClass(Zb),M=d.hasClass("dx-group-row"),G=d.hasClass(this.addWidgetPrefix("filter-row")),te=b&&(!C||C.cellTemplate),oe=b&&g&&(h.isEditing||g.isEditing||C?.showEditorAlways),re=v&&(!C||C.headerCellTemplate),Ie=M&&(!C||C.groupIndex&&C.groupCellTemplate);!T&&!G&&!oe&&!te&&!re&&!Ie&&(a.data(Jb)&&(a.removeAttr("title"),a.data(Jb,!1)),a[0].scrollWidth-a[0].clientWidth>0&&!f(a.attr("title"))&&(a.attr("title",a.text()),a.data(Jb,!0)))}));let o=s=>{let r=u(s.currentTarget),a=u(s.target).closest(".dx-field-item-content"),l=r.parent(),d=l.data("options"),c=d&&d.cells&&d.cells[r.index()];if(!r.closest("table").is(s.delegateTarget))return;let h=m({},c,{cellElement:H(r),event:s,eventType:s.type});if(h.rowIndex=this.getRowIndex(l),a.length){let p=a.data("dx-form-item");p.column&&(h.column=p.column,h.columnIndex=this._columnsController.getVisibleIndex(h.column.index))}return h};return _.on(n,"mouseover",".dx-row > td",s=>{let r=o(s);r&&this.executeAction("onCellHoverChanged",r)}),_.on(n,"mouseout",".dx-row > td",s=>{let r=o(s);r&&this.executeAction("onCellHoverChanged",r)}),_.on(n,de,".dx-row > td",s=>{let r=o(s);r&&this.executeAction("onCellClick",r)}),_.on(n,nr,".dx-row > td",s=>{let r=o(s);r&&this.executeAction("onCellDblClick",r)}),z5(this,n),n}_rowPointerDown(e){}_rowClick(){}_rowDblClick(){}_createColGroup(e){let t=u("<colgroup>");for(let n=0;n<e.length;n++){let o=e[n].colspan||1;for(let s=0;s<o;s++)t.append(this._createCol(e[n]))}return t}_createCol(e){let t=e.visibleWidth||e.width;t==="adaptiveHidden"&&(t="0.0001px");let n=u("<col>");return hc(n,t),n}renderDelayedTemplates(e){let t=this._delayedTemplates,n=t.filter(s=>!s.async),o=t.filter(s=>s.async);this._delayedTemplates=[],this._renderDelayedTemplatesCore(n,!1,e),this._renderDelayedTemplatesCoreAsync(o)}_renderDelayedTemplatesCoreAsync(e){if(e.length){let t=q().setTimeout(()=>{this._templateTimeouts.delete(t),this._renderDelayedTemplatesCore(e,!0)});this._templateTimeouts.add(t)}}_renderDelayedTemplatesCore(e,t,n){let o=new Date;for(;e.length;){let s=e.shift(),{options:r}=s,a=S.getRootNode(u(r.container).get(0)),l=this.needWaitAsyncTemplates();if((!t||u(r.container).closest(a).length||l)&&(n&&(r.change=n),s.template.render(r)),t&&new Date-o>30){this._renderDelayedTemplatesCoreAsync(e);break}}!e.length&&this._delayedTemplates.length&&this.renderDelayedTemplates()}_processTemplate(e,t){let n=this,o;if(e&&e.render&&!si(e))o={allowRenderToDetachedContainer:e.allowRenderToDetachedContainer,render(s){e.render(s.container,s.model,s.change),s.deferred&&s.deferred.resolve()}};else if(A(e))o={render(s){let r=e(H(s.container),s.model,s.change);r&&(r.nodeType||si(r))&&s.container.append(r),s.deferred&&s.deferred.resolve()}};else{let s=B(e)?e:u(e).attr("id");s?(n._templatesCache[s]||(n._templatesCache[s]=n.getTemplate(e)),o=n._templatesCache[s]):o=n.getTemplate(e)}return o}renderTemplate(e,t,n,o,s){let r=this._processTemplate(t,n),{column:a}=n,l=n.rowType==="data",d=new y,c={container:e,model:n,deferred:d,onRendered:()=>{this.isDisposed()?d.reject():d.resolve()}};if(r){n.component=this.component;let h=a&&(a.renderAsync&&l||this.option("renderAsync")&&(a.renderAsync!==!1&&(a.command||a.showEditorAlways)&&l||n.rowType==="filter")),p=n.renderAsync??h;(r.allowRenderToDetachedContainer||o)&&!p?r.render(c):this._delayedTemplates.push({template:r,options:c,async:p}),this._templateDeferreds.add(d),_.on(e,ai,G5.bind(null,d))}else d.reject();return d.promise().always(()=>{this._templateDeferreds.delete(d)})}_getBodies(e){return u(e).children("tbody").not(".dx-header").not(".dx-footer")}_needWrapRow(e){var t;return!!this.option().rowTemplate&&!!((t=this._getBodies(e))!==null&&t!==void 0&&t.filter(".dx-row").length)}_wrapRowIfNeed(e,t,n){let o=n?e||this._tableElement:this._tableElement||e;if(this._needWrapRow(o)){let r=u("<tbody>").addClass(t.attr("class"));return this.setAria("role","presentation",r),r.append(t)}return t}_appendRow(e,t,n){n=n||$5,n.render({content:t,container:e})}_resizeCore(){let e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))}_renderCore(e){let t=this.element().parent();(!t||t.parent().length)&&this.renderDelayedTemplates(e)}_renderTable(e){e=e||{},e.columns=this._columnsController.getVisibleColumns();let t=e.change&&e.change.changeType,n=this._createTable(e.columns,t==="append"||t==="prepend"||t==="update");return this._renderRows(n,e),n}_renderRows(e,t){let n=this,o=n._getRows(t.change),s=t.change&&t.change.columnIndices||[],r=t.change&&t.change.changeTypes||[];for(let a=0;a<o.length;a++)n._renderRow(e,m({row:o[a],columnIndices:s[a],changeType:r[a]},t))}_renderRow(e,t){t.columnIndices||(t.row.cells=[]);let n=this._createRow(t.row),o=this._wrapRowIfNeed(e,n);t.changeType!=="remove"&&this._renderCells(n,t),this._appendRow(e,o);let s=m({columns:t.columns},t.row);this._addWatchMethod(s,t.row),this._rowPrepared(o,s,t.row)}_needRenderCell(e,t){return!t||t.indexOf(e)>=0}_renderCells(e,t){let n=this,o=0,{row:s}=t,{columns:r}=t;for(let a=0;a<r.length;a++)this._needRenderCell(a,t.columnIndices)&&n._renderCell(e,m({column:r[a],columnIndex:o,value:s.values&&s.values[o],oldValue:s.oldValues&&s.oldValues[o]},t)),r[a].colspan>1?o+=r[a].colspan:o++}_updateCells(e,t,n){let o=e.children(),s=t.children(),r=this.option("highlightChanges"),a=this.addWidgetPrefix("cell-updated-animation");n.forEach((l,d)=>{let c=o.eq(l),h=s.eq(d);c.replaceWith(h),r&&!h.hasClass("dx-command-expand")&&h.addClass(a)}),W5(e.get(0),t.get(0))}_setCellAriaAttributes(e,t){if(t.rowType!=="freeSpace"){this.setAria("role","gridcell",e);let n=this._columnsController.getColumnIndexOffset(),o=t.columnIndex+n+1;this.setAria("colindex",o,e)}}_renderCell(e,t){let n=this._getCellOptions(t);if(t.columnIndices){if(t.row.cells){let s=t.row.cells.findIndex(r=>r.columnIndex===n.columnIndex);t.row.cells[s]=n}}else t.row.cells.push(n);let o=this._createCell(n);return this._setCellAriaAttributes(o,n),this._renderCellContent(o,n,t),e.get(0).appendChild(o.get(0)),o}_renderCellContent(e,t,n){let o=this._getCellTemplate(t);P(!o||this.renderTemplate(e,o,t,void 0,n.change)).done(()=>{this._updateCell(e,t)})}_getCellTemplate(e){}_getRows(e){return[]}_getCellOptions(e){let t={column:e.column,columnIndex:e.columnIndex,rowType:e.row.rowType,isAltRow:this._isAltRow(e.row)};return this._addWatchMethod(t),t}_addWatchMethod(e,t){if(!this.option("repaintChangesOnly"))return;let n=[];return t=t||e,t.watch=t.watch||function(o,s,r){let a=o(t.data),l=function(d){d&&r&&r(d);let c=o(t.data);JSON.stringify(a)!==JSON.stringify(c)&&(d&&s(c),a=c)};return n.push(l),function(){let d=n.indexOf(l);d>=0&&n.splice(d,1)}},t.update=t.update||function(o,s){o&&(this.data=e.data=o.data,this.rowIndex=e.rowIndex=o.rowIndex,this.dataIndex=e.dataIndex=o.dataIndex,this.isExpanded=e.isExpanded=o.isExpanded,e.row&&!s&&(e.row=o)),n.forEach(r=>{r(o)})},t!==e&&(e.watch=t.watch.bind(t)),e}_cellPrepared(e,t){t.cellElement=H(u(e)),this.executeAction("onCellPrepared",t)}_rowPrepared(e,t,n){Xe(e.get(0),"options",t),t.rowElement=H(e),this.executeAction("onRowPrepared",t)}_columnOptionChanged(e){let{optionNames:t}=e;if(R.checkChanges(t,["width","visibleWidth"])){let o=this._columnsController.getVisibleColumns().map(s=>s.visibleWidth||s.width);this.setColumnWidths({widths:o,optionNames:t});return}this._requireReady||this.render()}getCellIndex(e,t){return e.length?e[0].cellIndex:-1}getTableElements(){return this._tableElement||u()}getTableElement(e){return this._tableElement}setTableElement(e,t){this._tableElement=e}_afterRowPrepared(e){}_handleDataChanged(e){}callbackNames(){return["scrollChanged"]}_updateScrollLeftPosition(){let e=this._scrollLeft;e>=0&&(this._scrollLeft=0,this.scrollTo({left:e}))}scrollTo(e){let t=this.element(),n=t&&t.children(`.${this.addWidgetPrefix("scroll-container")}`).not(`.${this.addWidgetPrefix("content-fixed")}`);f(e)&&f(e.left)&&this._scrollLeft!==e.left&&(this._scrollLeft=e.left,n&&n.scrollLeft(e.left))}_getContent(e){var t;return(t=this._tableElement)===null||t===void 0?void 0:t.parent()}_removeContent(e){let t=this._getContent(e);t!=null&&t.length&&t.remove()}_wrapTableInScrollContainer(e,t){let n=u("<div>"),o=this.option("scrolling.useNative");return(o===!1||o==="auto"&&!lo)&&n.addClass(this.addWidgetPrefix("scrollable-simulated")),_.on(n,"scroll",()=>{let s=n.scrollLeft();s!==this._scrollLeft&&this.scrollChanged.fire({left:s},this.name)}),n.addClass(this.addWidgetPrefix("content")).addClass(this.addWidgetPrefix("scroll-container")).append(e).appendTo(this.element()),this.setAria("role","presentation",n),n}needWaitAsyncTemplates(){return this.option("templatesRenderAsynchronously")&&this.option("renderAsync")===!1}waitAsyncTemplates(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=new y;if(!(e||this.needWaitAsyncTemplates()))return t.resolve();let o=()=>P.apply(this,Array.from(this._templateDeferreds)).done(()=>{this.isDisposed()?t.reject():this._templateDeferreds.size>0?o():t.resolve()}).fail(t.reject);return o(),t.promise()}_updateContent(e,t,n){return this.waitAsyncTemplates().done(()=>{this._removeContent(n),this.setTableElement(e,n),this._wrapTableInScrollContainer(e,n)})}_findContentElement(e){}_getWidths(e){if(!e)return[];let t=[];return e.toArray().forEach(o=>{let s=o.offsetWidth;if(o.getBoundingClientRect){let r=Pe(o);r.width>o.offsetWidth-1&&(s=r.width)}t.push(s)}),t}getColumnWidths(e){if((this.option("forceApplyBindings")||E)(),e=e??this.getTableElement(),e){let t=e.children("tbody:not(.dx-header)").children();for(let n=0;n<t.length;n++){let o=t.eq(n),s=o.hasClass("dx-group-row"),r=o.hasClass(Zb),a=o.hasClass("dx-error-row");if(o.get(0).style.display!=="none"&&!o.hasClass("dx-state-invisible")&&(!s&&!r&&!a)){let c=o.children("td");return this._getWidths(c)}}}return[]}getVisibleColumnIndex(e,t){return e}setColumnWidths(e){let{widths:t,optionNames:n}=e,o=this.getTableElement();if(!(o!=null&&o.length)||!t)return;let s=this.getColumns(),r=this._needToSetCellWidths(),a=o.children("colgroup").children("col");a.toArray().forEach(l=>l.removeAttribute("style")),s.forEach((l,d)=>{if(r&&l.width&&!l.command){let h=rm(l.visibleWidth||l.width),p=rm(l.minWidth||h),g=o.children().children(".dx-row").not(`.${Zb}`);for(let C=0;C<g.length;C++){let v=this.getVisibleColumnIndex(d,C);if(v>=0){let b=g.eq(C),T=b.hasClass("dx-group-row")?b.find(`td[aria-colindex='${v+1}']:not(.dx-group-cell)`):b.find("td").eq(v);if(T.length){let M=T.get(0);SF(M,l,h),M.style.minWidth=p}}}}let c=ey(t[d]);f(c)&&hc(a.eq(d),c)})}getCellElements(e){return this._getCellElementsCore(e)}_getCellElementsCore(e){return e<0?void 0:this._getRowElements().eq(e).children()}_getCellElement(e,t){let n=this.getCellElements(e),o=this._getVisibleColumnIndex(n,e,t);if(!(n!=null&&n.length)||o<0)return;let s=n.eq(o);return s.length>0?s:void 0}_getRowElement(e){let t=this,n=u(),o=t.getTableElements();if(x(o,(s,r)=>{n=n.add(t._getRowElements(u(r)).eq(e))}),n.length)return n}getCellElement(e,t){let n=this._getCellElement(e,t);if(n)return H(n)}getRowElement(e){let t=this._getRowElement(e),n=[];if(t&&!H(t).get)for(let o=0;o<t.length;o++)n.push(t[o]);else n=t;return n}_getVisibleColumnIndex(e,t,n){if(B(n)){let o=this._columnsController.columnOption(n,"index");return this._columnsController.getVisibleIndex(o)}return n}getColumnElements(){}getColumns(e,t){return this._columnsController.getVisibleColumns(e)}getCell(e,t,n){let o=t||this._getRowElements(),s;if(o.length>0&&e.rowIndex>=0){var r;if(this.option("scrolling.mode")!=="virtual"&&this.option("scrolling.rowRenderingMode")!=="virtual"&&(e.rowIndex=e.rowIndex<o.length?e.rowIndex:o.length-1),s=n||this.getCellElements(e.rowIndex),((r=s)===null||r===void 0?void 0:r.length)>0)return s.eq(s.length>e.columnIndex?e.columnIndex:s.length-1)}}getRowsCount(){let e=this.getTableElement();return e&&e.length===1?e[0].rows.length:0}_getRowElementsCore(e){if(e=e||this.getTableElement(),e){let n=(this.option().rowTemplate||this.option("dataRowTemplate"))&&e.find("> tbody.dx-row");return n&&n.length?n:e.find("> tbody > .dx-row, > .dx-row")}return u()}_getRowElements(e){return this._getRowElementsCore(e)}getRowIndex(e){return this._getRowElements().index(e)}getBoundingRect(){}getName(){}setScrollerSpacing(e){let t=this.element(),n=this.option("rtlEnabled");t&&t.css({paddingLeft:n?e:"",paddingRight:n?"":e})}isScrollbarVisible(e){let t=this.element(),n=this._tableElement;return t&&n?e?ae(n)-W(t)>0:ee(n)-Q(t)>0:!1}isDisposed(){var e;return(e=this.component)===null||e===void 0?void 0:e._disposed}};var j5="dx-link",ty=function(i,e,t){let n=u("<div>").addClass(i.addWidgetPrefix("text-content"));i.setAria("role","presentation",n),IF(i,e,t.column,n);let o=i.option("showColumnLines"),s=i.getController("columns").getHeaderContentAlignment(t.column.alignment);return n[o||s==="right"?"appendTo":"prependTo"](e)};function IF(i,e,t,n){let o=i._getIndicatorElements(e,!0),s=i._getIndicatorElements(e),r=o&&o.length,a=i._getColumnAlignment(t.alignment),l=`.${i._getIndicatorClassName("sort")}`,d=`.${i._getIndicatorClassName("sortIndex")}`,c=s.filter(l),h=s.children().filter(d);n=n||e.children(`.${i.addWidgetPrefix("text-content")}`),n.toggleClass("dx-text-content-alignment-"+a,r>0).toggleClass("dx-text-content-alignment-"+(a==="left"?"right":"left"),r>0&&t.alignment==="center").toggleClass("dx-sort-indicator",!!c.length).toggleClass("dx-sort-index-indicator",!!h.length).toggleClass("dx-header-filter-indicator",!!s.filter(`.${i._getIndicatorClassName("headerFilter")}`).length)}var iy=class extends bo{init(){super.init(),this._headerPanelView=this.getView("headerPanel"),this._headerFilterController=this.getController("headerFilter"),this._dataController=this.getController("data")}_createTable(){let e=super._createTable.apply(this,arguments);return _.on(e,"mousedown selectstart",this.createAction(t=>{let{event:n}=t;n.shiftKey&&n.preventDefault()})),e}_isLegacyKeyboardNavigation(){return this.option("useLegacyKeyboardNavigation")}_getDefaultTemplate(e){let t=this;return function(n,o){let{caption:s}=e,r=!e.command||s&&e.command!=="expand";e.command==="empty"?t._renderEmptyMessage(n,o):r?ty(t,n,o).text(s):e.command&&n.html("&nbsp;")}}_renderEmptyMessage(e,t){let n=this._getEmptyHeaderText();if(!n){e.html("&nbsp;");return}let o=ty(this,e,t);if(n.includes("{0}")){let[r,a]=n.split("{0}"),l=O.format("dxDataGrid-emptyHeaderColumnChooserText"),d=this._columnChooserView,c=u("<a>").text(l).addClass(j5);_.on(c,"click",this.createAction(()=>d.showColumnChooser())),o.append(S.createTextNode(r)).append(c).append(S.createTextNode(a))}else o.text(n)}_getEmptyHeaderText(){let e=!!this._columnChooserView.hasHiddenColumns(),t=!!this._headerPanelView.hasGroupedColumns();switch(!0){case(e&&t):return O.format("dxDataGrid-emptyHeaderWithColumnChooserAndGroupPanelText");case t:return O.format("dxDataGrid-emptyHeaderWithGroupPanelText");case e:return O.format("dxDataGrid-emptyHeaderWithColumnChooserText");default:return""}}_getHeaderTemplate(e){return e.headerCellTemplate||{allowRenderToDetachedContainer:!0,render:this._getDefaultTemplate(e)}}_processTemplate(e,t){let n=this,o,{column:s}=t,r=super._processTemplate(e);return t.rowType==="header"&&r&&s.headerCellTemplate&&!s.command?o={render(a){let l=ty(n,a.container,a.model);r.render(m({},a,{container:l}))}}:o=r,o}_handleDataChanged(e){e.changeType==="refresh"&&(this._isGroupingChanged||this._requireReady)&&(this._isGroupingChanged=!1,this.render())}_renderCell(e,t){let n=super._renderCell(e,t);return t.row.rowType==="header"&&(n.addClass("dx-cell-focus-disabled"),this._isLegacyKeyboardNavigation()||t.column&&!t.column.type&&n.attr("tabindex",this.option("tabindex")||0)),n}_setCellAriaAttributes(e,t){super._setCellAriaAttributes(e,t),t.rowType==="header"&&(t.column.type||this.setAria("role","columnheader",e),t.column&&!t.column.command&&!t.column.isBand&&(e.attr("id",t.column.headerId),this.setAria("label",`${O.format("dxDataGrid-ariaColumn")} ${t.column.caption}`,e)))}_createRow(e){let t=super._createRow.apply(this,arguments);return t.toggleClass("dx-column-lines",this.option("showColumnLines")),e.rowType==="header"&&(t.addClass("dx-header-row"),this._isLegacyKeyboardNavigation()||Kr("columnHeaders",this,t,"td",this._handleActionKeyDown.bind(this))),t}_processHeaderAction(e,t){}_handleActionKeyDown(e){let{event:t}=e,n=u(t.target);if(this._lastActionElement=t.target,n.is(".dx-header-filter")){let o=this._headerFilterController,s=n.closest("td"),r=this.getColumnIndexByElement(s);r>=0&&o.showHeaderFilterMenu(r,!1)}else{let o=n.closest(".dx-row");this._processHeaderAction(t,o)}t.preventDefault()}_renderCore(){let e=this.element(),t={};if(this._tableElement&&!this._dataController.isLoaded()&&!this._hasRowElements)return;e.addClass(this.addWidgetPrefix("headers")).toggleClass(this.addWidgetPrefix("nowrap"),!this.option("wordWrapEnabled")).empty(),this.setAria("role","presentation",e);let n=this._updateContent(this._renderTable({change:t}),t);return this.getRowCount()>1&&e.addClass("dx-header-multi-row"),super._renderCore.apply(this,arguments),n}_renderRows(){let e=this;(e._dataController.isLoaded()||e._hasRowElements)&&(super._renderRows.apply(e,arguments),e._hasRowElements=!0)}_renderRow(e,t){let n=this.getRowCount()===1?null:t.row.rowIndex;t.columns=this.getColumns(n),super._renderRow(e,t)}_createCell(e){let{column:t}=e,n=super._createCell.apply(this,arguments);return t.rowspan>1&&e.rowType==="header"&&n.attr("rowSpan",t.rowspan),n}_getRows(){let e=[],t=this.getRowCount();if(this.option("showColumnHeaders"))for(let n=0;n<t;n++)e.push({rowType:"header",rowIndex:n});return e}_getCellTemplate(e){if(e.rowType==="header")return this._getHeaderTemplate(e.column)}_columnOptionChanged(e){let{changeTypes:t}=e,{optionNames:n}=e;if(t.grouping||t.groupExpanding){t.grouping&&(this._isGroupingChanged=!0);return}super._columnOptionChanged(e),(n.width||n.visible)&&this.resizeCompleted.fire()}_isElementVisible(e){return e&&e.visible}_alignCaptionByCenter(e){let t=this._getIndicatorContainer(e,!0);t&&t.length&&(t.filter(".dx-visibility-hidden").remove(),t=this._getIndicatorContainer(e),t.clone().addClass("dx-visibility-hidden").css("float","").insertBefore(e.children(`.${this.addWidgetPrefix("text-content")}`)))}_updateCell(e,t){t.rowType==="header"&&t.column.alignment==="center"&&this._alignCaptionByCenter(e),super._updateCell.apply(this,arguments)}_updateIndicator(e,t,n){let o=super._updateIndicator.apply(this,arguments);return t.alignment==="center"&&this._alignCaptionByCenter(e),IF(this,e,t),o}_getIndicatorContainer(e,t){let n=super._getIndicatorContainer(e);return t?n:n.filter(":not(.dx-visibility-hidden)")}_isSortableElement(e){return!0}getHeadersRowHeight(){let e=this.getTableElement(),t=e&&e.find(".dx-header-row");return t&&t.toArray().reduce((n,o)=>n+Q(o),0)||0}getHeaderElement(e){let t=this.getColumnElements();return t&&t.eq(e)}getColumnElements(e,t){let n=this,o,s=n._columnsController,r=n.getRowCount();if(n.option("showColumnHeaders")){if(r>1&&(!f(e)||f(t))){let a=[],l=f(t)?s.getChildrenByBandColumn(t,!0):s.getVisibleColumns();return x(l,(d,c)=>{let h=f(e)?e:s.getRowIndex(c.index);o=n._getCellElement(h,s.getVisibleIndex(c.index,h)),o&&a.push(o.get(0))}),u(a)}if(!e||e<r)return n.getCellElements(e||0)}}getColumnIndexByElement(e){let t=this.getCellIndex(e),n=e.closest(".dx-row"),{rowIndex:o}=n[0],s=this.getColumns(o)[t];return s?s.index:-1}getVisibleColumnIndex(e,t){let n=this.getColumns()[e];return n?this._columnsController.getVisibleIndex(n.index,t):-1}getColumnWidths(){let e=this.getColumnElements();return e&&e.length?this._getWidths(e):super.getColumnWidths.apply(this,arguments)}allowDragging(e){let t=e&&this._columnsController.getRowIndex(e.index),n=this.getColumns(t);return(this.option("allowColumnReordering")??this._columnsController.isColumnOptionUsed("allowReordering"))&&e.allowReordering&&n.length>1}getBoundingRect(){let e=this,t=e.getColumnElements();return t&&t.length?{top:e.getTableElement().offset().top}:null}getName(){return"headers"}getColumnCount(){let e=this.getColumnElements();return e?e.length:0}isVisible(){return this.option("showColumnHeaders")}optionChanged(e){let t=this;switch(e.name){case"showColumnHeaders":case"wordWrapEnabled":case"showColumnLines":t._invalidate(!0,!0),e.handled=!0;break;default:super.optionChanged(e)}}getHeight(){return this.getElementHeight()}getContextMenuItems(e){let t=this,{column:n}=e;if(e.row&&(e.row.rowType==="header"||e.row.rowType==="detailAdaptive")){let o=t.option("sorting");if(o&&o.mode!=="none"&&n&&n.allowSorting){let s=function(r){setTimeout(()=>{t._columnsController.changeSortOrder(n.index,r.itemData.value)})};return[{text:o.ascendingText,value:"asc",disabled:n.sortOrder==="asc",icon:"context-menu-sort-asc",onItemClick:s},{text:o.descendingText,value:"desc",disabled:n.sortOrder==="desc",icon:"context-menu-sort-desc",onItemClick:s},{text:o.clearText,value:"none",disabled:!n.sortOrder,icon:"context-menu-sort-none",onItemClick:s}]}}}getRowCount(){return this._columnsController&&this._columnsController.getRowCount()}setRowsOpacity(e,t,n){let o,s,r=this.getRowCount(),a=this._columnsController.getColumns(),l=a&&a[e],d=l&&l.isBand&&l.index,c=(h,p)=>{h.ownerBand===d&&(s.eq(p).css({opacity:t}),h.isBand&&this.setRowsOpacity(h.index,t,o+1))};if(f(d))for(n=n||0,o=n;o<r;o++)s=this.getCellElements(o),s&&this.getColumns(o).forEach(c)}},ny={defaultOptions:()=>({showColumnHeaders:!0,cellHintEnabled:!0}),views:{columnHeadersView:iy}};var $=I({},ye,R,{modules:[]});var WMe=ny.views.columnHeadersView;$.registerModule("columnHeaders",ny);var oy=["filterValues","filterType","fixed","fixedPosition"],ud=["visibleIndex","dataField","name","dataType","width","visible","sortOrder","lastSortOrder","sortIndex","groupIndex","filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","added"].concat(oy),DF={visibleWidth:!0,bestFitWidth:!0,bufferedFilterValue:!0},TF="dx-command-expand",sy=Number.MAX_SAFE_INTEGER||9007199254740991,Cs="groupExpand",AF="detailExpand",am=/columns\[(\d+)\]\.?/gi,MF={visible:!0,showInColumnChooser:!0},RF={number:["=","<>","<",">","<=",">=","between"],string:["contains","notcontains","startswith","endswith","=","<>"],date:["=","<>","<",">","<=",">=","between"],datetime:["=","<>","<",">","<=",">=","between"]},FF={visibleIndex:!0,groupIndex:!0,grouped:!0,sortIndex:!0,sortOrder:!0},Yr="group",Xr="columnChooser";var kF=/^(\d{4,})(-)?(\d{2})(-)?(\d{2})(?:T(\d{2})(:)?(\d{2})?(:)?(\d{2}(?:\.(\d{1,3})\d*)?)?)?(Z|([+-])(\d{2})(:)?(\d{2})?)?$/,BF=/^(\d{2}):(\d{2})(:(\d{2}))?$/,PF=["","yyyy","","MM","","dd","THH","","mm","","ss",".SSS"],K5=/^(\d{4})\/(\d{2})\/(\d{2})$/;var VF=function(i,e){let t;return B(i)&&!e&&(t=q5(i)),t||U5(i)};function _n(i){return+i||0}function U5(i){let e=LF(i)==="yyyy/MM/dd",t=!Vt(i)&&Date.parse(i);if(!t&&e){let n=i.match(K5);if(n){let o=new Date(_n(n[1]),_n(n[2]),_n(n[3]));return o.setFullYear(_n(n[1])),o.setMonth(_n(n[2])-1),o.setDate(_n(n[3])),o}}return Oe(t)?new Date(t):i}function q5(i){let e=i.match(kF);if(!e)return e=i.match(BF),e?new Date(0,0,0,_n(e[1]),_n(e[2]),_n(e[4])):void 0;let t=_n(e[1]),n=--e[3],o=e[5],s=0,r=0,a=p=>(t<100&&p.setFullYear(t),p);s=_n(e[14]),r=_n(e[16]),e[13]==="-"&&(s=-s,r=-r);let l=_n(e[6])-s,d=_n(e[8])-r,c=_n(e[10]),h=function(p){return p=p||"",_n(p)*Math.pow(10,3-p.length)}(e[11]);return e[12]?a(new Date(Date.UTC(t,n,o,l,d,c,h))):a(new Date(t,n,o,l,d,c,h))}var Y5=function(i,e){let t=i.match(kF),n="";if(!t)return t=i.match(BF),t?t[3]?"HH:mm:ss":"HH:mm":void 0;for(let o=1;o<PF.length;o++)t[o]&&(n+=PF[o]||t[o]);return t[12]==="Z"&&(n+="'Z'"),t[14]&&(t[15]?n+="xxx":t[16]?n+="xx":n+="x"),n},X5=function(i){return typeof i=="number"?new Date(i):VF(i,!xe().forceIsoDateParsing)},Q5=function(i,e){return e?Vt(i)?e==="number"?i&&i.valueOf?i.valueOf():null:em(e,rr)(i):null:i},LF=function(i){if(typeof i=="number")return"number";if(B(i)){let e;return xe().forceIsoDateParsing&&(e=Y5(i)),e||(i.indexOf(":")>=0?"yyyy/MM/dd HH:mm:ss":"yyyy/MM/dd")}else if(i)return null},ut={dateParser:VF,deserializeDate:X5,serializeDate:Q5,getDateSerializationFormat:LF};var ry=function(i){i.filterOperations=i.defaultFilterOperations},Z5=1,yu=function(i,e,t,n){let o={};if(e){B(e)&&(e={dataField:e}),i.setName(e);let s={};if(e.command)s=en(o,e);else{o=i.getCommonSettings(e),t&&t.name&&t.dataField&&(e=m({},e,{dataField:t.dataField}));let r=i._createCalculatedColumnOptions(e,n);e.type||(s={headerId:"dx-col-"+Z5++}),s=en(s,MF),en(s,o),en(s,r),en(s,e),en(s,{selector:null})}return e.filterOperations===e.defaultFilterOperations&&ry(s),s}},Qr=function(i,e,t,n){let o=[];return e&&x(e,(s,r)=>{let a=(n??0)+o.length,l=i._columnsUserState&&hy(r,i._columnsUserState[a])&&i._columnsUserState[a],d=yu(i,r,l,t);d&&(t&&(d.ownerBand=t),o.push(d),d.columns&&(o=o.concat(Qr(i,d.columns,d,o.length)),delete d.columns,d.hasColumns=!0))}),o},Zr=function(i,e){let t=[],n=e[i];for(;n;)t.unshift(n),i=n.index,n=e[i];return t},ay=function(i,e,t){let n=[],o=e[i];if(o)for(let s=0;s<o.length;s++){let r=o[s];(!f(r.groupIndex)||r.showWhenGrouped)&&(n.push(r),t&&r.isBand&&(n=n.concat(ay(r.index,e,t))))}return n},NF=function(i,e){let t,n,o=i.getBandColumnsCache(),s=function(r){let a=t?t.index:void 0;return r.ownerBand===a};if(o.isPlain)t=i._columns[e[0]];else{n=i._columns.filter(s);for(let r=0;r<e.length;r++)t=n[e[r]],t&&(n=i._columns.filter(s))}return t},J5=function(i,e){let t=[],n,o=i.getBandColumnsCache(),s=function(r){return r.ownerBand===e.ownerBand};if(o.isPlain){let r=i._columns.indexOf(e);r>=0&&(t=[`columns[${r}]`])}else for(n=i._columns.filter(s);n.length&&n.indexOf(e)!==-1;)t.unshift(`columns[${n.indexOf(e)}]`),e=o.columnParentByIndex[e.index],n=e?i._columns.filter(s):[];return t.join(".")},HF=function(i,e){let t=0,n=i.getChildrenByBandColumn(e,!0);return x(n,(o,s)=>{s.isBand?(s.colspan=s.colspan||HF(i,s.index),t+=s.colspan||1):t+=1}),t},$F=function(i,e,t){let n;for(let o=0;o<e.length;o++){let s=e[o];(s.visible||s.command)&&(s.isBand&&(s.colspan=s.colspan||HF(i,s.index)),(!s.isBand||!s.colspan)&&(n=i.getRowCount(),!s.command&&(!f(s.groupIndex)||s.showWhenGrouped)&&(n-=Zr(s.index,t.columnParentByIndex).length),n>1&&(s.rowspan=n)))}},lm=function(i){let e=Ii(i);return e!=="string"&&e!=="boolean"&&e!=="number"&&e!=="date"&&e!=="object"&&(e=void 0),e},ly=function(i,e){switch(i){case"date":case"datetime":return ut.getDateSerializationFormat(e);case"number":if(B(e))return"string";if(Oe(e))return null}},dy=function(i,e){i.deserializeValue||(R.isDateType(e)&&(i.deserializeValue=function(t){return ut.deserializeDate(t)},i.serializeValue=function(t){return B(t)?t:ut.serializeDate(t,this.serializationFormat)}),e==="number"&&(i.deserializeValue=function(t){let n=parseFloat(t);return isNaN(n)?t:n},i.serializeValue=function(t,n){return n==="filter"?t:f(t)&&this.serializationFormat==="string"?t.toString():t}))},zF=function(i,e){switch(i){case"number":return"right";case"boolean":return"center";default:return un(e)}},eY=function(i){return i.value===!0?this.trueText||"true":i.value===!1?this.falseText||"false":i.valueText||""},cy=function(i){if(i==="boolean")return eY},WF=function(i,e){let t=i._getFirstItems(e),n,o={},s=[];for(let r=0;r<t.length;r++)if(t[r])for(n in t[r])(!A(t[r][n])||Nt.isWrapped(t[r][n]))&&(o[n]=!0);for(n in o)if(n.indexOf("__")!==0){let r=yu(i,n);s.push(r)}return s},GF=function(i){x(i._columns,(e,t)=>{t.index=e}),x(i._columns,(e,t)=>{z(t.ownerBand)&&(t.ownerBand=t.ownerBand.index)}),x(i._commandColumns,(e,t)=>{t.index=-(e+1)})},uy=function(i,e){Sa(i._columns,"groupIndex",e,t=>{let{grouped:n}=t;return delete t.grouped,n})},tY=function(i,e){x(i._columns,(t,n)=>{f(n.sortIndex)&&!bu(n.sortOrder)&&delete n.sortIndex}),Sa(i._columns,"sortIndex",e,t=>!f(t.groupIndex)&&bu(t.sortOrder))},iY=function(i,e){let t,n=[],o=i.getBandColumnsCache(),s=[],r=i._columns.filter(a=>!a.command);for(let a=0;a<r.length;a++)t=r[a],Zr(a,o.columnParentByIndex).length?s.push(t):n.push(t);Sa(s,"visibleIndex",e),Sa(n,"visibleIndex",e)},dm=function(i,e,t){let n=z(e)?e.rowIndex:null,o=t===Yr?i.getGroupColumns():t===Xr?i.getChooserColumns():i.getVisibleColumns(n),s;return e=z(e)?e.columnIndex:e,s=o[e],s&&s.type===Cs&&(s=i._columns.filter(r=>s.type===r.type)[0]||s),s&&f(s.index)?s.index:-1},jF=function(i,e,t){let n=i.getGroupColumns(),o;if(t>=0)for(o=0;o<n.length;o++)n[o].groupIndex>=t&&n[o].groupIndex++;else for(t=0,o=0;o<n.length;o++)t=Math.max(t,n[o].groupIndex+1);return t};function hy(i,e){return i&&e&&e.name===(i.name||i.dataField)&&(e.dataField===i.dataField||i.name)}var py=function(i){let e=i._columnsUserState,t=i._ignoreColumnOptionNames||[],n=i._columns,o={},s=[],r=!0,a=[],l,d,c;function h(g,C){if(C)for(let v=0;v<ud.length;v++){let b=ud[v];t.includes(b)||(b==="dataType"?g[b]=g[b]||C[b]:oy.includes(b)?b in C&&(g[b]=C[b]):(b==="selectedFilterOperation"&&C[b]&&(g.defaultSelectedFilterOperation=g[b]||null),g[b]=C[b]))}}function p(g,C){let v=C.name||C.dataField,b=o[v]||0;for(let T=0;T<g.length;T++)if(hy(C,g[T]))if(b)b--;else return o[v]=o[v]||0,o[v]++,T;return-1}if(e){for(c=0;c<n.length;c++)d=p(e,n[c]),r=r&&d>=0,a.push(d);for(c=0;c<n.length;c++)l=n[c],d=a[c],(i._hasUserState||r)&&h(l,e[d]),d>=0&&f(e[d].initialIndex)?s[d]=l:s.push(l);let g=!1;for(c=0;c<e.length;c++){let C=e[c];C.added&&p(n,C)<0&&(l=yu(i,C.added),h(l,C),s.push(l),C.added.columns&&(g=!0))}g&&(GF(i),s=Qr(i,s)),za(i,s)}},Jr=function(i,e){GF(i),uy(i,e),tY(i,e),vy(i),iY(i,e)},Ou=function(i){i.resetColumnsCache()};function za(i,e){i._previousColumns=i._columns,i._columns=e,Ou(i),i.updateColumnDataTypes()}var zo=function(i,e,t,n){let o=i._columnChanges||{optionNames:{length:0},changeTypes:{length:0},columnIndex:n};t=t||"all",t=t.split(".")[0];let{changeTypes:s}=o;e&&!s[e]&&(s[e]=!0,s.length++);let{optionNames:r}=o;t&&!r[t]&&(r[t]=!0,r.length++),(n===void 0||n!==o.columnIndex)&&(f(n)&&(o.columnIndices??(o.columnIndices=[]),f(o.columnIndex)&&o.columnIndices.push(o.columnIndex),o.columnIndices.push(n)),delete o.columnIndex),i._columnChanges=o,Ou(i)},hd=function(i){let e=i.option("onColumnsChanging"),t=i._columnChanges,n=["dataField","lookup","dataType","columns"];i.isInitialized()&&!i._updateLockCount&&t&&(e&&(i._updateLockCount++,e(m({component:i.component},t)),i._updateLockCount--),i._columnChanges=void 0,o=t.optionNames,o&&n.some(s=>o[s])?(i._reinitAfterLookupChanges=t?.optionNames.lookup,i.reinit(),i._reinitAfterLookupChanges=void 0):i.columnsChanged.fire(t));var o},nY=function(i,e,t,n){let o=n>=0;if(t>=0)o||(e.lastSortOrder=e.sortOrder);else{let s=i.option("sorting.mode"),r=e.lastSortOrder;s==="single"&&i._columns.some(l=>l!==e&&f(l.sortIndex))&&(r=void 0),e.sortOrder=r}},oY=function(i,e){let{value:t}=e,{optionName:n}=e,{prevValue:o}=e,{fullOptionName:s}=e,r=`${s}.${n}`;!DF[n]&&i._skipProcessingColumnsChange!==r&&(i._skipProcessingColumnsChange=r,i.component._notifyOptionChanged(r,t,o),i._skipProcessingColumnsChange=!1)},cm=function(i,e,t,n,o){let s=Ce(t),r=e.index,a,l,d;if(arguments.length===3)return s(e,{functionsAsIs:!0});let c=s(e,{functionsAsIs:!0});if(!Ee(c,n,{maxDepth:5})){t==="groupIndex"||t==="calculateGroupValue"?(l="grouping",nY(i,e,n,c)):t==="sortIndex"||t==="sortOrder"||t==="calculateSortValue"?l="sorting":l="columns";let h=cl(t);h(e,n,{functionsAsIs:!0});let p=J5(i,e);FF[t]&&(Jr(i,e),n=s(e)),(t==="name"||t==="allowEditing")&&i._checkColumns(),!f(c)&&!f(n)&&t.indexOf("buffer")!==0&&(o=!0),o?Ou(i):(!ud.includes(t)&&t!=="visibleWidth"&&(a=i.option("columns"),d=i.getColumnByPath(p,a),B(d)&&(d=a[r]={dataField:d}),d&&hy(d,e)&&h(d,n,{functionsAsIs:!0})),zo(i,l,t,r)),p&&oY(i,{fullOptionName:p,optionName:t,value:n,prevValue:c})}};function bu(i){return i==="asc"||i==="desc"}var KF=function(i){let e=i._getExpandColumnOptions();i.addCommandColumn(e)},UF=function(i,e){if(!this.dataField)return;let t=this.dataField.split("."),n=t.length-1;this.serializeValue&&(e=this.serializeValue(e));for(let o=0;o<n;o++){let s=t[o];i=i[s]=i[s]||{}}i[t[n]]=e},gy=function(i,e,t){let n=[];return e=e||0,i[e]&&x(i[e],(o,s)=>{(s.ownerBand===t||s.type===Cs)&&(!s.isBand||!s.colspan?(!s.command||e<1)&&n.push(s):n.push.apply(n,gy(i,e+1,s.index)))}),n},qF=function(i){let e=1,t=i.getBandColumnsCache(),{columnParentByIndex:n}=t;return i._columns.forEach(o=>{let s=Zr(o.index,n),r=s.filter(a=>!a.visible);o.visible&&!r.length&&(e=Math.max(e,s.length+1))}),e},um=(i,e)=>!!i._columns.filter(n=>n.type===e.type).length,my=function(i,e){let t=i.option("rtlEnabled");return e.command&&!um(i,e)||!e.fixedPosition?t?"right":"left":e.fixedPosition},fy=function(i,e,t,n){let o,s=this.getRowCount(),r=i[n]&&i[n].rowspan,a=e.filter(l=>l.type===t);return i.forEach((l,d)=>{l.type===t&&(o=d,r=i[d+1]?i[d+1].rowspan:s)}),r>1&&(a=qe(a,l=>m({},l,{rowspan:r}))),a.unshift.apply(a,f(o)?[o,1]:[n,0]),i.splice.apply(i,a),r||1},YF=function(i){let e;for(e=0;i>1;e++)i/=10;return e},_y=function(i,e){let t=i?i.toString():"0";for(;t.length<e;)t=`0${t}`;return t},Cy=(i,e,t,n)=>{let o,s,r=e.slice().map(h=>m({},h)),a=i._isColumnFixing(),l=t.slice().map(h=>m({fixed:a},h)),d=h=>t.reduce((p,g,C)=>{let v=n&&h.type===Cs?"expand":h.type;return g.type===v||g.command===h.command?C:p},-1),c=h=>h.command!==t[s].command;for(let h=0;h<e.length;h++)if(o=e[h],s=o&&(o.type||o.command)?d(o):-1,s>=0)if(n)r[h]=m({fixed:a},t[s],o),o.type!==Cs&&(l=l.filter(c));else{let p={visibleIndex:o.visibleIndex,index:o.index,headerId:o.headerId,allowFixing:o.groupIndex===0,allowReordering:o.groupIndex===0,groupIndex:o.groupIndex};r[h]=m({},o,t[s],o.type===Cs&&p)}return e.length&&n&&l.length&&(r=r.concat(l)),r},xy=(i,e)=>f(e.fixed)||!e.type?e.fixed:i._isColumnFixing(),XF=i=>{i.forEach(e=>{f(e.ownerBand)&&(e.ownerBand=i[e.ownerBand])})},vy=i=>{i._bandColumnsCache=void 0},by=(i,e)=>{let t=B(e)&&e.substr(0,e.indexOf(":")),n;if(e!==void 0)return t&&(e=e.substr(t.length+1)),t?n=i.filter(o=>`${o[t]}`===e)[0]:["index","name","dataField","caption"].some(o=>(n=i.filter(s=>s[o]===e)[0],!!n)),n},QF=(i,e)=>{if(e!=="asc"&&e!=="desc")return i;let t=e==="asc"?1:-1;return i.sort((n,o)=>{let s=n.caption||"",r=o.caption||"";return t*s.localeCompare(r)}),i},ZF=function(i,e){let t=Qe.parse(i);if(Oe(t)){let n=Qe.format(t,e),o=Qe.format(t,"decimal");if(n===i||o===i)return t}};var yy=class extends ye.Controller{init(e){this._dataController=this.getController("data"),this._focusController=this.getController("focus"),this._stateStoringController=this.getController("stateStoring");let t=this.option("columns");this._commandColumns=this._commandColumns||[],this._columns=this._columns||[],this._isColumnsFromOptions=!!t,this._isColumnsFromOptions?(za(this,t?Qr(this,t):[]),py(this)):za(this,this._columnsUserState?Qr(this,this._columnsUserState):this._columns),KF(this),this._dataSourceApplied?this.applyDataSource(this._dataSource,!0,e):Jr(this),this._checkColumns()}_getExpandColumnOptions(){return{type:"expand",command:"expand",width:"auto",cssClass:TF,allowEditing:!1,allowGrouping:!1,allowSorting:!1,allowResizing:!1,allowReordering:!1,allowHiding:!1}}_getFirstItems(e){let t,n=[],o=function(s,r){if(!s||!r)return s;for(let a=0;a<s.length;a++){let l=o(s[a].items||s[a].collapsedItems,r-1);if(l&&l.length)return l}};return e&&e.items().length>0&&(t=R.normalizeSortingInfo(e.group()).length,n=o(e.items(),t)||[]),n}_endUpdateCore(){!this._skipProcessingColumnsChange&&hd(this)}callbackNames(){return["columnsChanged"]}getColumnByPath(e,t){let n=this,o,s=[];return e.replace(am,(r,a)=>(s.push(parseInt(a)),"")),s.length&&(t?o=s.reduce((r,a)=>r&&r.columns&&r.columns[a],{columns:t}):o=NF(n,s)),o}optionChanged(e){let t;switch(e.name){case"adaptColumnWidthByRatio":e.handled=!0;break;case"dataSource":e.value!==e.previousValue&&!this.option("columns")&&(!Array.isArray(e.value)||!Array.isArray(e.previousValue))&&(this._columns=[]);break;case"columns":t=this._skipProcessingColumnsChange,e.handled=!0,this._skipProcessingColumnsChange||(e.name===e.fullName?(this._columnsUserState=null,this._ignoreColumnOptionNames=null,this.init()):(this._columnOptionChanged(e),t=!0)),t&&this._updateRequireResize(e);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":{e.handled=!0;let n=e.fullName==="columnWidth"&&["width"];this.reinit(n);break}case"rtlEnabled":this.reinit();break;default:super.optionChanged(e)}}_columnOptionChanged(e){let t={},n=this.getColumnByPath(e.fullName),o=e.fullName.replace(am,"");n&&(o?t[o]=e.value:t=e.value,this._skipProcessingColumnsChange=e.fullName,this.columnOption(n.index,t),this._skipProcessingColumnsChange=!1)}_updateRequireResize(e){let{component:t}=this;e.fullName.replace(am,"")==="width"&&t._updateLockCount&&(t._requireResize=!0)}publicMethods(){return["addColumn","deleteColumn","columnOption","columnCount","clearSorting","clearGrouping","getVisibleColumns","getVisibleColumnIndex"]}applyDataSource(e,t,n){let o=this,s=e&&e.isLoaded();if(o._dataSource=e,!o._dataSourceApplied||o._dataSourceColumnsCount===0||t||o.option("regenerateColumnsByVisibleItems")){if(s){if(!o._isColumnsFromOptions){let r=WF(o,e);r.length&&(za(o,r),o._dataSourceColumnsCount=o._columns.length,py(o))}return o.updateColumns(e,t,n)}o._dataSourceApplied=!1,Jr(o)}else if(s&&!o.isAllDataTypesDefined(!0)&&o.updateColumnDataTypes(e))return zo(o,"columns"),hd(o),new y().reject().promise()}reset(){this._dataSource=null,this._dataSourceApplied=!1,this._dataSourceColumnsCount=void 0,this.reinit()}resetColumnsCache(){this._visibleColumns=void 0,this._fixedColumns=void 0,this._rowCount=void 0,vy(this)}reinit(e){this._columnsUserState=this.getUserState(),this._ignoreColumnOptionNames=e||null,this.init(),e&&(this._ignoreColumnOptionNames=null)}isInitialized(){return!!this._columns.length||!!this.option("columns")}isDataSourceApplied(){return this._dataSourceApplied}getCommonSettings(e){let t=(!e||!e.type)&&this.option("commonColumnSettings")||{},n=this.option("grouping")??{},o=this.option("groupPanel")??{};return m({allowFixing:this.option("columnFixing.enabled"),allowResizing:this.option("allowColumnResizing")||void 0,allowReordering:this.option("allowColumnReordering"),minWidth:this.option("columnMinWidth"),width:this.option("columnWidth"),autoExpandGroup:n.autoExpandAll,allowCollapsing:n.allowCollapsing,allowGrouping:o.allowColumnDragging&&o.visible||n.contextMenuEnabled},t)}isColumnOptionUsed(e){for(let t=0;t<this._columns.length;t++)if(this._columns[t][e])return!0}isAllDataTypesDefined(e){let t=this._columns;if(!t.length)return!1;for(let n=0;n<t.length;n++)if(!(!t[n].dataField&&t[n].calculateCellValue===t[n].defaultCalculateCellValue)&&(!t[n].dataType||e&&t[n].deserializeValue&&t[n].serializationFormat===void 0))return!1;return!0}getColumns(){return this._columns}isBandColumnsUsed(){return this.getColumns().some(e=>e.isBand)}getGroupColumns(){let e=[];return x(this._columns,function(){let t=this;f(t.groupIndex)&&(e[t.groupIndex]=t)}),e}_shouldReturnVisibleColumns(){return!0}_compileVisibleColumns(e){return this._visibleColumns=this._visibleColumns||this._compileVisibleColumnsCore(),e=f(e)?e:this._visibleColumns.length-1,this._visibleColumns[e]||[]}getVisibleColumns(e,t){return this._shouldReturnVisibleColumns()?this._compileVisibleColumns.apply(this,arguments):[]}getFixedColumns(e){return this._fixedColumns=this._fixedColumns||this._getFixedColumnsCore(),e=f(e)?e:this._fixedColumns.length-1,this._fixedColumns[e]||[]}getFilteringColumns(){return this.getColumns().filter(e=>(e.dataField||e.name)&&(e.allowFiltering||e.allowHeaderFiltering)).map(e=>{let t=m(!0,{},e);return f(t.dataField)||(t.dataField=t.name),t.filterOperations=e.filterOperations!==e.defaultFilterOperations?t.filterOperations:null,t})}getColumnIndexOffset(){return 0}_getFixedColumnsCore(){let e=this,t=[],n=e.getRowCount(),o=e._isColumnFixing(),s={command:"transparent"},r=0,a,l,d;if(o)for(let c=0;c<=n;c++){a=0,d=null,l=null;let h=e.getVisibleColumns(c,!0);for(let p=0;p<h.length;p++){let g=h[p-1],C=h[p];C.fixed?g&&g.fixed&&my(e,g)!==my(e,C)?f(l)||(l=p):d=C.fixedPosition:(c===0&&(C.isBand&&C.colspan?r+=C.colspan:r++),a++,f(l)||(l=p))}if(c===0&&(a===0||a>=h.length))return[];f(l)||(l=d==="right"?0:h.length),t[c]=h.slice(0),s.colspan||(s.colspan=r),t[c].splice(l,a,s)}return t.map(c=>c.map(h=>{let p=I({},h);return p.headerId&&(p.headerId+="-fixed"),p}))}_isColumnFixing(){let e=this.option("columnFixing.enabled");return!e&&x(this._columns,(t,n)=>{if(n.fixed)return e=!0,!1}),e}_getExpandColumnsCore(){return this.getGroupColumns()}getExpandColumns(){let e=this._getExpandColumnsCore(),t,n=e.filter(a=>a.groupIndex===0)[0],o=n&&n.fixed,s=this._isColumnFixing(),r=this.option("rtlEnabled");return e.length&&(t=this.columnOption("command:expand")),e=qe(e,a=>m({},a,{visibleWidth:null,minWidth:null,cellTemplate:f(a.groupIndex)?null:a.cellTemplate,headerCellTemplate:null,fixed:!f(a.groupIndex)||!o?s:!0,fixedPosition:r?"right":"left"},t,{index:a.index,type:a.type||Cs})),e}getBandColumnsCache(){if(!this._bandColumnsCache){let e=this._columns,t={},n={},o=!0;e.forEach(s=>{let{ownerBand:r}=s,a=z(r)?r.index:r,l=e[a];s.hasColumns&&(o=!1),s.colspan&&(s.colspan=void 0),s.rowspan&&(s.rowspan=void 0),l?n[s.index]=l:a=-1,t[a]=t[a]||[],t[a].push(s)}),this._bandColumnsCache={isPlain:o,columnChildrenByIndex:t,columnParentByIndex:n}}return this._bandColumnsCache}_isColumnVisible(e){return e.visible&&this.isParentColumnVisible(e.index)}_isColumnInGroupPanel(e){return f(e.groupIndex)&&!e.showWhenGrouped}hasVisibleDataColumns(){return this._columns.some(t=>{let n=this._isColumnVisible(t),o=this._isColumnInGroupPanel(t),s=!!t.command;return n&&!o&&!s})}_compileVisibleColumnsCore(){let e=this.getBandColumnsCache(),t=Cy(this,this._columns,this._commandColumns,!0);$F(this,t,e);let n=this._getIndexedColumns(t),o=this._getVisibleColumnsFromIndexed(n);return!this.hasVisibleDataColumns()&&this._columns.length&&o[o.length-1].push({command:"empty"}),o}_getIndexedColumns(e){let t=this.option("rtlEnabled"),n=this.getRowCount(),o=YF(e.length),s=this.getBandColumnsCache(),r=[],a=[];for(let l=0;l<n;l+=1)a[l]=[{}],r[l]=[{},{},{}];return e.forEach(l=>{let{visibleIndex:d}=l,c,h=Zr(l.index,s.columnParentByIndex),p=this._isColumnVisible(l),g=this._isColumnInGroupPanel(l);if(p&&!g){let b=h.length;if(d<0)d=-d,c=a[b];else{var C,v;if(l.fixed=((C=h[0])===null||C===void 0?void 0:C.fixed)??l.fixed,l.fixedPosition=((v=h[0])===null||v===void 0?void 0:v.fixedPosition)??l.fixedPosition,l.fixed){let T=!!l.command&&!um(this,l),M=l.fixedPosition==="right";t&&!T&&(M=!M),c=M?r[b][2]:r[b][0]}else c=r[b][1]}if(h.length){d=_y(d,o);for(let T=h.length-1;T>=0;T-=1)d=_y(h[T].visibleIndex,o)+d}c[d]=c[d]||[],c[d].push(l)}}),{positiveIndexedColumns:r,negativeIndexedColumns:a}}_getVisibleColumnsFromIndexed(e){let{positiveIndexedColumns:t,negativeIndexedColumns:n}=e,o=[],s=this.getRowCount(),r=Cy(this,this.getExpandColumns(),this._columns),a=0,l=0;for(let d=0;d<s;d+=1){o.push([]),oc(n[d],(p,g)=>{o[d].unshift.apply(o[d],g)});let c=o[d].length;t[d].forEach(p=>{oc(p,(g,C)=>{o[d].push.apply(o[d],C)})}),l<=d&&(l+=fy.call(this,o[d],r,AF,c)),a<=d&&(a+=fy.call(this,o[d],r,Cs,c))}return o.push(gy(o)),o}getInvisibleColumns(e,t){let n=this,o=[],s;return e=e||n._columns,x(e,(r,a)=>{if(a.ownerBand===t){if(a.isBand){a.visible?s=n.getInvisibleColumns(n.getChildrenByBandColumn(a.index),a.index):s=n.getChildrenByBandColumn(a.index),s.length&&(o.push(a),o=o.concat(s));return}a.visible||o.push(a)}}),o}getChooserColumns(e){let n=(e?this.getColumns():this.getInvisibleColumns()).filter(s=>s.showInColumnChooser),o=this.option("columnChooser.sortOrder");return QF(n,o)}allowMoveColumn(e,t,n,o){let s=dm(this,e,n),r=this._columns[s];return r&&(r.allowReordering||r.allowGrouping||r.allowHiding)?n===o?n===Xr?!1:(e=z(e)?e.columnIndex:e,t=z(t)?t.columnIndex:t,e!==t&&e+1!==t):n===Yr&&o!==Xr||o===Yr?r&&r.allowGrouping:n===Xr||o===Xr?r&&r.allowHiding:!0:!1}moveColumn(e,t,n,o){let s=this,r={},a,l=dm(s,e,n),d=dm(s,t,o),c;if(l>=0){let h=s._columns[l];if(t=z(t)?t.columnIndex:t,c=d>=0?s._columns[d].groupIndex:-1,f(h.groupIndex)&&n===Yr&&(c>h.groupIndex&&c--,o!==Yr?r.groupIndex=void 0:(a=h.groupIndex,delete h.groupIndex,uy(s))),o===Yr)r.groupIndex=jF(s,h,c),h.groupIndex=a;else if(t>=0){let g=s._columns[d];!g||h.ownerBand!==g.ownerBand?r.visibleIndex=sy:xy(s,h)^xy(s,g)?r.visibleIndex=sy:r.visibleIndex=g.visibleIndex}let p=o!==Xr;h.visible!==p&&(r.visible=p),s.columnOption(h.index,r)}}changeSortOrder(e,t){let n=this,o={},s=n.option("sorting"),r=s&&s.mode,a=r==="single"||!t,l=r==="single"||r==="multiple",d=n._columns[e];l&&d&&d.allowSorting&&(a&&!f(d.groupIndex)&&x(n._columns,function(c){c!==e&&this.sortOrder&&(f(this.groupIndex)||delete this.sortOrder,delete this.sortIndex)}),bu(t)?d.sortOrder!==t&&(o.sortOrder=t):t==="none"?d.sortOrder&&(o.sortIndex=void 0,o.sortOrder=void 0):function(c){if(t==="ctrl"){if(!("sortOrder"in c&&"sortIndex"in c))return!1;o.sortOrder=void 0,o.sortIndex=void 0}else f(c.groupIndex)||f(c.sortIndex)?o.sortOrder=c.sortOrder==="desc"?"asc":"desc":o.sortOrder="asc";return!0}(d)),n.columnOption(d.index,o)}getSortDataSourceParameters(e){let t=[],n=[];return x(this._columns,function(){(this.dataField||this.selector||this.calculateCellValue)&&f(this.sortIndex)&&!f(this.groupIndex)&&(t[this.sortIndex]=this)}),x(t,function(){let o=this&&this.sortOrder;if(bu(o)){let s={selector:this.calculateSortValue||this.displayField||this.calculateDisplayValue||e&&this.selector||this.dataField||this.calculateCellValue,desc:this.sortOrder==="desc"};this.sortingMethod&&(s.compare=this.sortingMethod.bind(this)),n.push(s)}}),n.length>0?n:null}getGroupDataSourceParameters(e){let t=[];return x(this.getGroupColumns(),function(){let n=this.calculateGroupValue||this.displayField||this.calculateDisplayValue||e&&this.selector||this.dataField||this.calculateCellValue;if(n){let o={selector:n,desc:this.sortOrder==="desc",isExpanded:!!this.autoExpandGroup};this.sortingMethod&&(o.compare=this.sortingMethod.bind(this)),t.push(o)}}),t.length>0?t:null}refresh(e){let t=[];return x(this._columns,function(){let{lookup:n}=this;if(n&&!this.calculateDisplayValue){if(e&&n.valueMap)return;n.update&&t.push(n.update())}}),P.apply(u,t).done(Ou.bind(null,this))}_updateColumnOptions(e,t){var n,o;let s=this._reinitAfterLookupChanges&&((n=this._previousColumns)===null||n===void 0?void 0:n[t]);e.selector=e.selector??(l=>e.calculateCellValue(l)),e.selector.columnIndex=t,e.selector.originalCallback=s?((o=this._previousColumns[t].selector)===null||o===void 0?void 0:o.originalCallback)??e.selector:e.selector,x(["calculateSortValue","calculateGroupValue","calculateDisplayValue"],(l,d)=>{let c=e[d];if(A(c))if(c.originalCallback)e[d].context.column=e;else{let h={column:e};e[d]=function(p){return c.call(h.column,p)},e[d].originalCallback=c,e[d].columnIndex=t,e[d].context=h}}),B(e.calculateDisplayValue)&&(e.displayField=e.calculateDisplayValue,e.calculateDisplayValue=Ce(e.displayField)),e.calculateDisplayValue&&(e.displayValueMap=e.displayValueMap||{}),dy(e,e.dataType);let{lookup:r}=e;r&&dy(r,r.dataType);let a=r?r.dataType:e.dataType;a&&(e.alignment=e.alignment||zF(a,this.option("rtlEnabled")),e.format=e.format||R.getFormatByDataType(a),e.customizeText=e.customizeText||cy(a),e.defaultFilterOperations=e.defaultFilterOperations||!r&&RF[a]||[],f(e.filterOperations)||ry(e),e.defaultFilterOperation=e.filterOperations&&e.filterOperations[0]||"=",e.showEditorAlways=f(e.showEditorAlways)?e.showEditorAlways:a==="boolean"&&!e.cellTemplate&&!e.lookup)}updateColumnDataTypes(e){let t=this,n=t.option("dateSerializationFormat"),o=t._getFirstItems(e),s=!1;return x(t._columns,(r,a)=>{let l,d,c,h,p,{lookup:g}=a;if(R.isDateType(a.dataType)&&a.serializationFormat===void 0&&(a.serializationFormat=n),g&&R.isDateType(g.dataType)&&a.serializationFormat===void 0&&(g.serializationFormat=n),a.calculateCellValue&&o.length){if(!a.dataType||g&&!g.dataType){for(l=0;l<o.length;l++)d=a.calculateCellValue(o[l]),a.dataType||(p=lm(d),c=c||p,c&&p&&c!==p&&(c="string")),g&&!g.dataType&&(p=lm(R.getDisplayValue(a,d,o[l])),h=h||p,h&&p&&h!==p&&(h="string"));(c||h)&&(c&&(a.dataType=c),g&&h&&(g.dataType=h),s=!0)}if(a.serializationFormat===void 0||g&&g.serializationFormat===void 0)for(l=0;l<o.length;l++)d=a.calculateCellValue(o[l],!0),a.serializationFormat===void 0&&(a.serializationFormat=ly(a.dataType,d)),g&&g.serializationFormat===void 0&&(g.serializationFormat=ly(g.dataType,g.calculateCellValue(d,!0)))}t._updateColumnOptions(a,r)}),s}_customizeColumns(e){let t=this,n=t.option("customizeColumns");n&&(e.some(s=>z(s.ownerBand))&&Jr(t),n(e),za(t,Qr(t,e)))}updateColumns(e,t,n){if(t||this.updateSortingGrouping(e),!e||e.isLoaded()){let o=e?e.sort()||[]:this.getSortDataSourceParameters(),s=e?e.group()||[]:this.getGroupDataSourceParameters(),r=e?.lastLoadOptions().filter;n||this._customizeColumns(this._columns),Jr(this);let a=this._columns;return P(this.refresh(!0)).always(()=>{this._columns===a&&(this._updateChanges(e,{sorting:o,grouping:s,filtering:r}),hd(this))})}}_updateChanges(e,t){e&&(this.updateColumnDataTypes(e),this._dataSourceApplied=!0),R.equalSortParameters(t.sorting,this.getSortDataSourceParameters())||zo(this,"sorting"),R.equalSortParameters(t.grouping,this.getGroupDataSourceParameters())||zo(this,"grouping"),this._dataController&&!R.equalFilterParameters(t.filtering,this._dataController.getCombinedFilter())&&zo(this,"filtering"),zo(this,"columns")}updateSortingGrouping(e,t){let n=this,o,s=function(a,l,d){x(a,(c,h)=>{if(delete h[d],l)for(let p=0;p<l.length;p++){let{selector:g}=l[p],{isExpanded:C}=l[p];if(g===h.dataField||g===h.name||g===h.displayField||g===h.selector||g===h.calculateCellValue||g===h.calculateGroupValue||g===h.calculateDisplayValue){t?h.sortOrder="sortOrder"in h?h.sortOrder:l[p].desc?"desc":"asc":h.sortOrder=h.sortOrder||(l[p].desc?"desc":"asc"),C!==void 0&&(h.autoExpandGroup=C),h[d]=p;break}}})};if(e){var r;let a=R.normalizeSortingInfo(e.sort()),l=R.normalizeSortingInfo(e.group()),d=n.getGroupDataSourceParameters(),c=n.getSortDataSourceParameters(),h=(r=this._columnChanges)===null||r===void 0?void 0:r.changeTypes,p=!R.equalSortParameters(a,c),g=t&&!(h!=null&&h.sorting),C=t&&!(h!=null&&h.grouping),v=!R.equalSortParameters(l,d,!0),b=!v&&!R.equalSortParameters(l,d);n._columns.length||(x(l,(T,M)=>{n._columns.push(M.selector)}),x(a,(T,M)=>{A(M.selector)||n._columns.push(M.selector)}),za(n,Qr(n,n._columns))),(C||!d&&!n._hasUserState)&&(v||b)&&(s(n._columns,l,"groupIndex"),t&&(v&&zo(n,"grouping"),b&&zo(n,"groupExpanding"),o=!0)),(g||!c&&!n._hasUserState)&&p&&(s(n._columns,a,"sortIndex"),t&&(zo(n,"sorting"),o=!0)),o&&hd(n)}}updateFilter(e,t,n,o){let s=this;if(!Array.isArray(e))return e;if(e=m([],e),n=e.columnIndex!==void 0?e.columnIndex:n,o=e.filterValue!==void 0?e.filterValue:o,B(e[0])&&e[0]!=="!"){let r=s.columnOption(e[0]);t?xe().forceIsoDateParsing&&r&&r.serializeValue&&e.length>1&&(e[e.length-1]=r.serializeValue(e[e.length-1],"filter")):r&&r.selector&&(e[0]=r.selector,e[0].columnIndex=r.index)}else A(e[0])&&(e[0].columnIndex=n,e[0].filterValue=o,e[0].selectedFilterOperation=e.selectedFilterOperation);for(let r=0;r<e.length;r++)e[r]=s.updateFilter(e[r],t,n,o);return e}columnCount(){return this._columns?this._columns.length:0}columnOption(e,t,n,o){let s=this,r=s._columns.concat(s._commandColumns),a=by(r,e);if(a){if(arguments.length===1)return m({},a);if(B(t)){if(arguments.length===2)return cm(s,a,t);cm(s,a,t,n,o)}else z(t)&&x(t,(l,d)=>{cm(s,a,l,d,o)});hd(s)}}clearSorting(){let e=this,t=this.columnCount();e.beginUpdate();for(let n=0;n<t;n++)e.columnOption(n,"sortOrder",void 0),delete by(e._columns,n).sortOrder;e.endUpdate()}clearGrouping(){let e=this,t=this.columnCount();e.beginUpdate();for(let n=0;n<t;n++)e.columnOption(n,"groupIndex",void 0);e.endUpdate()}getVisibleIndex(e,t){let n=this.getVisibleColumns(t);for(let o=n.length-1;o>=0;o--)if(n[o].index===e)return o;return-1}getVisibleIndexByColumn(e,t){let n=this.getVisibleColumns(t),o=n.filter(s=>s.index===e.index&&s.command===e.command)[0];return n.indexOf(o)}getVisibleColumnIndex(e,t){let n=this.columnOption(e,"index");return this.getVisibleIndex(n,t)}addColumn(e){let t=this,n=yu(t,e),o=t._columns.length;t._columns.push(n),n.isBand&&(t._columns=Qr(t,t._columns),n=t._columns[o]),n.added=e,Jr(t,n),t.updateColumns(t._dataSource),t._checkColumns()}deleteColumn(e){let t=this,n=t.columnOption(e);if(n&&n.index>=0){if(XF(t._columns),t._columns.splice(n.index,1),n.isBand){let o=t.getChildrenByBandColumn(n.index).map(s=>s.index);t._columns=t._columns.filter(s=>o.indexOf(s.index)<0)}Jr(t),t.updateColumns(t._dataSource)}}addCommandColumn(e){let t=this._commandColumns.filter(n=>n.command===e.command)[0];t||(t=e,this._commandColumns.push(t))}getUserState(){let e=this._columns,t=[],n;function o(s,r){e[n][r]!==void 0&&(t[n][r]=e[n][r])}for(n=0;n<e.length;n++)t[n]={},x(ud,o);return t}setName(e){e.name=e.name||e.dataField||e.type}setUserState(e){let t=this,n=t._dataSource,o=t.option("stateStoring.ignoreColumnOptionNames");if(e?.forEach(this.setName),!o){o=[];let s=t.getCommonSettings();t.option("columnChooser.enabled")||o.push("visible"),t.option("sorting.mode")==="none"&&o.push("sortIndex","sortOrder"),s.allowGrouping||o.push("groupIndex"),s.allowFixing||o.push("fixed","fixedPosition"),s.allowResizing||o.push("width","visibleWidth");let r=!t.option("filterPanel.visible");!t.option("filterRow.visible")&&r&&o.push("filterValue","selectedFilterOperation"),!t.option("headerFilter.visible")&&r&&o.push("filterValues","filterType")}t._columnsUserState=e,t._ignoreColumnOptionNames=o,t._hasUserState=!!e,zo(t,"filtering"),t.init(!0),n&&(n.sort(t.getSortDataSourceParameters()),n.group(t.getGroupDataSourceParameters()))}_checkColumns(){let e={},t=!1,n=[];this._columns.forEach(o=>{var s;let{name:r}=o,a=(s=o.columns)===null||s===void 0?void 0:s.length,l=o.allowEditing&&(o.dataField||o.setCellValue)&&!a;r?(e[r]&&n.push(`"${r}"`),e[r]=!0):l&&(t=!0)}),n.length&&ie.log("E1059",n.join(", ")),t&&ie.log("E1060")}_createCalculatedColumnOptions(e,t){let n={},{dataField:o}=e;if((Array.isArray(e.columns)&&e.columns.length||e.isBand)&&(n.isBand=!0,o=null),o){if(B(o)){let s=Ce(o);n={caption:to(o),calculateCellValue(r,a){let l=s(r);return this.deserializeValue&&!a?this.deserializeValue(l):l},setCellValue:UF,parseValue(r){let a=this,l,d;return a.dataType==="number"?B(r)&&a.format?l=ZF(r.trim(),a.format):f(r)&&Oe(r)&&(l=Number(r)):a.dataType==="boolean"?r===a.trueText?l=!0:r===a.falseText&&(l=!1):R.isDateType(a.dataType)?(d=he.parse(r,a.format),d&&(l=d)):l=r,l}}}n.allowFiltering=!0}else n.allowFiltering=!!e.calculateFilterExpression;return n.calculateFilterExpression=function(){return vo.defaultCalculateFilterExpression.apply(this,arguments)},n.defaultFilterOperation="=",n.createFilterExpression=function(s,r){let a;return this.calculateFilterExpression&&(a=this.calculateFilterExpression.apply(this,arguments)),A(a)&&(a=[a,"=",!0]),a&&(a.columnIndex=this.index,a.filterValue=s,a.selectedFilterOperation=r),a},(!o||!B(o))&&m(!0,n,{allowSorting:!1,allowGrouping:!1,calculateCellValue:()=>null}),t&&(n.allowFixing=!1),e.dataType&&(n.userDataType=e.dataType),e.selectedFilterOperation&&!("defaultSelectedFilterOperation"in n)&&(n.defaultSelectedFilterOperation=e.selectedFilterOperation),e.lookup&&(n.lookup={calculateCellValue(s,r){return this.valueExpr&&(s=this.valueMap&&this.valueMap[s]),this.deserializeValue&&!r?this.deserializeValue(s):s},updateValueMap(){if(this.valueMap={},this.items){let s=Ce(this.valueExpr),r=Ce(this.displayExpr);for(let a=0;a<this.items.length;a++){let l=this.items[a],d=r(l);this.valueMap[s(l)]=d,this.dataType=this.dataType||lm(d)}}},update(){let s=this,{dataSource:r}=s;if(r)if(A(r)&&!Nt.isWrapped(r)&&(r=r({})),X(r)||r instanceof Hs||Array.isArray(r)){if(s.valueExpr){let a=gn(r);return a.paginate=!1,r=new gi(a),r.load().done(l=>{s.items=l,s.updateValueMap&&s.updateValueMap()})}}else ie.log("E1016");else s.updateValueMap&&s.updateValueMap()}}),n.resizedCallbacks=ge(),e.resized&&n.resizedCallbacks.add(e.resized.bind(e)),x(n,s=>{if(A(n[s])&&s.indexOf("default")!==0){let r=`default${s.charAt(0).toUpperCase()}${s.substr(1)}`;n[r]=n[s]}}),n}getRowCount(){return this._rowCount=this._rowCount||qF(this),this._rowCount}getRowIndex(e,t){let n=this._columns[e],o=this.getBandColumnsCache();return n&&(t||n.visible&&!(n.command||f(n.groupIndex)))?Zr(e,o.columnParentByIndex).length:0}getChildrenByBandColumn(e,t){let n=this.getBandColumnsCache(),o=ay(e,n.columnChildrenByIndex,!t);return t?o.filter(s=>s.visible&&!s.command).sort((s,r)=>s.visibleIndex-r.visibleIndex):o}isParentBandColumn(e,t){let n=!1,o=this._columns[e],s=this.getBandColumnsCache(),r=o&&Zr(e,s.columnParentByIndex);return r&&x(r,(a,l)=>{if(l.index===t)return n=!0,!1}),n}isParentColumnVisible(e){let t=!0,n=this.getBandColumnsCache(),o=e>=0&&Zr(e,n.columnParentByIndex);return o&&x(o,(s,r)=>(t=t&&r.visible,t)),t}getColumnId(e){return e.command&&e.type===Cs?um(this,e)?`type:${e.type}`:`command:${e.command}`:e.index}getCustomizeTextByDataType(e){return cy(e)}getHeaderContentAlignment(e){return this.option("rtlEnabled")?e==="left"?"right":"left":e}},Oy={defaultOptions:()=>({commonColumnSettings:{allowFiltering:!0,allowHiding:!0,allowSorting:!0,allowEditing:!0,encodeHtml:!0,trueText:O.format("dxDataGrid-trueText"),falseText:O.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:yy}};$.registerModule("columns",{defaultOptions:()=>m(!0,{},Oy.defaultOptions(),{commonColumnSettings:{allowExporting:!0}}),controllers:Oy.controllers});var JF="_dataSourceChangedHandler";var eP="_getSpecificDataSourceOption",tP="_normalizeDataSource",iP=i=>class extends i{postCtor(){this.on("disposing",()=>{this._disposeDataSource()})}_refreshDataSource(){this._initDataSource(),this._loadDataSource()}_initDataSource(){let e=eP in this?this[eP]():this.option("dataSource"),t,n;this._disposeDataSource(),e&&(e instanceof gi?(this._isSharedDataSource=!0,this._dataSource=e):(t="_dataSourceOptions"in this?this._dataSourceOptions():{},n=this._dataSourceType?this._dataSourceType():gi,e=gn(e,{fromUrlLoadMode:"_dataSourceFromUrlLoadMode"in this&&this._dataSourceFromUrlLoadMode()}),this._dataSource=new n(m(!0,{},t,e))),tP in this&&(this._dataSource=this[tP](this._dataSource)),this._addDataSourceHandlers(),this._initDataController())}_initDataController(){var e;let t=(e=this.option)===null||e===void 0?void 0:e.call(this,"_dataController"),n=this._dataSource;t?this._dataController=t:this._dataController=new mg(n)}_addDataSourceHandlers(){JF in this&&this._addDataSourceChangeHandler(),"_dataSourceLoadErrorHandler"in this&&this._addDataSourceLoadErrorHandler(),"_dataSourceLoadingChangedHandler"in this&&this._addDataSourceLoadingChangedHandler(),this._addReadyWatcher()}_addReadyWatcher(){this.readyWatcher=function(e){this._ready&&this._ready(!e)}.bind(this),this._dataSource.on("loadingChanged",this.readyWatcher)}_addDataSourceChangeHandler(){let e=this._dataSource;this._proxiedDataSourceChangedHandler=function(t){this[JF](e.items(),t)}.bind(this),e.on("changed",this._proxiedDataSourceChangedHandler)}_addDataSourceLoadErrorHandler(){this._proxiedDataSourceLoadErrorHandler=this._dataSourceLoadErrorHandler.bind(this),this._dataSource.on("loadError",this._proxiedDataSourceLoadErrorHandler)}_addDataSourceLoadingChangedHandler(){this._proxiedDataSourceLoadingChangedHandler=this._dataSourceLoadingChangedHandler.bind(this),this._dataSource.on("loadingChanged",this._proxiedDataSourceLoadingChangedHandler)}_loadDataSource(){let e=this._dataSource;e&&(e.isLoaded()?this._proxiedDataSourceChangedHandler&&this._proxiedDataSourceChangedHandler():e.load())}_loadSingle(e,t){return e=e==="this"?this._dataSource.key()||"this":e,this._dataSource.loadSingle(e,t)}_isLastPage(){return!this._dataSource||this._dataSource.isLastPage()||!this._dataSource._pageSize}_isDataSourceLoading(){return this._dataSource&&this._dataSource.isLoading()}_disposeDataSource(){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._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher)):this._dataSource.dispose(),delete this._dataSource,delete this._proxiedDataSourceChangedHandler,delete this._proxiedDataSourceLoadErrorHandler,delete this._proxiedDataSourceLoadingChangedHandler)}getDataSource(){return this._dataSource||null}};var nP=function(i,e,t){let n=i._dataSource;if(n){if(t!==void 0){if(i._getPagingOptionValue(e)!==t){e==="pageSize"&&n.pageIndex(0),n[e](t),i._skipProcessingPagingChange=!0,i.option(`paging.${e}`,t),i._skipProcessingPagingChange=!1;let s=n.pageIndex();return i._isPaging=e==="pageIndex",n[e==="pageIndex"?"load":"reload"]().done(()=>{i._isPaging=!1,i.pageChanged.fire(s)})}return y().resolve().promise()}return n[e]()}return e==="pageIndex"&&t!==void 0?y().resolve().promise():0},Eu=class extends iP(ye.Controller){init(){this._items=[],this._cachedProcessedItems=null,this._columnsController=this.getController("columns"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._editingController=this.getController("editing"),this._editorFactoryController=this.getController("editorFactory"),this._errorHandlingController=this.getController("errorHandling"),this._filterSyncController=this.getController("filterSync"),this._applyFilterController=this.getController("applyFilter"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._focusController=this.getController("focus"),this._headerFilterController=this.getController("headerFilter"),this._selectionController=this.getController("selection"),this._stateStoringController=this.getController("stateStoring"),this._validatingController=this.getController("validating"),this._isPaging=!1,this._currentOperationTypes=null,this._dataChangedHandler=e=>{this._currentOperationTypes=this._dataSource.operationTypes(),this._handleDataChanged(e),this._currentOperationTypes=null},this._columnsChangedHandler=this._handleColumnsChanged.bind(this),this._loadingChangedHandler=this._handleLoadingChanged.bind(this),this._loadErrorHandler=this._handleLoadError.bind(this),this._customizeStoreLoadOptionsHandler=this._handleCustomizeStoreLoadOptions.bind(this),this._changingHandler=this._handleChanging.bind(this),this._dataPushedHandler=this._handleDataPushed.bind(this),this._columnsController.columnsChanged.add(this._columnsChangedHandler),this._isLoading=!1,this._isCustomLoading=!1,this._repaintChangesOnly=void 0,this._changes=[],this.createAction("onDataErrorOccurred"),this.dataErrorOccurred.add(e=>this.executeAction("onDataErrorOccurred",{error:e})),this._refreshDataSource(),this.postCtor()}_getPagingOptionValue(e){return this._dataSource[e]()}callbackNames(){return["changed","loadingChanged","dataErrorOccurred","pageChanged","dataSourceChanged","pushed"]}callbackFlags(e){if(e==="dataErrorOccurred")return{stopOnFalse:!0}}publicMethods(){return["_disposeDataSource","beginCustomLoading","byKey","clearFilter","endCustomLoading","filter","getCombinedFilter","getDataByKeys","getDataSource","getKeyByRowIndex","getRowIndexByKey","getVisibleRows","keyOf","pageCount","pageIndex","pageSize","refresh","repaintRows","totalCount"]}reset(){this._columnsController.reset(),this._items=[],this._refreshDataSource()}_handleDataSourceChange(e){if(e.value===e.previousValue||this.option("columns")&&Array.isArray(e.value)&&Array.isArray(e.previousValue)){if(e.value!==e.previousValue){let n=this.store();n&&(n._array=e.value)}return this.needToRefreshOnDataSourceChange(e)&&this.refresh(this.option("repaintChangesOnly")),!0}return!1}needToRefreshOnDataSourceChange(e){return!0}optionChanged(e){let t=this,n,o;function s(){e.handled=!0}if(e.name==="dataSource"&&e.name===e.fullName&&this._handleDataSourceChange(e)){s();return}switch(e.name){case"cacheEnabled":case"repaintChangesOnly":case"highlightChanges":case"loadingTimeout":s();break;case"remoteOperations":case"keyExpr":case"dataSource":case"scrolling":s(),t.reset();break;case"paging":if(n=t.dataSource(),n&&(o=t._setPagingOptions(n),o)){let r=n.pageIndex();this._isPaging=o.isPageIndexChanged,n.load().done(()=>{this._isPaging=!1,t.pageChanged.fire(r)})}s();break;case"rtlEnabled":t.reset();break;case"columns":n=t.dataSource(),n&&n.isLoading()&&e.name===e.fullName&&(this._useSortingGroupingFromColumns=!0,n.load());break;default:super.optionChanged(e)}}isReady(){return!this._isLoading}getDataSource(){return this._dataSource&&this._dataSource._dataSource}getCombinedFilter(e){return this.combinedFilter(void 0,e)}combinedFilter(e,t){if(!this._dataSource)return e;let n=e??this._dataSource.filter();if(this._columnsController.isDataSourceApplied()||this._columnsController.isAllDataTypesDefined()){let r=this._calculateAdditionalFilter();n=r?R.combineFilters([r,n]):n}let s=this._dataSource.remoteOperations().filtering||t;return n=this._columnsController.updateFilter(n,s),n}waitReady(){return this._updateLockCount?(this._readyDeferred=new y,this._readyDeferred):P()}_endUpdateCore(){let e=this._changes;if(e.length){this._changes=[];let t=e.every(n=>n.repaintChangesOnly);this.updateItems(e.length===1?e[0]:{repaintChangesOnly:t})}this._readyDeferred&&(this._readyDeferred.resolve(),this._readyDeferred=null)}_handleCustomizeStoreLoadOptions(e){var t;let n=this._columnsController,o=this._dataSource,{storeLoadOptions:s}=e;e.isCustomLoading&&!s.isLoadingAll||(s.filter=this.combinedFilter(s.filter),((t=s.filter)===null||t===void 0?void 0:t.length)===1&&s.filter[0]==="!"&&(e.data=[],e.extra=e.extra||{},e.extra.totalCount=0),n.isDataSourceApplied()||n.updateColumnDataTypes(o),this._columnsUpdating=!0,n.updateSortingGrouping(o,!this._useSortingGroupingFromColumns),this._columnsUpdating=!1,s.sort=n.getSortDataSourceParameters(),s.group=n.getGroupDataSourceParameters(),o.sort(s.sort),o.group(s.group),s.sort=n.getSortDataSourceParameters(!o.remoteOperations().sorting),e.group=n.getGroupDataSourceParameters(!o.remoteOperations().grouping))}_handleColumnsChanged(e){let t=this,{changeTypes:n}=e,{optionNames:o}=e,s,r,a,l=function(d){var c;t._columnsController.columnsChanged.remove(l),t.updateItems({repaintChangesOnly:!1,virtualColumnsScrolling:d==null||(c=d.changeTypes)===null||c===void 0?void 0:c.virtualColumnsScrolling})};if(n.sorting||n.grouping)t._dataSource&&!t._columnsUpdating&&(t._dataSource.group(t._columnsController.getGroupDataSourceParameters()),t._dataSource.sort(t._columnsController.getSortDataSourceParameters()),t.reload());else if(n.columns&&(r=t._columnsController.columnOption(e.columnIndex,"filterValues"),(o.filterValues||o.filterType&&Array.isArray(r)||o.filterValue||o.selectedFilterOperation||o.allowFiltering)&&(s=t._columnsController.columnOption(e.columnIndex,"filterValue"),(Array.isArray(r)||e.columnIndex===void 0||f(s)||!o.selectedFilterOperation||o.filterValue)&&(t._applyFilter(),a=!0)),!t._needApplyFilter&&!R.checkChanges(o,["width","visibleWidth","filterValue","bufferedFilterValue","selectedFilterOperation","filterValues","filterType"])&&t._columnsController.columnsChanged.add(l),f(o.visible))){let d=t._columnsController.columnOption(e.columnIndex);d&&(f(d.filterValue)||f(d.filterValues))&&(t._applyFilter(),a=!0)}!a&&n.filtering&&!this._needApplyFilter&&t.reload()}_handleDataChanged(e){let t=this,n=t._dataSource,o=t._columnsController,s=!1;this._useSortingGroupingFromColumns=!1,n&&!t._isDataSourceApplying&&(t._isDataSourceApplying=!0,P(t._columnsController.applyDataSource(n)).done(()=>{t._isLoading&&t._handleLoadingChanged(!1),s&&e&&e.isDelayed&&(e.isDelayed=!1),t._isDataSourceApplying=!1;let r=t._needApplyFilter;t._needApplyFilter=!1,r&&!t._isAllDataTypesDefined&&(()=>{let a=t._calculateAdditionalFilter();return a&&a.length})()?(ie.log("W1005",t.component.NAME),t._applyFilter()):t.updateItems(e,!0)}).fail(()=>{t._isDataSourceApplying=!1}),t._isDataSourceApplying&&(s=!0,t._handleLoadingChanged(!0)),t._needApplyFilter=!t._columnsController.isDataSourceApplied(),t._isAllDataTypesDefined=o.isAllDataTypesDefined())}_handleLoadingChanged(e){this._isLoading=e,this._fireLoadingChanged()}_handleLoadError(e){this.dataErrorOccurred.fire(e)}_handleDataPushed(e){this.pushed.fire(e)}fireError(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.dataErrorOccurred.fire(ie.Error.apply(ie,t))}_setPagingOptions(e){let t=this.option("paging.pageIndex"),n=this.option("paging.pageSize"),o=this.option("paging.enabled"),s=this.option("scrolling.mode"),r=s==="infinite",l=o||s==="virtual"||r,d=!1,c=!1,h=!1;return e.requireTotalCount(!r),o!==void 0&&e.paginate()!==l&&(e.paginate(l),d=!0),n!==void 0&&e.pageSize()!==n&&(e.pageSize(n),c=!0),t!==void 0&&e.pageIndex()!==t&&(e.pageIndex(t),h=!0),d||c||h?{isPaginateChanged:d,isPageSizeChanged:c,isPageIndexChanged:h}:!1}_getSpecificDataSourceOption(){let e=this.option("dataSource");return Array.isArray(e)?{store:{type:"array",data:e,key:this.option("keyExpr")}}:e}_initDataSource(){let e=this,t=this._dataSource;super._initDataSource();let n=e._dataSource;if(e._useSortingGroupingFromColumns=!0,e._cachedProcessedItems=null,n){let o=e._setPagingOptions(n);this._isPaging=o?.isPageIndexChanged,e.setDataSource(n)}else t&&e.updateItems()}_loadDataSource(){let e=this,t=e._dataSource,n=new y;return P(this._columnsController.refresh(!0)).always(()=>{t?t.load().done(function(){e._isPaging=!1,n.resolve.apply(n,arguments)}).fail(n.reject):n.resolve()}),n.promise()}_beforeProcessItems(e){return e.slice(0)}getRowIndexDelta(){return 0}getDataIndex(e){let t=this._items,n=e.changeType==="append"&&t.length>0?t[t.length-1]:null;return f(n?.dataIndex)?n.dataIndex+1:0}_processItems(e,t){let n=this,o=n.getRowIndexDelta(),{changeType:s}=t,r=n._columnsController.getVisibleColumns(null,s==="loadingAll"),a=this.getDataIndex(t),l={visibleColumns:r,dataIndex:a},d=[];return x(e,(c,h)=>{f(h)&&(l.rowIndex=c-o,h=n._processItem(h,l),d.push(h))}),d}_processItem(e,t){return e=this._generateDataItem(e,t),e=this._processDataItem(e,t),e.dataIndex=t.dataIndex++,e}_generateDataItem(e,t){return{rowType:"data",data:e,key:this.keyOf(e)}}_processDataItem(e,t){return e.values=this.generateDataValues(e.data,t.visibleColumns),e}generateDataValues(e,t,n){let o=[],s;for(let r=0;r<t.length;r++){let a=t[r];s=n?void 0:null,a.command||(a.calculateCellValue?s=a.calculateCellValue(e):a.dataField&&(s=e[a.dataField])),o.push(s)}return o}_applyChange(e){let t=this;e.changeType==="update"?t._applyChangeUpdate(e):t.items().length&&e.repaintChangesOnly&&e.changeType==="refresh"?t._applyChangesOnly(e):e.changeType==="refresh"&&t._applyChangeFull(e)}_applyChangeFull(e){this._items=e.items.slice(0)}_getRowIndices(e){let t=e.rowIndices.slice(0),n=this.getRowIndexDelta();t.sort((o,s)=>o-s);for(let o=0;o<t.length;o++){let s=t[o];e.allowInvisibleRowIndices&&(s+=n),s<0&&(t.splice(o,1),o--)}return t}_applyChangeUpdate(e){let t=this,{items:n}=e,o=t._getRowIndices(e),s=t.getRowIndexDelta(),r=t.option("repaintChangesOnly"),a=-1,l=0,d;e.items=[],e.rowIndices=[],e.columnIndices=[],e.changeTypes=[];let c=function(h,p,g){let C=h&&p&&Ee(h.key,p.key);return C&&g&&(C=h.rowType===p.rowType&&(p.rowType!=="detail"||h.isEditing===p.isEditing)),C};x(o,(h,p)=>{let g;if(p+=l+s,a===p)return;a=p;let C=t._items[p],v=t._items[p+1],b=n[p],T=n[p+1],M=c(C,v)||c(b,T);if(b&&(b.rowIndex=p,e.items.push(b)),C&&b&&c(C,b,M))d="update",t._items[p]=b,C.visible!==b.visible?e.items.splice(-1,1,{visible:b.visible}):r&&!e.isFullUpdate&&(g=t._partialUpdateRow(C,b,p-s));else if(b&&!C||T&&c(C,T,M))d="insert",t._items.splice(p,0,b),l++;else if(C&&!b||v&&c(b,v,M))d="remove",t._items.splice(p,1),l--,a=-1;else if(b)d="update",t._items[p]=b;else return;e.rowIndices.push(p-s),e.changeTypes.push(d),e.columnIndices.push(g)})}_isCellChanged(e,t,n,o,s){if(JSON.stringify(e.values[o])!==JSON.stringify(t.values[o]))return!0;function r(a,l){return a.modifiedValues?a.modifiedValues[l]!==void 0:!1}return r(e,o)!==r(t,o)}_getChangedColumnIndices(e,t,n,o){let s;if(e.rowType===t.rowType){if(t.rowType!=="group"&&t.rowType!=="groupFooter"&&(s=[],t.rowType!=="detail"))for(let r=0;r<e.values.length;r++)this._isCellChanged(e,t,n,r,o)&&s.push(r);t.rowType==="group"&&e.cells&&t.isExpanded===e.isExpanded&&t.data.isContinuation===e.data.isContinuation&&t.data.isContinuationOnNextPage===e.data.isContinuationOnNextPage&&(s=e.cells.map((a,l)=>{var d;return((d=a.column)===null||d===void 0?void 0:d.type)!=="groupExpand"?l:-1}).filter(a=>a>=0))}return s}_partialUpdateRow(e,t,n,o){var s;let r=this._getChangedColumnIndices(e,t,n,o);return(s=r)!==null&&s!==void 0&&s.length&&this.option("dataRowTemplate")&&(r=void 0),r&&(e.cells&&e.cells.forEach((a,l)=>{!(r.indexOf(l)>=0)&&a&&a.update&&a.update(t)}),t.update=e.update,t.watch=e.watch,t.cells=e.cells,o&&(t.oldValues=e.values),e.update&&e.update(t)),r}_isItemEquals(e,t){if(JSON.stringify(e.values)!==JSON.stringify(t.values)||["modified","isNewRow","removed","isEditing"].some(a=>e[a]!==t[a]))return!1;if(e.rowType==="group"||e.rowType==="groupFooter"){var n,o,s,r;let a=e.isExpanded===t.isExpanded,l=JSON.stringify(e.summaryCells)===JSON.stringify(t.summaryCells),d=((n=e.data)===null||n===void 0?void 0:n.isContinuation)===((o=t.data)===null||o===void 0?void 0:o.isContinuation)&&((s=e.data)===null||s===void 0?void 0:s.isContinuationOnNextPage)===((r=t.data)===null||r===void 0?void 0:r.isContinuationOnNextPage);if(!a||!l||!d)return!1}return!0}_applyChangesOnly(e){let t=[],n=[],o=[],s=[],r={},a=e?.isLiveUpdate??!0;function l(p){if(p)return`${p.rowType},${JSON.stringify(p.key)}`}let d=this._items,c=d.slice();e.items.forEach((p,g)=>{let C=l(p);r[C]=g,p.rowIndex=g});let h=pg(c,e.items,l,(p,g)=>this._isItemEquals(p,g)?(p.cells&&(p.update&&p.update(g),p.cells.forEach(C=>{C&&C.update&&C.update(g,!0)})),!0):!1);if(!h){this._applyChangeFull(e);return}h.forEach(p=>{switch(p.type){case"update":{let{index:g}=p,C=p.data,{oldItem:v}=p,b=this._partialUpdateRow(v,C,g,a);t.push(g),o.push("update"),s.push(C),d[g]=C,n.push(b);break}case"insert":t.push(p.index),o.push("insert"),s.push(p.data),n.push(void 0),d.splice(p.index,0,p.data);break;case"remove":t.push(p.index),o.push("remove"),d.splice(p.index,1),s.push(p.oldItem),n.push(void 0)}}),e.repaintChangesOnly=!0,e.changeType="update",e.rowIndices=t,e.columnIndices=n,e.changeTypes=o,e.items=s,c.length&&(e.isLiveUpdate=!0),this._correctRowIndices(p=>{let g=this._rowIndexOffset||0,C=this.getRowIndexOffset(),v=c[p-g],b=l(v),T=r[b];return T>=0?T+C-p:0})}_correctRowIndices(e){}_afterProcessItems(e,t){return e}_updateItemsCore(e){let t,n=this._dataSource,o=e.changeType||"refresh";if(e.changeType=o,n){let s=this._cachedProcessedItems;e.useProcessedItemsCache&&s?t=s:(t=e.items||n.items(),t=this._beforeProcessItems(t),t=this._processItems(t,e),this._cachedProcessedItems=t),t=this._afterProcessItems(t,e),e.items=t;let r=this._items.length===t.length&&this._items;this._applyChange(e);let a=this.getRowIndexDelta();x(this._items,(l,d)=>{d.rowIndex=l-a,r&&(d.cells=r[l].cells??[]);let c=t[l];c&&(d.loadIndex=c.loadIndex)}),this._rowIndexOffset=this.getRowIndexOffset()}else this._items=[]}_handleChanging(e){let t=this.getVisibleRows();this.dataSource()&&e.changes.forEach(o=>{if(o.type==="insert"&&o.index>=0){let s=0;for(let r=0;r<o.index;r++){let a=t[r];a&&(a.rowType==="data"||a.rowType==="group")&&s++}o.index=s}})}updateItems(e,t){e=e||{};let n=this;if(n._repaintChangesOnly!==void 0)e.repaintChangesOnly=e.repaintChangesOnly??n._repaintChangesOnly,e.needUpdateDimensions=e.needUpdateDimensions||n._needUpdateDimensions;else if(e.changes)e.repaintChangesOnly=n.option("repaintChangesOnly");else if(t){let o=n.dataSource().operationTypes();e.repaintChangesOnly=o&&!o.grouping&&!o.filtering&&n.option("repaintChangesOnly"),e.isDataChanged=!0,o&&(o.reload||o.paging||o.groupExpanding)&&(e.needUpdateDimensions=!0)}if(n._updateLockCount&&!e.cancel){n._changes.push(e);return}n._updateItemsCore(e),!e.cancel&&n._fireChanged(e)}loadingOperationTypes(){let e=this.dataSource();return e&&e.loadingOperationTypes()||{}}_fireChanged(e){this._currentOperationTypes&&(e.operationTypes=this._currentOperationTypes,this._currentOperationTypes=null),pt(()=>{this.changed.fire(e)})}isLoading(){return this._isLoading||this._isCustomLoading}_fireLoadingChanged(){this.loadingChanged.fire(this.isLoading(),this._loadingText)}_calculateAdditionalFilter(){return null}_applyFilter(){let e=this._dataSource;return e?(e.pageIndex(0),this._isFilterApplying=!0,this.reload().done(()=>{this._isFilterApplying&&this.pageChanged.fire()})):new y().resolve()}resetFilterApplying(){this._isFilterApplying=!1}filter(e){let t=this._dataSource,n=t&&t.filter();if(arguments.length===0)return n;e=arguments.length>1?Array.prototype.slice.call(arguments,0):e,!R.equalFilterParameters(n,e)&&(t&&t.filter(e),this._applyFilter())}clearFilter(e){let t=this,n=t._columnsController,o=function(s){let r=n.columnCount();for(let a=0;a<r;a++)n.columnOption(a,s,void 0)};if(t.component.beginUpdate(),arguments.length>0)switch(e){case"dataSource":t.filter(null);break;case"search":t.searchByText("");break;case"header":o("filterValues");break;case"row":o("filterValue")}else t.filter(null),t.searchByText(""),o("filterValue"),o("bufferedFilterValue"),o("filterValues");t.component.endUpdate()}_fireDataSourceChanged(){let e=this,t=function(){e.changed.remove(t),e.dataSourceChanged.fire()};e.changed.add(t)}_getDataSourceAdapter(){}_createDataSourceAdapterCore(e,t){let o=this._getDataSourceAdapter().create(this.component);return o.init(e,t),o}isLocalStore(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.store())instanceof hs}isCustomStore(e){return e=e||this.store(),e instanceof va}_createDataSourceAdapter(e){let t=this.option("remoteOperations"),n=e.store(),o={filtering:!0,sorting:!0,paging:!0,grouping:!0,summary:!0};return z(t)&&t.groupPaging&&(t=m({},o,t)),t==="auto"&&(t=this.isLocalStore(n)||this.isCustomStore(n)?{}:{filtering:!0,sorting:!0,paging:!0}),t===!0&&(t=o),this._createDataSourceAdapterCore(e,t)}setDataSource(e){let t=this,n=t._dataSource;!e&&n&&(n.cancelAll(),n.changed.remove(t._dataChangedHandler),n.loadingChanged.remove(t._loadingChangedHandler),n.loadError.remove(t._loadErrorHandler),n.customizeStoreLoadOptions.remove(t._customizeStoreLoadOptionsHandler),n.changing.remove(t._changingHandler),n.pushed.remove(t._dataPushedHandler),n.dispose(t._isSharedDataSource)),e&&(e=t._createDataSourceAdapter(e)),t._dataSource=e,e&&(t._fireDataSourceChanged(),t._isLoading=!e.isLoaded(),t._needApplyFilter=!0,t._isAllDataTypesDefined=t._columnsController.isAllDataTypesDefined(),e.changed.add(t._dataChangedHandler),e.loadingChanged.add(t._loadingChangedHandler),e.loadError.add(t._loadErrorHandler),e.customizeStoreLoadOptions.add(t._customizeStoreLoadOptionsHandler),e.changing.add(t._changingHandler),e.pushed.add(t._dataPushedHandler))}items(e){return this._items}isEmpty(){return!this.items().length}pageCount(){return this._dataSource?this._dataSource.pageCount():1}dataSource(){return this._dataSource}store(){let e=this._dataSource;return e&&e.store()}loadAll(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this,o=new y,s=n._dataSource;if(s)if(e){let r={data:e,isCustomLoading:!0,storeLoadOptions:{isLoadingAll:!0},loadOptions:{filter:t?null:n.getCombinedFilter(),group:s.group(),sort:s.sort()}};s._handleDataLoaded(r),P(r.data).done(a=>{var l;a=n._beforeProcessItems(a),o.resolve(n._processItems(a,{changeType:"loadingAll"}),(l=r.extra)===null||l===void 0?void 0:l.summary)}).fail(o.reject)}else if(s.isLoading())o.reject();else{let r=m({},s.loadOptions(),{isLoadingAll:!0,requireTotalCount:!1});s.load(r).done((a,l)=>{a=n._beforeProcessItems(a),a=n._processItems(a,{changeType:"loadingAll"}),o.resolve(a,l&&l.summary)}).fail(o.reject)}else o.resolve([]);return o}getKeyByRowIndex(e,t){let n=this.items(t)[e];if(n)return n.key}getRowIndexByKey(e,t){return R.getIndexByKey(e,this.items(t))}keyOf(e){let t=this.store();if(t)return t.keyOf(e)}byKey(e){let t=this.store(),n=this.getRowIndexByKey(e),o;if(t)return n>=0&&(o=new y().resolve(this.items()[n].data)),o||t.byKey(e)}key(){let e=this.store();if(e)return e.key()}getRowIndexOffset(e){return 0}getDataByKeys(e){let t=this,n=new y,o=[],s=[];return x(e,(r,a)=>{o.push(t.byKey(a).done(l=>{s[r]=l}))}),P.apply(u,o).always(()=>{n.resolve(s)}),n}pageIndex(e){return nP(this,"pageIndex",e)}pageSize(e){return nP(this,"pageSize",e)}beginCustomLoading(e){this._isCustomLoading=!0,this._loadingText=e||"",this._fireLoadingChanged()}endCustomLoading(){this._isCustomLoading=!1,this._loadingText=void 0,this._fireLoadingChanged()}refresh(e){e===!0?e={reload:!0,changesOnly:!0}:e||(e={lookup:!0,selection:!0,reload:!0});let t=this,n=t.getDataSource(),{changesOnly:o}=e,s=new y,r=function(){t._repaintChangesOnly=!!o};return P(!e.lookup||t._columnsController.refresh()).always(()=>{e.load||e.reload?(n&&n.on("customizeLoadResult",r),P(t.reload(e.reload,o)).always(()=>{n&&n.off("customizeLoadResult",r),t._repaintChangesOnly=void 0}).done(s.resolve).fail(s.reject)):(t.updateItems({repaintChangesOnly:e.changesOnly}),s.resolve())}),s.promise()}getVisibleRows(){return this.items()}_disposeDataSource(){this._dataSource&&this._dataSource._eventsStrategy&&this._dataSource._eventsStrategy.off("loadingChanged",this.readyWatcher),this.setDataSource(null)}dispose(){this._disposeDataSource(),super.dispose()}repaintRows(e,t){e=Array.isArray(e)?e:[e],(e.length>1||f(e[0]))&&this.updateItems({changeType:"update",rowIndices:e,isFullUpdate:!t})}skipProcessingPagingChange(e){return this._skipProcessingPagingChange&&(e==="paging.pageIndex"||e==="paging.pageSize")}getUserState(){return{searchText:this.option("searchPanel.text"),pageIndex:this.pageIndex(),pageSize:this.pageSize()}}getCachedStoreData(){return this._dataSource&&this._dataSource.getCachedStoreData()}isLastPageLoaded(){let e=this.pageIndex(),t=this.pageCount();return e===t-1}load(){var e;return(e=this._dataSource)===null||e===void 0?void 0:e.load()}reload(e,t){var n;return(n=this._dataSource)===null||n===void 0?void 0:n.reload(e,t)}push(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=this._dataSource)===null||e===void 0?void 0:e.push(...n)}itemsCount(){var e;return this._dataSource?(e=this._dataSource)===null||e===void 0?void 0:e.itemsCount():0}totalItemsCount(){var e;return this._dataSource?(e=this._dataSource)===null||e===void 0?void 0:e.totalItemsCount():0}hasKnownLastPage(){var e;return this._dataSource?(e=this._dataSource)===null||e===void 0?void 0:e.hasKnownLastPage():!0}isLoaded(){var e;return this._dataSource?(e=this._dataSource)===null||e===void 0?void 0:e.isLoaded():!0}totalCount(){var e;return this._dataSource?(e=this._dataSource)===null||e===void 0?void 0:e.totalCount():0}hasLoadOperation(){var e;let t=((e=this._dataSource)===null||e===void 0?void 0:e.operationTypes())??{};return Object.keys(t).some(n=>t[n])}},oP={defaultOptions:()=>({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:Eu}};var wu=function(i,e){if(i&&(i=i.slice(0),e))for(let t=0;t<i.length;t++)i[t]=m({key:i[t].key},i[t]),i[t].items=wu(i[t].items,e-1);return i},Ey=function(i,e,t){let n={reload:!0,fullReload:!0};return e&&(n={sorting:!R.equalSortParameters(i.sort,e.sort),grouping:!R.equalSortParameters(i.group,e.group,!0),groupExpanding:!R.equalSortParameters(i.group,e.group)||e.groupExpand,filtering:!R.equalFilterParameters(i.filter,e.filter),pageIndex:i.pageIndex!==e.pageIndex,skip:i.skip!==e.skip,take:i.take!==e.take,pageSize:i.pageSize!==e.pageSize,fullReload:t,reload:!1,paging:!1},n.reload=t||n.sorting||n.grouping||n.filtering,n.paging=n.pageIndex||n.pageSize||n.take),n},sP=function(i,e){f(e)?hl(i,e):i()},pd=function(){return{items:{}}},wy=function(i,e){let t=R.normalizeSortingInfo(i.group||i.storeLoadOptions.group||i.loadOptions.group).length,n=[];if(rP(n,i,t))return n;e&&rY(n,i,t)},rP=function(i,e,t,n){var o;let{storeLoadOptions:s}=e,r=e.take??s.take??0,a=(o=e.cachedData)===null||o===void 0?void 0:o.items;if(r&&a){let l=e.skip??s.skip??0;for(let d=0;d<r;d+=1){let c=n?r-1-d:d,h=c+l,p=a[h];if(p===void 0&&h in a)return!0;let g=sY(e,p,t,c,r);if(g)i.push(g);else return!1}return!0}return!1},sY=function(i,e,t,n,o){if(t&&e){let s=n===0&&i.skips||[],r=n===o-1&&i.takes||[];return aP(e,t,s,r)}return e},aP=function(i,e,t,n){if(e&&i){let o=I({},i),s=t[0]||0,r=n[0],{items:a}=i;if(a){if(r===void 0&&!a[s])return;o.items=[],t.length&&(o.isContinuation=!0),r&&(o.isContinuationOnNextPage=i.count>r);for(let l=0;r===void 0?a[l+s]:l<r;l+=1){let d=a[l+s],c=l+1===r,h=aP(d,e-1,l===0?t.slice(1):[],c?n.slice(1):[]);if(h!==void 0)o.items.push(h);else return}}return o}return i},rY=function(i,e,t){let n=i.length,{storeLoadOptions:o}=e;if(o.skip!==void 0&&o.take&&!t){let s=[];rP(s,e,t,!0);let r=s.length;(n||r)&&(e.skip=e.skip??o.skip,e.take=e.take??o.take),n&&(o.skip+=n,o.take-=n,e.cachedDataPartBegin=i),r&&(o.take-=r,e.cachedDataPartEnd=s.reverse())}},lP=function(i,e,t){let{storeLoadOptions:n}=i,o=i.skip??n.skip??0,s=i.take??n.take??0;for(let r=0;r<s;r+=1){let a=r+o,l=i.cachedData.items,d=r===0&&i.skips||[];l[a]=dP(l[a],e[r],t,d)}},dP=function(i,e,t,n){if(t&&e){let o=I({},e);delete o.isContinuation,delete o.isContinuationOnNextPage;let s=n[0]||0;return e.items&&(o.items=i?.items||{},e.items.forEach((r,a)=>{let l=a+s,d=a===0?n.slice(1):[];o.items[l]=dP(o.items[l],r,t-1,d)})),o}return e};var hm=class extends ye.Controller{init(e,t){let n=this;n._dataSource=e,n._remoteOperations=t||{},n._isLastPage=!e.isLastPage(),n._hasLastPage=!1,n._currentTotalCount=0,n._cachedData=pd(),n._lastOperationTypes={},n._eventsStrategy=e._eventsStrategy,n._totalCountCorrection=0,n._isLoadingAll=!1,n.changed=ge(),n.loadingChanged=ge(),n.loadError=ge(),n.customizeStoreLoadOptions=ge(),n.changing=ge(),n.pushed=ge(),n._dataChangedHandler=n._handleDataChanged.bind(n),n._customizeStoreLoadOptionsHandler=n._handleCustomizeStoreLoadOptions.bind(n),n._dataLoadedHandler=n._handleDataLoaded.bind(n),n._loadingChangedHandler=n._handleLoadingChanged.bind(n),n._loadErrorHandler=n._handleLoadError.bind(n),n._pushHandler=n._handlePush.bind(n),n._changingHandler=n._handleChanging.bind(n),e.on("changed",n._dataChangedHandler),e.on("customizeStoreLoadOptions",n._customizeStoreLoadOptionsHandler),e.on("customizeLoadResult",n._dataLoadedHandler),e.on("loadingChanged",n._loadingChangedHandler),e.on("loadError",n._loadErrorHandler),e.on("changing",n._changingHandler),e.store().on("beforePush",n._pushHandler),x(e,(o,s)=>{!n[o]&&A(s)&&(n[o]=function(){return this._dataSource[o].apply(this._dataSource,arguments)})})}dispose(e){let t=this._dataSource,n=t.store();t.off("changed",this._dataChangedHandler),t.off("customizeStoreLoadOptions",this._customizeStoreLoadOptionsHandler),t.off("customizeLoadResult",this._dataLoadedHandler),t.off("loadingChanged",this._loadingChangedHandler),t.off("loadError",this._loadErrorHandler),t.off("changing",this._changingHandler),n&&n.off("beforePush",this._pushHandler),e||t.dispose()}remoteOperations(){return this._remoteOperations}refresh(e,t){let n=this,o=n._dataSource;t.reload&&(n.resetCurrentTotalCount(),n._isLastPage=!o.paginate(),n._hasLastPage=n._isLastPage)}resetCurrentTotalCount(){this._currentTotalCount=0,this._totalCountCorrection=0}resetCache(){this._cachedStoreData=void 0,this._cachedPagingData=void 0}resetPagesCache(e){this._cachedData=pd()}_needClearStoreDataCache(){let e=this.remoteOperations(),t=Ey(this._lastLoadOptions||{},{});return!Object.keys(e).every(o=>!t[o]||!e[o])}push(e,t){let n=this.store();this._needClearStoreDataCache()&&(this._cachedStoreData=void 0),this._cachedPagingData=void 0,this.resetPagesCache(!0),this._cachedStoreData&&no({keyInfo:n,data:this._cachedStoreData,changes:e}),t||this._applyBatch(e),this.pushed.fire(e)}getDataIndexGetter(){if(!this._dataIndexGetter){let e,t,n=this.store();this._dataIndexGetter=o=>{let s=t&&t!==this._cachedStoreData;if(!e||s){t=this._cachedStoreData||[],e={};for(let r=0;r<t.length;r++)e[Di(n.keyOf(t[r]))]=r}return e[Di(n.keyOf(o))]}}return this._dataIndexGetter}_getKeyInfo(){return this.store()}_needToCopyDataObject(){return!0}_applyBatch(e,t){let n=this._getKeyInfo(),o=this._dataSource,s=R.normalizeSortingInfo(this.group()).length,r=this.option("editing.refreshMode")==="reshape",a=this.option("scrolling.mode")==="virtual";e=e.filter(h=>!o.paginate()||h.type!=="insert"||h.index!==void 0);let l=()=>s?this.itemsCount():this.items().length,d=l();no({keyInfo:n,data:this._items,changes:e,groupCount:s,useInsertIndex:!0,skipCopying:!this._needToCopyDataObject()}),no({keyInfo:n,data:o.items(),changes:e,groupCount:s,useInsertIndex:!0,skipCopying:!this._needToCopyDataObject()}),(this._currentTotalCount>0||(t||!r)&&a)&&(this._totalCountCorrection+=l()-d),e.splice(0,e.length)}_handlePush(e){let{changes:t}=e;this.push(t,!0)}_handleChanging(e){this.changing.fire(e),this._applyBatch(e.changes,!0)}_needCleanCacheByOperation(e,t){let n=["filtering","sorting","paging"],o=n.indexOf(e);return(o>=0?n.slice(o):[e]).some(r=>t[r])}_customizeRemoteOperations(e,t){let n=this._cachedStoreData,o=this._cachedPagingData,s=this._cachedData;(e.storeLoadOptions.filter&&!e.remoteOperations.filtering||e.storeLoadOptions.sort&&!e.remoteOperations.sorting)&&(e.remoteOperations={filtering:e.remoteOperations.filtering,summary:e.remoteOperations.summary}),t.fullReload?(n=void 0,o=void 0,s=pd()):(t.reload?(o=void 0,s=pd()):t.groupExpanding&&(s=pd()),x(t,(r,a)=>{a&&this._needCleanCacheByOperation(r,e.remoteOperations)&&(n=void 0,o=void 0)})),o&&(e.remoteOperations.paging=!1),e.cachedStoreData=n,e.cachedPagingData=o,e.cachedData=s,e.isCustomLoading||(this._cachedStoreData=n,this._cachedPagingData=o,this._cachedData=s)}_handleCustomizeStoreLoadOptions(e){var t;this._handleDataLoading(e),((t=e.data)===null||t===void 0?void 0:t.length)!==0&&(e.data=wy(e,!0)||e.cachedStoreData)}_handleDataLoading(e){let t=this._dataSource,n=this._lastLoadOptions;this.customizeStoreLoadOptions.fire(e),e.delay=this.option("loadingTimeout"),e.originalStoreLoadOptions=e.storeLoadOptions,e.remoteOperations=m({},this.remoteOperations());let o=!this.isLoaded()&&!this._isRefreshing;this.option("integrationOptions.renderedOnServer")&&!this.isLoaded()&&(e.delay=void 0);let s=m({pageIndex:this.pageIndex(),pageSize:this.pageSize()},e.storeLoadOptions),r=Ey(s,n,o);if(this._customizeRemoteOperations(e,r),!e.isCustomLoading){let a=this._isRefreshing;e.pageIndex=t.pageIndex(),e.lastLoadOptions=s,e.operationTypes=r,this._loadingOperationTypes=r,this._isRefreshing=!0,P(a||this._isRefreshed||this.refresh(e,r)).done(()=>{this._lastOperationId===e.operationId&&(this._isRefreshed=!0,this.load().always(()=>{this._isRefreshed=!1}))}).fail(()=>{t.cancel(e.operationId)}).always(()=>{this._isRefreshing=!1}),t.cancel(this._lastOperationId),this._lastOperationId=e.operationId,this._isRefreshing&&t.cancel(this._lastOperationId)}this._handleDataLoadingCore(e)}_handleDataLoadingCore(e){let{remoteOperations:t}=e;e.loadOptions={};let n=e.cachedData.extra,o={filter:!t.filtering,sort:!t.sorting,group:!t.grouping,summary:!t.summary,skip:!t.paging,take:!t.paging,requireTotalCount:n&&"totalCount"in n||!t.paging,langParams:!t.filtering||!t.sorting};x(e.storeLoadOptions,(s,r)=>{o[s]&&(e.loadOptions[s]=r,delete e.storeLoadOptions[s])}),n&&(e.extra=n)}_handleDataLoaded(e){let{loadOptions:t}=e,n=e.remoteOperations&&!e.remoteOperations.paging,{cachedData:o}=e,{storeLoadOptions:s}=e,r=this.option("cacheEnabled")!==!1&&s,a=r&&!e.isCustomLoading&&o&&(!n||s.group),l=r&&n,d=l&&!e.isCustomLoading;if(!t){this._dataSource.cancel(e.operationId);return}n&&(e.skip=t.skip,e.take=t.take,delete t.skip,delete t.take),t.group&&(t.group=e.group||t.group);let c=R.normalizeSortingInfo(e.group||s.group||t.group).length;if(e.cachedDataPartBegin&&(e.data=e.cachedDataPartBegin.concat(e.data)),e.cachedDataPartEnd&&(e.data=e.data.concat(e.cachedDataPartEnd)),!a||!wy(e)){var h;l&&e.cachedPagingData?e.data=wu(e.cachedPagingData,c):(d&&(this._cachedStoreData?e.mergeStoreLoadData&&(e.data=this._cachedStoreData=this._cachedStoreData.concat(e.data)):this._cachedStoreData=wu(e.data,R.normalizeSortingInfo(s.group).length)),new hs(e.data).load(t).done(p=>{e.data=p,d&&(this._cachedPagingData=wu(e.data,c))}).fail(p=>{e.data=new y().reject(p)})),t.requireTotalCount&&n&&(e.extra=X(e.extra)?e.extra:{},e.extra.totalCount=e.data.length),e.extra&&e.extra.totalCount>=0&&(s.requireTotalCount===!1||t.requireTotalCount===!1)&&(e.extra.totalCount=-1),!t.data&&(s.requireTotalCount||(((h=e.extra)===null||h===void 0?void 0:h.totalCount)??-1)>=0)&&(this._totalCountCorrection=0),this._handleDataLoadedCore(e),a&&(o.extra=o.extra||m({},e.extra),P(e.data).done(p=>{lP(e,p,c)}))}P(e.data).done(()=>{e.lastLoadOptions&&(this._lastLoadOptions=e.lastLoadOptions,Object.keys(e.operationTypes).forEach(p=>{this._lastOperationTypes[p]=this._lastOperationTypes[p]||e.operationTypes[p]}))}),e.storeLoadOptions=e.originalStoreLoadOptions}_handleDataLoadedCore(e){e.remoteOperations&&!e.remoteOperations.paging&&Array.isArray(e.data)&&(e.skip!==void 0&&(e.data=e.data.slice(e.skip)),e.take!==void 0&&(e.data=e.data.slice(0,e.take)))}_handleLoadingChanged(e){this.loadingChanged.fire(e)}_handleLoadError(e){this.loadError.fire(e),this.changed.fire({changeType:"loadError",error:e})}_loadPageSize(){return this.pageSize()}_handleDataChanged(e){let t,n=this._dataSource,o=!1,s=!e||f(e.changeType),r=this.itemsCount();s&&(this._isLastPage=!r||!this._loadPageSize()||r<this._loadPageSize(),this._isLastPage&&(this._hasLastPage=!0)),n.totalCount()>=0?n.pageIndex()>=this.pageCount()&&(n.pageIndex(this.pageCount()-1),this.pageIndex(n.pageIndex()),this.resetPagesCache(),n.load(),o=!0):s&&(t=n.pageIndex()*this.pageSize()+r,t>this._currentTotalCount&&(this._currentTotalCount=t,(n.pageIndex()===0||!this.option("scrolling.legacyMode"))&&(this._totalCountCorrection=0)),r===0&&n.pageIndex()>=this.pageCount()&&(n.pageIndex(this.pageCount()-1),this.option("scrolling.mode")!=="infinite"&&(n.load(),o=!0))),o||(this._operationTypes=this._lastOperationTypes,this._lastOperationTypes={},this.component._optionCache={},this.changed.fire(e),this.component._optionCache=void 0)}_scheduleCustomLoadCallbacks(e){let t=this;t._isCustomLoading=!0,e.always(()=>{t._isCustomLoading=!1})}loadingOperationTypes(){return this._loadingOperationTypes}operationTypes(){return this._operationTypes}lastLoadOptions(){return this._lastLoadOptions||{}}isLastPage(){return this._isLastPage}_dataSourceTotalCount(){return this._dataSource.totalCount()}_changeRowExpandCore(e){}changeRowExpand(e){}totalCount(){return parseInt((this._currentTotalCount||this._dataSourceTotalCount())+this._totalCountCorrection)}totalCountCorrection(){return this._totalCountCorrection}items(){}itemsCount(){return this._dataSource.items().length}totalItemsCount(){return this.totalCount()}pageSize(){let e=this._dataSource;return!arguments.length&&!e.paginate()?0:e.pageSize.apply(e,arguments)}pageCount(){let e=this.totalItemsCount()-this._totalCountCorrection,t=this.pageSize();return t&&e>0?Math.max(1,Math.ceil(e/t)):1}hasKnownLastPage(){return this._hasLastPage||this._dataSource.totalCount()>=0}loadFromStore(e,t){let n=this._dataSource,o=new y;if(n)return t=t||n.store(),t.load(e).done((s,r)=>{s&&!Array.isArray(s)&&Array.isArray(s.data)&&(r=s,s=s.data),o.resolve(s,r)}).fail(o.reject),o}isCustomLoading(){return!!this._isCustomLoading}load(e){let t=this,n=t._dataSource,o=new y;if(e){let s=n.store(),r=n.loadOptions(),a={storeLoadOptions:m({},e,{langParams:r?.langParams}),isCustomLoading:!0};return x(s._customLoadOptions()||[],(l,d)=>{d in a.storeLoadOptions||(a.storeLoadOptions[d]=r[d])}),this._isLoadingAll=e.isLoadingAll,t._scheduleCustomLoadCallbacks(o),n._scheduleLoadCallbacks(o),t._handleCustomizeStoreLoadOptions(a),sP(()=>{if(!n.store())return o.reject("canceled");P(a.data||t.loadFromStore(a.storeLoadOptions)).done((l,d)=>{a.data=l,a.extra=d||{},t._handleDataLoaded(a),e.requireTotalCount&&a.extra.totalCount===void 0&&(a.extra.totalCount=s.totalCount(a.storeLoadOptions)),P(a.data,a.extra.totalCount).done((c,h)=>{a.extra.totalCount=h,o.resolve(c,a.extra)}).fail(o.reject)}).fail(o.reject)},t.option("loadingTimeout")),o.fail(function(){t._eventsStrategy.fireEvent("loadError",arguments)}).always(()=>{this._isLoadingAll=!1}).promise()}return n.load()}reload(e){return e?this._dataSource.reload():this._dataSource.load()}getCachedStoreData(){return this._cachedStoreData}isLoaded(){}pageIndex(e){}};var Sy=hm,ea={extend(i){Sy=i(Sy)},create:i=>new Sy(i)};var Iy=class extends Eu{_getDataSourceAdapter(){return ea}_getSpecificDataSourceOption(){let e=this.option("dataSource");return e&&!Array.isArray(e)&&this.option("keyExpr")&&ie.log("W1011"),super._getSpecificDataSourceOption()}};$.registerModule("data",{defaultOptions:oP.defaultOptions,controllers:{data:Iy}});var aY=i=>class extends i{_applyColumnState(e){let t=this,n,o,s=t.option("sorting.mode"),{rootElement:r}=e,{column:a}=e,l=t._getIndicatorContainer(r);if(e.name==="sort"){r.find(".dx-sort").remove(),!l.children().length&&l.remove();let d=s!=="none"&&a.allowSorting,c=t.getController&&!!t.getController("columns").columnOption("sortIndex:1");return!f(a.groupIndex)&&(d||f(a.sortOrder))&&(n=a.sortOrder==="asc"?"ascending":"descending",o=super._applyColumnState(e).toggleClass("dx-sort-up",a.sortOrder==="asc").toggleClass("dx-sort-down",a.sortOrder==="desc"),c&&t.option("sorting.showSortIndexes")&&a.sortIndex>=0&&(u("<span>").addClass("dx-sort-index-icon").text(a.sortIndex+1).appendTo(o),o.addClass("dx-sort-index")),d&&e.rootElement.addClass(t.addWidgetPrefix("action"))),this._setAriaSortAttribute(a,n,r,c),o}return super._applyColumnState(e)}_setAriaSortAttribute(e,t,n,o){if(n.removeAttr("aria-roledescription"),e.isGrouped){let s=this.localize("dxDataGrid-ariaNotSortedColumn");f(e.sortOrder)&&(s=e.sortOrder==="asc"?this.localize("dxDataGrid-ariaSortedAscendingColumn"):this.localize("dxDataGrid-ariaSortedDescendingColumn")),this.setAria("roledescription",s,n)}else if(!f(e.sortOrder))this.setAria("sort","none",n);else if(this.setAria("sort",t,n),o&&e.sortIndex>=0){let s=O.format("dxDataGrid-ariaColumnHeader"),r=O.format("dxDataGrid-ariaSortIndex",e.sortIndex+1),a=`${s}, ${r}`;this.setAria("roledescription",a,n)}}_getIndicatorClassName(e){return e==="sort"?"dx-sort":e==="sortIndex"?"dx-sort-index-icon":super._getIndicatorClassName(e)}_renderIndicator(e){let{column:t}=e,n=e.container,o=e.indicator;if(e.name==="sort"){let s=this.option("rtlEnabled");if(f(t.sortOrder)||o&&o.addClass("dx-sort-none"),n.children().length&&(!s&&e.columnAlignment==="left"||s&&e.columnAlignment==="right")){n.prepend(o);return}}super._renderIndicator(e)}_updateIndicator(e,t,n){if(!(n==="sort"&&f(t.groupIndex)))return super._updateIndicator.apply(this,arguments)}_getIndicatorElements(e,t){let n=super._getIndicatorElements(e);return t?n:n&&n.not(".dx-sort-none")}},Dy=aY;var lY=i=>class extends Dy(i){optionChanged(e){let t=this;e.name==="sorting"?(t._invalidate(),e.handled=!0):super.optionChanged(e)}_createRow(e){let t=super._createRow(e);return e.rowType==="header"&&_.on(t,D(de,"dxDataGridColumnHeadersView"),"td",this.createAction(n=>{this._processHeaderAction(n.event,t)})),t}_processHeaderAction(e,t){if(u(e.currentTarget).parent().get(0)!==t.get(0))return;let n=this,o=null,s=u(e.currentTarget),r=s.parent().index(),a=-1;[].slice.call(n.getCellElements(r)).some((g,C)=>{if(g===s.get(0))return a=C,!0});let d=n._columnsController.getVisibleColumns(r)[a],c=n.getController("editing"),h=n.option("editing.mode");c&&c.isEditing()&&(h==="batch"||h==="cell")||!n._isSortableElement(u(e.target))||d&&!f(d.groupIndex)&&!d.command&&(e.shiftKey?o="shift":ft(e)&&(o="ctrl"),setTimeout(()=>{n._columnsController.changeSortOrder(d.index,o)}))}_renderCellContent(e,t){let n=this,{column:o}=t;!o.command&&t.rowType==="header"&&n._applyColumnState({name:"sort",rootElement:e,column:o,showColumnLines:n.option("showColumnLines")}),super._renderCellContent.apply(this,arguments)}_columnOptionChanged(e){let{changeTypes:t}=e;if(t.length===1&&t.sorting){this._updateIndicators("sort");return}super._columnOptionChanged(e)}},dY=i=>class extends Dy(i){optionChanged(e){let t=this;e.name==="sorting"?(t._invalidate(),e.handled=!0):super.optionChanged(e)}_createGroupPanelItem(e,t){let n=this,o=super._createGroupPanelItem(...arguments);return _.on(o,D(de,"dxDataGridHeaderPanel"),n.createAction(()=>{n._processGroupItemAction(t.index)})),n._applyColumnState({name:"sort",rootElement:o,column:{alignment:n.option("rtlEnabled")?"right":"left",allowSorting:t.allowSorting,sortOrder:t.sortOrder==="desc"?"desc":"asc",isGrouped:!0},showColumnLines:!0}),o}_processGroupItemAction(e){setTimeout(()=>this.getController("columns").changeSortOrder(e))}},cP={defaultOptions:()=>({sorting:{mode:"single",ascendingText:O.format("dxDataGrid-sortingAscendingText"),descendingText:O.format("dxDataGrid-sortingDescendingText"),clearText:O.format("dxDataGrid-sortingClearText"),showSortIndexes:!0}}),extenders:{views:{columnHeadersView:lY,headerPanel:dY}}};$.registerModule("sorting",cP);var pm="dx-freespace-row";var uP="dx-last-row-border";function hP(i){return i?Math.round(i.scrollWidth()-i.clientWidth()):0}function pP(i){let{rowType:e,column:t}=i;return e==="group"&&f(t.groupIndex)&&!t.showWhenGrouped&&!t.command}function gP(i){let{element:e,watch:t,getter:n,callBack:o}=i;if(t){let s=t(n,o);_.on(e,ai,s)}}var cY=function(i,e){let t=al(e.text)&&e.rowType==="data",{text:n}=e,o=i.get(0);t?R.setEmptyText(i):e.column.encodeHtml?o.textContent=n:o.innerHTML=n},uY=function(i){let e=i.getScrollable();return e?Math.ceil(parseFloat(u(e.content()).css("paddingBottom"))):0},Ty=class extends bo{init(){super.init(),this._editingController=this.getController("editing"),this._resizingController=this.getController("resizing"),this._columnsResizerController=this.getController("columnsResizer"),this._focusController=this.getController("focus"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._validatingController=this.getController("validating"),this._errorHandlingController=this.getController("errorHandling"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowHeight=0,this._scrollTop=0,this._scrollLeft=-1,this._scrollRight=0,this._hasHeight=void 0,this._contentChanges=[],this._dataController.loadingChanged.add((e,t)=>{this.setLoading(e,t)}),this._dataController.dataSourceChanged.add(()=>{this._scrollLeft>=0&&!this._dataController.isLoading()&&this._handleScroll({component:this.getScrollable(),forceUpdateScrollPosition:!0,scrollOffset:{top:this._scrollTop,left:this._scrollLeft}})})}_getDefaultTemplate(e){return e.command==="empty"?function(t){t.html("&nbsp;")}:cY}renderFocusState(e){}_getDefaultGroupTemplate(e){let t=this.option("summary.texts");return function(n,o){let{data:s}=o,r=`${o.column.caption}: ${o.text}`,a=n.get(0);o.summaryItems&&o.summaryItems.length&&(r+=` ${R.getGroupRowSummaryText(o.summaryItems,t)}`),s&&(o.groupContinuedMessage&&o.groupContinuesMessage?r+=` (${o.groupContinuedMessage}. ${o.groupContinuesMessage})`:o.groupContinuesMessage?r+=` (${o.groupContinuesMessage})`:o.groupContinuedMessage&&(r+=` (${o.groupContinuedMessage})`)),e.encodeHtml?a.textContent=r:a.innerHTML=r}}_update(e){}_updateCell(e,t){pP(t)&&e.addClass("dx-group-cell"),super._updateCell.apply(this,arguments)}_getCellTemplate(e){let t=this,{column:n}=e,o;return pP(e)?o=n.groupCellTemplate||{allowRenderToDetachedContainer:!0,render:t._getDefaultGroupTemplate(n)}:(e.rowType==="data"||n.command)&&n.cellTemplate?o=n.cellTemplate:o={allowRenderToDetachedContainer:!0,render:t._getDefaultTemplate(n)},o}_createRow(e,t){let n=super._createRow.apply(this,arguments);if(e){let o=e.rowType==="group",s=e.rowType==="data";s&&n.addClass("dx-data-row"),s&&this.option("showRowLines")&&n.addClass("dx-row-lines"),this.option("showColumnLines")&&n.addClass("dx-column-lines"),e.visible===!1&&n.hide(),o&&(n.addClass("dx-group-row"),this.setAriaExpandedAttribute(n,e))}return n}_rowPrepared(e,t,n){t.rowType==="data"&&(this.option("rowAlternationEnabled")&&(this._isAltRow(n)&&e.addClass("dx-row-alt"),gP({element:e.get(0),watch:t.watch,getter:()=>this._isAltRow(n),callBack:o=>{e.toggleClass("dx-row-alt",o)}})),this._setAriaRowIndex(t,e),gP({element:e.get(0),watch:t.watch,getter:()=>t.rowIndex,callBack:()=>this._setAriaRowIndex(t,e)})),super._rowPrepared.apply(this,arguments)}_setAriaRowIndex(e,t){if(!t.is("tr"))return;let{component:n}=this,o=n.option("scrolling.mode")==="standard"&&!R.isVirtualRowRendering(n),s=e.rowIndex+1;o?s=n.pageIndex()*n.pageSize()+s:s+=this._dataController.getRowIndexOffset(),this.setAria("rowindex",s,t)}setAriaExpandedAttribute(e,t){let n=t.isExpanded?this.localize("dxDataGrid-ariaExpandedRow"):this.localize("dxDataGrid-ariaCollapsedRow");this.setAria("roledescription",n,e)}_afterRowPrepared(e){let t=e.args[0],n=this._dataController,o=n.getVisibleRows()[t.rowIndex],s=this.option("integrationOptions.watchMethod");if(!t.data||t.rowType!=="data"||t.isNewRow||!this.option("twoWayBindingEnabled")||!s||!o)return;let r=s(()=>n.generateDataValues(t.data,t.columns),()=>{n.repaintRows([o.rowIndex],this.option("repaintChangesOnly"))},{deep:!0,skipImmediate:!0});_.on(t.rowElement,ai,r)}_renderScrollable(e){let t=this,n=t.element();if(n.children().length||n.append("<div>"),(e||!t._loadPanel)&&t._renderLoadPanel(n,n.parent(),t._dataController.isLocalStore()),(e||!t.getScrollable())&&t._dataController.isLoaded()){let o=t.getColumns(),s=!0;for(let r=0;r<o.length;r++)if(!o[r].width&&!o[r].minWidth){s=!1;break}(t.option("columnAutoWidth")||t._hasHeight||s||t._columnsController._isColumnFixing())&&t._renderScrollableCore(n)}}_handleScroll(e){let t=this.option("rtlEnabled"),n=e.component.option("useNative");this._scrollTop=e.scrollOffset.top,this._scrollLeft=e.scrollOffset.left;let o=e.scrollOffset.left;t&&(this._scrollRight=hP(e.component)-this._scrollLeft,n&&(o=-this._scrollRight),this.isScrollbarVisible(!0)||(this._scrollLeft=-1)),this.scrollChanged.fire(I({},e.scrollOffset,{left:o}),this.name)}_renderScrollableCore(e){let t=this._createScrollableOptions(),n=this._handleScroll.bind(this);t.onScroll=n,this._scrollable=this._createComponent(e,Xi,t),this._scrollableContainer=this._scrollable&&u(this._scrollable.container())}_renderLoadPanel(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.renderLoadPanel.apply(this,arguments)}_renderContent(e,t,n){return e.empty().append(t),this._findContentElement()}_updateContent(e,t,n){return this._contentChanges.push({newTableElement:e,change:t,isFixedTableRendering:n}),this.waitAsyncTemplates().done(()=>{let o=this._contentChanges;this._contentChanges=[],o.forEach(s=>{let{newTableElement:r,change:a,isFixedTableRendering:l}=s,d=this.getTableElement(l),c=this._findContentElement(l),h=a?.changeType,p=[],g=this.option("highlightChanges"),C=this.addWidgetPrefix("row-inserted-animation");h==="update"?(x(a.rowIndices,(v,b)=>{var T;let M=this._getRowElements(r).eq(v),G=(T=a.changeTypes)===null||T===void 0?void 0:T[v],te=a.items&&a.items[v];p.push(()=>{let oe=this._getRowElements(d),re=oe.eq(b);switch(G){case"update":if(te){var Ie;let Fe=(Ie=a.columnIndices)===null||Ie===void 0?void 0:Ie[v];f(te.visible)&&te.visible!==re.is(":visible")?re.toggle(te.visible):Fe?this._updateCells(re,M,Fe):re.replaceWith(M)}break;case"insert":if(oe.length)re.length?M.insertBefore(re):M.insertAfter(oe.last());else if(d){let Fe=M.is("tbody")?d:d.children("tbody");M.prependTo(Fe)}g&&a.isLiveUpdate&&M.addClass(C);break;case"remove":re.remove()}})}),x(p,function(){this()}),r.remove()):(this.setTableElement(r,l),c.addClass(this.addWidgetPrefix("content")),this._setGridRole(c),this._renderContent(c,r,l))})}).fail(()=>{this._contentChanges=[]})}_getGridRoleName(){return"grid"}_setGridRole(e){var t;let n=!((t=this._dataController)!==null&&t!==void 0&&t.isEmpty()),o=this._getGridRoleName();e!=null&&e.length&&n&&this.setAria("role",o,e)}_createEmptyRow(e,t,n){let o=this,s,r=o._createRow(),a=t?this.getFixedColumns():this.getColumns();r.addClass(e).toggleClass("dx-column-lines",o.option("showColumnLines"));for(let l=0;l<a.length;l++)s=o._createCell({column:a[l],rowType:"freeSpace",columnIndex:l,columns:a}),Oe(n)&&s.css("height",n),r.append(s);return o.setAria("role","presentation",r),r}getFixedColumns(){throw new Error("Method not implemented.")}_appendEmptyRow(e,t,n){let o=this._getBodies(e),s=!o.length||t.is("tbody"),r=s?e:o;if(n==="top"){if(r.first().prepend(t),s){let a=r.children("colgroup");r.prepend(a)}}else r.last().append(t)}_renderFreeSpaceRow(e,t){let n=this._createEmptyRow(pm);n=this._wrapRowIfNeed(e,n,t?.changeType==="refresh"),this._appendEmptyRow(e,n)}_checkRowKeys(e){let t=this,n=t._getRows(e),o=t._dataController.store()&&t._dataController.store().key();o&&n.some(s=>{if(s.rowType==="data"&&s.key===void 0)return t._dataController.fireError("E1046",o),!0})}_needUpdateRowHeight(e){return e>0&&!this._rowHeight}_getRowsHeight(e){return e=e||this._tableElement,e.children("tbody").children().not(".dx-virtual-row").not(`.${pm}`).toArray().reduce((n,o)=>n+Pe(o).height,0)}_updateRowHeight(){let e=this,t=e.getTableElement(),n=e._dataController.items().length;if(t&&e._needUpdateRowHeight(n)){let o=e._getRowsHeight(t);e._rowHeight=o/n}}_findContentElement(e){let t=this.element(),n=this.getScrollable();if(t)return n&&(t=u(n.content())),t.children().first()}_getRowElements(e){let t=super._getRowElements(e);return t&&t.not(`.${pm}`)}_getFreeSpaceRowElements(e){let t=e||this.getTableElements();return t&&t.children("tbody").children(`.${pm}`)}_getNoDataText(){return this.option("noDataText")}_rowClick(e){let t=this._dataController.items()[e.rowIndex]||{};this.executeAction("onRowClick",m({evaluate(n){return Ce(n)(t.data)}},e,t))}_rowDblClick(e){let t=this._dataController.items()[e.rowIndex]||{};this.executeAction("onRowDblClick",m({},e,t))}_getColumnsCountBeforeGroups(e){for(let t=0;t<e.length;t++)if(e[t].type==="groupExpand")return t;return 0}_getGroupCellOptions(e){let t=this._getColumnsCountBeforeGroups(e.columns),n=(e.row.groupIndex||0)+t;return{columnIndex:n,colspan:e.columns.length-n-1}}_needWrapRow(){return super._needWrapRow.apply(this,arguments)||!!this.option("dataRowTemplate")}_renderCells(e,t){t.row.rowType==="group"?this._renderGroupedCells(e,t):t.row.values&&super._renderCells(e,t)}_renderGroupedCells(e,t){let{row:n}=t,o,{columns:s}=t,{rowIndex:r}=n,a,l=this._getGroupCellOptions(t);for(let h=0;h<=l.columnIndex;h++)h===l.columnIndex&&s[h].allowCollapsing&&t.scrollingMode!=="infinite"?(a=!!n.isExpanded,o=s[h]):(a=null,o={command:"expand",cssClass:s[h].cssClass}),this._needRenderCell(h,t.columnIndices)&&this._renderCell(e,{value:a,row:n,rowIndex:r,column:o,columnIndex:h,columnIndices:t.columnIndices,change:t.change});let d=un(this.option("rtlEnabled")),c=m({},s[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,t.columnIndices)&&this._renderCell(e,{value:n.values[n.groupIndex],row:n,rowIndex:r,column:c,columnIndex:l.columnIndex+1,columnIndices:t.columnIndices,change:t.change})}_renderRows(e,t){let n=this,o=n.option("scrolling.mode");super._renderRows(e,m({scrollingMode:o},t)),n._checkRowKeys(t.change),n._renderFreeSpaceRow(e,t.change),n._hasHeight||n.updateFreeSpaceRowHeight(e)}_renderDataRowByTemplate(e,t,n){let{row:o}=t,s=m({columns:t.columns},o),r=this._createRow(o,"tbody");r.appendTo(e),this.renderTemplate(r,n,s,!0,t.change),this._rowPrepared(r,s,t.row)}_renderRow(e,t){let{row:n}=t,{rowTemplate:o}=this.option(),s=this.option("dataRowTemplate");n.rowType==="data"&&s?this._renderDataRowByTemplate(e,t,s):(n.rowType==="data"||n.rowType==="group")&&!f(n.groupIndex)&&o?this.renderTemplate(e,o,m({columns:t.columns},n),!0):super._renderRow(e,t)}_renderTable(e){let t=this,n=super._renderTable(e),o=function(){let s=t.getScrollable();s&&t.element().closest(q().document).length&&(t.resizeCompleted.remove(o),s._visibilityChanged(!0))};return f(t.getTableElement())?t._renderScrollable():(t.setTableElement(n),t._renderScrollable(!0),t.resizeCompleted.add(o)),n}_createTable(){let e=super._createTable.apply(this,arguments);return(this.option().rowTemplate||this.option().dataRowTemplate)&&e.appendTo(this.component.$element()),e}_renderCore(e){let t=this.element();t.addClass(this.addWidgetPrefix("rowsview")).toggleClass(this.addWidgetPrefix("nowrap"),!this.option("wordWrapEnabled")),t.toggleClass("dx-empty",this._dataController.isEmpty()),this.setAria("role","presentation",t);let n=this._renderTable({change:e}),o=this._updateContent(n,e);return super._renderCore(e),this._lastColumnWidths=null,o}_getRows(e){return e&&e.items||this._dataController.items()}_getCellOptions(e){let t=this,{column:n}=e,{row:o}=e,{data:s}=o,r=o&&o.summaryCells,{value:a}=e,l=R.getDisplayValue(n,a,s,o.rowType),d=super._getCellOptions(e);if(d.value=a,d.oldValue=e.oldValue,d.displayValue=l,d.row=o,d.key=o.key,d.data=s,d.rowType=o.rowType,d.values=o.values,d.text=n.command?"":R.formatValue(l,n),d.rowIndex=o.rowIndex,d.summaryItems=r&&r[e.columnIndex],d.resized=n.resizedCallbacks,f(n.groupIndex)&&!n.command){let c=t.option("grouping.texts"),h=t.option("scrolling.mode");h!=="virtual"&&h!=="infinite"&&(d.groupContinuesMessage=s&&s.isContinuationOnNextPage&&c&&c.groupContinuesMessage,d.groupContinuedMessage=s&&s.isContinuation&&c&&c.groupContinuedMessage)}return d}_setRowsOpacityCore(e,t,n,o){let s=this._columnsController,r=s.getColumns(),a=r&&r[n],l=a&&a.isBand&&a.index;x(e,(d,c)=>{if(!u(c).hasClass("dx-group-row"))for(let h=0;h<t.length&&!((Oe(l)&&s.isParentBandColumn(t[h].index,l)||t[h].index===n)&&(e.eq(d).children().eq(h).css({opacity:o}),!Oe(l)));h++);})}_getDevicePixelRatio(){return q().devicePixelRatio}renderNoDataText(){return R.renderNoDataText.apply(this,arguments)}getCellOptions(e,t){let n=this._dataController.items()[e],o,s;return n&&(B(t)?s=this._columnsController.columnOption(t):s=this._columnsController.getVisibleColumns()[t],s&&(o=this._getCellOptions({value:s.calculateCellValue(n.data),rowIndex:n.rowIndex,row:n,column:s}))),o}getRow(e){if(e>=0){let t=this._getRowElements();if(t.length>e)return u(t[e])}}updateFreeSpaceRowHeight(e){let t=this._dataController,n=t.items(!0).length,o=this._findContentElement(),s=this._getFreeSpaceRowElements(e);if(s&&o&&t.totalCount()>=0){let r=!1;if(n>0)if(this._hasHeight)s.hide(),Ci(()=>{let a=this.getScrollbarWidth(!0),l=Q(this.element())-a,d=ee(o),c=l-d>0,h=this._getRowsHeight(o.children().first()),p=e||this.getTableElements(),g=Math.ceil(parseFloat(p.css("borderTopWidth"))),C=this._getHeightCorrection(),v=l-h-g-C;c&&pt(()=>{s.css("height",v),r=!0,s.show()}),pt(()=>this._updateLastRowBorder(r))});else{let a=t.pageSize()-n,l=this.option("scrolling.mode");a>0&&t.pageCount()>1&&l!=="virtual"&&l!=="infinite"&&($h(s,a*this._rowHeight),r=!0),!r&&e?$h(s,0):s.toggle(r),this._updateLastRowBorder(r)}else s.css("height",0),s.show(),this._updateLastRowBorder(!0)}}_getHeightCorrection(){let e=we.webkit&&this._getDevicePixelRatio()>=2,t=we.chrome&&we.version>=91,n=we.mozilla&&we.version>=70&&!this.option("showRowLines");return e||n||t?1:0}_columnOptionChanged(e){let{optionNames:t}=e;e.changeTypes.grouping||(t.width||t.visibleWidth)&&(super._columnOptionChanged(e),this._fireColumnResizedCallbacks())}getScrollable(){return this._scrollable}_handleDataChanged(e){let t=this;switch(e.changeType){case"refresh":case"prepend":case"append":case"update":t.render(null,e);break;default:t._update(e)}}publicMethods(){return["isScrollbarVisible","getTopVisibleRowData","getScrollbarWidth","getCellElement","getRowElement","getScrollable"]}contentWidth(){return W(this.element())-this.getScrollbarWidth()}getScrollbarWidth(e){let t=this._scrollableContainer&&this._scrollableContainer.get(0),n=0;return t&&(e?(n=t.clientHeight?t.offsetHeight-t.clientHeight:0,n+=uY(this)):n=t.clientWidth?t.offsetWidth-t.clientWidth:0),n>0?n:0}_fireColumnResizedCallbacks(){let e=this._lastColumnWidths||[],t=[],n=this.getColumns();for(let o=0;o<n.length;o++)t[o]=n[o].visibleWidth,n[o].resizedCallbacks&&!f(n[o].groupIndex)&&e[o]!==t[o]&&n[o].resizedCallbacks.fire(t[o]);this._lastColumnWidths=t}_updateLastRowBorder(e){this.option("showBorders")&&!e?this.element().addClass(uP):this.element().removeClass(uP)}_updateScrollable(){let e=Xi.getInstance(this.element());e&&(e.update(),(e.option("useNative")||!(e!=null&&e.isRenovated()))&&this._updateHorizontalScrollPosition())}_updateHorizontalScrollPosition(){let e=this.getScrollable(),t=e&&e.scrollOffset().left;if(this.option("rtlEnabled")){let o=hP(e);o-t!==this._scrollRight&&(this._scrollLeft=o-this._scrollRight)}this._scrollLeft>=0&&t!==this._scrollLeft&&e.scrollTo({x:this._scrollLeft})}_resizeCore(){let e=this;e._fireColumnResizedCallbacks(),e._updateRowHeight(),pt(()=>{e._renderScrollable(),e.renderNoDataText(),e.updateFreeSpaceRowHeight(),Ci(()=>{e._updateScrollable()})})}scrollTo(e){let t=this.element(),n=t&&Xi.getInstance(t);n&&n.scrollTo(e)}height(e){let t=this,n=this.element();if(arguments.length===0)return n?ee(n,!0):0;f(e)&&n&&(t.hasHeight(e!=="auto"),$h(n,e))}hasHeight(e){if(arguments.length===0)return!!this._hasHeight;this._hasHeight=e}setLoading(e,t){let n=this,o=n._loadPanel,s=n._dataController,r=n.option("loadPanel")||{},a=s.isLoaded()?r.animation:null,l=n.element();if(j()&&(!o&&t!==void 0&&s.isLocalStore()&&r.enabled==="auto"&&l&&(n._renderLoadPanel(l,l.parent()),o=n._loadPanel),o)){let d={message:t||r.text,animation:a,visible:e};e&&(d.position=R.calculateLoadPanelPosition(l)),clearTimeout(n._hideLoadingTimeoutID),o.option("visible")&&!e?n._hideLoadingTimeoutID=setTimeout(()=>{o.option(d)},200):o.option(d)}}setRowsOpacity(e,t){let n=this._getRowElements().not(".dx-group-row")||[];this._setRowsOpacityCore(n,this.getColumns(),e,t)}_getCellElementsCore(e){let t=super._getCellElementsCore.apply(this,arguments);if(t){let n=t.filter(".dx-group-cell").index();if(n>=0&&t.length>n+1)return t.slice(0,n+1)}return t}_getBoundaryVisibleItemIndex(e,t){let n=this,o=0,s=0,r=0,a=n._scrollTop,l=n._findContentElement(),d=l&&l.offset().top,c=this._dataController.items(),h=n.getTableElement();if(c.length&&h){let p=n._getRowElements(h).filter(":visible");if(!e){let g=ee(this._hasHeight?this.element():q());a+=g}for(o=0;o<c.length;o++){s=r;let g=u(p).eq(o);if(g.length&&(r=g.offset(),r=(e?r.top:r.top+ee(g))-d,r>a)){o&&(t||2*a<Math.round(r+s))&&o--;break}}o&&o===c.length&&o--}return o}getTopVisibleItemIndex(e){return this._getBoundaryVisibleItemIndex(!0,e)}getBottomVisibleItemIndex(e){return this._getBoundaryVisibleItemIndex(!1,e)}getTopVisibleRowData(){let e=this.getTopVisibleItemIndex(),t=this._dataController.items();if(t[e])return t[e].data}_scrollToElement(e,t){let n=this.getScrollable();n&&n.scrollToElement(e,t)}optionChanged(e){let t=this;switch(super.optionChanged(e),e.name){case"wordWrapEnabled":case"showColumnLines":case"showRowLines":case"rowAlternationEnabled":case"rowTemplate":case"dataRowTemplate":case"twoWayBindingEnabled":t._invalidate(!0,!0),e.handled=!0;break;case"scrolling":t._rowHeight=null,t._tableElement=null,e.handled=!0;break;case"rtlEnabled":t._rowHeight=null,t._tableElement=null;break;case"loadPanel":t._tableElement=null,t._invalidate(!0,e.fullName!=="loadPanel.enabled"),e.handled=!0;break;case"noDataText":t.renderNoDataText(),e.handled=!0}}setAriaOwns(e,t,n){let o=this._findContentElement(),s=this.getTableElement();s!=null&&s.length&&this.setAria("owns",`${e??""} ${s.attr("id")??""} ${t??""}`.trim(),o)}dispose(){super.dispose(),clearTimeout(this._hideLoadingTimeoutID),this._scrollable&&this._scrollable.dispose()}setScrollerSpacing(e,t){}getFixedContentElement(){var e;let t=this.addWidgetPrefix("content-fixed");return(e=this.element())===null||e===void 0?void 0:e.children(`.${t}`)}_restoreErrorRow(e){}isElementInside(e){return e.closest(`.${this.addWidgetPrefix("rowsview")}`).is(this.element())}},Ay={defaultOptions:()=>({hoverStateEnabled:!1,scrolling:{useNative:"auto"},loadPanel:{enabled:"auto",text:O.format("Loading"),width:200,height:90,showIndicator:!0,indicatorSrc:"",showPane:!0},dataRowTemplate:null,columnAutoWidth:!1,noDataText:O.format("dxDataGrid-noDataText"),wordWrapEnabled:!1,showColumnLines:!0,showRowLines:!1,rowAlternationEnabled:!1,activeStateEnabled:!1,twoWayBindingEnabled:!0}),views:{rowsView:Ty}};var gPe=Ay.views.rowsView;$.registerModule("rows",Ay);var hY="dx-context-menu",pY={columnHeadersView:"header",rowsView:"content",footerView:"footer",headerPanel:"headerPanel"},gY=["columnHeadersView","rowsView","footerView","headerPanel"],My=class extends ye.ViewController{init(){this.createAction("onContextMenuPreparing")}getContextMenuItems(e){if(!e)return!1;let t=this,n=u(e.target),o,s,r,a;return x(gY,function(){let l=t.getView(this);if(o=l&&l.element(),o&&(o.is(n)||o.find(n).length)){var d;r=n.closest(".dx-row > td, .dx-row > tr"),s=r.parent();let c=l.getRowIndex(s),h=r[0]&&r[0].cellIndex,p=s.data("options"),g={event:e,targetElement:H(n),target:pY[this],rowIndex:c,row:l._getRows()[c],columnIndex:h,column:p==null||(d=p.cells)===null||d===void 0||(d=d[h])===null||d===void 0?void 0:d.column};if(g.items=l.getContextMenuItems&&l.getContextMenuItems(g),t.executeAction("onContextMenuPreparing",g),t._contextMenuPrepared(g),a=g.items,a)return!1}}),a}_contextMenuPrepared(e){}},Ry=class extends ye.View{init(){super.init(),this._contextMenuController=this.getController("contextMenu")}_renderCore(){let e=this.element().addClass(hY);this.setAria("role","presentation",e),this._createComponent(e,Db,{onPositioning:t=>{let{event:n}=t,o=t.component,s=this._contextMenuController.getContextMenuItems(n);s?(o.option("items",s),n.stopPropagation()):t.cancel=!0},onItemClick(t){var n,o;(n=t.itemData)===null||n===void 0||(o=n.onItemClick)===null||o===void 0||o.call(n,t)},cssClass:this.getWidgetContainerClass(),target:this.component.$element()})}},mP={defaultOptions:()=>({onContextMenuPreparing:null}),controllers:{contextMenu:My},views:{contextMenuView:Ry}};$.registerModule("contextMenu",mP);var Fy=class extends ye.ViewController{init(){this._resizingController=this.getController("resizing"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView")}_createErrorRow(e,t){let n,o,s=this._renderErrorMessage(e);return t?(n=u("<tr>").attr("role","row").addClass("dx-error-row"),o=u("<div>").addClass("dx-closebutton").addClass(this.addWidgetPrefix("action")),_.on(o,de,this.createAction(r=>{var a,l;let d=r.event,c,h=u(d.currentTarget).closest(".dx-error-row").index();d.stopPropagation(),x(t,(p,g)=>{c=u(g).children("tbody").children("tr").eq(h),this.removeErrorRow(c)}),(a=this._resizingController)===null||a===void 0||(l=a.fireContentReadyAction)===null||l===void 0||l.call(a)})),u("<td>").attr({colSpan:this._columnsController.getVisibleColumns().length,role:"gridcell"}).prepend(o).append(s).appendTo(n),n):s}_renderErrorMessage(e){let t=e.url?e.message.replace(e.url,""):e.message||e,n=u("<div>").attr("role","alert").attr("aria-roledescription",O.format("dxDataGrid-ariaError")).addClass("dx-error-message").text(t);return e.url&&u("<a>").attr("href",e.url).text(e.url).appendTo(n),n}renderErrorRow(e,t,n){var o,s;let r=this,a,l;if(n)return n.find(".dx-error-message").remove(),a=r._createErrorRow(e),n.prepend(a),a;let d=t>=0||!r._columnHeadersView.isVisible()?r._rowsView:r._columnHeadersView,c=d.getTableElements();return x(c,(h,p)=>{if(a=r._createErrorRow(e,c),l=l||a,t>=0){let g=d._getRowElements(u(p)).eq(t);r.removeErrorRow(g.next()),a.insertAfter(g)}else{let g=u(p).children("tbody"),C=g.children("tr");r._columnHeadersView.isVisible()?(r.removeErrorRow(C.last()),u(p).append(a)):(r.removeErrorRow(C.first()),g.first().prepend(a))}}),(o=this._resizingController)===null||o===void 0||(s=o.fireContentReadyAction)===null||s===void 0||s.call(o),l}removeErrorRow(e){if(!e){let t=this._columnHeadersView&&this._columnHeadersView.element();if(e=t&&t.find(".dx-error-row"),!e||!e.length){let n=this._rowsView.element();e=n&&n.find(".dx-error-row")}}e&&e.hasClass("dx-error-row")&&e.remove()}optionChanged(e){e.name==="errorRowEnabled"?e.handled=!0:super.optionChanged(e)}},mY=i=>class extends i{init(){super.init(),this.dataErrorOccurred.add((e,t)=>{this.option("errorRowEnabled")&&this._errorHandlingController.renderErrorRow(e,void 0,t)}),this.changed.add(e=>{if(!(e&&e.changeType==="loadError")&&this._editingController&&!this._editingController.hasChanges()){var t,n;(t=this._errorHandlingController)===null||t===void 0||(n=t.removeErrorRow)===null||n===void 0||n.call(t)}})}},fP={defaultOptions:()=>({errorRowEnabled:!0}),controllers:{errorHandling:Fy},extenders:{controllers:{data:mY}}};$.registerModule("errorHandling",fP);var fY={container:"dx-gridbase-a11y-status-container"},_P=i=>{let{statusText:e}=i;return u("<div>").text(e??"").addClass(fY.container).attr("role","status")};var Vy=["columnsSeparatorView","blockSeparatorView","trackerView","headerPanel","columnHeadersView","rowsView","footerView","columnChooserView","filterPanelView","pagerView","draggingHeaderView","contextMenuView","errorView","headerFilterView","filterBuilderView"],_Y={a11yStatusContainer:"e2e-a11y-general-status-container"},Su=function(i){return B(i)&&i.endsWith("%")},CY=function(i){return B(i)&&i.endsWith("px")},CP=function(i,e){let t=i._rowsView.contentWidth(),n=i._getTotalWidth(e,t);return t-n},xY=function(i,e,t,n){return CP(i,n.map((o,s)=>s===e?t:o))},vY=function(i,e){kR(i,!0),R.setSelectionRange(i,e)},Py=class extends ye.ViewController{init(){this._prevContentMinHeight=null,this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._columnHeadersView=this.getView("columnHeadersView"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._editorFactoryController=this.getController("editorFactory"),this._footerView=this.getView("footerView"),this._rowsView=this.getView("rowsView"),this._gridView=this.getView("gridView")}_initPostRenderHandlers(){this._refreshSizesHandler||(this._refreshSizesHandler=e=>{let t=new y().resolve(null),n=e?.changeType,o=e?.isDelayed,s=n&&n!=="updateSelection"&&n!=="updateFocusedRow"&&n!=="pageIndex"&&!o;this._dataController.changed.remove(this._refreshSizesHandler),this._checkSize()&&(t=this._refreshSizes(e)),s&&P(t).done(()=>{this._setAriaLabel(),this.fireContentReadyAction()})},this._dataController.changed.add(()=>{this._dataController.changed.add(this._refreshSizesHandler)}))}_refreshSizes(e){let t=new y().resolve(null),n=e?.changeType,o=e?.isDelayed,s=this._dataController.items();if(!e||n==="refresh"||n==="prepend"||n==="append")o||(t=this.resize());else if(n==="update"){var r;if(((r=e.changeTypes)===null||r===void 0?void 0:r.length)===0)return t;(s.length>1||e.changeTypes[0]!=="insert")&&!(s.length===0&&e.changeTypes[0]==="remove")&&!e.needUpdateDimensions?(t=new y,this._waitAsyncTemplates().done(()=>{Ci(()=>pt(()=>Ci(()=>{this._setScrollerSpacing(),this._rowsView.resize(),t.resolve()})))}).fail(t.reject)):t=this.resize()}return t}fireContentReadyAction(){this.component._fireContentReadyAction()}_getWidgetAriaLabel(){return"dxDataGrid-ariaDataGrid"}_setAriaLabel(){var e;let t=((e=this._columnsController)===null||e===void 0||(e=e._columns)===null||e===void 0?void 0:e.filter(a=>{let{visible:l}=a;return!!l}).length)??0,n=Math.max(0,this._dataController.totalItemsCount()),o=this._getWidgetAriaLabel(),s=O.format(o,n,t),r=this.component.$element().children(".dx-gridbase-container");this.component.setAria("label",s,r),this._gridView.setWidgetA11yStatusText(s)}_getBestFitWidths(){var e;let t=this._rowsView,n=this._columnHeadersView,o=t.getColumnWidths();if(!((e=o)!==null&&e!==void 0&&e.length)){var s;let r=n.getTableElement();n.setTableElement((s=t.getTableElement())===null||s===void 0?void 0:s.children(".dx-header")),o=n.getColumnWidths(),n.setTableElement(r)}return o}_setVisibleWidths(e,t){let n=this._columnsController;n.beginUpdate(),x(e,(o,s)=>{let r=n.getColumnId(s);n.columnOption(r,"visibleWidth",t[o])}),n.endUpdate()}_toggleBestFitModeForView(e,t,n){if(!e||!e.isVisible())return;let o=this._rowsView.getTableElements(),s=e.getTableElements();x(o,(r,a)=>{let l,d=u(a),c=s.eq(r);c&&c.length&&(n?l=c.children("tbody").appendTo(d):l=d.children(`.${t}`).appendTo(c),l.toggleClass(t,n),l.toggleClass(this.addWidgetPrefix("best-fit"),n))})}_toggleBestFitMode(e){let t=this._rowsView.getTableElement(),n=this._rowsView.getTableElements().eq(1);t&&(t.css("tableLayout",e?"auto":"fixed"),t.children("colgroup").css("display",e?"none":""),x(n.find("tr.dx-group-row"),(o,s)=>{u(s).css("display",e?"none":"")}),n.toggleClass(this.addWidgetPrefix("table-fixed"),!e),this._toggleBestFitModeForView(this._columnHeadersView,"dx-header",e),this._toggleBestFitModeForView(this._footerView,"dx-footer",e),this._needStretch()&&(t.get(0).style.width=e?"auto":""))}_toggleContentMinHeight(e){let t=this._rowsView.getScrollable(),n=this._rowsView._findContentElement();t?.option("useNative")===!1&&(e===!0&&(this._prevContentMinHeight=n.get(0).style.minHeight),f(this._prevContentMinHeight)&&n.css({minHeight:e?R.getContentHeightLimit(we):this._prevContentMinHeight}))}_synchronizeColumns(){let e=this._columnsController,t=e.getVisibleColumns(),n=this.option("columnAutoWidth"),o=this.option("wordWrapEnabled"),s=t.some(C=>!f(C.width)),r=this._needBestFit(),a=!1,l,d=!1,c=[],h,p;!r&&x(t,(C,v)=>{if(v.width==="auto")return r=!0,!1}),x(t,(C,v)=>{if(v.minWidth)return a=!0,!1}),this._setVisibleWidths(t,[]);let g=this.component.$element();r&&(h=S.getActiveElement(g.get(0)),p=R.getSelectionRange(h),this._toggleBestFitMode(!0),l=!0),this._toggleContentMinHeight(o),g&&g.get(0)&&this._maxWidth&&(delete this._maxWidth,g[0].style.maxWidth=""),Ci(()=>{r?(c=this._getBestFitWidths(),x(t,(C,v)=>{let b=e.getColumnId(v);e.columnOption(b,"bestFitWidth",c[C],!0)})):a&&(c=this._getBestFitWidths()),x(t,function(C){let{width:v}=this;v!=="auto"&&(f(v)?c[C]=Oe(v)||CY(v)?parseFloat(v):v:n||(c[C]=void 0))}),l&&(this._toggleBestFitMode(!1),l=!1,h&&h!==S.getActiveElement()&&(Pe(h).bottom<0||vY(h,p))),d=this._correctColumnWidths(c,t),n&&(function(){let C;x(t,(v,b)=>{b.type==="groupExpand"&&(C=c[v])}),x(t,(v,b)=>{b.type==="groupExpand"&&C&&(c[v]=C)})}(),this._needStretch()&&this._processStretch(c,t)),pt(()=>{(r||d||s)&&this._setVisibleWidths(t,c),o&&this._toggleContentMinHeight(!1)})})}_needBestFit(){return this.option("columnAutoWidth")}_needStretch(){return this._columnsController.getVisibleColumns().some(e=>e.width==="auto"&&!e.command)}_getAverageColumnsWidth(e){let t=CP(this,e),n=e.filter(o=>o===void 0).length;return t/n}_correctColumnWidths(e,t){let n=this,o,s=!1,r=!1,a=!1,l=n.component.$element(),d=n._hasWidth;for(o=0;o<t.length;o++){let c=o,h=t[c],p=e[c]==="adaptiveHidden",g=e[c],{minWidth:C}=h;C&&(g===void 0?g=n._getAverageColumnsWidth(e):Su(g)&&xY(n,c,C,e)<0&&(g=-1));let v=n._getRealColumnWidth(c,e.map((b,T)=>c===T?g:b));C&&!p&&v<C&&(e[c]=C,a=!0,o=-1),f(h.width)||(r=!0),Su(h.width)&&(s=!0)}if(!r&&e.length){let c=n._rowsView.element(),h=n._rowsView.contentWidth(),p=n._rowsView.getScrollbarWidth(),g=n._getTotalWidth(e,h);if(g<h){let C=R.getLastResizableColumnIndex(t,e);if(C>=0&&(e[C]="auto",a=!0,d===!1&&!s)){let v=n.option("showBorders")?Math.ceil(ae(c)-Cl(c)):0;n._maxWidth=g+p+v,l.css("maxWidth",n._maxWidth)}}}return a}_processStretch(e,t){let n=this._rowsView.contentWidth(),o=this._getTotalWidth(e,n),s={length:0};if(!e.length)return;x(t,function(d){(this.width||e[d]==="adaptiveHidden")&&(s[d]=!0,s.length++)});let r=n-o,a=Math.floor(r/(e.length-s.length)),l=r-a*(e.length-s.length);if(r>=0)for(let d=0;d<e.length;d++)s[d]||(e[d]+=a,l>0&&(l<1?(e[d]+=l,l=0):(e[d]++,l--)))}_getRealColumnWidth(e,t,n){let o=1,s=t[e];if(!Su(s))return parseFloat(s);let r=t.reduce((c,h,p)=>Su(h)?c+parseFloat(h):c,0),a=t.reduce((c,h)=>!h||h==="adaptiveHidden"||Su(h)?c:c+parseFloat(h),0);n=n||this._rowsView.contentWidth();let l=n-a,d=r*n/100;return a>0&&d+a>=n&&(o=d>l?l/d:1),parseFloat(s)*n*o/100}_getTotalWidth(e,t){let n=0;for(let o=0;o<e.length;o++){let s=e[o];s&&s!=="adaptiveHidden"&&(n+=this._getRealColumnWidth(o,e,t))}return Math.ceil(n)}_getGroupElement(){return this.component.$element().children().get(0)}updateSize(e){let t=this,n=u(e),o=t.addWidgetPrefix("important-margin");if(t._hasHeight===void 0&&n&&n.is(":visible")&&W(n)){let s=n.children(`.${t.getWidgetContainerClass()}`);s.length&&s.detach(),t._hasHeight=!!Q(n);let r=W(n);n.addClass(o),t._hasWidth=W(n)===r,n.removeClass(o),s.length&&s.appendTo(n)}}publicMethods(){return["resize","updateDimensions"]}_waitAsyncTemplates(){var e,t,n;return P((e=this._columnHeadersView)===null||e===void 0?void 0:e.waitAsyncTemplates(!0),(t=this._rowsView)===null||t===void 0?void 0:t.waitAsyncTemplates(!0),(n=this._footerView)===null||n===void 0?void 0:n.waitAsyncTemplates(!0))}resize(){if(this.component._requireResize)return new y().resolve();let e=new y;return this._waitAsyncTemplates().done(()=>{P(this.updateDimensions()).done(e.resolve).fail(e.reject)}).fail(e.reject),e.promise()}updateDimensions(e){let t=this;if(t._initPostRenderHandlers(),!t._checkSize(e))return;let n=t._resizeDeferred,o=t._resizeDeferred=new y;return P(n).always(()=>{pt(()=>{t._dataController.isLoaded()&&t._synchronizeColumns(),t._resetGroupElementHeight(),Ci(()=>{pt(()=>{Ci(()=>{t._updateDimensionsCore()})})})}).done(o.resolve).fail(o.reject)}),o.promise()}_resetGroupElementHeight(){let e=this._getGroupElement(),t=this._rowsView.getScrollable();e&&e.style.height&&(!t||!t.scrollTop())&&(e.style.height="")}_checkSize(e){let t=this.component.$element(),n=t.is(":visible"),o=this._lastWidth!==W(t)||this._lastHeight!==Q(t)||this._devicePixelRatio!==q().devicePixelRatio;return n&&(!e||o)}_setScrollerSpacingCore(){let e=this,t=e._rowsView.getScrollbarWidth(),n=e._rowsView.getScrollbarWidth(!0);pt(()=>{e._columnHeadersView&&e._columnHeadersView.setScrollerSpacing(t),e._footerView&&e._footerView.setScrollerSpacing(t),e._rowsView.setScrollerSpacing(t,n)})}_setScrollerSpacing(){let e=this._rowsView.getScrollable(),t=this.option("scrolling.useNative")===!0;!e||t?pt(()=>{Ci(()=>{this._setScrollerSpacingCore()})}):this._setScrollerSpacingCore()}_setAriaOwns(){var e,t,n;let o=(e=this._columnHeadersView)===null||e===void 0?void 0:e.getTableElement(),s=(t=this._footerView)===null||t===void 0?void 0:t.getTableElement();(n=this._rowsView)===null||n===void 0||n.setAriaOwns(o?.attr("id"),s?.attr("id"))}_updateDimensionsCore(){let e=this,t=e._dataController,n=e._rowsView,o=e.component.$element(),s=this._getGroupElement(),r=Q(o),a=e.option("height")??o.get(0).style.height,l=!!a&&a!=="auto",d=parseInt(o.css("maxHeight")),c=d&&r>=d,h=s&&s.scrollHeight===s.offsetHeight;e.updateSize(o),pt(()=>{let p=e._hasHeight||!!d||l;if(n.hasHeight(p),this._setAriaOwns(),c&&!h&&u(s).css("height",d),!t.isLoaded()){n.setLoading(t.isLoading());return}Ci(()=>{e._updateLastSizes(o),e._setScrollerSpacing(),x(Vy,(g,C)=>{let v=e.getView(C);v&&v.resize()}),this._editorFactoryController&&this._editorFactoryController.resize()})})}_updateLastSizes(e){this._lastWidth=W(e),this._lastHeight=Q(e),this._devicePixelRatio=q().devicePixelRatio}optionChanged(e){switch(e.name){case"width":case"height":this.component._renderDimensions(),this.resize();case"renderAsync":e.handled=!0;return;default:super.optionChanged(e)}}},ky=class extends ye.ViewController{_scrollChangedHandler(e,t,n){for(let o=0;o<e.length;o++)e[o]&&e[o].name!==n&&e[o].scrollTo({left:t.left,top:t.top})}init(){let e=[this.getView("columnHeadersView"),this.getView("footerView"),this.getView("rowsView")];for(let t=0;t<e.length;t++){let n=e[t];n&&n.scrollChanged.add(this._scrollChangedHandler.bind(this,e))}}},By=class extends ye.View{init(){this._resizingController=this.getController("resizing"),this._dataController=this.getController("data")}_endUpdateCore(){this.component._requireResize&&(this.component._requireResize=!1,this._resizingController.resize())}getView(e){return this.component._views[e]}element(){return this._groupElement}optionChanged(e){let t=this;f(t._groupElement)&&e.name==="showBorders"?(t._groupElement.toggleClass(t.addWidgetPrefix("borders"),!!e.value),e.handled=!0):super.optionChanged(e)}_renderViews(e){let t=this;x(Vy,(n,o)=>{let s=t.getView(o);s&&s.render(e)})}_getTableRoleName(){return"group"}render(e){let t=!this._groupElement,n=this._groupElement||u("<div>").addClass(this.getWidgetContainerClass());n.addClass("dx-gridbase-container"),n.toggleClass(this.addWidgetPrefix("borders"),!!this.option("showBorders")),this.setAria("role","presentation",e),this.component.setAria("role",this._getTableRoleName(),n),this._rootElement=e||this._rootElement,t&&(this._groupElement=n,j()&&this._resizingController.updateSize(e),n.appendTo(e)),this._a11yGeneralStatusElement||(this._a11yGeneralStatusElement=_P({}),this._a11yGeneralStatusElement.attr(_Y.a11yStatusContainer,"true"),n.append(this._a11yGeneralStatusElement)),this._renderViews(n)}update(){let e=this,t=e._rootElement,n=e._groupElement;t&&n&&(this._resizingController.resize(),e._dataController.isLoaded()&&e._resizingController.fireContentReadyAction())}setWidgetA11yStatusText(e){var t;(t=this._a11yGeneralStatusElement)===null||t===void 0||t.text(e)}},xP={defaultOptions:()=>({showBorders:!1,renderAsync:!1}),controllers:{resizing:Py,synchronizeScrolling:ky},views:{gridView:By},VIEW_NAMES:Vy};$.registerModule("gridView",xP);var bY=Ql.inherit({_initMarkup(){this._deferredItems=[],this.callBase()},_renderItemContent(i){let e=y(),t=y();this._deferredItems[i.index]=t;let n=this.callBase.call(this,i);return t.done(()=>{e.resolve(n)}),e.promise()},_onItemTemplateRendered(i,e){return()=>{this._deferredItems[e.index].resolve()}},_postProcessRenderItems:E,_renderItemsAsync(){let i=y();return P.apply(this,this._deferredItems).done(()=>{this._postProcessRenderItems(),i.resolve()}),i.promise()},_clean(){this.callBase(),this._deferredItems=[]}}),vP=bY;var bP=vP;var yY=bP,yP=yY;var gm="dx-toolbar";var OY="dxToolbarItemDataKey";var mm=class extends yP{_getSynchronizableOptionsForCreateComponent(){return super._getSynchronizableOptionsForCreateComponent().filter(e=>e!=="disabled")}_initTemplates(){super._initTemplates();let e=new Ai((t,n,o)=>{if(X(n)){let{text:s,html:r,widget:a}=n;s&&t.text(s).wrapInner("<div>"),r&&t.html(r),a==="dxDropDownButton"&&(n.options=n.options??{},f(n.options.stylingMode)||(n.options.stylingMode=this.option("useFlatButtons")?"text":"contained")),a==="dxButton"&&(this.option("useFlatButtons")&&(n.options=n.options??{},n.options.stylingMode=n.options.stylingMode??"text"),this.option("useDefaultButtons")&&(n.options=n.options??{},n.options.type=n.options.type??"default"))}else t.text(String(n));this._getTemplate("dx-polymorph-widget").render({container:t,model:o,parent:this})},["text","html","widget","options"],this.option("integrationOptions.watchMethod"));this._templateManager.addDefaultTemplates({item:e,menuItem:e})}_getDefaultOptions(){return I({},super._getDefaultOptions(),{renderAs:"topToolbar",grouped:!1,useFlatButtons:!1,useDefaultButtons:!1})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>wt(),options:{useFlatButtons:!0}}])}_itemContainer(){return this._$toolbarItemsContainer.find([".dx-toolbar-before",".dx-toolbar-center",".dx-toolbar-after"].join(","))}_itemClass(){return"dx-toolbar-item"}_itemDataKey(){return OY}_dimensionChanged(e){this._disposed||(this._arrangeItems(),this._applyCompactMode())}_initMarkup(){this._renderToolbar(),this._renderSections(),super._initMarkup()}_render(){super._render(),this._renderItemsAsync(),this._updateDimensionsInMaterial()}_postProcessRenderItems(){this._arrangeItems()}_renderToolbar(){this.$element().addClass(gm),this._$toolbarItemsContainer=u("<div>").addClass("dx-toolbar-items-container").appendTo(this.$element()),this.setAria("role","toolbar")}_renderSections(){let e=this._$toolbarItemsContainer;x(["before","center","after"],(t,n)=>{let o=`dx-toolbar-${n}`;e.find(`.${o}`).length||(this[`_$${n}Section`]=u("<div>").addClass(o).attr("role","presentation").appendTo(e))})}_arrangeItems(e){var t,n;let o=e??W(this.$element());this._$centerSection.css({margin:"0 auto",float:"none"});let s=Pe((t=this._$beforeSection)===null||t===void 0?void 0:t.get(0)),r=Pe((n=this._$afterSection)===null||n===void 0?void 0:n.get(0));this._alignCenterSection(s,r,o);let a=this._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0),l=a.parent();if(!a.length)return;let d=s.width?s.width:a.position().left,c=l.hasClass("dx-toolbar-before")?0:d,h=l.hasClass("dx-toolbar-after")?0:r.width,p=0;l.children().not(".dx-toolbar-label").each((v,b)=>{p+=ae(b)});let g=o-p,C=Math.max(g-c-h,0);if(l.hasClass("dx-toolbar-before"))this._alignSection(this._$beforeSection,C);else{let v=ae(a)-W(a);a.css("maxWidth",C-v)}}_alignCenterSection(e,t,n){var o;this._alignSection(this._$centerSection,n-e.width-t.width);let s=this.option("rtlEnabled"),r=s?t:e,a=s?e:t,l=Pe((o=this._$centerSection)===null||o===void 0?void 0:o.get(0));(r.right>l.left||l.right>a.left)&&this._$centerSection.css({marginLeft:r.width,marginRight:a.width,float:r.width>a.width?"none":"right"})}_alignSection(e,t){let o=e.find(".dx-toolbar-label").toArray();t-=this._getCurrentLabelsPaddings(o);let s=this._getCurrentLabelsWidth(o),r=Math.abs(s-t);t<s?(o=o.reverse(),this._alignSectionLabels(o,r,!1)):this._alignSectionLabels(o,r,!0)}_alignSectionLabels(e,t,n){let o=function(s){return Pe(s).width};for(let s=0;s<e.length;s++){let r=u(e[s]),a=Math.ceil(o(e[s])),l;n&&r.css("maxWidth","inherit");let d=Math.ceil(n?o(e[s]):a);if(d<t)l=n?d:0,t-=d;else{l=n?a+t:a-t,r.css("maxWidth",l);break}r.css("maxWidth",l)}}_applyCompactMode(){let e=u(this.element());e.removeClass("dx-toolbar-compact"),this.option("compactMode")&&this._getSummaryItemsSize("width",this._itemElements(),!0)>W(e)&&e.addClass("dx-toolbar-compact")}_getCurrentLabelsWidth(e){let t=0;return e.forEach(n=>{t+=ae(n)}),t}_getCurrentLabelsPaddings(e){let t=0;return e.forEach(n=>{t+=ae(n)-W(n)}),t}_renderItem(e,t,n,o){let s=t.location??"center",r=n??this[`_$${s}Section`],a=!!(t.text??t.html),l=super._renderItem(e,t,r,o);return l.toggleClass("dx-toolbar-button",!a).toggleClass("dx-toolbar-label",a).addClass(t.cssClass),l}_renderGroupedItems(){x(this.option("items"),(e,t)=>{let n=t.items,o=u("<div>").addClass("dx-toolbar-group"),s=t.location??"center";!n||!n.length||(x(n,(r,a)=>{this._renderItem(r,a,o,null)}),this._$toolbarItemsContainer.find(`.dx-toolbar-${s}`).append(o))})}_renderItems(e){this.option("grouped")&&e.length&&e[0].items?this._renderGroupedItems():super._renderItems(e)}_getToolbarItems(){return this.option("items")??[]}_renderContentImpl(){let e=this._getToolbarItems();this.$element().toggleClass("dx-toolbar-mini",e.length===0),this._renderedItemsCount?this._renderItems(e.slice(this._renderedItemsCount)):this._renderItems(e),this._applyCompactMode()}_renderEmptyMessage(){}_clean(){this._$toolbarItemsContainer.children().empty(),this.$element().empty(),delete this._$beforeSection,delete this._$centerSection,delete this._$afterSection}_visibilityChanged(e){e&&this._arrangeItems()}_isVisible(){return W(this.$element())>0&&Q(this.$element())>0}_getIndexByItem(e){return this._getToolbarItems().indexOf(e)}_itemOptionChanged(e,t,n,o){super._itemOptionChanged(e,t,n,o),this._arrangeItems()}_optionChanged(e){let{name:t}=e;switch(t){case"width":super._optionChanged(e),this._dimensionChanged();break;case"renderAs":case"useFlatButtons":case"useDefaultButtons":this._invalidate();break;case"compactMode":this._applyCompactMode();break;case"grouped":break;default:super._optionChanged(e)}}_dispose(){super._dispose(),clearTimeout(this._waitParentAnimationTimeout)}_updateDimensionsInMaterial(){if(ht()){let e=()=>new Promise(n=>{let o=()=>{let r=!0;return this.$element().parents().each((a,l)=>{if(fe.isAnimating(u(l)))return r=!1,!1}),r&&n(),r},s=()=>{clearTimeout(this._waitParentAnimationTimeout),this._waitParentAnimationTimeout=setTimeout(()=>o()||s(),15)};s()}),t=()=>{let n=this.$element().find(".dx-toolbar-label"),o=[];return n.each((s,r)=>{let a=u(r).text(),l=u(r).css("fontWeight");o.push(iA(a,l))}),Promise.all(o)};Promise.all([e(),t()]).then(()=>{this._dimensionChanged()})}}};K("dxToolbarBase",mm);var Ly=mm;var EY=["dxAutocomplete","dxButton","dxCheckBox","dxDateBox","dxMenu","dxSelectBox","dxTabs","dxTextBox","dxButtonGroup","dxDropDownButton"],wY=function(i){let e=i.data&&i.data(),t=e&&e.dxComponents,n=t&&t[0];return n&&e[n]};function gd(i,e){var t;if(!i)return;let n=i._findItemElementByItem(e);if(!n.length)return;let o=i._getItemData(n),s=!!((t=o.options)!==null&&t!==void 0&&t.disabled||o.disabled||i.option("disabled")),{widget:r}=o;if(r&&EY.includes(r)){let d=n.find(r.toLowerCase().replace("dx",".dx-"));if(d.length){var a,l;let c=wY(d);if(!c)return;let h=(a=c._focusTarget)===null||a===void 0?void 0:a.call(c);r==="dxDropDownButton"?h=h&&h.find(".dx-buttongroup"):h=h??u(c.element());let p=(l=o.options)===null||l===void 0?void 0:l.tabIndex;s?h.attr("tabIndex",-1):h.attr("tabIndex",p??0)}}}var fm=class{constructor(e){this._toolbar=e}_initMarkup(){}_updateMenuVisibility(){}_renderMenuItems(){}_renderItem(){}_getMenuItems(){}_getToolbarItems(){return this._toolbar.option("items")??[]}_getItemsWidth(){return this._toolbar._getSummaryItemsSize("width",this._toolbar._itemElements(),!0)}_arrangeItems(){let e=this._toolbar._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0);if(!e.length)return;let t=W(this._toolbar.$element()),n=ae(e)-W(e);e.css("maxWidth",t-n)}_hideOverflowItems(){}_dimensionChanged(){}_itemOptionChanged(){}_optionChanged(){}};var _m="dxResizable";var SY=D(js,_m),IY=D(Po,_m),DY=D(Ks,_m),TY={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"},OP=pn.inherit({_getDefaultOptions(){return m(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(){this.callBase(),this.$element().addClass("dx-resizable")},_initMarkup(){this.callBase(),this._renderHandles()},_render(){this.callBase(),this._renderActions()},_renderActions(){this._resizeStartAction=this._createActionByOption("onResizeStart"),this._resizeEndAction=this._createActionByOption("onResizeEnd"),this._resizeAction=this._createActionByOption("onResize")},_renderHandles(){this._handles=[];let i=this.option("handles");if(i==="none"||!i)return;let e=i==="all"?["top","bottom","left","right"]:i.split(" "),t={};x(e,(n,o)=>{t[o]=!0,this._renderHandle(o)}),t.bottom&&t.right&&this._renderHandle("corner-bottom-right"),t.bottom&&t.left&&this._renderHandle("corner-bottom-left"),t.top&&t.right&&this._renderHandle("corner-top-right"),t.top&&t.left&&this._renderHandle("corner-top-left"),this._attachEventHandlers()},_renderHandle(i){let e=u("<div>").addClass("dx-resizable-handle").addClass(`dx-resizable-handle-${i}`).appendTo(this.$element());this._handles.push(e)},_attachEventHandlers(){if(this.option("disabled"))return;let i={};i[SY]=this._dragStartHandler.bind(this),i[IY]=this._dragHandler.bind(this),i[DY]=this._dragEndHandler.bind(this),this._handles.forEach(e=>{_.on(e,i,{direction:"both",immediate:!0})})},_detachEventHandlers(){this._handles.forEach(i=>{_.off(i)})},_toggleEventHandlers(i){i?this._attachEventHandlers():this._detachEventHandlers()},_getElementSize(){let i=this.$element();return i.css("boxSizing")==="border-box"?{width:ae(i),height:ee(i)}:{width:W(i),height:Q(i)}},_dragStartHandler(i){let e=this.$element();if(e.is(".dx-state-disabled, .dx-state-disabled *")){i.cancel=!0;return}this._toggleResizingClass(!0),this._movingSides=this._getMovingSides(i),this._elementLocation=Ti(e),this._elementSize=this._getElementSize(),this._renderDragOffsets(i),this._resizeStartAction({event:i,width:this._elementSize.width,height:this._elementSize.height,handles:this._movingSides}),i.targetElements=null},_toggleResizingClass(i){this.$element().toggleClass("dx-resizable-resizing",i)},_renderDragOffsets(i){let e=this._getArea();if(!e)return;let t=u(i.target).closest(".dx-resizable-handle"),n=ae(t),o=ee(t),s=t.offset(),r=e.offset,a=this._getAreaScrollOffset();i.maxLeftOffset=this._leftMaxOffset=s.left-r.left-a.scrollX,i.maxRightOffset=this._rightMaxOffset=r.left+e.width-s.left-n+a.scrollX,i.maxTopOffset=this._topMaxOffset=s.top-r.top-a.scrollY,i.maxBottomOffset=this._bottomMaxOffset=r.top+e.height-s.top-o+a.scrollY},_getBorderWidth(i,e){if(Ue(i.get(0)))return 0;let t=i.css(TY[e]);return parseInt(t)||0},_proportionate(i,e){let t=this._elementSize,n=i==="x"?t.width/t.height:t.height/t.width;return e*n},_getProportionalDelta(i){let{x:e,y:t}=i,n=this._proportionate("y",e);if(n>=t)return{x:e,y:n};let o=this._proportionate("x",t);return o>=e?{x:o,y:t}:{x:0,y:0}},_getDirectionName(i){let e=this._movingSides;return i==="x"?e.left?"left":"right":e.top?"top":"bottom"},_fitIntoArea(i,e){let t=this._getDirectionName(i);return Math.min(e,this[`_${t}MaxOffset`]??1/0)},_fitDeltaProportionally(i){let e=I({},i),t=this._elementSize,{minWidth:n,minHeight:o,maxWidth:s,maxHeight:r}=this.option(),a=()=>t.width+e.x,l=()=>t.height+e.y,d=p=>e[p]===this._fitIntoArea(p,e[p]),c=()=>An(a(),n,s)&&d("x"),h=()=>An(l(),o,r)&&d("y");if(!c()){let p=this._fitIntoArea("x",It(a(),n,s)-t.width);e={x:p,y:this._proportionate("y",p)}}if(!h()){let p=this._fitIntoArea("y",It(l(),o,r)-t.height);e={x:this._proportionate("x",p),y:p}}return c()&&h()?e:{x:0,y:0}},_fitDelta(i){let{x:e,y:t}=i,n=this._elementSize,{minWidth:o,minHeight:s,maxWidth:r,maxHeight:a}=this.option();return{x:It(n.width+e,o,r)-n.width,y:It(n.height+t,s,a)-n.height}},_getDeltaByOffset(i){let e=this._movingSides,t=this._isCornerHandler(e)&&this.option("keepAspectRatio"),n={x:i.x*(e.left?-1:1),y:i.y*(e.top?-1:1)};if(t){let o=this._getProportionalDelta(n);n=this._fitDeltaProportionally(o)}else{let o=this._fitDelta(n);n=this._roundByStep(o)}return n},_updatePosition(i,e){let{width:t,height:n}=e,o=this._elementLocation,s=this._movingSides,r=this.$element(),a=this._getElementSize(),l=i.y*(s.top?-1:1)-((a.height||n)-n),d=i.x*(s.left?-1:1)-((a.width||t)-t);Ve(r,{top:o.top+(s.top?l:0),left:o.left+(s.left?d:0)})},_dragHandler(i){let e=this._getOffset(i),t=this._getDeltaByOffset(e),n=this._updateDimensions(t);this._updatePosition(t,n),this._triggerResizeAction(i,n)},_updateDimensions(i){let e=d=>d.substring(d.length-2)==="px",t=this.option("stepPrecision")==="strict",n=this._elementSize,o=n.width+i.x,s=n.height+i.y,r=this.$element().get(0).style,a=i.x||t||e(r.width),l=i.y||t||e(r.height);return a&&this.option({width:o}),l&&this.option({height:s}),{width:a?o:n.width,height:l?s:n.height}},_triggerResizeAction(i,e){let{width:t,height:n}=e;this._resizeAction({event:i,width:this.option("width")||t,height:this.option("height")||n,handles:this._movingSides}),Li(this.$element())},_isCornerHandler:i=>Object.values(i).reduce((e,t)=>e^t,0)===0,_getOffset(i){let{offset:e}=i,t=this._movingSides;return!t.left&&!t.right&&(e.x=0),!t.top&&!t.bottom&&(e.y=0),e},_roundByStep(i){return this.option("stepPrecision")==="strict"?this._roundStrict(i):this._roundNotStrict(i)},_getSteps(){return pl(this.option("step"),!this.option("roundStepValue"))},_roundNotStrict(i){let e=this._getSteps();return{x:i.x-i.x%e.h,y:i.y-i.y%e.v}},_roundStrict(i){let e=this._movingSides,t={x:i.x*(e.left?-1:1),y:i.y*(e.top?-1:1)},n=this._getSteps(),o=this._elementLocation,s=this._elementSize,r=e.left?o.left:o.left+s.width,a=e.top?o.top:o.top+s.height,l=(r+t.x)%n.h,d=(a+t.y)%n.v,c=Math.sign||(T=>(T=+T,T===0||isNaN(T)?T:T>0?1:-1)),h=(T,M)=>(1+.2*c(M))%1*T,p=(T,M)=>Math.abs(T)<.2*M,g=t.x-l,C=t.y-d;l>h(n.h,t.x)&&(g+=n.h),d>h(n.v,t.y)&&(C+=n.v);let v=(e.left||e.right)&&!p(t.x,n.h)?g:0,b=(e.top||e.bottom)&&!p(t.y,n.v)?C:0;return{x:v*(e.left?-1:1),y:b*(e.top?-1:1)}},_getMovingSides(i){let e=u(i.target),t=e.hasClass("dx-resizable-handle-corner-top-left"),n=e.hasClass("dx-resizable-handle-corner-top-right"),o=e.hasClass("dx-resizable-handle-corner-bottom-left"),s=e.hasClass("dx-resizable-handle-corner-bottom-right");return{top:e.hasClass("dx-resizable-handle-top")||t||n,left:e.hasClass("dx-resizable-handle-left")||t||o,bottom:e.hasClass("dx-resizable-handle-bottom")||o||s,right:e.hasClass("dx-resizable-handle-right")||n||s}},_getArea(){let i=this.option("area");return A(i)&&(i=i.call(this)),X(i)?this._getAreaFromObject(i):this._getAreaFromElement(i)},_getAreaScrollOffset(){let i=this.option("area"),e=!A(i)&&!X(i),t={scrollY:0,scrollX:0};if(e){let n=u(i)[0];Ue(n)&&(t.scrollX=n.pageXOffset,t.scrollY=n.pageYOffset)}return t},_getAreaFromObject(i){let e={width:i.right-i.left,height:i.bottom-i.top,offset:{left:i.left,top:i.top}};return this._correctAreaGeometry(e),e},_getAreaFromElement(i){let e=u(i),t;return e.length&&(t={width:Cl(e),height:_a(e),offset:m({top:0,left:0},Ue(e[0])?{}:e.offset())},this._correctAreaGeometry(t,e)),t},_correctAreaGeometry(i,e){let t=e?this._getBorderWidth(e,"left"):0,n=e?this._getBorderWidth(e,"top"):0;i.offset.left+=t+this._getBorderWidth(this.$element(),"left"),i.offset.top+=n+this._getBorderWidth(this.$element(),"top"),i.width-=ae(this.$element())-Cl(this.$element()),i.height-=ee(this.$element())-_a(this.$element())},_dragEndHandler(i){let e=this.$element();this._resizeEndAction({event:i,width:ae(e),height:ee(e),handles:this._movingSides}),this._toggleResizingClass(!1)},_renderWidth(i){this.option("width",It(i,this.option("minWidth"),this.option("maxWidth")))},_renderHeight(i){this.option("height",It(i,this.option("minHeight"),this.option("maxHeight")))},_optionChanged(i){switch(i.name){case"disabled":this._toggleEventHandlers(!i.value),this.callBase(i);break;case"handles":this._invalidate();break;case"minWidth":case"maxWidth":j()&&this._renderWidth(ae(this.$element()));break;case"minHeight":case"maxHeight":j()&&this._renderHeight(ee(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(i)}},_clean(){this.$element().find(".dx-resizable-handle").remove()},_useTemplates:()=>!1});K(_m,OP);var EP=OP;var wP=EP;var Ny=class{constructor(e){this.init(e)}init(e){let{dragEnabled:t,handle:n,draggableElement:o,positionController:s}=e;this._positionController=s,this._draggableElement=o,this._handle=n,this._dragEnabled=t,this.unsubscribe(),t&&this.subscribe()}moveDown(e){this._moveTo(5,0,e)}moveUp(e){this._moveTo(-5,0,e)}moveLeft(e){this._moveTo(0,-5,e)}moveRight(e){this._moveTo(0,5,e)}subscribe(){let e=this._getEventNames();_.on(this._handle,e.startEventName,t=>{this._dragStartHandler(t)}),_.on(this._handle,e.updateEventName,t=>{this._dragUpdateHandler(t)}),_.on(this._handle,e.endEventName,t=>{this._dragEndHandler(t)})}unsubscribe(){let e=this._getEventNames();_.off(this._handle,e.startEventName),_.off(this._handle,e.updateEventName),_.off(this._handle,e.endEventName)}_getEventNames(){let e=D(js,"overlayDrag"),t=D(Po,"overlayDrag"),n=D(Ks,"overlayDrag");return{startEventName:e,updateEventName:t,endEventName:n}}_dragStartHandler(e){let t=this._getAllowedOffsets();this._prevOffset={x:0,y:0},e.targetElements=[],e.maxTopOffset=t.top,e.maxBottomOffset=t.bottom,e.maxLeftOffset=t.left,e.maxRightOffset=t.right}_dragUpdateHandler(e){let t={top:e.offset.y-this._prevOffset.y,left:e.offset.x-this._prevOffset.x};this._moveByOffset(t),this._prevOffset=e.offset}_dragEndHandler(e){this._positionController.dragHandled(),this._positionController.detectVisualPositionChange(e)}_moveTo(e,t,n){if(!this._dragEnabled)return;n.preventDefault(),n.stopPropagation();let o=this._fitOffsetIntoAllowedRange(e,t);this._moveByOffset(o),this._dragEndHandler(n)}_fitOffsetIntoAllowedRange(e,t){let n=this._getAllowedOffsets();return{top:It(e,-n.top,n.bottom),left:It(t,-n.left,n.right)}}_getContainerDimensions(){let e=S.getDocument(),t=this._positionController.$dragResizeContainer.get(0),n=ae(t),o=ee(t);return Ue(t)&&(o=Math.max(e.body.clientHeight,o),n=Math.max(e.body.clientWidth,n)),{width:n,height:o}}_getContainerPosition(){let e=this._positionController.$dragResizeContainer.get(0);return Ue(e)?{top:0,left:0}:xl(e)}_getElementPosition(){return xl(this._draggableElement)}_getInnerDelta(){let e=this._getContainerDimensions(),t=this._getElementDimensions();return{x:e.width-t.width,y:e.height-t.height}}_getOuterDelta(){let{width:e,height:t}=this._getElementDimensions(),{outsideDragFactor:n}=this._positionController;return{x:e*n,y:t*n}}_getFullDelta(){let e=this._getInnerDelta(),t=this._getOuterDelta();return{x:e.x+t.x,y:e.y+t.y}}_getElementDimensions(){return{width:this._draggableElement.offsetWidth,height:this._draggableElement.offsetHeight}}_getAllowedOffsets(){let e=this._getFullDelta();if(!(e.y>=0&&e.x>=0))return{top:0,bottom:0,left:0,right:0};let n=this._getElementPosition(),o=this._getContainerPosition(),s=this._getOuterDelta();return{top:n.top-o.top+s.y,bottom:-n.top+o.top+e.y,left:n.left-o.left+s.x,right:-n.left+o.left+e.x}}_moveByOffset(e){let t=Ti(this._draggableElement),n={left:t.left+e.left,top:t.top+e.top};Ve(this._draggableElement,n)}},SP=Ny;var AY={setOverflow:E,restoreOverflow:E},IP=()=>{if(!j())return AY;let i=q(),{documentElement:e}=S.getDocument(),t=S.getBody(),n=F.real().platform==="ios",o={overflow:null,overflowX:null,overflowY:null,paddingRight:null,position:null,top:null,left:null};return{setOverflow:n?()=>{if(f(o.position)||t.style.position==="fixed")return;let{scrollY:s,scrollX:r}=i;o.position=t.style.position,o.top=t.style.top,o.left=t.style.left,t.style.setProperty("position","fixed"),t.style.setProperty("top",-s+"px"),t.style.setProperty("left",-r+"px")}:()=>{(()=>{let s=i.innerWidth-e.clientWidth;if(o.paddingRight||s<=0)return;let r=i.getComputedStyle(t).getPropertyValue("padding-right"),a=parseInt(r,10);o.paddingRight=a,t.style.setProperty("padding-right",`${a+s}px`)})(),!(o.overflow||t.style.overflow==="hidden")&&(o.overflow=t.style.overflow,o.overflowX=t.style.overflowX,o.overflowY=t.style.overflowY,t.style.setProperty("overflow","hidden"))},restoreOverflow:n?()=>{if(!f(o.position))return;let s=-parseInt(t.style.top,10),r=-parseInt(t.style.left,10);["position","top","left"].forEach(a=>{o[a]?t.style.setProperty(a,o[a]):t.style.removeProperty(a)}),i.scrollTo(r,s),o.position=null}:()=>{f(o.paddingRight)&&(o.paddingRight?t.style.setProperty("padding-right",`${o.paddingRight}px`):t.style.removeProperty("padding-right"),o.paddingRight=null),["overflow","overflowX","overflowY"].forEach(s=>{if(!f(o[s]))return;let r=s.replace(/(X)|(Y)/,a=>`-${a.toLowerCase()}`);o[s]?t.style.setProperty(r,o[s]):t.style.removeProperty(r),o[s]=null})}}};var MY=["fullScreen","forceApplyBindings","dragOutsideBoundary","dragAndResizeArea","outsideDragFactor"],Hy=q(),Cm=class extends $r{constructor(e){let{fullScreen:t,forceApplyBindings:n,dragOutsideBoundary:o,dragAndResizeArea:s,outsideDragFactor:r}=e,a=_e(e,MY);super(a),this._props=I({},this._props,{fullScreen:t,forceApplyBindings:n,dragOutsideBoundary:o,dragAndResizeArea:s,outsideDragFactor:r}),this._$dragResizeContainer=void 0,this._updateDragResizeContainer()}set fullScreen(e){this._props.fullScreen=e,e?this._fullScreenEnabled():this._fullScreenDisabled()}get $dragResizeContainer(){return this._$dragResizeContainer}get outsideDragFactor(){return this._props.dragOutsideBoundary?1:this._props.outsideDragFactor}set dragAndResizeArea(e){this._props.dragAndResizeArea=e,this._updateDragResizeContainer()}set dragOutsideBoundary(e){this._props.dragOutsideBoundary=e,this._updateDragResizeContainer()}set outsideDragFactor(e){this._props.outsideDragFactor=e}updateContainer(e){super.updateContainer(e),this._updateDragResizeContainer()}dragHandled(){this.restorePositionOnNextRender(!1)}resizeHandled(){this.restorePositionOnNextRender(!1)}positionContent(){if(this._props.fullScreen)Ve(this._$content,{top:0,left:0}),this.detectVisualPositionChange();else{var e,t;(e=(t=this._props).forceApplyBindings)===null||e===void 0||e.call(t),super.positionContent()}}_updateDragResizeContainer(){this._$dragResizeContainer=this._getDragResizeContainer()}_getDragResizeContainer(){return this._props.dragOutsideBoundary?u(Hy):this._props.dragAndResizeArea?u(this._props.dragAndResizeArea):Cp().get(0)||this._props.container?this._$markupContainer:u(Hy)}_getVisualContainer(){return this._props.fullScreen?u(Hy):super._getVisualContainer()}_fullScreenEnabled(){this.restorePositionOnNextRender(!1)}_fullScreenDisabled(){this.restorePositionOnNextRender(!0)}};var RY=q();var DP=["cancel","clear","done"];var FY=we.safari&&Wp(we.version,[11])<0,ta={static:"",inherit:"dx-popup-inherit-height",flex:"dx-popup-flex-height"},PY=i=>{let e=F.current(),{platform:t}=e,n="bottom",o="before";if(t==="ios")switch(i){case"cancel":n="top";break;case"clear":n="top",o="after";break;case"done":o="after"}else if(t==="android")switch(i){case"cancel":case"done":o="after"}return{toolbar:n,location:o}},TP=nn.inherit({_supportedKeys(){return m(this.callBase(),{upArrow:i=>{var e;(e=this._drag)===null||e===void 0||e.moveUp(i)},downArrow:i=>{var e;(e=this._drag)===null||e===void 0||e.moveDown(i)},leftArrow:i=>{var e;(e=this._drag)===null||e===void 0||e.moveLeft(i)},rightArrow:i=>{var e;(e=this._drag)===null||e===void 0||e.moveRight(i)}})},_getDefaultOptions(){return m(this.callBase(),{fullScreen:!1,title:"",showTitle:!0,titleTemplate:"title",onTitleRendered:null,dragOutsideBoundary:!1,dragEnabled:!1,dragAndResizeArea:void 0,enableBodyScroll:!0,outsideDragFactor:0,onResizeStart:null,onResize:null,onResizeEnd:null,resizeEnabled:!1,toolbarItems:[],showCloseButton:!1,bottomTemplate:"bottom",useDefaultToolbarButtons:!1,useFlatToolbarButtons:!1,autoResizeEnabled:!0})},_defaultOptionsRules(){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:i=>F.real().deviceType==="desktop"&&i.platform==="generic",options:{dragEnabled:!0}},{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>wt(),options:{useFlatToolbarButtons:!0}},{device:()=>ht(),options:{useDefaultToolbarButtons:!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(){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(){let i=this.option("_wrapperClassExternal"),e=i?`dx-popup-wrapper ${i}`:"dx-popup-wrapper";this.callBase(),this._createBodyOverflowManager(),this._updateResizeCallbackSkipCondition(),this.$element().addClass("dx-popup"),this.$wrapper().addClass(e),this._$popupContent=this._$content.wrapInner(u("<div>").addClass("dx-popup-content")).children().eq(0),this._toggleContentScrollClass(),this.$overlayContent().attr("role","dialog")},_render(){let i=this.option("fullScreen");this._toggleFullScreenClass(i),this.callBase()},_createBodyOverflowManager(){this._bodyOverflowManager=IP()},_toggleFullScreenClass(i){this.$overlayContent().toggleClass("dx-popup-fullscreen",i).toggleClass("dx-popup-normal",!i)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new tn,bottom:new tn})},_getActionsList(){return this.callBase().concat(["onResizeStart","onResize","onResizeEnd"])},_contentResizeHandler(i){this._shouldSkipContentResize(i)||this._renderGeometry({shouldOnlyReposition:!0})},_doesShowAnimationChangeDimensions(){let i=this.option("animation");return["to","from"].some(e=>{var t;let n=i==null||(t=i.show)===null||t===void 0?void 0:t[e];return z(n)&&("width"in n||"height"in n)})},_updateResizeCallbackSkipCondition(){let i=this._doesShowAnimationChangeDimensions();this._shouldSkipContentResize=e=>i&&this._showAnimationProcessing||this._areContentDimensionsRendered(e)},_observeContentResize(i){if(!this.option("useResizeObserver"))return;let e=this._$content.get(0);i?ps.observe(e,t=>{this._contentResizeHandler(t)}):ps.unobserve(e)},_areContentDimensionsRendered(i){var e,t,n;let o=(e=i.contentBoxSize)===null||e===void 0?void 0:e[0];if(o){var s,r;return parseInt(o.inlineSize,10)===((s=this._renderedDimensions)===null||s===void 0?void 0:s.width)&&parseInt(o.blockSize,10)===((r=this._renderedDimensions)===null||r===void 0?void 0:r.height)}let{contentRect:a}=i;return parseInt(a.width,10)===((t=this._renderedDimensions)===null||t===void 0?void 0:t.width)&&parseInt(a.height,10)===((n=this._renderedDimensions)===null||n===void 0?void 0:n.height)},_renderContent(){this.callBase(),this._observeContentResize(!0)},_renderContentImpl(){this._renderTitle(),this.callBase(),this._renderResize(),this._renderBottom()},_renderTitle(){let i=this._getToolbarItems("top"),{title:e,showTitle:t}=this.option();if(t&&e&&i.unshift({location:F.current().ios?"center":"before",text:e}),t||i.length>0){this._$title&&this._$title.remove();let n=u("<div>").addClass("dx-popup-title").insertBefore(this.$content());this._$title=this._renderTemplateByType("titleTemplate",i,n).addClass("dx-popup-title"),this._renderDrag(),this._executeTitleRenderAction(this._$title),this._$title.toggleClass("dx-has-close-button",this._hasCloseButton())}else this._$title&&this._$title.detach();this._toggleAriaLabel()},_toggleAriaLabel(){var i;let{title:e,showTitle:t}=this.option(),o=t&&!!e?new Ae:null;(i=this._$title)===null||i===void 0||i.find(".dx-toolbar-label").eq(0).attr("id",o),this.$overlayContent().attr("aria-labelledby",o)},_renderTemplateByType(i,e,t,n){let{rtlEnabled:o,useDefaultToolbarButtons:s,useFlatToolbarButtons:r,disabled:a}=this.option(),l=this._getTemplateByOption(i);if(l instanceof tn){let h=m({},this.option("integrationOptions"),{skipTemplates:["content","title"]}),p=m(n,{items:e,rtlEnabled:o,useDefaultButtons:s,useFlatButtons:r,disabled:a,integrationOptions:h});this._getTemplate("dx-polymorph-widget").render({container:t,model:{widget:this._getToolbarName(),options:p}});let g=t.children("div");return t.replaceWith(g),g}let c=u(l.render({container:H(t)}));return c.hasClass("dx-template-wrapper")&&(t.replaceWith(c),t=c),t},_getToolbarName:()=>"dxToolbarBase",_renderVisibilityAnimate(i){return this.callBase(i)},_hide(){return this._observeContentResize(!1),this.callBase()},_executeTitleRenderAction(i){this._getTitleRenderAction()({titleElement:H(i)})},_getTitleRenderAction(){return this._titleRenderAction||this._createTitleRenderAction()},_createTitleRenderAction(){return this._titleRenderAction=this._createActionByOption("onTitleRendered",{element:this.element(),excludeValidators:["disabled","readOnly"]})},_getCloseButton(){return{toolbar:"top",location:"after",template:this._getCloseButtonRenderer()}},_getCloseButtonRenderer(){return(i,e,t)=>{let n=u("<div>").addClass("dx-closebutton");this._createComponent(n,_t,{icon:"close",onClick:this._createToolbarItemAction(void 0),stylingMode:"text",integrationOptions:{}}),u(t).append(n)}},_getToolbarItems(i){let e=this.option("toolbarItems"),t=[];this._toolbarItemClasses=[];let n=F.current().platform,o=0;return x(e,(s,r)=>{let a=f(r.shortcut),l=a?PY(r.shortcut):r;if(a&&n==="ios"&&o<2&&(l.toolbar="top",o++),l.toolbar=r.toolbar||l.toolbar||"top",l&&l.toolbar===i){a&&m(l,{location:r.location},this._getToolbarItemByAlias(r));let d=n==="generic";r.shortcut==="done"&&d||r.shortcut==="cancel"&&!d?t.unshift(l):t.push(l)}}),i==="top"&&this._hasCloseButton()&&t.push(this._getCloseButton()),t},_hasCloseButton(){return this.option("showCloseButton")&&this.option("showTitle")},_getLocalizationKey:i=>i.toLowerCase()==="done"?"OK":ki(i,!0),_getToolbarButtonStylingMode(i){return Ot()?i==="done"?"contained":"outlined":this.option("useFlatToolbarButtons")?"text":"contained"},_getToolbarButtonType(i){return Ot()&&i==="done"||this.option("useDefaultToolbarButtons")?"default":"normal"},_getToolbarItemByAlias(i){let e=this,t=i.shortcut;if(!DP.includes(t))return!1;let n=m({text:O.format(this._getLocalizationKey(t)),onClick:this._createToolbarItemAction(i.onClick),integrationOptions:{},type:this._getToolbarButtonType(t),stylingMode:this._getToolbarButtonStylingMode(t)},i.options||{}),o=`dx-popup-${t}`;return this._toolbarItemClasses.push(o),{template(s,r,a){let l=u("<div>").addClass(o).appendTo(a);e._createComponent(l,_t,n)}}},_createToolbarItemAction(i){return this._createAction(i,{afterExecute(e){e.component.hide()}})},_renderBottom(){let i=this._getToolbarItems("bottom");if(i.length){this._$bottom&&this._$bottom.remove();let e=u("<div>").addClass("dx-popup-bottom").insertAfter(this.$content());this._$bottom=this._renderTemplateByType("bottomTemplate",i,e,{compactMode:!0}).addClass("dx-popup-bottom"),this._toggleClasses()}else this._$bottom&&this._$bottom.detach()},_toggleDisabledState(i){this.callBase(...arguments),this.$content().toggleClass("dx-state-disabled",!!i)},_toggleClasses(){x(DP,(e,t)=>{let n=`dx-popup-${t}`;this._toolbarItemClasses.includes(n)?(this.$wrapper().addClass(`${n}-visible`),this._$bottom.addClass(n)):(this.$wrapper().removeClass(`${n}-visible`),this._$bottom.removeClass(n))})},_toggleFocusClass(i,e){if(this.callBase(i,e),i&&!FT(this._zIndex)){let t=qp(this._zIndexInitValue());Kc(this._zIndex),this._zIndex=t,this._$wrapper.css("zIndex",t),this._$content.css("zIndex",t)}},_toggleContentScrollClass(){let i=!this.option("preventScrollEvents");this.$content().toggleClass("dx-popup-content-scrollable",i)},_getPositionControllerConfig(){let{fullScreen:i,forceApplyBindings:e,dragOutsideBoundary:t,dragAndResizeArea:n,outsideDragFactor:o}=this.option();return m({},this.callBase(),{fullScreen:i,forceApplyBindings:e,dragOutsideBoundary:t,dragAndResizeArea:n,outsideDragFactor:o})},_initPositionController(){this._positionController=new Cm(this._getPositionControllerConfig())},_getDragTarget(){return this.topToolbar()},_renderGeometry(i){let{visible:e,useResizeObserver:t}=this.option();if(e&&j()){let o=this._showAnimationProcessing&&!(i!=null&&i.forceStopAnimation)&&t;this._isAnimationPaused=o||void 0,this._stopAnimation(),i!=null&&i.shouldOnlyReposition?this._renderPosition(!1):this._renderGeometryImpl(i?.isDimensionChange),o&&(this._animateShowing(),this._isAnimationPaused=void 0)}},_cacheDimensions(){this.option("useResizeObserver")&&(this._renderedDimensions={width:parseInt(W(this._$content),10),height:parseInt(Q(this._$content),10)})},_renderGeometryImpl(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||this._resetContentHeight(),this.callBase(),this._cacheDimensions(),this._setContentHeight()},_resetContentHeight(){this._getOptionValue("height")==="auto"&&this.$content().css({height:"auto",maxHeight:"none"})},_renderDrag(){let i=this._getDragTarget(),e=this.option("dragEnabled");if(!i)return;let t={dragEnabled:e,handle:i.get(0),draggableElement:this._$content.get(0),positionController:this._positionController};this._drag?this._drag.init(t):this._drag=new SP(t),this.$overlayContent().toggleClass("dx-popup-draggable",e)},_renderResize(){this._resizable=this._createComponent(this._$content,wP,{handles:this.option("resizeEnabled")?"all":"none",onResizeEnd:i=>{this._resizeEndHandler(i),this._observeContentResize(!0)},onResize:i=>{this._setContentHeight(),this._actions.onResize(i)},onResizeStart:i=>{this._observeContentResize(!1),this._actions.onResizeStart(i)},minHeight:100,minWidth:100,area:this._positionController.$dragResizeContainer,keepAspectRatio:!1})},_resizeEndHandler(i){let e=this._resizable.option("width"),t=this._resizable.option("height");e&&this._setOptionWithoutOptionChange("width",e),t&&this._setOptionWithoutOptionChange("height",t),this._cacheDimensions(),this._positionController.resizeHandled(),this._positionController.detectVisualPositionChange(i.event),this._actions.onResizeEnd(i)},_setContentHeight(){(this.option("forceApplyBindings")||E)();let i=this.$overlayContent().get(0),e=this._chooseHeightStrategy(i);this.$content().css(this._getHeightCssStyles(e,i)),this._setHeightClasses(this.$overlayContent(),e)},_heightStrategyChangeOffset:(i,e)=>i===ta.flex?-e:0,_chooseHeightStrategy(i){let e=i.style.width==="auto"||i.style.width==="",t=ta.static;return this._isAutoHeight()&&this.option("autoResizeEnabled")&&(e||FY?t=ta.inherit:t=ta.flex),t},_getHeightCssStyles(i,e){let t={},n=this._getOptionValue("maxHeight",e),o=this._getOptionValue("minHeight",e),s=this._splitPopupHeight(),r=s.header+s.footer+s.contentVerticalOffsets+s.popupVerticalOffsets+this._heightStrategyChangeOffset(i,s.popupVerticalPaddings);if(i===ta.static){if(!this._isAutoHeight()||n||o){let l=(this.option("fullScreen")?Math.min(Pe(e).height,q().innerHeight):Pe(e).height)-r;t={height:Math.max(0,l),minHeight:"auto",maxHeight:"auto"}}}else{let a=u(this._positionController.$visualContainer).get(0),l=sS(n,-r,a);t={height:"auto",minHeight:rS(o,-r,a),maxHeight:l}}return t},_setHeightClasses(i,e){let t="";for(let n in ta)ta[n]!==e&&(t+=` ${ta[n]}`);i.removeClass(t).addClass(e)},_isAutoHeight(){return this.$overlayContent().get(0).style.height==="auto"},_splitPopupHeight(){let i=this.topToolbar(),e=this.bottomToolbar();return{header:P_(i&&i.get(0)),footer:P_(e&&e.get(0)),contentVerticalOffsets:Ar(this.$overlayContent().get(0),!0),popupVerticalOffsets:Ar(this.$content().get(0),!0),popupVerticalPaddings:Ar(this.$content().get(0),!1)}},_isAllWindowCovered(){return this.callBase()||this.option("fullScreen")},_renderDimensions(){this.option("fullScreen")?this.$overlayContent().css({width:"100%",height:"100%",minWidth:"",maxWidth:"",minHeight:"",maxHeight:""}):this.callBase(),j()&&this._renderFullscreenWidthClass()},_dimensionChanged(){this._renderGeometry({isDimensionChange:!0})},_clean(){this.callBase(),this._observeContentResize(!1)},_dispose(){this.callBase(),this._toggleBodyScroll(!0)},_renderFullscreenWidthClass(){this.$overlayContent().toggleClass("dx-popup-fullscreen-width",ae(this.$overlayContent())===W(RY))},_toggleSafariScrolling(){this.option("enableBodyScroll")&&this.callBase()},_toggleBodyScroll(i){if(!this._bodyOverflowManager)return;let{setOverflow:e,restoreOverflow:t}=this._bodyOverflowManager;i?t():e()},refreshPosition(){this._renderPosition()},_optionChanged(i){var e;let{value:t,name:n}=i;switch(n){case"disabled":this.callBase(i),this._renderTitle(),this._renderBottom();break;case"animation":this._updateResizeCallbackSkipCondition();break;case"enableBodyScroll":this.option("visible")&&this._toggleBodyScroll(t);break;case"showTitle":case"title":case"titleTemplate":this._renderTitle(),this._renderGeometry(),Li(this.$overlayContent());break;case"bottomTemplate":this._renderBottom(),this._renderGeometry(),Li(this.$overlayContent());break;case"container":if(this.callBase(i),this.option("resizeEnabled")){var o;(o=this._resizable)===null||o===void 0||o.option("area",this._positionController.$dragResizeContainer)}break;case"width":case"height":this.callBase(i),(e=this._resizable)===null||e===void 0||e.option(n,t);break;case"onTitleRendered":this._createTitleRenderAction(t);break;case"toolbarItems":case"useDefaultToolbarButtons":case"useFlatToolbarButtons":{let s=!i.fullName.match(/^toolbarItems((\[\d+\])(\.(options|visible).*)?)?$/);this._renderTitle(),this._renderBottom(),s&&(this._renderGeometry(),Li(this.$overlayContent()));break}case"dragEnabled":this._renderDrag();break;case"dragAndResizeArea":this._positionController.dragAndResizeArea=t,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer),this._positionController.positionContent();break;case"dragOutsideBoundary":this._positionController.dragOutsideBoundary=t,this.option("resizeEnabled")&&this._resizable.option("area",this._positionController.$dragResizeContainer);break;case"outsideDragFactor":this._positionController.outsideDragFactor=t;break;case"resizeEnabled":this._renderResize(),this._renderGeometry();break;case"autoResizeEnabled":this._renderGeometry(),Li(this.$overlayContent());break;case"fullScreen":this._positionController.fullScreen=t,this._toggleFullScreenClass(t),this._toggleSafariScrolling(),this._renderGeometry(),Li(this.$overlayContent());break;case"showCloseButton":this._renderTitle();break;case"preventScrollEvents":this.callBase(i),this._toggleContentScrollClass();break;default:this.callBase(i)}},bottomToolbar(){return this._$bottom},topToolbar(){return this._$title},$content(){return this._$popupContent},content(){return H(this.$content())},$overlayContent(){return this._$content},getFocusableElements(){return this.$wrapper().find("[tabindex]").filter((i,e)=>e.getAttribute("tabindex")>=0)}});K("dxPopup",TP);var AP=TP;var Oi=AP;var xm="dxswipestart",vm="dxswipe",md="dxswipeend",kY={defaultItemSizeFunc:function(){return W(this.getElement())},getBounds:function(){return[this._maxLeftOffset,this._maxRightOffset]},calcOffsetRatio:function(i){return(rt(i).x-(this._savedEventData&&this._savedEventData.x||0))/this._itemSizeFunc().call(this,i)},isFastSwipe:function(i){let e=rt(i);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(e.x-this._tickData.x)>=e.time-this._tickData.time}},BY={defaultItemSizeFunc:function(){return Q(this.getElement())},getBounds:function(){return[this._maxTopOffset,this._maxBottomOffset]},calcOffsetRatio:function(i){return(rt(i).y-(this._savedEventData&&this._savedEventData.y||0))/this._itemSizeFunc().call(this,i)},isFastSwipe:function(i){let e=rt(i);return this.FAST_SWIPE_SPEED_LIMIT*Math.abs(e.y-this._tickData.y)>=e.time-this._tickData.time}},VY={horizontal:kY,vertical:BY},LY=Vl.inherit({TICK_INTERVAL:300,FAST_SWIPE_SPEED_LIMIT:10,ctor:function(i){this.callBase(i),this.direction="horizontal",this.elastic=!0},_getStrategy:function(){return VY[this.direction]},_defaultItemSizeFunc:function(){return this._getStrategy().defaultItemSizeFunc.call(this)},_itemSizeFunc:function(){return this.itemSizeFunc||this._defaultItemSizeFunc},_init:function(i){this._tickData=rt(i)},_start:function(i){this._savedEventData=rt(i),i=this._fireEvent("dxswipestart",i),i.cancel||(this._maxLeftOffset=i.maxLeftOffset,this._maxRightOffset=i.maxRightOffset,this._maxTopOffset=i.maxTopOffset,this._maxBottomOffset=i.maxBottomOffset)},_move:function(i){let e=this._getStrategy(),t=rt(i),n=e.calcOffsetRatio.call(this,i);n=this._fitOffset(n,this.elastic),t.time-this._tickData.time>this.TICK_INTERVAL&&(this._tickData=t),this._fireEvent("dxswipe",i,{offset:n}),i.cancelable!==!1&&i.preventDefault()},_end:function(i){let e=this._getStrategy(),t=e.calcOffsetRatio.call(this,i),n=e.isFastSwipe.call(this,i),o=t,s=this._calcTargetOffset(t,n);o=this._fitOffset(o,this.elastic),s=this._fitOffset(s,!1),this._fireEvent("dxswipeend",i,{offset:o,targetOffset:s})},_fitOffset:function(i,e){let n=this._getStrategy().getBounds.call(this);return i<-n[0]?e?(-2*n[0]+i)/3:-n[0]:i>n[1]?e?(2*n[1]+i)/3:n[1]:i},_calcTargetOffset:function(i,e){let t;return e?(t=Math.ceil(Math.abs(i)),i<0&&(t=-t)):t=Math.round(i),t}});ho({emitter:LY,events:["dxswipestart","dxswipe","dxswipeend"]});function bm(i){return i?Number(i.replace("px","")):0}function NY(i){var e,t;return i&&j()?(e=(t=q()).getComputedStyle)===null||e===void 0?void 0:e.call(t,i):null}function MP(i,e){let t=NY(i);return t?bm(t[`margin${Tr(e)}`]):0}var HY="__dx_key__",RP=Ql.inherit({_getDefaultOptions(){return m(this.callBase(),{repaintChangesOnly:!1})},_customizeStoreLoadOptions(i){this._dataController.getDataSource()&&!this._dataController.isLoaded()&&(this._correctionIndex=0),this._correctionIndex&&i.storeLoadOptions&&(i.storeLoadOptions.skip+=this._correctionIndex)},reload(){this._correctionIndex=0},_init(){this.callBase(),this._refreshItemsCache(),this._correctionIndex=0,this._subscribeLoadOptionsCustomization(!0)},_findItemElementByKey(i){let e=u(),t=this.key();return this.itemElements().each((n,o)=>{let s=u(o),r=this._getItemData(s);if(t?Ls(t,this.keyOf(r),i):this._isItemEquals(r,i))return e=s,!1}),e},_dataSourceChangedHandler(i,e){e!=null&&e.changes?this._modifyByChanges(e.changes):(this.callBase(i,e),this._refreshItemsCache())},_isItemEquals(i,e){i&&i.__dx_key__&&(i=i.data);try{return JSON.stringify(i)===JSON.stringify(e)}catch{return i===e}},_isItemStrictEquals(i,e){return this._isItemEquals(i,e)},_shouldAddNewGroup(i,e){let t=!1;return this.option("grouped")&&(i.length||(t=!0),x(i,(n,o)=>{o.type==="insert"&&(t=!0,x(e,(s,r)=>{if(o.data.key!==void 0&&o.data.key===r.key)return t=!1,!1}))})),t},_partialRefresh(){if(this.option("repaintChangesOnly")){let i=t=>t&&t.__dx_key__!==void 0?t.__dx_key__:this.keyOf(t),e=pg(this._itemsCache,this._editStrategy.itemsGetter(),i,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(){if(this.option("repaintChangesOnly")){let i=this._editStrategy.itemsGetter();try{this._itemsCache=m(!0,[],i),this.key()||(this._itemsCache=this._itemsCache.map((e,t)=>({[HY]:i[t],data:e})))}catch{this._itemsCache=m([],i)}}},_dispose(){this._subscribeLoadOptionsCustomization(!1),this.callBase()},_updateByChange(i,e,t,n){if(n)this._renderItem(t.index,t.data,null,this._findItemElementByKey(t.key));else{let o=e[Ns(i,e,t.key)];o&&Cc(i,e,t.key,t.data).done(()=>{this._renderItem(e.indexOf(o),o,null,this._findItemElementByKey(t.key))})}},_insertByChange(i,e,t,n){P(n||xc(i,e,t.data,t.index)).done(()=>{this._beforeItemElementInserted(t),this._renderItem(t.index??e.length,t.data),this._afterItemElementInserted(),this._correctionIndex++})},_updateSelectionAfterRemoveByChange(i){let e=this.option("selectedIndex");e>i?this.option("selectedIndex",e-1):e===i&&this.option("selectedItems").length===1?this.option("selectedItems",[]):this._normalizeSelectedItems()},_beforeItemElementInserted(i){let e=this.option("selectedIndex");i.index<=e&&this.option("selectedIndex",e+1)},_afterItemElementInserted:E,_removeByChange(i,e,t,n){let o=n?t.index:Ns(i,e,t.key);if(n?t.oldItem:e[o]){let r=this._findItemElementByKey(t.key),a=this._extendActionArgs(r);this._waitDeletingPrepare(r).done(()=>{n?(this._updateIndicesAfterIndex(o-1),this._afterItemElementDeleted(r,a),this._updateSelectionAfterRemoveByChange(o)):(this._deleteItemElementByIndex(o),this._afterItemElementDeleted(r,a))}),this._correctionIndex--}},_modifyByChanges(i,e){let t=this._editStrategy.itemsGetter(),n={key:this.key.bind(this),keyOf:this.keyOf.bind(this)},o=this._dataController,s=o.paginate(),r=o.group();(s||r)&&(i=i.filter(a=>a.type!=="insert"||a.index!==void 0)),i.forEach(a=>this[`_${a.type}ByChange`](n,t,a,e)),this._renderedItemsCount=t.length,this._refreshItemsCache(),this._fireContentReadyAction()},_appendItemToContainer(i,e,t){let n=i.children(this._itemSelector()).get(t);S.insertElement(i.get(0),e.get(0),n)},_subscribeLoadOptionsCustomization(i){this._dataController&&(i?(this._correctionIndex=0,this._dataController.on("customizeStoreLoadOptions",this._customizeStoreLoadOptions.bind(this))):this._dataController.off("customizeStoreLoadOptions",this._customizeStoreLoadOptions.bind(this)))},_optionChanged(i){switch(i.name){case"items":{this._partialRefresh(i.value)||this.callBase(i);break}case"dataSource":(!this.option("repaintChangesOnly")||!i.value)&&this.option("items",[]),this._subscribeLoadOptionsCustomization(!1),this.callBase(i),this._subscribeLoadOptionsCustomization(!0);break;case"repaintChangesOnly":break;default:this.callBase(i)}}});var ia=RP;var $Y=Gl.inherit({_init(i){this.callBase(i),this._$topPocket=i._$topPocket,this._$pullDown=i._$pullDown,this._$refreshingText=i._$refreshingText,this._$scrollViewContent=u(i.content()),this._$container=u(i.container()),this._initCallbacks()},_initCallbacks(){this.pullDownCallbacks=ge(),this.releaseCallbacks=ge(),this.reachBottomCallbacks=ge()},render(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown(){let i=u("<div>").addClass("dx-scrollview-pull-down-image"),e=u("<div>").addClass("dx-scrollview-pull-down-indicator"),t=new bi(u("<div>")).$element(),n=this._$pullDownText=u("<div>").addClass("dx-scrollview-pull-down-text");this._$pullingDownText=u("<div>").text(this.option("pullingDownText")).appendTo(n),this._$pulledDownText=u("<div>").text(this.option("pulledDownText")).appendTo(n),this._$refreshingText=u("<div>").text(this.option("refreshingText")).appendTo(n),this._$pullDown.empty().append(i).append(e.append(t)).append(n)},_releaseState(){this._state=0,this._refreshPullDownText()},_refreshPullDownText(){let i=this,e=[{element:this._$pullingDownText,visibleState:0},{element:this._$pulledDownText,visibleState:1},{element:this._$refreshingText,visibleState:2}];x(e,(t,n)=>{let o=i._state===n.visibleState?"addClass":"removeClass";n.element[o]("dx-scrollview-pull-down-text-visible")})},update(){this.callBase(),this._setTopPocketOffset()},_updateDimensions(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;let i=this._$scrollViewContent.get(0),e=this._$container.get(0);this._bottomBoundary=Math.max(i.clientHeight-e.clientHeight,0)},_allowedDirections(){let i=this.callBase();return i.vertical=i.vertical||this._pullDownEnabled,i},_setTopPocketOffset(){this._$topPocket.css({top:-this._topPocketSize})},handleEnd(){this.callBase(),this._complete()},handleStop(){this.callBase(),this._complete()},_complete(){this._state===1&&(this._setPullDownOffset(this._topPocketSize),clearTimeout(this._pullDownRefreshTimeout),this._pullDownRefreshTimeout=setTimeout(()=>{this._pullDownRefreshing()},400))},_setPullDownOffset(i){Ve(this._$topPocket,{top:i}),Ve(this._$scrollViewContent,{top:i})},handleScroll(i){if(this.callBase(i),this._state===2)return;let e=this.location().top,t=(this._location||0)-e;this._location=e,this._isPullDown()?this._pullDownReady():t>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()},_isPullDown(){return this._pullDownEnabled&&this._location>=this._topPocketSize},_isReachBottom(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom(){this._state!==3&&(this._state=3,this.reachBottomCallbacks.fire())},_pullDownReady(){this._state!==1&&(this._state=1,this._$pullDown.addClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText())},_stateReleased(){this._state!==0&&(this._$pullDown.removeClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this._releaseState())},_pullDownRefreshing(){this._state!==2&&(this._state=2,this._$pullDown.addClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText(),this.pullDownCallbacks.fire())},pullDownEnable(i){i&&(this._updateDimensions(),this._setTopPocketOffset()),this._pullDownEnabled=i},reachBottomEnable(i){this._reachBottomEnabled=i},pendingRelease(){this._state=1},release(){let i=y();return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._state===3&&(this._state=0),this._releaseTimeout=setTimeout(()=>{this._setPullDownOffset(0),this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),i.resolve()},400),i.promise()},dispose(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}}),FP=$Y;var zY=Gl.inherit({_init(i){this.callBase(i),this._$topPocket=i._$topPocket,this._$pullDown=i._$pullDown,this._$scrollViewContent=u(i.content()),this._$container=u(i.container()),this._initCallbacks(),this._location=0},_initCallbacks(){this.pullDownCallbacks=ge(),this.releaseCallbacks=ge(),this.reachBottomCallbacks=ge()},render(){this.callBase(),this._renderPullDown(),this._releaseState()},_renderPullDown(){let i=u("<div>").addClass("dx-scrollview-pull-down-indicator"),e=new bi(u("<div>")).$element();this._$icon=u("<div>").addClass("dx-icon-pulldown"),this._$pullDown.empty().append(this._$icon).append(i.append(e))},_releaseState(){this._state=0,this._releasePullDown(),this._updateDimensions()},_releasePullDown(){this._$pullDown.css({opacity:0})},_updateDimensions(){this.callBase(),this._topPocketSize=this._$topPocket.get(0).clientHeight;let i=this._$scrollViewContent.get(0),e=this._$container.get(0);this._bottomBoundary=Math.max(i.clientHeight-e.clientHeight,0)},_allowedDirections(){let i=this.callBase();return i.vertical=i.vertical||this._pullDownEnabled,i},handleInit(i){this.callBase(i),this._state===0&&this._location===0&&(this._startClientY=rt(i.originalEvent).y,this._state=4)},handleMove(i){this.callBase(i),this._deltaY=rt(i.originalEvent).y-this._startClientY,this._state===4&&(this._pullDownEnabled&&this._deltaY>0?this._state=5:this._complete()),this._state===5&&(i.preventDefault(),this._movePullDown())},_movePullDown(){let i=this._getPullDownHeight(),e=Math.min(3*i,this._deltaY+this._getPullDownStartPosition()),t=180*e/i/3;this._$pullDown.css({opacity:1}).toggleClass("dx-scrollview-pull-down-refreshing",e<i),Ve(this._$pullDown,{top:e}),this._$icon.css({transform:`rotate(${t}deg)`})},_isPullDown(){return this._pullDownEnabled&&this._state===5&&this._deltaY>=this._getPullDownHeight()-this._getPullDownStartPosition()},_getPullDownHeight(){return Math.round(.05*ee(this._$element))},_getPullDownStartPosition(){return-Math.round(1.5*ee(this._$pullDown))},handleEnd(){this._isPullDown()&&this._pullDownRefreshing(),this._complete()},handleStop(){this._complete()},_complete(){(this._state===4||this._state===5)&&this._releaseState()},handleScroll(i){if(this.callBase(i),this._state===2)return;let e=this.location().top,t=this._location-e;this._location=e,t>0&&this._isReachBottom()?this._reachBottom():this._stateReleased()},_isReachBottom(){return this._reachBottomEnabled&&Math.round(this._bottomBoundary+Math.floor(this._location))<=1},_reachBottom(){this.reachBottomCallbacks.fire()},_stateReleased(){this._state!==0&&(this._$pullDown.removeClass("dx-scrollview-pull-down-loading"),this._releaseState())},_pullDownRefreshing(){this._state=2,this._pullDownRefreshHandler()},_pullDownRefreshHandler(){this._refreshPullDown(),this.pullDownCallbacks.fire()},_refreshPullDown(){this._$pullDown.addClass("dx-scrollview-pull-down-loading"),Ve(this._$pullDown,{top:this._getPullDownHeight()})},pullDownEnable(i){this._$topPocket.toggle(i),this._pullDownEnabled=i},reachBottomEnable(i){this._reachBottomEnabled=i},pendingRelease(){this._state=1},release(){let i=y();return this._updateDimensions(),clearTimeout(this._releaseTimeout),this._releaseTimeout=setTimeout(()=>{this._stateReleased(),this.releaseCallbacks.fire(),this._updateAction(),i.resolve()},800),i.promise()},dispose(){clearTimeout(this._pullDownRefreshTimeout),clearTimeout(this._releaseTimeout),this.callBase()}}),PP=zY;var WY=Math;var GY=Dv.inherit({ctor(){this._topPocketSize=0,this._bottomPocketSize=0,this.callBase.apply(this,arguments),this._initCallbacks(),this._releaseState()},_releaseState(){this._state=0,this._refreshPullDownText()},_refreshPullDownText(){let i=this,e=[{element:this._$pullingDownText,visibleState:0},{element:this._$pulledDownText,visibleState:1},{element:this._$refreshingText,visibleState:2}];x(e,(t,n)=>{let o=i._state===n.visibleState?"addClass":"removeClass";n.element[o]("dx-scrollview-pull-down-text-visible")})},_initCallbacks(){this.pullDownCallbacks=ge(),this.releaseCallbacks=ge(),this.reachBottomCallbacks=ge()},_updateBounds(){if(this._direction!=="horizontal"){this._topPocketSize=this._$topPocket.get(0).clientHeight,this._bottomPocketSize=this._$bottomPocket.get(0).clientHeight;let e=this._$container.get(0),t=this._$content.get(0);this._bottomBoundary=Math.max(t.clientHeight-this._bottomPocketSize-e.clientHeight,0)}this.callBase()},_updateScrollbar(){this._scrollbar.option({containerSize:this._containerSize(),contentSize:this._contentSize()-this._topPocketSize-this._bottomPocketSize,scaleRatio:this._getScaleRatio()})},_moveContent(){this.callBase(),this._isPullDown()?this._pullDownReady():this._isReachBottom()?this._reachBottomReady():this._state!==0&&this._stateReleased()},_moveScrollbar(){this._scrollbar.moveTo(this._topPocketSize+this._location)},_isPullDown(){return this._pullDownEnabled&&this._location>=0},_isReachBottom(){let i=this._$container.get(0);return this._reachBottomEnabled&&Math.round(this._bottomBoundary-Math.ceil(i.scrollTop))<=1},_scrollComplete(){this._inBounds()&&this._state===1?this._pullDownRefreshing():this._inBounds()&&this._state===3?this._reachBottomLoading():this.callBase()},_reachBottomReady(){this._state!==3&&(this._state=3,this._minOffset=this._getMinOffset())},_getMaxOffset(){return-this._topPocketSize},_getMinOffset(){return WY.min(this.callBase(),-this._topPocketSize)},_reachBottomLoading(){this.reachBottomCallbacks.fire()},_pullDownReady(){this._state!==1&&(this._state=1,this._maxOffset=0,this._$pullDown.addClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText())},_stateReleased(){this._state!==0&&(this._releaseState(),this._updateBounds(),this._$pullDown.removeClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this.releaseCallbacks.fire())},_pullDownRefreshing(){this._state!==2&&(this._state=2,this._$pullDown.addClass("dx-scrollview-pull-down-loading").removeClass("dx-scrollview-pull-down-ready"),this._refreshPullDownText(),this.pullDownCallbacks.fire())},_releaseHandler(){return this._state===0&&this._moveToBounds(),this._update(),this._releaseTask&&this._releaseTask.abort(),this._releaseTask=hl(this._release.bind(this)),this._releaseTask.promise},_release(){this._stateReleased(),this._scrollComplete()},_reachBottomEnablingHandler(i){this._reachBottomEnabled!==i&&(this._reachBottomEnabled=i,this._updateBounds())},_pullDownEnablingHandler(i){this._pullDownEnabled!==i&&(this._pullDownEnabled=i,this._considerTopPocketChange(),this._updateHandler())},_considerTopPocketChange(){this._location-=Q(this._$topPocket)||-this._topPocketSize,this._maxOffset=0,this._move()},_pendingReleaseHandler(){this._state=1},dispose(){this._releaseTask&&this._releaseTask.abort(),this.callBase()}}),jY=sg.inherit({_init(i){this.callBase(i),this._$pullDown=i._$pullDown,this._$topPocket=i._$topPocket,this._$bottomPocket=i._$bottomPocket,this._initCallbacks()},_initCallbacks(){this.pullDownCallbacks=ge(),this.releaseCallbacks=ge(),this.reachBottomCallbacks=ge()},render(){this._renderPullDown(),this.callBase()},_renderPullDown(){let i=u("<div>").addClass("dx-scrollview-pull-down-image"),e=u("<div>").addClass("dx-scrollview-pull-down-indicator"),t=new bi(u("<div>")).$element(),n=this._$pullDownText=u("<div>").addClass("dx-scrollview-pull-down-text");this._$pullingDownText=u("<div>").text(this.option("pullingDownText")).appendTo(n),this._$pulledDownText=u("<div>").text(this.option("pulledDownText")).appendTo(n),this._$refreshingText=u("<div>").text(this.option("refreshingText")).appendTo(n),this._$pullDown.empty().append(i).append(e.append(t)).append(n)},pullDownEnable(i){this._eventHandler("pullDownEnabling",i)},reachBottomEnable(i){this._eventHandler("reachBottomEnabling",i)},_createScroller(i){let e=this,t=e._scrollers[i]=new GY(e._scrollerOptions(i));t.pullDownCallbacks.add(()=>{e.pullDownCallbacks.fire()}),t.releaseCallbacks.add(()=>{e.releaseCallbacks.fire()}),t.reachBottomCallbacks.add(()=>{e.reachBottomCallbacks.fire()})},_scrollerOptions(i){return m(this.callBase(i),{$topPocket:this._$topPocket,$bottomPocket:this._$bottomPocket,$pullDown:this._$pullDown,$pullDownText:this._$pullDownText,$pullingDownText:this._$pullingDownText,$pulledDownText:this._$pulledDownText,$refreshingText:this._$refreshingText})},pendingRelease(){this._eventHandler("pendingRelease")},release(){return this._eventHandler("release").done(this._updateAction)},location(){let i=this.callBase();return i.top+=Q(this._$topPocket),i},dispose(){x(this._scrollers,function(){this.dispose()}),this.callBase()}}),kP=jY;var KY="dx-scrollview-loadpanel",UY={pullDown:FP,swipeDown:PP,simulated:kP},qY=!j(),YY={finishLoading:E,release:E,refresh:E,scrollOffset:()=>({top:0,left:0}),_optionChanged(i){if(i.name!=="onUpdated")return this.callBase.apply(this,arguments)}},BP=Kl.inherit(qY?YY:{_getDefaultOptions(){return m(this.callBase(),{pullingDownText:O.format("dxScrollView-pullingDownText"),pulledDownText:O.format("dxScrollView-pulledDownText"),refreshingText:O.format("dxScrollView-refreshingText"),reachBottomText:O.format("dxScrollView-reachBottomText"),onPullDown:null,onReachBottom:null,refreshStrategy:"pullDown"})},_defaultOptionsRules(){return this.callBase().concat([{device(){return F.real().platform==="android"},options:{refreshStrategy:"swipeDown"}},{device:()=>wt(),options:{pullingDownText:"",pulledDownText:"",refreshingText:"",reachBottomText:""}}])},_init(){this.callBase(),this._loadingIndicatorEnabled=!0},_initScrollableMarkup(){this.callBase(),this.$element().addClass("dx-scrollview"),this._initContent(),this._initTopPocket(),this._initBottomPocket(),this._initLoadPanel()},_initContent(){let i=u("<div>").addClass("dx-scrollview-content");this._$content.wrapInner(i)},_initTopPocket(){let i=this._$topPocket=u("<div>").addClass("dx-scrollview-top-pocket"),e=this._$pullDown=u("<div>").addClass("dx-scrollview-pull-down");i.append(e),this._$content.prepend(i)},_initBottomPocket(){let i=this._$bottomPocket=u("<div>").addClass("dx-scrollview-bottom-pocket"),e=this._$reachBottom=u("<div>").addClass("dx-scrollview-scrollbottom"),t=u("<div>").addClass("dx-scrollview-scrollbottom-indicator"),n=new bi(u("<div>")).$element(),o=this._$reachBottomText=u("<div>").addClass("dx-scrollview-scrollbottom-text");this._updateReachBottomText(),e.append(t.append(n)).append(o),i.append(e),this._$content.append(i)},_initLoadPanel(){let i=u("<div>").addClass(KY).appendTo(this.$element()),e={shading:!1,delay:400,message:this.option("refreshingText"),position:{of:this.$element()}};this._loadPanel=this._createComponent(i,sm,e)},_updateReachBottomText(){this._$reachBottomText.text(this.option("reachBottomText"))},_createStrategy(){let i=this.option("useNative")?this.option("refreshStrategy"):"simulated",e=UY[i];this._strategy=new e(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(){this.callBase(),this._pullDownAction=this._createActionByOption("onPullDown"),this._reachBottomAction=this._createActionByOption("onReachBottom"),this._tryRefreshPocketState()},_tryRefreshPocketState(){this._pullDownEnable(this.hasActionSubscription("onPullDown")),this._reachBottomEnable(this.hasActionSubscription("onReachBottom"))},on(i){let e=this.callBase.apply(this,arguments);return(i==="pullDown"||i==="reachBottom")&&this._tryRefreshPocketState(),e},_pullDownEnable(i){if(arguments.length===0)return this._pullDownEnabled;this._$pullDown&&this._strategy&&(this._$pullDown.toggle(i),this._strategy.pullDownEnable(i),this._pullDownEnabled=i)},_reachBottomEnable(i){if(arguments.length===0)return this._reachBottomEnabled;this._$reachBottom&&this._strategy&&(this._$reachBottom.toggle(i),this._strategy.reachBottomEnable(i),this._reachBottomEnabled=i)},_pullDownHandler(){this._loadingIndicator(!1),this._pullDownLoading()},_loadingIndicator(i){if(arguments.length<1)return this._loadingIndicatorEnabled;this._loadingIndicatorEnabled=i},_pullDownLoading(){this.startLoading(),this._pullDownAction()},_reachBottomHandler(){this._loadingIndicator(!1),this._reachBottomLoading()},_reachBottomLoading(){this.startLoading(),this._reachBottomAction()},_releaseHandler(){this.finishLoading(),this._loadingIndicator(!0)},_optionChanged(i){switch(i.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(i)}},content(){return H(this._$content.children().eq(1))},release(i){return i!==void 0&&this.toggleLoading(!i),this._strategy.release()},toggleLoading(i){this._reachBottomEnable(i)},refresh(){this.hasActionSubscription("onPullDown")&&(this._strategy.pendingRelease(),this._pullDownLoading())},startLoading(){this._loadingIndicator()&&this.$element().is(":visible")&&this._loadPanel.show(),this._lock()},finishLoading(){this._loadPanel.hide(),this._unlock()},_dispose(){this._strategy.dispose(),this.callBase(),this._loadPanel&&this._loadPanel.$element().remove()}});K("dxScrollView",BP);var VP=BP;var fd=VP;var XY=i=>Array.isArray(i)&&i.every(e=>{let t=Object.keys(e).length===2,n="key"in e&&"items"in e;return t&&n&&Array.isArray(e.items)}),ym={_getSpecificDataSourceOption(){let i=this.option("dataSource"),e=!1,t={};return this._getGroupedOption()&&XY(i)&&(t=i.reduce((n,o)=>{let s=o.items.map(r=>(z(r)||(r={text:r},e=!0),"key"in r||(r.key=o.key),r));return n.concat(s)},[]),i={store:{type:"array",data:t},group:{selector:"key",keepInitialKeyOrder:!0}},e&&(i.searchExpr="text")),i}};var QY=mo.inherit({_renderWatchers(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this)),this._startWatcher("showChevron",this._renderShowChevron.bind(this))},_renderBadge(i){if(this._$element.children(".dx-list-item-badge-container").remove(),!i)return;let e=u("<div>").addClass("dx-list-item-badge-container").append(u("<div>").addClass("dx-list-item-badge").addClass("dx-badge").text(i)),t=this._$element.children(".dx-list-item-chevron-container").first();t.length>0?e.insertBefore(t):e.appendTo(this._$element)},_renderShowChevron(i){if(this._$element.children(".dx-list-item-chevron-container").remove(),!i)return;let e=u("<div>").addClass("dx-list-item-chevron-container"),t=u("<div>").addClass("dx-list-item-chevron");e.append(t).appendTo(this._$element)}}),LP=QY;var ZY=".dx-list-item";var JY=".dx-list-select-all";var eX=Ce("items"),tX,Iu=ia.inherit({_activeStateUnit:[ZY,JY].join(","),_supportedKeys(){let i=this,e=function(n){let o=t(n);o.is(i.option("focusedElement"))&&(function(r,a){let l=r.position().top;a==="prev"&&(l=r.position().top-Q(i.$element())+ee(r)),i.scrollTo(l)}(o,n),o=t(n)),i.option("focusedElement",H(o)),i.scrollToItem(o)};function t(n){let o=i.scrollTop(),s=Q(i.$element()),r=u(i.option("focusedElement")),a=!0;if(!r.length)return u();for(;a;){let l=r[n]();if(!l.length)break;let d=l.position().top+ee(l)/2;a=d<s+o&&d>o,a&&(r=l)}return r}return m(this.callBase(),{leftArrow:E,rightArrow:E,pageUp(){return e("prev"),!1},pageDown(){return e("next"),!1}})},_getDefaultOptions(){return m(this.callBase(),{hoverStateEnabled:!0,pullRefreshEnabled:!1,scrollingEnabled:!0,selectByClick:!0,showScrollbar:"onScroll",useNativeScrolling:!0,bounceEnabled:!0,scrollByContent:!0,scrollByThumb:!1,pullingDownText:O.format("dxList-pullingDownText"),pulledDownText:O.format("dxList-pulledDownText"),refreshingText:O.format("dxList-refreshingText"),pageLoadingText:O.format("dxList-pageLoadingText"),onScroll:null,onPullRefresh:null,onPageLoading:null,pageLoadMode:"scrollBottom",nextButtonText:O.format("dxList-nextButtonText"),onItemSwipe:null,grouped:!1,onGroupRendered:null,collapsibleGroups:!1,groupTemplate:"group",indicateLoading:!0,activeStateEnabled:!0,_itemAttributes:{role:"option"},useInkRipple:!1,wrapItemText:!1,_swipeEnabled:!0,showChevronExpr:i=>i?i.showChevron:void 0,badgeExpr:i=>i?i.badge:void 0})},_defaultOptionsRules(){let i=yt();return this.callBase().concat(eg(),[{device:()=>!lo,options:{useNativeScrolling:!1}},{device:e=>!lo&&!F.isSimulator()&&F.real().deviceType==="desktop"&&e.platform==="generic",options:{showScrollbar:"onHover",pageLoadMode:"nextButton"}},{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>ht(i),options:{useInkRipple:!0}},{device:()=>wt(i),options:{pullingDownText:"",pulledDownText:"",refreshingText:"",pageLoadingText:""}}])},_visibilityChanged(i){i&&this._updateLoadingState(!0)},_itemClass:()=>"dx-list-item",_itemDataKey:()=>"dxListItemData",_itemContainer(){return this._$container},_getItemsContainer(){return this._$listContainer},_cleanItemContainer(){this.callBase();let i=this._getItemsContainer();u(i).empty(),i.appendTo(this._$container)},_saveSelectionChangeEvent(i){this._selectionChangeEventInstance=i},_getSelectionChangeEvent(){return this._selectionChangeEventInstance},_refreshItemElements(){this.option("grouped")?this._itemElementsCache=this._getItemsContainer().children(".dx-list-group").children(".dx-list-group-body").children(this._itemSelector()):this._itemElementsCache=this._getItemsContainer().children(this._itemSelector())},_modifyByChanges(){this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},reorderItem(i,e){return this.callBase(i,e).done(function(){this._refreshItemElements()})},deleteItem(i){return this.callBase(i).done(function(){this._refreshItemElements()})},_itemElements(){return this._itemElementsCache},_itemSelectHandler(i){if(!(this.option("selectionMode")==="single"&&this.isItemSelected(i.currentTarget)))return this.callBase(i)},_allowDynamicItemsAppend:()=>!0,_init(){this.callBase(),this._dataController.resetDataSourcePageIndex(),this._$container=this.$element(),this._$listContainer=u("<div>").addClass("dx-list-items"),this._initScrollView(),this._feedbackShowTimeout=70,this._createGroupRenderAction()},_scrollBottomMode(){return this.option("pageLoadMode")==="scrollBottom"},_nextButtonMode(){return this.option("pageLoadMode")==="nextButton"},_dataSourceOptions(){let i=this._scrollBottomMode(),e=this._nextButtonMode();return m(this.callBase(),{paginate:Be(i||e,!0)})},_getGroupedOption(){return this.option("grouped")},_getGroupContainerByIndex(i){return this._getItemsContainer().find(".dx-list-group").eq(i).find(".dx-list-group-body")},_dataSourceFromUrlLoadMode:()=>"raw",_initScrollView(){let i=this.option("scrollingEnabled"),e=i&&this.option("pullRefreshEnabled"),t=i&&this._scrollBottomMode()&&!!this._dataController.getDataSource();this._scrollView=this._createComponent(this.$element(),iX(),{height:this.option("height"),width:this.option("width"),disabled:this.option("disabled")||!i,onScroll:this._scrollHandler.bind(this),onPullDown:e?this._pullDownHandler.bind(this):null,onReachBottom:t?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=u(this._scrollView.content()),this._$listContainer.appendTo(this._$container),this._toggleWrapItemText(this.option("wrapItemText")),this._createScrollViewActions()},_toggleWrapItemText(i){this._$listContainer.toggleClass("dx-wrap-item-text",i)},_createScrollViewActions(){this._scrollAction=this._createActionByOption("onScroll"),this._pullRefreshAction=this._createActionByOption("onPullRefresh"),this._pageLoadingAction=this._createActionByOption("onPageLoading")},_scrollHandler(i){this._scrollAction&&this._scrollAction(i)},_initTemplates(){this._templateManager.addDefaultTemplates({group:new Ai((i,e)=>{X(e)?e.key&&i.text(e.key):i.text(String(e))},["key"],this.option("integrationOptions.watchMethod"))}),this.callBase()},_prepareDefaultItemTemplate(i,e){if(this.callBase(i,e),i.icon){let t=Mi(i.icon).addClass("dx-list-item-icon"),n=u("<div>").addClass("dx-list-item-icon-container");n.append(t),e.prepend(n)}},_getBindableFields:()=>["text","html","icon"],_updateLoadingState(i){let e=this._dataController,t=this._scrollBottomMode()&&i&&!e.isLoading()&&!this._isLastPage();this._shouldContinueLoading(t)?this._infiniteDataLoading():(this._scrollView.release(!t&&!e.isLoading()),this._toggleNextButton(this._shouldRenderNextButton()&&!this._isLastPage()),this._loadIndicationSuppressed(!1))},_shouldRenderNextButton(){return this._nextButtonMode()&&this._dataController.isLoaded()},_isDataSourceFirstLoadCompleted(i){return f(i)&&(this._isFirstLoadCompleted=i),this._isFirstLoadCompleted},_dataSourceLoadingChangedHandler(i){this._loadIndicationSuppressed()||(i&&this.option("indicateLoading")?this._showLoadingIndicatorTimer=setTimeout(()=>{if(!!this._itemElements().length||this._isDataSourceFirstLoadCompleted()){var n;(n=this._scrollView)===null||n===void 0||n.startLoading()}}):(clearTimeout(this._showLoadingIndicatorTimer),this._scrollView&&this._scrollView.finishLoading()),i||this._isDataSourceFirstLoadCompleted(!1))},_dataSourceChangedHandler(){!this._shouldAppendItems()&&j()&&this._scrollView&&this._scrollView.scrollTo(0),this.callBase.apply(this,arguments),this._isDataSourceFirstLoadCompleted(!0)},_refreshContent(){this._prepareContent(),this._fireContentReadyAction()},_hideLoadingIfLoadIndicationOff(){this.option("indicateLoading")||this._dataSourceLoadingChangedHandler(!1)},_loadIndicationSuppressed(i){if(!arguments.length)return this._isLoadIndicationSuppressed;this._isLoadIndicationSuppressed=i},_scrollViewIsFull(){let i=this._scrollView;return!i||Q(i.content())>Q(i.container())},_pullDownHandler(i){this._pullRefreshAction(i);let e=this._dataController;e.getDataSource()&&!e.isLoading()?(this._clearSelectedItems(),e.pageIndex(0),e.reload()):this._updateLoadingState()},_shouldContinueLoading(i){var e;let t=Q(this._scrollView.content())-Q(this._scrollView.container())<(((e=this._scrollView.scrollOffset())===null||e===void 0?void 0:e.top)??0);return i&&(!this._scrollViewIsFull()||t)},_infiniteDataLoading(){this.$element().is(":visible")&&(clearTimeout(this._loadNextPageTimer),this._loadNextPageTimer=setTimeout(()=>{this._loadNextPage()}))},_scrollBottomHandler(i){this._pageLoadingAction(i),!this._dataController.isLoading()&&!this._isLastPage()?this._loadNextPage():this._updateLoadingState()},_renderItems(i){this.option("grouped")?(x(i,this._renderGroup.bind(this)),this._attachGroupCollapseEvent(),this._renderEmptyMessage(),ht()&&this.attachGroupHeaderInkRippleEvents()):this.callBase.apply(this,arguments),this._refreshItemElements(),this._updateLoadingState(!0)},_attachGroupCollapseEvent(){let i=D(de,this.NAME),e=this.$element(),t=this.option("collapsibleGroups");e.toggleClass("dx-list-collapsible-groups",t),_.off(e,i,".dx-list-group-header"),t&&_.on(e,i,".dx-list-group-header",n=>{this._createAction(o=>{let s=u(o.event.currentTarget).parent();this._collapseGroupHandler(s),this.option("focusStateEnabled")&&this.option("focusedElement",H(s.find(".dx-list-item").eq(0)))},{validatingTargetName:"element"})({event:n})})},_collapseGroupHandler(i,e){let t=y();if(i.hasClass("dx-list-group-collapsed")===e)return t.resolve();let n=i.children(".dx-list-group-body"),o=ee(n),s=0;return o===0&&(Bi(n,"auto"),s=ee(n)),i.toggleClass("dx-list-group-collapsed",e),fe.animate(n,{type:"custom",from:{height:o},to:{height:s},duration:200,complete:function(){this.updateDimensions(),this._updateLoadingState(!0),t.resolve()}.bind(this)}),t.promise()},_dataSourceLoadErrorHandler(){this._forgetNextPageLoading(),this._initialized&&(this._renderEmptyMessage(),this._updateLoadingState())},_initMarkup(){this._itemElementsCache=u(),this.$element().addClass("dx-list"),this.callBase(),this.option("useInkRipple")&&this._renderInkRipple();let i={role:"group",roledescription:O.format("dxList-ariaRoleDescription")};this.setAria(i,this.$element()),this.setAria({role:"application"},this._focusTarget()),this._setListAria()},_setListAria(){let{items:i,allowItemDeleting:e}=this.option(),t=e?O.format("dxList-listAriaLabel-deletable"):O.format("dxList-listAriaLabel"),n=i!=null&&i.length?{role:"listbox",label:t}:{role:void 0,label:void 0};this.setAria(n,this._$listContainer)},_focusTarget(){return this._itemContainer()},_renderInkRipple(){this._inkRipple=Ul()},_toggleActiveState(i,e,t){this.callBase.apply(this,arguments);let n=this;if(!this._inkRipple)return;let o={element:i,event:t};e?ht()?this._inkRippleTimer=setTimeout(()=>{n._inkRipple.showWave(o)},35):n._inkRipple.showWave(o):(clearTimeout(this._inkRippleTimer),this._inkRipple.hideWave(o))},_postprocessRenderItem(i){this._refreshItemElements(),this.callBase.apply(this,arguments),this.option("_swipeEnabled")&&this._attachSwipeEvent(u(i.itemElement))},_attachSwipeEvent(i){let e=D(md,this.NAME);_.on(i,e,this._itemSwipeEndHandler.bind(this))},_itemSwipeEndHandler(i){this._itemDXEventHandler(i,"onItemSwipe",{direction:i.offset<0?"left":"right"})},_nextButtonHandler(i){this._pageLoadingAction(i);let e=this._dataController;e.getDataSource()&&!e.isLoading()&&(this._scrollView.toggleLoading(!0),this._$nextButton.detach(),this._loadIndicationSuppressed(!0),this._loadNextPage())},_renderGroup(i,e){let t=u("<div>").addClass("dx-list-group").appendTo(this._getItemsContainer()),n=`dx-${new Ae().toString()}`,o={role:"group",labelledby:n};this.setAria(o,t);let s=u("<div>").addClass("dx-list-group-header").attr("id",n).appendTo(t),r=this.option("groupTemplate"),a=this._getTemplate(e.template||r,e,i,s),l={index:i,itemData:e,container:H(s)};this._createItemByTemplate(a,l),u("<div>").addClass("dx-list-group-header-indicator").prependTo(s),this._renderingGroupIndex=i;let d=u("<div>").addClass("dx-list-group-body").appendTo(t);x(eX(e)||[],(c,h)=>{this._renderItem({group:i,item:c},h,d)}),this._groupRenderAction({groupElement:H(t),groupIndex:i,groupData:e})},downInkRippleHandler(i){this._toggleActiveState(u(i.currentTarget),!0,i)},upInkRippleHandler(i){this._toggleActiveState(u(i.currentTarget),!1)},attachGroupHeaderInkRippleEvents(){let i=this.$element();this._downInkRippleHandler=this._downInkRippleHandler||this.downInkRippleHandler.bind(this),this._upInkRippleHandler=this._upInkRippleHandler||this.upInkRippleHandler.bind(this);let e=[i,"dxpointerdown",".dx-list-group-header",this._downInkRippleHandler],t=[i,"dxpointerup dxpointerout",".dx-list-group-header",this._upInkRippleHandler];_.off(...e),_.on(...e),_.off(...t),_.on(...t)},_createGroupRenderAction(){this._groupRenderAction=this._createActionByOption("onGroupRendered")},_clean(){clearTimeout(this._inkRippleTimer),this._$nextButton&&(this._$nextButton.remove(),this._$nextButton=null),this.callBase.apply(this,arguments)},_dispose(){this._isDataSourceFirstLoadCompleted(!1),clearTimeout(this._holdTimer),clearTimeout(this._loadNextPageTimer),clearTimeout(this._showLoadingIndicatorTimer),this.callBase()},_toggleDisabledState(i){this.callBase(i),this._scrollView.option("disabled",i||!this.option("scrollingEnabled"))},_toggleNextButton(i){let e=this._dataController,t=this._getNextButton();this.$element().toggleClass("dx-has-next",i),i&&e.isLoaded()&&t.appendTo(this._itemContainer()),i||t.detach()},_getNextButton(){return this._$nextButton||(this._$nextButton=this._createNextButton()),this._$nextButton},_createNextButton(){let i=u("<div>").addClass("dx-list-next-button"),e=u("<div>").appendTo(i);return this._createComponent(e,_t,{text:this.option("nextButtonText"),onClick:this._nextButtonHandler.bind(this),type:wt()?"default":void 0,integrationOptions:{}}),i},_moveFocus(){this.callBase.apply(this,arguments),this.scrollToItem(this.option("focusedElement"))},_refresh(){if(!j())this.callBase();else{let i=this._scrollView.scrollTop();this.callBase(),i&&this._scrollView.scrollTo(i)}},_optionChanged(i){switch(i.name){case"pageLoadMode":this._toggleNextButton(i.value),this._initScrollView();break;case"dataSource":this.callBase(i),this._initScrollView(),this._updateLoadingState(!0),this._isDataSourceFirstLoadCompleted(!1);break;case"items":this.callBase(i),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(!0);break;case"nextButtonText":case"onItemSwipe":case"useInkRipple":case"grouped":case"collapsibleGroups":case"groupTemplate":case"showChevronExpr":case"badgeExpr":this._invalidate();break;case"onScroll":case"onPullRefresh":case"onPageLoading":this._createScrollViewActions();break;case"wrapItemText":this._toggleWrapItemText(i.value);break;case"onGroupRendered":this._createGroupRenderAction();break;case"width":case"height":this.callBase(i),this._scrollView.option(i.name,i.value),this._scrollView.update();break;case"indicateLoading":this._hideLoadingIfLoadIndicationOff();break;case"visible":this.callBase(i),this._scrollView.update();break;case"rtlEnabled":this._initScrollView(),this.callBase(i);break;case"_swipeEnabled":case"selectByClick":break;default:this.callBase(i)}},_extendActionArgs(i){if(!this.option("grouped"))return this.callBase(i);let e=i.closest(".dx-list-group"),t=e.find(".dx-list-item");return m(this.callBase(i),{itemIndex:{group:e.index(),item:t.index(i)}})},expandGroup(i){let e=y(),t=this._getItemsContainer().find(".dx-list-group").eq(i);return this._collapseGroupHandler(t,!1).done(()=>{e.resolveWith(this)}),e.promise()},collapseGroup(i){let e=y(),t=this._getItemsContainer().find(".dx-list-group").eq(i);return this._collapseGroupHandler(t,!0).done(()=>{e.resolveWith(this)}),e},updateDimensions(){let i=this,e=y();return i._scrollView?i._scrollView.update().done(()=>{!i._scrollViewIsFull()&&i._updateLoadingState(!0),e.resolveWith(i)}):e.resolveWith(i),e.promise()},reload(){this.callBase(),this.scrollTo(0),this._pullDownHandler()},repaint(){this.scrollTo(0),this.callBase()},scrollTop(){return this._scrollView.scrollOffset().top},clientHeight(){return this._scrollView.clientHeight()},scrollHeight(){return this._scrollView.scrollHeight()},scrollBy(i){this._scrollView.scrollBy(i)},scrollTo(i){this._scrollView.scrollTo(i)},scrollToItem(i){let e=this._editStrategy.getItemElement(i),t=e?.get(0);this._scrollView.scrollToElement(t,{bottom:MP(t,"bottom")})},_dimensionChanged(){this.updateDimensions()}}).include(ym);Iu.ItemClass=LP;function iX(){return tX||fd}var Om=class extends Iu{_init(){super._init(),this._activeStateUnit=".dx-toolbar-menu-action:not(.dx-toolbar-hidden-button-group)"}_initMarkup(){this._renderSections(),super._initMarkup(),this._setMenuRole()}_getSections(){return this._itemContainer().children()}_itemElements(){return this._getSections().children(this._itemSelector())}_renderSections(){let e=this._itemContainer();x(["before","center","after","menu"],(t,n)=>{let o=`_$${n}Section`;this[o]||(this[o]=u("<div>").addClass("dx-toolbar-menu-section")),this[o].appendTo(e)})}_renderItems(){super._renderItems.apply(this,arguments),this._updateSections()}_setMenuRole(){this.$element().find(".dx-scrollview-content").attr("role","menu")}_updateSections(){let e=this.$element().find(".dx-toolbar-menu-section");e.removeClass("dx-toolbar-menu-last-section"),e.not(":empty").eq(-1).addClass("dx-toolbar-menu-last-section")}_renderItem(e,t,n,o){let s=t.location??"menu",r=this[`_$${s}Section`],a=super._renderItem(e,t,r,o);return this._getItemTemplateName({itemData:t})&&a.addClass("dx-toolbar-menu-custom"),(s==="menu"||t.widget==="dxButton"||t.widget==="dxButtonGroup"||t.isAction)&&a.addClass("dx-toolbar-menu-action"),t.widget==="dxButton"&&a.addClass("dx-toolbar-hidden-button"),t.widget==="dxButtonGroup"&&a.addClass("dx-toolbar-hidden-button-group"),a.addClass(t.cssClass),a}_getItemTemplateName(e){let t=super._getItemTemplateName(e),n=e.itemData;return n&&n.menuItemTemplate||t}_dataSourceOptions(){return{paginate:!1}}_itemClickHandler(e,t,n){u(e.target).closest(".dx-toolbar-menu-action").length&&super._itemClickHandler(e,t,n)}_clean(){this._getSections().empty(),super._clean()}};var Em=class extends Wg{_supportedKeys(){var e;let t={};return(!this.option("opened")||!((e=this._list)!==null&&e!==void 0&&e.option("focusedElement")))&&(t=this._button._supportedKeys()),m(super._supportedKeys(),t,{tab(){this._popup&&this._popup.hide()}})}_getDefaultOptions(){return I({},super._getDefaultOptions(),{items:[],onItemClick:null,dataSource:null,itemTemplate:"item",onButtonClick:null,activeStateEnabled:!0,hoverStateEnabled:!0,opened:!1,onItemRendered:null,closeOnClick:!0,useInkRipple:!1,container:void 0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",to:0}}})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>wt(),options:{useInkRipple:!0,animation:{show:{type:"pop",duration:200,from:{scale:0},to:{scale:1}},hide:{type:"pop",duration:200,from:{scale:1},to:{scale:0}}}}}])}_init(){super._init(),this.$element().addClass("dx-dropdownmenu"),this._initItemClickAction(),this._initButtonClickAction()}_initItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")}_initButtonClickAction(){this._buttonClickAction=this._createActionByOption("onButtonClick")}_initTemplates(){this._templateManager.addDefaultTemplates({content:new Lr("content")}),super._initTemplates()}_initMarkup(){this._renderButton(),super._initMarkup()}_render(){super._render(),this.setAria({haspopup:!0,expanded:this.option("opened")})}_renderContentImpl(){this.option("opened")&&this._renderPopup()}_clean(){this._cleanFocusState(),this._list&&this._list.$element().remove(),this._popup&&this._popup.$element().remove(),delete this._list,delete this._popup}_renderButton(){let e=this.$element().addClass("dx-dropdownmenu-button");this._button=this._createComponent(e,_t,{icon:"overflow",template:"content",stylingMode:Ot()?"text":"contained",useInkRipple:this.option("useInkRipple"),hoverStateEnabled:!1,focusStateEnabled:!1,onClick:t=>{this.option("opened",!this.option("opened")),this._buttonClickAction(t)}})}_toggleActiveState(e,t,n){this._button._toggleActiveState(e,t,n)}_toggleMenuVisibility(e){var t,n;let o=e??!((t=this._popup)!==null&&t!==void 0&&t.option("visible"));e&&this._renderPopup(),(n=this._popup)===null||n===void 0||n.toggle(o),this.setAria("expanded",o)}_renderPopup(){if(this._$popup)return;this._$popup=u("<div>").appendTo(this.$element());let{rtlEnabled:e,container:t,animation:n}=this.option();this._popup=this._createComponent(this._$popup,"dxPopup",{onInitialized(o){let{component:s}=o;s.$wrapper().addClass("dx-dropdownmenu-popup-wrapper").addClass("dx-dropdownmenu-popup")},deferRendering:!1,preventScrollEvents:!1,contentTemplate:o=>this._renderList(o),_ignoreFunctionValueDeprecation:!0,maxHeight:()=>this._getMaxHeight(),position:{my:"top "+(e?"left":"right"),at:"bottom "+(e?"left":"right"),collision:"fit flip",offset:{v:3},of:this.$element()},animation:n,onOptionChanged:o=>{let{name:s,value:r}=o;s==="visible"&&this.option("opened",r)},container:t,autoResizeEnabled:!1,height:"auto",width:"auto",hideOnOutsideClick:o=>this._closeOutsideDropDownHandler(o),hideOnParentScroll:!0,shading:!1,dragEnabled:!1,showTitle:!1,fullScreen:!1,_fixWrapperPosition:!0})}_getMaxHeight(){let e=this.$element(),t=e.offset().top,n=ee(q()),o=Math.max(t,n-t-ee(e));return Math.min(n,o-3-10)}_closeOutsideDropDownHandler(e){return!u(e.target).closest(this.$element()).length}_renderList(e){let t=u(e);t.addClass("dx-dropdownmenu-list"),this._list=this._createComponent(t,Om,{dataSource:this._getListDataSource(),pageLoadMode:"scrollBottom",indicateLoading:!1,noDataText:"",itemTemplate:this.option("itemTemplate"),onItemClick:n=>{this.option("closeOnClick")&&this.option("opened",!1),this._itemClickAction(n)},tabIndex:-1,focusStateEnabled:!1,activeStateEnabled:!0,onItemRendered:this.option("onItemRendered"),_itemAttributes:{role:"menuitem"}})}_itemOptionChanged(e,t,n){var o;(o=this._list)===null||o===void 0||o._itemOptionChanged(e,t,n),gd(this._list,e)}_getListDataSource(){return this.option("dataSource")??this.option("items")}_setListDataSource(){var e;(e=this._list)===null||e===void 0||e.option("dataSource",this._getListDataSource()),delete this._deferRendering}_getKeyboardListeners(){return super._getKeyboardListeners().concat([this._list])}_toggleVisibility(e){var t;super._toggleVisibility(e),(t=this._button)===null||t===void 0||t.option("visible",e)}_optionChanged(e){var t,n,o;let{name:s,value:r}=e;switch(s){case"items":case"dataSource":this.option("opened")?this._setListDataSource():this._deferRendering=!0;break;case"itemTemplate":(t=this._list)===null||t===void 0||t.option(s,this._getTemplate(r));break;case"onItemClick":this._initItemClickAction();break;case"onButtonClick":this._buttonClickAction();break;case"useInkRipple":this._invalidate();break;case"focusStateEnabled":(n=this._list)===null||n===void 0||n.option(s,r),super._optionChanged(e);break;case"onItemRendered":(o=this._list)===null||o===void 0||o.option(s,r);break;case"opened":this._deferRendering&&this._setListDataSource(),this._toggleMenuVisibility(r),this._updateFocusableItemsTabIndex();break;case"closeOnClick":break;case"container":this._popup&&this._popup.option(s,r);break;case"disabled":this._list&&this._updateFocusableItemsTabIndex();break;default:super._optionChanged(e)}}_updateFocusableItemsTabIndex(){this.option("items").forEach(e=>gd(this._list,e))}};var $y="dx-toolbar-item-invisible",wm=class{constructor(e){this._toolbar=e}_initMarkup(){pt(()=>{this._renderOverflowMenu(),this._renderMenuItems()})}_renderOverflowMenu(){if(!this._hasVisibleMenuItems())return;this._renderMenuButtonContainer();let e=u("<div>").appendTo(this._overflowMenuContainer()),t=this._toolbar._createActionByOption("onItemClick"),n=this._toolbar._getTemplateByOption("menuItemTemplate");this._menu=this._toolbar._createComponent(e,Em,{disabled:this._toolbar.option("disabled"),itemTemplate:()=>n,onItemClick:o=>{t(o)},container:this._toolbar.option("menuContainer"),onOptionChanged:o=>{let{name:s,value:r}=o;s==="opened"&&this._toolbar.option("overflowMenuVisible",r),s==="items"&&this._updateMenuVisibility(r)}})}renderMenuItems(){this._menu||this._renderOverflowMenu(),this._menu&&this._menu.option("items",this._getMenuItems()),this._menu&&!this._menu.option("items").length&&this._menu.option("opened",!1)}_renderMenuButtonContainer(){this._$overflowMenuContainer=u("<div>").appendTo(this._toolbar._$afterSection).addClass("dx-toolbar-button").addClass("dx-toolbar-menu-container")}_overflowMenuContainer(){return this._$overflowMenuContainer}_updateMenuVisibility(e){let t=e??this._getMenuItems(),n=t.length&&this._hasVisibleMenuItems(t);this._toggleMenuVisibility(n)}_toggleMenuVisibility(e){this._overflowMenuContainer()&&this._overflowMenuContainer().toggleClass("dx-state-invisible",!e)}_renderMenuItems(){pt(()=>{this.renderMenuItems()})}_dimensionChanged(){this.renderMenuItems()}_getToolbarItems(){return At(this._toolbar.option("items")??[],e=>!this._toolbar._isMenuItem(e))}_getHiddenItems(){return this._toolbar._itemContainer().children(`.dx-toolbar-item-auto-hide.${$y}`).not(".dx-state-invisible")}_getMenuItems(){let e=At(this._toolbar.option("items")??[],o=>this._toolbar._isMenuItem(o)),t=this._getHiddenItems();return this._restoreItems=this._restoreItems??[],[...[].slice.call(t).map(o=>{let s=this._toolbar._getItemData(o),r=u(o),a=r.children();return m({menuItemTemplate:()=>(this._restoreItems.push({container:r,item:a}),u("<div>").addClass("dx-toolbar-item-auto-hide").append(a))},s)}),...e]}_hasVisibleMenuItems(e){let t=e??this._toolbar.option("items"),n=!1,o=Ce("visible"),s=Ce("locateInMenu");return x(t,(r,a)=>{let l=o(a,{functionsAsIs:!0}),d=s(a,{functionsAsIs:!0});(l!==!1&&(d==="auto"||d==="always")||a.location==="menu")&&(n=!0)}),n}_arrangeItems(){this._toolbar._$centerSection.css({margin:"0 auto",float:"none"}),x(this._restoreItems??[],(t,n)=>{u(n.container).append(n.item)}),this._restoreItems=[];let e=W(this._toolbar.$element());return this._hideOverflowItems(e),e}_hideOverflowItems(e){let t=this._toolbar.$element().find(".dx-toolbar-item-auto-hide");if(!t.length)return;let n=e??W(this._toolbar.$element());u(t).removeClass($y);let o=this._getItemsWidth();for(;t.length&&n<o;)t.eq(-1).addClass($y),o=this._getItemsWidth(),t.splice(-1,1)}_getItemsWidth(){return this._toolbar._getSummaryItemsSize("width",[this._toolbar._$beforeSection,this._toolbar._$centerSection,this._toolbar._$afterSection])}_itemOptionChanged(e,t,n){if((t==="disabled"||t==="options.disabled")&&this._toolbar._isMenuItem(e)){var o;(o=this._menu)===null||o===void 0||o._itemOptionChanged(e,t,n);return}this.renderMenuItems()}_renderItem(e,t){e.locateInMenu==="auto"&&t.addClass("dx-toolbar-item-auto-hide")}_optionChanged(e,t){var n,o,s,r,a;switch(e){case"disabled":(n=this._menu)===null||n===void 0||n.option(e,t);break;case"overflowMenuVisible":(o=this._menu)===null||o===void 0||o.option("opened",t);break;case"onItemClick":(s=this._menu)===null||s===void 0||s.option(e,t);break;case"menuContainer":(r=this._menu)===null||r===void 0||r.option("container",t);break;case"menuItemTemplate":(a=this._menu)===null||a===void 0||a.option("itemTemplate",t)}}};var Sm=class extends Ly{_getDefaultOptions(){return I({},super._getDefaultOptions(),{menuItemTemplate:"menuItem",menuContainer:void 0,overflowMenuVisible:!1,multiline:!1})}_isMultiline(){return this.option("multiline")}_dimensionChanged(e){e!=="height"&&(super._dimensionChanged(),this._layoutStrategy._dimensionChanged())}_initMarkup(){super._initMarkup(),this._updateFocusableItemsTabIndex(),this._layoutStrategy._initMarkup()}_renderToolbar(){super._renderToolbar(),this._renderLayoutStrategy()}_itemContainer(){return this._isMultiline()?this._$toolbarItemsContainer:super._itemContainer()}_renderLayoutStrategy(){this.$element().toggleClass("dx-toolbar-multiline",this._isMultiline()),this._layoutStrategy=this._isMultiline()?new fm(this):new wm(this)}_renderSections(){if(!this._isMultiline())return super._renderSections()}_postProcessRenderItems(){this._layoutStrategy._hideOverflowItems(),this._layoutStrategy._updateMenuVisibility(),super._postProcessRenderItems(),this._layoutStrategy._renderMenuItems()}_renderItem(e,t,n,o){let s=super._renderItem(e,t,n,o);this._layoutStrategy._renderItem(t,s);let{widget:r,showText:a}=t;return r==="dxButton"&&a==="inMenu"&&s.toggleClass("dx-toolbar-text-auto-hide"),s}_getItemsWidth(){return this._layoutStrategy._getItemsWidth()}_getMenuItems(){return this._layoutStrategy._getMenuItems()}_getToolbarItems(){return this._layoutStrategy._getToolbarItems()}_arrangeItems(){if(this.$element().is(":hidden"))return;let e=this._layoutStrategy._arrangeItems();this._isMultiline()||super._arrangeItems(e)}_itemOptionChanged(e,t,n,o){this._isMenuItem(e)||super._itemOptionChanged(e,t,n,o),this._layoutStrategy._itemOptionChanged(e,t,n),(t==="disabled"||t==="options.disabled")&&gd(this,e),t==="location"&&this.repaint()}_updateFocusableItemsTabIndex(){this._getToolbarItems().forEach(e=>gd(this,e))}_isMenuItem(e){return e.location==="menu"||e.locateInMenu==="always"}_isToolbarItem(e){return e.location===void 0||e.locateInMenu==="never"}_optionChanged(e){let{name:t,value:n}=e;switch(this._layoutStrategy._optionChanged(t,n),t){case"menuContainer":case"menuItemTemplate":case"overflowMenuVisible":break;case"multiline":this._invalidate();break;case"disabled":super._optionChanged(e),this._updateFocusableItemsTabIndex();break;default:super._optionChanged(e)}}updateDimensions(){this._dimensionChanged()}};K("dxToolbar",Sm);var NP=Sm;var HP=NP;var $P=HP;var zP=["addRowButton","applyFilterButton","columnChooserButton","exportButton","groupPanel","revertButton","saveButton","searchPanel"],zy=class extends bo{init(){super.init(),this._editingController=this.getController("editing"),this._headerFilterController=this.getController("headerFilter"),this.createAction("onToolbarPreparing",{excludeValidators:["disabled","readOnly"]})}_getToolbarItems(){return[]}_getButtonContainer(){return u("<div>").addClass(this.addWidgetPrefix("toolbar-button"))}_getToolbarButtonClass(e){let t=e?` ${e}`:"";return this.addWidgetPrefix("toolbar-button")+t}_getToolbarOptions(){let e=this.option("toolbar"),t={toolbarOptions:{items:this._getToolbarItems(),visible:e?.visible,disabled:e?.disabled,onItemRendered(o){let s=o.itemData.onItemRendered;s&&s(o)}}},n=e?.items;if(t.toolbarOptions.items=this._normalizeToolbarItems(t.toolbarOptions.items,n),this.executeAction("onToolbarPreparing",t),t.toolbarOptions&&!f(t.toolbarOptions.visible)){let o=t.toolbarOptions.items;t.toolbarOptions.visible=!!(o!=null&&o.length)}return t.toolbarOptions}_normalizeToolbarItems(e,t){e.forEach(a=>{if(!zP.includes(a.name))throw new Error(`Default toolbar item '${a.name}' is not added to DEFAULT_TOOLBAR_ITEM_NAMES`)});let n={location:"after"},o=Array.isArray(t);if(!f(t))return e;o||(t=[t]);let s={};e.forEach(a=>{s[a.name]=a});let r=t.map(a=>(B(a)&&(a={name:a}),f(a.name)&&(f(s[a.name])?a=m(!0,{},s[a.name],a):zP.includes(a.name)&&(a=I({},a,{visible:!1}))),m(!0,{},n,a)));return o?r:r[0]}_renderCore(){if(this._toolbar)this._toolbar.option(this._toolbarOptions);else{let e=this.element();e.addClass(this.addWidgetPrefix("header-panel"));let t=O.format(this.component.NAME+"-ariaToolbar"),n=u("<div>").attr("aria-label",t).appendTo(e);this._toolbar=this._createComponent(n,$P,this._toolbarOptions)}}_columnOptionChanged(){}_handleDataChanged(){this._requireReady&&this.render()}_isDisabledDefinedByUser(e){var t;let n=(t=this.option("toolbar"))===null||t===void 0?void 0:t.items,o=n?.find(s=>s?.name===e);return f(o?.disabled)}render(){this._toolbarOptions=this._getToolbarOptions(),super.render.apply(this,arguments)}setToolbarItemDisabled(e,t){let n=this._toolbar,o=this._isDisabledDefinedByUser(e);if(!n||o)return;let r=(n.option("items")??[]).findIndex(l=>l.name===e);if(r<0)return;let a=n.option(`items[${r}]`);n.option(`items[${r}].disabled`,t),a.options&&n.option(`items[${r}].options.disabled`,t)}updateToolbarDimensions(){var e;(e=this._toolbar)===null||e===void 0||e.updateDimensions()}getHeaderPanel(){return this.element()}getHeight(){return this.getElementHeight()}optionChanged(e){if(e.name==="onToolbarPreparing"&&(this._invalidate(),e.handled=!0),e.name==="toolbar"){let s=Jn(e.fullName),r=e.fullName.replace(/^toolbar\./,"");if(s.length===1||s[1]==="visible")this._invalidate();else if(s[1]==="items"){if(s.length===2)this._invalidate();else if(s.length===3){var t;let a=this._normalizeToolbarItems(this._getToolbarItems(),e.value);(t=this._toolbar)===null||t===void 0||t.option(r,a)}else if(s.length>=4){var n;(n=this._toolbar)===null||n===void 0||n.option(r,e.value)}}else{var o;(o=this._toolbar)===null||o===void 0||o.option(r,e.value)}e.handled=!0}super.optionChanged(e)}isVisible(){return!!(this._toolbarOptions&&this._toolbarOptions.visible)}allowDragging(){}hasGroupedColumns(){}},nX=i=>class extends i{_updateDimensionsCore(){super._updateDimensionsCore.apply(this,arguments),this.getView("headerPanel").updateToolbarDimensions()}},Wy={defaultOptions:()=>({}),views:{headerPanel:zy},extenders:{controllers:{resizing:nX}}};var VNe=Wy.views.headerPanel;$.registerModule("headerPanel",Wy);var Im=class extends at{_getDefaultOptions(){let e=super._getDefaultOptions();return x(this.getGridCoreHelper().modules,function(){A(this.defaultOptions)&&m(!0,e,this.defaultOptions())}),e}_init(){this._activeStateUnit=".dx-row",super._init()}_setDeprecatedOptions(){super._setDeprecatedOptions(),m(this._deprecatedOptions,{"columnChooser.allowSearch":{since:"23.1",message:'Use the "columnChooser.search.enabled" option instead'},"columnChooser.searchTimeout":{since:"23.1",message:'Use the "columnChooser.search.timeout" option instead'}})}_clean(){}_optionChanged(e){this.getGridCoreHelper().callModuleItemsMethod(this,"optionChanged",[e]),e.handled||super._optionChanged(e)}_dimensionChanged(){this.updateDimensions(!0)}_visibilityChanged(e){e&&this.updateDimensions()}_renderContentImpl(){this.getView("gridView").update()}_renderContent(){let e=this;pt(()=>{e._renderContentImpl()})}_dispose(){super._dispose(),this.getGridCoreHelper().callModuleItemsMethod(this,"dispose")}isReady(){return this.getController("data").isReady()}getController(e){return this._controllers[e]}getView(e){return this._views[e]}getGridCoreHelper(){}beginUpdate(){super.beginUpdate(),this.getGridCoreHelper().callModuleItemsMethod(this,"beginUpdate")}endUpdate(){this.getGridCoreHelper().callModuleItemsMethod(this,"endUpdate"),super.endUpdate()}};var oX="Specifying grid templates with the jQuery selector name is now deprecated. Use the DOM Node or the jQuery object that references this selector instead.";$.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 Dm=class extends Im{_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:{platform:"ios"},options:{showRowLines:!0}},{device:()=>wt(),options:{showRowLines:!0,showColumnLines:!1,headerFilter:{height:315},editing:{useIcons:!0},selection:{showCheckBoxesMode:"always"}}},{device:()=>we.webkit,options:{loadingTimeout:30,loadPanel:{animation:{show:{easing:"cubic-bezier(1, 0, 1, 0)",duration:500,from:{opacity:0},to:{opacity:1}}}}}},{device:e=>e.deviceType!=="desktop",options:{grouping:{expandMode:"rowClick"}}}])}_init(){super._init(),R.logHeaderFilterDeprecatedWarningIfNeed(this),$.processModules(this,$),$.callModuleItemsMethod(this,"init")}_initMarkup(){super._initMarkup.apply(this,arguments),this.getView("gridView").render(this.$element())}_setDeprecatedOptions(){super._setDeprecatedOptions(),m(this._deprecatedOptions,{useKeyboard:{since:"19.2",alias:"keyboardNavigation.enabled"},rowTemplate:{since:"21.2",message:'Use the "dataRowTemplate" option instead'}})}static registerModule(e,t){$.registerModule(e,t)}getGridCoreHelper(){return $}_getTemplate(e){let t=e;return B(t)&&t.startsWith("#")&&(t=u(e),Er.warn(oX)),super._getTemplate(t)}focus(e){this.getController("keyboardNavigation").focus(e)}};K("dxDataGrid",Dm);var WP=Dm;var sX=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/,KP=function(i){i&&x(i,(e,t)=>{if(X(t)||Array.isArray(t))KP(t);else if(typeof t=="string"){let n=sX.exec(t);n&&(i[e]=new Date(Date.UTC(+n[1],+n[2]-1,+n[3],+n[4],+n[5],+n[6])))}})},GP=function(i){let e=i.type==="sessionStorage"?_p():q().localStorage;if(!e)throw new Error("E1007");return e},jP=function(i){return f(i.storageKey)?i.storageKey:"storage"},Tm=class extends ye.ViewController{getDataController(){return this.getController("data")}getExportController(){return this.getController("export")}getColumnsController(){return this.getController("columns")}init(){return this._state={},this._isLoaded=!1,this._isLoading=!1,this._windowUnloadHandler=()=>{this._savingTimeoutID!==void 0&&this._saveState(this.state())},_.on(q(),"visibilitychange",this._windowUnloadHandler),this}optionChanged(e){let t=this;e.name==="stateStoring"?(t.isEnabled()&&!t.isLoading()&&t.load(),e.handled=!0):super.optionChanged(e)}dispose(){clearTimeout(this._savingTimeoutID),_.off(q(),"visibilitychange",this._windowUnloadHandler)}_loadState(){let e=this.option("stateStoring");if(e.type==="custom")return e.customLoad&&e.customLoad();try{return JSON.parse(GP(e).getItem(jP(e)))}catch(t){ie.log("W1022","State storing",t.message)}}_saveState(e){let t=this.option("stateStoring");if(t.type==="custom"){t.customSave&&t.customSave(e);return}try{GP(t).setItem(jP(t),JSON.stringify(e))}catch(n){ie.log(n.message)}}publicMethods(){return["state"]}isEnabled(){return this.option("stateStoring.enabled")}isLoaded(){return this._isLoaded}isLoading(){return this._isLoading}load(){this._isLoading=!0;let e=Et(this._loadState());return e.always(()=>{this._isLoaded=!0,this._isLoading=!1}).done(t=>{t!==null&&!bt(t)&&this.state(t)}),e}state(e){let t=this;if(!arguments.length)return m(!0,{},t._state);t._state=m({},e),KP(t._state)}save(){let e=this;clearTimeout(e._savingTimeoutID),e._savingTimeoutID=setTimeout(()=>{e._saveState(e.state()),e._savingTimeoutID=void 0},e.option("stateStoring.savingTimeout"))}};var rX=i=>{let e=i.getView("pagerView"),t=i.getController("data"),n={allowedPageSizes:e?e.getPageSizes():void 0,filterPanel:{filterEnabled:i.option("filterPanel.filterEnabled")},filterValue:i.option("filterValue"),focusedRowKey:i.option("focusedRowEnabled")?i.option("focusedRowKey"):void 0};return m(n,t.getUserState())},aX=i=>{let e=i.getController("columns"),t=i.getController("selection"),n=i.getController("export"),o=i.getController("data");e&&e.columnsChanged.add(()=>{i.updateState({columns:e.getUserState()})}),t&&t.selectionChanged.add(s=>{i.updateState({selectedRowKeys:s.selectedRowKeys,selectionFilter:s.selectionFilter})}),o&&(i._initialPageSize=i.option("paging.pageSize"),i._initialFilterValue=i.option("filterValue"),o.changed.add(()=>{let s=rX(i);i.updateState(s)})),n&&n.selectionOnlyChanged.add(()=>{i.updateState({exportSelectionOnly:n.selectionOnly()})})};var lX=(i,e)=>{let t=i.getController("filterSync"),n=i.getController("columns"),o=e.columns||e.filterValue!==void 0;return t?o?e.filterValue||t.getFilterValueFromColumns(e.columns):i._initialFilterValue||t.getFilterValueFromColumns(n.getColumns()):null},dX=i=>class extends i{init(){super.init(),this._dataController.stateLoaded.add(()=>{if(this._dataController.isLoaded()&&!this._dataController.getDataSource()){this.setLoading(!1),this.renderNoDataText();let e=this.component.getView("columnHeadersView");e&&e.render(),this.component._fireContentReadyAction()}})}},cX=i=>class extends i{init(){return super.init.apply(this,arguments),aX(this),this}isLoading(){return super.isLoading()||this.getDataController().isStateLoading()}state(e){let t=super.state.apply(this,arguments);return e!==void 0&&this.applyState(m(!0,{},e)),t}updateState(e){if(this.isEnabled()){let t=this.state(),n=m({},t,e),o=Di(t),s=Di(n);Ee(o,s)||(e=m(!0,{},e),m(this._state,e),this.save())}else m(this._state,e)}applyState(e){var t;let{allowedPageSizes:n}=e,{searchText:o}=e,{selectedRowKeys:s}=e,{selectionFilter:r}=e,a=this.option("scrolling.mode"),l=a==="virtual"||a==="infinite",d=this.option("pager.visible")===!0&&this.option("pager.showPageSizeSelector"),c=(t=this.getView("rowsView"))===null||t===void 0?void 0:t.hasHeight();this.component.beginUpdate(),this.getColumnsController()&&this.getColumnsController().setUserState(e.columns),this.getExportController()&&this.getExportController().selectionOnly(e.exportSelectionOnly),this.option("selection.deferred")||this.option("selectedRowKeys",s||[]),this.option("selectionFilter",r),n&&this.option("pager.allowedPageSizes")==="auto"&&(this.option("pager").allowedPageSizes=n),this.option("focusedRowEnabled")&&(this.option("focusedRowIndex",-1),this.option("focusedRowKey",e.focusedRowKey??null)),this.component.endUpdate(),this.option("searchPanel.text",o||""),this.option("filterValue",lX(this,e)),this.option("filterPanel.filterEnabled",e.filterPanel?e.filterPanel.filterEnabled:!0),this.option("paging.pageIndex",(!l||c)&&e.pageIndex||0),this.option("paging.pageSize",(!l||d)&&f(e.pageSize)?e.pageSize:this._initialPageSize),this.getDataController()&&this.getDataController().reset()}},uX=i=>class extends i{_shouldReturnVisibleColumns(){return super._shouldReturnVisibleColumns.apply(this,arguments)&&(!this._stateStoringController.isEnabled()||this._stateStoringController.isLoaded())}},hX=i=>class extends i{dispose(){clearTimeout(this._restoreStateTimeoutID),super.dispose()}callbackNames(){return super.callbackNames().concat(["stateLoaded"])}_refreshDataSource(){if(this._stateStoringController.isEnabled()&&!this._stateStoringController.isLoaded()){clearTimeout(this._restoreStateTimeoutID);let e=new y;return this._restoreStateTimeoutID=setTimeout(()=>{this._stateStoringController.load().always(()=>{this._restoreStateTimeoutID=null}).done(()=>{super._refreshDataSource(),this.stateLoaded.fire(),e.resolve()}).fail(t=>{this.stateLoaded.fire(),this._handleLoadError(t||"Unknown error"),e.reject()})}),e.promise()}this.isStateLoading()||super._refreshDataSource()}isLoading(){return super.isLoading()||this._stateStoringController.isLoading()}isStateLoading(){return f(this._restoreStateTimeoutID)}isLoaded(){return super.isLoaded()&&!this.isStateLoading()}},pX=i=>class extends i{_fireSelectionChanged(e){let t=this.option("selection.deferred");this._stateStoringController.isLoading()&&t||super._fireSelectionChanged.apply(this,arguments)}},UP={defaultOptions:()=>({stateStoring:{enabled:!1,storageKey:null,type:"localStorage",customLoad:null,customSave:null,savingTimeout:2e3}}),controllers:{stateStoring:Tm},extenders:{views:{rowsView:dX},controllers:{stateStoring:cX,columns:uX,data:hX,selection:pX}}};$.registerModule("stateStoring",UP);var gX="dx-select-checkboxes-hidden";var xs="selection.showCheckBoxesMode",Du="selection.mode",qP=function(i,e){let t=i.getView("rowsView"),n=i.getController("selection"),o=u(e.target).closest(".dx-data-row"),s=t.getRowIndex(o);s<0||(i.option(xs)==="onLongTap"?n.isSelectionWithCheckboxes()?n.stopSelectionWithCheckboxes():n.startSelectionWithCheckboxes():(i.option(xs)==="onClick"&&n.startSelectionWithCheckboxes(),i.option(xs)!=="always"&&n.changeItemSelection(s,{control:!0})))},mX=function(i,e){let t=0,n=i._dataController.store(),o=n&&n.key(),s=Array.isArray(o);if(!e.length)return!1;if(s&&Array.isArray(e[0])&&e[1]==="and"){for(let r=0;r<e.length;r++)if(Array.isArray(e[r])){if(e[r][0]!==o[t]||e[r][1]!=="=")return!0;t++}return!1}return o!==e[0]},fX=(i,e)=>{let{component:t}=e,n=t.getView("rowsView");t.option("renderAsync")&&!t.option("selection.deferred")&&(e.value=t.isRowSelected(e.row.key)),n.renderSelectCheckBoxContainer(u(i),e)},_X=(i,e)=>{let{column:t}=e,n=u(i),o=e.component.getView("columnHeadersView");n.addClass("dx-editor-cell"),o._renderSelectAllCheckBox(n,t),o._attachSelectAllCheckBoxClickEvent(n)},Gy=class extends ye.Controller{init(){let{deferred:e,selectAllMode:t,mode:n}=this.option("selection")??{};this.option("scrolling.mode")==="infinite"&&!e&&n==="multiple"&&t==="allPages"&&ie.log("W1018"),this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._stateStoringController=this.getController("stateStoring"),this._selectionMode=n,this._isSelectionWithCheckboxes=!1,this._selection=this._createSelection(),this._updateSelectColumn(),this.createAction("onSelectionChanged",{excludeValidators:["disabled","readOnly"]}),this._dataPushedHandler||(this._dataPushedHandler=this._handleDataPushed.bind(this),this._dataController.pushed.add(this._dataPushedHandler))}_handleDataPushed(e){this._deselectRemovedOnPush(e),this._updateSelectedOnPush(e)}_deselectRemovedOnPush(e){let t=this.option("selection.deferred"),n=e.filter(o=>o.type==="remove").map(o=>o.key);if(t){let o=this._dataController.items().filter(s=>s.isSelected).map(s=>s.key);n=n.filter(s=>o.find(r=>Ee(r,s)))}n.length&&this.deselectRows(n)}_updateSelectedOnPush(e){if(this.option("selection.deferred"))return;let n=e.filter(s=>s.type==="update"),o=this.getSelectedRowsData();no({keyInfo:this._selection.options,data:o,changes:n})}_getSelectionConfig(){let e=this._dataController,t=this._columnsController,n=this.option("selection")??{},{deferred:o}=n,s=this.option("scrolling.mode"),r=s==="virtual"||s==="infinite",a=this.option("selection.allowSelectAll"),l=this.option("scrolling.legacyMode");return{selectedKeys:this.option("selectedRowKeys"),mode:this._selectionMode,deferred:o,alwaysSelectByShift:n.alwaysSelectByShift,maxFilterLengthInRequest:n.maxFilterLengthInRequest,selectionFilter:this.option("selectionFilter"),ignoreDisabledItems:!0,isVirtualPaging:r,sensitivity:this.option("selection.sensitivity"),allowLoadByRange(){let d=t.getGroupColumns().length>0;return r&&!l&&!d&&a&&!o},key:()=>e?.key(),keyOf:d=>e?.keyOf(d),dataFields(){var d;return(d=e.dataSource())===null||d===void 0?void 0:d.select()},load(d){var c;return((c=e.dataSource())===null||c===void 0?void 0:c.load(d))||new y().resolve([])},plainItems:d=>e.items(!0),isItemSelected:d=>d.selected,isSelectableItem:d=>d?.rowType==="data"&&!d.isNewRow,getItemData:d=>f(d?.rowType)?d?.oldData||d?.data:d,filter:()=>e.getCombinedFilter(o),totalCount:()=>e.totalCount(),getLoadOptions(d,c,h){var p;let{sort:g,filter:C}=((p=e.dataSource())===null||p===void 0?void 0:p.lastLoadOptions())??{},v=Math.min(d,c),b=Math.max(d,c);f(h)&&(v=Math.min(h,v),b=Math.max(h,b));let T=b-v+1;return{skip:v,take:T,filter:C,sort:g}},onSelectionChanged:this._updateSelectedItems.bind(this)}}_updateSelectColumn(){let e=this._columnsController,t=this.isSelectColumnVisible();e.addCommandColumn({type:"selection",command:"select",visible:t,visibleIndex:-1,dataType:"boolean",alignment:"center",cssClass:"dx-command-select",width:"auto",cellTemplate:fX,headerCellTemplate:_X}),e.columnOption("command:select","visible",t)}_createSelection(){let e=this._getSelectionConfig();return new Yl(e)}_fireSelectionChanged(e){let t=this.option("selection.deferred")?{selectionFilter:this.option("selectionFilter")}:{selectedRowKeys:this.option("selectedRowKeys")};this.selectionChanged.fire(t),e&&this.executeAction("onSelectionChanged",e)}_updateCheckboxesState(e){let{isDeferredMode:t}=e,{selectionFilter:n}=e,{selectedItemKeys:o}=e,{removedItemKeys:s}=e;this.option(xs)==="onClick"&&((t?n&&mX(this,n):o.length>1)?this.startSelectionWithCheckboxes():(t?n&&!n.length:o.length===0&&s.length)&&this.stopSelectionWithCheckboxes())}_updateSelectedItems(e){let t=this,n,o=t.option("selection.deferred"),s=t._selection.selectionFilter(),r=t._dataController,a=r.items(!0),l=r.items();if(!a)return;let d=t.isSelectionWithCheckboxes(),c=t.getChangedItemIndexes(a),h=t.getChangedItemIndexes(l);t._updateCheckboxesState({selectedItemKeys:e.selectedItemKeys,removedItemKeys:e.removedItemKeys,selectionFilter:s,isDeferredMode:o}),(c.length||d!==t.isSelectionWithCheckboxes())&&r.updateItems({changeType:"updateSelection",itemIndexes:h}),o?(t.option("selectionFilter",s),n={}):(e.addedItemKeys.length||e.removedItemKeys.length)&&(t._selectedItemsInternalChange=!0,t.option("selectedRowKeys",e.selectedItemKeys.slice(0)),t._selectedItemsInternalChange=!1,n={selectedRowsData:e.selectedItems.slice(0),selectedRowKeys:e.selectedItemKeys.slice(0),currentSelectedRowKeys:e.addedItemKeys.slice(0),currentDeselectedRowKeys:e.removedItemKeys.slice(0)}),t._fireSelectionChanged(n)}getChangedItemIndexes(e){let t=this,n=[],o=this.option("selection.deferred");for(let s=0,{length:r}=e;s<r;s++){let a=e[s],l=t.isRowSelected(o?a.data:a.key);t._selection.isDataItem(a)&&a.isSelected!==l&&n.push(s)}return n}callbackNames(){return["selectionChanged"]}optionChanged(e){var t;super.optionChanged(e);let n=!!((t=this._selection)!==null&&t!==void 0&&t.options);switch(e.name){case"selection":{let o=this._selectionMode;if(this.init(),n&&e.fullName==="selection.sensitivity"&&(this._selection.options.sensitivity=e.value),e.fullName!=="selection.showCheckBoxesMode"){let s=this._selectionMode,r=this.option("selectedRowKeys");o!==s&&(s==="single"?r.length>1&&(r=[r[0]]):s!=="multiple"&&(r=[])),this.selectRows(r).always(()=>{this._fireSelectionChanged()})}this._columnsController.updateColumns(),e.handled=!0;break}case"selectionFilter":this._selection.selectionFilter(e.value),e.handled=!0;break;case"selectedRowKeys":{let o=e.value||[];Array.isArray(o)&&!this._selectedItemsInternalChange&&(this.component.getDataSource()||!o.length)&&this.selectRows(o),e.handled=!0;break}}}publicMethods(){return["selectRows","deselectRows","selectRowsByIndexes","getSelectedRowKeys","getSelectedRowsData","clearSelection","selectAll","deselectAll","startSelectionWithCheckboxes","stopSelectionWithCheckboxes","isRowSelected"]}isRowSelected(e){return this._selection.isItemSelected(e)}isSelectColumnVisible(){return this.option(Du)==="multiple"&&(this.option(xs)==="always"||this.option(xs)==="onClick"||this._isSelectionWithCheckboxes)}_isOnePageSelectAll(){return this.option("selection.selectAllMode")==="page"}isSelectAll(){return this._selection.getSelectAllState(this._isOnePageSelectAll())}selectAll(){return this.option(xs)==="onClick"&&this.startSelectionWithCheckboxes(),this._selection.selectAll(this._isOnePageSelectAll())}deselectAll(){return this._selection.deselectAll(this._isOnePageSelectAll())}clearSelection(){return this.selectedItemKeys([])}refresh(){let e=this.option("selectedRowKeys")??[];return!this.option("selection.deferred")&&e.length?this.selectedItemKeys(e):new y().resolve().promise()}selectedItemKeys(e,t,n,o){return this._selection.selectedItemKeys(e,t,n,o)}getSelectedRowKeys(e){return this._selection.getSelectedItemKeys()}selectRows(e,t){return this.selectedItemKeys(e,t)}deselectRows(e){return this.selectedItemKeys(e,!0,!0)}selectRowsByIndexes(e){let t=this._dataController.items(),n=[];return Array.isArray(e)||(e=Array.prototype.slice.call(arguments,0)),x(e,function(){let o=t[this];o&&o.rowType==="data"&&n.push(o.key)}),this.selectRows(n)}getSelectedRowsData(e){return this._selection.getSelectedItems()}loadSelectedItemsWithFilter(){return this._selection.loadSelectedItemsWithFilter()}changeItemSelection(e,t,n){t=t||{},this.isSelectionWithCheckboxes()&&(t.control=!0);let o=e+this._dataController.getRowIndexOffset()-this._dataController.getRowIndexOffset(!0);return this._selection.changeItemSelection(o,t,n)}focusedItemIndex(e){let t=this;if(f(e))t._selection._focusedItemIndex=e;else return t._selection._focusedItemIndex}isSelectionWithCheckboxes(){return this.option(Du)==="multiple"&&(this.option(xs)==="always"||this._isSelectionWithCheckboxes)}startSelectionWithCheckboxes(){let e=this;return e.option(Du)==="multiple"&&!e.isSelectionWithCheckboxes()?(e._isSelectionWithCheckboxes=!0,e._updateSelectColumn(),!0):!1}stopSelectionWithCheckboxes(){let e=this;return e._isSelectionWithCheckboxes?(e._isSelectionWithCheckboxes=!1,e._updateSelectColumn(),!0):!1}},CX=i=>class extends i{init(){let e=this.option("selection.deferred");super.init.apply(this,arguments),e&&this._selectionController._updateCheckboxesState({isDeferredMode:!0,selectionFilter:this.option("selectionFilter")})}_loadDataSource(){let e=this;return super._loadDataSource().always(()=>{e._selectionController.refresh()})}_processDataItem(e,t){let n=this._selectionController.isSelectColumnVisible(),o=t.isDeferredSelection=t.isDeferredSelection===void 0?this.option("selection.deferred"):t.isDeferredSelection,s=super._processDataItem.apply(this,arguments);if(s.isSelected=this._selectionController.isRowSelected(o?s.data:s.key),n&&s.values){for(let r=0;r<t.visibleColumns.length;r++)if(t.visibleColumns[r].command==="select"){s.values[r]=s.isSelected;break}}return s}refresh(e){let t=this,n=new y;return super.refresh.apply(this,arguments).done(()=>{!e||e.selection?t._selectionController.refresh().done(n.resolve).fail(n.reject):n.resolve()}).fail(n.reject),n.promise()}_handleDataChanged(e){let t=this.hasLoadOperation();super._handleDataChanged.apply(this,arguments),t&&!this._repaintChangesOnly&&this._selectionController.focusedItemIndex(-1)}_applyChange(e){if(e&&e.changeType==="updateSelection"){e.items.forEach((t,n)=>{let o=this._items[n];o&&(o.isSelected=t.isSelected,o.values=t.values)});return}return super._applyChange.apply(this,arguments)}_endUpdateCore(){let e=this._changes;if(e.length>1&&e.every(n=>n.changeType==="updateSelection")){let n=e.map(o=>o.itemIndexes||[]).reduce((o,s)=>o.concat(s));this._changes=[{changeType:"updateSelection",itemIndexes:n}]}super._endUpdateCore.apply(this,arguments)}},xX=i=>class extends i{_contextMenuPrepared(e){let t=e.event;t.originalEvent&&t.originalEvent.type!=="dxhold"||e.items&&e.items.length>0||qP(this,t)}},vX=i=>class extends i{init(){super.init(),this._selectionController.selectionChanged.add(this._updateSelectAllValue.bind(this))}_updateSelectAllValue(){let e=this,t=e.element(),n=t&&t.find(".dx-select-checkbox");if(t&&n.length&&e.option("selection.mode")==="multiple"){let o=e._selectionController.isSelectAll(),s=o!==!1,r=e.option("selection.allowSelectAll")?!e._dataController.isEmpty():s;n.dxCheckBox("instance").option({visible:r,value:o})}}_handleDataChanged(e){super._handleDataChanged(e),(!e||e.changeType==="refresh"||e.repaintChangesOnly&&e.changeType==="update")&&this.waitAsyncTemplates().done(()=>{this._updateSelectAllValue()})}_renderSelectAllCheckBox(e,t){let n=this,o=n._dataController.isEmpty(),s=u("<div>").appendTo(e).addClass("dx-select-checkbox");return n.setAria("label",O.format("dxDataGrid-ariaSelectAll"),s),n._editorFactoryController.createEditor(s,m({},t,{parentType:"headerRow",dataType:"boolean",value:this._selectionController.isSelectAll(),editorOptions:{visible:!o&&(n.option("selection.allowSelectAll")||this._selectionController.isSelectAll()!==!1)},tabIndex:n.option("useLegacyKeyboardNavigation")?-1:n.option("tabIndex")||0,setValue:(r,a)=>{let l=n.option("selection.allowSelectAll");a.component.option("visible",l||a.component.option("value")!==!1),!(!a.event||this._selectionController.isSelectAll()===r)&&(a.value&&!l?a.component.option("value",!1):a.value?this._selectionController.selectAll():this._selectionController.deselectAll(),a.event.preventDefault())}})),s}_attachSelectAllCheckBoxClickEvent(e){_.on(e,de,this.createAction(t=>{let{event:n}=t;u(n.target).closest(".dx-select-checkbox").length||_.trigger(u(n.currentTarget).children(".dx-select-checkbox"),de),n.preventDefault()}))}},bX=i=>class extends i{renderSelectCheckBoxContainer(e,t){t.rowType==="data"&&!t.row.isNewRow?(e.addClass("dx-editor-cell"),this._attachCheckBoxClickEvent(e),this._renderSelectCheckBox(e,t)):R.setEmptyText(e)}_renderSelectCheckBox(e,t){let n=u("<div>").addClass("dx-select-checkbox").appendTo(e);return this.setAria("label",O.format("dxDataGrid-ariaSelectRow"),n),this._editorFactoryController.createEditor(n,m({},t.column,{parentType:"dataRow",dataType:"boolean",lookup:null,value:t.value,setValue(o,s){var r;(s==null||(r=s.event)===null||r===void 0?void 0:r.type)==="keydown"&&_.trigger(s.element,de,s)},row:t.row})),n}_attachCheckBoxClickEvent(e){_.on(e,de,this.createAction(function(t){let{event:n}=t,o=this.getRowIndex(u(n.currentTarget).closest(".dx-row"));o>=0&&(this._selectionController.startSelectionWithCheckboxes(),this._selectionController.changeItemSelection(o,{shift:n.shiftKey}),u(n.target).closest(".dx-select-checkbox").length&&this._dataController.updateItems({changeType:"updateSelection",itemIndexes:[o]}))}))}_update(e){let t=this,n=t.getTableElements();e.changeType==="updateSelection"?n.length>0&&(x(n,(o,s)=>{x(e.itemIndexes||[],(r,a)=>{let l;if(e.items[a]&&(l=t._getRowElements(u(s)).eq(a),l.length)){let{isSelected:d}=e.items[a];l.toggleClass("dx-selection",d===void 0?!1:d).find(".dx-select-checkbox").dxCheckBox("option","value",d),t.setAria("selected",d,l)}})}),t._updateCheckboxesClass()):super._update(e)}_createTable(){let e=this,t=e.option("selection.mode"),n=super._createTable.apply(e,arguments);return t!=="none"&&((e.option(xs)==="onLongTap"||!ao)&&_.on(n,D(yn.name,"dxDataGridRowsView"),".dx-data-row",e.createAction(o=>{qP(e.component,o.event),o.event.stopPropagation()})),_.on(n,"mousedown selectstart",e.createAction(o=>{let{event:s}=o;s.shiftKey&&s.preventDefault()}))),n}_createRow(e){let t=super._createRow.apply(this,arguments);if(e){let{isSelected:n}=e;n&&t.addClass("dx-selection"),this.option(Du)!=="none"&&this.setAria("selected",n,t)}return t}_rowClickForTreeList(e){super._rowClick(e)}_rowClick(e){let t=this,n=e.event,o=u(n.target).closest(".dx-selection-disabled").length;t.isClickableElement(u(n.target))||(!o&&(t.option(Du)!=="multiple"||t.option(xs)!=="always")&&t._selectionController.changeItemSelection(e.rowIndex,{control:ft(n),shift:n.shiftKey})&&(n.preventDefault(),e.handled=!0),super._rowClick(e))}isClickableElement(e){return!!e.closest(".dx-command-select").length}_renderCore(e){let t=super._renderCore(e);return this._updateCheckboxesClass(),t}_updateCheckboxesClass(){let e=this.getTableElements(),t=this._selectionController.isSelectColumnVisible()&&!this._selectionController.isSelectionWithCheckboxes();x(e,(n,o)=>{u(o).toggleClass(gX,t)})}},YP={defaultOptions:()=>({selection:{mode:"none",showCheckBoxesMode:"onClick",allowSelectAll:!0,selectAllMode:"allPages",deferred:!1,maxFilterLengthInRequest:1500,alwaysSelectByShift:!1},selectionFilter:[],selectedRowKeys:[]}),controllers:{selection:Gy},extenders:{controllers:{data:CX,contextMenu:xX},views:{columnHeadersView:vX,rowsView:bX}}};$.registerModule("selection",YP);function XP(i,e){var t;return(((t=i.getRootNode)===null||t===void 0?void 0:t.call(i))??document).querySelector(e)}var QP="dx-invalid-message-auto",ZP="dx-validation-target",_d=class extends nd{getProps(){let e=super.getProps();return e.onFocusIn=()=>{if(this.option("validationMessageMode")==="auto"){let n=u(XP(this.element(),".dx-invalid-message.dx-overlay-wrapper"));n?.removeClass(QP);let o=150;this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout),this.showValidationMessageTimeout=setTimeout(()=>{n?.addClass(QP)},o)}},e.saveValueChangeEvent=t=>{this._valueChangeEventInstance=t},e}_createElement(e){super._createElement(e),this.showValidationMessageTimeout=void 0,this.validationRequest=ge(),Xe(this.$element()[0],ZP,this)}_render(){var e;(e=this.option("_onMarkupRendered"))===null||e===void 0||e()}_init(){super._init(),this._initialValue=this.option("value")}_initializeComponent(){super._initializeComponent(),this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]})}_initOptions(e){super._initOptions(e),this.option(fi.initValidationOptions(e))}_getDefaultOptions(){return m(super._getDefaultOptions(),{validationMessageOffset:{h:0,v:0},validationTooltipOptions:{}})}_bindInnerWidgetOptions(e,t){let n=m({},e.option()),o=()=>this._silent(t,n);o(),e.on("optionChanged",o)}_raiseValidation(e,t){let n=!f(e)&&!f(t);e!==t&&!n&&this.validationRequest.fire({value:e,editor:this})}_raiseValueChangeAction(e,t){var n;(n=this._valueChangeAction)===null||n===void 0||n.call(this,{element:this.$element(),previousValue:t,value:e,event:this._valueChangeEventInstance}),this._valueChangeEventInstance=void 0}_optionChanged(e){let{name:t,previousValue:n,value:o}=e;switch(t&&this._getActionConfigs()[t]!==void 0&&this._addAction(t),t){case"value":this._raiseValidation(o,n),this.option("isDirty",this._initialValue!==o),this._raiseValueChangeAction(o,n);break;case"onValueChanged":this._valueChangeAction=this._createActionByOption("onValueChanged",{excludeValidators:["disabled","readOnly"]});break;case"isValid":case"validationError":case"validationErrors":case"validationStatus":this.option(fi.synchronizeValidationOptions(e,this.option()))}super._optionChanged(e)}clear(){let{value:e}=this._getDefaultOptions();this.option({value:e})}reset(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;arguments.length&&(this._initialValue=e),this.option("value",this._initialValue),this.option("isDirty",!1),this.option("isValid",!0)}_dispose(){super._dispose(),Xe(this.element(),ZP,null),this.showValidationMessageTimeout&&clearTimeout(this.showValidationMessageTimeout)}};var yX=vi.isEditor,JP=i=>yX(i)||i instanceof _d;_d.isEditor=JP;vi.isEditor=JP;var Am=class extends _d{_useTemplates(){return!1}_isFocused(){return this.$element()[0].classList.contains("dx-state-focused")}getSupportedKeyNames(){return["space"]}getProps(){let e=super.getProps();return e.value!==null&&(e.value=!!e.value),e}};var OX=["dataSource","selectedRowKeys"],EX={integrationOptions:!0};function Tu(i,e,t){return{path:i,value:e,previousValue:t}}function ek(i,e,t,n,o,s){if(EX[n])return;let r=Ii(e),a=Ii(t);if(e!==t)if(r!==a)i.push(Tu(n,t,e));else if(r==="object")if(!X(t))i.push(Tu(n,t,e));else{let l=tk(e,t,o,s);i.push(...l.map(d=>I({},d,{path:`${n}.${d.path}`})))}else if(r==="array")if(s.some(d=>o.includes(d))&&e!==t)i.push(Tu(n,t,e));else if(e.length!==t.length)i.push(Tu(n,t,e));else{let d=tk(e,t,o,s);[].push.apply(i,d.map(c=>I({},c,{path:`${n}${c.path}`})))}else i.push(Tu(n,t,e))}var ik=i=>(e,t,n,o)=>{let s=[],r=Array.isArray(e)?a=>{ek(s,e[a],t[a],`[${a}]`,`${n}.${a}`,o)}:a=>{ek(s,e[a],t[a],a,`${n}.${a}`,o)};return i(e).forEach(r),Object.keys(t).filter(a=>!Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==t[a]).forEach(a=>{s.push({path:a,value:t[a],previousValue:e[a]})}),s},tk=ik(i=>Object.keys(i)),wX={key:!0,ref:!0,children:!0,style:!0},SX=ik(i=>Object.keys(i).filter(e=>!wX[e]));function nk(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:OX;return SX(i,e,"",t)}var IX=["valueChange"],DX=["componentProps","componentType","templateNames"],ok=i=>Object.keys(i).reduce((e,t)=>(i[t]!==void 0&&(e[t]=i[t]),e),{}),TX=i=>{let{props:{componentProps:{className:e}},restAttributes:t,widgetRef:n}=i;return ok(tt(1,"div",e,null,1,I({},t),null,n))},AX={},Cd=(()=>{class i extends $i{get config(){return this.context[li.id]?this.context[li.id]:li.defaultValue}constructor(t){super(t),this.state={},this.widgetRef=Ct(),this.getInstance=this.getInstance.bind(this),this.setupWidget=this.setupWidget.bind(this),this.updateWidget=this.updateWidget.bind(this)}createEffects(){return[new Ke(this.setupWidget,[]),new Ke(this.updateWidget,[this.props.componentProps,this.config,this.props.templateNames])]}updateEffects(){var t;(t=this._effects[1])===null||t===void 0||t.update([this.props.componentProps,this.config,this.props.templateNames])}setupWidget(){let t=new this.props.componentType(this.widgetRef.current,this.properties);return this.instance=t,()=>{t.dispose(),this.instance=null}}updateWidget(){let t=this.getInstance();if(!t)return;let n=nk(this.prevProps||{},this.properties);n.length&&(t.beginUpdate(),n.forEach(o=>{let{path:s,value:r}=o;t.option(s,r)}),t.endUpdate()),this.prevProps=this.properties}get properties(){var t;let n=ok(this.props.componentProps),{valueChange:o}=n,s=_e(n,IX),r=I({rtlEnabled:!!((t=this.config)!==null&&t!==void 0&&t.rtlEnabled),isRenovated:!0},s);return o&&(r.onValueChanged=l=>{let{value:d}=l;return o(d)}),this.props.templateNames.forEach(l=>{PM(l,r,this)&&(r[l]=(d,c,h)=>{FM(this.props.componentProps[l],{item:d,index:c,container:h},this)})}),r}get restAttributes(){let t=this.props;return _e(t,DX)}getInstance(){return this.instance}render(){let t=this.props;return TX({props:I({},t),widgetRef:this.widgetRef,config:this.config,properties:this.properties,restAttributes:this.restAttributes})}}return i.defaultProps=AX,i})();var MX=["accessKey","activeStateEnabled","boundary","className","contentId","disabled","focusStateEnabled","height","hint","hoverStateEnabled","mode","offset","onClick","onKeyDown","positionSide","rtlEnabled","tabIndex","target","validationErrors","visible","visualContainer","width"],RX=i=>{let{componentProps:e,restAttributes:t}=i;return Ft(Re(2,Cd,I({componentType:bg,componentProps:e,templateNames:[]},t)))},FX=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(jr),Object.getOwnPropertyDescriptors({mode:"auto",positionSide:"top",offset:Object.freeze({h:0,v:0}),isReactComponentWrapper:!0}))),sk=(()=>{class i extends Dt{constructor(t){super(t),this.state={}}get componentProps(){return this.props}get restAttributes(){let t=this.props;return _e(t,MX)}render(){let t=this.props;return RX({props:I({},t),componentProps:this.componentProps,restAttributes:this.restAttributes})}}return i.defaultProps=FX,i})();var PX=["accessKey","activeStateEnabled","aria","children","className","classes","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","inputAttr","isDirty","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"],kX=i=>{let{classes:e,isValid:t,readOnly:n}=i,o={"dx-state-readonly":!!n,"dx-invalid":!t,[String(e)]:!!e};return yi(o)},BX=i=>{let{aria:e,cssClasses:t,isValidationMessageVisible:n,onFocusIn:o,props:{accessKey:s,activeStateEnabled:r,children:a,className:l,disabled:d,focusStateEnabled:c,height:h,hint:p,hoverStateEnabled:g,onClick:C,onKeyDown:v,rtlEnabled:b,tabIndex:T,validationMessageMode:M,validationMessagePosition:G,visible:te,width:oe},restAttributes:re,rootElementRef:Ie,validationErrors:Fe,validationMessageGuid:We,validationMessageTarget:di,widgetRef:St}=i;return Ft(Re(2,sd,I({rootElementRef:Ie,aria:e,classes:t,activeStateEnabled:r,focusStateEnabled:c,hoverStateEnabled:g,accessKey:s,className:l,rtlEnabled:b,hint:p,disabled:d,height:h,width:oe,onFocusIn:o,onClick:C,onKeyDown:v,tabIndex:T,visible:te},re,{children:fn([a,n&&Re(2,sk,{validationErrors:Fe,mode:M,positionSide:G,rtlEnabled:b,target:di,boundary:di,visualContainer:di,contentId:We})],0)}),null,St))},kt=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(jr),Object.getOwnPropertyDescriptors({readOnly:!1,name:"",validationError:null,validationErrors:null,validationMessageMode:"auto",validationMessagePosition:"bottom",validationStatus:"valid",isValid:!0,isDirty:!1,inputAttr:Object.freeze({}),defaultValue:null,valueChange:()=>{}}))),VX={get readOnly(){return kt.readOnly},get name(){return kt.name},get validationError(){return kt.validationError},get validationErrors(){return kt.validationErrors},get validationMessageMode(){return kt.validationMessageMode},get validationMessagePosition(){return kt.validationMessagePosition},get validationStatus(){return kt.validationStatus},get isValid(){return kt.isValid},get isDirty(){return kt.isDirty},get inputAttr(){return kt.inputAttr},get defaultValue(){return kt.defaultValue},get valueChange(){return kt.valueChange},get className(){return kt.className},get activeStateEnabled(){return kt.activeStateEnabled},get disabled(){return kt.disabled},get focusStateEnabled(){return kt.focusStateEnabled},get hoverStateEnabled(){return kt.hoverStateEnabled},get tabIndex(){return kt.tabIndex},get visible(){return kt.visible},get aria(){return od.aria},get classes(){return od.classes}},Au=class extends fo{constructor(e){super(e),this.widgetRef=Ct(),this.rootElementRef=Ct(),this.__getterCache={},this.state={validationMessageGuid:`dx-${new Ae}`,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 Ke(this.updateValidationMessageVisibility,[this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors]),_s()]}updateEffects(){var e;(e=this._effects[0])===null||e===void 0||e.update([this.props.isValid,this.props.validationStatus,this.props.validationError,this.props.validationErrors])}updateValidationMessageVisibility(){this.setState(e=>({isValidationMessageVisible:this.shouldShowValidationMessage}))}onFocusIn(e){let{onFocusIn:t}=this.props;t?.(e)}get cssClasses(){return`${kX(I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}))}`}get shouldShowValidationMessage(){let{isValid:e,validationStatus:t}=this.props,n=this.validationErrors??[];return!(e&&t!=="invalid")&&n.length>0}get aria(){let{isValid:e,readOnly:t}=this.props,n={readonly:t?"true":"false",invalid:e?"false":"true"};return this.shouldShowValidationMessage&&(n.describedBy=this.state.validationMessageGuid),I({},n,this.props.aria)}get validationErrors(){return this.__getterCache.validationErrors!==void 0?this.__getterCache.validationErrors:this.__getterCache.validationErrors=(()=>{let{validationError:e,validationErrors:t}=this.props,n=t&&[...t];return!n&&e&&(n=[I({},e)]),n})()}get validationMessageTarget(){var e;return(e=this.rootElementRef)===null||e===void 0?void 0:e.current}get restAttributes(){let e=I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value});return _e(e,PX)}focus(){this.widgetRef.current.focus()}blur(){this.widgetRef.current.blur()}componentWillUpdate(e,t,n){super.componentWillUpdate(),(this.props.validationError!==e.validationError||this.props.validationErrors!==e.validationErrors)&&(this.__getterCache.validationErrors=void 0)}render(){let e=this.props;return BX({props:I({},e,{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})}};Au.defaultProps=VX;var LX=["size"],NX=i=>{let{cssStyles:e,elementRef:t}=i;return tt(1,"span","dx-checkbox-icon",null,1,{style:id(e)},null,t)},HX={},rk=(()=>{class i extends Dt{constructor(t){super(t),this.state={},this.elementRef=Ct(),this.__getterCache={}}get cssStyles(){return this.__getterCache.cssStyles!==void 0?this.__getterCache.cssStyles:this.__getterCache.cssStyles=(()=>{let{size:t}=this.props;return{fontSize:Vs("fontSize",t)}})()}get restAttributes(){let t=this.props;return _e(t,LX)}componentWillUpdate(t,n,o){this.props.size!==t.size&&(this.__getterCache.cssStyles=void 0)}render(){let t=this.props;return NX({props:I({},t),elementRef:this.elementRef,cssStyles:this.cssStyles,restAttributes:this.restAttributes})}}return i.defaultProps=HX,i})();var $X=["accessKey","activeStateEnabled","aria","className","defaultValue","disabled","enableThreeStateBehavior","focusStateEnabled","height","hint","hoverStateEnabled","iconSize","inputAttr","isDirty","isValid","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","saveValueChangeEvent","tabIndex","text","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"],zX=i=>{let{text:e,value:t}=i,n=t;return yi({"dx-checkbox":!0,"dx-checkbox-checked":n===!0,"dx-checkbox-has-text":!!e,"dx-checkbox-indeterminate":n===null})},WX=i=>{let{aria:e,cssClasses:t,editorRef:n,keyDown:o,onWidgetClick:s,props:{accessKey:r,activeStateEnabled:a,className:l,disabled:d,focusStateEnabled:c,height:h,hint:p,hoverStateEnabled:g,iconSize:C,isValid:v,name:b,onFocusIn:T,readOnly:M,rtlEnabled:G,tabIndex:te,text:oe,validationError:re,validationErrors:Ie,validationMessageMode:Fe,validationMessagePosition:We,validationStatus:di,value:St,visible:wo,width:pa},restAttributes:Vn}=i;return Ft(Re(2,Au,I({aria:e,classes:t,onClick:s,onKeyDown:o,accessKey:r,activeStateEnabled:a,focusStateEnabled:c,hoverStateEnabled:g,className:l,disabled:d,readOnly:M,hint:p,height:h,width:pa,rtlEnabled:G,tabIndex:te,visible:wo,validationError:re,validationErrors:Ie,validationMessageMode:Fe,validationMessagePosition:We,validationStatus:di,isValid:v,onFocusIn:T},Vn,{children:fn([Ft(tt(64,"input",null,null,1,I({type:"hidden",value:`${St}`},b&&{name:b}))),tt(1,"div","dx-checkbox-container",[Re(2,rk,{size:C,isChecked:St===!0}),oe&&tt(1,"span","dx-checkbox-text",oe,0)],0)],4)}),null,n))},Ei=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(kt),Object.getOwnPropertyDescriptors({text:"",enableThreeStateBehavior:!1,activeStateEnabled:!0,hoverStateEnabled:!0,get focusStateEnabled(){return F.real().deviceType==="desktop"&&!F.isSimulator()},defaultValue:!1,valueChange:()=>{}}))),GX={get text(){return Ei.text},get enableThreeStateBehavior(){return Ei.enableThreeStateBehavior},get activeStateEnabled(){return Ei.activeStateEnabled},get hoverStateEnabled(){return Ei.hoverStateEnabled},get focusStateEnabled(){return Ei.focusStateEnabled},get defaultValue(){return Ei.defaultValue},get valueChange(){return Ei.valueChange},get readOnly(){return Ei.readOnly},get name(){return Ei.name},get validationError(){return Ei.validationError},get validationErrors(){return Ei.validationErrors},get validationMessageMode(){return Ei.validationMessageMode},get validationMessagePosition(){return Ei.validationMessagePosition},get validationStatus(){return Ei.validationStatus},get isValid(){return Ei.isValid},get isDirty(){return Ei.isDirty},get inputAttr(){return Ei.inputAttr},get className(){return Ei.className},get disabled(){return Ei.disabled},get tabIndex(){return Ei.tabIndex},get visible(){return Ei.visible},get aria(){return od.aria}},Wa=class extends fo{constructor(e){super(e),this.editorRef=Ct(),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[_s()]}onWidgetClick(e){let{enableThreeStateBehavior:t,readOnly:n,saveValueChangeEvent:o}=this.props;if(!n)if(o?.(e),t){let s;this.setState(r=>(s=(this.props.value!==void 0?this.props.value:r.value)===null||((this.props.value!==void 0?this.props.value:r.value)?!1:null),{value:s})),this.props.valueChange(s)}else{let s;this.setState(r=>(s=!((this.props.value!==void 0?this.props.value:r.value)??!1),{value:s})),this.props.valueChange(s)}}keyDown(e){let{onKeyDown:t}=this.props,{keyName:n,originalEvent:o,which:s}=e,r=t?.(e);if(r!=null&&r.cancel)return r;(n==="space"||s==="space")&&(o.preventDefault(),this.onWidgetClick(o))}get cssClasses(){return zX(I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value}))}get aria(){let e=(this.props.value!==void 0?this.props.value:this.state.value)===!0,n={role:"checkbox",checked:(this.props.value!==void 0?this.props.value:this.state.value)===null?"mixed":`${e}`};return I({},n,this.props.aria)}get restAttributes(){let e=I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value});return _e(e,$X)}focus(){this.editorRef.current.focus()}blur(){this.editorRef.current.blur()}render(){let e=this.props;return WX({props:I({},e,{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 jX(i){let e=["value"];return Object.keys(i).reduce((t,n)=>{let o=i[n],s=e.some(r=>r===n)?"default"+n.charAt(0).toUpperCase()+n.slice(1):n;return t[s]=o,t},{})}Wa.defaultProps=GX;var ak=[];function lk(i){ak.push(i),Wa.defaultProps=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(Wa.defaultProps),Object.getOwnPropertyDescriptors(jX(Bo(ak)))))}var xd=class extends Am{getProps(){let e=super.getProps();return e.onKeyDown=this._wrapKeyDownHandler(e.onKeyDown),e}focus(){var e;return(e=this.viewRef)===null||e===void 0?void 0:e.focus(...arguments)}blur(){var e;return(e=this.viewRef)===null||e===void 0?void 0:e.blur(...arguments)}_getActionConfigs(){return{onFocusIn:{},onClick:{}}}get _propsInfo(){return{twoWay:[["value","defaultValue","valueChange"]],allowNull:["defaultValue","validationError","validationErrors","value"],elements:[],templates:[],props:["text","iconSize","enableThreeStateBehavior","activeStateEnabled","hoverStateEnabled","focusStateEnabled","saveValueChangeEvent","defaultValue","valueChange","readOnly","name","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","isValid","isDirty","inputAttr","onFocusIn","className","accessKey","disabled","height","hint","onClick","onKeyDown","rtlEnabled","tabIndex","visible","width","aria","value"]}}get _viewComponent(){return Wa}};K("dxCheckBox",xd);xd.defaultOptions=lk;var na=xd;var Un="dx-treeview",wn=`${Un}-node`,ar=`${wn}-container`,jy=`${wn}-loadindicator`,oa=`${wn}-container-opened`,Mu=`${wn}-is-leaf`,rn=`${Un}-item`,KX=`${rn}-with-checkbox`,UX=`${rn}-with-custom-expander-icon`,qX=`${Un}-custom-expander-icon-item-container`,YX=`${rn}-without-checkbox`,XX=`${rn}-data`,Ru=`${Un}-toggle-item-visibility`,Ky=`${Un}-custom-collapse-icon`,Uy=`${Un}-custom-expand-icon`,QX=`${Un}-loadindicator`,ZX=`${Un}-loadindicator-wrapper`,dk=`${Un}-toggle-item-visibility-opened`,Mm=`${Un}-select-all-item`;var Rm="data-item-id";var JX=`${Un}-root-node`,e6=`${Un}-expander-icon-stub`,t6=zg.inherit({_supportedKeys(i){let e=o=>{let s=u(this.option("focusedElement"));if(!s.length)return;o.target=s,o.currentTarget=s,this._itemClickHandler(o,s.children(`.${rn}`)),this._getEventNameByOption(this.option("expandEvent"))===D(de,"dxTreeView_expand")&&this._expandEventHandler(o)},t=o=>{o.preventDefault();let s=u(this.option("focusedElement")),r=this._getCheckBoxInstance(s);if(!r.option("disabled")){let a=r.option("value");this._updateItemSelection(!a,s.find(`.${rn}`).get(0),!0)}},n=function(o,s){if(!this.option("expandAllEnabled"))return;s.preventDefault();let r=u(this.option("focusedElement"));if(!r.length)return;let a=this._getItemData(r.find(`.${rn}`));this._toggleExpandedNestedItems([a],o)};return m(this.callBase(),{enter:this._showCheckboxes()?t:e,space:this._showCheckboxes()?t:e,asterisk:n.bind(this,!0),minus:n.bind(this,!1)})},_toggleExpandedNestedItems(i,e){if(i)for(let t=0,n=i.length;t<n;t++){let o=i[t],s=this._dataAdapter.getNodeByItem(o);this._toggleExpandedState(s,e),this._toggleExpandedNestedItems(o.items,e)}},_getNodeElement(i,e){let t=this._encodeString(i.internalFields.key);if(e)return e.$nodeByKey||(e.$nodeByKey={},this.$element().find(`.${wn}`).each(function(){let o=u(this),s=o.attr(Rm);e.$nodeByKey[s]=o})),e.$nodeByKey[t]||u();let n=this.$element().get(0).querySelector(`[${Rm}="${t}"]`);return u(n)},_activeStateUnit:`.${rn}`,_widgetClass:()=>Un,_getDefaultOptions(){let i=m(this.callBase(),{animationEnabled:!0,dataStructure:"tree",deferRendering:!0,expandAllEnabled:!1,hasItemsExpr:"hasItems",selectNodesRecursive:!0,expandNodesRecursive:!0,showCheckBoxesMode:"none",expandIcon:null,collapseIcon:null,selectAllText:O.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,_supportItemUrl:!1});return m(!0,i,{integrationOptions:{useDeferUpdateForTemplates:!1}})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>!lo,options:{useNativeScrolling:!1}}])},_initSelectedItems:E,_syncSelectionOptions:kh,_fireSelectionChanged(){let i=this._selectionChangePromise;P(i).done(()=>{this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})()})},_createSelectAllValueChangedAction(){this._selectAllValueChangedAction=this._createActionByOption("onSelectAllValueChanged",{excludeValidators:["disabled","readOnly"]})},_fireSelectAllValueChanged(i){this._selectAllValueChangedAction({value:i})},_checkBoxModeChange(i,e){let t=this.option("searchEnabled"),n=this._selectAllEnabled(e),o=this._itemContainer(t,n);if(this._detachClickEvent(o),this._detachExpandEvent(o),e==="none"||i==="none")return;let s=this._$selectAllItem&&this._$selectAllItem.length;switch(i){case"selectAll":s||(this._createSelectAllValueChangedAction(),this._renderSelectAllItem());break;case"normal":s&&(this._$selectAllItem.remove(),delete this._$selectAllItem)}},_removeSelection(){let i=this;x(this._dataAdapter.getFullData(),(e,t)=>{i._hasChildren(t)&&i._dataAdapter.toggleSelection(t.internalFields.key,!1,!0)})},_optionChanged(i){let{name:e,value:t,previousValue:n}=i;switch(e){case"selectAllText":this._$selectAllItem&&this._$selectAllItem.dxCheckBox("instance").option("text",t);break;case"showCheckBoxesMode":this._checkBoxModeChange(t,n),this._invalidate();break;case"scrollDirection":this.getScrollable().option("direction",t);break;case"useNativeScrolling":this.getScrollable().option("useNative",t);break;case"items":delete this._$selectAllItem,this.callBase(i);break;case"dataSource":this.callBase(i),this._initDataAdapter(),this._filter={};break;case"hasItemsExpr":this._initAccessors(),this.repaint();break;case"expandEvent":this._attachExpandEvent();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":case"_supportItemUrl":break;case"selectionMode":this._initDataAdapter(),this.callBase(i);break;case"onSelectAllValueChanged":this._createSelectAllValueChangedAction();break;case"selectNodesRecursive":this._dataAdapter.setOption("recursiveSelection",i.value),this.repaint();break;case"expandIcon":case"collapseIcon":this.repaint();break;default:this.callBase(i)}},_initDataSource(){this._useCustomChildrenLoader()?this._loadChildrenByCustomLoader(null).done(i=>{i&&i.length&&this.option("items",i)}):(this.callBase(),this._isVirtualMode()&&this._initVirtualMode())},_initVirtualMode(){let i=this._filter;i.custom||(i.custom=this._dataSource.filter()),i.internal||(i.internal=[this.option("parentIdExpr"),this.option("rootValue")])},_useCustomChildrenLoader(){return A(this.option("createChildren"))&&this._isDataStructurePlain()},_loadChildrenByCustomLoader(i){let e=this.option("createChildren").call(this,i);return Array.isArray(e)?y().resolve(e).promise():e&&A(e.then)?Et(e):y().resolve([]).promise()},_combineFilter(){return!this._filter.custom||!this._filter.custom.length?this._filter.internal:[this._filter.custom,this._filter.internal]},_dataSourceLoadErrorHandler(){this._renderEmptyMessage()},_init(){this._filter={},this.callBase(),this._initStoreChangeHandlers()},_dataSourceChangedHandler(i){let e=this.option("items");this._initialized&&this._isVirtualMode()&&e.length||this.option("items",i)},_removeTreeViewLoadIndicator(){this._treeViewLoadIndicator&&(this._treeViewLoadIndicator.remove(),this._treeViewLoadIndicator=null)},_createTreeViewLoadIndicator(){return this._treeViewLoadIndicator=u("<div>").addClass(QX),this._createComponent(this._treeViewLoadIndicator,bi,{}),this._treeViewLoadIndicator},_dataSourceLoadingChangedHandler(i){let e;if(this._isVirtualMode()&&(e=this._combineFilter(),this._dataSource.filter(e)),i&&!this._dataSource.isLoaded()){this.option("items",[]);let t=u("<div>").addClass(ZX);this._createTreeViewLoadIndicator().appendTo(t),this.itemsContainer().append(t),this._isVirtualMode()&&this._dataSource.filter()!==e&&this._dataSource.filter([])}else this._removeTreeViewLoadIndicator()},_initStoreChangeHandlers(){this.option("dataStructure")==="plain"&&this._dataSource&&this._dataSource.store().on("inserted",i=>{this.option().items=this.option("items").concat(i),this._dataAdapter.addItem(i),this._dataAdapter.isFiltered(i)&&this._updateLevel(this._parentIdGetter(i))}).on("removed",i=>{let e=this._dataAdapter.getNodeByKey(i);f(e)&&(this.option("items")[this._dataAdapter.getIndexByKey(e.internalFields.key)]=0,this._markChildrenItemsToRemove(e),this._removeItems(),this._dataAdapter.removeItem(i),this._updateLevel(this._parentIdGetter(e)))})},_markChildrenItemsToRemove(i){let e=i.internalFields.childrenKeys;x(e,(t,n)=>{this.option("items")[this._dataAdapter.getIndexByKey(n)]=0,this._markChildrenItemsToRemove(this._dataAdapter.getNodeByKey(n))})},_removeItems(){let i=m(!0,[],this.option("items")),e=0;x(i,(t,n)=>{n||(this.option("items").splice(t-e,1),e++)})},_updateLevel(i){let e=this._getContainerByParentKey(i);this._renderItems(e,this._dataAdapter.getChildrenNodes(i))},_getOldContainer(i){if(i.length)return i.children(`.${ar}`);let e=this.getScrollable();return e?u(e.content()).children():u()},_getContainerByParentKey(i){let e=this._dataAdapter.getNodeByKey(i),t=e?this._getNodeElement(e):[];this._getOldContainer(t).remove();let n=this._renderNodeContainer(t);if(this._isRootLevel(i)){let o=this.getScrollable();o||this._renderScrollableContainer(),u(o.content()).append(n)}return n},_isRootLevel(i){return i===this.option("rootValue")},_getAccessors(){let i=this.callBase();return i.push("hasItems"),i},_getDataAdapterOptions(){var i,e;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(),langParams:(i=this._dataSource)===null||i===void 0||(e=i.loadOptions)===null||e===void 0||(e=e.call(i))===null||e===void 0?void 0:e.langParams}},_initMarkup(){this._renderScrollableContainer(),this._renderEmptyMessage(this._dataAdapter.getRootNodes()),this.callBase(),this._setAriaRole()},_setAriaRole(){let{items:i}=this.option();i!=null&&i.length&&this.setAria({role:"tree"})},_renderContentImpl(){let i=this._renderNodeContainer();u(this.getScrollable().content()).append(i),!(!this.option("items")||!this.option("items").length)&&(this._renderItems(i,this._dataAdapter.getRootNodes()),this._attachExpandEvent(),this._selectAllEnabled()&&(this._createSelectAllValueChangedAction(),this._renderSelectAllItem(i)))},_isVirtualMode(){return this.option("virtualModeEnabled")&&this._isDataStructurePlain()&&!!this.option("dataSource")},_isDataStructurePlain(){return this.option("dataStructure")==="plain"},_fireContentReadyAction(){let i=this.getDataSource(),e=i&&!i.isLoaded()||this._skipContentReadyAndItemExpanded,t=this.getScrollable();t&&j()&&t.update(),e||this.callBase(),t&&j()&&t.update()},_renderScrollableContainer(){this._scrollable=this._createComponent(u("<div>").appendTo(this.$element()),Xi,{useNative:this.option("useNativeScrolling"),direction:this.option("scrollDirection"),useKeyboard:!1})},_renderNodeContainer(i){let e=u("<ul>").addClass(ar);if(this.setAria("role","group",e),i&&i.length){let t=this._getItemData(i.children(`.${rn}`));this._expandedGetter(t)&&e.addClass(oa),e.appendTo(i)}return e},_createDOMElement(i,e){var t;let n=u("<li>").addClass(wn).attr(Rm,this._encodeString(e.internalFields.key)).prependTo(i),o={role:"treeitem",label:this._displayGetter(e.internalFields.item)||"",level:this._getLevel(i)};return!!(e!=null&&(t=e.internalFields)!==null&&t!==void 0&&(t=t.childrenKeys)!==null&&t!==void 0&&t.length)&&(o.expanded=e.internalFields.expanded||!1),this.setAria(o,n),n},_getLevel(i){let e=i.parent();return e.hasClass("dx-scrollable-content")?1:parseInt(e.attr("aria-level"))+1},_showCheckboxes(){return this.option("showCheckBoxesMode")!=="none"},_hasCustomExpanderIcons(){return this.option("expandIcon")||this.option("collapseIcon")},_selectAllEnabled(i){return(i??this.option("showCheckBoxesMode"))==="selectAll"&&!this._isSingleSelection()},_renderItems(i,e){let t=e.length-1;for(let n=t;n>=0;n--)this._renderItem(n,e[n],i);this._renderedItemsCount+=e.length},_renderItem(i,e,t){let n=this._createDOMElement(t,e),o=e.internalFields,s=this._showCheckboxes();n.addClass(s?KX:YX),n.toggleClass("dx-state-invisible",o.item.visible===!1),this._hasCustomExpanderIcons()&&(n.addClass(UX),t.addClass(qX)),this.setAria("selected",o.selected,n),this._toggleSelectedClass(n,o.selected),o.disabled&&this.setAria("disabled",o.disabled,n),this.callBase(this._renderedItemsCount+i,o.item,n),this._getNode(e.internalFields.parentKey)||n.addClass(JX),o.item.visible!==!1&&this._renderChildren(n,e)},_setAriaSelectionAttribute:E,_renderChildren(i,e){if(!this._hasChildren(e)){this._addLeafClass(i),u("<div>").addClass(e6).appendTo(this._getItem(i));return}this._hasCustomExpanderIcons()?this._renderCustomExpanderIcons(i,e):this._renderDefaultExpanderIcons(i,e),this._shouldRenderSublevel(e.internalFields.expanded)&&this._loadSublevel(e).done(t=>{this._renderSublevel(i,this._getActualNode(e),t)})},_shouldRenderSublevel(i){return i||!this.option("deferRendering")},_getActualNode(i){return this._dataAdapter.getNodeByKey(i.internalFields.key)},_hasChildren(i){return this._isVirtualMode()||this._useCustomChildrenLoader()?this._hasItemsGetter(i.internalFields.item)!==!1:this.callBase(i)},_loadSublevel(i){let e=y(),t=this._getChildNodes(i);return t.length?e.resolve(t):this._loadNestedItems(i).done(n=>{e.resolve(this._dataAdapter.getNodesByItems(n))}),e.promise()},_getItemExtraPropNames:()=>["url","linkAttr"],_addContent(i,e){let{html:t,url:n}=e;if(this.option("_supportItemUrl")&&n){i.html(t);let o=this._getLinkContainer(this._getIconContainer(e),this._getTextContainer(e),e);i.append(o)}else this.callBase(i,e)},_postprocessRenderItem(i){let{itemData:e,itemElement:t}=i;this._showCheckboxes()&&this._renderCheckBox(t,this._getNode(e)),this.callBase(i)},_renderSublevel(i,e,t){let n=this._renderNodeContainer(i,e),o=t.filter(s=>e.internalFields.childrenKeys.indexOf(s.internalFields.key)!==-1);if(this._renderItems(n,o),o.length&&!e.internalFields.selected){let s=o[0];this._updateParentsState(s,this._getNodeElement(s))}this._normalizeIconState(i,o.length),e.internalFields.expanded&&n.addClass(oa)},_executeItemRenderAction(i,e,t){let n=this._getNode(t);this._getItemRenderAction()({itemElement:t,itemIndex:i,itemData:e,node:this._dataAdapter.getPublicNode(n)})},_addLeafClass(i){i.addClass(Mu)},_expandEventHandler(i){u(i.currentTarget.parentNode).hasClass(Mu)||this._toggleExpandedState(i.currentTarget,void 0,i)},_attachExpandEvent(){let i=this._getEventNameByOption(this.option("expandEvent")),e=this._itemContainer();this._detachExpandEvent(e),_.on(e,i,this._itemSelector(),this._expandEventHandler.bind(this))},_detachExpandEvent(i){_.off(i,".dxTreeView_expand",this._itemSelector())},_getEventNameByOption(i){return D(i==="click"?de:nr,"dxTreeView_expand")},_getNode(i){if(!f(i))return null;if(i.internalFields)return i;if(Or(i))return this._dataAdapter.getNodeByKey(i);let e=u(i).get(0);return e?S.isElementNode(e)?this._getNodeByElement(e):this._dataAdapter.getNodeByItem(e):null},_getNodeByElement(i){let e=u(i).closest(`.${wn}`),t=this._decodeString(e.attr(Rm));return this._dataAdapter.getNodeByKey(t)},_toggleExpandedState(i,e,t){let n=this._getNode(i);if(!n)return y().reject().promise();if(n.internalFields.disabled)return y().reject().promise();let o=n.internalFields.expanded;if(o===e)return y().resolve().promise();if(this._hasChildren(n)){let s=this._getNodeElement(n);if(s.find(`.${jy}:not(.dx-state-invisible)`).length)return y().reject().promise();!o&&!this._nodeHasRenderedChildren(s)&&this._createLoadIndicator(s)}return f(e)||(e=!o),this._dataAdapter.toggleExpansion(n.internalFields.key,e),this._updateExpandedItemsUI(n,e,t)},_nodeHasRenderedChildren(i){return i.children(`.${ar}`).not(":empty").length},_getItem:i=>i.children(`.${rn}`).eq(0),_createLoadIndicator(i){let e=this._getItem(i);this._createComponent(u("<div>").addClass(jy),bi,{}).$element().appendTo(e),e.children(`.${Ru},.${Uy}`).hide()},_renderExpanderIcon(i,e,t,n){t.appendTo(this._getItem(i)),t.addClass(n),e.internalFields.disabled&&t.addClass("dx-state-disabled"),this._renderToggleItemVisibilityIconClick(t,e)},_renderDefaultExpanderIcons(i,e){let t=this._getItem(i),n=u("<div>").addClass(Ru).appendTo(t);e.internalFields.expanded&&(n.addClass(dk),i.parent().addClass(oa)),e.internalFields.disabled&&n.addClass("dx-state-disabled"),this._renderToggleItemVisibilityIconClick(n,e)},_renderCustomExpanderIcons(i,e){let{expandIcon:t,collapseIcon:n}=this.option(),o=Mi(t??n),s=Mi(n??t);this._renderExpanderIcon(i,e,o,Uy),this._renderExpanderIcon(i,e,s,Ky);let r=e.internalFields.expanded;r&&i.parent().addClass(oa),this._toggleCustomExpanderIcons(o,s,r)},_renderToggleItemVisibilityIconClick(i,e){let t=D(de,this.NAME);_.off(i,t),_.on(i,t,n=>(this._toggleExpandedState(e.internalFields.key,void 0,n),!1))},_toggleCustomExpanderIcons(i,e,t){e.toggle(t),i.toggle(!t)},_updateExpandedItemsUI(i,e,t){let n=this._getNodeElement(i),o=!n.length||e&&n.is(":hidden");if(this.option("expandNodesRecursive")&&o){let l=this._getNode(i.internalFields.parentKey);l&&this._updateExpandedItemsUI(l,e,t)}if(!this._hasCustomExpanderIcons())this._getItem(n).children(`.${Ru}`).toggleClass(dk,e);else if(this._nodeHasRenderedChildren(n)){let l=this._getItem(n),d=l.children(`.${Uy}`),c=l.children(`.${Ky}`);this._toggleCustomExpanderIcons(d,c,e)}let s=n.children(`.${ar}`),r=s.length>0,a=y();return!e||r&&!s.is(":empty")?(this._animateNodeContainer(i,e,t,a),a.promise()):i.internalFields.childrenKeys.length===0&&(this._isVirtualMode()||this._useCustomChildrenLoader())?(this._loadNestedItemsWithUpdate(i,e,t,a),a.promise()):(this._renderSublevel(n,i,this._getChildNodes(i)),this._fireContentReadyAction(),this._animateNodeContainer(i,e,t,a),a.promise())},_loadNestedItemsWithUpdate(i,e,t,n){let o=this._getNodeElement(i);this._loadNestedItems(i).done(s=>{let r=this._getActualNode(i);if(this._renderSublevel(o,r,this._dataAdapter.getNodesByItems(s)),!s||!s.length){n.resolve();return}this._fireContentReadyAction(),this._animateNodeContainer(r,e,t,n)})},_loadNestedItems(i){if(this._useCustomChildrenLoader()){let e=this._dataAdapter.getPublicNode(i);return this._loadChildrenByCustomLoader(e).done(t=>{this._areNodesExists(t)||this._appendItems(t)})}return this._isVirtualMode()?(this._filter.internal=[this.option("parentIdExpr"),i.internalFields.key],this._dataSource.filter(this._combineFilter()),this._dataSource.load().done(e=>{this._areNodesExists(e)||this._appendItems(e)})):y().resolve([]).promise()},_areNodesExists(i,e){let t=this.keyOf(i[0]),n=this._dataAdapter.getFullData();return!!this._dataAdapter.getNodeByKey(t,n)},_appendItems(i){this.option().items=this.option("items").concat(i),this._initDataAdapter()},_animateNodeContainer(i,e,t,n){let o=this._getNodeElement(i),s=o.children(`.${ar}`);i&&n&&s.length===0&&n.resolve(),s.addClass(oa);let r=Q(s);fe.stop(s,!0),fe.animate(s,{type:"custom",duration:this.option("animationEnabled")?400:0,from:{maxHeight:e?0:r},to:{maxHeight:e?r:0},complete:function(){s.css("maxHeight","none"),s.toggleClass(oa,e),this.setAria("expanded",e,o),this.getScrollable().update(),this._fireExpandedStateUpdatedEvent(e,i,t),n&&n.resolve()}.bind(this)})},_fireExpandedStateUpdatedEvent(i,e,t){if(!this._hasChildren(e)||this._skipContentReadyAndItemExpanded)return;let n=i?"onItemExpanded":"onItemCollapsed";if(f(t))this._itemDXEventHandler(t,n,{node:this._dataAdapter.getPublicNode(e)});else{let o=this._getNodeElement(e);this._itemEventHandler(o,n,{event:t,node:this._dataAdapter.getPublicNode(e)})}},_normalizeIconState(i,e){let t=i.find(`.${jy}`);if(t.length){var n;(n=bi.getInstance(t))===null||n===void 0||n.option("visible",!1)}let s=this._getItem(i).children(`.${Ky},.${Ru}`);if(e){s.show();return}s.removeClass(Ru),i.addClass(Mu)},_emptyMessageContainer(){let i=this.getScrollable();return i?u(i.content()):this.callBase()},_renderContent(){let i=this.option("items");i&&i.length&&(this._contentAlreadyRendered=!0),this.callBase()},_renderSelectAllItem(i){let{selectAllText:e,focusStateEnabled:t}=this.option();i=i||this.$element().find(`.${ar}`).first(),this._$selectAllItem=u("<div>").addClass(Mm);let n=this._dataAdapter.isAllSelected();this._createComponent(this._$selectAllItem,na,{value:n,elementAttr:{"aria-label":"Select All"},text:e,focusStateEnabled:t,onValueChanged:this._onSelectAllCheckboxValueChanged.bind(this),onInitialized:o=>{let{component:s}=o;s.registerKeyHandler("enter",()=>{s.option("value",!s.option("value"))})}}),this._toggleSelectedClass(this._$selectAllItem,n),i.before(this._$selectAllItem)},_onSelectAllCheckboxValueChanged(i){this._toggleSelectAll(i),this._fireSelectAllValueChanged(i.value)},_toggleSelectAll(i){this._dataAdapter.toggleSelectAll(i.value),this._updateItemsUI(),this._fireSelectionChanged()},_renderCheckBox(i,e){let t=u("<div>").appendTo(i);this._createComponent(t,na,{value:e.internalFields.selected,onValueChanged:this._changeCheckboxValue.bind(this),focusStateEnabled:!1,elementAttr:{"aria-label":O.format("CheckState")},disabled:this._disabledGetter(e)})},_toggleSelectedClass(i,e){i.toggleClass("dx-state-selected",!!e)},_toggleNodeDisabledState(i,e){let t=this._getNodeElement(i),n=t.find(`.${rn}`).eq(0);this._dataAdapter.toggleNodeDisabledState(i.internalFields.key,e),n.toggleClass("dx-state-disabled",!!e),this._showCheckboxes()&&this._getCheckBoxInstance(t).option("disabled",!!e)},_itemOptionChanged(i,e,t){let n=this._dataAdapter.getNodeByItem(i);e===this.option("disabledExpr")&&this._toggleNodeDisabledState(n,t)},_changeCheckboxValue(i){let e=u(i.element).closest(`.${wn}`),t=this._getItem(e),n=this._getItemData(t),o=this._getNodeByElement(t),{value:s}=i;o&&o.internalFields.selected===s||this._updateItemSelection(s,n,i.event)},_isSingleSelection(){return this.option("selectionMode")==="single"},_isRecursiveSelection(){return this.option("selectNodesRecursive")&&this.option("selectionMode")!=="single"},_isLastSelectedBranch(i,e,t){let n=e.indexOf(i.key);return n>=0&&e.splice(n,1),t&&x(i.children,(o,s)=>{this._isLastSelectedBranch(s,e,!0)}),i.parent&&this._isLastSelectedBranch(i.parent,e),e.length===0},_isLastRequired(i){let e=this.option("selectionRequired"),t=this._isSingleSelection(),n=this.getSelectedNodeKeys();if(e)return t?n.length===1:this._isLastSelectedBranch(i.internalFields.publicNode,n.slice(),!0)},_updateItemSelection(i,e,t){let n=this._getNode(e);if(!n||n.visible===!1)return!1;if(n.internalFields.selected===i)return!0;if(!i&&this._isLastRequired(n)){if(this._showCheckboxes()){let r=this._getNodeElement(n);this._getCheckBoxInstance(r).option("value",!0)}return!1}if(i&&this._isSingleSelection()){let r=this.getSelectedNodeKeys();x(r,(a,l)=>{this._dataAdapter.toggleSelection(l,!1),this._updateItemsUI(),this._fireItemSelectionChanged(this._getNode(l))})}this._dataAdapter.toggleSelection(n.internalFields.key,i);let o=this._dataAdapter.isAllSelected(),s=this._selectAllEnabled()&&this._$selectAllItem.dxCheckBox("instance").option("value")!==o;return this._updateItemsUI(),this._fireItemSelectionChanged(n,t),this._fireSelectionChanged(),s&&this._fireSelectAllValueChanged(o),!0},_fireItemSelectionChanged(i,e){let t=e||this._findItemElementByItem(i.internalFields.item);(e?this._itemDXEventHandler:this._itemEventHandler).call(this,t,"onItemSelectionChanged",{node:this._dataAdapter.getPublicNode(i),itemData:i.internalFields.item})},_getCheckBoxInstance(i){return this._getItem(i).children(".dx-checkbox").dxCheckBox("instance")},_updateItemsUI(){let i={};if(x(this._dataAdapter.getData(),(e,t)=>{let n=this._getNodeElement(t,i),o=t.internalFields.selected;n.length&&(this._toggleSelectedClass(n,o),this.setAria("selected",o,n),this._showCheckboxes()&&this._getCheckBoxInstance(n).option("value",o))}),this._selectAllEnabled()){let e=this._$selectAllItem.dxCheckBox("instance");e.option("onValueChanged",void 0),e.option("value",this._dataAdapter.isAllSelected()),e.option("onValueChanged",this._onSelectAllCheckboxValueChanged.bind(this))}},_updateParentsState(i,e){if(!e)return;let t=this._dataAdapter.getNodeByKey(i.internalFields.parentKey),n=u(e.parents(`.${wn}`)[0]);if(this._showCheckboxes()){let o=t.internalFields.selected;this._getCheckBoxInstance(n).option("value",o),this._toggleSelectedClass(n,o)}t.internalFields.parentKey!==this.option("rootValue")&&this._updateParentsState(t,n)},_itemEventHandlerImpl(i,e,t){let n=u(i).closest(`.${wn}`).children(`.${rn}`);return e(m(this._extendActionArgs(n),t))},_itemContextMenuHandler(i){this._createEventHandler("onItemContextMenu",i)},_itemHoldHandler(i){this._createEventHandler("onItemHold",i)},_createEventHandler(i,e){let t=this._getNodeByElement(e.currentTarget);this._itemDXEventHandler(e,i,{node:this._dataAdapter.getPublicNode(t)})},_itemClass:()=>rn,_itemDataKey:()=>XX,_attachClickEvent(){let i=this._itemContainer();this._detachClickEvent(i);let{clickEventNamespace:e,itemSelector:t,pointerDownEventNamespace:n,nodeSelector:o}=this._getItemClickEventData();_.on(i,e,t,s=>{u(s.target).hasClass("dx-checkbox-icon")||u(s.target).hasClass("dx-checkbox")||this._itemClickHandler(s,u(s.currentTarget))}),_.on(i,n,o,s=>{this._itemPointerDownHandler(s)})},_detachClickEvent(i){let{clickEventNamespace:e,itemSelector:t,pointerDownEventNamespace:n,nodeSelector:o}=this._getItemClickEventData();_.off(i,e,t),_.off(i,n,o)},_getItemClickEventData(){let i=`.${this._itemClass()}`,e=`.${wn}, .${Mm}`,t=D(de,this.NAME),n=D(le.down,this.NAME);return{clickEventNamespace:t,itemSelector:i,pointerDownEventNamespace:n,nodeSelector:e}},_itemClick(i){let e=i.args[0],n=(e.event.target[0]||e.event.target).getElementsByClassName("dx-item-url")[0];e.itemData.url&&n&&n.click()},_itemClickHandler(i,e){let t=this._getItemData(e),n=this._getNodeByElement(e);this._itemDXEventHandler(i,"onItemClick",{node:this._dataAdapter.getPublicNode(n)},{beforeExecute:this._itemClick}),this.option("selectByClick")&&!i.isDefaultPrevented()&&this._updateItemSelection(!n.internalFields.selected,t,i)},_updateSelectionToFirstItem(i,e){let t=e;for(;t>=0;){let n=u(i[t]);this._updateItemSelection(!0,n.find(`.${rn}`).get(0)),t--}},_updateSelectionToLastItem(i,e){let{length:t}=i,n=e;for(;n<t;){let o=u(i[n]);this._updateItemSelection(!0,o.find(`.${rn}`).get(0)),n++}},focus(){if(this._selectAllEnabled()){_.trigger(this._$selectAllItem,"focus");return}this.callBase()},_focusInHandler(i){this._updateFocusState(i,!0);let e=u(i.target).hasClass(Mm);if(e||this.option("focusedElement")){clearTimeout(this._setFocusedItemTimeout),this._setFocusedItemTimeout=setTimeout(()=>{let n=e?H(this._$selectAllItem):u(this.option("focusedElement"));this._setFocusedItem(n)});return}let t=this._getActiveItem();this.option("focusedElement",H(t.closest(`.${wn}`)))},_itemPointerDownHandler(i){if(!this.option("focusStateEnabled"))return;let e=u(i.target).closest(`.${wn}, .${Mm}`);if(!e.length)return;let t=e.hasClass("dx-state-disabled")?null:e;this.option("focusedElement",H(t))},_findNonDisabledNodes:i=>i.not(function(){return u(this).children(`.${rn}`).hasClass("dx-state-disabled")}),_moveFocus(i,e){let t=this.option("rtlEnabled")?"right":"left",n=this.option("rtlEnabled")?"left":"right";this.$element().find(`.${ar}`).each(function(){fe.stop(this,!0)});let o=this._nodeElements();if(!(!o||!o.length))switch(i){case"up":{let s=this._prevItem(o);this.option("focusedElement",H(s));let r=this._getNodeItemElement(s);this.getScrollable().scrollToElement(r),e.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,r);break}case"down":{let s=this._nextItem(o);this.option("focusedElement",H(s));let r=this._getNodeItemElement(s);this.getScrollable().scrollToElement(r),e.shiftKey&&this._showCheckboxes()&&this._updateItemSelection(!0,r);break}case"first":{let s=o.first();e.shiftKey&&this._showCheckboxes()&&this._updateSelectionToFirstItem(o,o.index(this._prevItem(o))),this.option("focusedElement",H(s)),this.getScrollable().scrollToElement(this._getNodeItemElement(s));break}case"last":{let s=o.last();e.shiftKey&&this._showCheckboxes()&&this._updateSelectionToLastItem(o,o.index(this._nextItem(o))),this.option("focusedElement",H(s)),this.getScrollable().scrollToElement(this._getNodeItemElement(s));break}case n:this._expandFocusedContainer();break;case t:this._collapseFocusedContainer();break;default:this.callBase.apply(this,arguments)}},_getNodeItemElement:i=>i.find(`.${rn}`).get(0),_nodeElements(){return this.$element().find(`.${wn}`).not(":hidden")},_expandFocusedContainer(){let i=u(this.option("focusedElement"));if(!i.length||i.hasClass(Mu))return;if(i.find(`.${ar}`).eq(0).hasClass(oa)){let n=this._nextItem(this._findNonDisabledNodes(this._nodeElements()));this.option("focusedElement",H(n)),this.getScrollable().scrollToElement(this._getNodeItemElement(n));return}let t=this._getNodeByElement(this._getItem(i));this._toggleExpandedState(t,!0)},_getClosestNonDisabledNode(i){do i=i.parent().closest(`.${wn}`);while(i.children(".dx-treeview-item.dx-state-disabled").length);return i},_collapseFocusedContainer(){let i=u(this.option("focusedElement"));if(!i.length)return;let e=i.find(`.${ar}`).eq(0);if(!i.hasClass(Mu)&&e.hasClass(oa)){let t=this._getNodeByElement(this._getItem(i));this._toggleExpandedState(t,!1)}else{let t=this._getClosestNonDisabledNode(i);t.length&&this.option("focusedElement",H(t)),this.getScrollable().scrollToElement(this._getNodeItemElement(t))}},_encodeString:i=>B(i)?encodeURI(i):i,_decodeString:i=>B(i)?decodeURI(i):i,getScrollable(){return this._scrollable},updateDimensions(){let i=y(),e=this.getScrollable();return e?e.update().done(()=>{i.resolveWith(this)}):i.resolveWith(this),i.promise()},selectItem(i){return this._updateItemSelection(!0,i)},unselectItem(i){return this._updateItemSelection(!1,i)},expandItem(i){return this._toggleExpandedState(i,!0)},collapseItem(i){return this._toggleExpandedState(i,!1)},getNodes(){return this._dataAdapter.getTreeNodes()},getSelectedNodes(){return this.getSelectedNodeKeys().map(i=>{let e=this._dataAdapter.getNodeByKey(i);return this._dataAdapter.getPublicNode(e)})},getSelectedNodeKeys(){return this._dataAdapter.getSelectedNodesKeys()},selectAll(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!0):this._toggleSelectAll({value:!0})},unselectAll(){this._selectAllEnabled()?this._$selectAllItem.dxCheckBox("instance").option("value",!1):this._toggleSelectAll({value:!1})},_allItemsExpandedHandler(){this._skipContentReadyAndItemExpanded=!1,this._fireContentReadyAction()},expandAll(){let i=this._dataAdapter.getData(),e=[];this._skipContentReadyAndItemExpanded=!0,i.forEach(t=>e.push(this._toggleExpandedState(t.internalFields.key,!0))),Promise.allSettled(e).then(()=>{var t;return(t=this._allItemsExpandedHandler)===null||t===void 0?void 0:t.call(this)})},collapseAll(){x(this._dataAdapter.getExpandedNodesKeys(),(i,e)=>{this._toggleExpandedState(e,!1)})},scrollToItem(i){let e=this._getNode(i);if(!e)return y().reject().promise();let t=[],n=e.internalFields.publicNode.parent;for(;n!=null;)n.expanded||t.push(n.key),n=n.parent;let o=y();return this._expandNodes(t.reverse()).always(()=>{let s=this._getNodeElement(e);s&&s.length?(this.scrollToElementTopLeft(s.get(0)),o.resolve()):o.reject()}),o.promise()},scrollToElementTopLeft(i){let e=this.getScrollable(),{scrollDirection:t,rtlEnabled:n}=this.option(),o={top:0,left:0},s=Xp(Jp,i);if(t!==Da){let r=u(e.container()).get(0);o.left=n?s.left+i.offsetWidth-r.clientWidth:s.left}t!==Qp&&(o.top=s.top),e.scrollTo(o)},_expandNodes(i){if(!i||i.length===0)return y().resolve().promise();let e=y(),t=i.map(n=>this.expandItem(n));return P.apply(u,t).done(()=>e.resolve()).fail(()=>e.reject()),e.promise()},_dispose(){this.callBase(),clearTimeout(this._setFocusedItemTimeout),this._allItemsExpandedHandler=null}}),ck=t6;$o.setEditorClass(_o);var uk="dx-treeview",i6=`${uk}-node-container`,hk=ck.inherit($o).inherit({_addWidgetPrefix:i=>`${uk}-${i}`,_optionChanged(i){switch(i.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(i)}},_updateDataAdapter(){this._setOptionWithoutOptionChange("expandNodesRecursive",!1),this._initDataAdapter(),this._setOptionWithoutOptionChange("expandNodesRecursive",!0)},_getDataAdapterOptions(){return m(this.callBase(),{searchValue:this.option("searchValue"),searchMode:this.option("searchMode")||"contains",searchExpr:this.option("searchExpr")})},_getNodeContainer(){return this.$element().find(`.${i6}`).first()},_updateSearch(){if(this._searchEditor){let i=this._getSearchEditorOptions();this._searchEditor.option(i)}},_repaintContainer(){let i=this._getNodeContainer(),e;i.length&&(i.empty(),e=this._dataAdapter.getRootNodes(),this._renderEmptyMessage(e),this._renderItems(i,e),this._fireContentReadyAction())},_focusTarget(){return this._itemContainer(this.option("searchEnabled"))},_cleanItemContainer(){this.$element().empty()},_itemContainer(i,e){return e??(e=this._selectAllEnabled()),e?this._getNodeContainer():this._scrollable&&i?u(this._scrollable.content()):this.callBase()},_addWidgetClass(){this.$element().addClass(this._widgetClass())},_clean(){this.callBase(),this._removeSearchBox()}});K("dxTreeView",hk);var pk=hk;var vs=pk;var n6="column-chooser-mode-drag",o6="column-chooser-mode-select";var s6=["showInColumnChooser","caption","allowHiding","visible","cssClass","ownerBand"],r6=function(i,e){let t=[],n=i.isSelectMode(),o=i.option("columnChooser.selection.recursive");return e.length&&x(e,(s,r)=>{let a={text:r.caption,cssClass:r.cssClass,allowHiding:r.allowHiding,expanded:!0,id:r.index,disabled:r.allowHiding===!1,parentId:f(r.ownerBand)?r.ownerBand:null},l=o&&r.hasColumns;n&&!l&&(a.selected=r.visible),t.push(a)}),t},qy=class extends ye.ViewController{init(){super.init(),this._rowsView=this.getView("rowsView")}renderShowColumnChooserButton(e){let t=this,n=t.addWidgetPrefix("column-chooser-button"),o=t.option("columnChooser.enabled"),s=e.find(`.${n}`),r;o?s.length?s.show():(r=u("<div>").addClass(n).appendTo(e),t._createComponent(r,_t,{icon:"column-chooser",onClick(){t.getView("columnChooserView").showColumnChooser()},hint:t.option("columnChooser.title"),integrationOptions:{}})):s.hide()}getPosition(){let e=this.option("columnChooser.position");return f(e)?e:{my:"right bottom",at:"right bottom",of:this._rowsView&&this._rowsView.element(),collision:"fit",offset:"-2 -2",boundaryOffset:"2 2"}}},Yy=class extends bo{optionChanged(e){e.name==="columnChooser"?(this._initializePopupContainer(),this.render(null,"full")):super.optionChanged(e)}publicMethods(){return["showColumnChooser","hideColumnChooser"]}_resizeCore(){}_isWinDevice(){return!!F.real().win}_initializePopupContainer(){let e=this,t=e.addWidgetPrefix("column-chooser"),n=e.element().addClass(t),o=e.option("columnChooser"),s=this._columnChooserController.getPosition(),r=yt(),a=ag(r),l=ht(r),d={visible:!1,shading:!1,showCloseButton:!1,dragEnabled:!0,resizeEnabled:!0,wrapperAttr:{class:t},toolbarItems:[{text:o.title,toolbar:"top",location:a||l?"before":"center"}],position:s,width:o.width,height:o.height,rtlEnabled:e.option("rtlEnabled"),onHidden(){e._isWinDevice()&&u("body").removeClass(e.addWidgetPrefix("notouch-action"))},container:o.container};a||l?m(d,{showCloseButton:!0}):d.toolbarItems[d.toolbarItems.length]={shortcut:"cancel"},f(this._popupContainer)?this._popupContainer.option(d):(e._popupContainer=e._createComponent(n,Oi,d),e._popupContainer.on("optionChanged",c=>{c.name==="visible"&&e.renderCompleted.fire()})),this.setPopupAttributes()}setPopupAttributes(){let e=this.isSelectMode(),t=this._columnsController.isBandColumnsUsed();this._popupContainer.setAria({role:"dialog",label:O.format("dxDataGrid-columnChooserTitle")}),this._popupContainer.$wrapper().toggleClass(this.addWidgetPrefix(n6),!e).toggleClass(this.addWidgetPrefix(o6),e),this._popupContainer.$content().addClass(this.addWidgetPrefix("column-chooser-list")),e&&!t&&this._popupContainer.$content().addClass(this.addWidgetPrefix("column-chooser-plain"))}_renderCore(e){if(this._popupContainer){let t=!this.isSelectMode();!this._columnChooserList||e==="full"?this._renderTreeView():t&&this._updateItems()}}_renderTreeView(){var e,t,n;let o=this,s=this._popupContainer.$content(),r=this.option("columnChooser"),a=this.isSelectMode(),l=f(r.allowSearch)?r.allowSearch:(e=r.search)===null||e===void 0?void 0:e.enabled,d=f(r.searchTimeout)?r.searchTimeout:(t=r.search)===null||t===void 0?void 0:t.timeout,c={dataStructure:"plain",activeStateEnabled:!0,focusStateEnabled:!0,hoverStateEnabled:!0,itemTemplate:"item",showCheckBoxesMode:"none",rootValue:null,searchEnabled:l,searchTimeout:d,searchEditorOptions:(n=r.search)===null||n===void 0?void 0:n.editorOptions};if(this._isWinDevice()&&(c.useNativeScrolling=!1),m(c,a?this._prepareSelectModeConfig():this._prepareDragModeConfig()),this._columnChooserList)c.searchEnabled||(c.searchValue=""),this._columnChooserList.option(c),this._updateItems();else{this._columnChooserList=this._createComponent(s,vs,c),this._updateItems();let h=0;this._columnChooserList.on("optionChanged",p=>{h=p.component.getScrollable().scrollTop()}),this._columnChooserList.on("contentReady",p=>{Ci(()=>{p.component.getScrollable().scrollTo({y:h}),o.renderCompleted.fire()})})}}_prepareDragModeConfig(){return{noDataText:this.option("columnChooser").emptyPanelText,activeStateEnabled:!1,hoverStateEnabled:!1,itemTemplate(t,n,o){u(o).text(t.text).parent().addClass(t.cssClass).addClass("dx-column-chooser-item")}}}_prepareSelectModeConfig(){let e=this,t=this.option("columnChooser.selection")??{},n=!1;return{selectByClick:t.selectByClick,selectNodesRecursive:t.recursive,showCheckBoxesMode:t.allowSelectAll?"selectAll":"normal",onSelectionChanged:o=>{if(n)return;let s=(r=>{let a=(l,d)=>l.reduce((c,h)=>(c.push(h),h.children.length&&a(h.children,c),c),d);return a(r,[])})(o.component.getNodes());o.component.beginUpdate(),n=!0,((r,a)=>{a.filter(l=>l.itemData.allowHiding===!1).forEach(l=>r.component.selectItem(l.key))})(o,s),o.component.endUpdate(),n=!1,e.component.beginUpdate(),this._isUpdatingColumnVisibility=!0,(r=>{r.forEach(a=>{let l=a.itemData.id,d=a.selected!==!1;e._columnsController.columnOption(l,"visible",d)})})(s),e.component.endUpdate(),this._isUpdatingColumnVisibility=!1}}}_updateItems(){let e=this.isSelectMode(),t=this._columnsController.getChooserColumns(e),n=r6(this,t);this._columnChooserList.option("items",n)}_updateItemsSelection(e){let t=e?.map(n=>this._columnsController.columnOption(n));this._columnChooserList.beginUpdate(),t?.forEach(n=>{let{visible:o,index:s}=n;o?this._columnChooserList.selectItem(s):this._columnChooserList.unselectItem(s)}),this._columnChooserList.endUpdate()}_columnOptionChanged(e){if(super._columnOptionChanged(e),this.isSelectMode()&&this._columnChooserList&&!this._isUpdatingColumnVisibility){let{optionNames:n}=e,o=n.visible&&n.length===1,s=f(e.columnIndex)?[e.columnIndex]:e.columnIndices;(s6.some(a=>n[a])||e.changeTypes.columns&&n.all)&&(this._updateItemsSelection(s),o||this._updateItems())}}getColumnElements(){let e=[],t=this.isSelectMode(),n=this._columnsController.getChooserColumns(t),o=this._popupContainer&&this._popupContainer.$content(),s=o&&o.find(".dx-treeview-node");return s&&n.forEach(r=>{let a=s.filter(`[data-item-id = '${r.index}']`),l=a.length?a.children(".dx-column-chooser-item").get(0):null;e.push(l)}),u(e)}getName(){return"columnChooser"}getColumns(){return this._columnsController.getChooserColumns()}allowDragging(e){let t=this._columnsController.isParentColumnVisible(e.index),n=!e.visible&&e.allowHiding;return this.isColumnChooserVisible()&&t&&n}allowColumnHeaderDragging(e){return!this.isSelectMode()&&this.isColumnChooserVisible()&&e.allowHiding}getBoundingRect(){let e=this._popupContainer&&this._popupContainer.$overlayContent();if(e&&e.is(":visible")){let t=e.offset();return{left:t.left,top:t.top,right:t.left+ae(e),bottom:t.top+ee(e)}}return null}showColumnChooser(){this._popupContainer||(this._initializePopupContainer(),this.render()),this._popupContainer.show(),this._isWinDevice()&&u("body").addClass(this.addWidgetPrefix("notouch-action"))}hideColumnChooser(){this._popupContainer&&this._popupContainer.hide()}isColumnChooserVisible(){let e=this._popupContainer;return e&&e.option("visible")}isSelectMode(){return this.option("columnChooser.mode")==="select"}hasHiddenColumns(){let e=this.option("columnChooser.enabled"),t=this.getColumns().filter(n=>!n.visible);return e&&t.length}},a6=i=>class extends i{_getToolbarItems(){let e=super._getToolbarItems();return this._appendColumnChooserItem(e)}_appendColumnChooserItem(e){let t=this;if(t.option("columnChooser.enabled")){let o=function(){t.component.getView("columnChooserView").showColumnChooser()},s=function(l){u(l.element).addClass(t._getToolbarButtonClass(t.addWidgetPrefix("column-chooser-button")))},r=t.option("columnChooser.title"),a={widget:"dxButton",options:{icon:"column-chooser",onClick:o,hint:r,text:r,onInitialized:s,elementAttr:{"aria-haspopup":"dialog"}},showText:"inMenu",location:"after",name:"columnChooserButton",locateInMenu:"auto",sortIndex:40};e.push(a)}return e}optionChanged(e){e.name==="columnChooser"?(this._invalidate(),e.handled=!0):super.optionChanged(e)}},l6=i=>class extends i{allowMoveColumn(e,t,n,o){return this.option("columnChooser.mode")==="select"&&o==="columnChooser"?!1:super.allowMoveColumn(e,t,n,o)}},d6=i=>class extends i{allowDragging(e){let t=!this._columnChooserView.isSelectMode(),n=this._columnChooserView.isColumnChooserVisible();return t&&n&&e.allowHiding||super.allowDragging(e)}},Fm={defaultOptions:()=>({columnChooser:{enabled:!1,search:{enabled:!1,timeout:500,editorOptions:{}},selection:{allowSelectAll:!1,selectByClick:!1,recursive:!1},position:void 0,mode:"dragAndDrop",width:250,height:260,title:O.format("dxDataGrid-columnChooserTitle"),emptyPanelText:O.format("dxDataGrid-columnChooserEmptyText"),container:void 0}}),controllers:{columnChooser:qy},views:{columnChooserView:Yy},extenders:{views:{headerPanel:a6,columnHeadersView:d6},controllers:{columns:l6}}};var Tze=Fm.controllers.columnChooser,Aze=Fm.views.columnChooserView;$.registerModule("columnChooser",Fm);function bs(i,e){let t=vn(e.group),n=[];for(let o=0;o<i.length;o++)n.push([t[o].selector,"=",i[o]]);return e.filter&&n.push(e.filter),R.combineFilters(n)}function Pm(i,e,t){let n=vn(e.group),o=[];for(let s=t?i.length-1:0;s<i.length;s++){let r=[];for(let a=0;a<=s;a++){let{selector:l}=n[a];if(s===a&&(i[a]===null||i[a]===!1||i[a]===!0))i[a]===!1?r.push([l,"=",n[a].desc?!0:null]):(i[a]?!n[a].desc:n[a].desc)?r.push([l,"<>",i[a]]):(r.push([l,"<>",null]),r.push([l,"=",null]));else{let d=[l,s===a?n[a].desc?">":"<":"=",i[a]];d[1]==="<"?r.push([d,"or",[l,"=",null]]):r.push(d)}}o.push($.combineFilters(r))}return o=$.combineFilters(o,"or"),$.combineFilters([o,e.filter])}var gk=function(i,e){let{hash:t}=i;return t&&t[JSON.stringify(e)]},c6=function(i,e){let t=0,n=i.length-1;if(!i.length)return 0;do{let s=n+t>>1;i[s].offset>e?n=s:t=s}while(n-t>1);let o;for(o=t;o<=n&&!(i[o].offset>e);o++);return o},mk=function(i,e,t){for(let n=0;n<i.length;n++)e+1>=t?i[n].children=[]:mk(i[n].children,e+1,t)},fk=function(i,e,t){let n=0;if(e)if(!t)n=e.length;else for(let o=0;o<e.length;o++)i.isGroupItemCountable(e[o])&&n++,n+=fk(i,e[o].items,t-1);return n},vd=class{constructor(e){this._dataSource=e,this.reset()}reset(){this._groupsInfo=[],this._totalCountCorrection=0}totalCountCorrection(){return this._totalCountCorrection}updateTotalItemsCount(e){this._totalCountCorrection=e||0}isGroupItemCountable(e){return!this._isVirtualPaging()||!e.isContinuation}_isVirtualPaging(){let e=this._dataSource.option("scrolling.mode");return e==="virtual"||e==="infinite"}itemsCount(){let t=this._dataSource._dataSource,n=$.normalizeSortingInfo(t.group()||[]).length;return fk(this,t.items(),n)}foreachGroups(e,t,n,o,s){let r=this;return function a(l,d,c,h){let p=[];function g(v,b,T,M){let G=b&&v(b,T);return G&&M.push(G),G}for(let v=0;v<l.length;v++){if(h.push(l[v].data),!c&&g(d,l[v].data,h,p)===!1)return!1;if(!l[v].data||l[v].data.isExpanded||n){let{children:b}=l[v],T=b.length&&a(b,d,c,h);if(T&&p.push(T),T===!1)return!1}if(c&&g(d,l[v].data,h,p)===!1)return!1;(!l[v].data||l[v].data.offset!==l[v].offset)&&(o=!0),h.pop()}let C=s&&h.slice(0);return o&&P.apply(u,p).always(()=>{r._updateGroupInfoOffsets(l,C)})}(r._groupsInfo,e,t,[])}_updateGroupInfoOffsets(e,t){t=t||[];for(let n=0;n<e.length;n++){let o=e[n];if(o.data&&o.data.offset!==o.offset){o.offset=o.data.offset;for(let s=0;s<t.length;s++)t[s].offset=o.offset}}e.sort((n,o)=>n.offset-o.offset)}findGroupInfo(e){let t,n=this._groupsInfo;for(let o=0;n&&o<e.length;o++)t=gk(n,e[o]),n=t&&t.children;return t&&t.data}addGroupInfo(e){let t=this,n,{path:o}=e,s=t._groupsInfo;for(let r=0;r<o.length;r++){if(n=gk(s,o[r]),!n){n={key:o[r],offset:e.offset,data:{offset:e.offset,isExpanded:!0,path:o.slice(0,r+1)},children:[]};let a=c6(s,e.offset);s.splice(a,0,n),s.hash=s.hash||{},s.hash[JSON.stringify(n.key)]=n}r===o.length-1&&(n.data=e,n.offset!==e.offset&&t._updateGroupInfoOffsets(s)),s=n.children}}allowCollapseAll(){return!0}refresh(e){let t=this,{storeLoadOptions:n}=e,o=vn(n.group||[]),s="_group"in t?vn(t._group||[]):o,r=Math.min(s.length,o.length);t._group=n.group;for(let a=0;a<r;a++)if(s[a].selector!==o[a].selector){r=a;break}r?mk(t._groupsInfo,0,r):t.reset()}handleDataLoading(){}handleDataLoaded(e,t){t(e)}handleDataLoadedCore(e,t){t(e)}};function Zy(i,e,t,n){if(n=n||0,e>1&&t>0){let o=i-Math.floor(i/e)*e||e;return o+=t-n-2,o<0&&(o+=e),Math.floor(o/(e-n-1))}return 0}var Fu=function(i,e,t){return i.foreachGroups((n,o)=>{if(n.isExpanded)return e(n,o)},!0,!1,t,t)},Jy=function(i,e,t,n,o,s,r){let a;if(n.items=n.items||[],n.paths=n.paths||[],n.count=n.count||0,n.lastCount=n.lastCount||0,!!t)for(let l=0;l<e.length;l++){let d=e[l];if(d.items!==void 0){if(o.push(d.key),s)a=!0;else{let c=i.findGroupInfo(o);a=c&&c.isExpanded}a?d.items?Jy(i,d.items,t-1,n,o,s,r):t===1&&d.count&&(!s||r)&&(n.items.push(d),n.paths.push(o.slice(0)),n.count+=n.lastCount,n.lastCount=d.count):(d.collapsedItems=d.items,d.items=null),o.pop()}}},u6=function(i,e,t,n,o){let s=i.findGroupInfo(n),r;s?(t?s.count=e.count>0?e.count:e.items&&e.items.length||0:e.count=s.count||e.count,s.offset=o):(t&&(r=e.count>0?e.count:e.items.length),i.addGroupInfo({isExpanded:i._isGroupExpanded(n.length-1),path:n.slice(0),offset:o,count:r||0}))},eO=function(i,e,t,n,o,s,r){let l=(e.group?e.group.length:0)===n,d=e.remoteOperations.paging,c=0,h=0,p;if(o=o||0,s=s||[],d&&!r&&(c=o===0?e.skip||0:e.skips[o-1]||0),o>=n)return t.length;for(let g=0;g<t.length;g++){let C=t[g];if(C){if(s.push(C.key),!C.count&&!C.items||C.items===void 0||(u6(i,C,l,s,c+g),p=C.items?eO(i,e,C.items,n,o+1,s,g):C.count||-1,p<0))return-1;h+=p,s.pop()}}return h},Xy=function(i,e){return i&&i.length&&i[e]&&!!i[e].isExpanded},_k=function(i,e,t){let n,o=t;for(let s=0;s<i.length;s++)n=i[s].offset+1,s>0&&(n+=i[s-1].childrenTotalCount,e&&(n+=Zy(o,e,n,s-1)*s)),o+=n;return o};function xk(i,e,t,n){let o=e.items[n],s=i.skips&&i.skips[t],r=i.takes&&i.takes[t],a=n===e.items.length-1,l=n===0,d=l&&s||0,c=o.count>r+d;l&&s!==void 0&&(o.isContinuation=!0),a&&r!==void 0&&c&&(o.isContinuationOnNextPage=!0)}function h6(i,e,t){let n=t-1,o=i.group?i.group.length:0;e.skip=i.skips&&i.skips[n],i.takes&&i.takes[n]!==void 0&&(o===t?e.take=e.count?e.count-(e.skip||0):0:e.take=0,e.take+=i.takes[n])}function vk(i){return!Array.isArray(i)}function Ck(i){vk(i.data)||(i.data=new y)}function bk(i,e,t,n,o,s){e.isCustomLoading||(n={},Jy(i,s,t,n,[]),h6(e,n,t));let r=e.group?e.group.length:0;n.paths.length&&r-t>0?(Ck(e),p6(i,e,n,t,o,s)):n.paths.length&&e.storeLoadOptions.group?(Ck(e),g6(i,e,n,s)):vk(e.data)&&e.data.resolve(s)}function p6(i,e,t,n,o,s){let r=e.group||[],a=r[o+1],l=[];x(t.paths,d=>{var c;let h={requireTotalCount:!1,requireGroupCount:!0,group:[a],groupSummary:e.storeLoadOptions.groupSummary,filter:bs(t.paths[d],{filter:e.storeLoadOptions.filter,group:r}),select:e.storeLoadOptions.select,langParams:(c=e.storeLoadOptions)===null||c===void 0?void 0:c.langParams};d===0&&(h.skip=t.skip||0),d===t.paths.length-1&&(h.take=t.take);let p=h.take===0?[]:i._dataSource.loadFromStore(h);P(p).done(g=>{let C=t.items[d];xk(e,t,o,d),C.items=g}),l.push(p)}),P.apply(null,l).done(()=>{eO(i,e,s,n+1),bk(i,e,n+1,t,o+1,s)})}function g6(i,e,t,n){let o=[],s=e.group||[];x(t.paths,(d,c)=>{o.push(bs(c,{group:e.isCustomLoading?e.storeLoadOptions.group:s}))});let{filter:r}=e.storeLoadOptions;e.storeLoadOptions.isLoadingAll||(r=$.combineFilters([r,$.combineFilters(o,"or")]));let a=m({},e.storeLoadOptions,{requireTotalCount:!1,requireGroupCount:!1,group:null,sort:s.concat($.normalizeSortingInfo(e.storeLoadOptions.sort||[])),filter:r}),l=i._dataSource.isLastLevelGroupItemsPagingLocal();l||(a.skip=t.skip,a.take=t.take),P(t.take===0?[]:i._dataSource.loadFromStore(a)).done(d=>{l&&(d=i._dataSource.sortLastLevelGroupItems(d,s,t.paths),d=t.skip?d.slice(t.skip):d,d=t.take?d.slice(0,t.take):d),x(t.items,(c,h)=>{let p=h.count-(c===0&&t.skip||0),g=d.splice(0,p);xk(e,t,s.length-1,c),h.items=g}),e.data.resolve(n)}).fail(e.data.reject)}var Qy=function(i,e){let t=new y,n=!!(e.group&&e.group.length),o=m({skip:0,take:1,requireGroupCount:n,requireTotalCount:!n},e,{group:n?e.group:null});return i.load(o).done((s,r)=>{let a=r&&(n?r.groupCount:r.totalCount);if(!isFinite(a)){t.reject(mt.Error(n?"E4022":"E4021"));return}t.resolve(a)}).fail(t.reject.bind(t)),t},Pu=class extends vd{updateTotalItemsCount(e){let t=0,n=e.extra&&e.extra.totalCount||0,o=e.extra&&e.extra.groupCount||0,s=this._dataSource.pageSize(),r=this._isVirtualPaging();Fu(this,a=>{a.childrenTotalCount=0}),Fu(this,(a,l)=>{let d=_k(l,r?0:s,t),c=a.count+a.childrenTotalCount;r||(c+=Zy(d,s,c,l.length-1)),l[l.length-2]?l[l.length-2].childrenTotalCount+=c:t+=c}),super.updateTotalItemsCount(t-n+o)}_isGroupExpanded(e){let t=this._dataSource.group();return Xy(t,e)}_updatePagingOptions(e,t){let n=this,o=n._isVirtualPaging(),s=n._dataSource.pageSize(),r=[],a=[],l=0,d=0;e.take&&(Fu(this,c=>{c.childrenTotalCount=0,c.skipChildrenTotalCount=0}),Fu(n,(c,h)=>{let p,g=0,C=0,v=_k(h,o?0:s,d),b=0,T=0,M=c.count+c.childrenTotalCount,G=M;t&&t(c,v);let te=e.skip-v;v<=e.skip+e.take&&M&&(p=e.take,o||(b=Zy(v,s,M,h.length-1),M+=b*h.length,G+=b,s&&te>=0&&(g=h.length,C=h.length-1,T=Math.floor(te/s))),te>=0?(v+M>e.skip&&r.unshift(te-T*g-c.skipChildrenTotalCount),v+M>=e.skip+p&&a.unshift(p-g-c.childrenTotalCount+c.skipChildrenTotalCount)):v+M>=e.skip+p&&a.unshift(p+te-c.childrenTotalCount)),v<=e.skip&&(h[h.length-2]?h[h.length-2].skipChildrenTotalCount+=Math.min(G,te+1-T*C):l+=Math.min(G,te+1)),v<=e.skip+p&&(M=Math.min(G,te+p-(T+1)*C),h[h.length-2]?h[h.length-2].childrenTotalCount+=M:d+=M)}),e.skip-=l,e.take-=d-l),e.skips=r,e.takes=a}changeRowExpand(e){let t=this.findGroupInfo(e),n=this._dataSource,o=n.remoteOperations().groupPaging,s=$.normalizeSortingInfo(n.group());return t?(t.isExpanded=!t.isExpanded,o&&t.isExpanded&&e.length<s.length?Qy(n,{filter:bs(e,{filter:n.lastLoadOptions().filter,group:n.group()}),group:[s[e.length]],select:n.select()}).done(r=>{t.count=r}):new y().resolve()):new y().reject()}handleDataLoading(e){let t=this,{storeLoadOptions:n}=e,o=$.normalizeSortingInfo(n.group||e.loadOptions.group);if(!(e.isCustomLoading||!o.length)){if(e.remoteOperations.grouping){let s=t._dataSource.remoteOperations().paging;n.group=$.normalizeSortingInfo(n.group),n.group.forEach((r,a)=>{let l=a===n.group.length-1;r.isExpanded=!s||!l})}e.group=e.group||o,e.remoteOperations.paging?(e.skip=n.skip,e.take=n.take,n.requireGroupCount=!0,n.group=o.slice(0,1),t._updatePagingOptions(e),n.skip=e.skip,n.take=e.take):(e.skip=e.loadOptions.skip,e.take=e.loadOptions.take,t._updatePagingOptions(e))}}handleDataLoadedCore(e,t){let n=this,o=$.normalizeSortingInfo(e.storeLoadOptions.group||e.loadOptions.group).length,s=e.group?e.group.length:0,r,a={};if(e.isCustomLoading)t(e),Jy(n,e.data,o,a,[],e.isCustomLoading,e.storeLoadOptions.isLoadingAll);else{if(e.remoteOperations.paging||n.foreachGroups(l=>{l.count=0}),r=eO(n,e,e.data,o),r<0){e.data=new y().reject(ie.Error("E1037"));return}if(e.remoteOperations.paging||o&&e.extra&&e.loadOptions.requireTotalCount&&(e.extra.totalCount=r,e.extra.groupCount=e.data.length),s&&e.storeLoadOptions.requireGroupCount&&!isFinite(e.extra.groupCount)){e.data=new y().reject(mt.Error("E4022"));return}n.updateTotalItemsCount(e),e.remoteOperations.paging||(n._updatePagingOptions(e),e.lastLoadOptions.skips=e.skips,e.lastLoadOptions.takes=e.takes),t(e),e.remoteOperations.paging||n._processPaging(e,o)}bk(n,e,o,a,0,e.data)}_processSkips(e,t,n){if(!n)return;let o=e[0],s=t[0],r=o&&o.items;s!==void 0&&(o.isContinuation=!0,r&&(o.items=r.slice(s),this._processSkips(o.items,t.slice(1),n-1)))}_processTakes(e,t,n,o,s){if(!o||!e)return;s=s||[];let r=e[e.length-1],a=r&&r.items,l=n[0],d=t[0];if(r){let c=r.count-(r.isContinuation&&d||0)||a.length;l!==void 0&&c>l&&(r.isContinuationOnNextPage=!0,s.forEach(h=>{h.isContinuationOnNextPage=!0}),a&&(a=a.slice(0,l),r.items=a)),s.push(r),this._processTakes(a,t.slice(1),n.slice(1),o-1,s)}}_processPaging(e,t){this._processSkips(e.data,e.skips,t),this._processTakes(e.data,e.skips,e.takes,t)}isLastLevelGroupItemsPagingLocal(){return!1}sortLastLevelGroupItems(e){return e}refresh(e,t){let n=this,o=n._dataSource,{storeLoadOptions:s}=e,r=e.group||e.storeLoadOptions.group,a=$.normalizeSortingInfo(n._group),l,d;function c(h,p){p.length===d+1&&(h.isExpanded=l)}for(d=0;d<a.length;d++)l=Xy(r,d),Xy(n._group,d)!==l&&n.foreachGroups(c);if(super.refresh.apply(this,arguments),r&&e.remoteOperations.paging&&t.reload)return Fu(n,h=>{let p=Qy(o,{filter:bs(h.path,{filter:s.filter,group:r}),group:r.slice(h.path.length),select:s.select}),g=Qy(o,{filter:Pm(h.path,{filter:s.filter,group:r},!0),group:r.slice(h.path.length-1,h.path.length),select:s.select});return P(g,p).done((C,v)=>{C=parseInt(C.length?C[0]:C),v=parseInt(v.length?v[0]:v),h.offset=C,h.count!==v&&(h.count=v,n.updateTotalItemsCount(e))})},!0)}};var tO=function(i,e){let t=new y,n=m({skip:0,take:1,requireTotalCount:!0},e);return i.load(n).done((o,s)=>{t.resolve(s&&s.totalCount)}).fail(t.reject.bind(t)),t},km=function(i,e,t){return i.foreachGroups(n=>{if(!n.isExpanded)return e(n)},!1,!1,t,!0)},yk=function(i,e){let t=0,n=e||0;return e&&(km(i,o=>{if(o.offset-t>=e)return!1;t+=o.count-1}),n+=t),n},Ok=function(i,e,t,n,o,s){let r=0,a=!1;for(let l=0;l<e.length;l++){let d=e[l];if(d.items!==void 0){t.push(d.key);let c=i.findGroupInfo(t);if(c&&!c.isExpanded)d.collapsedItems=d.items,d.items=null,n+=c.count,s--,s<0&&r++,o&&(a=!0);else if(d.items){let h=Ok(i,d.items,t,n,o,s);o&&(h.offset-n>1?d.isContinuation=!0:a=!0),n=h.offset,s=h.take,s<0&&(d.items.length?d.isContinuationOnNextPage=!0:r++)}t.pop()}else o&&(a=!0),n++,s--,s<0&&r++;o=!1}return a&&e.splice(0,1),r&&e.splice(-r,r),{offset:n,take:s}},m6=function(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!Ls(null,i[t],e[t]))return!1;return!0},iO=function(i,e,t,n,o){if(e){for(let s=0;s<e.length;s++){let r=e[s];if("key"in r&&r.items!==void 0){t.push(r.key),o&&m6(o.path,t)&&!r.isContinuation&&(o.offset=n);let a=i.findGroupInfo(t);a&&!r.isContinuation&&(a.offset=n),a&&!a.isExpanded?n+=a.count:n=iO(i,r.items,t,n,o),t.pop()}else n++}return n}},f6=function(i,e){if(e.group){let t=$.normalizeSortingInfo(e.group),n=$.normalizeSortingInfo(i.sort);i.sort=cn.arrangeSortingInfo(t,n),delete e.group}},_6=function(i,e,t){let n=$.normalizeSortingInfo(t||e.group),o=[];for(let s=0;s<i.length;s++){let r=[];for(let a=0;a<=s;a++)r.push([n[a].selector,s===a?"<>":"=",i[a]]);o.push($.combineFilters(r))}return o=$.combineFilters(o,"or"),$.combineFilters([o,e.filter])},Ek=function(i,e){let t=i.count||i.items.length;if(!i.count&&e>1){t=0;for(let n=0;n<i.items.length;n++)t+=Ek(i.items[n],e-1)}return t},ku=class extends vd{handleDataLoading(e){let{storeLoadOptions:t}=e,n=[],o=0,s=!1,r,{group:a}=e.loadOptions,l=0;if(f6(t,e.loadOptions),e.group=e.group||a,e.isCustomLoading)return;let d=m({},t);d.skip=yk(this,t.skip),d.skip&&d.take&&a&&(d.skip--,d.take++,s=!0),d.take&&a&&(r=d.take,d.take++),km(this,c=>{if(c.offset>=d.skip+d.take+l)return!1;c.offset>=d.skip+l&&c.count&&(l+=c.count-1,n.push(c),o+=c.count)}),x(n,function(){d.filter=_6(this.path,d,a)}),e.storeLoadOptions=d,e.collapsedGroups=n,e.collapsedItemsCount=o,e.skip=d.skip||0,e.skipFirstItem=s,e.take=r}handleDataLoaded(e,t){let n=this,{collapsedGroups:o}=e,s=$.normalizeSortingInfo(e.group),r=s.length;function a(l,d,c,h,p){if(!l||!d.length||!c.length)return;let g,C,v=Pt(d[0],!0);for(C=0;C<l.length&&(g=Pt(l[C].key,!0),!(p>=h.offset||v===g));C++)p+=Ek(l[C],c.length);(!l.length||v!==g)&&l.splice(C,0,{key:d[0],items:[],count:d.length===1?h.count:void 0}),a(l[C].items,d.slice(1),c.slice(1),h,p)}if(e.collapsedItemsCount&&e.extra&&e.extra.totalCount>=0&&(e.extra._totalCountWasIncreasedByCollapsedItems||(e.extra.totalCount+=e.collapsedItemsCount,e.extra._totalCountWasIncreasedByCollapsedItems=!0)),t(e),r){let{data:l}=e,d=Mt(l);if(cn.multiLevelGroup(d,s).enumerate().done(c=>{l=c}),o)for(let c=0;c<o.length;c++)a(l,o[c].path,s,o[c],e.skip);e.isCustomLoading||Ok(n,l,[],e.skip,e.skipFirstItem,e.take),e.data=l}}isGroupItemCountable(e){return e.items===null}updateTotalItemsCount(){let e=0;km(this,t=>{t.count&&(e-=t.count-1)}),super.updateTotalItemsCount(e)}changeRowExpand(e){let t=this,n=t._dataSource,o=n.beginPageIndex?n.beginPageIndex():n.pageIndex(),s=n.items(),r=yk(t,o*n.pageSize()),a=t.findGroupInfo(e),l;return a&&!a.isExpanded?l=new y().resolve(a.count):l=tO(n,{filter:bs(e,{filter:n.filter(),group:n.group()})}),P(l).done(d=>{d=parseInt(d.length?d[0]:d),a?(iO(t,s,[],r),a.isExpanded=!a.isExpanded,a.count=d):(a={offset:-1,count:d,path:e,isExpanded:!1},iO(t,s,[],r,a),a.offset>=0&&t.addGroupInfo(a)),t.updateTotalItemsCount()}).fail(function(){n._eventsStrategy.fireEvent("loadError",arguments)})}allowCollapseAll(){return!1}refresh(e,t){let n=this,{storeLoadOptions:o}=e,s=n._dataSource;if(super.refresh.apply(this,arguments),t.reload)return km(n,r=>{let a=tO(s,{filter:bs(r.path,o)}),l=tO(s,{filter:Pm(r.path,o)});return P(l,a).done((d,c)=>{d=parseInt(d.length?d[0]:d),c=parseInt(c.length?c[0]:c),r.offset=d,r.count!==c&&(r.count=c,n.updateTotalItemsCount())})},!0)}};var C6=i=>class extends i{init(){super.init.apply(this,arguments),this._initGroupingHelper()}_initGroupingHelper(e){let t=this._grouping,n=this.option("grouping.autoExpandAll"),o=this.option("focusedRowEnabled"),s=e?e.remoteOperations:this.remoteOperations();s.filtering&&s.sorting&&s.paging&&!s.grouping&&(n||!o)?(!t||t instanceof Pu)&&(this._grouping=new ku(this)):(!t||t instanceof ku)&&(this._grouping=new Pu(this))}totalItemsCount(){let e=super.totalItemsCount();return e>0&&this._dataSource.group()&&this._dataSource.requireTotalCount()?e+this._grouping.totalCountCorrection():e}itemsCount(){return this._dataSource.group()?this._grouping.itemsCount()||0:super.itemsCount.apply(this,arguments)}allowCollapseAll(){return this._grouping.allowCollapseAll()}isGroupItemCountable(e){return this._grouping.isGroupItemCountable(e)}isRowExpanded(e){let t=this._grouping.findGroupInfo(e);return t?t.isExpanded:!this._grouping.allowCollapseAll()}collapseAll(e){return this._collapseExpandAll(e,!1)}expandAll(e){return this._collapseExpandAll(e,!0)}_collapseExpandAll(e,t){let n=this,o=n._dataSource,s=o.group(),r=$.normalizeSortingInfo(s||[]);if(r.length){for(let a=0;a<r.length;a++)e===void 0||e===a?r[a].isExpanded=t:s&&s[a]&&(r[a].isExpanded=s[a].isExpanded);o.group(r),n._grouping.foreachGroups((a,l)=>{(e===void 0||e===l.length-1)&&(a.isExpanded=t)},!1,!0),n.resetPagesCache()}return!0}refresh(){return super.refresh.apply(this,arguments),this._grouping.refresh.apply(this._grouping,arguments)}changeRowExpand(e){let t=this,n=t._dataSource;if(n.group())return n.beginLoading(),t._lastLoadOptions&&(t._lastLoadOptions.groupExpand=!0),t._changeRowExpandCore(e).always(()=>{n.endLoading()})}_changeRowExpandCore(e){return this._grouping.changeRowExpand(e)}_hasGroupLevelsExpandState(e,t){if(e&&Array.isArray(e)){for(let n=0;n<e.length;n++)if(e[n].isExpanded===t)return!0}}_customizeRemoteOperations(e,t){let{remoteOperations:n}=e;e.storeLoadOptions.group?(n.grouping&&!e.isCustomLoading&&(!n.groupPaging||this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!0))&&(n.paging=!1),!n.grouping&&(!n.sorting||!n.filtering||e.isCustomLoading||this._hasGroupLevelsExpandState(e.storeLoadOptions.group,!1))&&(n.paging=!1)):!e.isCustomLoading&&n.paging&&t.grouping&&this.resetCache(),super._customizeRemoteOperations.apply(this,arguments)}_handleDataLoading(e){return super._handleDataLoading(e),this._initGroupingHelper(e),this._grouping.handleDataLoading(e)}_handleDataLoaded(e){return this._grouping.handleDataLoaded(e,super._handleDataLoaded.bind(this))}_handleDataLoadedCore(e){return this._grouping.handleDataLoadedCore(e,super._handleDataLoadedCore.bind(this))}};ea.extend(C6);var x6=i=>class extends i{init(){super.init(),this.createAction("onRowExpanding"),this.createAction("onRowExpanded"),this.createAction("onRowCollapsing"),this.createAction("onRowCollapsed")}_beforeProcessItems(e){let t=this._columnsController.getGroupColumns();return e=super._beforeProcessItems(e),e.length&&t.length&&(e=this._processGroupItems(e,t.length)),e}_processItem(e,t){return f(e.groupIndex)&&B(e.rowType)&&e.rowType.indexOf("group")===0?(e=this._processGroupItem(e,t),t.dataIndex=0):e=super._processItem.apply(this,arguments),e}_processGroupItem(e,t){return e}_processGroupItems(e,t,n){let o=this,s=o._columnsController.getGroupColumns(),r=s[s.length-t];if(!n){let l=o.option("scrolling.mode");n={collectContinuationItems:l!=="virtual"&&l!=="infinite",resultItems:[],path:[],values:[]}}let{resultItems:a}=n;if(n.data&&(n.collectContinuationItems||!n.data.isContinuation)&&a.push({rowType:"group",data:n.data,groupIndex:n.path.length-1,isExpanded:!!n.data.items,key:n.path.slice(0),values:n.values.slice(0)}),e)if(t===0)a.push.apply(a,e);else for(let l=0;l<e.length;l++){let d=e[l];d&&"items"in d?(n.data=d,n.path.push(d.key),n.values.push(r&&r.deserializeValue&&!r.calculateDisplayValue?r.deserializeValue(d.key):d.key),o._processGroupItems(d.items,t-1,n),n.data=void 0,n.path.pop(),n.values.pop()):a.push(d)}return a}publicMethods(){return super.publicMethods().concat(["collapseAll","expandAll","isRowExpanded","expandRow","collapseRow"])}collapseAll(e){let t=this._dataSource;t&&t.collapseAll(e)&&(t.pageIndex(0),t.reload())}expandAll(e){let t=this._dataSource;t&&t.expandAll(e)&&(t.pageIndex(0),t.reload())}changeRowExpand(e){let t=this,n=t.isRowExpanded(e),o={key:e,expanded:n};return t.executeAction(n?"onRowCollapsing":"onRowExpanding",o),o.cancel?new y().resolve():P(t._changeRowExpandCore(e)).done(()=>{o.expanded=!n,t.executeAction(n?"onRowCollapsed":"onRowExpanded",o)})}_changeRowExpandCore(e){let t=this,n=this._dataSource,o=new y;return n?P(n.changeRowExpand(e)).done(()=>{t.load().done(o.resolve).fail(o.reject)}).fail(o.reject):o.resolve(),o}isRowExpanded(e){let t=this._dataSource;return t&&t.isRowExpanded(e)}expandRow(e){return this.isRowExpanded(e)?new y().resolve():this.changeRowExpand(e)}collapseRow(e){return this.isRowExpanded(e)?this.changeRowExpand(e):new y().resolve()}optionChanged(e){e.name==="grouping"&&(e.name="dataSource"),super.optionChanged(e)}},nO=function(i,e){let t=this._columnsController;switch(e.itemData.value){case"group":{let n=t._dataSource.group()||[];t.columnOption(i.dataField,"groupIndex",n.length);break}case"ungroup":t.columnOption(i.dataField,"groupIndex",-1);break;case"ungroupAll":this.component.clearGrouping()}},wk=i=>{let e=i?.visible;return e==="auto"?F.current().deviceType==="desktop":!!e},Sk=(i,e)=>{let t=wk(i),n=i?.allowColumnDragging&&e.allowGrouping;return t&&!!n},v6=i=>class extends i{_getToolbarItems(){let e=super._getToolbarItems();return this._appendGroupingItem(e)}_appendGroupingItem(e){if(this._isGroupPanelVisible()){let t=!1,n={template:()=>{let o=u("<div>").addClass("dx-datagrid-group-panel");return this._updateGroupPanelContent(o),Kr("groupPanel",this,o,void 0,this._handleActionKeyDown.bind(this)),o},name:"groupPanel",onItemRendered:()=>{t&&this.renderCompleted.fire(),t=!0},location:"before",locateInMenu:"never",sortIndex:1};e.push(n),this.updateToolbarDimensions()}return e}_handleActionKeyDown(e){let{event:t}=e,n=u(t.target),o=n.closest(".dx-group-panel-item").index(),s=this._columnsController.getGroupColumns()[o],r=s&&s.index;n.is(".dx-header-filter")?this._headerFilterController.showHeaderFilterMenu(r,!0):this._processGroupItemAction(r),t.preventDefault()}_isGroupPanelVisible(){return wk(this.option("groupPanel"))}_renderGroupPanelItems(e,t){let n=this;e.empty(),x(t,(o,s)=>{n._createGroupPanelItem(e,s)}),cd(this)}_createGroupPanelItem(e,t){let n=u("<div>").addClass(t.cssClass).addClass("dx-group-panel-item").data("columnData",t).appendTo(e).text(t.caption);return BR(this,n),n}_columnOptionChanged(e){if(!this._requireReady&&!$.checkChanges(e.optionNames,["width","visibleWidth"])){let t=this.element(),n=t&&t.find(".dx-datagrid-group-panel");n&&n.length&&(this._updateGroupPanelContent(n),this.updateToolbarDimensions(),this.renderCompleted.fire())}super._columnOptionChanged()}_updateGroupPanelContent(e){let t=this.getColumns(),n=this.option("groupPanel");this._renderGroupPanelItems(e,t),n.allowColumnDragging&&!t.length&&(u("<div>").addClass("dx-group-panel-message").text(n.emptyPanelText).appendTo(e),e.closest(".dx-toolbar-item").addClass("dx-toolbar-label"),e.closest(".dx-toolbar-label").css("maxWidth","none"))}allowDragging(e){let t=this.option("groupPanel");return Sk(t,e)}getColumnElements(){let e=this.element();return e&&e.find(".dx-group-panel-item")}getColumns(){return this._columnsController.getGroupColumns()}getBoundingRect(){let e=this.element();if(e&&e.find(".dx-datagrid-group-panel").length){let t=e.offset();return{top:t.top,bottom:t.top+Q(e)}}return null}getName(){return"group"}getContextMenuItems(e){let t=this,n=t.option("grouping.contextMenuEnabled"),o=u(e.targetElement).closest(".dx-group-panel-item"),s;if(o.length&&(e.column=o.data("columnData")),n&&e.column){let{column:r}=e;if(f(r.allowGrouping)?r.allowGrouping:!0){let l=f(r.groupIndex)&&r.groupIndex>-1,d=t.option("grouping.texts"),c=nO.bind(t,r);s=[{text:d.ungroup,value:"ungroup",disabled:!l,onItemClick:c},{text:d.ungroupAll,value:"ungroupAll",onItemClick:c}]}}return s}hasGroupedColumns(){return this._isGroupPanelVisible()&&!!this.getColumns().length}optionChanged(e){e.name==="groupPanel"?(this._invalidate(),e.handled=!0):super.optionChanged(e)}},b6=i=>class extends i{getContextMenuItems(e){let t=this,n=t.option("grouping.contextMenuEnabled"),o;if(n&&e.row&&e.row.rowType==="group"){let r=t._columnsController.columnOption(`groupIndex:${e.row.groupIndex}`);if(r&&r.allowGrouping){let a=t.option("grouping.texts"),l=nO.bind(t,r);o=[],o.push({text:a.ungroup,value:"ungroup",onItemClick:l},{text:a.ungroupAll,value:"ungroupAll",onItemClick:l})}}return o}_rowClick(e){let t=this,n=t.option("grouping.expandMode"),s=t.option("scrolling.mode")!=="infinite"&&n==="rowClick"&&u(e.event.target).closest(".dx-group-row").length,r=u(e.event.target).closest(".dx-datagrid-expand").length;(s||r)&&t._changeGroupRowState(e),super._rowClick(e)}_changeGroupRowState(e){let t=this._dataController.items()[e.rowIndex],n=this._columnsController.columnOption(`groupIndex:${t.groupIndex}`,"allowCollapsing");(t.rowType==="data"||t.rowType==="group"&&n!==!1)&&(this._dataController.changeRowExpand(t.key,!0),e.event.preventDefault(),e.handled=!0)}},y6=i=>class extends i{getContextMenuItems(e){let t=this,n=t.option("grouping.contextMenuEnabled"),o=super.getContextMenuItems(e);if(n&&e.row&&(e.row.rowType==="header"||e.row.rowType==="detailAdaptive")){let{column:s}=e;if(!s.command&&(!f(s.allowGrouping)||s.allowGrouping)){let r=t.option("grouping.texts"),a=f(s.groupIndex)&&s.groupIndex>-1,l=nO.bind(t,s);o=o||[],o.push({text:r.groupByThisColumn,value:"group",beginGroup:!0,disabled:a,onItemClick:l}),s.showWhenGrouped&&o.push({text:r.ungroup,value:"ungroup",disabled:!a,onItemClick:l}),o.push({text:r.ungroupAll,value:"ungroupAll",onItemClick:l})}}return o}allowDragging(e){let t=this.option("groupPanel");return Sk(t,e)||super.allowDragging(e)}};$.registerModule("grouping",{defaultOptions:()=>({grouping:{autoExpandAll:!0,allowCollapsing:!0,contextMenuEnabled:!1,expandMode:"buttonClick",texts:{groupContinuesMessage:O.format("dxDataGrid-groupContinuesMessage"),groupContinuedMessage:O.format("dxDataGrid-groupContinuedMessage"),groupByThisColumn:O.format("dxDataGrid-groupHeaderText"),ungroup:O.format("dxDataGrid-ungroupHeaderText"),ungroupAll:O.format("dxDataGrid-ungroupAllText")}},groupPanel:{visible:!1,emptyPanelText:O.format("dxDataGrid-groupPanelEmptyText"),allowColumnDragging:!0}}),extenders:{controllers:{data:x6,columns:i=>class extends i{_getExpandColumnOptions(){let e=super._getExpandColumnOptions.apply(this,arguments);return e.cellTemplate=$.getExpandCellTemplate(),e}},editing:i=>class extends i{_isProcessedItem(e){return f(e.groupIndex)&&B(e.rowType)&&e.rowType.indexOf("group")===0}}},views:{headerPanel:v6,rowsView:b6,columnHeadersView:y6}}});var O6=i=>class extends i{_getExpandColumnsCore(){let e=super._getExpandColumnsCore();return this.option("masterDetail.enabled")&&e.push({type:"detailExpand",cellTemplate:R.getExpandCellTemplate()}),e}},oO=function(i){i._expandedItems=[],i._isExpandAll=i.option("masterDetail.autoExpandAll")},E6=i=>class extends i{init(){oO(this),super.init()}expandAll(e){let t=this;e<0?(t._isExpandAll=!0,t._expandedItems=[],t.updateItems()):super.expandAll.apply(t,arguments)}collapseAll(e){let t=this;e<0?(t._isExpandAll=!1,t._expandedItems=[],t.updateItems()):super.collapseAll.apply(t,arguments)}isRowExpandedHack(){return super.isRowExpanded.apply(this,arguments)}isRowExpanded(e){let t=this,n=R.getIndexByKey(e,t._expandedItems);return Array.isArray(e)?super.isRowExpanded.apply(t,arguments):!!(t._isExpandAll^(n>=0&&t._expandedItems[n].visible))}_getRowIndicesForExpand(e){let t=this.getRowIndexByKey(e);return[t,t+1]}_changeRowExpandCore(e){let t=this,n;if(Array.isArray(e))n=super._changeRowExpandCore.apply(t,arguments);else{let o=R.getIndexByKey(e,t._expandedItems);if(o>=0){let{visible:s}=t._expandedItems[o];t._expandedItems[o].visible=!s}else t._expandedItems.push({key:e,visible:!0});t.updateItems({changeType:"update",rowIndices:t._getRowIndicesForExpand(e)}),n=new y().resolve()}return n}_processDataItemHack(){return super._processDataItem.apply(this,arguments)}_processDataItem(e,t){let n=super._processDataItem.apply(this,arguments);return n.isExpanded=this.isRowExpanded(n.key),t.detailColumnIndex===void 0&&(t.detailColumnIndex=-1,x(t.visibleColumns,(o,s)=>{if(s.command==="expand"&&!f(s.groupIndex))return t.detailColumnIndex=o,!1})),t.detailColumnIndex>=0&&(n.values[t.detailColumnIndex]=n.isExpanded),n}_processItemsHack(){return super._processItems.apply(this,arguments)}_processItems(e,t){let n=this,{changeType:o}=t,s=[];return e=super._processItems.apply(n,arguments),o==="loadingAll"?e:(o==="refresh"&&(n._expandedItems=At(n._expandedItems,r=>r.visible)),x(e,(r,a)=>{s.push(a);let l=R.getIndexByKey(a.key,n._expandedItems);a.rowType==="data"&&(a.isExpanded||l>=0)&&!a.isNewRow&&s.push({visible:a.isExpanded,rowType:"detail",key:a.key,data:a.data,values:[]})}),s)}optionChanged(e){let t=this,n,o;if(e.name==="masterDetail"){switch(e.name="dataSource",e.fullName){case"masterDetail":{let s=e.value||{},r=e.previousValue||{};n=s.enabled!==r.enabled,o=s.autoExpandAll!==r.autoExpandAll;break}case"masterDetail.template":oO(t);break;case"masterDetail.enabled":n=!0;break;case"masterDetail.autoExpandAll":o=!0}(n||o)&&oO(t)}super.optionChanged(e)}},w6=i=>class extends i{fireContentReadyAction(){super.fireContentReadyAction.apply(this,arguments),this._updateParentDataGrids(this.component.$element())}_updateParentDataGrids(e){let t=e.closest(".dx-master-detail-row");t.length&&P(this._updateMasterDataGrid(t,e)).done(()=>{this._updateParentDataGrids(t.parent())})}_updateMasterDataGrid(e,t){let n=u(e).data("options"),o=u(e).closest(`.${this.getWidgetContainerClass()}`).parent().data("dxDataGrid");if(n&&o)return this._updateMasterDataGridCore(o,n)}_updateMasterDataGridCore(e,t){let n=y();if(e.getView("rowsView").isFixedColumns())this._updateFixedMasterDetailGrids(e,t.rowIndex,u(t.rowElement)).done(n.resolve);else{if(e.option("scrolling.useNative")===!0){e.updateDimensions().done(()=>n.resolve(!0));return}let o=e.getScrollable();o?o?.update().done(()=>n.resolve()):n.resolve()}return n.promise()}_updateFixedMasterDetailGrids(e,t,n){let o=y(),s=u(e.getRowElement(t)),r=u(e.getView("rowsView").getTableElements()),a=s?.length===2&&Q(s.eq(0))!==Q(s.eq(1)),l=r?.length===2&&Q(r.eq(0))!==Q(r.eq(1));if(a||l){let d=W(n);return e.updateDimensions().done(()=>{let c=this.option("columnAutoWidth")&&e.option("scrolling.useNative")===!0,h=c&&d!==W(n);c&&h?this.updateDimensions().done(()=>o.resolve(!0)):o.resolve(!0)}),o.promise()}return y().resolve()}_toggleBestFitMode(e){if(super._toggleBestFitMode.apply(this,arguments),this.option("masterDetail.template")){let t=this._rowsView.getTableElement();t&&t.find(".dx-master-detail-cell").css("maxWidth",e?0:"")}}},S6=i=>class extends i{_getCellTemplate(e){let t=this,{column:n}=e,o=this._editingController,s=o&&o.isEditRow(e.rowIndex),r;return n.command==="detail"&&!s?r=t.option("masterDetail.template")||{allowRenderToDetachedContainer:!1,render:t._getDefaultTemplate(n)}:r=super._getCellTemplate.apply(t,arguments),r}_isDetailRow(e){return e&&e.rowType&&e.rowType.indexOf("detail")===0}_createRow(e){let t=super._createRow.apply(this,arguments);return e&&this._isDetailRow(e)&&(this.option("showRowLines")&&t.addClass("dx-row-lines"),t.addClass("dx-master-detail-row"),f(e.visible)&&t.toggle(e.visible)),t}_renderCells(e,t){let{row:n}=t,o,s=this._columnsController.getVisibleColumns();n.rowType&&this._isDetailRow(n)?this._needRenderCell(0,t.columnIndices)&&(o=this._renderCell(e,{value:null,row:n,rowIndex:n.rowIndex,column:{command:"detail"},columnIndex:0,change:t.change}),o.addClass("dx-cell-focus-disabled").addClass("dx-master-detail-cell").attr("colSpan",s.length),n.isEditing||o.attr("aria-roledescription",O.format("dxDataGrid-masterDetail"))):super._renderCells.apply(this,arguments)}},Ik={defaultOptions:()=>({masterDetail:{enabled:!1,autoExpandAll:!1,template:null}}),extenders:{controllers:{columns:O6,data:E6,resizing:w6},views:{rowsView:S6}}};$.registerModule("masterDetail",Ik);var Dk=$g;var I6="dx-numberbox-spin",D6="dx-numberbox-spin-button";var Mk="dxNumberBox",Tk=D(le.up,Mk),Ak=D(le.cancel,Mk),T6=at.inherit({_getDefaultOptions(){return m(this.callBase(),{direction:"up",onChange:null,activeStateEnabled:!0,hoverStateEnabled:!0})},_initMarkup(){this.callBase();let i=`${I6}-${this.option("direction")}`;this.$element().addClass(D6).addClass(i),this._spinIcon=u("<div>").addClass(`${i}-icon`).appendTo(this.$element())},_render(){this.callBase();let i=D(le.down,this.NAME),e=this.$element();_.off(e,i),_.on(e,i,this._spinDownHandler.bind(this)),this._spinChangeHandler=this._createActionByOption("onChange")},_spinDownHandler(i){i.preventDefault(),this._clearTimer(),_.on(this.$element(),yn.name,()=>{this._feedBackDeferred=y(),jp(this._feedBackDeferred),this._spinChangeHandler({event:i}),this._holdTimer=setInterval(this._spinChangeHandler,100,{event:i})});let e=S.getDocument();_.on(e,Tk,this._clearTimer.bind(this)),_.on(e,Ak,this._clearTimer.bind(this)),this._spinChangeHandler({event:i})},_dispose(){this._clearTimer(),this.callBase()},_clearTimer(){_.off(this.$element(),yn.name);let i=S.getDocument();_.off(i,Tk),_.off(i,Ak),this._feedBackDeferred&&this._feedBackDeferred.resolve(),this._holdTimer&&clearInterval(this._holdTimer)},_optionChanged(i){switch(i.name){case"onChange":case"direction":this._invalidate();break;default:this.callBase(i)}}}),Ga=T6;var A6="dx-numberbox-spin",M6="dx-numberbox-spin-container",R6="dx-numberbox-spin-touch-friendly",Bm=class extends ms{_attachEvents(e,t){let{editor:n}=this,o=D(le.down,n.NAME),s=t.children(),r=n._createAction(a=>n._spinButtonsPointerDownHandler(a));_.off(t,o),_.on(t,o,a=>r({event:a})),Ga.getInstance(s.eq(0)).option("onChange",a=>n._spinUpChangeHandler(a)),Ga.getInstance(s.eq(1)).option("onChange",a=>n._spinDownChangeHandler(a))}_create(){let{editor:e}=this,t=u("<div>").addClass(M6),n=u("<div>").appendTo(t),o=u("<div>").appendTo(t),s=this._getOptions();return this._addToContainer(t),e._createComponent(n,Ga,m({direction:"up"},s)),e._createComponent(o,Ga,m({direction:"down"},s)),this._legacyRender(e.$element(),this._isTouchFriendly(),s.visible),{instance:t,$element:t}}_getOptions(){let{editor:e}=this,t=this._isVisible(),n=e.option("disabled");return{visible:t,disabled:n}}_isVisible(){let{editor:e}=this;return super._isVisible()&&e.option("showSpinButtons")}_isTouchFriendly(){let{editor:e}=this;return e.option("showSpinButtons")&&e.option("useLargeSpinButtons")}_legacyRender(e,t,n){e.toggleClass(R6,t),e.toggleClass(A6,n)}update(){if(super.update()){let{editor:t,instance:n}=this,o=t.$element(),s=this._isVisible(),r=this._isTouchFriendly(),a=n.children(),l=Ga.getInstance(a.eq(0)),d=Ga.getInstance(a.eq(1)),c=this._getOptions();l.option(c),d.option(c),this._legacyRender(o,r,s)}}};var F6=Math,P6="dx-numberbox",k6=["tab","del","backspace","leftArrow","rightArrow","home","end","enter"];var B6=Dk.inherit({_supportedKeys(){return m(this.callBase(),{upArrow(i){ft(i)||(i.preventDefault(),i.stopPropagation(),this._spinUpChangeHandler(i))},downArrow(i){ft(i)||(i.preventDefault(),i.stopPropagation(),this._spinDownChangeHandler(i))},enter(){}})},_getDefaultOptions(){return m(this.callBase(),{value:0,min:void 0,max:void 0,step:1,showSpinButtons:!1,useLargeSpinButtons:!0,mode:"text",invalidValueMessage:O.format("dxNumberBox-invalidValueMessage"),buttons:void 0})},_useTemplates:()=>!1,_getDefaultButtons(){return this.callBase().concat([{name:"spins",Ctor:Bm}])},_isSupportInputMode(){let i=parseFloat(we.version);return we.chrome&&i>=66||we.safari&&i>=12},_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().generic&&!F.isSimulator(),options:{useLargeSpinButtons:!1}},{device:function(){return F.real().deviceType!=="desktop"&&!this._isSupportInputMode()}.bind(this),options:{mode:"number"}}])},_initMarkup(){this._renderSubmitElement(),this.$element().addClass(P6),this.callBase()},_getDefaultAttributes(){let i=this.callBase();return i.inputmode="decimal",i},_renderContentImpl(){this.option("isValid")&&this._validateValue(this.option("value")),this.setAria("role","spinbutton")},_renderSubmitElement(){this._$submitElement=u("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(i){this._getSubmitElement().val(Fw(i))},_getSubmitElement(){return this._$submitElement},_keyPressHandler(i){this.callBase(i);let e=Fc(i);if(!/[\d.,eE\-+]/.test(e)){let n=ke(i);return ft(i)||n&&k6.includes(n)?void 0:(i.preventDefault(),!1)}this._keyPressed=!0},_onMouseWheel(i){i.delta>0?this._spinValueChange(1,i):this._spinValueChange(-1,i)},_renderValue(){let i=this._input().val(),e=this.option("value");(!i.length||Number(i)!==e)&&(this._forceValueRender(),this._toggleEmptinessEventHandler());let t=f(e)?null:O.format("dxNumberBox-noDataText");return this.setAria({valuenow:Be(e,""),valuetext:t}),this.option("text",this._input().val()),this._updateButtons(),y().resolve()},_forceValueRender(){let i=this.option("value"),e=Number(i),t=isNaN(e)?"":this._applyDisplayValueFormatter(i);this._renderDisplayText(t)},_applyDisplayValueFormatter(i){return this.option("displayValueFormatter")(i)},_renderProps(){this._input().prop({min:this.option("min"),max:this.option("max"),step:this.option("step")}),this.setAria({valuemin:Be(this.option("min"),""),valuemax:Be(this.option("max"),"")})},_spinButtonsPointerDownHandler(){let i=this._input();!this.option("useLargeSpinButtons")&&S.getActiveElement()!==i[0]&&_.trigger(i,"focus")},_spinUpChangeHandler(i){this.option("readOnly")||this._spinValueChange(1,i.event||i)},_spinDownChangeHandler(i){this.option("readOnly")||this._spinValueChange(-1,i.event||i)},_spinValueChange(i,e){let t=parseFloat(this.option("step"));if(t===0)return;let n=parseFloat(this._normalizeInputValue())||0;n=this._correctRounding(n,t*i);let o=this.option("min"),s=this.option("max");f(o)&&(n=Math.max(o,n)),f(s)&&(n=Math.min(s,n)),this._saveValueChangeEvent(e),this.option("value",n)},_correctRounding(i,e){let t=/[,.](.*)/,n=t.test(i),o=t.test(e);if(n||o){let s=n?t.exec(i)[0].length:0,r=o?t.exec(e)[0].length:0,a=F6.max(s,r);return i=this._round(i+e,a),i}return i+e},_round(i,e){e=e||0;let t=10**e;return i*=t,i=Math.round(i)/t,i},_renderValueChangeEvent(){this.callBase();let i=D("focusout","NumberBoxForceValueChange");_.off(this.element(),i),_.on(this.element(),i,this._forceRefreshInputValue.bind(this))},_forceRefreshInputValue(){if(this.option("mode")==="number")return;let i=this._input(),e=this._applyDisplayValueFormatter(this.option("value"));i.val(null),i.val(e)},_valueChangeEventHandler(i){let e=this._input(),t=this._normalizeText(),n=this._parseValue(t),o=t!=="."&&t!=="-";if(this._isValueValid()&&!this._validateValue(n)){e.val(this._applyDisplayValueFormatter(n));return}o&&this.callBase(i,isNaN(n)?null:n),this._applyValueBoundaries(t,n),this.validationRequest.fire({value:n,editor:this})},_applyValueBoundaries(i,e){let t=this._isValueIncomplete(i),n=this._isValueInRange(i);!t&&!n&&e!==null&&Number(i)!==e&&this._input().val(this._applyDisplayValueFormatter(e))},_replaceCommaWithPoint:i=>i.replace(",","."),_inputIsInvalid(){let i=this.option("mode")==="number",e=this._input().get(0).validity;return i&&e&&e.badInput},_renderDisplayText(i){this._inputIsInvalid()||this.callBase(i)},_isValueIncomplete:i=>/(^-$)|(^-?\d*\.$)|(\d+e-?$)/i.test(i),_isValueInRange(i){return An(i,this.option("min"),this.option("max"))},_isNumber(i){return this._parseValue(i)!==null},_validateValue(i){let e=this._normalizeText(),t=this._isValueValid(),n=!0,o=this._isNumber(e);return isNaN(Number(i))&&(n=!1),!i&&t?n=!0:!o&&!t&&(n=!1),this.option({isValid:n,validationError:n?null:{editorSpecific:!0,message:this.option("invalidValueMessage")}}),n},_normalizeInputValue(){return this._parseValue(this._normalizeText())},_normalizeText(){let i=this._input().val().trim();return this._replaceCommaWithPoint(i)},_parseValue(i){let e=parseFloat(i);return isNaN(e)?null:It(e,this.option("min"),this.option("max"))},_clearValue(){this._inputIsInvalid()&&(this._input().val(""),this._validateValue()),this.callBase()},clear(){this.option("value")===null?(this.option("text",""),this._input().length&&this._renderValue()):this.option("value",null)},_optionChanged(i){switch(i.name){case"value":this._validateValue(i.value),this._setSubmitValue(i.value),this.callBase(i),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(i)}}}),Rk=B6;var bd=function(i){let e=0,t=0;for(let n=0;n<i.length;++n)if(i[n]==="'"&&e++,i[n]==="."&&(++t,e%2===0))return{occurrence:t,index:n};return{occurrence:1,index:-1}},Bu=function(i,e,t){let n=-1;for(;t--&&n++<i.length;)n=i.indexOf(e,n);return n},Vu=function(i,e){return e===-1?[i]:[i.slice(0,e),i.slice(e+1)]},Fk=function(i,e){return i&&Hc(i/100,e)};var Lu=function(i,e){if(typeof e=="string"){let t=e.split(";"),n=Qe.getSign(i,e);t[1]=t[1]||`-${t[0]}`,e=t[n<0?1:0],e=(a=>a.replace(/'([^']*)'/g,l=>l.split("").map(()=>" ").join("").substr(2)))(e);let s=/^[^#0.,]*/.exec(e)[0].length,r=/[^#0.,]*$/.exec(e)[0].length;return{start:s,end:i.length-r}}return{start:0,end:i.length}},Pk=function(i,e){let t=Qe.getDecimalSeparator(),n=new RegExp(`[^0-9${eo(t)}]`,"g");return e.slice(0,i).replace(n,"").length},kk=function(i){return i.split("").reverse().join("")},Bk=function(i,e){if(!i)return-1;let t=/[0-9]/g,n=1,o=null,s=t.exec(e);for(;s;){if(o=s.index,n>=i)return o;n++,s=t.exec(e)}return o===null?e.length:o},V6=function(i){return i.replace(/[^0-9e]+$/,"")},sa=function(i,e){return i.start===void 0&&(i={start:i,end:i}),{start:i.start+e,end:i.end+e}},Vk=function(i,e,t,n){t=sa(t,0);let o=Qe.getDecimalSeparator(),s=L6(i),r=bd(n).occurrence,a=s?0:Bu(i,o,r),l=Bu(e,o,r),d=Vu(i,a),c=Vu(e,l);if(a!==-1&&t.start>a){let T=t.start-a-1,M=Pk(T,d[1]),G=c[1]?l+1+Bk(M,c[1])+1:e.length;return lr(G,e,n)}let p=V6(c[0]),g=d[0].length-t.start,C=Pk(g,kk(d[0])),v=Bk(C,kk(p)),b=p.length-(v+1);return lr(b,e,n)};function L6(i){return i.length===1&&!!i.match(/^[,.][0-9]*$/g)}var Lk=function(i,e,t){i=sa(i,0);let n=lr(i,e,t);return i.start>=n.start&&i.end<=n.end};function lr(i,e,t){i=sa(i,0);let n=Lu(e,t);return{start:It(i.start,n.start,n.end),end:It(i.end,n.start,n.end)}}var Nk=function(i,e,t){let n=Lu(i,t);return Lu(e,t).start-n.start};var N6=Rk.inherit({_getDefaultOptions(){return m(this.callBase(),{useMaskBehavior:!0,format:null})},_isDeleteKey:i=>i==="del",_supportedKeys(){return this._useMaskBehavior()?m(this.callBase(),{minus:this._revertSign.bind(this),del:this._removeHandler.bind(this),backspace:this._removeHandler.bind(this),leftArrow:this._arrowHandler.bind(this,-1),rightArrow:this._arrowHandler.bind(this,1),home:this._moveCaretToBoundaryEventHandler.bind(this,1),enter:this._updateFormattedValue.bind(this),end:this._moveCaretToBoundaryEventHandler.bind(this,-1)}):this.callBase()},_getTextSeparatorIndex(i){let e=Qe.getDecimalSeparator(),t=bd(this.option("format")).occurrence;return Bu(i,e,t)},_focusInHandler(i){this._preventNestedFocusEvent(i)||(this.clearCaretTimeout(),this._caretTimeout=setTimeout(()=>{this._caretTimeout=void 0;let e=this._caret();if(e.start===e.end&&this._useMaskBehavior()){let t=this._getInputVal(),n=this._getTextSeparatorIndex(t);n>=0?this._caret({start:n,end:n}):this._moveCaretToBoundaryEventHandler(-1,i)}},0)),this.callBase(i)},_focusOutHandler(i){let e=!this._preventNestedFocusEvent(i);e&&(this._focusOutOccurs=!0,this._useMaskBehavior()&&this._updateFormattedValue()),this.callBase(i),e&&(this._focusOutOccurs=!1)},_hasValueBeenChanged(i){let e=this._getFormatPattern(),t=this.option("value");return(this._format(t,e)||"")!==i},_updateFormattedValue(){let i=this._getInputVal();this._hasValueBeenChanged(i)&&(this._updateParsedValue(),this._adjustParsedValue(),this._setTextByParsedValue(),this._parsedValue!==this.option("value")&&_.trigger(this._input(),"change"))},_arrowHandler(i,e){if(!this._useMaskBehavior())return;let t=this._getInputVal(),n=this._getFormatPattern(),o=sa(this._caret(),i);Lk(o,t,n)||(o=i===1?o.end:o.start,e.preventDefault(),this._caret(lr(o,t,n)))},_moveCaretToBoundary(i){let e=Lu(this._getInputVal(),this._getFormatPattern()),t=sa(i===1?e.start:e.end,0);this._caret(t)},_moveCaretToBoundaryEventHandler(i,e){!this._useMaskBehavior()||e&&e.shiftKey||(this._moveCaretToBoundary(i),e&&e.preventDefault())},_shouldMoveCaret(i,e){let t=Qe.getDecimalSeparator(),n=i.charAt(e.end)===t;return(this._lastKey===t||this._lastKey==="."||this._lastKey===",")&&n},_getInputVal(){return Qe.convertDigits(this._input().val(),!0)},_keyboardHandler(i){if(this.clearCaretTimeout(),this._lastKey=Qe.convertDigits(Fc(i),!0),this._lastKeyName=ke(i),!this._shouldHandleKey(i.originalEvent))return this.callBase(i);let e=this._getInputVal(),t=this._caret(),n;this._lastKeyName==="minus"?n="":n=i.which===110?Qe.getDecimalSeparator():this._lastKey;let o=this._tryParse(e,t,n);return this._shouldMoveCaret(e,t)&&(this._moveCaret(1),i.originalEvent.preventDefault()),o===void 0?this._lastKeyName!=="minus"&&i.originalEvent.preventDefault():this._parsedValue=o,this.callBase(i)},_keyPressHandler(i){this._useMaskBehavior()||this.callBase(i)},_removeHandler(i){let e=this._caret(),t=this._getInputVal(),{start:n}=e,{end:o}=e;this._lastKey=Fc(i),this._lastKeyName=ke(i);let s=this._isDeleteKey(this._lastKeyName),r=!s;if(n===o){let c=n;if(r&&c>0||s&&c<t.length)s&&o++,r&&n--;else{i.preventDefault();return}}let a=t.slice(n,o);if(this._isStub(a)){this._moveCaret(s?1:-1),(this._parsedValue<0||1/this._parsedValue===-1/0)&&(this._revertSign(i),this._setTextByParsedValue(),this.option("valueChangeEvent").split(" ").includes("input")&&_.trigger(this._input(),"input")),i.preventDefault();return}let l=Qe.getDecimalSeparator();if(a===l){let c=t.indexOf(l);this._isNonStubAfter(c+1)&&(this._moveCaret(s?1:-1),i.preventDefault());return}if(o-n<t.length&&this._replaceSelectedText(t,{start:n,end:o},"").search(/[0-9]/)<0&&this._isValueInRange(0)){this._parsedValue=this._parsedValue<0||1/this._parsedValue===-1/0?-0:0;return}let d=this._tryParse(t,{start:n,end:o},"");d===void 0?i.preventDefault():this._parsedValue=d},_isPercentFormat(){return this._getFormatPattern().replace(/'[^']+'/g,"").indexOf("%")!==-1},_parse(i,e){let t=this.option("format"),n=A(t.parser),o=n?t.parser:Qe.parse,s=0;if(!n){let r=bd(e).index,a=this._getTextSeparatorIndex(i),l=r!==-1?r:e.length,d=a!==-1?a:i.length;d>l&&e.indexOf("#")===-1&&(s=d-l)}return i=i.substr(s),o(i,e)},_format(i,e){let t=this.option("format"),n=t?.formatter||t,o=A(n)?n:Qe.format;return i===null?"":o(i,e)},_getFormatPattern(){return this._currentFormat||this._updateFormat(),this._currentFormat},_updateFormat(){let i=this.option("format"),e=A(i?.parser),t=B(i)&&(i.includes("0")||i.includes("#")),n=i==="exponential"||i?.type==="exponential",o=e||t||n;this._currentFormat=o?i:FA(s=>{let r=this._format(s,i);return Qe.convertDigits(r,!0)})},_getFormatForSign(i){let e=this._getFormatPattern();if(B(e)){let n=e.split(";"),o=Qe.getSign(i,e);return n[1]=n[1]||`-${n[0]}`,o<0?n[1]:n[0]}return Qe.getSign(i)<0?"-":""},_removeStubs(i,e){let t=this._getFormatForSign(i),n=Qe.getThousandsSeparator(),o=this._getStubs(t),s=i;if(o.length){let r=o[0],a=new RegExp(`(${eo(o[1]||"")})$`,"g"),l=new RegExp(`[-${eo(e?"":n)}]`,"g");s=s.replace(r,"").replace(a,"").replace(l,"")}return s},_getStubs(i){let e=/[^']([#0.,]+)/g.exec(i),t=e&&e[0].trim();return i.split(t).map(n=>n.replace(/'/g,""))},_truncateToPrecision(i,e){if(f(i)){let t=i.toString(),n=t.indexOf(".");if(t&&n>-1){let o=parseFloat(t.substr(0,n+e+1));return isNaN(o)?i:o}}return i},_tryParse(i,e,t){let n=e.start!==e.end,o=n&&e.start===0&&e.end===i.length,s=Qe.getDecimalSeparator();if(o&&t===s)return 0;let r=this._replaceSelectedText(i,e,t),a=this._getFormatPattern(),l=this._getParsedValue(r,a),d=!a.parser&&this._getPrecisionLimits(r).max,c=l!==this._parsedValue,h=t===s&&d===0,p=!n&&!c&&t!=="-"&&this._isStub(t);if(h||p||(this._removeStubs(r)===""&&(l=Math.abs(0*this._parsedValue)),isNaN(l)))return;let g=l===null?this._parsedValue:l;return l=d?this._truncateToPrecision(g,d):l,!a.parser&&this._isPercentFormat()?Fk(l,d):l},_getParsedValue(i,e){let t=Qe.getSign(i,e?.formatter||e),n=this._removeStubs(i,!0),o=this._parse(n,e),s=o<0?-1:1;return Oe(o)&&t!==s?t*o:o},_isValueIncomplete(i){if(!this._useMaskBehavior())return this.callBase(i);let e=this._caret(),t=Qe.getDecimalSeparator(),n=this._getTextSeparatorIndex(i),o=n>=0&&n<e.start,s=this._removeStubs(i,!0).split(t);if(!o||s.length!==2)return!1;let r=s[1].length,l=!!this._getFormatPattern().parser,d=!l&&this._getPrecisionLimits(this._getFormatPattern(),i),c=l?!0:An(r,d.min,d.max),h=s[1].charAt(r-1)==="0";return c&&(h||!r)},_isValueInRange(i){let e=Be(this.option("min"),-1/0),t=Be(this.option("max"),1/0);return An(i,e,t)},_setInputText(i){let e=Qe.convertDigits(i,!0),t=Vk(this._getInputVal(),e,this._caret(),this._getFormatPattern());this._input().val(i),this._toggleEmptinessEventHandler(),this._formattedValue=i,this._focusOutOccurs||this._caret(t)},_useMaskBehavior(){return!!this.option("format")&&this.option("useMaskBehavior")},_renderInputType(){let i=this.option("mode")==="number",e=F.real().deviceType==="desktop";this._useMaskBehavior()&&i?this._setInputType(e||this._isSupportInputMode()?"text":"tel"):this.callBase()},_isChar:i=>B(i)&&i.length===1,_moveCaret(i){if(!i)return;let e=sa(this._caret(),i),t=lr(e,this._getInputVal(),this._getFormatPattern());this._caret(t)},_shouldHandleKey(i){let e=ke(i),t=ft(i)||i.altKey||i.shiftKey||!this._isChar(e),n=e==="minus";return this._useMaskBehavior()&&!t&&!n},_renderInput(){this.callBase(),this._renderFormatter()},_renderFormatter(){this._clearCache(),this._detachFormatterEvents(),this._useMaskBehavior()&&this._attachFormatterEvents()},_detachFormatterEvents(){_.off(this._input(),".dxNumberFormatter")},_isInputFromPaste(i){let e=i.originalEvent&&i.originalEvent.inputType;return f(e)?e==="insertFromPaste":this._isValuePasted},_attachFormatterEvents(){let i=this._input();_.on(i,D("input","dxNumberFormatter"),e=>{this._formatValue(e),this._isValuePasted=!1}),_.on(i,D("dxclick","dxNumberFormatter"),()=>{this._caretTimeout||(this._caretTimeout=setTimeout(()=>{this._caretTimeout=void 0,this._caret(lr(this._caret(),this._getInputVal(),this._getFormatPattern()))},0))}),_.on(i,nr,()=>{this.clearCaretTimeout()})},clearCaretTimeout(){clearTimeout(this._caretTimeout),this._caretTimeout=void 0},_forceRefreshInputValue(){if(!this._useMaskBehavior())return this.callBase()},_isNonStubAfter(i){let e=this._getInputVal().slice(i);return e&&!this._isStub(e,!0)},_isStub(i,e){let n=`^[^0-9${eo(Qe.getDecimalSeparator())}]+$`;return new RegExp(n,"g").test(i)&&(e||this._isChar(i))},_parseValue(i){return this._useMaskBehavior()?this._parsedValue:this.callBase(i)},_getPrecisionLimits(i){let e=this._getFormatForSign(i),t=bd(e).index,n=(Vu(e,t)[1]||"").replace(/[^#0]/g,""),o=n.replace(/^(0*)#*/,"$1").length,s=n.length;return{min:o,max:s}},_revertSign(i){if(!this._useMaskBehavior())return;let e=this._caret();if(e.start!==e.end){if(ke(i)==="minus"){this._applyRevertedSign(i,e,!0);return}this._caret(lr(0,this._getInputVal(),this._getFormatPattern()))}this._applyRevertedSign(i,e)},_applyRevertedSign(i,e,t){let n=-1*Be(this._parsedValue,null);if((this._isValueInRange(n)||n===0)&&(this._parsedValue=n,t)){let o=this._getFormatPattern(),s=this._getInputVal();this._setTextByParsedValue(),i.preventDefault();let r=this._getInputVal(),a=Nk(s,r,o);e=sa(e,a);let l=lr(e,r,o);this._caret(l)}},_removeMinusFromText(i,e){return this._lastKeyName==="minus"&&i.charAt(e.start-1)==="-"?this._replaceSelectedText(i,{start:e.start-1,end:e.start},""):i},_setTextByParsedValue(){let i=this._getFormatPattern(),e=this._parseValue(),t=this._format(e,i)||"";this._setInputText(t)},_formatValue(i){let e=this._getInputVal(),t=this._caret(),n=this._removeMinusFromText(e,t),o=n!==e;if(e=n,!this._isInputFromPaste(i)&&this._isValueIncomplete(n)){this._formattedValue=e,o&&this._setTextByParsedValue();return}if(Qe.convertDigits(this._formattedValue,!0)!==e){let r=this._tryParse(e,t,"");f(r)&&(this._parsedValue=r)}this._setTextByParsedValue()},_renderDisplayText(){this._useMaskBehavior()?this._toggleEmptinessEventHandler():this.callBase.apply(this,arguments)},_renderValue(){return this._useMaskBehavior()&&(this._parsedValue=this.option("value"),this._setTextByParsedValue()),this.callBase()},_updateParsedValue(){let i=this._getInputVal();this._parsedValue=this._tryParse(i,this._caret())},_adjustParsedValue(){if(!this._useMaskBehavior())return;let e=this._removeStubs(this._getInputVal())?this._parseValue():null;if(!Oe(e)){this._parsedValue=e;return}this._parsedValue=It(e,this.option("min"),this.option("max"))},_valueChangeEventHandler(i){if(!this._useMaskBehavior())return this.callBase(i);let e=this._caret();this._saveValueChangeEvent(i),this._lastKey=null,this._lastKeyName=null,this._updateParsedValue(),this._adjustParsedValue(),this.option("value",this._parsedValue),e&&this._caret(e)},_optionChanged(i){switch(i.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(i);break;default:this.callBase(i)}},_clearCache(){delete this._formattedValue,delete this._lastKey,delete this._lastKeyName,delete this._parsedValue,delete this._focusOutOccurs,clearTimeout(this._caretTimeout),delete this._caretTimeout},_clean(){this._clearCache(),this.callBase()}}),sO=N6;K("dxNumberBox",sO);var Hk=sO;var ja=Hk;var $k=vi.inherit({_supportedKeys(){return m(this.callBase(),{space:function(i){i.preventDefault(),this._clickAction({event:i})}})},_getDefaultOptions(){return m(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,value:!1})},_canValueBeChangedByClick:()=>!0,_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this.$element().addClass("dx-radiobutton")},_initMarkup(){this.callBase(),this._renderIcon(),this._renderCheckedState(this.option("value")),this._renderClick(),this.setAria("role","radio")},_renderIcon(){this._$icon=u("<div>").addClass("dx-radiobutton-icon"),u("<div>").addClass("dx-radiobutton-icon-dot").appendTo(this._$icon),this.$element().append(this._$icon)},_renderCheckedState(i){this.$element().toggleClass("dx-radiobutton-checked",i).find(".dx-radiobutton-icon").toggleClass("dx-radiobutton-icon-checked",i),this.setAria("checked",i)},_renderClick(){let i=D(de,this.NAME);this._clickAction=this._createAction(e=>{this._clickHandler(e.event)}),_.off(this.$element(),i),_.on(this.$element(),i,e=>{this._clickAction({event:e})})},_clickHandler(i){this._saveValueChangeEvent(i),this.option("value",!0)},_optionChanged(i){i.name==="value"?(this._renderCheckedState(i.value),this.callBase(i)):this.callBase(i)}});K("dxRadioButton",$k);var zk=$k;var Wk=zk;var rO="dxListEditDecorator",H6=D(xm,rO),$6=D(vm,rO),z6=D(md,rO),W6=pe.inherit({ctor(i){this._list=i,this._init()},_init:E,_shouldHandleSwipe:!1,_attachSwipeEvent(i){let e={itemSizeFunc:function(){return this._clearSwipeCache&&(this._itemWidthCache=W(this._list.$element()),this._clearSwipeCache=!1),this._itemWidthCache}.bind(this)};_.on(i.$itemElement,H6,e,this._itemSwipeStartHandler.bind(this)),_.on(i.$itemElement,$6,this._itemSwipeUpdateHandler.bind(this)),_.on(i.$itemElement,z6,this._itemSwipeEndHandler.bind(this))},_itemSwipeStartHandler(i){let e=u(i.currentTarget);if(e.is(".dx-state-disabled, .dx-state-disabled *")){i.cancel=!0;return}clearTimeout(this._list._inkRippleTimer),this._swipeStartHandler(e,i)},_itemSwipeUpdateHandler(i){let e=u(i.currentTarget);this._swipeUpdateHandler(e,i)},_itemSwipeEndHandler(i){let e=u(i.currentTarget);this._swipeEndHandler(e,i),this._clearSwipeCache=!0},beforeBag:E,afterBag:E,_commonOptions(){return{activeStateEnabled:this._list.option("activeStateEnabled"),hoverStateEnabled:this._list.option("hoverStateEnabled"),focusStateEnabled:this._list.option("focusStateEnabled")}},modifyElement(i){this._shouldHandleSwipe&&(this._attachSwipeEvent(i),this._clearSwipeCache=!0)},afterRender:E,handleClick:E,handleKeyboardEvents:E,handleEnterPressing:E,handleContextMenu:E,_swipeStartHandler:E,_swipeUpdateHandler:E,_swipeEndHandler:E,visibilityChange:E,getExcludedSelectors:E,dispose:E}),Gk=W6;var aO={};function jk(i,e,t){let n=aO,o={};o[i]=n[i]?n[i]:{},o[i][e]=t,m(n,o)}var Kk="dx-list-select-decorator-enabled";var G6="dx-list-select-checkbox-container",j6="dx-list-select-checkbox",K6="dx-list-select-radiobutton-container",U6="dx-list-select-radiobutton";var Uk=D(de,"dxListEditDecorator");jk("selection","default",Gk.inherit({_init(){this.callBase.apply(this,arguments);let i=this._list.option("selectionMode");this._singleStrategy=i==="single",this._containerClass=this._singleStrategy?K6:G6,this._controlClass=this._singleStrategy?U6:j6,this._controlWidget=this._singleStrategy?Wk:na,this._list.$element().addClass(Kk)},beforeBag(i){let{$itemElement:e}=i,t=i.$container.addClass(this._containerClass),n=u("<div>").addClass(this._controlClass).appendTo(t);new this._controlWidget(n,m(this._commonOptions(),{value:this._isSelected(e),elementAttr:{"aria-label":O.format("CheckState")},focusStateEnabled:!1,hoverStateEnabled:!1,onValueChanged:function(o){o.event&&this._list._saveSelectionChangeEvent(o.event),this._processCheckedState(e,o.value),o.event&&o.event.stopPropagation()}.bind(this)}))},modifyElement(i){this.callBase.apply(this,arguments);let{$itemElement:e}=i,t=this._controlWidget.getInstance(e.find(`.${this._controlClass}`));_.on(e,"stateChanged",(n,o)=>{t.option("value",o)})},_updateSelectAllState(){this._$selectAll&&this._selectAllCheckBox.option("value",this._list.isSelectAll())},afterRender(){this._list.option("selectionMode")==="all"&&(this._$selectAll?this._updateSelectAllState():this._renderSelectAll())},handleKeyboardEvents(i,e){let t=!e,n=this._list,o=this._$selectAll,s=n._getLastItemIndex();return!!o&&(e&&i===0||t&&i===s)?(n.option("focusedElement",o),n.scrollToItem(n.option("focusedElement")),!0):!1},handleEnterPressing(i){if(this._$selectAll&&this._$selectAll.hasClass("dx-state-focused"))return i.target=this._$selectAll.get(0),this._list._saveSelectionChangeEvent(i),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value")),!0},_renderSelectAll(){this._$selectAll=u("<div>").addClass("dx-list-select-all");let i=this._list._supportedKeys().downArrow.bind(this._list),e=u("<div>").addClass("dx-list-select-all-checkbox").appendTo(this._$selectAll);this._selectAllCheckBox=this._list._createComponent(e,na,{elementAttr:{"aria-label":O.format("dxList-selectAll")},focusStateEnabled:!1,hoverStateEnabled:!1}),this._selectAllCheckBox.registerKeyHandler("downArrow",i),u("<div>").addClass("dx-list-select-all-label").text(this._list.option("selectAllText")).appendTo(this._$selectAll),this._list.itemsContainer().prepend(this._$selectAll),this._updateSelectAllState(),this._updateSelectAllAriaLabel(),this._attachSelectAllHandler()},_attachSelectAllHandler(){this._selectAllCheckBox.option("onValueChanged",this._selectAllHandler.bind(this)),_.off(this._$selectAll,Uk),_.on(this._$selectAll,Uk,this._selectAllClickHandler.bind(this))},_updateSelectAllAriaLabel(){if(!this._$selectAll)return;let{value:i}=this._selectAllCheckBox.option(),t=i===void 0?"indeterminate":i?"checked":"notChecked",n=`${O.format("dxList-selectAll")}, ${O.format(`dxList-selectAll-${t}`)}`;this._$selectAll.attr({"aria-label":n})},_selectAllHandler(i){i.event&&i.event.stopPropagation(),i.event&&this._list._saveSelectionChangeEvent(i.event);let{value:e}=this._selectAllCheckBox.option();e?this._selectAllItems():e===!1&&this._unselectAllItems(),this._updateSelectAllAriaLabel(),this._list._createActionByOption("onSelectAllValueChanged")({value:e})},_checkSelectAllCapability(){let i=this._list,e=i._dataController;return i.option("selectAllMode")==="allPages"&&i.option("grouped")&&!e.group()?(ie.log("W1010"),!1):!0},_selectAllItems(){this._checkSelectAllCapability()&&this._list._selection.selectAll(this._list.option("selectAllMode")==="page")},_unselectAllItems(){this._checkSelectAllCapability()&&this._list._selection.deselectAll(this._list.option("selectAllMode")==="page")},_selectAllClickHandler(i){this._list._saveSelectionChangeEvent(i),this._selectAllCheckBox.option("value",!this._selectAllCheckBox.option("value"))},_isSelected(i){return this._list.isItemSelected(i)},_processCheckedState(i,e){e?this._list.selectItem(i):this._list.unselectItem(i)},dispose(){this._disposeSelectAll(),this._list.$element().removeClass(Kk),this.callBase.apply(this,arguments)},_disposeSelectAll(){this._$selectAll&&(this._$selectAll.remove(),this._$selectAll=null)}}));var q6=m({},fg,{_dataExpressionDefaultOptions:()=>({items:[],dataSource:null,itemTemplate:"item",value:null,valueExpr:"this",displayExpr:void 0}),_initDataExpressions(){this._compileValueGetter(),this._compileDisplayGetter(),this._initDynamicTemplates(),this._initDataSource(),this._itemsToDataSource()},_itemsToDataSource(){this.option("dataSource")||(this._dataSource=new gi({store:new hs(this.option("items")),pageSize:0}),this._initDataController())},_compileDisplayGetter(){this._displayGetter=Ce(this._displayGetterExpr())},_displayGetterExpr(){return this.option("displayExpr")},_compileValueGetter(){this._valueGetter=Ce(this._valueGetterExpr())},_valueGetterExpr(){return this.option("valueExpr")||"this"},_loadValue(i){let e=y();return i=this._unwrappedValue(i),f(i)?(this._loadSingle(this._valueGetterExpr(),i).done(t=>{this._isValueEquals(this._valueGetter(t),i)?e.resolve(t):e.reject()}).fail(()=>{e.reject()}),this._loadValueDeferred=e,e.promise()):e.reject().promise()},_rejectValueLoading(){var i;(i=this._loadValueDeferred)===null||i===void 0||i.reject({shouldSkipCallback:!0})},_getCurrentValue(){return this.option("value")},_unwrappedValue(i){return i=i??this._getCurrentValue(),i&&this._dataSource&&this._valueGetterExpr()==="this"&&(i=this._getItemKey(i)),Nt.unwrap(i)},_getItemKey(i){let e=this._dataSource.key();if(Array.isArray(e)){let t={};for(let n=0,o=e.length;n<o;n++)t[e[n]]=i[e[n]];return t}return e&&typeof i=="object"&&(i=i[e]),i},_isValueEquals(i,e){let t=this._dataSource&&this._dataSource.key(),n=this._compareValues(i,e);return!n&&t&&f(i)&&f(e)&&(Array.isArray(t)?n=this._compareByCompositeKey(i,e,t):n=this._compareByKey(i,e,t)),n},_compareByCompositeKey(i,e,t){let n=z;if(!n(i)||!n(e))return!1;for(let o=0,s=t.length;o<s;o++)if(i[t[o]]!==e[t[o]])return!1;return!0},_compareByKey(i,e,t){let n=Nt.unwrap,o=Be(n(i[t]),i),s=Be(n(e[t]),e);return this._compareValues(o,s)},_compareValues:(i,e)=>Pt(i,!0)===Pt(e,!0),_initDynamicTemplates:E,_setCollectionWidgetItemTemplate(){this._initDynamicTemplates(),this._setCollectionWidgetOption("itemTemplate",this.option("itemTemplate"))},_getCollectionKeyExpr(){let i=this.option("valueExpr");return B(i)&&i!=="this"||A(i)?i:null},_dataExpressionOptionChanged(i){switch(i.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")}}}),qk=q6;var Nu=qk;var Yk=[],Vm=function(i,e,t){Yk.push({enabled:i,decoratorType:e,decoratorSubType:t})};Vm(function(){return this.option("menuItems").length},()=>"menu",function(){return this.option("menuMode")});Vm(function(){return!this.option("menuItems").length&&this.option("allowItemDeleting")},function(){let i=this.option("itemDeleteMode");return i==="toggle"||i==="slideButton"||i==="swipe"||i==="static"?"delete":"menu"},function(){let i=this.option("itemDeleteMode");return i==="slideItem"&&(i="slide"),i});Vm(function(){return this.option("selectionMode")!=="none"&&this.option("showSelectionControls")},()=>"selection",()=>"default");Vm(function(){return this.option("itemDragging.allowReordering")||this.option("itemDragging.allowDropInsideItem")||this.option("itemDragging.group")},()=>"reorder",()=>"default");var Y6=pe.inherit({ctor(i){this._list=i,this._fetchRequiredDecorators()},dispose(){this._decorators&&this._decorators.length&&x(this._decorators,(i,e)=>{e.dispose()})},_fetchRequiredDecorators(){this._decorators=[],x(Yk,(i,e)=>{if(e.enabled.call(this._list)){let n=e.decoratorType.call(this._list),o=e.decoratorSubType.call(this._list),s=this._createDecorator(n,o);this._decorators.push(s)}})},_createDecorator(i,e){let t=this._findDecorator(i,e);return new t(this._list)},_findDecorator(i,e){var t;let n=(t=aO[i])===null||t===void 0?void 0:t[e];if(!n)throw ie.Error("E1012",i,e);return n},modifyItemElement(i){let e=u(i.itemElement),t={$itemElement:e};this._prependBeforeBags(e,t),this._appendAfterBags(e,t),this._applyDecorators("modifyElement",t)},afterItemsRendered(){this._applyDecorators("afterRender")},_prependBeforeBags(i,e){let t=this._collectDecoratorsMarkup("beforeBag",e,"dx-list-item-before-bag");i.prepend(t)},_appendAfterBags(i,e){let t=this._collectDecoratorsMarkup("afterBag",e,"dx-list-item-after-bag");i.append(t)},_collectDecoratorsMarkup(i,e,t){let n=u("<div>");return x(this._decorators,function(){let o=u("<div>").addClass(t);this[i](m({$container:o},e)),o.children().length&&n.append(o)}),n.children()},_applyDecorators(i,e){x(this._decorators,function(){this[i](e)})},_handlerExists(i){if(!this._decorators)return!1;let e=this._decorators,{length:t}=e;for(let n=0;n<t;n++)if(e[n][i]!==E)return!0;return!1},_eventHandler(i,e,t){if(!this._decorators)return!1;let n=!1,o=this._decorators,{length:s}=o;for(let r=0;r<s&&(n=o[r][i](e,t),!n);r++);return n},handleClick(i,e){return this._eventHandler("handleClick",i,e)},handleKeyboardEvents(i,e){return this._eventHandler("handleKeyboardEvents",i,e)},handleEnterPressing(i){return this._eventHandler("handleEnterPressing",i)},contextMenuHandlerExists(){return this._handlerExists("handleContextMenu")},handleContextMenu(i,e){return this._eventHandler("handleContextMenu",i,e)},getExcludedItemSelectors(){let i=[];return this._applyDecorators("getExcludedSelectors",i),i.join(",")}}),Xk=Y6;var Qk=function(i){return(i.group<<20)+i.item},Ka=function(i){return{group:i>>20,item:1048575&i}},X6=Xl.inherit({_groupElements(){return this._collectionWidget._itemContainer().find(".dx-list-group")},_groupItemElements:i=>i.find(".dx-list-item"),getIndexByItemData(i){let e=this._collectionWidget.option("items"),t=!1;return i?(i.items&&i.items.length&&(i=i.items[0]),x(e,(n,o)=>{if(!o.items||(x(o.items,(s,r)=>r!==i?!0:(t={group:n,item:s},!1)),t))return!1}),t):!1},getItemDataByIndex(i){let e=this._collectionWidget.option("items");return Oe(i)?this.itemsGetter()[i]:i&&e[i.group]&&e[i.group].items[i.item]||null},itemsGetter(){let i=[],e=this._collectionWidget.option("items");for(let t=0;t<e.length;t++)e[t]&&e[t].items?i=i.concat(e[t].items):i.push(e[t]);return i},deleteItemAtIndex(i){let e=Ka(i);this._collectionWidget.option("items")[e.group].items.splice(e.item,1)},getKeysByItems(i){let e=[],t;for(t=0;t<i.length;t++)i[t]&&i[t].items?e=e.concat(i[t].items):e.push(i[t]);let n=[];for(t=0;t<e.length;t++)n.push(this._collectionWidget.keyOf(e[t]));return n},getIndexByKey(i,e){let t=e||this._collectionWidget.option("items"),n=-1,o=this;return x(t,(s,r)=>{if(r.items&&(x(r.items,(a,l)=>{let d=o._collectionWidget.keyOf(l);if(o._equalKeys(d,i))return n={group:s,item:a},!1}),n!==-1))return!1}),n},_getGroups(i){let t=this._collectionWidget._dataController.group();return t?cn.queryByOptions(Mt(i),{group:t}).toArray():this._collectionWidget.option("items")},getItemsByKeys(i,e){let t=[],n=this._getGroups(e),o={},s=r=>{let a=this.getIndexByKey(r,n),l=a&&n[a.group];if(l)return{groupKey:l.key,item:l.items[a.item]}};return x(i,(r,a)=>{let l=s(a);if(!l)return;let{groupKey:d}=l,{item:c}=l,h=o[d];h||(h={key:d,items:[]},o[d]=h,t.push(h)),h.items.push(c)}),t},moveItemAtIndexToIndex(i,e){let t=this._collectionWidget.option("items"),n=Ka(i),o=Ka(e),s=t[n.group].items,r=t[o.group].items,a=s[n.item];s.splice(n.item,1),r.splice(o.item,0,a)},_isItemIndex:i=>i&&Oe(i.group)&&Oe(i.item),_getNormalizedItemIndex(i){let e=u(i),t=e.closest(".dx-list-group");return t.length?Qk({group:this._groupElements().index(t),item:this._groupItemElements(t).index(e)}):-1},_normalizeItemIndex:i=>Qk(i),_denormalizeItemIndex:i=>Ka(i),_getItemByNormalizedIndex(i){let e=Ka(i),t=this._groupElements().eq(e.group);return this._groupItemElements(t).eq(e.item)},_itemsFromSameParent:(i,e)=>Ka(i).group===Ka(e).group}),Zk=X6;var Q6=Iu.inherit({_supportedKeys(){let i=this,e=this.callBase(),t=(n,o)=>{let s=this._editStrategy,r=this.option("focusedElement"),a=s.getNormalizedIndex(r);if(!(a===this._getLastItemIndex()&&this._dataController.isLoading()))if(n.shiftKey&&i.option("itemDragging.allowReordering")){let d=a+(o?-1:1),c=s.getItemElement(d);this.reorderItem(r,c),this.scrollToItem(r),n.preventDefault()}else this._editProvider.handleKeyboardEvents(a,o)||(o?e.upArrow(n):e.downArrow(n))};return m({},e,{del:n=>{i.option("allowItemDeleting")&&(n.preventDefault(),i.deleteItem(i.option("focusedElement")))},upArrow:n=>t(n,!0),downArrow:n=>t(n),enter:function(n){this._editProvider.handleEnterPressing(n)||e.enter.apply(this,arguments)},space:function(n){this._editProvider.handleEnterPressing(n)||e.space.apply(this,arguments)}})},_updateSelection(){this._editProvider.afterItemsRendered(),this.callBase()},_getLastItemIndex(){return this._itemElements().length-1},_refreshItemElements(){this.callBase();let i=this._editProvider.getExcludedItemSelectors();i.length&&(this._itemElementsCache=this._itemElementsCache.not(i))},_isItemStrictEquals(i,e){let t=i&&i.__dx_key__;return t&&!this.key()&&this._selection.isItemSelected(t)?!1:this.callBase(i,e)},_getDefaultOptions(){return m(this.callBase(),{showSelectionControls:!1,selectionMode:"none",selectAllMode:"page",onSelectAllValueChanged:null,selectAllText:O.format("dxList-selectAll"),menuItems:[],menuMode:"context",allowItemDeleting:!1,itemDeleteMode:"static",itemDragging:{}})},_defaultOptionsRules(){return this.callBase().concat([{device:i=>i.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 Xk(this)},_disposeEditProvider(){this._editProvider&&this._editProvider.dispose()},_refreshEditProvider(){this._disposeEditProvider(),this._initEditProvider()},_initEditStrategy(){this.option("grouped")?this._editStrategy=new Zk(this):this.callBase()},_initMarkup(){this._refreshEditProvider(),this.callBase()},_renderItems(){this.callBase(...arguments),this._editProvider.afterItemsRendered()},_renderItem(i,e,t,n){let{showSelectionControls:o,selectionMode:s}=this.option(),r=this.callBase(i,e,t,n);return o&&s!=="none"&&this._updateItemAriaLabel(r,e),r},_updateItemAriaLabel(i,e){var t;let n=((t=this._displayGetter)===null||t===void 0?void 0:t.call(this,e))??e?.text??e;this.setAria("label",n,i)},_selectedItemClass:()=>"dx-list-item-selected",_itemResponseWaitClass:()=>"dx-list-item-response-wait",_itemClickHandler(i){let e=u(i.currentTarget);e.is(".dx-state-disabled, .dx-state-disabled *")||this._editProvider.handleClick(e,i)||(this._saveSelectionChangeEvent(i),this.callBase(...arguments))},_shouldFireContextMenuEvent(){return this.callBase(...arguments)||this._editProvider.contextMenuHandlerExists()},_itemHoldHandler(i){let e=u(i.currentTarget);if(e.is(".dx-state-disabled, .dx-state-disabled *"))return;if(Ws(i)&&this._editProvider.handleContextMenu(e,i)){i.handledByEditProvider=!0;return}this.callBase(...arguments)},_getItemContainer(i){if(this.option("grouped")){var e;let t=(e=this._editStrategy.getIndexByItemData(i))===null||e===void 0?void 0:e.group;return this._getGroupContainerByIndex(t)}return this.callBase(i)},_itemContextMenuHandler(i){let e=u(i.currentTarget);if(e.is(".dx-state-disabled, .dx-state-disabled *"))return;if(!i.handledByEditProvider&&this._editProvider.handleContextMenu(e,i)){i.preventDefault();return}this.callBase(...arguments)},_postprocessRenderItem(i){this.callBase(...arguments),this._editProvider.modifyItemElement(i)},_clean(){this._disposeEditProvider(),this.callBase()},focusListItem(i){let e=this._editStrategy.getItemElement(i);this.option("focusedElement",e),this.focus(),this.scrollToItem(this.option("focusedElement"))},_optionChanged(i){switch(i.name){case"selectAllMode":this._initDataSource(),this._dataController.pageIndex(0),this._dataController.load();break;case"grouped":this._clearSelectedItems(),delete this._renderingGroupIndex,this._initEditStrategy(),this.callBase(i);break;case"showSelectionControls":case"menuItems":case"menuMode":case"allowItemDeleting":case"itemDeleteMode":case"itemDragging":case"selectAllText":this._invalidate();break;case"onSelectAllValueChanged":break;default:this.callBase(i)}},selectAll(){return this._selection.selectAll(this._isPageSelectAll())},unselectAll(){return this._selection.deselectAll(this._isPageSelectAll())},isSelectAll(){return this._selection.getSelectAllState(this._isPageSelectAll())},getFlatIndexByItemElement(i){return this._itemElements().index(i)},getItemElementByFlatIndex(i){let e=this._itemElements();return i<0||i>=e.length?u():e.eq(i)},getItemByIndex(i){return this._editStrategy.getItemDataByIndex(i)},deleteItem(i){let e=this._editStrategy,t=e.getNormalizedIndex(i),n=this.option("focusedElement"),o=this.option("focusStateEnabled"),s=n?e.getNormalizedIndex(n):t,a=s===this._getLastItemIndex()||t<s?s-1:s;return this.callBase(i).done(function(){o&&this.focusListItem(a)})}}),Jk=Q6;var Z6=Jk.inherit($o).inherit({_addWidgetPrefix:i=>`dx-list-${i}`,_getCombinedFilter(){let i=this._dataController,e={filter:i.filter()};i.addSearchFilter(e);let{filter:t}=e;return t},_initDataSource(){let i=this.option("searchValue"),e=this.option("searchExpr"),t=this.option("searchMode");this.callBase();let n=this._dataController;i&&i.length&&n.searchValue(i),t.length&&n.searchOperation($o.getOperationBySearchMode(t)),e&&n.searchExpr(e)}}),lO=Z6;K("dxList",lO);var ys=lO;var J6="dx-dropdowneditor-button-visible",e9="dxDropDownEditor-selectLabel",yd=class extends ms{constructor(e,t,n){super(e,t,n),this.currentTemplate=null}_attachEvents(e){let{editor:t}=this;e.option("onClick",n=>{var o;if((o=t._shouldCallOpenHandler)!==null&&o!==void 0&&o.call(t)){t._openHandler(n);return}!t.option("openOnFieldClick")&&t._openHandler(n)}),_.on(e.$element(),"mousedown",n=>{t.$element().is(".dx-state-focused")&&n.preventDefault()})}_create(){let{editor:e}=this,t=u("<div>"),n=this._getOptions();this._addToContainer(t);let o=e._createComponent(t,_t,m({},n,{elementAttr:{"aria-label":O.format(e9)}}));return this._legacyRender(e.$element(),t,n.visible),{$element:t,instance:o}}_getOptions(){let{editor:e}=this,t=this._isVisible(),o={focusStateEnabled:!1,hoverStateEnabled:!1,activeStateEnabled:!1,useInkRipple:!1,disabled:e.option("readOnly"),visible:t};return this._addTemplate(o),o}_isVisible(){let{editor:e}=this;return super._isVisible()&&e.option("showDropDownButton")}_legacyRender(e,t,n){e.toggleClass(J6,n),t&&t.removeClass("dx-button").removeClass("dx-button-mode-contained").addClass("dx-dropdowneditor-button")}_isSameTemplate(){return this.editor.option("dropDownButtonTemplate")===this.currentTemplate}_addTemplate(e){this._isSameTemplate()||(e.template=this.editor._getTemplateByOption("dropDownButtonTemplate"),this.currentTemplate=this.editor.option("dropDownButtonTemplate"))}update(){if(super.update()){let{editor:t,instance:n}=this,o=t.$element(),s=this._getOptions();n?.option(s),this._legacyRender(o,n?.$element(),s.visible)}}};var Od=function(i){if(j())return ae(i)},Ed=function(i){return i===null&&(i=void 0),typeof i=="function"&&(i=i()),i};var iB="dx-dropdowneditor",eB="dx-dropdowneditor-input-wrapper";var Lm="dx-dropdowneditor-overlay",t9="dx-dropdowneditor-overlay-flipped",i9="dx-dropdowneditor-active",n9="dx-dropdowneditor-field-clickable",o9="dx-dropdowneditor-field-template-wrapper";var tB=F.current().platform==="ios",nB=_o.inherit({_supportedKeys(){return m({},this.callBase(),{tab(i){if(!this.option("opened"))return;if(!this._popup.getFocusableElements().length){this.close();return}let e=i.shiftKey?this._getLastPopupElement():this._getFirstPopupElement();e&&(_.trigger(e,"focus"),e.select()),i.preventDefault()},escape(i){return this.option("opened")&&i.preventDefault(),this.close(),!0},upArrow(i){return!ft(i)&&(i.preventDefault(),i.stopPropagation(),i.altKey)?(this.close(),!1):!0},downArrow(i){return!ft(i)&&(i.preventDefault(),i.stopPropagation(),i.altKey)?(this._validatedOpening(),!1):!0},enter(i){return this.option("opened")&&(i.preventDefault(),this._valueChangeEventHandler(i)),!0}})},_getDefaultButtons(){return this.callBase().concat([{name:"dropDown",Ctor:yd}])},_getDefaultOptions(){return m(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:O.format("OK"),cancelButtonText:O.format("Cancel"),buttonsLocation:"default",useHiddenSubmitElement:!1,validationMessagePosition:"auto"})},_useTemplates:()=>!0,_getDefaultPopupPosition(i){let e=un(i);return{offset:{h:0,v:-1},my:`${e} top`,at:`${e} bottom`,collision:"flip flip"}},_defaultOptionsRules(){return this.callBase().concat([{device(i){return i.platform==="generic"},options:{popupPosition:{offset:{v:0}}}}])},_inputWrapper(){return this.$element().find(`.${eB}`).first()},_init(){this.callBase(),this._initVisibilityActions(),this._initPopupInitializedAction(),this._updatePopupPosition(this.option("rtlEnabled")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_updatePopupPosition(i){let{my:e,at:t}=this._getDefaultPopupPosition(i),n=this.option("popupPosition");this.option("popupPosition",m({},n,{my:e,at:t}))},_initVisibilityActions(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]}),this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})},_initPopupInitializedAction(){this._popupInitializedAction=this._createActionByOption("onPopupInitialized",{excludeValidators:["disabled","readOnly"]})},_initMarkup(){this._renderSubmitElement(),this.callBase(),this.$element().addClass("dx-dropdowneditor"),this.setAria("role",this._getAriaRole())},_render(){this._detachFocusEvents(),this.callBase(),this._renderOpenHandler(),this._attachFocusOutHandler(),this._renderOpenedState()},_renderContentImpl(){this.option("deferRendering")||this._createPopup()},_renderInput(){this.callBase(),this._renderTemplateWrapper(),this._wrapInput(),this._setDefaultAria()},_wrapInput(){this._$container=this.$element().wrapInner(u("<div>").addClass(eB)).children().eq(0)},_getAriaHasPopup:()=>"true",_getAriaAutocomplete:()=>"none",_getAriaRole:()=>"combobox",_setDefaultAria(){this.setAria({haspopup:this._getAriaHasPopup(),autocomplete:this._getAriaAutocomplete(),role:this._getAriaRole()})},_readOnlyPropValue(){return!this._isEditable()||this.callBase()},_cleanFocusState(){this.callBase(),this.option("fieldTemplate")&&this._detachFocusEvents()},_getFieldTemplate(){return this.option("fieldTemplate")&&this._getTemplateByOption("fieldTemplate")},_renderMask(){this.option("fieldTemplate")||this.callBase()},_renderField(){let i=this._getFieldTemplate();i&&this._renderTemplatedField(i,this._fieldRenderData())},_renderPlaceholder(){!!this._getFieldTemplate()||this.callBase()},_renderValue(){this.option("useHiddenSubmitElement")&&this._setSubmitValue(),this.callBase().always(this._renderField.bind(this))},_getButtonsContainer(){return this._getFieldTemplate()?this._$container:this._$textEditorContainer},_renderTemplateWrapper(){this._getFieldTemplate()&&(this._$templateWrapper||(this._$templateWrapper=u("<div>").addClass(o9).prependTo(this.$element())))},_renderTemplatedField(i,e){let t=Tn(this._input());this._detachKeyboardEvents(),this._detachFocusEvents(),this._$textEditorContainer.remove(),this._$templateWrapper.empty();let n=this._$templateWrapper,o=Symbol("renderContext");this._activeRenderContext=o,i.render({model:e,container:H(n),onRendered:()=>{if(this._activeRenderContext!==o||!!!this.$element().find(n).length)return;let r=this._input();if(!r.length)throw ie.Error("E1010");this._integrateInput(),t&&_.trigger(r,"focus")}})},_integrateInput(){var i;let{isValid:e}=this.option();this._renderFocusState(),this._refreshValueChangeEvent(),this._refreshEvents(),this._refreshEmptinessEvent(),this._setDefaultAria(),this._setFieldAria(),this._toggleValidationClasses(!e),(i=this.option("_onMarkupRendered"))===null||i===void 0||i()},_refreshEmptinessEvent(){_.off(this._input(),"input blur",this._toggleEmptinessEventHandler),this._renderEmptinessEvent()},_fieldRenderData(){return this.option("value")},_initTemplates(){this._templateManager.addDefaultTemplates({dropDownButton:new Mn(i=>{let e=u("<div>").addClass("dx-dropdowneditor-icon");u(i.container).append(e)})}),this.callBase()},_renderOpenHandler(){let i=this._inputWrapper(),e=D(de,this.NAME),t=this.option("openOnFieldClick");_.off(i,e),_.on(i,e,this._getInputClickHandler(t)),this.$element().toggleClass(n9,t),t&&(this._openOnFieldClickAction=this._createAction(this._openHandler.bind(this)))},_attachFocusOutHandler(){tB&&(this._detachFocusOutEvents(),_.on(this._inputWrapper(),D("focusout",this.NAME),i=>{let e=i.relatedTarget;e&&this.option("opened")&&this._isTargetOutOfComponent(e)&&this.close()}))},_isTargetOutOfComponent(i){let e=this.content?u(this.content()).closest(`.${Lm}`):this._$popup;return u(i).closest(`.${Lm}`,e).length===0},_detachFocusOutEvents(){tB&&_.off(this._inputWrapper(),D("focusout",this.NAME))},_getInputClickHandler(i){return i?e=>{this._executeOpenAction(e)}:()=>{this._focusInput()}},_openHandler(){this._toggleOpenState()},_executeOpenAction(i){this._openOnFieldClickAction({event:i})},_keyboardEventBindingTarget(){return this._input()},_focusInput(){return this.option("disabled")?!1:(this.option("focusStateEnabled")&&!Tn(this._input())&&(this._resetCaretPosition(),_.trigger(this._input(),"focus")),!0)},_resetCaretPosition(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this._input().get(0);if(e){let{value:t}=e,n=f(t)&&(i||this._isEditable())?t.length:0;this._caret({start:n,end:n},!0)}},_isEditable(){return this.option("acceptCustomValue")},_toggleOpenState(i){this._focusInput()&&(this.option("readOnly")||(i=arguments.length?i:!this.option("opened"),this.option("opened",i)))},_getControlsAria(){return this._popup&&this._popupContentId},_renderOpenedState(){let i=this.option("opened");i&&this._createPopup(),this.$element().toggleClass(i9,i),this._setPopupOption("visible",i);let e={expanded:i,controls:this._getControlsAria()};this.setAria(e),this.setAria("owns",i?this._popupContentId:void 0,this.$element())},_createPopup(){this._$popup||(this._$popup=u("<div>").addClass(Lm).appendTo(this.$element()),this._renderPopup(),this._renderPopupContent(),this._setPopupAriaLabel())},_setPopupAriaLabel(){let i=this._popup.$overlayContent();this.setAria("label","Dropdown",i)},_renderPopupContent:E,_renderPopup(){let i=m(this._popupConfig(),this._options.cache("dropDownOptions"));delete i.closeOnOutsideClick,this._popup=this._createComponent(this._$popup,Oi,i),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._attachPopupKeyHandler(),this._contentReadyHandler(),this._setPopupContentId(this._popup.$content()),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_attachPopupKeyHandler(){_.on(this._popup.$overlayContent(),D("keydown",this.NAME),i=>this._popupKeyHandler(i))},_popupKeyHandler(i){switch(ke(i)){case"tab":this._popupTabHandler(i);break;case"escape":this._popupEscHandler(i)}},_popupTabHandler(i){let e=u(i.target),t=i.shiftKey&&e.is(this._getFirstPopupElement());(!i.shiftKey&&e.is(this._getLastPopupElement())||t)&&(_.trigger(this.field(),"focus"),i.preventDefault())},_popupEscHandler(){_.trigger(this._input(),"focus"),this.close()},_setPopupContentId(i){this._popupContentId=`dx-${new Ae}`,this.setAria("id",this._popupContentId,i)},_contentReadyHandler:E,_popupConfig(){return{onInitialized:this._getPopupInitializedHandler(),position:m(this.option("popupPosition"),{of:this.$element()}),showTitle:this.option("dropDownOptions.showTitle"),_ignoreFunctionValueDeprecation:!0,width:()=>Od(this.$element()),height:"auto",shading:!1,hideOnParentScroll:!0,hideOnOutsideClick:i=>this._closeOutsideDropDownHandler(i),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,_hideOnParentScrollTarget:this.$element(),_wrapperClassExternal:Lm,_ignorePreventScrollEventsDeprecation:!0}},_popupInitializedHandler:E,_getPopupInitializedHandler(){let i=this.option("onPopupInitialized");return e=>{this._popupInitializedHandler(e),i&&this._popupInitializedAction({popup:e.component})}},_dimensionChanged(){if(j()&&!this.$element().is(":visible")){this.close();return}this._updatePopupWidth()},_updatePopupWidth(){Ed(this.option("dropDownOptions.width"))===void 0&&this._setPopupOption("width",()=>Od(this.$element()))},_popupPositionedHandler(i){var e;let{labelMode:t,stylingMode:n}=this.option();if(!this._popup)return;let o=this._popup.$overlayContent(),s=(e=i.position)===null||e===void 0||(e=e.v)===null||e===void 0?void 0:e.flip,r=t!=="hidden"&&t!=="outside"&&n==="outlined";if(i.position&&o.toggleClass(t9,s),s&&r&&this._label.isVisible()){let a=this._label.$element();Ve(o,{top:Ti(o).top-parseInt(a.css("fontSize"))})}},_popupShowingHandler:E,_popupHidingHandler(){this.option("opened",!1)},_popupShownHandler(){var i;this._openAction(),(i=this._validationMessage)===null||i===void 0||i.option("positionSide",this._getValidationMessagePositionSide())},_popupHiddenHandler(){var i;this._closeAction(),(i=this._validationMessage)===null||i===void 0||i.option("positionSide",this._getValidationMessagePositionSide())},_getValidationMessagePositionSide(){let i=this.option("validationMessagePosition");if(i!=="auto")return i;let e="bottom";if(this._popup&&this._popup.option("visible")){let{top:t}=xt.setup(this.$element()),{top:n}=xt.setup(this._popup.$content());e=t+this.option("popupPosition").offset.v>n?"bottom":"top"}return e},_closeOutsideDropDownHandler(i){let{target:e}=i,t=u(e),n=this.getButton("dropDown"),o=n&&n.$element(),s=!!t.closest(this.$element()).length,r=!!t.closest(o).length;return!s&&!r},_clean(){delete this._openOnFieldClickAction,delete this._$templateWrapper,this._$popup&&(this._$popup.remove(),delete this._$popup,delete this._popup),this.callBase()},_setPopupOption(i,e){this._setWidgetOption("_popup",arguments)},_validatedOpening(){this.option("readOnly")||this._toggleOpenState(!0)},_getPopupToolbarItems(){return this.option("applyValueMode")==="useButtons"?this._popupToolbarItemsConfig():[]},_getFirstPopupElement(){return u(this._popup.getFocusableElements()).first()},_getLastPopupElement(){return u(this._popup.getFocusableElements()).last()},_popupToolbarItemsConfig(){let i=[{shortcut:"done",options:{onClick:this._applyButtonHandler.bind(this),text:this.option("applyButtonText")}},{shortcut:"cancel",options:{onClick:this._cancelButtonHandler.bind(this),text:this.option("cancelButtonText")}}];return this._applyButtonsLocation(i)},_applyButtonsLocation(i){let e=this.option("buttonsLocation"),t=i;if(e!=="default"){let n=es(e);x(t,(o,s)=>{m(s,{toolbar:n[0],location:n[1]})})}return t},_applyButtonHandler(){this.close(),this.option("focusStateEnabled")&&this.focus()},_cancelButtonHandler(){this.close(),this.option("focusStateEnabled")&&this.focus()},_popupOptionChanged(i){let e=at.getOptionsFromContainer(i);this._setPopupOption(e);let t=Object.keys(e);(t.includes("width")||t.includes("height"))&&this._dimensionChanged()},_renderSubmitElement(){this.option("useHiddenSubmitElement")&&(this._$submitElement=u("<input>").attr("type","hidden").appendTo(this.$element()))},_setSubmitValue(){this._getSubmitElement().val(this.option("value"))},_getSubmitElement(){return this.option("useHiddenSubmitElement")?this._$submitElement:this.callBase()},_dispose(){this._detachFocusOutEvents(),this.callBase()},_optionChanged(i){var e;switch(i.name){case"width":case"height":this.callBase(i),(e=this._popup)===null||e===void 0||e.repaint();break;case"opened":this._renderOpenedState();break;case"onOpened":case"onClosed":this._initVisibilityActions();break;case"onPopupInitialized":this._initPopupInitializedAction();break;case"fieldTemplate":case"acceptCustomValue":case"openOnFieldClick":this._invalidate();break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"dropDownOptions":this._popupOptionChanged(i),this._options.cache("dropDownOptions",this.option("dropDownOptions"));break;case"popupPosition":break;case"deferRendering":j()&&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(i.value),this.callBase(i);break;default:this.callBase(i)}},open(){this.option("opened",!0)},close(){this.option("opened",!1)},field(){return H(this._input())},content(){return this._popup?this._popup.content():null}});K("dxDropDownEditor",nB);var wd=nB;var oB=q();var s9=["startswith","contains","endwith","notcontains"],sB=F.real().platform!=="android",rB=wd.inherit({_supportedKeys(){let i=this.callBase();return m({},i,{tab(e){if(this._allowSelectItemByTab()){this._saveValueChangeEvent(e);let t=u(this._list.option("focusedElement"));t.length&&this._setSelectedElement(t)}i.tab.apply(this,arguments)},space:E,home:E,end:E})},_allowSelectItemByTab(){return this.option("opened")&&this.option("applyValueMode")==="instantly"},_setSelectedElement(i){let e=this._valueGetter(this._list._getItemData(i));this._setValue(e)},_setValue(i){this.option("value",i)},_getDefaultOptions(){return m(this.callBase(),m(Nu._dataExpressionDefaultOptions(),{displayValue:void 0,searchEnabled:!1,searchMode:"contains",searchTimeout:500,minSearchLength:0,searchExpr:null,valueChangeEvent:"input change keyup",selectedItem:null,noDataText:O.format("dxCollectionWidget-noDataText"),encodeNoDataText:!1,onSelectionChanged:null,onItemClick:E,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(){return this.callBase().concat([{device:{platform:"ios"},options:{popupPosition:{offset:{v:-1}}}},{device:{platform:"generic"},options:{buttonsLocation:"bottom center"}}])},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{value:!0,selectedItem:!0,displayValue:!0})},_init(){this.callBase(),this._initDataExpressions(),this._initActions(),this._setListDataSource(),this._validateSearchMode(),this._clearSelectedItem(),this._initItems()},_setListFocusedElementOptionChange(){this._list._updateParentActiveDescendant=this._updateActiveDescendant.bind(this)},_initItems(){let{items:i}=this.option();i&&!i.length&&this._dataSource&&(this.option().items=this._dataSource.items())},_initActions(){this._initContentReadyAction(),this._initSelectionChangedAction(),this._initItemClickAction()},_initContentReadyAction(){this._contentReadyAction=this._createActionByOption("onContentReady",{excludeValidators:["disabled","readOnly"]})},_initSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})},_initItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new Lr("item")})},_isEditable(){return this.callBase()||this.option("searchEnabled")},_saveFocusOnWidget(){this._list&&this._list.initialOption("focusStateEnabled")&&this._focusInput()},_fitIntoRange(i,e,t){return i>t?e:i<e?t:i},_items(){let i=this._getPlainItems(!this._list&&this._dataSource.items());return new Mt(i).filter("disabled","<>",!0).toArray()},_calcNextItem(i){let e=this._items(),t=this._fitIntoRange(this._getSelectedIndex()+i,0,e.length-1);return e[t]},_getSelectedIndex(){let i=this._items(),e=this.option("selectedItem"),t=-1;return x(i,(n,o)=>{if(this._isValueEquals(o,e))return t=n,!1}),t},_createPopup(){this.callBase(),this._updateCustomBoundaryContainer(),this._popup.$wrapper().addClass(this._popupWrapperClass());let i=this._popup.$content();_.off(i,"mouseup"),_.on(i,"mouseup",this._saveFocusOnWidget.bind(this))},_updateCustomBoundaryContainer(){let i=this.option("dropDownOptions.container"),e=i&&u(i);if(e&&e.length&&!Ue(e.get(0))){let t=[].slice.call(e.parents());t.unshift(e.get(0)),x(t,(n,o)=>{if(o===u("body").get(0))return!1;if(oB.getComputedStyle(o).overflowY==="hidden")return this._$customBoundaryContainer=u(o),!1})}},_popupWrapperClass:()=>"dx-dropdownlist-popup-wrapper",_renderInputValue(){var i=this;let{value:e,renderOnly:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e??this._getCurrentValue();return this._rejectValueLoading(),t?this.callBase(n):this._loadInputValue(n,function(){i._setSelectedItem(...arguments)}).always(this.callBase.bind(this,n))},_loadInputValue(i,e){return this._loadItem(i).always(e)},_getItemFromPlain(i,e){let t,n;return e&&typeof i!="object"&&(e.itemByValue||(e.itemByValue={},t=this._getPlainItems(),t.forEach(function(o){e.itemByValue[this._valueGetter(o)]=o},this)),n=e.itemByValue[i]),n||(t=this._getPlainItems(),n=At(t,o=>this._isValueEquals(this._valueGetter(o),i))[0]),n},_resetInputText(){this._renderInputValue({renderOnly:!0})},_loadItem(i,e){let t=this._getItemFromPlain(i,e);return t!==void 0?y().resolve(t).promise():this._loadValue(i)},_getPlainItems(i){let e=[];i=i||this.option("items")||this._dataSource.items()||[];for(let t=0;t<i.length;t++)i[t]&&i[t].items?e=e.concat(i[t].items):e.push(i[t]);return e},_updateActiveDescendant(i){var e;let t=this.option("opened"),n=(e=this._list)===null||e===void 0?void 0:e.getFocusedItemId(),o=u(`#${n}`).length>0,s=t&&o&&n;this.setAria({activedescendant:s||null},i)},_setSelectedItem(i){let e=this._displayValue(i);this.option("selectedItem",Be(i,null)),this.option("displayValue",e)},_displayValue(i){return this._displayGetter(i)},_refreshSelected(){let i={};this._listItemElements().each((e,t)=>{let n=u(t),o=this._valueGetter(n.data("dxListItemData"));this._isSelectedValue(o,i)?this._list.selectItem(n):this._list.unselectItem(n)})},_popupShownHandler(){this.callBase(),this._setFocusPolicy()},_setFocusPolicy(){!this.option("focusStateEnabled")||!this._list||this._list.option("focusedElement",null)},_isSelectedValue(i){return this._isValueEquals(i,this.option("value"))},_validateSearchMode(){let i=this.option("searchMode"),e=i.toLowerCase();if(!s9.includes(e))throw ie.Error("E1019",i)},_clearSelectedItem(){this.option("selectedItem",null)},_processDataSourceChanging(){this._initDataController(),this._setListOption("_dataController",this._dataController),this._setListDataSource(),this._renderInputValue().fail(()=>{this._isCustomValueAllowed()||this._clearSelectedItem()})},_isCustomValueAllowed(){return this.option("displayCustomValue")},clear(){this.callBase(),this._clearFilter(),this._clearSelectedItem()},_listItemElements(){return this._$list?this._$list.find(".dx-list-item"):u()},_popupConfig(){return m(this.callBase(),{templatesRenderAsynchronously:!1,autoResizeEnabled:!1,maxHeight:this._getMaxHeight.bind(this)})},_renderPopupContent(){this.callBase(),this._renderList()},_getKeyboardListeners(){let i=this._canListHaveFocus();return this.callBase().concat([!i&&this._list])},_renderList(){this._listId=`dx-${new Ae()._value}`;let i=u("<div>").attr("id",this._listId).appendTo(this._popup.$content());this._$list=i,this._list=this._createComponent(i,ys,this._listConfig()),this._refreshList(),this._renderPreventBlurOnListClick(),this._setListFocusedElementOptionChange()},_renderPreventBlurOnListClick(){let i=D("mousedown","dxDropDownList");_.off(this._$list,i),_.on(this._$list,i,e=>e.preventDefault())},_getControlsAria(){return this._list&&this._listId},_renderOpenedState(){this.callBase(),this._list&&this._updateActiveDescendant(),this.setAria("owns",this._popup&&this._popupContentId)},_getAriaHasPopup:()=>"listbox",_refreshList(){this._list&&this._shouldRefreshDataSource()&&this._setListDataSource()},_shouldRefreshDataSource(){return!!this._list.option("dataSource")!==this._needPassDataSourceToList()},_isDesktopDevice:()=>F.real().deviceType==="desktop",_listConfig(){let i={selectionMode:"single",_templates:this.option("_templates"),templateProvider:this.option("templateProvider"),noDataText:this.option("noDataText"),encodeNoDataText:this.option("encodeNoDataText"),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(),_dataController:this._dataController,hoverStateEnabled:this._isDesktopDevice()?this.option("hoverStateEnabled"):!1,focusStateEnabled:this._isDesktopDevice()?this.option("focusStateEnabled"):!1};return this._canListHaveFocus()||(i.tabIndex=null),i},_canListHaveFocus:()=>!1,_getDataSource(){return this._needPassDataSourceToList()?this._dataSource:null},_dataSourceOptions:()=>({paginate:!1}),_getGroupedOption(){return this.option("grouped")},_dataSourceFromUrlLoadMode:()=>"raw",_listContentReadyHandler(){this._list=this._list||this._$list.dxList("instance"),this.option("deferRendering")||this._refreshSelected(),this._updatePopupWidth(),this._updateListDimensions(),this._contentReadyAction()},_setListOption(i,e){this._setWidgetOption("_list",arguments)},_listItemClickAction(i){this._listItemClickHandler(i),this._itemClickAction(i)},_listItemClickHandler:E,_setListDataSource(){this._list&&(this._setListOption("dataSource",this._getDataSource()),this._needPassDataSourceToList()||this._setListOption("items",[]))},_needPassDataSourceToList(){return this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded()},_isMinSearchLengthExceeded(){return this._searchValue().toString().length>=this.option("minSearchLength")},_needClearFilter(){return this._canKeepDataSource()?!1:this._needPassDataSourceToList()},_canKeepDataSource(){let i=this._isMinSearchLengthExceeded();return this._dataController.isLoaded()&&this.option("showDataBeforeSearch")&&this.option("minSearchLength")&&!i&&!this._isLastMinSearchLengthExceeded},_searchValue(){return this._input().val()||""},_getSearchEvent(){return D("input",`${this.NAME}Search`)},_getCompositionStartEvent(){return D("compositionstart",`${this.NAME}CompositionStart`)},_getCompositionEndEvent(){return D("compositionend",`${this.NAME}CompositionEnd`)},_getSetFocusPolicyEvent(){return D("input",`${this.NAME}FocusPolicy`)},_renderEvents(){this.callBase(),_.on(this._input(),this._getSetFocusPolicyEvent(),()=>{this._setFocusPolicy()}),this._shouldRenderSearchEvent()&&(_.on(this._input(),this._getSearchEvent(),i=>{this._searchHandler(i)}),sB&&(_.on(this._input(),this._getCompositionStartEvent(),()=>{this._isTextCompositionInProgress(!0)}),_.on(this._input(),this._getCompositionEndEvent(),i=>{this._isTextCompositionInProgress(void 0),this._searchHandler(i,this._searchValue())})))},_shouldRenderSearchEvent(){return this.option("searchEnabled")},_refreshEvents(){_.off(this._input(),this._getSearchEvent()),_.off(this._input(),this._getSetFocusPolicyEvent()),sB&&(_.off(this._input(),this._getCompositionStartEvent()),_.off(this._input(),this._getCompositionEndEvent())),this.callBase()},_isTextCompositionInProgress(i){if(arguments.length)this._isTextComposition=i;else return this._isTextComposition},_searchHandler(i,e){if(this._isTextCompositionInProgress())return;if(!this._isMinSearchLengthExceeded()){this._searchCanceled();return}let t=this.option("searchTimeout");t?(this._clearSearchTimer(),this._searchTimer=setTimeout(()=>{this._searchDataSource(e)},t)):this._searchDataSource(e)},_searchCanceled(){this._clearSearchTimer(),this._needClearFilter()&&this._filterDataSource(null),this._refreshList()},_searchDataSource(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._searchValue();this._filterDataSource(i)},_filterDataSource(i){this._clearSearchTimer();let e=this._dataController;e.searchExpr(this.option("searchExpr")||this._displayGetterExpr()),e.searchOperation(this.option("searchMode")),e.searchValue(i),e.load().done(this._dataSourceFiltered.bind(this,i))},_clearFilter(){let i=this._dataController;i.searchValue()&&i.searchValue(null)},_dataSourceFiltered(){this._isLastMinSearchLengthExceeded=this._isMinSearchLengthExceeded(),this._refreshList(),this._refreshPopupVisibility()},_shouldOpenPopup(){return this._hasItemsToShow()},_refreshPopupVisibility(){if(this.option("readOnly")||!this._searchValue())return;let i=this._shouldOpenPopup();i&&!this._isFocused()||(this.option("opened",i),i&&(this._updatePopupWidth(),this._updateListDimensions()))},_dataSourceChangedHandler(i){this._dataController.pageIndex()===0?this.option().items=i:this.option().items=this.option().items.concat(i)},_hasItemsToShow(){let t=(this._dataController.items()||[]).length;return!!(this._needPassDataSourceToList()&&t)},_clearSearchTimer(){clearTimeout(this._searchTimer),delete this._searchTimer},_popupShowingHandler(){this._updatePopupWidth(),this._updateListDimensions()},_dimensionChanged(){this.callBase(),this._updateListDimensions()},_needPopupRepaint(){let i=this._dataController,e=i.pageIndex(),t=f(this._pageIndex)&&e<=this._pageIndex||i.isLastPage()&&!this._list._scrollViewIsFull();return this._pageIndex=e,t},_updateListDimensions(){this._popup&&(this._needPopupRepaint()&&this._popup.repaint(),this._list&&this._list.updateDimensions())},_getMaxHeight(){let i=this.$element(),e=this._$customBoundaryContainer,t=i.offset().top-(e?e.offset().top:0),n=ee(oB),o=e?Math.min(ee(e),n):n,s=Math.max(t,o-t-ee(i));return Math.min(.5*o,s)},_clean(){this._list&&delete this._list,delete this._isLastMinSearchLengthExceeded,this.callBase()},_dispose(){this._clearSearchTimer(),this.callBase()},_setCollectionWidgetOption(){this._setListOption.apply(this,arguments)},_setSubmitValue(){let i=this.option("value"),e=this._shouldUseDisplayValue(i)?this._displayGetter(i):i;this._getSubmitElement().val(e)},_shouldUseDisplayValue(i){return this.option("valueExpr")==="this"&&z(i)},_optionChanged(i){switch(this._dataExpressionOptionChanged(i),i.name){case"hoverStateEnabled":case"focusStateEnabled":this._isDesktopDevice()&&this._setListOption(i.name,i.value),this.callBase(i);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"encodeNoDataText":case"useItemTextAsTitle":this._setListOption(i.name);break;case"displayValue":this.option("text",i.value);break;case"itemTemplate":case"searchTimeout":break;case"selectedItem":i.previousValue!==i.value&&this._selectionChangedAction({selectedItem:i.value});break;default:this.callBase(i)}}}).include(Nu,ym);K("dxDropDownList",rB);var aB=rB;var lB=aB;var dB=lB.inherit({_supportedKeys(){let i=this,e=this.callBase(),t=function(o){this._isEditable()?this._valueSubstituted()&&(this._preventFiltering=!0):this.option("showClearButton")&&(o.preventDefault(),this.clear()),this._savedTextRemoveEvent=o,this._preventSubstitution=!0},n=function(){i.option("searchEnabled")&&i._valueSubstituted()&&i._searchHandler()};return m({},e,{tab(){let{opened:o}=this.option(),s=o&&!!this._popup.getFocusableElements().length;s||this._resetCaretPosition(!0),e.tab&&e.tab.apply(this,arguments),s||this._cancelSearchIfNeed()},upArrow(o){if(e.upArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(o),!0},downArrow(o){if(e.downArrow.apply(this,arguments))return this.option("opened")||this._setNextValue(o),!0},leftArrow(){var o;n(),(o=e.leftArrow)===null||o===void 0||o.apply(this,arguments)},rightArrow(){n(),e.rightArrow&&e.rightArrow.apply(this,arguments)},home(){n(),e.home&&e.home.apply(this,arguments)},end(){n(),e.end&&e.end.apply(this,arguments)},escape(){let o=e.escape&&e.escape.apply(this,arguments);return this._cancelEditing(),o??!0},enter(o){let s=this.option("opened"),r=this._input().val().trim(),a=r&&this._list&&!this._list.option("focusedElement");if(!r&&f(this.option("value"))&&this.option("allowClearing"))this._saveValueChangeEvent(o),this.option({selectedItem:null,value:null}),this.close();else{if(this.option("acceptCustomValue"))return o.preventDefault(),a&&(s&&this._toggleOpenState(),this._valueChangeEventHandler(o)),s;if(e.enter&&e.enter.apply(this,arguments))return s}},space(o){let s=this.option("opened"),r=this.option("searchEnabled"),a=this.option("acceptCustomValue");if(!(!s||r||a))return o.preventDefault(),this._valueChangeEventHandler(o),!0},backspace:t,del:t})},_getDefaultOptions(){return m(this.callBase(),{placeholder:O.format("Select"),fieldTemplate:null,customItemCreateEvent:"change",valueChangeEvent:"change",acceptCustomValue:!1,onCustomItemCreating(i){f(i.customItem)||(i.customItem=i.text)},showSelectionControls:!1,allowClearing:!0,tooltipEnabled:!1,openOnFieldClick:!0,showDropDownButton:!0,displayCustomValue:!1,useHiddenSubmitElement:!0})},_init(){this.callBase(),this._initCustomItemCreatingAction()},_initMarkup(){this.$element().addClass("dx-selectbox"),this._renderTooltip(),this.callBase(),this._$container.addClass("dx-selectbox-container")},_createPopup(){this.callBase(),this._popup.$element().addClass("dx-selectbox-popup"),this._popup.$overlayContent().attr("tabindex",-1)},_popupWrapperClass(){return`${this.callBase()} dx-selectbox-popup-wrapper`},_setDeprecatedOptions(){this.callBase(),m(this._deprecatedOptions,{valueChangeEvent:{since:"22.2",alias:"customItemCreateEvent"}})},_cancelEditing(){!this.option("searchEnabled")&&this._list&&(this._focusListElement(null),this._updateField(this.option("selectedItem")))},_renderOpenedState(){this.callBase(),this.option("opened")&&(this._scrollToSelectedItem(),this._focusSelectedElement())},_focusSelectedElement(){if(!this._searchValue()){this._focusListElement(null);return}let{items:e,selectedItem:t}=this.option(),n=this._list._itemElements(),o=e?.indexOf(t)??-1,s=o!==-1&&!this._isCustomItemSelected()?n.eq(o):null;this._focusListElement(s)},_renderFocusedElement(){if(!this._list)return;if(!this._searchValue()||this.option("acceptCustomValue")){this._focusListElement(null);return}let t=this._list._itemElements().not(".dx-state-disabled").eq(0);this._focusListElement(t)},_focusListElement(i){this._preventInputValueRender=!0,this._list.option("focusedElement",H(i)),delete this._preventInputValueRender},_scrollToSelectedItem(){this._list&&this._list.scrollToItem(this._list.option("selectedItem"))},_listContentReadyHandler(){this.callBase(),!(this._dataController.paginate()&&this._needPopupRepaint())&&this._scrollToSelectedItem()},_renderValue(){return this._renderInputValue(),this._setSubmitValue(),y().resolve()},_renderInputValue(){return this.callBase(...arguments).always(()=>{this._renderInputValueAsync()})},_renderInputValueAsync(){this._renderTooltip(),this._renderInputValueImpl().always(()=>{this._refreshSelected()})},_renderInputValueImpl(){return this._renderField(),y().resolve()},_setNextItem(i){let e=this._calcNextItem(i),t=this._valueGetter(e);this._setValue(t)},_setNextValue(i){(this._dataController.isLoaded()?y().resolve():this._dataController.load()).done(()=>{let t=this._getSelectedIndex(),n=this._dataController.pageSize(),o=this._dataController.isLastPage(),s=t===this._items().length-1;this._saveValueChangeEvent(i);let r=ke(i)==="downArrow"?1:-1;n&&!o&&s&&r>0?(this._popup||this._createPopup(),this._dataController.isLoading()||this._list._loadNextPage().done(this._setNextItem.bind(this,r))):this._setNextItem(r)})},_setSelectedItem(i){let e=!this._isCustomValueAllowed()&&i===void 0;this.callBase(e?null:i),!e&&(!this._isEditable()||this._isCustomItemSelected())&&this._setListOption("selectedItem",this.option("selectedItem"))},_isCustomValueAllowed(){return this.option("acceptCustomValue")||this.callBase()},_displayValue(i){return i=!f(i)&&this._isCustomValueAllowed()?this.option("value"):i,this.callBase(i)},_listConfig(){let i=m(this.callBase(),{pageLoadMode:"scrollBottom",onSelectionChanged:this._getSelectionChangeHandler(),selectedItem:this.option("selectedItem"),onFocusedItemChanged:this._listFocusedItemChangeHandler.bind(this)});return this.option("showSelectionControls")&&m(i,{showSelectionControls:!0,selectByClick:!0}),i},_listFocusedItemChangeHandler(i){if(this._preventInputValueRender)return;let e=i.component,t=u(e.option("focusedElement")),n=e._getItemData(t);this._updateField(n)},_updateField(i){if(!(this._getTemplateByOption("fieldTemplate")&&this.option("fieldTemplate"))){let t=this._displayGetter(i);this.option("text",t),this._renderDisplayText(t);return}this._renderField()},_getSelectionChangeHandler(){return this.option("showSelectionControls")?this._selectionChangeHandler.bind(this):E},_selectionChangeHandler(i){x(i.addedItems||[],(e,t)=>{this._setValue(this._valueGetter(t))})},_getActualSearchValue(){return this._dataController.searchValue()},_isInlineAutocompleteEnabled(){return this.option("searchEnabled")&&!this.option("acceptCustomValue")&&this.option("searchMode")==="startswith"},_getAriaAutocomplete(){let{disabled:i,readOnly:e,searchEnabled:t}=this.option();return t&&!(e||i)?this._isInlineAutocompleteEnabled()?"both":"list":"none"},_toggleOpenState(i){if(!this.option("disabled")){if(i=arguments.length?i:!this.option("opened"),!i&&!this._shouldClearFilter()&&this._restoreInputText(!0),this._wasSearch()&&i)if(this._wasSearch(!1),(this.option("showDataBeforeSearch")||this._isMinSearchLengthExceeded())&&this._dataController.getDataSource()){if(this._searchTimer)return;let t=this._getActualSearchValue();t&&this._wasSearch(!0),this._filterDataSource(t||null)}else this._setListOption("items",[]);i&&this._scrollToSelectedItem(),this.callBase(i)}},_renderTooltip(){this.option("tooltipEnabled")&&this.$element().attr("title",this.option("displayValue"))},_renderDimensions(){this.callBase(),this._updatePopupWidth(),this._updateListDimensions()},_isValueEqualInputText(){let i=this.option("selectedItem");if(i===null)return!1;let e=this._displayGetter(i),t=e?String(e):"",n=this._searchValue();return t===n},_popupHidingHandler(){this._isValueEqualInputText()&&this._cancelEditing(),this.callBase()},_popupHiddenHandler(){this.callBase(),this._shouldCancelSearch()&&(this._wasSearch(!1),this._searchCanceled(),this._shouldCancelSearch(!1))},_restoreInputText(i){this.option("readOnly")||this._loadItemDeferred&&this._loadItemDeferred.always(()=>{let{acceptCustomValue:e,text:t,selectedItem:n}=this.option();if(e){!i&&!this._isValueChanging&&(this._updateField(n??this._createCustomItem(t)),this._clearFilter());return}if(this.option("searchEnabled")&&!this._searchValue()&&this.option("allowClearing")){this._clearTextValue();return}this._isValueEqualInputText()||this._renderInputValue().always(o=>{let s=Be(o,n);this._setSelectedItem(s),this._updateField(s),this._clearFilter()})})},_valueChangeEventIncludesBlur(){return this.option(this._getValueChangeEventOptionName()).includes("blur")},_isPreventedFocusOutEvent(i){return this._preventNestedFocusEvent(i)||this._valueChangeEventIncludesBlur()},_focusOutHandler(i){this._isPreventedFocusOutEvent(i)||(this._isOverlayNestedTarget(i.relatedTarget)||(this._restoreInputText(),this._clearSearchTimer()),this._cancelSearchIfNeed(i)),i.target=this._input().get(0),this.callBase(i)},_cancelSearchIfNeed(i){let{searchEnabled:e}=this.option(),t=this._isOverlayNestedTarget(i?.relatedTarget);if(this._wasSearch()&&e&&!t){var o;let s=(o=this._popup)===null||o===void 0?void 0:o._hideAnimationProcessing;this._clearSearchTimer(),s?this._shouldCancelSearch(!0):(this._wasSearch(!1),this._searchCanceled())}},_shouldCancelSearch(i){if(!arguments.length)return this._shouldCancelSearchValue;this._shouldCancelSearchValue=i},_isOverlayNestedTarget:i=>!!u(i).closest(".dx-selectbox-popup-wrapper").length,_clearTextValue(){let i=this.option("selectedItem"),e=this._displayGetter(i);i&&e!==""&&(this._savedTextRemoveEvent&&this._saveValueChangeEvent(this._savedTextRemoveEvent),this.option("value",null)),delete this._savedTextRemoveEvent},_shouldOpenPopup(){return this._needPassDataSourceToList()&&this._wasSearch()},_isFocused(){let i=S.getActiveElement(this.element());return this.callBase()&&u(i).closest(this._input()).length>0},_getValueChangeEventOptionName:()=>"customItemCreateEvent",_renderValueChangeEvent(){this._isEditable()&&this.callBase()},_fieldRenderData(){let i=this._list&&this.option("opened")&&u(this._list.option("focusedElement"));return i&&i.length?this._list._getItemData(i):this.option("selectedItem")},_isSelectedValue(i){return this._isValueEquals(i,this.option("value"))},_shouldCloseOnItemClick(){return!(this.option("showSelectionControls")&&this.option("selectionMode")!=="single")},_listItemClickHandler(i){let e=this._getCurrentValue();this._focusListElement(u(i.itemElement)),this._saveValueChangeEvent(i.event),this._completeSelection(this._valueGetter(i.itemData)),this._shouldCloseOnItemClick()&&this.option("opened",!1),this.option("searchEnabled")&&e===this._valueGetter(i.itemData)&&this._updateField(i.itemData),this._shouldClearFilter()&&this._cancelSearchIfNeed()},_shouldClearFilter(){return this._wasSearch()},_completeSelection(i){this._setValue(i)},_loadItem(i,e){let t=this,n=y();return this.callBase(i,e).done(o=>{n.resolve(o)}).fail(o=>{if(o!=null&&o.shouldSkipCallback)return;let s=t.option("selectedItem");t.option("acceptCustomValue")&&i===t._valueGetter(s)?n.resolve(s):n.reject()}),n.promise()},_loadInputValue(i,e){return this._loadItemDeferred=this._loadItem(i).always(e),this._loadItemDeferred},_isCustomItemSelected(){let i=this.option("selectedItem"),e=this._searchValue(),t=this._displayGetter(i);return!t||e!==t.toString()},_valueChangeEventHandler(i){this.option("acceptCustomValue")&&this._isCustomItemSelected()&&!this._isValueChanging&&(this._isValueChanging=!0,this._customItemAddedHandler(i))},_initCustomItemCreatingAction(){this._customItemCreatingAction=this._createActionByOption("onCustomItemCreating")},_createCustomItem(i){let e={text:i},t=this._customItemCreatingAction(e),n=Be(t,e.customItem);return f(t)&&me.log("W0015","onCustomItemCreating","customItem"),n},_customItemAddedHandler(i){let e=this._searchValue(),t=this._createCustomItem(e);if(this._saveValueChangeEvent(i),t===void 0)throw this._renderValue(),me.Error("E0121");Zo(t)?Et(t).done(this._setCustomItem.bind(this)).fail(this._setCustomItem.bind(this,null)):this._setCustomItem(t)},_setCustomItem(i){this._disposed||(i=i||null,this.option("selectedItem",i),this._cancelSearchIfNeed(),this._setValue(this._valueGetter(i)),this._renderDisplayText(this._displayGetter(i)),this._isValueChanging=!1)},_clearValueHandler(i){return this._preventFiltering=!0,this.callBase(i),this._searchCanceled(),!1},_wasSearch(i){if(!arguments.length)return!!this._wasSearchValue;this._wasSearchValue=i},_searchHandler(){if(this._preventFiltering){delete this._preventFiltering;return}this._needPassDataSourceToList()&&this._wasSearch(!0),this.callBase(arguments)},_dataSourceFiltered(i){this.callBase(),i!==null&&(this._renderInputSubstitution(),this._renderFocusedElement())},_valueSubstituted(){let i=this._input().get(0),e=this._searchValue().length,t=i.selectionStart===0&&i.selectionEnd===e,n=i.selectionStart!==i.selectionEnd,o=e===i.selectionEnd;return this._wasSearch()&&n&&!t&&o&&this._shouldSubstitutionBeRendered()},_shouldSubstitutionBeRendered(){return!this._preventSubstitution&&this._isInlineAutocompleteEnabled()},_renderInputSubstitution(){if(!this._shouldSubstitutionBeRendered()){delete this._preventSubstitution;return}let i=this._list&&this._getPlainItems(this._list.option("items"))[0];if(!i)return;let e=this._input(),t=e.val().length;if(t===0)return;let n=e.get(0),o=this._displayGetter(i).toString();n.value=o,this._caret({start:t,end:o.length})},_dispose(){this._renderInputValueAsync=E,delete this._loadItemDeferred,this.callBase()},_optionChanged(i){switch(i.name){case"customItemCreateEvent":this._refreshValueChangeEvent(),this._refreshFocusEvent(),this._refreshEvents();break;case"onCustomItemCreating":this._initCustomItemCreatingAction();break;case"tooltipEnabled":this._renderTooltip();break;case"readOnly":case"disabled":case"searchMode":this.callBase(i),this._setDefaultAria();break;case"displayCustomValue":case"acceptCustomValue":case"showSelectionControls":this._invalidate();break;case"allowClearing":break;default:this.callBase(i)}}});K("dxSelectBox",dB);var cB=dB;var Nm=cB;var r9="dxSwipeable";var a9={onStart:xm,onUpdated:vm,onEnd:md,onCancel:"dxswipecancel"};var uB=pn.inherit({_getDefaultOptions:function(){return m(this.callBase(),{elastic:!0,immediate:!1,immediateTimeout:180,direction:"horizontal",itemSizeFunc:null,onStart:null,onUpdated:null,onEnd:null,onCancel:null})},_render:function(){this.callBase(),this.$element().addClass("dx-swipeable"),this._attachEventHandlers()},_attachEventHandlers:function(){if(this._detachEventHandlers(),this.option("disabled"))return;let i=this.NAME;this._createEventData(),x(a9,function(e,t){let n=this._createActionByOption(e,{context:this});t=D(t,i),_.on(this.$element(),t,this._eventData,function(o){return n({event:o})})}.bind(this))},_createEventData:function(){this._eventData={elastic:this.option("elastic"),itemSizeFunc:this.option("itemSizeFunc"),direction:this.option("direction"),immediate:this.option("immediate"),immediateTimeout:this.option("immediateTimeout")}},_detachEventHandlers:function(){_.off(this.$element(),".dxSwipeable")},_optionChanged:function(i){switch(i.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(i)}},_useTemplates:function(){return!1}});kr(uB,r9);var dr=uB;var dO=class{constructor(e){this.calendar=e}dateOption(e){return this.calendar._dateOption(e)}dateValue(e,t){this.calendar._dateValue(e,t)}skipNavigate(){this.calendar._skipNavigate=!0}updateAriaSelected(e,t){this.calendar._updateAriaSelected(e,t),e[0]&&this.calendar.option("currentDate").getTime()===e[0].getTime()&&this.calendar._updateAriaId(e[0])}processValueChanged(e,t){var n,o;f(e)&&!Array.isArray(e)&&(e=[e]),f(t)&&!Array.isArray(t)&&(t=[t]),e=((n=e)===null||n===void 0?void 0:n.map(s=>this._convertToDate(s)))||[],t=((o=t)===null||o===void 0?void 0:o.map(s=>this._convertToDate(s)))||[],this._updateViewsValue(e),this.updateAriaSelected(e,t),this._currentDateChanged||this.calendar._initCurrentDate(),this._currentDateChanged=!1}_isDateDisabled(e){let t=this.calendar._dateOption("min"),n=this.calendar._dateOption("max"),o=f(t)&&e<t&&!Y.sameDate(t,e),s=f(n)&&e>n&&!Y.sameDate(n,e);return this.calendar._view.isDateDisabled(e)||o||s}_getLowestDateInArray(e){if(e.length)return new Date(Math.min(...e))}_convertToDate(e){return this.calendar._convertToDate(e)}_isMaxZoomLevel(){return this.calendar._isMaxZoomLevel()}_updateViewsOption(e,t){this.calendar._updateViewsOption(e,t)}_updateViewsValue(e){this._updateViewsOption("value",e)}_updateCurrentDate(e){this.calendar.option("currentDate",e??new Date)}_shouldHandleWeekNumberClick(){let{selectionMode:e,selectWeekOnClick:t}=this.calendar.option();return t&&e!=="single"}},Sd=dO;var cO=class extends Sd{constructor(e){super(e),this.NAME="MultiSelection"}getViewOptions(){return{value:this.dateOption("value"),range:[],selectionMode:"multiple",onWeekNumberClick:this._shouldHandleWeekNumberClick()?this._weekNumberClickHandler.bind(this):null}}selectValue(e,t){let n=[...this.dateOption("value")],o=n.findIndex(s=>s?.toDateString()===e.toDateString());o>-1?n.splice(o,1):n.push(e),this.skipNavigate(),this._updateCurrentDate(e),this._currentDateChanged=!0,this.dateValue(n,t)}updateAriaSelected(e,t){e??(e=this.dateOption("value")),t??(t=[]),super.updateAriaSelected(e,t)}getDefaultCurrentDate(){let e=this.dateOption("value").filter(t=>t);return this._getLowestDateInArray(e)}restoreValue(){this.calendar.option("value",[])}_weekNumberClickHandler(e){let{rowDates:t,event:n}=e,o=t.filter(s=>!this._isDateDisabled(s));this.dateValue(o,n)}},hB=cO;var uO=class extends Wg{_getDefaultOptions(){return I({},super._getDefaultOptions(),{onClick:void 0,onCaptionClick:void 0,type:"normal",stylingMode:"outlined",text:""})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device:()=>ht(),options:{type:"default",stylingMode:"text"}},{device:()=>Ot(),options:{type:"normal",stylingMode:"text"}}])}_init(){super._init(),this._initActions()}_initActions(){this._clickAction=this._createActionByOption("onClick"),this._captionClickAction=this._createActionByOption("onCaptionClick")}_initMarkup(){super._initMarkup(),u(this.element()).addClass("dx-calendar-navigator"),this._renderButtons(),this._renderCaption()}_renderButtons(){let{rtlEnabled:e,type:t,stylingMode:n,focusStateEnabled:o}=this.option();this._prevButton=this._createComponent(u("<div>"),_t,{focusStateEnabled:o,icon:e?"chevronright":"chevronleft",onClick:l=>{this._clickAction({direction:-1,event:l})},type:t,stylingMode:n,integrationOptions:{}});let s=u(this._prevButton.element()).addClass("dx-calendar-navigator-previous-view").addClass("dx-calendar-navigator-previous-month");this._nextButton=this._createComponent(u("<div>"),_t,{focusStateEnabled:o,icon:e?"chevronleft":"chevronright",onClick:l=>{this._clickAction({direction:1,event:l})},type:t,stylingMode:n,integrationOptions:{}});let r=u(this._nextButton.element()).addClass("dx-calendar-navigator-next-view").addClass("dx-calendar-navigator-next-month");this._caption=this._createComponent(u("<div>").addClass("dx-calendar-caption-button"),_t,{focusStateEnabled:o,onClick:l=>{this._captionClickAction({event:l})},type:t,stylingMode:n,template:(l,d)=>{let{text:c}=this.option();c.split(" - ").forEach(p=>{u(d).append(u("<span>").addClass("dx-button-text").text(p))})},integrationOptions:{}});let a=this._caption.$element();this.$element().append(s,a,r)}_renderCaption(){var e;(e=this._caption)===null||e===void 0||e.option("text",this.option("text"))}toggleButton(e,t){let n=`_${e}Button`,o=this[n];o&&(o.option("disabled",t),o.$element().toggleClass("dx-calendar-disabled-navigator-link",t))}_optionChanged(e){e.name==="text"?this._renderCaption():super._optionChanged(e)}},pB=uO;var hO=class extends Sd{constructor(e){super(e),this.NAME="RangeSelection"}getViewOptions(){let e=this._getValue(),t=this._getDaysInRange(e[0],e[1]);return{value:e,range:t,selectionMode:"range",onCellHover:this._cellHoverHandler.bind(this),onWeekNumberClick:this._shouldHandleWeekNumberClick()?this._weekNumberClickHandler.bind(this):null}}selectValue(e,t){let[n,o]=this._getValue();this.skipNavigate(),this._updateCurrentDate(e),this._currentDateChanged=!0,this.calendar.option("_allowChangeSelectionOrder")===!0?(this.calendar._valueSelected=!0,this.calendar.option("_currentSelection")==="startDate"?this.calendar._convertToDate(e)>this.calendar._convertToDate(o)?this.dateValue([e,null],t):this.dateValue([e,o],t):this.calendar._convertToDate(e)>=this.calendar._convertToDate(n)?this.dateValue([n,e],t):this.dateValue([e,null],t)):!n||o?this.dateValue([e,null],t):this.dateValue(n<e?[n,e]:[e,n],t)}updateAriaSelected(e,t){e??(e=this._getValue()),t??(t=[]),super.updateAriaSelected(e,t)}processValueChanged(e,t){super.processValueChanged(e,t);let n=this._getRange();this._updateViewsOption("range",n)}getDefaultCurrentDate(){let{_allowChangeSelectionOrder:e,_currentSelection:t}=this.calendar.option(),n=this.dateOption("value");if(e){if(t==="startDate"&&n[0])return n[0];if(t==="endDate"&&n[1])return n[1]}let o=n.filter(s=>s);return this._getLowestDateInArray(o)}restoreValue(){this.calendar.option("value",[null,null])}_getValue(){let e=this.dateOption("value");if(!e.length)return e;let[t,n]=e;return t&&n&&t>n&&([t,n]=[n,t]),[t,n]}_getRange(){let[e,t]=this._getValue();return this._getDaysInRange(e,t)}_getDaysInRange(e,t){if(!e||!t)return[];let{currentDate:n,viewsCount:o}=this.calendar.option(),s=this.calendar._isAdditionalViewDate(n),r=Y.getFirstMonthDate(n,s?-2:-1),a=Y.getLastMonthDate(n,s?1:o),l=new Date(Math.max(r,e)),d=new Date(Math.min(a,t));return[...Y.getDatesOfInterval(l,d,864e5),d]}_cellHoverHandler(e){let t=this._isMaxZoomLevel(),[n,o]=this._getValue(),{_allowChangeSelectionOrder:s,_currentSelection:r}=this.calendar.option();if(t){if(n&&!o&&!(s&&r==="startDate")){if(e.value>n){this._updateViewsOption("hoveredRange",this._getDaysInRange(n,e.value));return}}else if(!n&&o&&!(s&&r==="endDate")){if(e.value<o){this._updateViewsOption("hoveredRange",this._getDaysInRange(e.value,o));return}}else if(n&&o){if(r==="startDate"&&e.value<n){this._updateViewsOption("hoveredRange",this._getDaysInRange(e.value,n));return}if(r==="endDate"&&e.value>o){this._updateViewsOption("hoveredRange",this._getDaysInRange(o,e.value));return}}this._updateViewsOption("hoveredRange",[])}}_weekNumberClickHandler(e){let{rowDates:t,event:n}=e,o=t.filter(r=>!this._isDateDisabled(r)),s=o.length?[o[0],o[o.length-1]]:[null,null];this.dateValue(s,n)}},gB=hO;var pO=class extends Sd{constructor(e){super(e),this.NAME="SingleSelection"}getViewOptions(){return{value:this.dateOption("value"),range:[],selectionMode:"single"}}selectValue(e,t){this.skipNavigate(),this.dateValue(e,t)}updateAriaSelected(e,t){e??(e=[this.dateOption("value")]),t??(t=[]),super.updateAriaSelected(e,t)}getDefaultCurrentDate(){let e=this.dateOption("value");return e===""?new Date:e}restoreValue(){this.calendar.option("value",null)}_updateViewsValue(e){this._updateViewsOption("value",e[0])}},mB=pO;var{abstract:Os}=at;var fB="td:not(.dx-calendar-week-number-cell)",gO=D(de,"dxCalendar"),_B=D(Nr,"dxCalendar");var l9={month:O.format("dxCalendar-currentDay"),year:O.format("dxCalendar-currentMonth"),decade:O.format("dxCalendar-currentYear"),century:O.format("dxCalendar-currentYearRange")};var Ua={single:"single",multiple:"multiple",range:"range"},d9=at.inherit({_getViewName:()=>"base",_getDefaultOptions(){return m(this.callBase(),{date:new Date,focusStateEnabled:!1,cellTemplate:null,disabledDates:null,onCellClick:null,onCellHover:null,onWeekNumberClick:null,rowCount:3,colCount:4,allowValueSelection:!0,_todayDate:()=>new Date})},_initMarkup(){this.callBase(),this._renderImpl()},_renderImpl(){this.$element().append(this._createTable()),this._createDisabledDatesHandler(),this._renderBody(),this._renderContouredDate(),this._renderValue(),this._renderRange(),this._renderEvents(),this._updateTableAriaLabel()},_getLocalizedWidgetName(){return O.format("dxCalendar-ariaWidgetName")},_getSingleModeAriaLabel(){let{value:i}=this.option(),e=this._getLocalizedWidgetName(),t=he.format(i,"date"),n=O.format("dxCalendar-selectedDate",t);return`${e}. ${n}`},_getRangeModeAriaLabel(){let{value:i}=this.option(),e=this._getLocalizedWidgetName(),[t,n]=i,o=he.format(t,"date"),s=he.format(n,"date"),r=t&&n?O.format("dxCalendar-selectedDateRange",o,s):O.format("dxCalendar-selectedDate",o??s);return`${e}. ${r}`},_getMultipleModeAriaLabel(){return this._getLocalizedWidgetName()},_getTableAriaLabel(){let{value:i,selectionMode:e}=this.option();if(!i||Array.isArray(i)&&!i.filter(Boolean).length)return this._getLocalizedWidgetName();switch(e){case Ua.single:return this._getSingleModeAriaLabel();case Ua.range:return this._getRangeModeAriaLabel();case Ua.multiple:return this._getMultipleModeAriaLabel()}},_updateTableAriaLabel(){let i=this._getTableAriaLabel();this.setAria({label:i},this._$table)},_createTable(){return this._$table=u("<table>"),this.setAria({role:"grid"},this._$table),this._$table},_renderBody(){this.$body=u("<tbody>").appendTo(this._$table);let i={cellDate:this._getFirstCellData(),prevCellDate:null};for(let e=0,t=this.option("rowCount");e<t;e++){i.row=this._createRow();for(let n=0,o=this.option("colCount");n<o;n++)this._renderCell(i,n);this._renderWeekNumberCell(i)}},_createRow(){let i=S.createElement("tr");return this.setAria("role","row",u(i)),this.$body.get(0).appendChild(i),i},_createCell(i,e){let t=S.createElement("td"),n=u(t);return t.className=this._getClassNameByDate(i,e),t.setAttribute("data-value",ut.serializeDate(i,Y.getShortDateFormat())),Xe(t,"dxDateValueKey",i),this.setAria({role:"gridcell",selected:!1,label:this.getCellAriaLabel(i)},n),{cell:t,$cell:n}},_renderCell(i,e){let{cellDate:t,prevCellDate:n,row:o}=i;n&&Y.fixTimezoneGap(n,t),i.prevCellDate=t;let{cell:s,$cell:r}=this._createCell(t,e),a=this.option("cellTemplate");u(o).append(s),a?a.render(this._prepareCellTemplateData(t,e,r)):s.innerHTML=this._getCellText(t),i.cellDate=this._getNextCellData(t)},_getClassNameByDate(i,e){let t="dx-calendar-cell";return this._isTodayCell(i)&&(t+=" dx-calendar-today"),(this._isDateOutOfRange(i)||this.isDateDisabled(i))&&(t+=" dx-calendar-empty-cell"),this._isOtherView(i)&&(t+=" dx-calendar-other-view"),this.option("selectionMode")===Ua.range&&(e===0&&(t+=" dx-calendar-cell-start-in-row"),e===this.option("colCount")-1&&(t+=" dx-calendar-cell-end-in-row"),this._isStartDayOfMonth(i)&&(t+=" dx-calendar-cell-start"),this._isEndDayOfMonth(i)&&(t+=" dx-calendar-cell-end")),t},_prepareCellTemplateData(i,e,t){let n=i instanceof Date,o=n?this._getCellText(i):i,s=n?i:void 0,r=this._getViewName();return{model:{text:o,date:s,view:r},container:H(t),index:e}},_renderEvents(){this._createCellClickAction(),_.off(this._$table,gO),_.on(this._$table,gO,fB,e=>{u(e.currentTarget).hasClass("dx-calendar-empty-cell")||this._cellClickAction({event:e,value:u(e.currentTarget).data("dxDateValueKey")})});let{selectionMode:i}=this.option();_.off(this._$table,_B),i===Ua.range&&(this._createCellHoverAction(),_.on(this._$table,_B,fB,e=>{u(e.currentTarget).hasClass("dx-calendar-empty-cell")||this._cellHoverAction({event:e,value:u(e.currentTarget).data("dxDateValueKey")})})),i!==Ua.single&&(this._createWeekNumberCellClickAction(),_.on(this._$table,gO,".dx-calendar-week-number-cell",e=>{let t=u(e.currentTarget).closest("tr"),n=t.find(".dx-calendar-cell").first().data("dxDateValueKey"),o=t.find(".dx-calendar-cell").last().data("dxDateValueKey"),s=[...Y.getDatesOfInterval(n,o,864e5),o];this._weekNumberCellClickAction({event:e,rowDates:s})}))},_createCellClickAction(){this._cellClickAction=this._createActionByOption("onCellClick")},_createCellHoverAction(){this._cellHoverAction=this._createActionByOption("onCellHover")},_createWeekNumberCellClickAction(){this._weekNumberCellClickAction=this._createActionByOption("onWeekNumberClick")},_createDisabledDatesHandler(){let i=this.option("disabledDates");this._disabledDatesHandler=Array.isArray(i)?this._getDefaultDisabledDatesHandler(i):i||E},_getDefaultDisabledDatesHandler:()=>E,_isTodayCell:Os,_isDateOutOfRange:Os,isDateDisabled(i){let e={date:i,view:this._getViewName()};return this._disabledDatesHandler(e)},_isOtherView:Os,_isStartDayOfMonth:Os,_isEndDayOfMonth:Os,_getCellText:Os,_getFirstCellData:Os,_getNextCellData:Os,_renderContouredDate(i){if(!this.option("focusStateEnabled"))return;i=i||this.option("contouredDate");let e=this._getContouredCell(),t=this._getCellByDate(i);e.removeClass("dx-calendar-contoured-date"),i&&t.addClass("dx-calendar-contoured-date")},_getContouredCell(){return this._$table.find(".dx-calendar-contoured-date")},_renderValue(){if(!this.option("allowValueSelection"))return;let i=this.option("value");Array.isArray(i)||(i=[i]),this._updateSelectedClass(i)},_updateSelectedClass(i){var e;this._isRangeMode()&&!this._isMonthView()||((e=this._$selectedCells)===null||e===void 0||e.forEach(t=>{t.removeClass("dx-calendar-selected-date")}),this._$selectedCells=i.map(t=>this._getCellByDate(t)),this._$selectedCells.forEach(t=>{t.addClass("dx-calendar-selected-date")}))},_renderRange(){var i,e,t,n,o,s,r,a;let{allowValueSelection:l,value:d,range:c}=this.option();!l||!this._isRangeMode()||!this._isMonthView()||((i=this._$rangeCells)===null||i===void 0||i.forEach(h=>{h.removeClass("dx-calendar-cell-in-range")}),(e=this._$hoveredRangeCells)===null||e===void 0||e.forEach(h=>{h.removeClass("dx-calendar-cell-range-hover")}),(t=this._$rangeStartHoverCell)===null||t===void 0||t.removeClass("dx-calendar-cell-range-hover-start"),(n=this._$rangeEndHoverCell)===null||n===void 0||n.removeClass("dx-calendar-cell-range-hover-end"),(o=this._$rangeStartDateCell)===null||o===void 0||o.removeClass("dx-calendar-range-start-date"),(s=this._$rangeEndDateCell)===null||s===void 0||s.removeClass("dx-calendar-range-end-date"),this._$rangeCells=c.map(h=>this._getCellByDate(h)),this._$rangeStartDateCell=this._getCellByDate(d[0]),this._$rangeEndDateCell=this._getCellByDate(d[1]),this._$rangeCells.forEach(h=>{h.addClass("dx-calendar-cell-in-range")}),(r=this._$rangeStartDateCell)===null||r===void 0||r.addClass("dx-calendar-range-start-date"),(a=this._$rangeEndDateCell)===null||a===void 0||a.addClass("dx-calendar-range-end-date"))},_renderHoveredRange(){var i,e,t,n,o;let{allowValueSelection:s,hoveredRange:r}=this.option();!s||!this._isRangeMode()||!this._isMonthView()||((i=this._$hoveredRangeCells)===null||i===void 0||i.forEach(a=>{a.removeClass("dx-calendar-cell-range-hover")}),(e=this._$rangeStartHoverCell)===null||e===void 0||e.removeClass("dx-calendar-cell-range-hover-start"),(t=this._$rangeEndHoverCell)===null||t===void 0||t.removeClass("dx-calendar-cell-range-hover-end"),this._$hoveredRangeCells=r.map(a=>this._getCellByDate(a)),this._$rangeStartHoverCell=this._getCellByDate(r[0]),this._$rangeEndHoverCell=this._getCellByDate(r[r.length-1]),this._$hoveredRangeCells.forEach(a=>{a.addClass("dx-calendar-cell-range-hover")}),(n=this._$rangeStartHoverCell)===null||n===void 0||n.addClass("dx-calendar-cell-range-hover-start"),(o=this._$rangeEndHoverCell)===null||o===void 0||o.addClass("dx-calendar-cell-range-hover-end"))},_isMonthView(){return this.option("zoomLevel")==="month"},_isRangeMode(){return this.option("selectionMode")===Ua.range},_getCurrentDateFormat:()=>null,getCellAriaLabel(i){let e=this._getViewName(),t=this._isTodayCell(i),n=this._getCurrentDateFormat(),o=n?he.format(i,n):this._getCellText(i);return t?`${o}. ${l9[e]}`:o},_getFirstAvailableDate(){let i=this.option("date"),e=this.option("min");return i=Y.getViewFirstCellDate(this._getViewName(),i),new Date(e&&i<e?e:i)},_getCellByDate:Os,isBoundary:Os,_optionChanged(i){let{name:e,value:t}=i;switch(e){case"value":this._renderValue(),this._updateTableAriaLabel();break;case"range":this._renderRange();break;case"hoveredRange":this._renderHoveredRange();break;case"contouredDate":this._renderContouredDate(t);break;case"onCellClick":this._createCellClickAction();break;case"onCellHover":this._createCellHoverAction();break;case"min":case"max":case"disabledDates":case"cellTemplate":case"selectionMode":this._invalidate();break;case"_todayDate":this._renderBody();break;default:this.callBase(i)}}}),Hu=d9;var c9={month:Hu.inherit({_getViewName:()=>"month",_getCurrentDateFormat:()=>"longdate",_getDefaultOptions(){return m(this.callBase(),{firstDayOfWeek:0,rowCount:6,colCount:7})},_renderImpl(){this.callBase(),this._renderHeader()},_renderBody(){this.callBase(),this._$table.find(".dx-calendar-other-view").addClass("dx-calendar-other-month")},_renderFocusTarget:E,_renderHeader(){let i=u("<tr>"),e=u("<thead>").append(i);this._$table.prepend(e);for(let t=0,n=this.option("colCount");t<n;t++)this._renderHeaderCell(t,i);this.option("showWeekNumbers")&&this._renderWeekHeaderCell(i)},_renderHeaderCell(i,e){let{firstDayOfWeek:t}=this.option(),{full:n,abbreviated:o}=this._getDayCaption(t+i),s=u("<th>").attr({scope:"col",abbr:n}).text(o);e.append(s)},_renderWeekHeaderCell(i){let e=u("<th>").attr({scope:"col",abbr:"WeekNumber",class:"dx-week-number-header"});i.prepend(e)},_renderWeekNumberCell(i){let{showWeekNumbers:e,cellTemplate:t,selectionMode:n,selectWeekOnClick:o}=this.option();if(!e)return;let s=this._getWeekNumber(i.prevCellDate),r=S.createElement("td"),a=u(r);r.className="dx-calendar-week-number-cell",n!=="single"&&o&&a.addClass("dx-calendar-week-selection"),t?t.render(this._prepareCellTemplateData(s,-1,a)):r.innerHTML=s,i.row.prepend(r),this.setAria({role:"gridcell",label:`Week ${s}`},a)},_getWeekNumber(i){let{weekNumberRule:e,firstDayOfWeek:t}=this.option();return e==="auto"?Y.getWeekNumber(i,t,t===1?"firstFourDays":"firstDay"):Y.getWeekNumber(i,t,e)},getNavigatorCaption(){return he.format(this.option("date"),"monthandyear")},_isTodayCell(i){let e=this.option("_todayDate")();return Y.sameDate(i,e)},_isDateOutOfRange(i){let e=this.option("min"),t=this.option("max");return!Y.dateInRange(i,e,t,"date")},_isOtherView(i){return i.getMonth()!==this.option("date").getMonth()},_isStartDayOfMonth(i){return Y.sameDate(i,Y.getFirstMonthDate(this.option("date")))},_isEndDayOfMonth(i){return Y.sameDate(i,Y.getLastMonthDate(this.option("date")))},_getCellText:i=>he.format(i,"d"),_getDayCaption(i){let e=this.option("colCount"),t=i%e;return{full:he.getDayNames()[t],abbreviated:he.getDayNames("abbreviated")[t]}},_getFirstCellData(){let{firstDayOfWeek:i}=this.option(),e=Y.getFirstMonthDate(this.option("date")),t=i-e.getDay(),n=this.option("colCount");return t>=0&&(t-=n),e.setDate(e.getDate()+t),e},_getNextCellData(i){return i=new Date(i),i.setDate(i.getDate()+1),i},_getCellByDate(i){return this._$table.find(`td[data-value='${ut.serializeDate(i,Y.getShortDateFormat())}']`)},isBoundary(i){return Y.sameMonthAndYear(i,this.option("min"))||Y.sameMonthAndYear(i,this.option("max"))},_getDefaultDisabledDatesHandler:i=>function(e){if(i.some(n=>Y.sameDate(n,e.date)))return!0}}),year:Hu.inherit({_getViewName:()=>"year",_getCurrentDateFormat:()=>"monthandyear",_isTodayCell(i){let e=this.option("_todayDate")();return Y.sameMonthAndYear(i,e)},_isDateOutOfRange(i){return!Y.dateInRange(i,Y.getFirstMonthDate(this.option("min")),Y.getLastMonthDate(this.option("max")))},_isOtherView:()=>!1,_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText:i=>he.getMonthNames("abbreviated")[i.getMonth()],_getFirstCellData(){let i=this.option("date"),e=new Date(i);return e.setDate(1),e.setMonth(0),e},_getNextCellData(i){return i=new Date(i),i.setMonth(i.getMonth()+1),i},_getCellByDate(i){let e=new Date(i);return e.setDate(1),this._$table.find(`td[data-value='${ut.serializeDate(e,Y.getShortDateFormat())}']`)},getNavigatorCaption(){return he.format(this.option("date"),"yyyy")},isBoundary(i){return Y.sameYear(i,this.option("min"))||Y.sameYear(i,this.option("max"))},_renderWeekNumberCell:E}),decade:Hu.inherit({_getViewName:()=>"decade",_isTodayCell(i){let e=this.option("_todayDate")();return Y.sameYear(i,e)},_isDateOutOfRange(i){let e=this.option("min"),t=this.option("max");return!Y.dateInRange(i.getFullYear(),e&&e.getFullYear(),t&&t.getFullYear())},_isOtherView(i){let e=new Date(i);return e.setMonth(1),!Y.sameDecade(e,this.option("date"))},_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText:i=>he.format(i,"yyyy"),_getFirstCellData(){let i=Y.getFirstYearInDecade(this.option("date"))-1;return Y.createDateWithFullYear(i,0,1)},_getNextCellData(i){return i=new Date(i),i.setFullYear(i.getFullYear()+1),i},getNavigatorCaption(){let i=this.option("date"),e=Y.getFirstYearInDecade(i),t=new Date(i),n=new Date(i);return t.setFullYear(e),n.setFullYear(e+9),`${he.format(t,"yyyy")}-${he.format(n,"yyyy")}`},_isValueOnCurrentView:(i,e)=>Y.sameDecade(i,e),_getCellByDate(i){let e=new Date(i);return e.setDate(1),e.setMonth(0),this._$table.find(`td[data-value='${ut.serializeDate(e,Y.getShortDateFormat())}']`)},isBoundary(i){return Y.sameDecade(i,this.option("min"))||Y.sameDecade(i,this.option("max"))},_renderWeekNumberCell:E}),century:Hu.inherit({_getViewName:()=>"century",_isTodayCell(i){let e=this.option("_todayDate")();return Y.sameDecade(i,e)},_isDateOutOfRange(i){let e=Y.getFirstYearInDecade(i),t=Y.getFirstYearInDecade(this.option("min")),n=Y.getFirstYearInDecade(this.option("max"));return!Y.dateInRange(e,t,n)},_isOtherView(i){let e=new Date(i);return e.setMonth(1),!Y.sameCentury(e,this.option("date"))},_isStartDayOfMonth:()=>!1,_isEndDayOfMonth:()=>!1,_getCellText(i){let e=he.format(i,"yyyy"),t=new Date(i);return t.setFullYear(t.getFullYear()+9),`${e} - ${he.format(t,"yyyy")}`},_getFirstCellData(){let i=Y.getFirstDecadeInCentury(this.option("date"))-10;return Y.createDateWithFullYear(i,0,1)},_getNextCellData(i){return i=new Date(i),i.setFullYear(i.getFullYear()+10),i},_getCellByDate(i){let e=new Date(i);return e.setDate(1),e.setMonth(0),e.setFullYear(Y.getFirstYearInDecade(e)),this._$table.find(`td[data-value='${ut.serializeDate(e,Y.getShortDateFormat())}']`)},getNavigatorCaption(){let i=this.option("date"),e=Y.getFirstDecadeInCentury(i),t=new Date(i),n=new Date(i);return t.setFullYear(e),n.setFullYear(e+99),`${he.format(t,"yyyy")}-${he.format(n,"yyyy")}`},isBoundary(i){return Y.sameCentury(i,this.option("min"))||Y.sameCentury(i,this.option("max"))},_renderWeekNumberCell:E})},CB=c9;var xB=D(Hr,"dxCalendar"),Id={month:3,year:2,decade:1,century:0},Qi={MONTH:"month",YEAR:"year",DECADE:"decade",CENTURY:"century"},u9={SingleSelection:mB,MultipleSelection:hB,RangeSelection:gB},vB=vi.inherit({_activeStateUnit:".dx-calendar-cell",_getDefaultOptions(){return m(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,viewsCount:1,zoomLevel:Qi.MONTH,maxZoomLevel:Qi.MONTH,minZoomLevel:Qi.CENTURY,selectionMode:"single",selectWeekOnClick:!0,showTodayButton:!1,showWeekNumbers:!1,weekNumberRule:"auto",cellTemplate:"cell",disabledDates:null,onCellClick:null,onContouredChanged:null,skipFocusCheck:!1,_todayDate:()=>new Date})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}}])},_supportedKeys(){return m(this.callBase(),{rightArrow(i){i.preventDefault(),ft(i)?this._waitRenderView(1):this._moveCurrentDateByOffset(1*this._getRtlCorrection())},leftArrow(i){i.preventDefault(),ft(i)?this._waitRenderView(-1):this._moveCurrentDateByOffset(-1*this._getRtlCorrection())},upArrow(i){if(i.preventDefault(),ft(i))this._navigateUp();else{if(fe.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(-1*this._view.option("colCount"))}},downArrow(i){if(i.preventDefault(),ft(i))this._navigateDown();else{if(fe.isAnimating(this._view.$element()))return;this._moveCurrentDateByOffset(1*this._view.option("colCount"))}},home(i){i.preventDefault();let e=this.option("zoomLevel"),t=this.option("currentDate"),n=this._dateOption("min");if(this._view.isDateDisabled(t))return;let o=Y.sameView(e,t,n)?n:Y.getViewFirstCellDate(e,t);this._moveToClosestAvailableDate(o)},end(i){i.preventDefault();let e=this.option("zoomLevel"),t=this.option("currentDate"),n=this._dateOption("max");if(this._view.isDateDisabled(t))return;let o=Y.sameView(e,t,n)?n:Y.getViewLastCellDate(e,t);this._moveToClosestAvailableDate(o)},pageUp(i){i.preventDefault(),this._waitRenderView(-1*this._getRtlCorrection())},pageDown(i){i.preventDefault(),this._waitRenderView(1*this._getRtlCorrection())},tab:E,enter:this._enterKeyHandler})},_enterKeyHandler(i){if(!this._isMaxZoomLevel())this._navigateDown();else if(!this._view.isDateDisabled(this.option("currentDate"))){let e=this._updateTimeComponent(this.option("currentDate"));this._selectionStrategy.selectValue(e,i)}},_getSerializationFormat(i){let e=this.option(i||"value");if(this.option("dateSerializationFormat"))return this.option("dateSerializationFormat");if(Oe(e))return"number";if(B(e))return ut.getDateSerializationFormat(e)},_convertToDate:i=>ut.deserializeDate(i),_dateValue(i,e){if(e){if(e.type==="keydown"){let t=this._view._getContouredCell().get(0);e.target=t}this._saveValueChangeEvent(e)}this._dateOption("value",i)},_dateOption(i,e){let t=i==="value"&&!this._isSingleMode(),n=this.option("value");if(arguments.length===1)return t?(n??[]).map(r=>this._convertToDate(r)):this._convertToDate(this.option(i));let o=this._getSerializationFormat(i),s=t?e?.map(r=>ut.serializeDate(r,o))||[]:ut.serializeDate(e,o);this.option(i,s)},_isSingleMode(){return this.option("selectionMode")==="single"},_shiftDate(i,e,t,n){switch(i){case Qi.MONTH:e.setDate(e.getDate()+t*n);break;case Qi.YEAR:e.setMonth(e.getMonth()+t*n);break;case Qi.DECADE:e.setFullYear(e.getFullYear()+t*n);break;case Qi.CENTURY:e.setFullYear(e.getFullYear()+10*t*n)}},_moveCurrentDateByOffset(i){let e=this.option("currentDate"),t=new Date(e),n=this.option("zoomLevel");this._shiftDate(n,t,i,1);let o=this._getMaxDate(),s=this._getMinDate(),r=this._areDatesInNeighborView(n,t,e),a=An(t,s,o)&&r,l=new Date(t);for(;a;){if(!this._view.isDateDisabled(l)){t=l;break}this._shiftDate(n,l,i,1),r=this._areDatesInNeighborView(n,l,e),a=An(l,s,o)&&r}if(this._view.isDateDisabled(e)||this._view.isDateDisabled(t)){let d=i>0?1:-1;(d===1?this._isNextViewDisabled():this._isPrevViewDisabled())?this._moveToClosestAvailableDate(t):this._waitRenderView(d)}else this._skipNavigate=!0,this.option("currentDate",t)},_isNextViewDisabled(){return this._navigator._nextButton.option("disabled")},_isPrevViewDisabled(){return this._navigator._prevButton.option("disabled")},_areDatesInSameView(i,e,t){switch(i){case Qi.MONTH:return e.getMonth()===t.getMonth();case Qi.YEAR:return e.getYear()===t.getYear();case Qi.DECADE:return parseInt(e.getYear()/10)===parseInt(t.getYear()/10);case Qi.CENTURY:return parseInt(e.getYear()/100)===parseInt(t.getYear()/100)}},_areDatesInNeighborView(i,e,t){switch(i){case Qi.MONTH:return((n,o)=>{let s=Math.abs(n-o);return Math.min(s,12-s)})(e.getMonth(),t.getMonth())<=1;case Qi.YEAR:return Math.abs(e.getYear()-t.getYear())<=1;case Qi.DECADE:return Math.abs(e.getYear()-t.getYear())<=10;case Qi.CENTURY:return Math.abs(e.getYear()-t.getYear())<=100}},_moveToClosestAvailableDate(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.option("currentDate"),e=new Date(i),t=this.option("zoomLevel"),n=!this._isDateNotAvailable(e),o=n,s=n,r,a,l=new Date(e),d=new Date(e);do{if(o){e=l;break}if(s){e=d;break}this._shiftDate(t,l,1,1),this._shiftDate(t,d,1,-1),r=this._areDatesInSameView(t,l,i),a=this._areDatesInSameView(t,d,i),o=r&&!this._isDateNotAvailable(l),s=a&&!this._isDateNotAvailable(d)}while(r||a);this.option("currentDate",e)},_isDateNotAvailable(i){let e=this._getMaxDate(),t=this._getMinDate();return!An(i,t,e)||this._view.isDateDisabled(i)},_init(){this.callBase(),this._initSelectionStrategy(),this._correctZoomLevel(),this._initCurrentDate(),this._initActions()},_initSelectionStrategy(){let i=this._getSelectionStrategyName(),e=u9[i];(!this._selectionStrategy||this._selectionStrategy.NAME!==i)&&(this._selectionStrategy=new e(this))},_refreshSelectionStrategy(){this._initSelectionStrategy(),this._selectionStrategy.restoreValue(),this._refresh()},_getSelectionStrategyName(){switch(this.option("selectionMode")){case"multiple":return"MultipleSelection";case"range":return"RangeSelection";default:return"SingleSelection"}},_correctZoomLevel(){let i=this.option("minZoomLevel"),e=this.option("maxZoomLevel"),t=this.option("zoomLevel");Id[e]<Id[i]||(Id[t]>Id[e]?this.option("zoomLevel",e):Id[t]<Id[i]&&this.option("zoomLevel",i))},_initCurrentDate(){let i=this._getNormalizedDate(this._selectionStrategy.getDefaultCurrentDate())??this._getNormalizedDate(this.option("currentDate"));this.option("currentDate",i)},_getNormalizedDate(i){return i=Y.normalizeDate(i,this._getMinDate(),this._getMaxDate()),f(i)?this._getDate(i):i},_initActions(){this._cellClickAction=this._createActionByOption("onCellClick"),this._onContouredChanged=this._createActionByOption("onContouredChanged")},_initTemplates(){this._templateManager.addDefaultTemplates({cell:new Mn(i=>{let e=i.model;u(i.container).append(u("<span>").text(e&&e.text||String(e)))})}),this.callBase()},_updateCurrentDate(i){fe.isAnimating(this._$viewsWrapper)&&fe.stop(this._$viewsWrapper,!0);let e=this._getMinDate(),t=this._getMaxDate();if(e>t){this.option("currentDate",new Date);return}let n=this._getNormalizedDate(i);if(i.getTime()!==n.getTime()){this.option("currentDate",new Date(n));return}let o=this._getViewsOffset(this._view.option("date"),n);o!==0&&!this._isMaxZoomLevel()&&this._isOtherViewCellClicked&&(o=0),this._view&&o!==0&&!this._suppressNavigation?this._additionalView?o>2||o<-1?(this._refreshViews(),this._setViewContoured(n),this._updateAriaId(n),this._renderNavigator()):o===1&&this._skipNavigate?(this._setViewContoured(n),this._updateAriaId(n)):this._navigate(o,n):this._navigate(o,n):(this._renderNavigator(),this._setViewContoured(n),this._updateAriaId(n)),this._skipNavigate=!1},_isAdditionalViewDate(i){return this._additionalView?i>=this._additionalView._getFirstAvailableDate():!1},_getActiveView(i){return this._isAdditionalViewDate(i)?this._additionalView:this._view},_setViewContoured(i){if(this.option("skipFocusCheck")||u(this._$viewsWrapper).is(":focus")){var e;this._view.option("contouredDate",null),(e=this._additionalView)===null||e===void 0||e.option("contouredDate",null),(this._isAdditionalViewDate(i)?this._additionalView:this._view).option("contouredDate",i)}},_getMinDate(){let i=this.option("_rangeMin");return i||(this.min?this.min:(this.min=this._dateOption("min")||new Date(1e3,0),this.min))},_getMaxDate(){let i=this.option("_rangeMax");return i||(this.max?this.max:(this.max=this._dateOption("max")||new Date(3e3,0),this.max))},_getViewsOffset(i,e){let t=this.option("zoomLevel");if(t===Qi.MONTH)return this._getMonthsOffset(i,e);let n;switch(t){case Qi.CENTURY:n=100;break;case Qi.DECADE:n=10;break;default:n=1}return parseInt(e.getFullYear()/n)-parseInt(i.getFullYear()/n)},_getMonthsOffset(i,e){let t=e.getFullYear()-i.getFullYear(),n=e.getMonth()-i.getMonth();return 12*t+n},_waitRenderView(i){if(this._alreadyViewRender)return;this._alreadyViewRender=!0;let e=this._getDateByOffset(i*this._getRtlCorrection());this._moveToClosestAvailableDate(e),this._waitRenderViewTimeout=setTimeout(()=>{this._alreadyViewRender=!1})},_getRtlCorrection(){return this.option("rtlEnabled")?-1:1},_getDateByOffset(i,e){e=this._getDate(e??this.option("currentDate"));let t=e.getDate(),n=Y.getDifferenceInMonth(this.option("zoomLevel"))*i;e.setDate(1),e.setMonth(e.getMonth()+n);let o=Y.getLastMonthDate(e).getDate();return e.setDate(t>o?o:t),e},_focusTarget(){return this._$viewsWrapper},_focusEventTarget(){return this.$element()},_initMarkup(){this._renderSubmitElement();let i=this.$element();i.addClass("dx-calendar"),i.toggleClass("dx-calendar-range",this.option("selectionMode")==="range"),this._renderBody(),i.append(this.$body),this._renderViews(),this._renderNavigator(),this.callBase(),this._renderEvents(),i.prepend(this._navigator.$element()),this._renderSwipeable(),this._renderFooter(),this._selectionStrategy.updateAriaSelected(),this._updateAriaId(),this._updateNavigatorLabels(),this.setAria("role","application"),this._moveToClosestAvailableDate()},_render(){this.callBase(),this._setViewContoured(this.option("currentDate"))},_renderBody(){this._$viewsWrapper||(this.$body=u("<div>").addClass("dx-calendar-body"),this._$viewsWrapper=u("<div>").addClass("dx-calendar-views-wrapper"),this.$body.append(this._$viewsWrapper))},_setAriaReadonly:E,_getKeyboardListeners(){return this.callBase().concat([this._view])},_renderViews(){this.$element().addClass(`dx-calendar-view-${this.option("zoomLevel")}`);let{currentDate:i,viewsCount:e}=this.option();if(this.$element().toggleClass("dx-calendar-multiview",e>1),this._view=this._renderSpecificView(i),j()){let t=this._getDateByOffset(-1,i);this._beforeView=this._isViewAvailable(t)?this._renderSpecificView(t):null;let n=this._getDateByOffset(e,i);n.setDate(1),this._afterView=this._isViewAvailable(n)?this._renderSpecificView(n):null}e>1&&(this._additionalView=this._renderSpecificView(this._getDateByOffset(1,i))),this._translateViews()},_renderSpecificView(i){let{zoomLevel:e}=this.option(),t=CB[e],n=u("<div>").appendTo(this._$viewsWrapper),o=this._viewConfig(i);return this._createComponent(n,t,o)},_viewConfig(i){let e=this.option("disabledDates");return e=A(e)?this._injectComponent(e.bind(this)):e,I({},this._selectionStrategy.getViewOptions(),{date:i,min:this._getMinDate(),max:this._getMaxDate(),firstDayOfWeek:this.option("firstDayOfWeek")??he.firstDayOfWeekIndex(),showWeekNumbers:this.option("showWeekNumbers"),selectWeekOnClick:this.option("selectWeekOnClick"),weekNumberRule:this.option("weekNumberRule"),zoomLevel:this.option("zoomLevel"),tabIndex:void 0,focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),disabledDates:e,onCellClick:this._cellClickHandler.bind(this),cellTemplate:this._getTemplateByOption("cellTemplate"),allowValueSelection:this._isMaxZoomLevel(),_todayDate:this.option("_todayDate")})},_renderEvents(){_.off(this._$viewsWrapper,xB),this.option("selectionMode")==="range"&&_.on(this._$viewsWrapper,xB,null,()=>{this._updateViewsOption("hoveredRange",[])})},_injectComponent(i){let e=this;return function(t){return m(t,{component:e}),i(t)}},_isViewAvailable(i){let e=this.option("zoomLevel"),t=Y.getViewMinBoundaryDate(e,this._getMinDate()),n=Y.getViewMaxBoundaryDate(e,this._getMaxDate());return Y.dateInRange(i,t,n)},_translateViews(){let{viewsCount:i}=this.option();Ve(this._view.$element(),{left:0,top:0}),this._moveViewElement(this._beforeView,-1),this._moveViewElement(this._afterView,i),this._moveViewElement(this._additionalView,1)},_moveViewElement(i,e){i&&Ve(i.$element(),{left:this._getViewPosition(e),top:0})},_getViewPosition(i){let e=this.option("rtlEnabled")?-1:1;return 100*i*e+"%"},_cellClickHandler(i){let e=this.option("zoomLevel"),t=Y.getViewDown(e),n=this._isMaxZoomLevel();if(t&&!n)this._navigateDown(i.event.currentTarget);else{let o=this._updateTimeComponent(i.value);this._selectionStrategy.selectValue(o,i.event),this._cellClickAction(i)}},_updateTimeComponent(i){let e=new Date(i),t=this._dateOption("value");return t&&this._isSingleMode()&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds())),e},_isMaxZoomLevel(){return this.option("zoomLevel")===this.option("maxZoomLevel")},_navigateDown(i){let e=this.option("zoomLevel");if(this._isMaxZoomLevel())return;let t=Y.getViewDown(e);if(!t)return;let n=this._view.option("contouredDate")||this._view.option("date");i&&(n=u(i).data("dxDateValueKey")),this._isOtherViewCellClicked=!0,this.option("currentDate",n),this.option("zoomLevel",t),this._isOtherViewCellClicked=!1,this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate")))},_renderNavigator(){this._navigator||(this._navigator=new pB(u("<div>"),this._navigatorConfig())),this._navigator.option("text",this._getViewsCaption(this._view,this._additionalView)),this._updateButtonsVisibility()},_navigatorConfig(){let{focusStateEnabled:i,rtlEnabled:e}=this.option();return{text:this._getViewsCaption(this._view,this._additionalView),onClick:this._navigatorClickHandler.bind(this),onCaptionClick:this._navigateUp.bind(this),focusStateEnabled:i,rtlEnabled:e,tabIndex:void 0}},_navigatorClickHandler(i){let{currentDate:e,viewsCount:t}=this.option(),n=i.direction;if(t>1){let s=this._isAdditionalViewDate(e);(s&&n<0||!s&&n>0)&&(n*=2)}let o=this._getDateByOffset(n,e);this._moveToClosestAvailableDate(o)},_navigateUp(){let i=this.option("zoomLevel"),e=Y.getViewUp(i);!e||this._isMinZoomLevel(i)||(this.option("zoomLevel",e),this._renderNavigator(),this._animateShowView(),this._moveToClosestAvailableDate(),this._setViewContoured(this._getNormalizedDate(this.option("currentDate"))))},_isMinZoomLevel(i){let e=this._getMinDate(),t=this._getMaxDate();return Y.sameView(i,e,t)||this.option("minZoomLevel")===i},_updateButtonsVisibility(){this._navigator.toggleButton("next",!f(this._afterView)),this._navigator.toggleButton("prev",!f(this._beforeView))},_renderSwipeable(){this._swipeable||(this._swipeable=this._createComponent(this.$element(),dr,{onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._viewWidth.bind(this)}))},_swipeStartHandler(i){fe.stop(this._$viewsWrapper,!0);let{viewsCount:e}=this.option();this._toggleGestureCoverCursor("grabbing"),i.event.maxLeftOffset=this._getRequiredView("next")?1/e:0,i.event.maxRightOffset=this._getRequiredView("prev")?1/e:0},_toggleGestureCoverCursor(i){u(".dx-gesture-cover").css("cursor",i)},_getRequiredView(i){let e,t=this.option("rtlEnabled");return i==="next"?e=t?this._beforeView:this._afterView:i==="prev"&&(e=t?this._afterView:this._beforeView),e},_swipeUpdateHandler(i){let{offset:e}=i.event;Ve(this._$viewsWrapper,{left:e*this._viewWidth(),top:0}),this._updateNavigatorCaption(e)},_swipeEndHandler(i){this._toggleGestureCoverCursor("auto");let{currentDate:e,rtlEnabled:t}=this.option(),{targetOffset:n}=i.event,o=n?n/Math.abs(n):0,r=this._isAdditionalViewDate(e)&&(t?o===-1:o===1);if(o===0){this._animateWrapper(0,250);return}let a=-o*this._getRtlCorrection()*(r?2:1),l=this._getDateByOffset(a);this._isDateInInvalidRange(l)&&(o>=0?l=new Date(this._getMinDate()):l=new Date(this._getMaxDate())),this.option("currentDate",l)},_viewWidth(){return this._viewWidthValue||(this._viewWidthValue=W(this.$element())/this.option("viewsCount")),this._viewWidthValue},_updateNavigatorCaption(i){i*=this._getRtlCorrection();let e=this.option("viewsCount")>1,t,n;i>.5&&this._beforeView?(t=this._beforeView,n=e&&this._view):i<-.5&&this._afterView?(t=e?this._additionalView:this._afterView,n=e?this._afterView:null):(t=this._view,n=e?this._additionalView:null),this._navigator.option("text",this._getViewsCaption(t,n))},_getViewsCaption(i,e){let t=i.getNavigatorCaption(),{viewsCount:n}=this.option();if(n>1&&e){let o=e.getNavigatorCaption();t=`${t} - ${o}`}return t},_isDateInInvalidRange(i){if(this._view.isBoundary(i))return;let e=this._getMinDate(),t=this._getMaxDate(),n=Y.normalizeDate(i,e,t);return n===e||n===t},_renderFooter(){let i=this.option("showTodayButton");if(i){let e=this._createComponent(u("<div>"),_t,{focusStateEnabled:this.option("focusStateEnabled"),text:O.format("dxCalendar-todayButtonText"),onClick:t=>{this._toTodayView(t)},type:Ot()?"normal":"default",stylingMode:Ot()?"outlined":"text",integrationOptions:{}}).$element().addClass("dx-calendar-today-button");this._$footer=u("<div>").addClass("dx-calendar-footer").append(e),this.$element().append(this._$footer)}this.$element().toggleClass("dx-calendar-with-footer",i)},_renderSubmitElement(){this._$submitElement=u("<input>").attr("type","hidden").appendTo(this.$element()),this._setSubmitValue(this.option("value"))},_setSubmitValue(i){let e=this._convertToDate(i);this._getSubmitElement().val(ut.serializeDate(e,"yyyy-MM-dd"))},_getSubmitElement(){return this._$submitElement},_animateShowView(){fe.stop(this._view.$element(),!0),this._popAnimationView(this._view,.6,1,250),this.option("viewsCount")>1&&(fe.stop(this._additionalView.$element(),!0),this._popAnimationView(this._additionalView,.6,1,250))},_popAnimationView:(i,e,t,n)=>fe.animate(i.$element(),{type:"pop",from:{scale:e,opacity:e},to:{scale:t,opacity:t},duration:n}),_navigate(i,e){if(i!==0&&Math.abs(i)!==1&&this._isViewAvailable(e)){let r=this._renderSpecificView(e);i>0?(this._afterView&&this._afterView.$element().remove(),this._afterView=r):(this._beforeView&&this._beforeView.$element().remove(),this._beforeView=r),this._translateViews()}let t=this._getRtlCorrection(),n=i>0?1:i<0?-1:0,o=-t*n*this._viewWidth();this._$viewsWrapper.position().left!==o&&(this._preventViewChangeAnimation?this._wrapperAnimationEndHandler(i,e):this._animateWrapper(o,250).done(this._wrapperAnimationEndHandler.bind(this,i,e)))},_animateWrapper(i,e){return fe.animate(this._$viewsWrapper,{type:"slide",from:{left:this._$viewsWrapper.position().left},to:{left:i},duration:e})},_getDate:i=>new Date(i),_toTodayView(i){let e=new Date;if(this._isMaxZoomLevel()){this._selectionStrategy.selectValue(e,i.event);return}this._preventViewChangeAnimation=!0,this.option("zoomLevel",this.option("maxZoomLevel")),this._selectionStrategy.selectValue(e,i.event),this._animateShowView(),this._preventViewChangeAnimation=!1},_wrapperAnimationEndHandler(i,e){this._rearrangeViews(i),this._translateViews(),this._resetLocation(),this._renderNavigator(),this._setViewContoured(e),this._updateAriaId(e),this._selectionStrategy.updateAriaSelected()},_rearrangeViews(i){var e;if(i===0)return;let{viewsCount:t}=this.option(),n,o,s,r,a;if(i<0?(n=1,o="_beforeView",s="_afterView",r="_view",a=t===1?"_view":"_additionalView"):(n=-1,o="_afterView",s="_beforeView",r=t===1?"_view":"_additionalView",a="_view"),!this[o])return;let l=this[o].option("date");(e=this[s])===null||e===void 0||e.$element().remove(),this[s]=this._renderSpecificView(this._getDateByOffset(n*t,l)),this[a].$element().remove(),t===1?this[a]=this[o]:(this[a]=this[r],this[r]=this[o]);let d=this._getDateByOffset(-n,l);this[o]=this._isViewAvailable(d)?this._renderSpecificView(d):null},_resetLocation(){Ve(this._$viewsWrapper,{left:0,top:0})},_clean(){this.callBase(),this._clearViewWidthCache(),delete this._$viewsWrapper,delete this._navigator,delete this._$footer},_clearViewWidthCache(){delete this._viewWidthValue},_disposeViews(){this._view.$element().remove(),this._beforeView&&this._beforeView.$element().remove(),this._additionalView&&this._additionalView.$element().remove(),this._afterView&&this._afterView.$element().remove(),delete this._view,delete this._additionalView,delete this._beforeView,delete this._afterView,delete this._skipNavigate},_dispose(){clearTimeout(this._waitRenderViewTimeout),this.callBase()},_refreshViews(){this._resetActiveState(),this._disposeViews(),this._renderViews()},_visibilityChanged(){this._translateViews()},_shouldSkipFocusEvent(i){let{target:e,relatedTarget:t}=i;return u(e).parents(".dx-calendar").length&&u(t).parents(".dx-calendar").length},_focusInHandler(i){u(i.target).is(this._$viewsWrapper)&&this._setViewContoured(this.option("currentDate")),!this._shouldSkipFocusEvent(i)&&(this.callBase.apply(this,arguments),this._toggleFocusClass(!0,this.$element()))},_focusOutHandler(i){if(u(i.target).is(this._$viewsWrapper)){var e;this._view.option("contouredDate",null),(e=this._additionalView)===null||e===void 0||e.option("contouredDate",null)}this._shouldSkipFocusEvent(i)||(this.callBase.apply(this,arguments),this._toggleFocusClass(!1,this.$element()))},_updateViewsOption(i,e){var t,n,o;this._view.option(i,e),(t=this._additionalView)===null||t===void 0||t.option(i,e),(n=this._beforeView)===null||n===void 0||n.option(i,e),(o=this._afterView)===null||o===void 0||o.option(i,e)},_setViewsMinOption(i){this._restoreViewsMinMaxOptions(),this.option("_rangeMin",this._convertToDate(i)),this._updateViewsOption("min",this._getMinDate())},_setViewsMaxOption(i){this._restoreViewsMinMaxOptions(),this.option("_rangeMax",this._convertToDate(i)),this._updateViewsOption("max",this._getMaxDate())},_restoreViewsMinMaxOptions(){this._resetActiveState(),this.option({_rangeMin:null,_rangeMax:null}),this._updateViewsOption("min",this._getMinDate()),this._updateViewsOption("max",this._getMaxDate())},_updateNavigatorLabels(){let i=this.option("zoomLevel");i=i.charAt(0).toUpperCase()+i.slice(1);let e=this._navigator._caption.option("text"),t=O.format(`dxCalendar-previous${i}ButtonLabel`),n=O.format(`dxCalendar-caption${i}Label`),o=O.format(`dxCalendar-next${i}ButtonLabel`);this.setAria("label",t,this._navigator._prevButton.$element()),this.setAria("label",`${e}. ${n}`,this._navigator._caption.$element()),this.setAria("label",o,this._navigator._nextButton.$element())},_updateAriaSelected(i,e){e.forEach(t=>{this.setAria("selected",!1,this._view._getCellByDate(t))}),i.forEach(t=>{this.setAria("selected",!0,this._view._getCellByDate(t))}),this.option("viewsCount")>1&&(e.forEach(t=>{this.setAria("selected",!1,this._additionalView._getCellByDate(t))}),i.forEach(t=>{this.setAria("selected",!0,this._additionalView._getCellByDate(t))}))},_updateAriaId(i){i=i??this.option("currentDate");let e=`dx-${new Ae}`,n=this._getActiveView(i)._getCellByDate(i);this.setAria("id",e,n),this.setAria("activedescendant",e),this._onContouredChanged(e)},_suppressingNavigation(i,e){this._suppressNavigation=!0,i.apply(this,e),delete this._suppressNavigation},_optionChanged(i){let{value:e,previousValue:t}=i;switch(i.name){case"width":this.callBase(i),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"selectionMode":this._refreshSelectionStrategy(),this._initCurrentDate();break;case"selectWeekOnClick":case"_todayDate":case"showWeekNumbers":case"weekNumberRule":this._refreshViews();break;case"firstDayOfWeek":this._refreshViews(),this._updateButtonsVisibility();break;case"focusStateEnabled":case"disabledDates":case"dateSerializationFormat":case"cellTemplate":case"showTodayButton":this._invalidate();break;case"currentDate":this.setAria("id",void 0,this._view._getCellByDate(t)),this._updateCurrentDate(e);break;case"zoomLevel":this.$element().removeClass(`dx-calendar-view-${t}`),this._correctZoomLevel(),this._refreshViews(),this._renderNavigator(),this._updateAriaId(),this._updateNavigatorLabels();break;case"minZoomLevel":case"maxZoomLevel":this._correctZoomLevel(),this._updateButtonsVisibility();break;case"value":this._selectionStrategy.processValueChanged(e,t),this._setSubmitValue(e),this.callBase(i);break;case"viewsCount":this._refreshViews(),this._renderNavigator();break;case"onCellClick":this._view.option("onCellClick",e);break;case"onContouredChanged":this._onContouredChanged=this._createActionByOption("onContouredChanged");break;case"skipFocusCheck":break;default:this.callBase(i)}},getContouredDate(){return this._view.option("contouredDate")}});K("dxCalendar",vB);var bB=vB;var yB=bB;var{abstract:Hm}=pe,h9=pe.inherit({ctor(i){this.dateBox=i},widgetOption(){return this._widget&&this._widget.option.apply(this._widget,arguments)},_renderWidget(i){i=i||u("<div>"),this._widget=this._createWidget(i),this._widget.$element().appendTo(this._getWidgetContainer())},_createWidget(i){let e=this._getWidgetName(),t=this._getWidgetOptions();return this.dateBox._createComponent(i,e,t)},_getWidgetOptions:Hm,_getWidgetName:Hm,getDefaultOptions:()=>({mode:"text"}),getDisplayFormat:Hm,supportedKeys:E,getKeyboardListener:E,customizeButtons:E,getParsedText(i,e){return he.parse(i,e)||he.parse(i)},renderInputMinMax:E,renderOpenedState(){this._updateValue()},popupConfig:Hm,_dimensionChanged(){var i;(i=this._getPopup())===null||i===void 0||i.repaint()},renderPopupContent(){let i=this._getPopup();this._renderWidget();let e=i.$content().parent();_.off(e,"mousedown"),_.on(e,"mousedown",this._preventFocusOnPopup.bind(this))},_preventFocusOnPopup(i){i.preventDefault()},_getWidgetContainer(){return this._getPopup().$content()},_getPopup(){return this.dateBox._popup},popupShowingHandler:E,popupHiddenHandler:E,_updateValue(){this._widget&&this._widget.option("value",this.dateBoxValue())},useCurrentDateByDefault:E,getDefaultDate:()=>new Date,textChangedHandler:E,renderValue(){this.dateBox.option("opened")&&this._updateValue()},getValue(){return this._widget.option("value")},isAdaptivityChanged:()=>!1,dispose(){let i=this._getPopup();i&&i.$content().empty()},dateBoxValue(){return arguments.length?this.dateBox.dateValue.apply(this.dateBox,arguments):this.dateBox.dateOption.apply(this.dateBox,["value"])}}),ra=h9;var p9=ra.inherit({NAME:"Calendar",getDefaultOptions(){return m(this.callBase(),{todayButtonText:O.format("dxCalendar-todayButtonText")})},supportedKeys(){let i=function(e){return this.option("opened")?(e.preventDefault(),!0):!1};return{rightArrow(){if(this.option("opened"))return!0},leftArrow(){if(this.option("opened"))return!0},enter:function(e){if(this.dateBox.option("opened")){if(e.preventDefault(),this._widget.option("zoomLevel")===this._widget.option("maxZoomLevel")){let t=this._getContouredValue(),n=this._lastActionElement,o=this._closeDropDownByEnter();return o&&t&&n==="calendar"&&this.dateBoxValue(t,e),o&&this.dateBox.close(),this.dateBox._valueChangeEventHandler(e),!o}return!0}this.dateBox._valueChangeEventHandler(e)}.bind(this),home:i,end:i}},getDisplayFormat:i=>i||"shortdate",_closeDropDownByEnter:()=>!0,_getWidgetName:()=>yB,_getContouredValue(){return this._widget._view.option("contouredDate")},getKeyboardListener(){return this._widget},_getWidgetOptions(){let i=this.dateBox.option("disabledDates");return m(this.dateBox.option("calendarOptions"),{value:this.dateBoxValue()||null,selectionMode:"single",dateSerializationFormat:null,min:this.dateBox.dateOption("min"),max:this.dateBox.dateOption("max"),onValueChanged:this._valueChangedHandler.bind(this),onCellClick:this._cellClickHandler.bind(this),disabledDates:A(i)?this._injectComponent(i.bind(this.dateBox)):i,onContouredChanged:this._refreshActiveDescendant.bind(this),skipFocusCheck:!0})},_injectComponent(i){let e=this;return function(t){return m(t,{component:e.dateBox}),i(t)}},_refreshActiveDescendant(i){this._lastActionElement="calendar",this.dateBox.setAria("activedescendant",i.actionValue)},_getTodayButtonConfig(){let i=this.dateBox.option("buttonsLocation"),t=i==="default"?["bottom","center"]:es(i),n=ht()?"text":"outlined";return{widget:"dxButton",toolbar:t[0],location:t[1]==="after"?"before":t[1],options:{onClick:o=>{this._widget._toTodayView(o)},text:this.dateBox.option("todayButtonText"),elementAttr:{class:"dx-button-today"},stylingMode:n}}},_isCalendarVisible(){let{calendarOptions:i}=this.dateBox.option();return bt(i)||i.visible!==!1},_getPopupToolbarItems(i){return this.dateBox.option("applyValueMode")==="useButtons"&&this._isCalendarVisible()?[this._getTodayButtonConfig(),...i]:i},popupConfig:i=>m(!0,i,{position:{collision:"flipfit flip"},width:"auto"}),_valueChangedHandler(i){let{value:e}=i,t=i.previousValue;Y.sameDate(e,t)&&Y.sameHoursAndMinutes(e,t)||this.dateBox.option("applyValueMode")==="instantly"&&this.dateBoxValue(this.getValue(),i.event)},_updateValue(){this._widget&&this._widget.option("value",this.dateBoxValue())},textChangedHandler(){this._lastActionElement="input",this.dateBox.option("opened")&&this._widget&&this._updateValue(!0)},_cellClickHandler(i){let{dateBox:e}=this;e.option("applyValueMode")==="instantly"&&(e.option("opened",!1),this.dateBoxValue(this.getValue(),i.event))}}),Dd=p9;var g9={row:"minWidth",col:"minHeight"},m9={row:"maxWidth",col:"maxHeight"},OB={start:"flex-start",end:"flex-end",center:"center","space-between":"space-between","space-around":"space-around"},EB={start:"flex-start",end:"flex-end",center:"center",stretch:"stretch"},f9={row:"row",col:"column"},Td=(i,e,t)=>{if(t=Vs(e,t),i.style[Do(e)]=t,!j()){if(t===""||!f(t))return;let o=`${uc(e)}: ${t};`;zh(i,o,!1)}},mO=class extends mo{_renderVisible(e,t){super._renderVisible(e),f(t)&&this._options.fireItemStateChangedAction({name:"visible",state:e,oldState:t})}},fO=class{constructor(e,t){this._$element=e,this._option=t}renderBox(){this._$element.css({display:`${fl("flexDirection")}flex`}),Td(this._$element.get(0),"flexDirection",f9[this._option("direction")])}renderAlign(){this._$element.css({justifyContent:this._normalizedAlign()})}_normalizedAlign(){let e=this._option("align");return e in OB?OB[e]:e}renderCrossAlign(){this._$element.css({alignItems:this._normalizedCrossAlign()})}_normalizedCrossAlign(){let e=this._option("crossAlign");return e in EB?EB[e]:e}renderItems(e){let t=fl("flexDirection"),n=this._option("direction");x(e,function(){let o=u(this),s=o.data("dxBoxItemData");o.css({display:`${t}flex`}).css(m9[n],s.maxSize||"none").css(g9[n],s.minSize||"0"),Td(o.get(0),"flexBasis",s.baseSize||0),Td(o.get(0),"flexGrow",s.ratio),Td(o.get(0),"flexShrink",f(s.shrink)?s.shrink:1),o.children().each((r,a)=>{u(a).css({width:"auto",height:"auto",display:`${fl("flexDirection")}flex`,flexBasis:0}),Td(a,"flexGrow",1),Td(a,"flexDirection",u(a)[0].style.flexDirection||"column")})})}},wB=(()=>{class i extends jn{_getDefaultOptions(){return m(super._getDefaultOptions(),{direction:"row",align:"start",crossAlign:"stretch",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,_queue:void 0})}_itemClass(){return"dx-box-item"}_itemDataKey(){return"dxBoxItemData"}_itemElements(){return this._itemContainer().children(this._itemSelector())}_init(){super._init(),this.$element().addClass("dx-box-flex"),this._initLayout(),this._initBoxQueue()}_initLayout(){this._layout=new fO(this.$element(),this.option.bind(this))}_initBoxQueue(){this._queue=this.option("_queue")||[]}_queueIsNotEmpty(){return this.option("_queue")?!1:!!this._queue.length}_pushItemToQueue(t,n){this._queue.push({$item:t,config:n})}_shiftItemFromQueue(){return this._queue.shift()}_initMarkup(){this.$element().addClass("dx-box"),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(super._renderItems(t);this._queueIsNotEmpty();){let n=this._shiftItemFromQueue();this._createComponent(n.$item,i,m({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},n.config))}this._layout.renderItems(this._itemElements())}_renderItemContent(t){let n=t.itemData&&t.itemData.node;return n?this._renderItemContentByNode(t,n):super._renderItemContent(t)}_postprocessRenderItem(t){let n=t.itemData.box;n&&this._pushItemToQueue(t.itemContent,n)}_createItemByTemplate(t,n){return n.itemData.box?t.source?t.source():u():super._createItemByTemplate(t,n)}_itemOptionChanged(t,n,o,s){n==="visible"&&this._onItemStateChanged({name:n,state:o,oldState:s!==!1}),super._itemOptionChanged(t,n,o)}_optionChanged(t){switch(t.name){case"_queue":case"direction":this._invalidate();break;case"align":this._layout.renderAlign();break;case"crossAlign":this._layout.renderCrossAlign();break;default:super._optionChanged(t)}}_itemOptions(){let t=super._itemOptions();return t.fireItemStateChangedAction=n=>{this._onItemStateChanged(n)},t}}return i.ItemClass=mO,i})();K("dxBox",wB);var SB=wB;var qa=SB;var _O=["year","day","month","day"],IB=["hours","minutes","seconds","milliseconds"];var _9=864e5,C9=31536e6,x9=function(i){let e=typeof i;return e==="string"?"format":e==="object"&&i.type!==void 0?i.type:null},Es={SUPPORTED_FORMATS:["date","time","datetime"],ONE_MINUTE:6e4,ONE_DAY:_9,ONE_YEAR:C9,MIN_DATEVIEW_DEFAULT_DATE:new Date(1900,0,1),MAX_DATEVIEW_DEFAULT_DATE:function(){let i=new Date;return new Date(i.getFullYear()+50,i.getMonth(),i.getDate(),23,59,59)}(),FORMATS_INFO:{date:{getStandardPattern:()=>"yyyy-MM-dd",components:_O},time:{getStandardPattern:()=>"HH:mm",components:IB},datetime:{getStandardPattern(){let i;return function(){let e=u("<input>").attr("type","datetime");e.val("2000-01-01T01:01Z"),e.val()&&(i="yyyy-MM-ddTHH:mmZ")}(),i||(i="yyyy-MM-ddTHH:mm:ssZ"),Es.FORMATS_INFO.datetime.getStandardPattern=function(){return i},i},components:[..._O,...IB]},"datetime-local":{getStandardPattern:()=>"yyyy-MM-ddTHH:mm:ss",components:[..._O,"hours","minutes","seconds"]}},FORMATS_MAP:{date:"shortdate",time:"shorttime",datetime:"shortdateshorttime"},SUBMIT_FORMATS_MAP:{date:"date",time:"time",datetime:"datetime-local"},toStandardDateFormat(i,e){let t=Es.FORMATS_INFO[e].getStandardPattern();return ut.serializeDate(i,t)},fromStandardDateFormat(i){let e=ut.dateParser(i);return Vt(e)?e:void 0},getMaxMonthDay:(i,e)=>new Date(i,e+1,0).getDate(),mergeDates(i,e,t){if(!e)return e||null;if(!i||isNaN(i.getTime())){let s=new Date(null);i=new Date(s.getFullYear(),s.getMonth(),s.getDate())}let n=new Date(i.valueOf()),o=Es.FORMATS_INFO[t];return x(o.components,function(){let s=Es.DATE_COMPONENTS_INFO[this];n[s.setter](e[s.getter]())}),n},getLongestCaptionIndex(i){let e=0,t=0,n;for(n=0;n<i.length;++n)i[n].length>t&&(e=n,t=i[n].length);return e},formatUsesMonthName:i=>he.formatUsesMonthName(i),formatUsesDayName:i=>he.formatUsesDayName(i),getLongestDate(i,e,t){let n=x9(i),o=9;(!n||Es.formatUsesMonthName(n))&&(o=Es.getLongestCaptionIndex(e));let s=new Date(1888,o,21,23,59,59,999);if(!n||Es.formatUsesDayName(n)){let r=s.getDate()-s.getDay()+Es.getLongestCaptionIndex(t);s.setDate(r)}return s},normalizeTime(i){i.setSeconds(0),i.setMilliseconds(0)}};Es.DATE_COMPONENTS_INFO={year:{getter:"getFullYear",setter:"setFullYear",formatter(i,e){let t=new Date(e.getTime());return t.setFullYear(i),he.format(t,"yyyy")},startValue:void 0,endValue:void 0},day:{getter:"getDate",setter:"setDate",formatter(i,e){let t=new Date(e.getTime());return t.setDate(i),he.format(t,"d")},startValue:1,endValue:void 0},month:{getter:"getMonth",setter:"setMonth",formatter:i=>he.getMonthNames()[i],startValue:0,endValue:11},hours:{getter:"getHours",setter:"setHours",formatter:i=>he.format(new Date(0,0,0,i),"hour"),startValue:0,endValue:23},minutes:{getter:"getMinutes",setter:"setMinutes",formatter:i=>he.format(new Date(0,0,0,0,i),"minute"),startValue:0,endValue:59},seconds:{getter:"getSeconds",setter:"setSeconds",formatter:i=>he.format(new Date(0,0,0,0,0,i),"second"),startValue:0,endValue:59},milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",formatter:i=>he.format(new Date(0,0,0,0,0,0,i),"millisecond"),startValue:0,endValue:999}};var lt=Es;var DB=function(i,e,t){v9(i,e,t)},v9=function(i,e,t){i.css("transform",`rotate(${e}deg) translate(0,${t}px)`)},TB=vi.inherit({_getDefaultOptions(){return m(this.callBase(),{value:new Date(Date.now()),use24HourFormat:!0,_showClock:!0,_arrowOffset:5,stylingMode:void 0})},_getValue(){return this.option("value")||new Date},_init(){this.callBase(),this.$element().addClass("dx-timeview")},_render(){this.callBase(),this._renderBox(),this._updateTime()},_renderBox(){let i=u("<div>").appendTo(this.$element()),e=[];this.option("_showClock")&&e.push({ratio:1,shrink:0,baseSize:"auto",template:this._renderClock.bind(this)}),e.push({ratio:0,shrink:0,baseSize:"auto",template:this._renderField.bind(this)}),this._createComponent(i,qa,{height:"100%",width:"100%",direction:"col",items:e})},_renderClock(i,e,t){this._$hourArrow=u("<div>").addClass("dx-timeview-hourarrow"),this._$minuteArrow=u("<div>").addClass("dx-timeview-minutearrow");let n=u(t);n.addClass("dx-timeview-clock").append(this._$hourArrow).append(this._$minuteArrow),this.setAria("role","presentation",n)},_updateClock(){let i=this._getValue(),e=i.getHours()/12*360+i.getMinutes()/60*30,t=i.getMinutes()/60*360;DB(this._$hourArrow,e,this.option("_arrowOffset")),DB(this._$minuteArrow,t,this.option("_arrowOffset"))},_getBoxItems(i){let e=[{ratio:0,shrink:0,baseSize:"auto",template:()=>this._hourBox.$element()},{ratio:0,shrink:0,baseSize:"auto",template:u("<div>").addClass("dx-timeview-time-separator").text(he.getTimeSeparator())},{ratio:0,shrink:0,baseSize:"auto",template:()=>this._minuteBox.$element()}];return i&&e.push({ratio:0,shrink:0,baseSize:"auto",template:()=>this._format12.$element()}),e},_renderField(){let i=!this.option("use24HourFormat");return this._createHourBox(i),this._createMinuteBox(),i&&this._createFormat12Box(),this._createComponent(u("<div>").addClass("dx-timeview-field"),qa,{direction:"row",align:"center",crossAlign:"center",items:this._getBoxItems(i)}).$element()},_createHourBox(i){(this._hourBox=this._createComponent(u("<div>"),ja,m({min:-1,max:i?13:24,value:this._getValue().getHours(),onValueChanged:this._onHourBoxValueChanged.bind(this),onKeyboardHandled:t=>this._keyboardHandler(t)},this._getNumberBoxConfig()))).setAria("label","hours")},_isPM(){return!this.option("use24HourFormat")&&this._format12.option("value")===1},_onHourBoxValueChanged(i){let{value:e,component:t}=i,n=this._getValue(),o=new Date(n),s=this._convertMaxHourToMin(e);t.option("value",s),this._isPM()&&(s+=12),o.setHours(s),lt.normalizeTime(o),this.option("value",o)},_convertMaxHourToMin(i){let e=this.option("use24HourFormat")?24:12;return(e+i)%e},_createMinuteBox(){(this._minuteBox=this._createComponent(u("<div>"),ja,m({min:-1,max:60,value:this._getValue().getMinutes(),onKeyboardHandled:e=>this._keyboardHandler(e),onValueChanged:e=>{let{value:t,component:n}=e,o=(60+t)%60;n.option("value",o);let s=new Date(this._getValue());s.setMinutes(o),lt.normalizeTime(s),this.option("value",s)}},this._getNumberBoxConfig()))).setAria("label","minutes")},_createFormat12Box(){let i=he.getPeriodNames();(this._format12=this._createComponent(u("<div>").addClass("dx-timeview-format12"),Nm,{items:[{value:-1,text:i[0]},{value:1,text:i[1]}],valueExpr:"value",displayExpr:"text",onKeyboardHandled:t=>this._keyboardHandler(t),onValueChanged:t=>{let{value:n}=t,o=this._getValue().getHours(),s=new Date(this._getValue()),r=(o+12*n)%24;s.setHours(r),this.option("value",s)},value:this._getValue().getHours()>=12?1:-1,stylingMode:this.option("stylingMode")})).setAria("label","type")},_refreshFormat12(){if(this.option("use24HourFormat"))return;let n=this._getValue().getHours()>=12?1:-1;this._silentEditorValueUpdate(this._format12,n)},_silentEditorValueUpdate(i,e){i&&(i._suppressValueChangeAction(),i.option("value",e),i._resumeValueChangeAction())},_getNumberBoxConfig(){return{showSpinButtons:!0,displayValueFormatter:i=>(i<10?"0":"")+i,stylingMode:this.option("stylingMode")}},_normalizeHours(i){return this.option("use24HourFormat")?i:i%12||12},_updateField(){let i=this._normalizeHours(this._getValue().getHours());this._silentEditorValueUpdate(this._hourBox,i),this._silentEditorValueUpdate(this._minuteBox,this._getValue().getMinutes()),this._refreshFormat12()},_updateTime(){this.option("_showClock")&&this._updateClock(),this._updateField()},_visibilityChanged(i){i&&this._updateTime()},_optionChanged(i){switch(i.name){case"value":this._updateTime(),this.callBase(i);break;case"_arrowOffset":break;case"use24HourFormat":case"_showClock":case"stylingMode":this._invalidate();break;default:this.callBase(i)}}});K("dxTimeView",TB);var AB=TB;var b9=q();var MB="dx-datebox-datetime-time-side",y9=Dd.inherit({NAME:"CalendarWithTime",getDefaultOptions(){return m(this.callBase(),{applyValueMode:"useButtons",buttonsLocation:"bottom after","dropDownOptions.showTitle":!1})},_closeDropDownByEnter(){return Y.sameDate(this._getContouredValue(),this.widgetOption("value"))},getDisplayFormat:i=>i||"shortdateshorttime",_is24HourFormat(){return he.is24HourFormat(this.getDisplayFormat(this.dateBox.option("displayFormat")))},_getContouredValue(){let i=this.callBase();return this._updateDateTime(i)},_renderWidget(){this.callBase(),this._timeView=this.dateBox._createComponent(u("<div>"),AB,{value:this.dateBoxValue(),_showClock:!this._isShrinkView(),use24HourFormat:this._is24HourFormat(),onValueChanged:this._valueChangedHandler.bind(this),stylingMode:this.dateBox.option("stylingMode")})},renderOpenedState(){this.callBase();let i=this._getPopup();i&&i.$wrapper().toggleClass("dx-datebox-adaptivity-mode",this._isSmallScreen()),clearTimeout(this._repaintTimer),this._repaintTimer=setTimeout(()=>{this._getPopup()&&this._getPopup().repaint()},0)},isAdaptivityChanged(){let i=this._isShrinkView(),e=this._currentAdaptiveMode;return i!==e?(this._currentAdaptiveMode=i,e!==void 0):this.callBase()},_updateValue(i){let e=this.dateBoxValue();!e&&!i&&(e=new Date,lt.normalizeTime(e)),this.callBase(),this._timeView&&(e&&this._timeView.option("value",e),this._timeView.option("use24HourFormat",this._is24HourFormat()))},_isSmallScreen:()=>W(b9)<=573,_isShrinkView(){return!this.dateBox.option("showAnalogClock")||this.dateBox.option("adaptivityEnabled")&&this._isSmallScreen()},_getBoxItems(){let i=[{ratio:0,shrink:0,baseSize:"auto",name:"calendar"}];return this._isShrinkView()||i.push({ratio:0,shrink:0,baseSize:"auto",name:"time"}),i},renderPopupContent(){this.callBase(),this._currentAdaptiveMode=this._isShrinkView();let i=this._getPopup().$content();this._box=this.dateBox._createComponent(u("<div>").appendTo(i),qa,{direction:"row",crossAlign:"stretch",items:this._getBoxItems(),itemTemplate:function(e,t,n){let o=u("<div>");switch(e.name){case"calendar":o.append(this._widget.$element()),this._isShrinkView()&&(this._timeView.$element().addClass(MB),o.append(this._timeView.$element()));break;case"time":o.append(this._timeView.$element()),u(n).addClass(MB)}return o}.bind(this)})},popupConfig(i){let e=this.callBase(i);return m(e,{width:"auto"})},_preventFocusOnPopup(i){u(i.target).hasClass("dx-texteditor-input")||(this.callBase.apply(this,arguments),this.dateBox._hasFocusClass()||this.dateBox.focus())},_updateDateTime(i){let e=this._timeView.option("value");return i.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),i},getValue(){let i=this._widget.option("value")??this._widget.getContouredDate();return i=i?new Date(i):new Date,this._updateDateTime(i)},dispose(){clearTimeout(this._removeMinWidthTimer),clearTimeout(this._repaintTimer),this.callBase()}}),RB=y9;var $u=class{constructor(e){this.DIRECTION_HORIZONTAL="horizontal",this.DIRECTION_VERTICAL="vertical",this.DIRECTION_BOTH="both",this.direction=e??Da}get isHorizontal(){return this.direction===Qp||this.direction===Zp}get isVertical(){return this.direction===Da||this.direction===Zp}get isBoth(){return this.direction===Zp}};function FB(i,e){if(X(i)){let o=Be(i.left,i.x),s=Be(i.top,i.y);return{left:f(o)?o:void 0,top:f(s)?s:void 0}}let{isHorizontal:t,isVertical:n}=new $u(e);return{left:t&&f(i)?i:void 0,top:n&&f(i)?i:void 0}}var $m=class extends Kl{_getDefaultOptions(){return m(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("dx-dateviewroller"),this._renderContainerClick(),this._renderItems(),this._renderSelectedValue(),this._renderItemsClick(),this._renderWheelEvent(),this._renderSelectedIndexChanged()}_renderSelectedIndexChanged(){this._selectedIndexChanged=this._createActionByOption("onSelectedIndexChanged")}_renderWheelEvent(){_.on(u(this.container()),"dxmousewheel",e=>{this._isWheelScrolled=!0})}_renderContainerClick(){if(!this.option("showOnClick"))return;let e=D(de,this.NAME),t=this._createActionByOption("onClick");_.off(u(this.container()),e),_.on(u(this.container()),e,n=>{t({event:n})})}_renderItems(){let e=this.option("items")||[],t=u();u(this.content()).empty(),e.forEach(n=>{t=t.add(u("<div>").addClass("dx-dateview-item").append(n))}),u(this.content()).append(t),this._$items=t,this.update()}_renderSelectedItemFrame(){u("<div>").addClass("dx-dateview-item-selected-frame").append(u("<div>").addClass("dx-dateview-item-selected-border")).appendTo(u(this.container()))}_renderSelectedValue(e){let t=this._fitIndex(e??this.option("selectedIndex"));this._moveTo({top:this._getItemPosition(t)}),this._renderActiveStateItem()}_fitIndex(e){let n=(this.option("items")||[]).length;return e>=n?n-1:e<0?0:e}_getItemPosition(e){return Math.round(this._itemHeight()*e)}_renderItemsClick(){let e=this._getItemSelector(),t=D(de,this.NAME);_.off(this.$element(),t,e),_.on(this.$element(),t,e,this._itemClickHandler.bind(this))}_getItemSelector(){return".dx-dateview-item"}_itemClickHandler(e){this.option("selectedIndex",this._itemElementIndex(e.currentTarget))}_itemElementIndex(e){return this._itemElements().index(e)}_itemElements(){return this.$element().find(this._getItemSelector())}_renderActiveStateItem(){let e=this.option("selectedIndex");x(this._$items,function(t){u(this).toggleClass("dx-dateview-item-selected",e===t)})}_shouldScrollToNeighborItem(){return F.real().deviceType==="desktop"&&this._isWheelScrolled}_moveTo(e){let{top:t,left:n}=FB(e),o=this.scrollOffset(),s={x:o.left-n,y:o.top-t};if(this._isVisible()&&(s.x||s.y))if(this._prepareDirections(!0),this._animation&&!this._shouldScrollToNeighborItem()){let r=this;fe.stop(u(this.content())),fe.animate(u(this.content()),{duration:200,type:"slide",to:{top:Math.floor(s.y)},complete(){rs(u(r.content())),r.handleMove({delta:s})}}),delete this._animation}else this.handleMove({delta:s})}_validate(e){return this._moveIsAllowed(e)}_fitSelectedIndexInRange(e){let t=this.option("items").length;return Math.max(Math.min(e,t-1),0)}_isInNullNeighborhood(e){return-.1<=e&&e<=.1}_getSelectedIndexAfterScroll(e){let t=this.scrollOffset().top,n=e*this._itemHeight(),o=t-n;if(this._isInNullNeighborhood(o))return e;let s=o>0?1:-1;return this._fitSelectedIndexInRange(e+s)}_getNewSelectedIndex(e){if(this._shouldScrollToNeighborItem())return this._getSelectedIndexAfterScroll(e);this._animation=!0;let t=this.scrollOffset().top/this._itemHeight();return Math.round(t)}_endActionHandler(){let e=this.option("selectedIndex"),t=this._getNewSelectedIndex(e);t===e?this._renderSelectedValue(t):this.option("selectedIndex",t),this._isWheelScrolled=!1}_itemHeight(){let e=this._$items.first();return Q(e)}_toggleActive(e){this.$element().toggleClass("dx-state-active",e)}_isVisible(){return u(this.container()).is(":visible")}_fireSelectedIndexChanged(e,t){this._selectedIndexChanged({value:e,previousValue:t,event:void 0})}_visibilityChanged(e){super._visibilityChanged(e),this._visibilityChangedHandler(e)}_visibilityChangedHandler(e){e&&(this._visibilityTimer=setTimeout(()=>{this._renderSelectedValue(this.option("selectedIndex"))})),this.toggleActiveState(!1)}toggleActiveState(e){this.$element().toggleClass("dx-dateviewroller-current",e)}_refreshSelectedIndex(){let e=this.option("selectedIndex"),t=this._fitIndex(e);t===e?this._renderActiveStateItem():this.option("selectedIndex",t)}_optionChanged(e){switch(e.name){case"selectedIndex":this._fireSelectedIndexChanged(e.value,e.previousValue),this._renderSelectedValue(e.value);break;case"items":this._renderItems(),this._refreshSelectedIndex();break;case"onClick":case"showOnClick":this._renderContainerClick();break;case"onSelectedIndexChanged":this._renderSelectedIndexChanged();break;default:super._optionChanged(e)}}_dispose(){clearTimeout(this._visibilityTimer),super._dispose()}};K("dxDateViewRoller",$m);var PB=$m;var kB={date:"date",datetime:"datetime",time:"time"},Pn={year:"year",month:"month",day:"day",hours:"hours"},BB=vi.inherit({_valueOption(){let i=this.option("value"),e=new Date(i);return!i||isNaN(e)?this._getDefaultDate():e},_getDefaultDate(){let i=new Date;return this.option("type")===kB.date?new Date(i.getFullYear(),i.getMonth(),i.getDate()):i},_getDefaultOptions(){return m(this.callBase(),{minDate:lt.MIN_DATEVIEW_DEFAULT_DATE,maxDate:lt.MAX_DATEVIEW_DEFAULT_DATE,type:kB.date,value:new Date,applyCompactClass:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:i=>i.deviceType!=="desktop",options:{applyCompactClass:!0}}])},_render(){this.callBase(),this.$element().addClass("dx-dateview"),this._toggleFormatClasses(this.option("type")),this._toggleCompactClass()},_toggleFormatClasses(i,e){this.$element().addClass(`dx-dateview-${i}`),e&&this.$element().removeClass(`dx-dateview-${e}`)},_toggleCompactClass(){this.$element().toggleClass("dx-dateview-compact",this.option("applyCompactClass"))},_wrapper(){return this._$wrapper},_renderContentImpl(){this._$wrapper=u("<div>").addClass("dx-dateview-wrapper"),this._renderRollers(),this._$wrapper.appendTo(this.$element())},_renderRollers(){this._$rollersContainer||(this._$rollersContainer=u("<div>").addClass("dx-dateview-rollers")),this._$rollersContainer.empty(),this._createRollerConfigs(),this._rollers={};let i=this;x(i._rollerConfigs,e=>{let t=u("<div>").appendTo(i._$rollersContainer).addClass(`dx-dateviewroller-${i._rollerConfigs[e].type}`);i._rollers[i._rollerConfigs[e].type]=i._createComponent(t,PB,{items:i._rollerConfigs[e].displayItems,selectedIndex:i._rollerConfigs[e].selectedIndex,showScrollbar:"never",scrollByContent:!0,onStart(n){let o=n.component;o._toggleActive(!0),i._setActiveRoller(i._rollerConfigs[e],o.option("selectedIndex"))},onEnd(n){n.component._toggleActive(!1)},onClick(n){let o=n.component;o._toggleActive(!0),i._setActiveRoller(i._rollerConfigs[e],o.option("selectedIndex")),i._setRollerState(i._rollerConfigs[e],o.option("selectedIndex")),o._toggleActive(!1)},onSelectedIndexChanged(n){let o=n.component;i._setRollerState(i._rollerConfigs[e],o.option("selectedIndex"))}})}),i._$rollersContainer.appendTo(i._wrapper())},_createRollerConfigs(i){let e=this;i=i||e.option("type"),e._rollerConfigs={},he.getFormatParts(lt.FORMATS_MAP[i]).forEach(t=>{e._createRollerConfig(t)})},_createRollerConfig(i){let e=lt.DATE_COMPONENTS_INFO[i],t=this._calculateRollerConfigValueRange(i),{startValue:n}=t,{endValue:o}=t,{formatter:s}=e,r=this._getCurrentDate(),a={type:i,setValue:e.setter,valueItems:[],displayItems:[],getIndex:l=>l[e.getter]()-n};for(let l=n;l<=o;l++)a.valueItems.push(l),a.displayItems.push(s(l,r));a.selectedIndex=a.getIndex(r),this._rollerConfigs[i]=a},_setActiveRoller(i){let e=i&&this._rollers[i.type];x(this._rollers,function(){this.toggleActiveState(this===e)})},_updateRollersPosition(){let i=this;x(this._rollers,function(e){let t=i._rollerConfigs[e].getIndex(i._getCurrentDate());this.option("selectedIndex",t)})},_setRollerState(i,e){if(e!==i.selectedIndex){let t=i.valueItems[e],{setValue:n}=i,o=new Date(this._getCurrentDate()),s=o.getDate(),r=this.option("minDate"),a=this.option("maxDate");i.type===Pn.month?s=Math.min(s,lt.getMaxMonthDay(o.getFullYear(),t)):i.type===Pn.year&&(s=Math.min(s,lt.getMaxMonthDay(t,o.getMonth()))),o.setDate(s),o[n](t);let l=Y.normalizeDate(o,r,a);o=lt.mergeDates(l,o,"time"),o=Y.normalizeDate(o,r,a),this.option("value",o),i.selectedIndex=e}i.type===Pn.year&&this._refreshRollers(),i.type===Pn.month&&(this._refreshRoller(Pn.day),this._refreshRoller(Pn.hours))},_refreshRoller(i){let e=this._rollers[i];if(e){this._createRollerConfig(i);let t=this._rollerConfigs[i];(i===Pn.day||t.displayItems.toString()!==e.option("items").toString())&&e.option({items:t.displayItems,selectedIndex:t.selectedIndex})}},_getCurrentDate(){let i=this._valueOption(),e=this.option("minDate"),t=this.option("maxDate");return Y.normalizeDate(i,e,t)},_calculateRollerConfigValueRange(i){let e=this._getCurrentDate(),t=this.option("minDate"),n=this.option("maxDate"),o=Y.sameYear(e,t),s=o&&e.getMonth()===t.getMonth(),r=Y.sameYear(e,n),a=r&&e.getMonth()===n.getMonth(),l=s&&e.getDate()===t.getDate(),d=a&&e.getDate()===n.getDate(),c=lt.DATE_COMPONENTS_INFO[i],{startValue:h}=c,{endValue:p}=c;return i===Pn.year&&(h=t.getFullYear(),p=n.getFullYear()),i===Pn.month&&(o&&(h=t.getMonth()),r&&(p=n.getMonth())),i===Pn.day&&(p=lt.getMaxMonthDay(e.getFullYear(),e.getMonth()),o&&s&&(h=t.getDate()),r&&a&&(p=n.getDate())),i===Pn.hours&&(h=l?t.getHours():h,p=d?n.getHours():p),{startValue:h,endValue:p}},_refreshRollers(){this._refreshRoller(Pn.month),this._refreshRoller(Pn.day),this._refreshRoller(Pn.hours)},_optionChanged(i){switch(i.name){case"minDate":case"maxDate":case"type":this._renderRollers(),this._toggleFormatClasses(i.value,i.previousValue);break;case"visible":this.callBase(i),i.value&&this._renderRollers();break;case"value":this.option("value",this._valueOption()),this._refreshRollers(),this._updateRollersPosition();break;default:this.callBase(i)}},_clean(){this.callBase(),delete this._$rollersContainer}});K("dxDateView",BB);var VB=BB;var O9=q(),E9=ra.inherit({NAME:"DateView",getDefaultOptions(){return m(this.callBase(),{openOnFieldClick:!0,applyButtonText:O.format("OK"),"dropDownOptions.showTitle":!0})},getDisplayFormat(i){return i||lt.FORMATS_MAP[this.dateBox.option("type")]},popupConfig(i){return{toolbarItems:this.dateBox._popupToolbarItemsConfig(),onInitialized:i.onInitialized,defaultOptionsRules:[{device:{platform:"android"},options:{width:333,height:331}},{device(e){let{platform:t}=e;return t==="generic"||t==="ios"},options:{width:"auto",height:"auto"}},{device(e){let{platform:t}=e,{phone:n}=e;return t==="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:O9}}}]}},_renderWidget(){if(Oa(this.dateBox.option("mode"))&&this.dateBox._isNativeType()||this.dateBox.option("readOnly")){this._widget&&(this._widget.$element().remove(),this._widget=null);return}let i=this._getPopup();if(this._widget)this._widget.option(this._getWidgetOptions());else{let e=u("<div>").appendTo(i.$content());this._widget=this._createWidget(e)}this._widget.$element().appendTo(this._getWidgetContainer())},_getWidgetName:()=>VB,renderOpenedState(){this.callBase(),this._widget&&this._widget.option("value",this._widget._getCurrentDate())},_getWidgetOptions(){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*lt.ONE_YEAR),onDisposing:function(){this._widget=null}.bind(this)}}}),LB=E9;var w9=q();var S9={min:new Date(0,0,0,0,0),max:new Date(0,0,0,23,59)},I9=ra.inherit({NAME:"List",supportedKeys:()=>({space:E,home:E,end:E}),getDefaultOptions(){return m(this.callBase(),{applyValueMode:"instantly"})},getDisplayFormat:i=>i||"shorttime",popupConfig:i=>i,getValue(){let i=this._widget.option("selectedIndex");if(i===-1)return this.dateBox.option("value");let e=this._widgetItems[i];return this._getDateByItemData(e)},useCurrentDateByDefault:()=>!0,getDefaultDate:()=>new Date(null),popupShowingHandler(){this.dateBox._dimensionChanged()},_renderWidget(){this.callBase(),this._refreshItems()},_getWidgetName:()=>ys,_getWidgetOptions(){return{itemTemplate:this._timeListItemTemplate.bind(this),onItemClick:this._listItemClickHandler.bind(this),tabIndex:-1,onFocusedItemChanged:this._refreshActiveDescendant.bind(this),selectionMode:"single"}},_refreshActiveDescendant(i){this.dateBox.setAria("activedescendant",""),this.dateBox.setAria("activedescendant",i.actionValue)},_refreshItems(){this._widgetItems=this._getTimeListItems(),this._widget.option("items",this._widgetItems)},renderOpenedState(){this._widget&&(this._widget.option("focusedElement",null),this._setSelectedItemsByValue(),this._widget.option("templatesRenderAsynchronously")?this._asyncScrollTimeout=setTimeout(this._scrollToSelectedItem.bind(this)):this._scrollToSelectedItem())},dispose(){this.callBase(),clearTimeout(this._asyncScrollTimeout)},_updateValue(){this._widget&&(this._refreshItems(),this._setSelectedItemsByValue(),this._scrollToSelectedItem())},_setSelectedItemsByValue(){let i=this.dateBoxValue(),e=this._getDateIndex(i);e===-1?this._widget.option("selectedItems",[]):this._widget.option("selectedIndex",e)},_scrollToSelectedItem(){this._widget.scrollToItem(this._widget.option("selectedIndex"))},_getDateIndex(i){let e=-1;for(let t=0,n=this._widgetItems.length;t<n;t++)if(this._areDatesEqual(i,this._widgetItems[t])){e=t;break}return e},_areDatesEqual:(i,e)=>Vt(i)&&Vt(e)&&i.getHours()===e.getHours()&&i.getMinutes()===e.getMinutes(),_getTimeListItems(){let i=this.dateBox.dateOption("min")||this._getBoundaryDate("min"),e=this.dateBox.dateOption("max")||this._getBoundaryDate("max"),t=this.dateBox.dateOption("value")||null,n=e-i,o=i.getMinutes()%this.dateBox.option("interval");return n<0?[]:(n>lt.ONE_DAY&&(n=lt.ONE_DAY),t-i<lt.ONE_DAY?this._getRangeItems(i,new Date(i),n):(i=this._getBoundaryDate("min"),i.setMinutes(o),t&&Math.abs(t-e)<lt.ONE_DAY&&(n=(60*e.getHours()+Math.abs(e.getMinutes()-o))*lt.ONE_MINUTE),this._getRangeItems(i,new Date(i),n)))},_getRangeItems(i,e,t){let n=[],o=this.dateBox.option("interval");for(;e-i<=t;)n.push(new Date(e)),e.setMinutes(e.getMinutes()+o);return n},_getBoundaryDate(i){let e=S9[i],t=new Date(Be(this.dateBox.dateOption("value"),0));return new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes())},_timeListItemTemplate(i){let e=this.dateBox.option("displayFormat");return he.format(i,this.getDisplayFormat(e))},_listItemClickHandler(i){if(this.dateBox.option("applyValueMode")==="useButtons")return;let e=this._getDateByItemData(i.itemData);this.dateBox.option("opened",!1),this.dateBoxValue(e,i.event)},_getDateByItemData(i){let e=this.dateBox.option("value"),t=i.getHours(),n=i.getMinutes(),o=i.getSeconds(),s=i.getFullYear(),r=i.getMonth(),a=i.getDate();return e?(this.dateBox.option("dateSerializationFormat")?e=ut.deserializeDate(e):e=new Date(e),e.setHours(t),e.setMinutes(n),e.setSeconds(o),e.setFullYear(s),e.setMonth(r),e.setDate(a)):e=new Date(s,r,a,t,n,0,0),e},getKeyboardListener(){return this._widget},_updatePopupHeight(){let i=Ed(this.dateBox.option("dropDownOptions.height"));if(i===void 0||i==="auto"){this.dateBox._setPopupOption("height","auto");let e=ee(this._widget.$element()),t=.45*Q(w9);this.dateBox._setPopupOption("height",Math.min(e,t))}this.dateBox._timeList&&this.dateBox._timeList.updateDimensions()},getParsedText(i,e){let t=this.callBase(i,e);return t&&(t=lt.mergeDates(t,new Date(null),"date")),t}}),NB=I9;var D9=ra.inherit({NAME:"Native",popupConfig:i=>m({},i,{width:"auto"}),getParsedText(i){return i?this.dateBox.option("type")==="datetime"?new Date(i.replace(/-/g,"/").replace("T"," ").split(".")[0]):lt.fromStandardDateFormat(i):null},renderPopupContent:E,_getWidgetName:E,_getWidgetOptions:E,_getDateBoxType(){let i=this.dateBox.option("type");return lt.SUPPORTED_FORMATS.includes(i)?i==="datetime"&&!Oa(i)&&(i="datetime-local"):i="date",i},customizeButtons(){let i=this.dateBox.getButton("dropDown");F.real().android&&i&&i.on("click",()=>{this.dateBox._input().get(0).click()})},getDefaultOptions(){return{mode:this._getDateBoxType()}},getDisplayFormat(i){let e=this._getDateBoxType();return i||lt.FORMATS_MAP[e]},renderInputMinMax(i){let e=this.dateBox.option("type"),t={datetime:"yyyy-MM-ddTHH:mm:ss",date:"yyyy-MM-dd",time:"HH:mm:ss"}[e]??"yyyy-MM-dd";i.attr({min:ut.serializeDate(this.dateBox.dateOption("min"),t),max:ut.serializeDate(this.dateBox.dateOption("max"),t)})}}),HB=D9;var zu=q();var T9="dx-show-invalid-badge",A9="dx-clear-button-area";var yo={calendar:"calendar",rollers:"rollers",list:"list",native:"native"},Oo={date:"date",datetime:"datetime",time:"time"},Wu={calendar:"Calendar",dateView:"DateView",native:"Native",calendarWithTime:"CalendarWithTime",list:"List"},M9={Calendar:Dd,DateView:LB,Native:HB,CalendarWithTime:RB,List:NB},R9=wd.inherit({_supportedKeys(){return m(this.callBase(),this._strategy.supportedKeys())},_renderButtonContainers(){this.callBase.apply(this,arguments),this._strategy.customizeButtons()},_getDefaultOptions(){return m(this.callBase(),{type:"date",showAnalogClock:!0,value:null,dateSerializationFormat:void 0,min:void 0,max:void 0,displayFormat:null,interval:30,disabledDates:null,pickerType:yo.calendar,invalidDateMessage:O.format("dxDateBox-validation-datetime"),dateOutOfRangeMessage:O.format("validation-range"),applyButtonText:O.format("OK"),adaptivityEnabled:!1,calendarOptions:{},useHiddenSubmitElement:!0,_showValidationIcon:!0})},_defaultOptionsRules(){return this.callBase().concat([{device:{platform:"ios"},options:{"dropDownOptions.showTitle":!0}},{device:{platform:"android"},options:{buttonsLocation:"bottom after"}},{device(){let i=F.real(),{platform:e}=i;return e==="ios"||e==="android"},options:{pickerType:yo.native}},{device:{platform:"generic",deviceType:"desktop"},options:{buttonsLocation:"bottom after"}}])},_initOptions(i){this._userOptions=m({},i),this.callBase(i),this._updatePickerOptions()},_updatePickerOptions(){let i=this.option("pickerType"),e=this.option("type");i===yo.list&&(e===Oo.datetime||e===Oo.date)&&(i=yo.calendar),e===Oo.time&&i===yo.calendar&&(i=yo.list),this._pickerType=i,this._setShowDropDownButtonOption()},_setShowDropDownButtonOption(){let{platform:i}=F.real(),e=i==="android"&&we.mozilla,t=this._isNativeType(),n=i!=="generic"||!t;t&&e&&(n=!1),this.option({showDropDownButton:n})},_init(){this._initStrategy(),this.option(m({},this._strategy.getDefaultOptions(),this._userOptions)),delete this._userOptions,this.callBase()},_toLowerCaseFirstLetter:i=>i.charAt(0).toLowerCase()+i.substr(1),_initStrategy(){let i=this._getStrategyName(this._getFormatType()),e=M9[i];this._strategy&&this._strategy.NAME===i||(this._strategy=new e(this))},_getFormatType(){let i=this.option("type"),e=/h|m|s/g.test(i),t=/d|M|Y/g.test(i),n="";return t&&(n+=Oo.date),e&&(n+=Oo.time),n},_getStrategyName(i){let e=this._pickerType;return e===yo.rollers?Wu.dateView:e===yo.native?Wu.native:i===Oo.date?Wu.calendar:i===Oo.datetime?Wu.calendarWithTime:Wu.list},_initMarkup(){this.$element().addClass("dx-datebox"),this.callBase(),this._refreshFormatClass(),this._refreshPickerTypeClass(),this._strategy.renderInputMinMax(this._input())},_render(){this.callBase(),this._formatValidationIcon()},_renderDimensions(){this.callBase(),this.$element().toggleClass("dx-auto-width",!this.option("width")),this._updatePopupWidth(),this._updatePopupHeight()},_dimensionChanged(){this.callBase(),this._updatePopupHeight()},_updatePopupHeight(){if(this._popup){var i,e;(i=(e=this._strategy)._updatePopupHeight)===null||i===void 0||i.call(e)}},_refreshFormatClass(){let i=this.$element();x(Oo,(e,t)=>{i.removeClass(`dx-datebox-${t}`)}),i.addClass(`dx-datebox-${this.option("type")}`)},_refreshPickerTypeClass(){let i=this.$element();x(yo,(e,t)=>{i.removeClass(`dx-datebox-${t}`)}),i.addClass(`dx-datebox-${this._pickerType}`)},_formatValidationIcon(){if(!j())return;let i=this._input().get(0),e=this.option("rtlEnabled"),t=this._getClearButtonWidth(),n=this._getLongestElementDimensions(),o=parseFloat(zu.getComputedStyle(i).width)-t,s=n.width>o,{style:r}=i;this.$element().toggleClass(T9,!s&&this.option("_showValidationIcon")),s?(this._storedPadding===void 0&&(this._storedPadding=e?n.leftPadding:n.rightPadding),e?r.paddingLeft=0:r.paddingRight=0):e?r.paddingLeft=`${this._storedPadding}px`:r.paddingRight=`${this._storedPadding}px`},_getClearButtonWidth(){let i=0;if(this._isClearButtonVisible()&&this._input().val()===""){let e=this.$element().find(`.${A9}`).get(0);i=parseFloat(zu.getComputedStyle(e).width)}return i},_getLongestElementDimensions(){let i=this._strategy.getDisplayFormat(this.option("displayFormat")),e=he.format(lt.getLongestDate(i,he.getMonthNames(),he.getDayNames()),i),t=this._input(),n=t.get(0),o=yD(t,e),r=this._storedPadding!==void 0?this._storedPadding:0;o.appendTo(this.$element());let a=parseFloat(zu.getComputedStyle(o.get(0)).width),l=parseFloat(zu.getComputedStyle(n).paddingRight),d=parseFloat(zu.getComputedStyle(n).paddingLeft),c=a+d+l+r;return o.remove(),{width:c,leftPadding:d,rightPadding:l}},_getKeyboardListeners(){return this.callBase().concat([this._strategy&&this._strategy.getKeyboardListener()])},_renderPopup(){this.callBase(),this._popup.$wrapper().addClass("dx-datebox-wrapper"),this._renderPopupWrapper()},_getPopupToolbarItems(){var i,e;let t=this.callBase();return((i=(e=this._strategy)._getPopupToolbarItems)===null||i===void 0?void 0:i.call(e,t))??t},_popupConfig(){let i=this.callBase();return m(this._strategy.popupConfig(i),{title:this._getPopupTitle(),dragEnabled:!1})},_renderPopupWrapper(){if(!this._popup)return;let i=this.$element(),e=m({},Oo,yo);x(e,(t,n)=>{i.removeClass(`dx-datebox-wrapper-${n}`)}),this._popup.$wrapper().addClass(`dx-datebox-wrapper-${this.option("type")}`).addClass(`dx-datebox-wrapper-${this._pickerType}`).addClass("dx-dropdowneditor-overlay")},_renderPopupContent(){this.callBase(),this._strategy.renderPopupContent()},_popupShowingHandler(){this.callBase(),this._strategy.popupShowingHandler()},_popupShownHandler(){this.callBase(),this._strategy.renderOpenedState()},_popupHiddenHandler(){this.callBase(),this._strategy.renderOpenedState(),this._strategy.popupHiddenHandler()},_visibilityChanged(i){i&&this._formatValidationIcon()},_clearValueHandler(i){this.option("text",""),this.callBase(i)},_readOnlyPropValue(){if(this._pickerType===yo.rollers)return!0;let{platform:i}=F.real();return this._isNativeType()&&(i==="ios"||i==="android")?this.option("readOnly"):this.callBase()},_isClearButtonVisible(){return this.callBase()&&!this._isNativeType()},_renderValue(){let i=this.dateOption("value");return this.option("text",this._getDisplayedText(i)),this._strategy.renderValue(),this.callBase()},_setSubmitValue(){let i=this.dateOption("value"),e=this.option("dateSerializationFormat"),t=lt.SUBMIT_FORMATS_MAP[this.option("type")],n=e?ut.serializeDate(i,e):lt.toStandardDateFormat(i,t);this._getSubmitElement().val(n)},_getDisplayedText(i){let e=this.option("mode"),t;if(e==="text"){let n=this._strategy.getDisplayFormat(this.option("displayFormat"));t=he.format(i,n)}else{let n=this._getFormatByMode(e);n?t=he.format(i,n):t=lt.toStandardDateFormat(i,e)}return t},_getFormatByMode:i=>Oa(i)?null:lt.FORMATS_MAP[i],_valueChangeEventHandler(i){let{text:e,type:t,validationError:n}=this.option(),o=this.dateOption("value");if(e===this._getDisplayedText(o)){this._recallInternalValidation(o,n);return}let s=this._getParsedDate(e),r=o??this._getDateByDefault(),a=lt.mergeDates(r,s,t),l=s&&t==="time"?a:s;if(this._applyInternalValidation(l).isValid){let d=this._getDisplayedText(a);r&&a&&r.getTime()===a.getTime()&&d!==e?this._renderValue():this.dateValue(a,i)}},_recallInternalValidation(i,e){(!e||e.editorSpecific)&&(this._applyInternalValidation(i),this._applyCustomValidation(i))},_getDateByDefault(){return this._strategy.useCurrentDateByDefault()&&this._strategy.getDefaultDate()},_getParsedDate(i){let e=this._strategy.getDisplayFormat(this.option("displayFormat"));return this._strategy.getParsedText(i,e)??void 0},_applyInternalValidation(i){let t=!!this.option("text")&&i!==null,n=!!i&&Vt(i)&&!isNaN(i.getTime()),o=n&&Y.dateInRange(i,this.dateOption("min"),this.dateOption("max"),this.option("type")),s=!t&&!i||o,r="";return n?o||(r=this.option("dateOutOfRangeMessage")):r=this.option("invalidDateMessage"),this._updateInternalValidationState(s,r),{isValid:s,isDate:n}},_updateInternalValidationState(i,e){this.option({isValid:i,validationError:i?null:{editorSpecific:!0,message:e}})},_applyCustomValidation(i){this.validationRequest.fire({editor:this,value:this._serializeDate(i)})},_isValueChanged(i){let e=this.dateOption("value"),t=e&&e.getTime(),n=i&&i.getTime();return t!==n},_isTextChanged(i){let e=this.option("text"),t=i&&this._getDisplayedText(i)||"";return e!==t},_renderProps(){this.callBase(),this._input().attr("autocomplete","off")},_renderOpenedState(){this._isNativeType()||this.callBase(),this._strategy.isAdaptivityChanged()&&this._refreshStrategy()},_getPopupTitle(){let i=this.option("placeholder");if(i)return i;let e=this.option("type");return e===Oo.time?O.format("dxDateBox-simulatedDataPickerTitleTime"):e===Oo.date||e===Oo.datetime?O.format("dxDateBox-simulatedDataPickerTitleDate"):""},_refreshStrategy(){this._strategy.dispose(),this._initStrategy(),this.option(this._strategy.getDefaultOptions()),this._refresh()},_applyButtonHandler(i){let e=this._strategy.getValue();this.dateValue(e,i.event),this.callBase()},_dispose(){var i;this.callBase(),(i=this._strategy)===null||i===void 0||i.dispose()},_isNativeType(){return this._pickerType===yo.native},_updatePopupTitle(){var i;(i=this._popup)===null||i===void 0||i.option("title",this._getPopupTitle())},_optionChanged(i){switch(i.name){case"showClearButton":case"buttons":case"isValid":case"readOnly":this.callBase.apply(this,arguments),this._formatValidationIcon();break;case"pickerType":this._updatePickerOptions({pickerType:i.value}),this._refreshStrategy(),this._refreshPickerTypeClass(),this._invalidate();break;case"type":this._updatePickerOptions({format:i.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":{let e=this.option("isValid");this._applyInternalValidation(this.dateOption("value")),e||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(i.value),this.callBase.apply(this,arguments);break;case"showDropDownButton":this._formatValidationIcon(),this.callBase.apply(this,arguments);break;case"todayButtonText":this._setPopupOption("toolbarItems",this._getPopupToolbarItems());break;case"invalidDateMessage":case"dateOutOfRangeMessage":case"adaptivityEnabled":case"showAnalogClock":case"_showValidationIcon":break;default:this.callBase.apply(this,arguments)}},_getSerializationFormat(){let i=this.option("value");if(this.option("dateSerializationFormat")&&xe().forceIsoDateParsing)return this.option("dateSerializationFormat");if(Oe(i))return"number";if(B(i))return ut.getDateSerializationFormat(i)},_updateValue(i){this.callBase(),this._applyInternalValidation(i??this.dateOption("value"))},dateValue(i,e){let t=this._isValueChanged(i);return t&&e&&this._saveValueChangeEvent(e),t||(this._isTextChanged(i)?this._updateValue(i):this.option("text")===""&&this._applyCustomValidation(i)),this.dateOption("value",i)},dateOption(i,e){if(arguments.length===1)return ut.deserializeDate(this.option(i));this.option(i,this._serializeDate(e))},_serializeDate(i){let e=this._getSerializationFormat();return ut.serializeDate(i,e)},_clearValue(){let i=this.option("value");this.callBase(),i===null&&this._applyCustomValidation(null)},clear(){let i=this.option("value");this.callBase(),i===null&&this._applyInternalValidation(null)}}),$B=R9;var zB=i=>i.getMonth()+1,WB=(i,e)=>{let t=i.getDate(),n=Gu("M",i),o=It(parseInt(e),n.min,n.max);i.setMonth(o-1,1);let{min:s,max:r}=Gu("dM",i),a=It(t,s,r);i.setDate(a)},F9={a:i=>i.getHours()<12?0:1,E:"getDay",y:"getFullYear",M:zB,L:zB,d:"getDate",H:"getHours",h:"getHours",m:"getMinutes",s:"getSeconds",S:"getMilliseconds",x:"getTimezoneOffset"},P9=m({},dF(),{a:(i,e)=>{let t=i.getHours();t>=12!==!!parseInt(e)&&i.setHours((t+12)%24)},d:(i,e)=>{let t=Gu("dM",i).max;e>t&&i.setMonth(i.getMonth()+1),i.setDate(e)},h:(i,e)=>{let t=i.getHours()>=12;i.setHours(+e%12+(t?12:0))},M:WB,L:WB,E:(i,e)=>{e<0||i.setDate(i.getDate()-i.getDay()+parseInt(e))},y:(i,e)=>{let t=i.getFullYear(),n=String(e).length,o=String(Gu("y",i).max).length,s=parseInt(String(t).substr(0,o-n)+e);i.setFullYear(s)},x:i=>i}),k9=i=>F9[i]||(()=>i),GB=(i,e)=>{let t=e.regexp.exec(i),n=0,o=0,s=[];for(let r=1;r<t.length;r++){n=o,o=n+t[r].length;let a=e.patterns[r-1].replace(/^'|'$/g,""),l=k9(a[0]);s.push({index:r-1,isStub:a===t[r],caret:{start:n,end:o},pattern:a,text:t[r],limits:function(){for(var d=arguments.length,c=new Array(d),h=0;h<d;h++)c[h]=arguments[h];return Gu(a[0],...c)},setter:P9[a[0]]||E,getter:l})}return s},Gu=(i,e,t)=>{let 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(e.getFullYear(),e.getMonth()+1,0).getDate()},E:{min:0,max:6},H:{min:0,max:23},h:{min:1,max:12},m:{min:0,max:59},s:{min:0,max:59},S:{min:0,max:999},a:{min:0,max:1},x:{min:0,max:0}};return n[t||i]||n.getAmPm},jB=(i,e)=>{for(let t=0;t<i.length;t++){let n=i[t].caret.end>=e;if(!i[t].isStub&&n)return t}return null};var B9=$B.inherit({_supportedKeys(i){let e=this.callBase(i),t=o=>{let s=e[ke(o)];return s&&s.apply(this,[o])},n=(o,s)=>this._shouldUseOriginalHandler(o)?t.apply(this,[o]):s.apply(this,[o]);return m({},e,{del:o=>n(o,s=>{this._revertPart(1),this._isAllSelected()||s.preventDefault()}),backspace:o=>n(o,s=>{this._revertPart(-1),this._isAllSelected()||s.preventDefault()}),home:o=>n(o,s=>{this._selectFirstPart(),s.preventDefault()}),end:o=>n(o,s=>{this._selectLastPart(),s.preventDefault()}),escape:o=>n(o,s=>{this._revertChanges(s)}),enter:o=>n(o,()=>{this._enterHandler()}),leftArrow:o=>n(o,s=>{this._selectNextPart(-1),s.preventDefault()}),rightArrow:o=>n(o,s=>{this._selectNextPart(1),s.preventDefault()}),upArrow:o=>n(o,s=>{this._upDownArrowHandler(1),s.preventDefault()}),downArrow:o=>n(o,s=>{this._upDownArrowHandler(-1),s.preventDefault()})})},_shouldUseOriginalHandler(i){let e=this.option("opened")&&i&&!["backspace","del"].includes(ke(i));return!this._useMaskBehavior()||e||i&&i.altKey},_upDownArrowHandler(i){this._setNewDateIfEmpty();let e=this._getActivePartValue(this._initialMaskValue),n=this._getActivePartValue()-e;this._loadMaskValue(this._initialMaskValue),this._changePartValue(n+i,!0)},_changePartValue(i,e){let t=this._getActivePartProp("pattern");/^a{1,5}$/.test(t)?this._toggleAmPm():this._partIncrease(i,e)},_toggleAmPm(){let i=this._getActivePartProp("text"),t=1^rr.getPeriodNames().indexOf(i);this._setActivePartValue(t)},_getDefaultOptions(){return m(this.callBase(),{useMaskBehavior:!1,emptyDateValue:new Date(2e3,0,1,0,0,0)})},_isSingleCharKey(i){let{originalEvent:e,alt:t}=i,n=e.data||e.key;return typeof n=="string"&&n.length===1&&!t&&!ft(e)},_isSingleDigitKey(i){var e;let t=(e=i.originalEvent)===null||e===void 0?void 0:e.data;return t?.length===1&&parseInt(t,10)},_useBeforeInputEvent:()=>F.real().android,_keyInputHandler(i,e){let t=this._input().val();this._processInputKey(e),i.preventDefault(),t!==this._input().val()&&_.trigger(this._input(),"input")},_keyboardHandler(i){let{key:e}=i.originalEvent,t=this.callBase(i);return!this._useMaskBehavior()||this._useBeforeInputEvent()||(we.chrome&&i.key==="Process"&&i.code.indexOf("Digit")===0?(e=i.code.replace("Digit",""),this._processInputKey(e),this._maskInputHandler=()=>{this._renderSelectedPart()}):this._isSingleCharKey(i)&&this._keyInputHandler(i.originalEvent,e)),t},_maskBeforeInputHandler(i){this._maskInputHandler=null;let{inputType:e}=i.originalEvent;e==="insertCompositionText"&&(this._maskInputHandler=()=>{this._renderSelectedPart()});let t=e==="deleteContentBackward";if(t||e==="deleteContentForward"){let s=t?-1:1;this._maskInputHandler=()=>{this._revertPart(),this._selectNextPart(s)}}if(!this._useMaskBehavior()||!this._isSingleCharKey(i))return;let o=i.originalEvent.data;return this._keyInputHandler(i,o),!0},_keyPressHandler(i){let{originalEvent:e}=i;e?.inputType==="insertCompositionText"&&this._isSingleDigitKey(i)&&(this._processInputKey(e.data),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()),this.callBase(i),this._maskInputHandler&&(this._maskInputHandler(),this._maskInputHandler=null)},_processInputKey(i){this._isAllSelected()&&(this._activePartIndex=0),this._setNewDateIfEmpty(),isNaN(parseInt(i))?this._searchString(i):this._searchNumber(i)},_isAllSelected(){let i=this._caret();return i.end-i.start===this.option("text").length},_getFormatPattern(){if(this._formatPattern)return this._formatPattern;let i=this._strategy.getDisplayFormat(this.option("displayFormat"));return B(i)&&!he._getPatternByFormat(i)?this._formatPattern=i:this._formatPattern=tm(t=>he.format(t,i)),this._formatPattern},_setNewDateIfEmpty(){if(!this._maskValue){let i=this.option("type")==="time"?new Date(null):new Date;this._maskValue=i,this._initialMaskValue=i,this._renderDateParts()}},_partLimitsReached(i){let e=String(i).length,t=this._getActivePartProp("pattern").length,o=t===1?e:Math.min(t,e),s=this._searchValue.length===o,r=parseInt(`${this._searchValue}0`)>i;return s||r},_searchNumber(i){let{max:e}=this._getActivePartLimits(),t=String(e).length;this._searchValue=(this._searchValue+i).substr(-t),isNaN(this._searchValue)&&(this._searchValue=i),this._setActivePartValue(this._searchValue),this._partLimitsReached(e)&&this._selectNextPart(1)},_searchString(i){if(!isNaN(parseInt(this._getActivePartProp("text"))))return;let e=this._getActivePartProp("limits")(this._maskValue),t=this._searchValue+i.toLowerCase(),n=e.max-e.min;for(let o=0;o<=n;o++)if(this._loadMaskValue(this._initialMaskValue),this._changePartValue(o+1),this._getActivePartProp("text").toLowerCase().indexOf(t)===0){this._searchValue=t;return}this._setNewDateIfEmpty(),this._searchValue&&(this._clearSearchValue(),this._searchString(i))},_clearSearchValue(){this._searchValue=""},_revertPart(i){if(!this._isAllSelected()){let e=this._getActivePartValue(this.option("emptyDateValue"));this._setActivePartValue(e),this._selectNextPart(i)}this._clearSearchValue()},_useMaskBehavior(){return this.option("useMaskBehavior")&&this.option("mode")==="text"},_prepareRegExpInfo(){this._regExpInfo=zb(this._getFormatPattern(),he);let{regexp:i}=this._regExpInfo,{source:e}=i,{flags:t}=i,n=new RegExp(/(\{[0-9]+,?[0-9]*\})/),o=e.split(n).map(s=>n.test(s)?s:Qe.convertDigits(s,!1)).join("");this._regExpInfo.regexp=new RegExp(o,t)},_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())return;let i=this.option("text")||this._getDisplayedText(this._maskValue);i&&(this._dateParts=GB(i,this._regExpInfo),this._input().is(":hidden")||this._selectNextPart())},_detachMaskEvents(){_.off(this._input(),".dateBoxMask")},_attachMaskEvents(){_.on(this._input(),D("dxclick","dateBoxMask"),this._maskClickHandler.bind(this)),_.on(this._input(),D("paste","dateBoxMask"),this._maskPasteHandler.bind(this)),_.on(this._input(),D("drop","dateBoxMask"),()=>{this._renderSelectedPart()}),_.on(this._input(),D("compositionend","dateBoxMask"),this._maskCompositionEndHandler.bind(this)),this._useBeforeInputEvent()&&_.on(this._input(),D("beforeinput","dateBoxMask"),this._maskBeforeInputHandler.bind(this))},_renderSelectedPart(){this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._selectNextPart()},_selectLastPart(){this.option("text")&&(this._activePartIndex=this._dateParts.length,this._selectNextPart(-1))},_selectFirstPart(){this.option("text")&&this._dateParts&&(this._activePartIndex=-1,this._selectNextPart(1))},_onMouseWheel(i){this._useMaskBehavior()&&this._partIncrease(i.delta>0?1:-1,i)},_selectNextPart(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;if(!this.option("text")||this._disposed)return;i&&(this._initialMaskValue=new Date(this._maskValue));let e=It(this._activePartIndex+i,0,this._dateParts.length-1);if(this._dateParts[e].isStub){if(!(e===0&&i<0||e===this._dateParts.length-1&&i>0)){this._selectNextPart(i>=0?i+1:i-1);return}e=this._activePartIndex}this._activePartIndex!==e&&this._clearSearchValue(),this._activePartIndex=e,this._caret(this._getActivePartProp("caret"))},_getRealLimitsPattern(){if(this._getActivePartProp("pattern")[0]==="d")return"dM"},_getActivePartLimits(i){return this._getActivePartProp("limits")(this._maskValue,i&&this._getRealLimitsPattern())},_getActivePartValue(i){i=i||this._maskValue;let e=this._getActivePartProp("getter");return A(e)?e(i):i[e]()},_addLeadingZeroes(i){let e=this._searchValue.match(/^0+/),t=this._getActivePartLimits(),n=String(t.max).length;return((e&&e[0]||"")+String(i)).substr(-n)},_setActivePartValue(i,e){e=e||this._maskValue;let t=this._getActivePartProp("setter"),n=this._getActivePartLimits();i=An(i,n.min,n.max)?i:i%10,i=this._addLeadingZeroes(It(i,n.min,n.max)),A(t)?t(e,i):e[t](i),this._renderDisplayText(this._getDisplayedText(e)),this._renderDateParts()},_getActivePartProp(i){if(!(!this._dateParts||!this._dateParts[this._activePartIndex]))return this._dateParts[this._activePartIndex][i]},_loadMaskValue(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dateOption("value");this._maskValue=i&&new Date(i),this._initialMaskValue=i&&new Date(i)},_saveMaskValue(){let i=this._maskValue&&new Date(this._maskValue);i&&this.option("type")==="date"&&i.setHours(0,0,0,0),this._initialMaskValue=new Date(i),this.dateOption("value",i)},_revertChanges(){this._loadMaskValue(),this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts()},_renderDisplayText(i){this.callBase(i),this._useMaskBehavior()&&this.option("text",i)},_partIncrease(i,e){this._setNewDateIfEmpty();let{max:t,min:n}=this._getActivePartLimits(e),o=i+this._getActivePartValue();o>t?o=this._applyLimits(o,{limitBase:n,limitClosest:t,max:t}):o<n&&(o=this._applyLimits(o,{limitBase:t,limitClosest:n,max:t})),this._setActivePartValue(o)},_applyLimits(i,e){let{limitBase:t,limitClosest:n,max:o}=e,s=(i-n)%o;return s?t+s-1*Fo(s):n},_maskClickHandler(){this._loadMaskValue(this._maskValue),this.option("text")&&(this._activePartIndex=jB(this._dateParts,this._caret().start),this._isAllSelected()||(f(this._activePartIndex)?this._caret(this._getActivePartProp("caret")):this._selectLastPart()))},_maskCompositionEndHandler(i){this._input().val(this._getDisplayedText(this._maskValue)),this._selectNextPart(),this._maskInputHandler=()=>{this._renderSelectedPart()}},_maskPasteHandler(i){let e=this._replaceSelectedText(this.option("text"),this._caret(),Vc(i)),t=he.parse(e,this._getFormatPattern());t&&this._isDateValid(t)&&(this._maskValue=t,this._renderDisplayText(this._getDisplayedText(this._maskValue)),this._renderDateParts(),this._selectNextPart()),i.preventDefault()},_isDateValid:i=>Vt(i)&&!isNaN(i),_isValueDirty(){let i=this.dateOption("value");return(this._maskValue&&this._maskValue.getTime())!==(i&&i.getTime())},_fireChangeEvent(){this._clearSearchValue(),this._isValueDirty()&&_.trigger(this._input(),"change")},_enterHandler(){this._fireChangeEvent(),this._selectNextPart(1)},_focusOutHandler(i){this._useMaskBehavior()&&!i.isDefaultPrevented()?(this._fireChangeEvent(),this.callBase(i),this._selectFirstPart(i)):this.callBase(i)},_valueChangeEventHandler(i){let e=this.option("text");this._useMaskBehavior()?(this._saveValueChangeEvent(i),e?this._maskValue===null&&this._loadMaskValue(e):this._maskValue=null,this._saveMaskValue()):this.callBase(i)},_optionChanged(i){switch(i.name){case"useMaskBehavior":this._renderMask();break;case"displayFormat":case"mode":this.callBase(i),this._renderMask();break;case"value":this._loadMaskValue(),this.callBase(i),this._renderDateParts();break;case"emptyDateValue":break;default:this.callBase(i)}},_clearMaskState(){this._clearSearchValue(),delete this._dateParts,delete this._activePartIndex,delete this._maskValue},clear(){this._clearMaskState(),this._activePartIndex=0,this.callBase()},_clean(){this.callBase(),this._detachMaskEvents(),this._clearMaskState()}}),CO=B9;K("dxDateBox",CO);var KB=CO;var zm=KB;var{isWrapped:V9}=Nt;var L9="dx-editor-inline-block",ju=function(i,e){return m(i,{readOnly:e.readOnly,placeholder:e.placeholder,inputAttr:{id:e.id,"aria-labelledby":e["aria-labelledby"]},tabIndex:e.tabIndex},e.editorOptions)},XB=function(){return we.mozilla||F.real().ios},QB=function(i){let e={},t=XB(),n=i.sharedData||e;return ju({placeholder:i.placeholder,width:i.width,value:i.value,onValueChanged:function(o){let s=i.parentType==="filterRow"||i.parentType==="searchPanel",r=o.event&&(o.event.type==="input"||o.event.type==="keyup"),a=function(l,d){i&&i.setValue(l.value,d)};clearTimeout(e.valueChangeTimeout),r&&s?n.valueChangeTimeout=e.valueChangeTimeout=setTimeout(function(){a(o,e.valueChangeTimeout!==n.valueChangeTimeout)},f(i.updateValueTimeout)?i.updateValueTimeout:0):a(o)},onKeyDown:function(o){t&&ke(o.event)==="enter"&&_.trigger(u(o.component._input()),"change")},valueChangeEvent:"change"+(i.parentType==="filterRow"?" keyup input":"")},i)},UB=function(i){i.editorName="dxDateBox",i.editorOptions=ju({value:i.value,onValueChanged:function(e){i.setValue(e.value)},onKeyDown:function(e){let{component:t,event:n}=e,o=t.option("useMaskBehavior");(XB()||o)&&ke(n)==="enter"&&(t.blur(),t.focus())},displayFormat:i.format,type:i.dataType,dateSerializationFormat:null,width:i.parentType==="filterBuilder"?void 0:"auto"},i)},qB=function(i){let e=QB(i),t=i.parentType==="searchPanel";i.editorType&&i.editorType!=="dxTextBox"?e.value=i.value:e.value=(n=i.value,f(n)?n.toString():"");var n;e.valueChangeEvent+=t?" keyup input search":"",e.mode=e.mode||(t?"search":"text"),i.editorName="dxTextBox",i.editorOptions=e},YB=function(i){let e=QB(i);e.value=f(i.value)?i.value:null,i.editorName="dxNumberBox",i.editorOptions=e},N9=function(i){i.parentType==="filterRow"||i.parentType==="filterBuilder"?ZB(m(i,{lookup:{displayExpr:function(e){if(e===!0)return i.trueText||"true";if(e===!1)return i.falseText||"false"},dataSource:[!0,!1]}})):JB(i)};function H9(i){if(i.row&&i.row.watch&&i.parentType==="dataRow"){let e=i.editorOptions||{};i.editorOptions=e;let t,n=e.onInitialized;e.onInitialized=function(r){n&&n.apply(this,arguments),t=r.component,t.on("disposing",s)};let o,s=i.row.watch(()=>(o=i.lookup.dataSource(i.row),o&&o.filter),()=>{t.option("dataSource",o)},r=>{i.row=r})}}function ZB(i){let e=i.lookup,t,n,o,s=i.parentType==="filterRow";if(e){t=Ce(e.displayExpr),n=e.dataSource,A(n)&&!V9(n)&&(n=n(i.row||{}),H9(i)),(z(n)||Array.isArray(n))&&(n=gn(n),s&&(o=n.postProcess,n.postProcess=function(a){return this.pageIndex()===0&&(a=a.slice(0),a.unshift(null)),o?o.call(this,a):a}));let r=!!(e.allowClearing&&!s);i.editorName=i.editorType??"dxSelectBox",i.editorOptions=ju({searchEnabled:!0,value:i.value,valueExpr:i.lookup.valueExpr,searchExpr:i.lookup.searchExpr||i.lookup.displayExpr,allowClearing:r,showClearButton:r,displayExpr:function(a){return a===null?i.showAllText:t(a)},dataSource:n,onValueChanged:function(a){let l=[a.value];!s&&l.push(a.component.option("text")),i.setValue.apply(this,l)}},i)}}function JB(i){i.editorName="dxCheckBox",i.editorOptions=ju({elementAttr:{id:i.id},value:f(i.value)?i.value:void 0,hoverStateEnabled:!i.readOnly,focusStateEnabled:!i.readOnly,activeStateEnabled:!1,onValueChanged:function(e){i.setValue&&i.setValue(e.value,e)}},i)}var $9=function(i,e){let t=u(e.editorElement);if(e.editorName&&e.editorOptions&&t[e.editorName]){if((e.editorName==="dxCheckBox"||e.editorName==="dxSwitch")&&(e.isOnForm||(t.addClass(i.addWidgetPrefix("checkbox-size")),t.parent().addClass(L9))),i._createComponent(t,e.editorName,e.editorOptions),e.editorName==="dxDateBox"){let n=t.dxDateBox("instance"),o=n._supportedKeys().enter;n.registerKeyHandler("enter",s=>(n.option("opened")&&o(s),!0))}e.editorName==="dxTextArea"&&t.dxTextArea("instance").registerKeyHandler("enter",function(n){ke(n)==="enter"&&!n.ctrlKey&&!n.shiftKey&&n.stopPropagation()})}},z9=i=>{i.editorName=i.editorType,i.editorOptions=ju({value:i.value,onValueChanged:function(e){i.setValue(e.value)}},i)},W9=i=>{let e={dxDateBox:UB,dxCheckBox:JB,dxNumberBox:YB,dxTextBox:qB};if(i.lookup)ZB(i);else if(i.editorType)(e[i.editorType]??z9)(i);else switch(i.dataType){case"date":case"datetime":UB(i);break;case"boolean":N9(i);break;case"number":YB(i);break;default:qB(i)}},G9=i=>class extends i{createEditor(e,t){t.cancel=!1,t.editorElement=H(e),f(t.tabIndex)||(t.tabIndex=this.option("tabIndex")),W9(t),this.executeAction("onEditorPreparing",t),!t.cancel&&(t.parentType==="dataRow"&&!t.isOnForm&&!f(t.editorOptions.showValidationMark)&&(t.editorOptions.showValidationMark=!1),$9(this,t),this.executeAction("onEditorPrepared",t))}},Wm=G9;var j9="dx-editor-inline-block";var tV="dxDataGridEditorFactory",eV=D([le.down,"focusin",de].join(" "),tV),xO="dx-hidden",K9=Wm(ye.ViewController),vO=class extends K9{init(){this.createAction("onEditorPreparing",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this.createAction("onEditorPrepared",{excludeValidators:["disabled","readOnly"],category:"rendering"}),this._columnsResizerController=this.getController("columnsResizer"),this._editingController=this.getController("editing"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._columnsController=this.getController("columns"),this._validatingController=this.getController("validating"),this._rowsView=this.getView("rowsView"),this._updateFocusHandler=this._updateFocusHandler||this.createAction(this._updateFocus.bind(this)),this._subscribedContainerRoot=this._getContainerRoot(),_.on(this._subscribedContainerRoot,eV,this._updateFocusHandler),this._attachContainerEventHandlers()}dispose(){clearTimeout(this._focusTimeoutID),clearTimeout(this._updateFocusTimeoutID),_.off(this._subscribedContainerRoot,eV,this._updateFocusHandler)}_getFocusedElement(e){let n=["td[tabindex]:focus",`${this.option("focusedRowEnabled")?"tr[tabindex]:focus":"tr[tabindex]:not(.dx-data-row):focus"}`,"input:focus","button:focus","textarea:focus","div[tabindex]:focus",".dx-lookup-field:focus",".dx-checkbox:focus",".dx-switch:focus",".dx-dropdownbutton .dx-buttongroup:focus",".dx-adaptive-item-text:focus"].join(","),o=e.find(n);return this.elementIsInsideGrid(o)&&o}_getFocusCellSelector(){return".dx-row > td"}_updateFocusCore(){let e=this.component&&this.component.$element();if(e){let t=this._getFocusedElement(e);if(t&&t.length){let n;if(!t.hasClass("dx-cell-focus-disabled")&&!t.hasClass("dx-row")){let o=t.closest(`${this._getFocusCellSelector()}, .dx-cell-focus-disabled`);o.get(0)!==t.get(0)&&(n=this._needHideBorder(o),t=o)}if(t.length&&!t.hasClass("dx-cell-focus-disabled")){this.focus(t,n);return}}}this.loseFocus()}_needHideBorder(e){let t=this._rowsView.element(),n=e.closest(t).length>0,o=this._editingController.isEditing();return e.hasClass(j9)||n&&!o}_updateFocus(e){let t=this,n=e&&e.event&&u(e.event.target).hasClass(t.addWidgetPrefix("focus-overlay"));t._isFocusOverlay=t._isFocusOverlay||n,clearTimeout(t._updateFocusTimeoutID),t._updateFocusTimeoutID=setTimeout(()=>{delete t._updateFocusTimeoutID,t._isFocusOverlay||t._updateFocusCore(),t._isFocusOverlay=!1})}_updateFocusOverlaySize(e,t){e.hide();let n=xt.calculate(e,m({collision:"fit"},t));n.h.oversize>0&&gc(e,ae(e)-n.h.oversize),n.v.oversize>0&&k_(e,ee(e)-n.v.oversize),e.show()}callbackNames(){return["focused"]}focus(e,t){let n=this;if(e===void 0)return n._$focusedElement;e&&(e.is(n._$focusedElement)||n._$focusedElement&&n._$focusedElement.removeClass("dx-focused"),n._$focusedElement=e,clearTimeout(n._focusTimeoutID),n._focusTimeoutID=setTimeout(()=>{delete n._focusTimeoutID,n.renderFocusOverlay(e,t),e.addClass("dx-focused"),n.focused.fire(e)}))}refocus(){let e=this.focus();this.focus(e)}renderFocusOverlay(e,t){let n=this;if(R.isElementInCurrentGrid(this,e)){if(n._$focusOverlay||(n._$focusOverlay=u("<div>").addClass(n.addWidgetPrefix("focus-overlay"))),t)n._$focusOverlay.addClass(xO);else if(e.length){let o=we.mozilla?"right bottom":"left top",s=e.closest(`.${n.addWidgetPrefix("content")}`),r=Pe(e.get(0)),a=e.hasClass(this.addWidgetPrefix("invalid")),l=e.hasClass("dx-cell-modified")&&!a;n._$focusOverlay.removeClass(xO).toggleClass("dx-focused-cell-invalid",a).toggleClass("dx-focused-cell-modified",l).appendTo(s),k_(n._$focusOverlay,r.bottom-r.top+1),gc(n._$focusOverlay,r.right-r.left+1);let d={precise:!0,my:o,at:o,of:e,boundary:s.length&&s};n._updateFocusOverlaySize(n._$focusOverlay,d),xt.setup(n._$focusOverlay,d),n._$focusOverlay.css("visibility","visible")}}}resize(){let e=this._$focusedElement;e&&this.focus(e)}loseFocus(e){this._$focusedElement&&this._$focusedElement.removeClass("dx-focused"),this._$focusedElement=null,this._$focusOverlay&&this._$focusOverlay.addClass(xO)}_getContainerRoot(){var e;let t=(e=this.component)===null||e===void 0?void 0:e.$element(),n=S.getRootNode(t?.get(0));return n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!n.host?S.getDocument():n}_attachContainerEventHandlers(){let e=this,t=e.component&&e.component.$element();t&&_.on(t,D("keydown",tV),n=>{ke(n)==="tab"&&e._updateFocusHandler(n)})}},iV={defaultOptions:()=>({}),controllers:{editorFactory:vO}};$.registerModule("editorFactory",iV);var Gm=q(),U9={text:"OK",onClick:()=>!0};var q9=()=>Ot()?{stylingMode:"contained",type:"default"}:{},Y9=()=>Ot()?{stylingMode:"outlined",type:"default"}:{},nV=function(i){let e=y();i=i||{};let t=u("<div>").addClass("dx-dialog").appendTo(zn()),n="message"in i,o="messageHtml"in i;n&&ie.log("W1013");let s=String(o?i.messageHtml:i.message),r=i.title?null:new Ae,a=u("<div>").addClass("dx-dialog-message").html(s).attr("id",r),l=[],d=new Oi(t,m({title:i.title??"",showTitle:Be(i.showTitle,!0),dragEnabled:Be(i.dragEnabled,!0),height:"auto",width:i.width,showCloseButton:i.showCloseButton||!1,ignoreChildEvents:!1,container:t,visualContainer:Gm,dragAndResizeArea:Gm,onContentReady(p){p.component.$content().addClass("dx-dialog-content").append(a),r&&p.component.$overlayContent().attr("aria-labelledby",r)},onShowing(p){p.component.bottomToolbar().addClass("dx-dialog-buttons").find(".dx-button").addClass("dx-dialog-button"),uo()},onShown(p){let g=p.component.bottomToolbar().find(".dx-button").first();_.trigger(g,"focus")},onHiding(){e.reject()},onHidden(p){let{element:g}=p;u(g).remove()},animation:{show:{type:"pop",duration:400},hide:{type:"pop",duration:400,to:{opacity:0,scale:0},from:{opacity:1,scale:1}}},rtlEnabled:xe().rtlEnabled,position:{boundaryOffset:{h:10,v:0}}},i.popupOptions));(i.buttons||[U9]).forEach(p=>{let g=new ko(p.onClick,{context:d});l.push({toolbar:"bottom",location:F.current().android?"after":"center",widget:"dxButton",options:I({},p,{onClick(){let C=g.execute(...arguments);h(C)}})})}),d.option("toolbarItems",l),d.$wrapper().addClass("dx-dialog-wrapper"),i.position&&d.option("position",i.position),d.$wrapper().addClass("dx-dialog-root");function h(p){e.resolve(p),d.hide()}return{show:function(){if(F.real().deviceType==="phone"){let g=Q(Gm)>W(Gm)?"90%":"60%";d.option({width:g})}return d.show(),e.promise()},hide:h}};var bO=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=arguments.length>2?arguments[2]:void 0,n=X(i)?i:{title:e,messageHtml:i,showTitle:t,buttons:[I({text:O.format("Yes"),onClick:()=>!0},q9()),I({text:O.format("No"),onClick:()=>!1},Y9())],dragEnabled:t};return nV(n).show()};var aa="dx-editor-cell",Wo="dx-row",oV="dx-cell-modified",yO="dx-selection",Ad="edit-form",qn="insert",Go="remove",Md="editing.popup",jm="editing.form",an="editing.editRowKey",cr="editing.editColumnName",Km="targetComponent",Ku="input:not([type='hidden'])",Rd=`[tabindex]:not([disabled]), ${Ku}:not([disabled])`,Uu="batch",la="row",qu="cell",Yu="form",sV="popup",OO="first",Xu="last",EO="pageBottom",Um="pageTop",wO="viewportBottom",SO="viewportTop",rV=["batch","row","cell","form","popup"],aV=["row","form","popup"],lV=["batch","cell"],dV=["batch","row","cell"],cV=["row","form"],uV="readonly",hV="dx-link",pV="dx-link-icon",gV="dx-selection",mV="dx-edit-button",fV="dx-command-edit",IO="dx-command-edit-with-icons",ur="__DX_INSERT_INDEX__",_V="dx-row-inserted",CV="dx-row-modified",DO="dx-cell-modified",xV="dxDataGridEditing",vV="dx-cell-focus-disabled",Fd="update",bV="click",yV={save:"dx-link-save",cancel:"dx-link-cancel",edit:"dx-link-edit",undelete:"dx-link-undelete",delete:"dx-link-delete",add:"dx-link-add"},OV={save:"save",cancel:"revert",edit:"edit",undelete:"revert",delete:"trash",add:"add"},EV={edit:"editRow",delete:"deleteRow",undelete:"undeleteRow",save:"saveEditData",cancel:"cancelEditData",add:"addRowByRowIndex"},wV={add:"allowAdding",edit:"allowUpdating",delete:"allowDeleting"},SV=["edit","save","cancel","delete","undelete"],ws="editing.changes",IV="focus-overlay",DV="addrow-button",TV="dx-dropdowneditor-overlay",AV="dx-data-row",MV="dx-row-removed",RV="filter-row",X9=!!Xi.IS_RENOVATED_WIDGET,TO="edit-form-item",FV="edit-popup",PV="edit-popup-form",kV=X9?"dx-scrollable":"dx-scrollable-container",BV="dx-button",VV="form-buttons-container",AO="dx-edit-row";var Pd=function(i){return function(e){let t=e instanceof Error?e:new Error(e&&String(e)||"Unknown error");i.reject(t)}},MO=function(i,e){return e.isEditing||i&&e.column.allowEditing},RO=function(i,e){let t=!!e.column.command,n=MO(i,e),o=!t&&(n||e.column.showEditorAlways);return e.rowType==="data"&&o},LV=i=>{let e=i.component.option("editing.texts")||{};return{save:e.saveRowChanges,cancel:e.cancelRowChanges,edit:e.editRow,undelete:e.undeleteRow,delete:e.deleteRow,add:e.addRowToNode}},NV=()=>`_DX_KEY_${new Ae}`,HV=i=>typeof i=="string"&&i.startsWith("_DX_KEY_")&&i.length===44,Ya=(i,e)=>{let t=-1;return i.some((n,o)=>{if(FO(n)===e)return t=o,!0}),t};function FO(i){return z(i)?i.name:i}function $V(i){return i&&(i.is("input")||i.is("textarea"))}var zV=i=>{var e;let{column:t}=i;return i.isCustomEditorType?i.editorType:(e=t.formItem)===null||e===void 0?void 0:e.editorType},PO=(i,e)=>{i.forEach(t=>{t.items||t.tabs?PO(t.items||t.tabs,e):e(t)})};var kO=class extends ye.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._validatingController=this.getController("validating"),this._editorFactoryController=this.getController("editorFactory"),this._focusController=this.getController("focus"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._columnsResizerController=this.getController("columnsResizer"),this._errorHandlingController=this.getController("errorHandling"),this._rowsView=this.getView("rowsView"),this._headerPanelView=this.getView("headerPanel"),this._lastOperation=null,this._changes=[],this._deferreds&&this._deferreds.forEach(e=>{e.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=new Map),this.component._optionsByReference[an]=!0,this.component._optionsByReference[ws]=!0}getEditMode(){let e=this.option("editing.mode")??la;return rV.includes(e)?e:la}isCellBasedEditMode(){let e=this.getEditMode();return lV.includes(e)}_getDefaultEditorTemplate(){return(e,t)=>{let n=u("<div>").appendTo(e),o=m({},t.column,{value:t.value,setValue:t.setValue,row:t.row,parentType:"dataRow",width:null,readOnly:!t.setValue,isOnForm:t.isOnForm,id:t.id});dV.includes(this.getEditMode())&&(o["aria-labelledby"]=t.column.headerId),this._editorFactoryController.createEditor(n,o)}}_getNewRowPosition(){let e=this.option("editing.newRowPosition");if(this.option("scrolling.mode")==="virtual")switch(e){case Um:return SO;case EO:return wO;default:return e}return e}getChanges(){return this.option(ws)}getInsertRowCount(){return this.option(ws).filter(t=>t.type==="insert").length}resetChanges(){let e=this.getChanges();e?.length&&this._silentOption(ws,[])}_getInternalData(e){return this._internalState.get(Di(e))}_addInternalData(e){let t=this._getInternalData(e.key);return t?m(t,e):(this._internalState.set(Di(e.key),e),e)}_getOldData(e){var t;return(t=this._getInternalData(e))===null||t===void 0?void 0:t.oldData}getUpdatedData(e){let t=this._dataController.keyOf(e),n=this.getChanges(),o=R.getIndexByKey(t,n);return n[o]?To(e,n[o].data):e}getInsertedData(){return this.getChanges().filter(e=>e.data&&e.type===qn).map(e=>e.data)}getRemovedData(){return this.getChanges().filter(e=>this._getOldData(e.key)&&e.type===Go).map(e=>this._getOldData(e.key))}_fireDataErrorOccurred(e){if(e==="cancel")return;let t=this.getPopupContent();this._dataController.dataErrorOccurred.fire(e,t)}_needToCloseEditableCell(e){}_closeEditItem(e){}_handleDataChanged(e){}_isDefaultButtonVisible(e,t){let n=!0;switch(e.name){case"delete":n=this.allowDeleting(t);break;case"undelete":n=!1}return n}isPopupEditMode(){return this.option("editing.mode")===sV}_isButtonVisible(e,t){let{visible:n}=e;return f(n)?A(n)?n.call(e,{component:t.component,row:t.row,column:t.column}):n:this._isDefaultButtonVisible(e,t)}_isButtonDisabled(e,t){let{disabled:n}=e;return A(n)?n.call(e,{component:t.component,row:t.row,column:t.column}):!!n}_getButtonConfig(e,t){let n=z(e)?e:{},o=FO(e),s=LV(t),r=EV[o],a=this.option("editing"),l=wV[o],d=l?a[l]:!0;return m({name:o,text:s[o],cssClass:yV[o]},{onClick:r&&(c=>{let{event:h}=c;h.stopPropagation(),h.preventDefault(),setTimeout(()=>{t.row&&d&&this[r]&&this[r](t.row.rowIndex)})})},n)}_getEditingButtons(e){let t,n=!!e.column.buttons,o=(e.column.buttons||[]).slice();return n?(t=Ya(o,"edit"),t>=0&&(Ya(o,"save")<0&&o.splice(t+1,0,"save"),Ya(o,"cancel")<0&&o.splice(Ya(o,"save")+1,0,"cancel")),t=Ya(o,"delete"),t>=0&&Ya(o,"undelete")<0&&o.splice(t+1,0,"undelete")):o=SV.slice(),o.map(s=>this._getButtonConfig(s,e))}_renderEditingButtons(e,t,n,o){t.forEach(s=>{this._isButtonVisible(s,n)&&this._createButton(e,s,n,o)})}_getEditCommandCellTemplate(){return(e,t,n)=>{let o=u(e);if(t.rowType==="data"){let s=this._getEditingButtons(t);if(this._renderEditingButtons(o,s,t,n),t.watch){let r=t.watch(()=>s.map(a=>({visible:this._isButtonVisible(a,t),disabled:this._isButtonDisabled(a,t)})),()=>{o.empty(),this._renderEditingButtons(o,s,t)});_.on(o,ai,r)}}else R.setEmptyText(o)}}isRowBasedEditMode(){let e=this.getEditMode();return aV.includes(e)}getFirstEditableColumnIndex(){let e,t=this._columnsController.getVisibleColumns();return x(t,(n,o)=>{if(o.allowEditing)return e=n,!1}),e}getFirstEditableCellInRow(e){var t;let n=this.getFirstEditableColumnIndex();return(t=this._rowsView)===null||t===void 0?void 0:t._getCellElement(e||0,n)}getFocusedCellInRow(e){return this.getFirstEditableCellInRow(e)}getIndexByKey(e,t){return R.getIndexByKey(e,t)}hasChanges(e){let t=this.getChanges(),n=!1;for(let o=0;o<t?.length;o++)if(t[o].type&&(!f(e)||this._dataController.getRowIndexByKey(t[o].key)===e)){n=!0;break}return n}dispose(){super.dispose(),clearTimeout(this._inputFocusTimeoutID),_.off(S.getDocument(),le.up,this._pointerUpEditorHandler),_.off(S.getDocument(),le.down,this._pointerDownEditorHandler),_.off(S.getDocument(),de,this._saveEditorHandler)}_silentOption(e,t){e==="editing.changes"&&(this._changes=en([],t)),super._silentOption(e,t)}optionChanged(e){if(e.name==="editing"){let{fullName:t}=e;t===an?this._handleEditRowKeyChange(e):t===ws?Ee(e.value,this._changes,{maxDepth:4})||(this._changes=en([],e.value),this._handleChangesChange(e)):e.handled||(this._columnsController.reinit(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey()),e.handled=!0}else super.optionChanged(e)}_handleEditRowKeyChange(e){let t=this._dataController.getRowIndexByKey(e.value),n=this._getEditRowIndexCorrection(),o=this._dataController.getRowIndexByKey(e.previousValue)+n;f(e.value)?e.value!==e.previousValue&&this._editRowFromOptionChanged(t,o):this.cancelEditData()}_handleChangesChange(e){let t=this._dataController,n=e.value;!e.value.length&&!e.previousValue.length||(n.forEach(o=>{if(o.type==="insert")this._addInsertInfo(o);else{var s;let r=t.getCachedStoreData()||((s=t.items())===null||s===void 0?void 0:s.map(l=>l.data)),a=R.getIndexByKey(o.key,r,t.key());this._addInternalData({key:o.key,oldData:r[a]})}}),t.updateItems({repaintChangesOnly:!0,isLiveUpdate:!1,isOptionChanged:!0}))}publicMethods(){return["addRow","deleteRow","undeleteRow","editRow","saveEditData","cancelEditData","hasEditData"]}refresh(){f(this._pageIndex)&&this._refreshCore.apply(this,arguments)}_refreshCore(e){}isEditing(){return f(this.option(an))}isEditRow(e){return!1}_setEditRowKey(e,t){t?this._silentOption(an,e):this.option(an,e),this._refocusEditCell&&(this._refocusEditCell=!1,this._focusEditingCell())}_setEditRowKeyByIndex(e,t){let n=this._dataController.getKeyByRowIndex(e);if(n===void 0){this._dataController.fireError("E1043");return}this._setEditRowKey(n,t)}getEditRowIndex(){return this._getVisibleEditRowIndex()}getEditFormRowIndex(){return-1}isEditRowByIndex(e){let t=this._dataController.getKeyByRowIndex(e),n=f(t)&&Ee(this.option(an),t);return n&&this._getVisibleEditRowIndex()===e}isEditCell(e,t){return this.isEditRowByIndex(e)&&this._getVisibleEditColumnIndex()===t}getPopupContent(){}_isProcessedItem(e){return!1}_getInsertRowIndex(e,t,n){let o=-1,s=this._dataController,r=this._getInsertAfterOrBeforeKey(t);return!f(r)&&e.length===0?o=0:f(r)&&e.some((a,l)=>{let d=n||this._isProcessedItem(a);if(z(a)&&(d||f(a[ur])?Ee(a.key,r)&&(o=l):Ee(s.keyOf(a),r)&&(o=l)),o>=0){let c=e[o+1];return c&&(c.rowType==="detail"||c.rowType==="detailAdaptive")&&f(t.insertAfterKey)?void 0:(f(t.insertAfterKey)&&(o+=1),!0)}}),o}_generateNewItem(e){var t;let n={key:e},o=(t=this._getInternalData(e))===null||t===void 0?void 0:t.insertInfo;return o!=null&&o[ur]&&(n[ur]=o[ur]),n}_getLoadedRowIndex(e,t,n){let o=this._getInsertRowIndex(e,t,n),s=this._dataController;if(o<0){let r=this._getNewRowPosition(),a=s.pageIndex(),l=this._getInsertAfterOrBeforeKey(t);r!==Xu&&a===0&&!f(l)?o=0:r===Xu&&s.isLastPageLoaded()&&(o=e.length)}return o}processItems(e,t){let{changeType:n}=t;return this.update(n),this.getChanges().forEach(s=>{var r;if(!(s.type===qn))return;let{key:l}=s,d=(r=this._getInternalData(l))===null||r===void 0?void 0:r.insertInfo;(!f(l)||!f(d))&&(d=this._addInsertInfo(s),l=d.key);let c=this._getLoadedRowIndex(e,s),h=this._generateNewItem(l);c>=0&&e.splice(c,0,h)}),e}processDataItem(e,t,n){let o=t.visibleColumns,s=e.data[ur]?e.data.key:e.key,r=this.getChanges(),a=R.getIndexByKey(s,r);e.isEditing=!1,a>=0&&this._processDataItemCore(e,r[a],s,o,n)}_processDataItemCore(e,t,n,o,s){let{data:r,type:a}=t;switch(a){case qn:e.isNewRow=!0,e.key=n,e.data=r;break;case Fd:e.modified=!0,e.oldData=e.data,e.data=To(e.data,r),e.modifiedValues=s(r,o,!0);break;case Go:e.removed=!0}}_initNewRow(e){if(this.executeAction("onInitNewRow",e),e.promise){let t=new y;return P(Et(e.promise)).done(t.resolve).fail(Pd(t)).fail(n=>this._fireDataErrorOccurred(n)),t}}_createInsertInfo(){let e={};return e[ur]=this._getInsertIndex(),e}_addInsertInfo(e,t){var n;let o;e.key=this.getChangeKeyValue(e);let{key:s}=e;if(o=(n=this._getInternalData(s))===null||n===void 0?void 0:n.insertInfo,!f(o)){let r=this._getInsertAfterOrBeforeKey(e);o=this._createInsertInfo(),f(r)||this._setInsertAfterOrBeforeKey(e,t)}return this._addInternalData({insertInfo:o,key:s}),{insertInfo:o,key:s}}getChangeKeyValue(e){if(f(e.key))return e.key;let t=this._dataController.key(),n;return e.data&&t&&!Array.isArray(t)&&(n=e.data[t]),f(n)||(n=NV()),n}_setInsertAfterOrBeforeKey(e,t){let n=this.getView("rowsView"),o=this._dataController,s=o.items(!0),r=this._getNewRowPosition();switch(r){case OO:case Xu:break;case Um:case EO:if(s.length){let a=r===Um?0:s.length-1;e[a===0?"insertBeforeKey":"insertAfterKey"]=s[a].key}break;default:{let l=r===wO?n?.getBottomVisibleItemIndex():n?.getTopVisibleItemIndex(),d=o.getVisibleRows()[l];d&&(!d.isEditing&&d.rowType==="detail"||d.rowType==="detailAdaptive")&&l++;let c=o.getKeyByRowIndex(l);f(c)&&(e.insertBeforeKey=c)}}}_getInsertIndex(){let e=0;return this.getChanges().forEach(t=>{var n;let o=(n=this._getInternalData(t.key))===null||n===void 0?void 0:n.insertInfo;f(o)&&t.type===qn&&o[ur]>e&&(e=o[ur])}),e+1}_getInsertAfterOrBeforeKey(e){return e.insertAfterKey??e.insertBeforeKey}_getPageIndexToInsertRow(){let e=this._getNewRowPosition(),t=this._dataController,n=t.pageIndex(),o=t.pageCount()-1;return e===OO&&n!==0?0:e===Xu&&n!==o?o:-1}addRow(e){let t=this._dataController;return t.store()?this._addRow(e):(t.fireError("E1052",this.component.NAME),new y().reject())}_addRow(e){let n=this._dataController.store(),o=n&&n.key(),s={data:{}},r=this._getVisibleEditRowIndex(),a=new y;return this.refresh({allowCancelEditing:!0}),this._allowRowAdding()?(o||(s.data.__KEY__=String(new Ae)),P(this._initNewRow(s,e)).done(()=>{this._allowRowAdding()?P(this._addRowCore(s.data,e,r)).done(a.resolve).fail(a.reject):a.reject("cancel")}).fail(a.reject),a.promise()):(P(this._navigateToNewRow(r)).done(a.resolve).fail(a.reject),a.promise())}_allowRowAdding(e){return!(this._getInsertIndex()>1)}_addRowCore(e,t,n){let o={data:e,type:qn},s=this._getVisibleEditRowIndex(),r=this._addInsertInfo(o,t),{key:a}=r;return this._setEditRowKey(a,!0),this._addChange(o),this._navigateToNewRow(n,o,s)}_navigateToNewRow(e,t,n){let o=new y,s=this._dataController;if(n=n??-1,t=t??this.getChanges().filter(c=>c.type===qn)[0],!t)return o.reject("cancel").promise();let r=this._getPageIndexToInsertRow(),a=this._getLoadedRowIndex(s.items(),t,!0),l=c=>{var h;P((h=this._focusController)===null||h===void 0?void 0:h.navigateToRow(c)).done(()=>{a=s.getRowIndexByKey(t.key),o.resolve()})},d=this._getInsertAfterOrBeforeKey(t);return r>=0?s.pageIndex(r).done(()=>{l(t.key)}).fail(o.reject):a<0&&f(d)?l(d):(s.updateItems({changeType:"update",rowIndices:[e,n,a]}),a=s.getRowIndexByKey(t.key),a<0?l(t.key):o.resolve()),o.done(()=>{var c;(c=this._rowsView)===null||c===void 0||c.waitAsyncTemplates(!0).done(()=>{this._showAddedRow(a),this._afterInsertRow(t.key)})}),o.promise()}_showAddedRow(e){this._focusFirstEditableCellInRow(e)}_beforeFocusElementInRow(e){}_focusFirstEditableCellInRow(e){var t;let n=this._dataController,o=n.getKeyByRowIndex(e),s=this.getFirstEditableCellInRow(e);(t=this._keyboardNavigationController)===null||t===void 0||t.focus(s),this.option("focusedRowKey",o),this._editCellInProgress=!0,this._delayedInputFocus(s,()=>{e=n.getRowIndexByKey(o),this._editCellInProgress=!1,this._beforeFocusElementInRow(e)})}_isEditingStart(e){return this.executeAction("onEditingStart",e),e.cancel}_beforeUpdateItems(e,t){}_getVisibleEditColumnIndex(){let e=this.option(cr);return f(e)?this._columnsController.getVisibleColumnIndex(e):-1}_setEditColumnNameByIndex(e,t){var n;let o=this._columnsController.getVisibleColumns();this._setEditColumnName((n=o[e])===null||n===void 0?void 0:n.name,t)}_setEditColumnName(e,t){t?this._silentOption(cr,e):this.option(cr,e)}_resetEditColumnName(){this._setEditColumnName(null,!0)}_getEditColumn(){let e=this.option(cr);return this._getColumnByName(e)}_getColumnByName(e){let t=this._columnsController.getVisibleColumns(),n;return f(e)&&t.some(o=>{if(o.name===e)return n=o,!0}),n}_getVisibleEditRowIndex(e){let t=this._dataController,n=this.option(an),o=t.getRowIndexByKey(n);return o===-1?o:o+this._getEditRowIndexCorrection(e)}_getEditRowIndexCorrection(e){let t=e?this._getColumnByName(e):this._getEditColumn();return t?.visibleWidth==="adaptiveHidden"?1:0}_resetEditRowKey(){this._refocusEditCell=!1,this._setEditRowKey(null,!0)}_resetEditIndices(){this._resetEditColumnName(),this._resetEditRowKey()}editRow(e){let t=this._dataController,o=t.items()[e],s={data:o&&o.data,cancel:!1},r=this._getVisibleEditRowIndex();if(o){if(e===r)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=t.pageIndex(),this._addInternalData({key:o.key,oldData:o.oldData??o.data}),this._setEditRowKey(o.key))}}_editRowFromOptionChanged(e,t){let n=[t,e];this._beforeUpdateItems(n,e,t),this._editRowFromOptionChangedCore(n,e)}_editRowFromOptionChangedCore(e,t,n){this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:e,cancel:n})}_focusEditorIfNeed(){}_showEditPopup(e,t){}_repaintEditPopup(){}_getEditPopupHiddenHandler(){return e=>{this.isEditing()&&this.cancelEditData()}}_getPopupEditFormTemplate(e){}_getSaveButtonConfig(){let e={text:this.option("editing.texts.saveRowChanges"),onClick:this.saveEditData.bind(this)};return Ot(yt())&&(e.stylingMode="contained",e.type="default"),e}_getCancelButtonConfig(){let e={text:this.option("editing.texts.cancelRowChanges"),onClick:this.cancelEditData.bind(this)};return Ot(yt())&&(e.stylingMode="outlined"),e}_removeInternalData(e){this._internalState.delete(Di(e))}_updateInsertAfterOrBeforeKeys(e,t){let n=e[t];e.forEach(o=>{if(o.type===qn){let s=this._getInsertAfterOrBeforeKey(o);Ee(s,n.key)&&(o[f(o.insertAfterKey)?"insertAfterKey":"insertBeforeKey"]=this._getInsertAfterOrBeforeKey(n))}})}_removeChange(e){if(e>=0){let t=[...this.getChanges()],{key:n}=t[e];this._removeInternalData(n),this._updateInsertAfterOrBeforeKeys(t,e),t.splice(e,1),this._silentOption(ws,t),Ee(this.option(an),n)&&this._resetEditIndices()}}executeOperation(e,t){this._lastOperation&&this._lastOperation.reject(),this._lastOperation=e,this.waitForDeferredOperations().done(()=>{e.state()!=="rejected"&&(t(),this._lastOperation=null)}).fail(()=>{e.reject(),this._lastOperation=null})}waitForDeferredOperations(){return P(...this._deferreds)}_processCanceledEditingCell(){}_repaintEditCell(e,t,n){!e||!e.showEditorAlways||t&&!t.showEditorAlways?(this._editCellInProgress=!0,this._needFocusEditor=!0,this._editorFactoryController.loseFocus(),this._dataController.updateItems({changeType:"update",rowIndices:[n,this._getVisibleEditRowIndex()]})):e!==t&&(this._needFocusEditor=!0,this._dataController.updateItems({changeType:"update",rowIndices:[]}))}_delayedInputFocus(e,t,n){let o=()=>{if(t&&t(),e){let s=e.find(Rd).first();R.focusAndSelectElement(this,s)}this._beforeFocusCallback=null};F.real().ios||F.real().android?o():(this._beforeFocusCallback&&this._beforeFocusCallback(),clearTimeout(this._inputFocusTimeoutID),n&&(this._beforeFocusCallback=t),this._inputFocusTimeoutID=setTimeout(o))}_focusEditingCell(e,t,n){let o=this._getVisibleEditColumnIndex();t=t||this._rowsView&&this._rowsView._getCellElement(this._getVisibleEditRowIndex(),o),t&&this._delayedInputFocus(t,e,n)}deleteRow(e){this._checkAndDeleteRow(e)}_checkAndDeleteRow(e){let t=this.option("editing"),n=t?.texts,o=t?.confirmDelete,s=n?.confirmDeleteMessage,r=this._dataController.items()[e],a=!this.isEditing()||r.isNewRow;if(r&&a)if(!o||!s)this._deleteRowCore(e);else{let l=n&&n.confirmDeleteTitle,d=f(l)&&l.length>0;bO(s,l,d).done(c=>{c&&this._deleteRowCore(e)})}}_deleteRowCore(e){let n=this._dataController.items()[e],o=n&&n.key,s=this._getVisibleEditRowIndex();this.refresh();let r=this.getChanges(),a=R.getIndexByKey(o,r);return a>=0?r[a].type===qn?this._removeChange(a):this._addChange({key:o,type:Go}):this._addChange({key:o,oldData:n.data,type:Go}),this._afterDeleteRow(e,s)}_afterDeleteRow(e,t){return this.saveEditData()}undeleteRow(e){let t=this._dataController,n=t.items()[e],o=this._getVisibleEditRowIndex(),s=n&&n.key,r=this.getChanges();if(n){let a=R.getIndexByKey(s,r);if(a>=0){let{data:l}=r[a];bt(l)?this._removeChange(a):this._addChange({key:s,type:Fd}),t.updateItems({changeType:"update",rowIndices:[o,e]})}}}_fireOnSaving(){let e={cancel:!1,promise:null,changes:[...this.getChanges()]};this.executeAction("onSaving",e);let t=new y;return P(Et(e.promise)).done(()=>{t.resolve(e)}).fail(n=>{Pd(t),this._fireDataErrorOccurred(n),t.resolve({cancel:!0})}),t}_executeEditingAction(e,t,n){if(this.component._disposed)return null;let o=new y;return this.executeAction(e,t),P(Et(t.cancel)).done(s=>{s?setTimeout(()=>{o.resolve("cancel")}):n(t).done(o.resolve).fail(Pd(o))}).fail(Pd(o)),o}_processChanges(e,t,n,o){let s=this._dataController.store();x(o,(r,a)=>{let l=this._getOldData(a.key),{data:d,type:c}=a,h=I({},a),p,g;if(!this._beforeSaveEditData(a,r)){switch(c){case Go:g={data:l,key:a.key,cancel:!1},p=this._executeEditingAction("onRowRemoving",g,()=>s.remove(a.key).done(C=>{n.push({type:"remove",key:C})}));break;case qn:g={data:d,cancel:!1},p=this._executeEditingAction("onRowInserting",g,()=>s.insert(g.data).done((C,v)=>{f(v)&&(h.key=v),C&&z(C)&&C!==g.data&&(h.data=C),n.push({type:"insert",data:C,index:0})}));break;case Fd:g={newData:d,oldData:l,key:a.key,cancel:!1},p=this._executeEditingAction("onRowUpdating",g,()=>s.update(a.key,g.newData).done((C,v)=>{C&&z(C)&&C!==g.newData&&(h.data=C),n.push({type:"update",key:v,data:C})}))}if(o[r]=h,p){let C=new y;p.always(v=>{t.push({key:a.key,result:v})}).always(C.resolve),e.push(C.promise())}}})}_processRemoveIfError(e,t){let n=e[t];return n?.type===Go&&t>=0&&e.splice(t,1),!0}_processRemove(e,t,n){let o=e[t];if(!n||!o||o.type===Go)return this._processRemoveCore(e,t,!n||!o)}_processRemoveCore(e,t,n){return t>=0&&e.splice(t,1),!0}_processSaveEditDataResult(e){let t=!1,n=this.getChanges(),o=[...n],s=o.length;for(let r=0;r<e.length;r++){let a=e[r].result,l=a==="cancel",d=R.getIndexByKey(e[r].key,o),c=o[d];if(a&&a instanceof Error){if(c&&this._addInternalData({key:c.key,error:a}),this._fireDataErrorOccurred(a),this._processRemoveIfError(o,d))break}else if(this._processRemove(o,d,l)){t=!l;let p=R.getIndexByKey(e[r].key,n);this._updateInsertAfterOrBeforeKeys(n,p)}}return o.length<s&&this._silentOption(ws,o),t}_fireSaveEditDataEvents(e){x(e,(t,n)=>{let{data:o,key:s,type:r}=n,a=this._addInternalData({key:s}),l={key:s,data:o};switch(a.error&&(l.error=a.error),r){case Go:this.executeAction("onRowRemoved",m({},l,{data:a.oldData}));break;case qn:this.executeAction("onRowInserted",l);break;case Fd:this.executeAction("onRowUpdated",l)}}),this.executeAction("onSaved",{changes:e})}saveEditData(){let e=new y;return this.waitForDeferredOperations().done(()=>{if(this.isSaving()){this._resolveAfterSave(e);return}P(this._beforeSaveEditData()).done(t=>{if(t){this._resolveAfterSave(e,{cancel:t});return}this._saving=!0,this._saveEditDataInner().always(()=>{this._saving=!1,this._refocusEditCell&&this._focusEditingCell()}).done(e.resolve).fail(e.reject)}).fail(e.reject)}).fail(e.reject),e.promise()}_resolveAfterSave(e){let{cancel:t,error:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P(this._afterSaveEditData(t)).done(()=>{e.resolve(n)}).fail(e.reject)}_saveEditDataInner(){let e=new y,t=[],n=[],o=[],s=this._dataController.dataSource();return P(this._fireOnSaving()).done(r=>{let{cancel:a,changes:l}=r;if(a)return e.resolve().promise();if(this._processChanges(n,t,o,l),n.length)return this._refocusEditCell=!0,s?.beginLoading(),P(...n).done(()=>{this._processSaveEditDataResult(t)?this._endSaving(o,l,e):(s?.endLoading(),e.resolve())}).fail(d=>{s?.endLoading(),e.resolve(d)}),e.always(()=>{this._refocusEditCell=!0}).promise();this._cancelSaving(e)}).fail(e.reject),e.promise()}_beforeEndSaving(e){this._resetEditIndices()}_endSaving(e,t,n){let o=this._dataController.dataSource();this._beforeEndSaving(t),o?.endLoading(),this._refreshDataAfterSave(e,t,n)}_cancelSaving(e){this.executeAction("onSaved",{changes:[]}),this._resolveAfterSave(e)}_refreshDataAfterSave(e,t,n){let o=this._dataController,s=this.option("editing.refreshMode"),r=s!=="reshape"&&s!=="repaint";r||o.push(e),P(o.refresh({selection:r,reload:r,load:s==="reshape",changesOnly:this.option("repaintChangesOnly")})).always(()=>{this._fireSaveEditDataEvents(t)}).done(()=>{this._resolveAfterSave(n)}).fail(a=>{this._resolveAfterSave(n,{error:a})})}isSaving(){return this._saving}_updateEditColumn(){let e=this._isEditColumnVisible(),t=this.option("editing.useIcons"),n=fV+(t?` ${IO}`:"");this._columnsController.addCommandColumn({type:"buttons",command:"edit",visible:e,cssClass:n,width:"auto",alignment:"center",cellTemplate:this._getEditCommandCellTemplate(),fixedPosition:"right"}),this._columnsController.columnOption("command:edit",{visible:e,cssClass:n})}_isEditColumnVisible(){return this.option("editing").allowDeleting}_isEditButtonDisabled(){let e=this.hasChanges();return!(f(this.option("editing.editRowKey"))||e)}_updateEditButtons(){let e=this._isEditButtonDisabled();this._headerPanelView&&(this._headerPanelView.setToolbarItemDisabled("saveButton",e),this._headerPanelView.setToolbarItemDisabled("revertButton",e))}_applyModified(e,t){e&&e.addClass(DO)}_beforeCloseEditCellInBatchMode(e){}cancelEditData(){let e=this.getChanges(),t={cancel:!1,changes:e};this.executeAction("onEditCanceling",t),t.cancel||(this._cancelEditDataCore(),this.executeAction("onEditCanceled",{changes:e}))}_cancelEditDataCore(){let e=this._getVisibleEditRowIndex();this._beforeCancelEditData(),this.init(),this.resetChanges(),this._resetEditColumnName(),this._resetEditRowKey(),this._afterCancelEditData(e)}_afterCancelEditData(e){this._dataController.updateItems({repaintChangesOnly:this.option("repaintChangesOnly")})}_hideEditPopup(){}hasEditData(){return this.hasChanges()}update(e){let t=this._dataController;t&&this._pageIndex!==t.pageIndex()&&(e==="refresh"&&this.refresh({isPageChanged:!0}),this._pageIndex=t.pageIndex()),this._updateEditButtons()}_getRowIndicesForCascadeUpdating(e,t){return t?[]:[e.rowIndex]}addDeferred(e){this._deferreds.includes(e)||(this._deferreds.push(e),e.always(()=>{let t=this._deferreds.indexOf(e);t>=0&&this._deferreds.splice(t,1)}))}_prepareChange(e,t,n){var o;let s={},r=(o=e.row)===null||o===void 0?void 0:o.data,a=e.key,l=new y;return a!==void 0&&(e.value=t,Et(e.column.setCellValue(s,t,m(!0,{},r),n)).done(()=>{l.resolve({data:s,key:a,oldData:r,type:Fd})}).fail(Pd(l)).fail(c=>this._fireDataErrorOccurred(c)),f(n)&&e.column.displayValueMap&&(e.column.displayValueMap[t]=n),this._updateRowValues(e),this.addDeferred(l)),l}_updateRowValues(e){if(e.values){let t=this._dataController,n=t.getRowIndexByKey(e.key),o=t.getVisibleRows()[n];o&&(e.row.values=o.values,e.values=o.values),e.values[e.columnIndex]=e.value}}updateFieldValue(e,t,n,o){let s=e.key,r=new y;return s===void 0&&this._dataController.fireError("E1043"),e.column.setCellValue?this._prepareChange(e,t,n).done(a=>{P(this._applyChange(e,a,o)).always(()=>{r.resolve()})}):r.resolve(),r.promise()}_focusPreviousEditingCellIfNeed(e){if(this.hasEditData()&&!this.isEditCell(e.rowIndex,e.columnIndex))return this._focusEditingCell(),this._updateEditRow(e.row,!0),!0}_needUpdateRow(e){let t=this._columnsController.getVisibleColumns();e||(e=this._getEditColumn());let n=e&&e.setCellValue!==e.defaultSetCellValue,o=t.some(s=>s.calculateCellValue!==s.defaultCalculateCellValue);return n||o}_applyChange(e,t,n){let o=I({},e,{forceUpdateRow:n});return this._addChange(t,o),this._updateEditButtons(),this._applyChangeCore(e,o.forceUpdateRow)}_applyChangeCore(e,t){let n=e.column.setCellValue!==e.column.defaultSetCellValue,{row:o}=e;o&&(t||n?this._updateEditRow(o,t,n):o.update&&o.update())}_updateEditRowCore(e,t,n){this._dataController.updateItems({changeType:"update",rowIndices:this._getRowIndicesForCascadeUpdating(e,t)})}_updateEditRow(e,t,n){t?this._updateRowImmediately(e,t,n):this._updateRowWithDelay(e,n)}_updateRowImmediately(e,t,n){this._updateEditRowCore(e,!t,n),this._validateEditFormAfterUpdate(e,n),t||this._focusEditingCell()}_updateRowWithDelay(e,t){let n=new y;this.addDeferred(n),setTimeout(()=>{var o;let s=((o=this._editForm)===null||o===void 0?void 0:o.element())||this.component.$element().get(0),r=u(S.getActiveElement(s)),a=this._rowsView.getCellIndex(r,e.rowIndex),l=r.get(0),d=R.getSelectionRange(l);if(this._updateEditRowCore(e,!1,t),this._validateEditFormAfterUpdate(e,t),a>=0){let c=this._rowsView._getCellElement(e.rowIndex,a);this._delayedInputFocus(c,()=>{setTimeout(()=>{var h;l=S.getActiveElement((h=this.component.$element())===null||h===void 0?void 0:h.get(0)),d.selectionStart>=0&&R.setSelectionRange(l,d)})})}n.resolve()})}_validateEditFormAfterUpdate(){}_addChange(e,t){var n;let o=t?.row,s=[...this.getChanges()],r=R.getIndexByKey(e.key,s);r<0&&(r=s.length,this._addInternalData({key:e.key,oldData:e.oldData}),delete e.oldData,s.push(e));let a=I({},s[r]);return a&&(e.data&&(a.data=To(a.data,e.data)),(!a.type||!e.data)&&e.type&&(a.type=e.type),o&&(o.oldData=this._getOldData(o.key),o.data=To(o.data,e.data))),s[r]=a,this._silentOption(ws,s),t&&a!==((n=this.getChanges())===null||n===void 0?void 0:n[r])&&(t.forceUpdateRow=!0),a}_getFormEditItemTemplate(e,t){return t.editCellTemplate||this._getDefaultEditorTemplate()}getColumnTemplate(e){let{column:t}=e,n=e.row&&e.row.rowIndex,o,s=this.isRowBasedEditMode(),r=this.isEditRow(n),a=this.isEditCell(n,e.columnIndex),l;return(t.showEditorAlways||t.setCellValue&&(r&&t.allowEditing||a))&&(e.rowType==="data"||e.rowType==="detailAdaptive")&&!t.command?(((this.allowUpdating(e)||r)&&t.allowEditing||a)&&(r||!s)&&(t.showEditorAlways&&!s&&(l={cancel:!1,key:e.row.isNewRow?void 0:e.row.key,data:e.row.data,column:t},this._isEditingStart(l)),(!l||!l.cancel)&&(e.setValue=(c,h)=>{this.updateFieldValue(e,c,h)})),o=t.editCellTemplate||this._getDefaultEditorTemplate()):t.command==="detail"&&e.rowType==="detail"&&r&&(o=this===null||this===void 0?void 0:this.getEditFormTemplate(e)),o}_createButton(e,t,n,o){let s=OV[t.name],r=this.option("editing.useIcons"),a=this.option("useLegacyColumnButtonTemplate"),l=u("<a>").attr("href","#").addClass(hV).addClass(t.cssClass);if(t.template&&a)this._rowsView.renderTemplate(e,t.template,n,!0);else{if(t.template)l=u("<span>").addClass(t.cssClass);else if(r&&s||t.icon){s=t.icon||s;let d=Js(s);d==="image"||d==="svg"?l=Mi(s).addClass(t.cssClass):l.addClass(`dx-icon${d==="dxIcon"?"-":" "}${s}`).attr("title",t.text),l.addClass(pV),e.addClass(IO);let c=this.getButtonLocalizationNames()[t.name];c&&l.attr("aria-label",O.format(c))}else l.text(t.text);f(t.hint)&&l.attr("title",t.hint),this._isButtonDisabled(t,n)?l.addClass("dx-state-disabled"):(!t.template||t.onClick)&&_.on(l,D("click",xV),this.createAction(d=>{var c;(c=t.onClick)===null||c===void 0||c.call(t,m({},d,{row:n.row,column:n.column})),d.event.preventDefault(),d.event.stopPropagation()})),e.append(l),t.template&&(n.renderAsync=!1,this._rowsView.renderTemplate(l,t.template,n,!0,o))}}getButtonLocalizationNames(){return{edit:"dxDataGrid-editingEditRow",save:"dxDataGrid-editingSaveRowChanges",delete:"dxDataGrid-editingDeleteRow",undelete:"dxDataGrid-editingUndeleteRow",cancel:"dxDataGrid-editingCancelRowChanges"}}prepareButtonItem(e,t,n,o){let s=this.option("editing.texts")??{},r={revert:s.cancelAllChanges,save:s.saveAllChanges,addRow:s.addRow},a={revert:"cancel",save:"save",addRow:"addrow"}[t],l=r[t],d=(a==="save"||a==="cancel")&&this._isEditButtonDisabled();return{widget:"dxButton",options:{onInitialized:c=>{u(c.element).addClass(e._getToolbarButtonClass(`${mV} ${this.addWidgetPrefix(a)}-button`))},icon:`edit-button-${a}`,disabled:d,onClick:()=>{setTimeout(()=>{this[n]()})},text:l,hint:l},showText:"inMenu",name:`${t}Button`,location:"after",locateInMenu:"auto",sortIndex:o}}prepareEditButtons(e){let t=this.option("editing")??{},n=[];return t.allowAdding&&n.push(this.prepareButtonItem(e,"addRow","addRow",20)),n}highlightDataCell(e,t){this.shouldHighlightCell(t)&&e.addClass(DO)}_afterInsertRow(e){}_beforeSaveEditData(e){if(e&&!f(e.key)&&f(e.type))return!0}_afterSaveEditData(){}_beforeCancelEditData(){}_allowEditAction(e,t){let n=this.option(`editing.${e}`);return A(n)&&(n=n({component:this.component,row:t.row})),n}allowUpdating(e,t){let n=this.option("editing.startEditAction")??bV;return(arguments.length>1?n===t||t==="down":!0)&&this._allowEditAction("allowUpdating",e)}allowDeleting(e){return this._allowEditAction("allowDeleting",e)}isCellModified(e){var t,n;let{columnIndex:o}=e,s=e==null||(t=e.row)===null||t===void 0||(t=t.modifiedValues)===null||t===void 0?void 0:t[o];return e!=null&&(n=e.row)!==null&&n!==void 0&&n.isNewRow&&(s=e.value),s!==void 0}isNewRowInEditMode(){let e=this._getVisibleEditRowIndex(),t=this._dataController.items();return e>=0?t[e].isNewRow:!1}_isRowDeleteAllowed(){}shouldHighlightCell(e){return this.isCellModified(e)&&e.column.setCellValue&&(this.getEditMode()!==la||!e.row.isEditing)}},BO=i=>class extends i{reload(e,t){return!t&&this._editingController.refresh(),super.reload.apply(this,arguments)}repaintRows(){if(!this._editingController.isSaving())return super.repaintRows.apply(this,arguments)}_updateEditRow(e){let t=this.option(an),n=R.getIndexByKey(t,e),o=e[n];if(o){var s;o.isEditing=!0,(s=this._updateEditItem)===null||s===void 0||s.call(this,o)}}_updateItemsCore(e){super._updateItemsCore(e),this._updateEditRow(this.items(!0))}_applyChangeUpdate(e){this._updateEditRow(e.items),super._applyChangeUpdate(e)}_applyChangesOnly(e){this._updateEditRow(e.items),super._applyChangesOnly(e)}_processItems(e,t){return e=this._editingController.processItems(e,t),super._processItems(e,t)}_processDataItem(e,t){return this._editingController.processDataItem(e,t,this.generateDataValues),super._processDataItem(e,t)}_processItem(e,t){return e=super._processItem(e,t),e.isNewRow&&(t.dataIndex--,delete e.dataIndex),e}_getChangedColumnIndices(e,t,n,o){if(!(e.isNewRow!==t.isNewRow||e.removed!==t.removed))return super._getChangedColumnIndices.apply(this,arguments)}_isCellChanged(e,t,n,o,s){let r=e.cells&&e.cells[o],a=this._editingController&&this._editingController.isEditCell(n,o);return s&&a?!1:r&&r.column&&!r.column.showEditorAlways&&r.isEditing!==a?!0:super._isCellChanged.apply(this,arguments)}needToRefreshOnDataSourceChange(e){return!(Array.isArray(e.value)&&e.value===e.previousValue&&this._editingController.isSaving())}_handleDataSourceChange(e){let t=super._handleDataSourceChange(e),n=this.option("editing.changes"),o=e.value;if(Array.isArray(o)&&n.length){let s=o.map(d=>this.keyOf(d)),r=n.filter(d=>d.type==="insert"||s.some(c=>Ee(d.key,c)));r.length!==n.length&&this.option("editing.changes",r);let a=this.option("editing.editRowKey");!r.some(d=>d.type==="insert"&&Ee(a,d.key))&&s.every(d=>!Ee(a,d))&&this.option("editing.editRowKey",null)}return t}},Q9=i=>class extends i{getCellIndex(e,t){if(!e.is("td")&&t>=0){let n=this.getCellElements(t),o=-1;return x(n,(s,r)=>{u(r).find(e).length&&(o=s)}),o}return super.getCellIndex.apply(this,arguments)}publicMethods(){return super.publicMethods().concat(["cellValue"])}_getCellTemplate(e){return this._editingController.getColumnTemplate(e)||super._getCellTemplate(e)}_createRow(e){let t=super._createRow.apply(this,arguments);if(e){let n=!!e.removed,o=!!e.isNewRow,s=!!e.modified;o&&t.addClass(_V),s&&t.addClass(CV),(o||n)&&t.removeClass(gV)}return t}_getColumnIndexByElement(e){let t=e.closest("table"),n=this.getTableElements();for(;t.length&&!n.filter(t).length;)e=t.closest("td"),t=e.closest("table");return this._getColumnIndexByElementCore(e)}_getColumnIndexByElementCore(e){let t=e.closest(`.${Wo}> td:not(.dx-master-detail-cell)`);return this.getCellIndex(t)}_editCellByClick(e,t){let n=this._editingController,o=u(e.event.target),s=this._getColumnIndexByElement(o),r=this._dataController.items()[e.rowIndex],a=n.allowUpdating({row:r},t)||r&&r.isNewRow,l=this._columnsController.getVisibleColumns()[s],d=n.isEditCell(e.rowIndex,s),c=a&&l&&(l.allowEditing||d),h=this.option("editing.startEditAction")||"click",p=l&&l.showEditorAlways;if(d)return!0;if(t==="down")return(F.real().ios||F.real().android)&&uo(),p&&c&&n.editCell(e.rowIndex,s);if(t==="click"&&h==="dblClick"&&this._pointerDownTarget===o.get(0)){let C=r?.isNewRow;n.closeEditCell(!1,C)}if(c&&t===h)return n.editCell(e.rowIndex,s)||n.isEditRow(e.rowIndex)}_rowPointerDown(e){this._pointerDownTarget=e.event.target,this._pointerDownTimeout=setTimeout(()=>{this._editCellByClick(e,"down")})}_rowClickTreeListHack(e){super._rowClick.apply(this,arguments)}_rowClick(e){let t=u(e.rowElement).hasClass(this.addWidgetPrefix(Ad));e.event[Km]=this.component,!this._editCellByClick(e,"click")&&!t&&super._rowClick.apply(this,arguments)}_rowDblClickTreeListHack(e){super._rowDblClick.apply(this,arguments)}_rowDblClick(e){this._editCellByClick(e,"dblClick")||super._rowDblClick.apply(this,arguments)}_cellPrepared(e,t){var n;let o=this._editingController,s=!!t.column.command,r=t.setValue,a=o.isEditRow(t.rowIndex),l=MO(a,t);if(RO(a,t)){let{alignment:c}=t.column;e.toggleClass(this.addWidgetPrefix(uV),!r).toggleClass(vV,!r),c&&e.find(Ku).first().css("textAlign",c)}l&&this._editCellPrepared(e);let d=!!((n=t.column)!==null&&n!==void 0&&n.cellTemplate);t.column&&!s&&(!d||o.shouldHighlightCell(t))&&o.highlightDataCell(e,t),super._cellPrepared.apply(this,arguments)}_getCellOptions(e){let t=super._getCellOptions(e),{columnIndex:n,row:o}=e;return t.isEditing=this._editingController.isEditCell(t.rowIndex,t.columnIndex),t.removed=o.removed,o.modified&&(t.modified=o.modifiedValues[n]!==void 0),t}_setCellAriaAttributes(e,t){super._setCellAriaAttributes(e,t),t.removed&&this.setAria("roledescription",O.format("dxDataGrid-ariaDeletedCell"),e),t.modified&&this.setAria("roledescription",O.format("dxDataGrid-ariaModifiedCell"),e),t.column.allowEditing&&!t.removed&&!t.modified&&t.rowType==="data"&&t.column.calculateCellValue===t.column.defaultCalculateCellValue&&this._editingController.isCellBasedEditMode()&&this.setAria("roledescription",O.format("dxDataGrid-ariaEditableCell"),e)}_createCell(e){let t=super._createCell(e),n=this._editingController.isEditRow(e.rowIndex);return RO(n,e)&&t.addClass(aa),t}cellValue(e,t,n,o){let s=this.getCellOptions(e,t);if(s){if(n===void 0)return s.value;this._editingController.updateFieldValue(s,n,o,!0)}}dispose(){super.dispose.apply(this,arguments),clearTimeout(this._pointerDownTimeout)}_renderCore(){return super._renderCore.apply(this,arguments),this.waitAsyncTemplates(!0).done(()=>{this._editingController._focusEditorIfNeed()})}_editCellPrepared(){}_formItemPrepared(){}},Z9=i=>class extends i{optionChanged(e){let{fullName:t}=e;switch(e.name){case"editing":{t&&![Md,ws,cr,an].some(s=>s===t)&&this._invalidate(),super.optionChanged(e);break}case"useLegacyColumnButtonTemplate":e.handled=!0;break;default:super.optionChanged(e)}}_getToolbarItems(){let e=super._getToolbarItems();return this._editingController.prepareEditButtons(this).concat(e)}},qm={defaultOptions:()=>({editing:{mode:"row",refreshMode:"full",newRowPosition:SO,allowAdding:!1,allowUpdating:!1,allowDeleting:!1,useIcons:!1,selectTextOnEditStart:!1,confirmDelete:!0,texts:{editRow:O.format("dxDataGrid-editingEditRow"),saveAllChanges:O.format("dxDataGrid-editingSaveAllChanges"),saveRowChanges:O.format("dxDataGrid-editingSaveRowChanges"),cancelAllChanges:O.format("dxDataGrid-editingCancelAllChanges"),cancelRowChanges:O.format("dxDataGrid-editingCancelRowChanges"),addRow:O.format("dxDataGrid-editingAddRow"),deleteRow:O.format("dxDataGrid-editingDeleteRow"),undeleteRow:O.format("dxDataGrid-editingUndeleteRow"),confirmDeleteMessage:O.format("dxDataGrid-editingConfirmDeleteMessage"),confirmDeleteTitle:""},form:{colCount:2},popup:{},startEditAction:"click",editRowKey:null,editColumnName:null,changes:[]},useLegacyColumnButtonTemplate:!1}),controllers:{editing:kO},extenders:{controllers:{data:BO},views:{rowsView:Q9,headerPanel:Z9}}};var J9=i=>class extends BO(i){_changeRowExpandCore(e){let t=this._editingController;return Array.isArray(e)&&t&&t.refresh(),super._changeRowExpandCore.apply(this,arguments)}};$.registerModule("editing",I({},qm,{extenders:I({},qm.extenders,{controllers:I({},qm.extenders.controllers,{data:J9})})}));var eQ=i=>class extends i{isRowEditMode(){return this.getEditMode()===la}_afterCancelEditData(e){let t=this._dataController;this.isRowBasedEditMode()&&e>=0?t.updateItems({changeType:"update",rowIndices:[e,e+1]}):super._afterCancelEditData(e)}_isDefaultButtonVisible(e,t){let n=this.isRowBasedEditMode(),s=!this.isPopupEditMode()&&t.row&&Ee(t.row.key,this.option(an));if(n)switch(e.name){case"edit":return!s&&this.allowUpdating(t);case"delete":return super._isDefaultButtonVisible(e,t)&&!s;case"save":case"cancel":return s;default:return super._isDefaultButtonVisible(e,t)}return super._isDefaultButtonVisible(e,t)}isEditRow(e){return this.isRowBasedEditMode()&&this.isEditRowByIndex(e)}_cancelSaving(e){this.isRowBasedEditMode()&&(this.hasChanges()||this._cancelEditDataCore()),super._cancelSaving(e)}_refreshCore(e){let{allowCancelEditing:t}=e??{};if(this.isRowBasedEditMode()){let n=this.getChanges().filter(o=>o.type==="update").length>0;this.init(),t&&n&&this._cancelEditDataCore()}super._refreshCore(e)}_isEditColumnVisible(){let e=super._isEditColumnVisible(),t=this.option("editing"),n=this.isRowEditMode(),o=t.allowUpdating||t.allowAdding;return e||n&&o}_focusEditorIfNeed(){let e=this.getEditMode();if(this._needFocusEditor){if(cV.includes(e)){let t=this.getFocusedCellInRow(this._getVisibleEditRowIndex());this._delayedInputFocus(t,()=>{t&&this.component.focus(t)})}this._needFocusEditor=!1}}},tQ=i=>class extends i{_getChangedColumnIndices(e,t,n,o){if(!(this._editingController.isRowBasedEditMode()&&e.isEditing!==t.isEditing))return super._getChangedColumnIndices.apply(this,arguments)}},iQ=i=>class extends i{_createRow(e){let t=super._createRow.apply(this,arguments);return e&&this._editingController.isEditRow(e.rowIndex)&&(t.addClass(AO),t.removeClass(yO),e.rowType==="detail"&&t.addClass(this.addWidgetPrefix(Ad))),t}_update(e){super._update(e),e.changeType==="updateSelection"&&this.getTableElements().children("tbody").children(`.${AO}`).removeClass(yO)}},WV={extenders:{controllers:{editing:eQ,data:tQ},views:{rowsView:iQ}}};$.registerModule("editingRowBased",WV);var GV="dx-responsivebox-screen-";var jV=jn.inherit({_getDefaultOptions(){return m(this.callBase(),{rows:[],cols:[],screenByWidth:null,singleColumnScreen:"",height:"100%",width:"100%",activeStateEnabled:!1,focusStateEnabled:!1,onItemStateChanged:void 0,onLayoutChanged:null,currentScreenFactor:void 0})},_init(){this.option("screenByWidth")||this._options.silent("screenByWidth",lc),this.callBase(),this._initLayoutChangedAction()},_initLayoutChangedAction(){this._layoutChangedAction=this._createActionByOption("onLayoutChanged",{excludeValidators:["disabled","readonly"]})},_itemClass:()=>"dx-box-item",_itemDataKey:()=>"dxBoxItemData",_initMarkup(){this.callBase(),this.$element().addClass("dx-responsivebox")},_renderItems(){this._setScreenSize(),this._screenItems=this._itemsByScreen(),this._prepareGrid(),this._spreadItems(),this._layoutItems(),this._linkNodeToItem()},_itemOptionChanged(i){let e=this._findItemElementByItem(i);e.length&&(this._refreshItem(e,i),this._clearItemNodeTemplates(),this._update(!0))},_setScreenSize(){let i=this._getCurrentScreen();this._removeScreenSizeClass(),this.$element().addClass(GV+i),this.option("currentScreenFactor",i)},_removeScreenSizeClass(){let i=this.option("currentScreenFactor");i&&this.$element().removeClass(GV+i)},_prepareGrid(){let i=this._grid=[];this._prepareRowsAndCols(),x(this._rows,()=>{let e=[];i.push(e),x(this._cols,()=>{e.push(this._createEmptyCell())})})},getSingleColumnRows(){let i=this.option("rows"),e=this._screenItems.length;if(i.length){let t=this._filterByScreen(i),n=[];for(let o=0;o<e;o++){let s=this._defaultSizeConfig();o<t.length&&f(t[o].shrink)&&(s.shrink=t[o].shrink),n.push(s)}return n}return this._defaultSizeConfig(e)},_prepareRowsAndCols(){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(){return this._screenRegExp().test(this.option("singleColumnScreen"))||!this.option("rows").length||!this.option("cols").length},_prepareSingleColumnScreenItems(){this._screenItems.sort((i,e)=>i.location.row-e.location.row||i.location.col-e.location.col),x(this._screenItems,(i,e)=>{m(e.location,{row:i,col:0,rowspan:1,colspan:1})})},_sizesByScreen(i){return qe(this._filterByScreen(i),e=>m(this._defaultSizeConfig(),e))},_createDefaultSizeConfig:()=>({ratio:1,baseSize:0,minSize:0,maxSize:0}),_defaultSizeConfig(i){let e=this._createDefaultSizeConfig();if(!arguments.length)return e;let t=[];for(let n=0;n<i;n++)t.push(e);return t},_filterByScreen(i){let e=this._screenRegExp();return At(i,t=>!t.screen||e.test(t.screen))},_screenRegExp(){let i=this._getCurrentScreen();return new RegExp(`(^|\\s)${i}($|\\s)`,"i")},_getCurrentScreen(){let i=this._screenWidth();return this.option("screenByWidth")(i)},_screenWidth:()=>j()?W(q()):1920,_createEmptyCell:()=>({item:{},location:{colspan:1,rowspan:1}}),_spreadItems(){x(this._screenItems,(i,e)=>{let t=e.location||{},n=t.col,o=t.row,s=this._grid[o],r=s&&s[n];this._occupyCells(r,e)})},_itemsByScreen(){return this.option("items").reduce((i,e)=>{let t=e.location||{};return t=X(t)?[t]:t,this._filterByScreen(t).forEach(n=>{i.push({item:e,location:m({rowspan:1,colspan:1},n)})}),i},[])},_occupyCells(i,e){!i||this._isItemCellOccupied(i,e)||(m(i,e),this._markSpanningCell(i))},_isItemCellOccupied(i,e){if(!bt(i.item))return!0;let t=!1;return this._loopOverSpanning(e.location,n=>{t=t||!bt(n.item)}),t},_loopOverSpanning(i,e){let t=i.row+i.rowspan-1,n=i.col+i.colspan-1,o=Math.min(t,this._rows.length-1),s=Math.min(n,this._cols.length-1);i.rowspan-=t-o,i.colspan-=n-s;for(let r=i.row;r<=o;r++)for(let a=i.col;a<=s;a++)(r!==i.row||a!==i.col)&&e(this._grid[r][a])},_markSpanningCell(i){this._loopOverSpanning(i.location,e=>{m(e,{item:i.item,spanningCell:i})})},_linkNodeToItem(){x(this._itemElements(),(i,e)=>{let t=u(e),n=t.data("dxBoxItemData");n.box||(n.node=t.children())})},_layoutItems(){let i=this._grid.length,e=i&&this._grid[0].length;if(!i&&!e)return;let t=this._layoutBlock({direction:"col",row:{start:0,end:i-1},col:{start:0,end:e-1}}),n=this._prepareBoxConfig(t.box||{direction:"row",items:[m(t,{ratio:1})]});m(n,this._rootBoxConfig(n.items)),this._$root=u("<div>").appendTo(this._itemContainer()),this._createComponent(this._$root,qa,n)},_rootBoxConfig(i){return{width:"100%",height:"100%",items:x(i,(t,n)=>{this._needApplyAutoBaseSize(n)&&m(n,{baseSize:"auto"})}),itemTemplate:this._getTemplateByOption("itemTemplate"),itemHoldTimeout:this.option("itemHoldTimeout"),onItemHold:this._createActionByOption("onItemHold"),onItemClick:this._createActionByOption("onItemClick"),onItemContextMenu:this._createActionByOption("onItemContextMenu"),onItemRendered:this._createActionByOption("onItemRendered")}},_needApplyAutoBaseSize:i=>!i.baseSize&&(!i.minSize||i.minSize==="auto")&&(!i.maxSize||i.maxSize==="auto"),_prepareBoxConfig(i){return m(i||{},{crossAlign:"stretch",onItemStateChanged:this.option("onItemStateChanged")})},_layoutBlock(i){return this._isSingleItem(i)?this._itemByCell(i.row.start,i.col.start):this._layoutDirection(i)},_isSingleItem(i){let e=this._grid[i.row.start][i.col.start].location,t=i.row.end-i.row.start===e.rowspan-1,n=i.col.end-i.col.start===e.colspan-1;return t&&n},_itemByCell(i,e){let t=this._grid[i][e];return t.spanningCell?null:t.item},_layoutDirection(i){let e=[],{direction:t}=i,n=this._crossDirection(t),o;for(;o=this._nextBlock(i);){if(this._isBlockIndivisible(i.prevBlockOptions,o))throw ie.Error("E1025");let s=this._layoutBlock({direction:n,row:o.row,col:o.col,prevBlockOptions:i});s&&(m(s,this._blockSize(o,n)),e.push(s)),i[n].start=o[n].end+1}return{box:this._prepareBoxConfig({direction:t,items:e})}},_isBlockIndivisible:(i,e)=>i&&i.col.start===e.col.start&&i.col.end===e.col.end&&i.row.start===e.row.start&&i.row.end===e.row.end,_crossDirection:i=>i==="col"?"row":"col",_nextBlock(i){let{direction:e}=i,t=this._crossDirection(e),n=i[e].start,o=i[e].end,s=i[t].start;if(s>i[t].end)return null;let r=1;for(let l=s;l<s+r;l++){let d=1;for(let p=n;p<=o;p++){let g=this._cellByDirection(e,p,l);d=Math.max(d,g.location[`${t}span`])}let c=l+d,h=s+r;c>h&&(r+=c-h)}let a={};return a[e]={start:n,end:o},a[t]={start:s,end:s+r-1},a},_cellByDirection(i,e,t){return i==="col"?this._grid[t][e]:this._grid[e][t]},_blockSize(i,e){let t=e==="row"?"auto":0,n=e==="row"?this._rows:this._cols,o=m(this._createDefaultSizeConfig(),{ratio:0});for(let s=i[e].start;s<=i[e].end;s++){let r=n[s];o.ratio+=r.ratio,o.baseSize+=r.baseSize,o.minSize+=r.minSize,o.maxSize+=r.maxSize,f(r.shrink)&&(o.shrink=r.shrink)}return o.minSize=o.minSize?o.minSize:t,o.maxSize=o.maxSize?o.maxSize:"auto",this._isSingleColumnScreen()&&(o.baseSize="auto"),o},_update(i){let e=this._$root;this._renderItems(),e&&(i?e.remove():(e.detach(),this._saveAssistantRoot(e))),this._layoutChangedAction()},_saveAssistantRoot(i){this._assistantRoots=this._assistantRoots||[],this._assistantRoots.push(i)},_dispose(){this._clearItemNodeTemplates(),this._cleanUnusedRoots(),this.callBase.apply(this,arguments)},_cleanUnusedRoots(){this._assistantRoots&&x(this._assistantRoots,(i,e)=>{u(e).remove()})},_clearItemNodeTemplates(){x(this.option("items"),function(){delete this.node})},_attachClickEvent:E,_optionChanged(i){switch(i.name){case"rows":case"cols":case"screenByWidth":case"singleColumnScreen":this._clearItemNodeTemplates(),this._invalidate();break;case"width":case"height":this.callBase(i),this._update();break;case"onLayoutChanged":this._initLayoutChangedAction();break;case"itemTemplate":this._clearItemNodeTemplates(),this.callBase(i);break;case"currentScreenFactor":break;default:this.callBase(i)}},_dimensionChanged(){this._getCurrentScreen()!==this.option("currentScreenFactor")&&this._update()},repaint(){this._update()}});K("dxResponsiveBox",jV);var KV=jV;var UV=KV;function qV(i){let{item:e,$parent:t,rootElementCssClassList:n,validationGroup:o,createComponentCallback:s}=i,r=u("<div>").appendTo(t).addClass(n.join(" ")).addClass("dx-field-button-item").css("textAlign",nQ(e.horizontalAlignment));t.css("justifyContent",oQ(e.verticalAlignment));let a=u("<div>").appendTo(r);return{$rootElement:r,buttonInstance:s(a,"dxButton",m({validationGroup:o},e.buttonOptions))}}function nQ(i){return f(i)?i:"right"}function oQ(i){switch(i){case"center":return"center";case"bottom":return"flex-end";default:return"flex-start"}}function VO(i){let{$parent:e,rootElementCssClassList:t}=i;return u("<div>").addClass("dx-field-empty-item").html("&nbsp;").addClass(t.join(" ")).appendTo(e)}var sQ=pe.inherit({ctor(i,e){this.editor=i,this.validator=e,this.validationRequestsCallbacks=[];let t=n=>{this.validationRequestsCallbacks.forEach(o=>o(n))};i.validationRequest.add(t),i.on("disposing",()=>{i.validationRequest.remove(t)})},getValue(){return this.editor.option("value")},getCurrentValidationError(){return this.editor.option("validationError")},bypass(){return this.editor.option("disabled")},applyValidationResults(i){this.editor.option({validationErrors:i.brokenRules,validationStatus:i.status})},reset(){this.editor.clear()},focus(){this.editor.focus()}}),YV=sQ;var XV=pn.inherit({_initOptions(i){this.callBase.apply(this,arguments),this.option(Ni.initValidationOptions(i))},_getDefaultOptions(){return m(this.callBase(),{validationRules:[]})},_init(){this.callBase(),this._initGroupRegistration(),this.focused=ge(),this._initAdapter(),this._validationInfo={result:null,deferred:null,skipValidation:!1}},_initGroupRegistration(){let i=this._findGroup();this._groupWasInit||this.on("disposing",e=>{Ni.removeRegisteredValidator(e.component._validationGroup,e.component)}),(!this._groupWasInit||this._validationGroup!==i)&&(Ni.removeRegisteredValidator(this._validationGroup,this),this._groupWasInit=!0,this._validationGroup=i,Ni.registerValidatorInGroup(i,this))},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{validationGroup:!0})},_getEditor(){let i=this.$element()[0];return Xe(i,"dx-validation-target")},_initAdapter(){let i=this._getEditor(),e=this.option("adapter");if(!e){if(i){e=new YV(i,this),e.validationRequestsCallbacks.push(n=>{this._validationInfo.skipValidation||this.validate(n)}),this.option("adapter",e);return}throw ie.Error("E0120")}let t=e.validationRequestsCallbacks;t&&t.push(n=>{this.validate(n)})},_toggleRTLDirection(i){var e;let t=((e=this.option("adapter"))===null||e===void 0||(e=e.editor)===null||e===void 0?void 0:e.option("rtlEnabled"))??i;this.callBase(t)},_initMarkup(){this.$element().addClass("dx-validator"),this.callBase()},_render(){this.callBase(),this._toggleAccessibilityAttributes()},_toggleAccessibilityAttributes(){let i=this._getEditor();if(i){let t=(this.option("validationRules")||[]).some(n=>{let{type:o}=n;return o==="required"})||null;i.isInitialized()&&i.setAria("required",t),i.option("_onMarkupRendered",()=>{i.setAria("required",t)})}},_visibilityChanged(i){i&&this._initGroupRegistration()},_optionChanged(i){switch(i.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(Ni.synchronizeValidationOptions(i,this.option()));break;default:this.callBase(i)}},_getValidationRules(){return this._validationRules||(this._validationRules=qe(this.option("validationRules"),(i,e)=>m({},i,{validator:this,index:e}))),this._validationRules},_findGroup(){let i=this.$element();return this.option("validationGroup")||Ni.findGroup(i,this._modelByElement(i))},_resetValidationRules(){delete this._validationRules},validate(i){let e=this.option("adapter"),t=this.option("name"),n=e.bypass&&e.bypass(),o=i&&i.value!==void 0?i.value:e.getValue(),s=e.getCurrentValidationError&&e.getCurrentValidationError(),r=this._getValidationRules(),a=this._validationInfo&&this._validationInfo.result;if(a&&a.status==="pending"&&a.value===o)return m({},a);let l;return n?l={isValid:!0,status:"valid"}:s&&s.editorSpecific?(s.validator=this,l={isValid:!1,status:"invalid",brokenRule:s,brokenRules:[s]}):l=Ni.validate(o,r,t),l.id=new Ae().toString(),this._applyValidationResult(l,e),l.complete&&l.complete.then(d=>{d.id===this._validationInfo.result.id&&this._applyValidationResult(d,e)}),m({},this._validationInfo.result)},reset(){let i=this.option("adapter"),e={id:null,isValid:!0,brokenRule:null,brokenRules:null,pendingRules:null,status:"valid",complete:null};this._validationInfo.skipValidation=!0,i.reset(),this._validationInfo.skipValidation=!1,this._resetValidationRules(),this._applyValidationResult(e,i)},_updateValidationResult(i){if(!this._validationInfo.result||this._validationInfo.result.id!==i.id){let e=this._validationInfo.deferred&&this._validationInfo.result.complete;this._validationInfo.result=m({},i,{complete:e})}else for(let e in i)e!=="id"&&e!=="complete"&&(this._validationInfo.result[e]=i[e])},_applyValidationResult(i,e){let t=this._createActionByOption("onValidated",{excludeValidators:["readOnly"]});if(i.validator=this,this._updateValidationResult(i),e.applyValidationResults&&e.applyValidationResults(this._validationInfo.result),this.option({validationStatus:this._validationInfo.result.status}),this._validationInfo.result.status==="pending"){this._validationInfo.deferred||(this._validationInfo.deferred=y(),this._validationInfo.result.complete=this._validationInfo.deferred.promise()),this._eventsStrategy.fireEvent("validating",[this._validationInfo.result]);return}this._validationInfo.result.status!=="pending"&&(t(i),this._validationInfo.deferred&&(this._validationInfo.deferred.resolve(i),this._validationInfo.deferred=null))},focus(){let i=this.option("adapter");i&&i.focus&&i.focus()},_useTemplates:()=>!1});K("dxValidator",XV);var Ym=XV;var Xm=Ym;var QV="dx-form",Qm="dx-form-group",ZV="dx-form-group-caption",JV="dx-form-group-custom-caption",LO="dx-col-",Zm="dx-field-item",NO="dx-layout-manager-one-col",HO="dx-field-item-label-content",eL="dx-layout-manager",$O="dx-field-item-label",Qu="dx-field-item-content",tL="dx-single-column-item-content",Jm="dx-root-simple-item",iL="dx-form-group-content",nL="dx-field-item-has-group",oL="dx-field-item-has-tabs",sL="dx-form-group-with-caption",zO="dx-field-item-tab",WO="dx-group-colcount-",GO="group-col-count",rL="dx-form-validation-summary",aL="dx-form-styling-mode-underlined",Zu="simple";var rQ=["dxTagBox","dxRangeSlider","dxDateRangeBox"],aQ=["dxRangeSlider","dxSlider"],lQ=["dxCalendar","dxCheckBox","dxHtmlEditor","dxRadioGroup","dxRangeSlider","dxSlider","dxSwitch"],dQ=["dxSelectBox","dxDropDownBox","dxTagBox","dxLookup","dxAutocomplete","dxColorBox","dxDateBox","dxDateRangeBox"];function lL(i){let{$parent:e,rootElementCssClassList:t,formOrLayoutManager:n,createComponentCallback:o,item:s,template:r,labelTemplate:a,name:l,formLabelLocation:d,requiredMessageTemplate:c,validationGroup:h,editorValue:p,canAssignUndefinedValueToEditor:g,editorValidationBoundary:C,editorStylingMode:v,showColonAfterLabel:b,managerLabelLocation:T,itemId:M,managerMarkOptions:G,labelMode:te,onLabelTemplateRendered:oe}=i,re=f(s.isRequired)?s.isRequired:!!hQ(s.validationRules),Ie=s.itemType===Zu,Fe=s.helpText?`dx-${new Ae}`:null,We=pQ({item:s,id:M,isRequired:re,managerMarkOptions:G,showColonAfterLabel:b,labelLocation:T,formLabelMode:te,labelTemplate:a,onLabelTemplateRendered:oe}),di=We.visible&&(We.text||We.labelTemplate&&Ie),{location:St,labelID:wo}=We,pa=St!=="top"&&["dxTextArea","dxRadioGroup","dxCalendar","dxHtmlEditor"].includes(s.editorType),Vn=uQ({$parent:e,editorType:s.editorType,editorValue:p,defaultEditorName:s.dataField,canAssignUndefinedValueToEditor:g,externalEditorOptions:s.editorOptions,editorInputId:M,editorValidationBoundary:C,editorStylingMode:v,formLabelMode:te,labelText:We.textWithoutColon,labelMark:We.markOptions.showRequiredMark?"\xA0"+We.markOptions.requiredMark:""}),iw=We.markOptions.showOptionalMark&&!We.visible&&Vn.labelMode!=="hidden"&&!f(s.helpText)?We.markOptions.optionalMark:s.helpText;return{$parent:e,rootElementCssClassList:t,formOrLayoutManager:n,createComponentCallback:o,labelOptions:We,labelNeedBaselineAlign:pa,labelLocation:St,needRenderLabel:di,item:s,isSimpleItem:Ie,isRequired:re,template:r,helpID:Fe,labelID:wo,name:l,helpText:iw,formLabelLocation:d,requiredMessageTemplate:c,validationGroup:h,editorOptions:Vn}}function dL(i){let{showRequiredMark:e,requiredMark:t,showOptionalMark:n,optionalMark:o}=i;return!e&&!n?"":"\xA0"+(e?t:o)}function jO(i,e){let{showRequiredMark:t,requiredMark:n,showOptionalMark:o,optionalMark:s}=i;return{showRequiredMark:t&&e,requiredMark:n,showOptionalMark:o&&!e,optionalMark:s}}function cQ(i,e,t){return dQ.includes(e)?{onPopupInitialized:o=>{let{component:s,popup:r}=o,a=s.option("openOnFieldClick"),l=r.option("hideOnOutsideClick");if(a&&A(l)){let d=c=>{let h=u(c.target),p=i.find(`label[for="${t}"]`);return!!!h.closest(p).length&&l(c)};s.option("dropDownOptions",{hideOnOutsideClick:d}),r.option({hideOnOutsideClick:d})}}}:{}}function uQ(i){let{$parent:e,editorType:t,defaultEditorName:n,editorValue:o,canAssignUndefinedValueToEditor:s,externalEditorOptions:r,editorInputId:a,editorValidationBoundary:l,editorStylingMode:d,formLabelMode:c,labelText:h,labelMark:p}=i,g={};(o!==void 0||s)&&(g.value=o),rQ.includes(t)&&(g.value=g.value||[]);let C=r?.labelMode;f(C)||(C=c==="outside"?"hidden":c);let v=r?.stylingMode||d,b=aQ.includes(t),T=cQ(e,t,a),M=m(!0,g,r,T,{inputAttr:{id:a},validationBoundary:l,stylingMode:v,label:b?r?.label:h,labelMode:C,labelMark:p});return r&&(M.dataSource&&(M.dataSource=r.dataSource),M.items&&(M.items=r.items)),n&&!M.name&&(M.name=n),M}function hQ(i){let e;return i&&i.length&&x(i,(t,n)=>{if(n.type==="required")return e=!0,!1}),e}function pQ(i){let{item:e,id:t,isRequired:n,managerMarkOptions:o,showColonAfterLabel:s,labelLocation:r,labelTemplate:a,formLabelMode:l,onLabelTemplateRendered:d}=i,c=lQ.includes(e.editorType),h=m({showColon:s,location:r,id:t,visible:l==="outside"||c&&l!=="hidden",isRequired:n},e?e.label:{},{markOptions:jO(o,n),labelTemplate:a,onLabelTemplateRendered:d});return["dxRadioGroup","dxCheckBox","dxLookup","dxSlider","dxRangeSlider","dxSwitch","dxHtmlEditor","dxDateRangeBox"].includes(e.editorType)&&(h.labelID=`dx-label-${new Ae}`),!h.text&&e.dataField&&(h.text=to(e.dataField)),h.text&&(h.textWithoutColon=h.text,h.text+=h.showColon?":":""),h}var gQ="dx-field-item-required-mark";var mQ="dx-field-item-optional-mark";function cL(i){let{text:e,id:t,location:n,alignment:o,labelID:s=null,markOptions:r={},labelTemplate:a,labelTemplateData:l,onLabelTemplateRendered:d}=i;if((!f(e)||e.length<=0)&&!f(a))return null;let c=u("<label>").addClass(`${$O} dx-field-item-label-location-${n}`).attr("for",t).attr("id",s).css("textAlign",o),h=u("<span>").addClass(HO),p=u("<span>").addClass("dx-field-item-label-text").text(e);return a&&(p=u("<div>").addClass("dx-field-item-custom-label-content"),l.text=e,a.render({container:H(p),model:l,onRendered(){d?.()}})),c.append(h.append(p,fQ(r)))}function fQ(i){let e=dL(i);return e===""?null:u("<span>").addClass(i.showRequiredMark?gQ:mQ).text(e)}function uL(i,e,t){let n=`${e} > .${$O}:not(.dx-field-item-label-location-top) > .${HO}`,o=i.find(n),s=o.length,r,a,l=0;for(a=0;a<s;a++)r=_Q(o[a]),r>l&&(l=r);for(a=0;a<s;a++)o[a].style.width=`${l}px`}function _Q(i){let e=0,t=i.children.length;for(let n=0;n<t;n++){let o=i.children[n];e+=o.offsetWidth}return e}var mL="dx-field-item-content-wrapper";var CQ="dx-template-wrapper",KO="dx-validation-target",xQ="dx-invalid";function fL(i){let{$parent:e,rootElementCssClassList:t,formOrLayoutManager:n,createComponentCallback:o,labelOptions:s,labelNeedBaselineAlign:r,labelLocation:a,needRenderLabel:l,formLabelLocation:d,item:c,editorOptions:h,isSimpleItem:p,isRequired:g,template:C,helpID:v,labelID:b,name:T,helpText:M,requiredMessageTemplate:G,validationGroup:te}=i,oe=u("<div>").addClass(t.join(" ")).appendTo(e);oe.addClass(g?"dx-field-item-required":"dx-field-item-optional"),p&&oe.addClass("dx-flex-layout"),p&&r&&oe.addClass("dx-field-item-label-align");let re=u("<div>");re.data("dx-form-item",c),re.addClass(Qu).addClass("dx-field-item-content-location-"+{right:"left",left:"right",top:"bottom"}[d]);let Ie=null;if(l&&(s.labelTemplate&&(s.labelTemplateData=gL(c,h,n)),Ie=cL(s)),Ie){let{editorType:St}=c;oe.append(Ie),(a==="top"||a==="left")&&oe.append(re),a==="right"&&oe.prepend(re),a==="top"?oe.addClass("dx-label-v-align"):oe.addClass("dx-label-h-align"),(St==="dxCheckBox"||St==="dxSwitch")&&_.on(Ie,de,()=>{_.trigger(re.children(),de)});let pa=["dxCheckBox","dxSwitch","dxRadioGroup"].includes(St),Vn=s.alignment;!C&&pa&&a==="top"&&(Vn==="left"||!Vn)&&re.addClass("dx-toggle-controls-paddings")}else oe.append(re);let Fe;if(C)C.render({container:H(re),model:gL(c,h,n),onRendered(){let St=hL(re),wo=vQ(St);pL(wo)}});else{let St=u("<div>").appendTo(re);try{Fe=o(St,c.editorType,h),Fe.setAria("describedby",v),b&&Fe.setAria("labelledby",b),Fe.setAria("required",g)}catch(wo){ie.log("E1035",wo.message)}}let We=hL(re),di=We&&We.data(KO);if(di){let St=c.label&&c.label.text,wo=St?null:T,pa=St?c.label.text:wo&&to(wo),Vn;if(p)if(c.validationRules)Vn=c.validationRules;else{let d_=Gi(G,pa||"");Vn=c.isRequired?[{type:"required",message:d_}]:null}Array.isArray(Vn)&&Vn.length&&o(We,Xm,{validationRules:Vn,validationGroup:te,dataGetter:()=>({formItem:c})}),pL(di)}return M&&p&&re.parent().append(u("<div>").addClass(mL).append(re).append(u("<div>").addClass("dx-field-item-help-text").attr("id",v).text(M))),{$fieldEditorContainer:re,$rootElement:oe,widgetInstance:Fe}}function hL(i){let e=i.children().first();return e.hasClass(CQ)?e.children().first():e}function vQ(i){var e;return i?.data(KO)||(i==null||(e=i.parent)===null||e===void 0||(e=e.call(i))===null||e===void 0?void 0:e.data(KO))}function pL(i){if(i&&wt()){let e=`.${mL}`,t=n=>{let{element:o,component:s}=n,{isValid:r,validationMessageMode:a}=s.option();u(o).parents(e).toggleClass(xQ,r===!1&&(s._isFocused()||a==="always"))};i.on("optionChanged",n=>{n.name==="isValid"&&t(n)}),i.on("focusIn",t).on("focusOut",t).on("enterKey",t)}}function gL(i,e,t){return{dataField:i.dataField,editorType:i.editorType,editorOptions:e,component:t,name:i.name}}var kd=class{constructor(){this._map={}}_findWidgetInstance(e){let t;return x(this._map,(n,o)=>{let{widgetInstance:s,item:r}=o;if(e(r))return t=s,!1}),t}_findFieldByCondition(e,t){let n;return x(this._map,(o,s)=>{if(e(s))return n=t==="guid"?o:s[t],!1}),n}clear(){this._map={}}removeItemsByItems(e){x(e.getItems(),t=>this.removeItemByKey(t))}removeItemByKey(e){delete this._map[e]}add(e){let t=e.guid||new Ae;return this._map[t]=e,t}addItemsOrExtendFrom(e){e.each((t,n)=>{this._map[t]?(n.widgetInstance&&(this._map[t].widgetInstance=n.widgetInstance),this._map[t].$itemContainer=n.$itemContainer):this.add({item:n.item,widgetInstance:n.widgetInstance,guid:t,$itemContainer:n.$itemContainer})})}extendRunTimeItemInfoByKey(e,t){this._map[e]&&(this._map[e]=m(this._map[e],t))}findWidgetInstanceByItem(e){return this._findWidgetInstance(t=>t===e)}findGroupOrTabLayoutManagerByPath(e){return this._findFieldByCondition(t=>{let{path:n}=t;return n===e},"layoutManager")}findKeyByPath(e){return this._findFieldByCondition(t=>{let{path:n}=t;return n===e},"guid")}findWidgetInstanceByName(e){return this._findWidgetInstance(t=>e===t.name)}findWidgetInstanceByDataField(e){return this._findWidgetInstance(t=>e===(B(t)?t:t.dataField))}findItemContainerByItem(e){for(let t in this._map)if(this._map[t].item===e)return this._map[t].$itemContainer;return null}findItemIndexByItem(e){return this._findFieldByCondition(t=>{let{item:n}=t;return n===e},"itemIndex")}findPreparedItemByItem(e){return this._findFieldByCondition(t=>{let{item:n}=t;return n===e},"preparedItem")}getItems(){return this._map}each(e){x(this._map,(t,n)=>{e(t,n)})}removeItemsByPathStartWith(e){Object.keys(this._map).filter(o=>this._map[o].path?this._map[o].path.indexOf(e,0)>-1:!1).forEach(o=>this.removeItemByKey(o))}};var bQ=at.inherit({_getDefaultOptions(){return m(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:O.format("dxForm-optionalMark"),requiredMessage:O.getFormatter("dxForm-requiredMessage")})},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{layoutData:!0,validationGroup:!0})},_init(){let i=this.option("layoutData");this.callBase(),this._itemWatchers=[],this._itemsRunTimeInfo=new kd,this._updateReferencedOptions(i),this._initDataAndItems(i)},_dispose(){this.callBase(),this._cleanItemWatchers()},_initDataAndItems(i){this._syncDataWithItems(),this._updateItems(i)},_syncDataWithItems(){let i=this.option("layoutData"),e=this.option("items");f(e)&&e.forEach(t=>{if(t.dataField&&this._getDataByField(t.dataField)===void 0){let n;t.editorOptions&&(n=t.editorOptions.value),(f(n)||t.dataField in i)&&this._updateFieldValue(t.dataField,n)}})},_getDataByField(i){return i?this.option(`layoutData.${i}`):null},_isCheckboxUndefinedStateEnabled(i){let{allowIndeterminateState:e,editorType:t,dataField:n}=i;if(e===!0&&t==="dxCheckBox"){let o=["layoutData",...n.split(".")],s=o.pop(),r=this.option(o.join("."));return r&&s in r}return!1},_updateFieldValue(i,e){let t=this.option("layoutData"),n=e;!Nt.isWrapped(t[i])&&f(i)?this.option(`layoutData.${i}`,n):Nt.isWritableWrapped(t[i])&&(n=A(n)?n():n,t[i](n)),this._triggerOnFieldDataChanged({dataField:i,value:n})},_triggerOnFieldDataChanged(i){this._createActionByOption("onFieldDataChanged")(i)},_updateItems(i){let e=this,t=this.option("items"),n=f(t),o=e.option("customizeItem"),s=n?t:this._generateItemsByData(i);if(f(s)){let r=[];x(s,(a,l)=>{e._isAcceptableItem(l)&&(l=e._processItem(l),o&&o(l),z(l)&&Nt.unwrap(l.visible)!==!1&&r.push(l))}),(!e._itemWatchers.length||!n)&&e._updateItemWatchers(s),this._setItems(r),this._sortItems()}},_cleanItemWatchers(){this._itemWatchers.forEach(i=>{i()}),this._itemWatchers=[]},_updateItemWatchers(i){let e=this,t=e._getWatch();i.forEach(n=>{z(n)&&f(n.visible)&&A(t)&&e._itemWatchers.push(t(()=>Nt.unwrap(n.visible),()=>{e._updateItems(e.option("layoutData")),e.repaint()},{skipImmediate:!0}))})},_generateItemsByData(i){let e=[];return f(i)&&x(i,t=>{e.push({dataField:t})}),e},_isAcceptableItem(i){let e=i.dataField||i,t=this._getDataByField(e);return!(A(t)&&!Nt.isWrapped(t))},_processItem(i){if(typeof i=="string"&&(i={dataField:i}),typeof i=="object"&&!i.itemType&&(i.itemType=Zu),!f(i.editorType)&&f(i.dataField)){let e=this._getDataByField(i.dataField);i.editorType=f(e)?this._getEditorTypeByDataType(Ii(e)):"dxTextBox"}return i.editorType==="dxCheckBox"&&(i.allowIndeterminateState=i.allowIndeterminateState??!0),i},_getEditorTypeByDataType(i){switch(i){case"number":return"dxNumberBox";case"date":return"dxDateBox";case"boolean":return"dxCheckBox";default:return"dxTextBox"}},_sortItems(){Sa(this._items,"visibleIndex"),this._sortIndexes()},_sortIndexes(){this._items.sort((i,e)=>{let t=i.visibleIndex,n=e.visibleIndex,o;return t>n?o=1:t<n?o=-1:o=0,o})},_initMarkup(){this._itemsRunTimeInfo.clear(),this.$element().addClass(eL),this.callBase(),this._renderResponsiveBox()},_renderResponsiveBox(){let i=this,e=[];if(i._items&&i._items.length){let t=i._getColCount(),n=u("<div>").appendTo(i.$element());i._prepareItemsWithMerging(t);let o=i._generateLayoutItems();i._responsiveBox=i._createComponent(n,UV,i._getResponsiveBoxConfig(o,t,e)),j()||i._renderTemplates(e)}},_itemStateChangedHandler(i){this._refresh()},_renderTemplates(i){let e=this,t=0;i.forEach(n=>{var o;let{item:s}=n;s!=null&&(o=s.label)!==null&&o!==void 0&&o.template&&t++}),x(i,(n,o)=>{switch(o.itemType){case"empty":VO(o);break;case"button":e._renderButtonItem(o);break;default:e._renderFieldItem(o,t)}})},_getResponsiveBoxConfig(i,e,t){let n=this,o=n.option("colCountByScreen"),s=o&&o.xs;return{onItemStateChanged:this._itemStateChangedHandler.bind(this),onLayoutChanged(){let r=n.option("onLayoutChanged"),a=n.isSingleColumnMode();r&&(n.$element().toggleClass(NO,a),r(a))},onContentReady(r){j()&&n._renderTemplates(t),n.option("onLayoutChanged")&&n.$element().toggleClass(NO,n.isSingleColumnMode(r.component))},itemTemplate(r,a,l){if(!r.location)return;let d=u(l),c=r.location.row*e,h=n._items[r.location.col+c];if(!h)return;let p=[h.cssClass];d.toggleClass(tL,n.isSingleColumnMode(this)),r.location.row===0&&p.push("dx-first-row"),r.location.col===0&&p.push("dx-first-col"),h.itemType===Zu&&n.option("isRoot")&&d.addClass(Jm);let g=r.location.col===e-1||r.location.col+r.location.colspan===e,C=n._getRowsCount(),v=r.location.row===C-1;g&&p.push("dx-last-col"),v&&p.push("dx-last-row"),h.itemType!=="empty"&&(p.push(Zm),p.push(n.option("cssItemClass")),f(h.col)&&p.push(`dx-col-${h.col}`)),t.push({itemType:h.itemType,item:h,$parent:d,rootElementCssClassList:p})},cols:n._generateRatio(e),rows:n._generateRatio(n._getRowsCount(),!0),dataSource:i,screenByWidth:n.option("screenByWidth"),singleColumnScreen:s?!1:"xs"}},_getColCount(){let i=this.option("colCount"),e=this.option("colCountByScreen");if(e){let t=this.option("form").getTargetScreenFactor();t||(t=j()?Vh(this.option("screenByWidth")):"lg"),i=e[t]||i}if(i==="auto"){if(this._cashedColCount)return this._cashedColCount;this._cashedColCount=i=this._getMaxColCount()}return i<1?1:i},_getMaxColCount(){if(!j())return 1;let i=this.option("minColWidth"),e=W(this.$element()),t=this._items.length,n=Math.floor(e/i)||1;return t<n?t:n},isCachedColCountObsolete(){return this._cashedColCount&&this._getMaxColCount()!==this._cashedColCount},_prepareItemsWithMerging(i){let e=this._items.slice(0),t,n,o=[],s,r;for(r=0;r<e.length;r++)if(t=e[r],o.push(t),(this.option("alignItemLabels")||t.alignItemLabels||t.colSpan)&&(t.col=this._getColByIndex(o.length-1,i)),t.colSpan>1&&t.col+t.colSpan<=i){for(n=[],s=0;s<t.colSpan-1;s++)n.push({merged:!0});o=o.concat(n)}else delete t.colSpan;this._setItems(o)},_getColByIndex:(i,e)=>i%e,_setItems(i){this._items=i,this._cashedColCount=null},_generateLayoutItems(){let i=this._items,e=this._getColCount(),t=[],n,o;for(o=0;o<i.length;o++)if(n=i[o],!n.merged){let s={location:{row:parseInt(o/e),col:this._getColByIndex(o,e)}};f(n.disabled)&&(s.disabled=n.disabled),f(n.visible)&&(s.visible=n.visible),f(n.colSpan)&&(s.location.colspan=n.colSpan),f(n.rowSpan)&&(s.location.rowspan=n.rowSpan),t.push(s)}return t},_renderEmptyItem(i){VO({$container:i})},_renderButtonItem(i){let{item:e,$parent:t,rootElementCssClassList:n}=i,{$rootElement:o,buttonInstance:s}=qV({item:e,$parent:t,rootElementCssClassList:n,validationGroup:this.option("validationGroup"),createComponentCallback:this._createComponent.bind(this)});this._itemsRunTimeInfo.add({item:e,widgetInstance:s,guid:e.guid,$itemContainer:o})},_renderFieldItem(i,e){var t,n;let{item:o,$parent:s,rootElementCssClassList:r}=i,a=this._getDataByField(o.dataField),l=!1;if(a===void 0){let{allowIndeterminateState:C,editorType:v,dataField:b}=o;l=this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:C,editorType:v,dataField:b})}let d=o.dataField||o.name,c=this._getFormOrThis(),{$fieldEditorContainer:h,widgetInstance:p,$rootElement:g}=fL(lL({$parent:s,rootElementCssClassList:r,item:o,name:d,editorValue:a,canAssignUndefinedValueToEditor:l,formOrLayoutManager:this._getFormOrThis(),createComponentCallback:this._createComponent.bind(this),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:o.template?this._getTemplate(o.template):null,labelTemplate:(t=o.label)!==null&&t!==void 0&&t.template?this._getTemplate(o.label.template):null,itemId:this.option("form")&&this.option("form").getItemID(d),managerMarkOptions:this._getMarkOptions(),labelMode:this.option("labelMode"),onLabelTemplateRendered:()=>{this._incTemplateRenderedCallCount(),this._shouldAlignLabelsOnTemplateRendered(c,e)&&c._alignLabels(this,this.isSingleColumnMode(c))}}));(n=this.option("onFieldItemRendered"))===null||n===void 0||n(),p&&o.dataField&&this._bindDataField(p,o.dataField,o.editorType,h),this._itemsRunTimeInfo.add({item:o,widgetInstance:p,guid:o.guid,$itemContainer:g})},_incTemplateRenderedCallCount(){this._labelTemplateRenderedCallCount=(this._labelTemplateRenderedCallCount??0)+1},_shouldAlignLabelsOnTemplateRendered(i,e){return i.option("templatesRenderAsynchronously")&&this._labelTemplateRenderedCallCount===e},_getMarkOptions(){return{showRequiredMark:this.option("showRequiredMark"),requiredMark:this.option("requiredMark"),showOptionalMark:this.option("showOptionalMark"),optionalMark:this.option("optionalMark")}},_getFormOrThis(){return this.option("form")||this},_bindDataField(i,e,t,n){let o=this._getFormOrThis();i.on("enterKey",s=>{o._createActionByOption("onEditorEnterKey")(m(s,{dataField:e}))}),this._createWatcher(i,n,e),this.linkEditorToDataField(i,e,t)},_createWatcher(i,e,t){let n=this,o=n._getWatch();if(!A(o))return;let s=o(()=>n._getDataByField(t),()=>{let r=n._getDataByField(t);if(i.NAME==="dxTagBox"){let a=i.option("value");if(r!==a&&function(l,d){if(!Array.isArray(l)||!Array.isArray(d)||l.length!==d.length)return!1;for(let c=0;c<l.length;c++)if(l[c]!==d[c])return!1;return!0}(r,a))return}i.option("value",r)},{deep:!0,skipImmediate:!0},{createWatcherDataField:t});_.on(e,ai,s)},_getWatch(){if(!f(this._watch)){let i=this.option("form");this._watch=i&&i.option("integrationOptions.watchMethod")}return this._watch},_createComponent(i,e,t){let n=this.option("readOnly"),o=Object.hasOwn(t,"readOnly"),s=this.callBase(i,e,I({},t,{readOnly:o?t.readOnly:n})),r=!1;return s.on("optionChanged",a=>{a.name==="readOnly"&&!r&&(o=!0)}),this.on("optionChanged",a=>{a.name==="readOnly"&&!o&&(r=!0,s.option(a.name,a.value),r=!1)}),s},_generateRatio(i,e){let t=[],n,o;for(o=0;o<i;o++)n={ratio:1},e&&(n.baseSize="auto"),t.push(n);return t},_getRowsCount(){return Math.ceil(this._items.length/this._getColCount())},_updateReferencedOptions(i){let e=this.option("layoutData");z(e)&&Object.getOwnPropertyNames(e).forEach(t=>delete this._optionsByReference[`layoutData.${t}`]),z(i)&&Object.getOwnPropertyNames(i).forEach(t=>this._optionsByReference[`layoutData.${t}`]=!0)},_clearWidget(i){this._disableEditorValueChangedHandler=!0,i.clear(),this._disableEditorValueChangedHandler=!1,i.option("isValid",!0)},_optionChanged(i){if(i.fullName.search("layoutData.")!==0)switch(i.name){case"showRequiredMark":case"showOptionalMark":case"requiredMark":case"optionalMark":this._cashedRequiredConfig=null,this._invalidate();break;case"layoutData":this._updateReferencedOptions(i.value),this.option("items")?bt(i.value)||this._itemsRunTimeInfo.each((e,t)=>{if(f(t.item)){let{dataField:n}=t.item;if(n&&f(t.widgetInstance)){let s=Ce(n)(i.value),{allowIndeterminateState:r,editorType:a}=t.item;s!==void 0||this._isCheckboxUndefinedStateEnabled({allowIndeterminateState:r,editorType:a,dataField:n})?t.widgetInstance.option("value",s):this._clearWidget(t.widgetInstance)}}}):(this._initDataAndItems(i.value),this._invalidate());break;case"items":this._cleanItemWatchers(),this._initDataAndItems(i.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":case"colCountByScreen":this._resetColCount();break;case"minColWidth":this.option("colCount")==="auto"&&this._resetColCount();break;case"readOnly":case"onFieldDataChanged":break;case"width":this.callBase(i),this.option("colCount")==="auto"&&this._resetColCount();break;default:this.callBase(i)}},_resetColCount(){this._cashedColCount=null,this._invalidate()},linkEditorToDataField(i,e){this.on("optionChanged",t=>{t.fullName===`layoutData.${e}`&&i._setOptionWithoutOptionChange("value",t.value)}),i.on("valueChanged",t=>{let n=z(t.value)||Array.isArray(t.value);!this._disableEditorValueChangedHandler&&!(n&&t.value===t.previousValue)&&this._updateFieldValue(e,t.value)})},_dimensionChanged(){this.option("colCount")==="auto"&&this.isCachedColCountObsolete()&&this._eventsStrategy.fireEvent("autoColCountChanged")},updateData(i,e){let t=this;z(i)?x(i,(n,o)=>{t._updateFieldValue(n,o)}):typeof i=="string"&&t._updateFieldValue(i,e)},getEditor(i){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(i)||this._itemsRunTimeInfo.findWidgetInstanceByName(i)},isSingleColumnMode(i){let e=this._responsiveBox||i;if(e)return e.option("currentScreenFactor")===e.option("singleColumnScreen")},getItemsRunTimeInfo(){return this._itemsRunTimeInfo}});K("dxLayoutManager",bQ);var yQ="dx-validationsummary-item",OQ="dx-validationsummary-item-data",_L=jn.inherit({_getDefaultOptions(){return m(this.callBase(),{focusStateEnabled:!1,noDataText:null})},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{validationGroup:!0})},_init(){this.callBase(),this._initGroupRegistration()},_initGroupRegistration(){let i=this.$element(),e=this.option("validationGroup")||Ni.findGroup(i,this._modelByElement(i)),t=Ni.addGroup(e,!0);this._unsubscribeGroup(),this._groupWasInit=!0,this._validationGroup=e,this.groupSubscription=this._groupValidationHandler.bind(this),t.on("validated",this.groupSubscription)},_unsubscribeGroup(){let i=Ni.getGroupConfig(this._validationGroup);i&&i.off("validated",this.groupSubscription)},_getOrderedItems(i,e){let t=[];return x(i,(n,o)=>{let s=At(e,r=>{if(r.validator===o)return!0});s.length&&(t=t.concat(s))}),t},_groupValidationHandler(i){let e=this._getOrderedItems(i.validators,qe(i.brokenRules,t=>({text:t.message,validator:t.validator,index:t.index})));this.validators=i.validators,x(this.validators,(t,n)=>{if(n._validationSummary!==this){let o=this._itemValidationHandler.bind(this),s=function(){n.off("validated",o),n._validationSummary=null,o=null};n.on("validated",o),n.on("disposing",s),n._validationSummary=this}}),this.option("items",e)},_itemValidationHandler(i){let{isValid:e,validator:t,brokenRules:n}=i,o=this.option("items"),s=!1,r=0;for(;r<o.length;){let a=o[r];if(a.validator===t){let l=At(n||[],d=>d.index===a.index)[0];if(e||!l){o.splice(r,1),s=!0;continue}l.message!==a.text&&(a.text=l.message,s=!0)}r++}x(n,(a,l)=>{At(o,c=>c.validator===t&&c.index===l.index)[0]||(o.push({text:l.message,validator:t,index:l.index}),s=!0)}),s&&(o=this._getOrderedItems(this.validators,o),this.option("items",o))},_initMarkup(){this.$element().addClass("dx-validationsummary"),this.callBase()},_optionChanged(i){i.name==="validationGroup"?this._initGroupRegistration():this.callBase(i)},_itemClass:()=>yQ,_itemDataKey:()=>OQ,_postprocessRenderItem(i){_.on(i.itemElement,"click",()=>{i.itemData.validator&&i.itemData.validator.focus&&i.itemData.validator.focus()})},_dispose(){this.callBase(),this._unsubscribeGroup()},refreshValidationGroup(){this._initGroupRegistration()}});K("dxValidationSummary",_L);var UO=_L;var qO=class extends pn{_getDefaultOptions(){return super._getDefaultOptions()}_init(){super._init(),Ni.addGroup(this,!1)}_initMarkup(){let e=this.$element();e.addClass("dx-validationgroup"),e.find(".dx-validator").each((t,n)=>{Ym.getInstance(u(n))._initGroupRegistration()}),e.find(".dx-validationsummary").each((t,n)=>{UO.getInstance(u(n)).refreshValidationGroup()}),super._initMarkup()}validate(){return Ni.validateGroup(this)}reset(){return Ni.resetGroup(this)}_dispose(){Ni.removeGroup(this),this.$element().removeClass("dx-validationgroup"),super._dispose()}_useTemplates(){return!1}};K("dxValidationGroup",qO);var Ju={move(i,e){Ve(i,{left:e})}},ef={moveTo(i,e,t,n){fe.animate(i,{type:"slide",to:{left:e},duration:t,complete:n})},complete(i){fe.stop(i,!0)}};var CL=i=>+i,EQ=i=>Ti(i).left,xL=ia.inherit({_activeStateUnit:".dx-multiview-item",_supportedKeys(){return m(this.callBase(),{pageUp:E,pageDown:E})},_getDefaultOptions(){return m(this.callBase(),{selectedIndex:0,swipeEnabled:!0,animationEnabled:!0,loop:!1,deferRendering:!0,loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}}])},_itemClass:()=>"dx-multiview-item",_itemDataKey:()=>"dxMultiViewItemData",_itemContainer(){return this._$itemContainer},_itemElements(){return this._itemContainer().children(this._itemSelector())},_itemWidth(){return this._itemWidthValue||(this._itemWidthValue=W(this._$wrapper)),this._itemWidthValue},_clearItemWidthCache(){delete this._itemWidthValue},_itemsCount(){return this.option("items").length},_normalizeIndex(i){let e=this._itemsCount();return i<0&&(i+=e),i>=e&&(i-=e),i},_getRTLSignCorrection(){return this.option("rtlEnabled")?-1:1},_init(){this.callBase.apply(this,arguments);let i=this.$element();i.addClass("dx-multiview"),this._$wrapper=u("<div>").addClass("dx-multiview-wrapper"),this._$wrapper.appendTo(i),this._$itemContainer=u("<div>").addClass("dx-multiview-item-container"),this._$itemContainer.appendTo(this._$wrapper),this.option("loopItemFocus",this.option("loop")),this._findBoundaryIndices(),this._initSwipeable()},_initMarkup(){this._deferredItems=[],this.callBase();let i=this._getSelectedItemIndices();this._updateItemsVisibility(i[0]),this._setElementAria(),this._setItemsAria()},_afterItemElementDeleted(i,e){this.callBase(i,e),this._deferredItems&&this._deferredItems.splice(e.itemIndex,1)},_beforeItemElementInserted(i){this.callBase.apply(this,arguments),this._deferredItems&&this._deferredItems.splice(i.index,0,null)},_executeItemRenderAction(i,e,t){i=(this.option("items")||[]).indexOf(e),this.callBase(i,e,t)},_renderItemContent(i){let e=y(),t=this,{callBase:n}=this,o=y();return o.done(()=>{let s=n.call(t,i);e.resolve(s)}),this._deferredItems[i.index]=o,this.option("deferRendering")||o.resolve(),e.promise()},_render(){this.callBase(),pt(()=>{let i=this._getSelectedItemIndices();this._updateItems(i[0])})},_getElementAria:()=>({role:"group",roledescription:O.format("dxMultiView-elementAriaRoleDescription"),label:O.format("dxMultiView-elementAriaLabel")}),_setElementAria(){let i=this._getElementAria();this.setAria(i,this.$element())},_setItemsAria(){let i=this._itemElements(),e=this._itemsCount();i.each((t,n)=>{let o=this._getItemAria({itemIndex:t,itemsCount:e});this.setAria(o,u(n))})},_getItemAria(i){let{itemIndex:e,itemsCount:t}=i;return{role:"group",roledescription:O.format("dxMultiView-itemAriaRoleDescription"),label:O.format("dxMultiView-itemAriaLabel",e+1,t)}},_updateItems(i,e){this._updateItemsPosition(i,e),this._updateItemsVisibility(i,e)},_modifyByChanges(){this.callBase.apply(this,arguments);let i=this._getSelectedItemIndices();this._updateItemsVisibility(i[0])},_updateItemsPosition(i,e){let t=this._itemElements(),n=f(e)?-this._animationDirection(e,i):void 0,o=t.eq(i);Ju.move(o,0),f(e)&&Ju.move(t.eq(e),100*n+"%")},_updateItemsVisibility(i,e){this._itemElements().each((n,o)=>{let s=u(o),r=n!==i&&n!==e;r||this._renderSpecificItem(n),s.toggleClass("dx-multiview-item-hidden",r),this.setAria("hidden",r||void 0,s)})},_renderSpecificItem(i){let e=this._itemElements().eq(i),t=e.find(this._itemContentClass()).length>0;f(i)&&!t&&(this._deferredItems[i].resolve(),Li(e))},_refreshItem(i,e){this.callBase(i,e),this._updateItemsVisibility(this.option("selectedIndex"))},_setAriaSelectionAttribute:E,_updateSelection(i,e){let t=i[0],n=e[0];ef.complete(this._$itemContainer),this._updateItems(n,t);let o=this._animationDirection(t,n);this._animateItemContainer(o*this._itemWidth(),()=>{Ju.move(this._$itemContainer,0),this._updateItems(t),W(this._$itemContainer)})},_animateItemContainer(i,e){let t=this.option("animationEnabled")?200:0;ef.moveTo(this._$itemContainer,i,t,e)},_animationDirection(i,e){let t=EQ(this._$itemContainer),n=(e-i)*this._getRTLSignCorrection()*this._getItemFocusLoopSignCorrection();return Fo(t!==0?t:n)},_getSwipeDisabledState(){return!this.option("swipeEnabled")||this._itemsCount()<=1},_initSwipeable(){this._createComponent(this.$element(),dr,{disabled:this._getSwipeDisabledState(),elastic:!1,itemSizeFunc:this._itemWidth.bind(this),onStart:i=>this._swipeStartHandler(i.event),onUpdated:i=>this._swipeUpdateHandler(i.event),onEnd:i=>this._swipeEndHandler(i.event)})},_findBoundaryIndices(){let i=this.option("items"),e,t;i.forEach((n,o)=>{!!n?.disabled||(e??(e=o),t=o)}),this._boundaryIndices={firstAvailableIndex:e??0,lastAvailableIndex:t??i.length-1,firstTrueIndex:0,lastTrueIndex:i.length-1}},_swipeStartHandler(i){ef.complete(this._$itemContainer);let e=this.option("selectedIndex"),t=this.option("loop"),{firstAvailableIndex:n,lastAvailableIndex:o}=this._boundaryIndices,s=this.option("rtlEnabled");i.maxLeftOffset=CL(t||(s?e>n:e<o)),i.maxRightOffset=CL(t||(s?e<o:e>n)),this._swipeDirection=null},_swipeUpdateHandler(i){let{offset:e}=i,t=Fo(e)*this._getRTLSignCorrection();if(Ju.move(this._$itemContainer,e*this._itemWidth()),t!==this._swipeDirection){this._swipeDirection=t;let n=this.option("selectedIndex"),o=this._normalizeIndex(n-t);this._updateItems(n,o)}},_findNextAvailableIndex(i,e){let{items:t,loop:n}=this.option(),{firstAvailableIndex:o,lastAvailableIndex:s,firstTrueIndex:r,lastTrueIndex:a}=this._boundaryIndices,l=[r,o].includes(i),d=[a,s].includes(i);if(n){if(l&&e<0)return s;if(d&&e>0)return o}for(let c=i+e;c>=o&&c<=s;c+=e)if(!!!t[c].disabled)return c;return i},_swipeEndHandler(i){let e=i.targetOffset*this._getRTLSignCorrection();if(e){let t=this._findNextAvailableIndex(this.option("selectedIndex"),-e);this.option("selectedIndex",t);let n=this.itemElements().filter(".dx-item-selected");this.option("focusStateEnabled")&&this.option("focusedElement",H(n))}else this._animateItemContainer(0,E)},_getItemFocusLoopSignCorrection(){return this._itemFocusLooped?-1:1},_moveFocus(){this.callBase.apply(this,arguments),this._itemFocusLooped=!1},_prevItem(i){let e=this.callBase.apply(this,arguments);return this._itemFocusLooped=e.is(i.last()),e},_nextItem(i){let e=this.callBase.apply(this,arguments);return this._itemFocusLooped=e.is(i.first()),e},_dimensionChanged(){this._clearItemWidthCache()},_visibilityChanged(i){i&&this._dimensionChanged()},_updateSwipeDisabledState(){let i=this._getSwipeDisabledState();dr.getInstance(this.$element()).option("disabled",i)},_dispose(){delete this._boundaryIndices,this.callBase()},_optionChanged(i){let{value:e}=i;switch(i.name){case"loop":this.option("loopItemFocus",e);break;case"animationEnabled":break;case"swipeEnabled":this._updateSwipeDisabledState();break;case"deferRendering":this._invalidate();break;case"items":this._updateSwipeDisabledState(),this._findBoundaryIndices(),this.callBase(i);break;default:this.callBase(i)}}});K("dxMultiView",xL);var vL=xL;var bL=vL;function tf(i){return i.scrollWidth-i.clientWidth}function yL(i){return i.scrollHeight-i.clientHeight}function OL(i,e){return Math.round(i)<=e}function EL(i,e,t){return Math.round(tf(i)-e)<=t}function wL(i,e){return Math.round(i)<=e}function SL(i,e,t,n){return Math.round(yL(i)-e-t)<=n}var YO="dx-tabs-expanded";var wQ=mo.inherit({_renderWatchers(){this.callBase(),this._startWatcher("badge",this._renderBadge.bind(this))},_renderBadge(i){if(this._$element.children(".dx-badge").remove(),!i)return;let e=u("<div>").addClass("dx-tabs-item-badge").addClass("dx-badge").text(i);this._$element.append(e)}}),IL=wQ;var DL={vertical:"dx-tabs-vertical",horizontal:"dx-tabs-horizontal"},TL={top:"dx-tab-indicator-position-top",right:"dx-tab-indicator-position-right",bottom:"dx-tab-indicator-position-bottom",left:"dx-tab-indicator-position-left"},eh={top:"dx-tabs-icon-position-top",end:"dx-tabs-icon-position-end",bottom:"dx-tabs-icon-position-bottom",start:"dx-tabs-icon-position-start"},XO={primary:"dx-tabs-styling-mode-primary",secondary:"dx-tabs-styling-mode-secondary"};var QO={horizontal:"horizontal",vertical:"vertical"},nf={top:"top",right:"right",bottom:"bottom",left:"left"},AL={horizontal:"horizontal",vertical:"vertical"},Bd={top:"top",end:"end",bottom:"bottom",start:"start"},ML={primary:"primary",secondary:"secondary"},ZO=ia.inherit({_activeStateUnit:".dx-tab",_getDefaultOptions(){return m(this.callBase(),{hoverStateEnabled:!0,showNavButtons:!0,scrollByContent:!0,scrollingEnabled:!0,selectionMode:"single",orientation:QO.horizontal,iconPosition:Bd.start,stylingMode:ML.primary,activeStateEnabled:!0,selectionRequired:!1,selectOnFocus:!0,loopItemFocus:!1,useInkRipple:!1,badgeExpr:i=>i?i.badge:void 0,_itemAttributes:{role:"tab"},_indicatorPosition:null})},_defaultOptionsRules(){let i=yt();return this.callBase().concat([{device:()=>F.real().deviceType!=="desktop",options:{showNavButtons:!1}},{device:{deviceType:"desktop"},options:{scrollByContent:!1}},{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>Ot(i),options:{iconPosition:Bd.top,stylingMode:ML.secondary}},{device:()=>ht(i),options:{useInkRipple:!0,selectOnFocus:!1,iconPosition:Bd.top}}])},_init(){let{orientation:i,stylingMode:e,scrollingEnabled:t}=this.option(),n=this._getIndicatorPosition();this.callBase(),this.setAria("role","tablist"),this.$element().addClass("dx-tabs"),this._toggleScrollingEnabledClass(t),this._toggleOrientationClass(i),this._toggleIndicatorPositionClass(n),this._toggleIconPositionClass(),this._toggleStylingModeClass(e),this._renderWrapper(),this._renderMultiple(),this._feedbackHideTimeout=100},_prepareDefaultItemTemplate(i,e){let t=X(i)?i?.text:i;if(f(t)){let n=u("<span>").addClass("dx-tab-text-span");n.text(t);let o=u("<span>").addClass("dx-tab-text-span-pseudo");o.text(t),o.appendTo(n),n.appendTo(e)}f(i.html)&&e.html(i.html)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new Ai((i,e)=>{this._prepareDefaultItemTemplate(e,i);let t=Mi(e.icon);t&&t.prependTo(i);let n=u("<div>").addClass("dx-tab-text");i.wrapInner(n)},["text","html","icon"],this.option("integrationOptions.watchMethod"))})},_createItemByTemplate:function(i,e){let{itemData:t,container:n,index:o}=e;return this._deferredTemplates[o]=y(),i.render({model:t,container:n,index:o,onRendered:()=>this._deferredTemplates[o].resolve()})},_itemClass:()=>"dx-tab",_selectedItemClass:()=>"dx-tab-selected",_itemDataKey:()=>"dxTabData",_initMarkup(){this._deferredTemplates=[],this.callBase(),this.option("useInkRipple")&&this._renderInkRipple(),this.$element().addClass("dx-overflow-hidden")},_render(){this.callBase(),this._deferRenderScrolling()},_deferRenderScrolling(){P.apply(this,this._deferredTemplates).done(()=>this._renderScrolling())},_renderScrolling(){let i=["dx-tabs-stretched",YO,"dx-overflow-hidden"];if(this.$element().removeClass(i.join(" ")),this.option("scrollingEnabled")&&this._isItemsSizeExceeded()){this._scrollable||(this._renderScrollable(),this._renderNavButtons());let e=this.getScrollable();if(e.update(),this.option("rtlEnabled")){let t=tf(u(this.getScrollable().container()).get(0));e.scrollTo({left:t})}this._updateNavButtonsState(),this._scrollToItem(this.option("selectedItem"))}this.option("scrollingEnabled")&&this._isItemsSizeExceeded()||(this._cleanScrolling(),this._needStretchItems()&&this.$element().addClass("dx-tabs-stretched"),this.$element().removeClass("dx-tabs-nav-buttons").addClass(YO))},_isVertical(){return this.option("orientation")===QO.vertical},_isItemsSizeExceeded(){return this._isVertical()?this._isItemsHeightExceeded():this._isItemsWidthExceeded()},_isItemsWidthExceeded(){let i=this._getVisibleItems(),e=this._getSummaryItemsSize("width",i,!0),t=W(this.$element());return[e,t].includes(0)?!1:e>t-1},_isItemsHeightExceeded(){let i=this._getVisibleItems(),e=this._getSummaryItemsSize("height",i,!0),t=Q(this.$element());return e-1>t},_needStretchItems(){let i=this._getVisibleItems(),e=W(this.$element()),t=[];x(i,(r,a)=>{t.push(ae(a,!0))});let n=Math.max.apply(null,t),o=e/i.length;return n>o+1},_cleanNavButtons(){!this._leftButton||!this._rightButton||(this._leftButton.$element().remove(),this._rightButton.$element().remove(),this._leftButton=null,this._rightButton=null)},_cleanScrolling(){this._scrollable&&(this._$wrapper.appendTo(this.$element()),this._scrollable.$element().remove(),this._scrollable=null,this._cleanNavButtons())},_renderInkRipple(){this._inkRipple=Ul()},_getPointerEvent:()=>le.up,_toggleActiveState(i,e,t){if(this.callBase.apply(this,arguments),!this._inkRipple)return;let n={element:i,event:t};e?this._inkRipple.showWave(n):this._inkRipple.hideWave(n)},_renderMultiple(){this.option("selectionMode")==="multiple"&&this.option("selectOnFocus",!1)},_renderWrapper(){this._$wrapper=u("<div>").addClass("dx-tabs-wrapper"),this.$element().append(this._$wrapper)},_itemContainer(){return this._$wrapper},_getScrollableDirection(){return this._isVertical()?AL.vertical:AL.horizontal},_updateScrollable(){this.getScrollable()&&this._cleanScrolling(),this._renderScrolling()},_renderScrollable(){let i=this.$element().wrapInner(u("<div>").addClass("dx-tabs-scrollable")).children();this._scrollable=this._createComponent(i,Xi,{direction:this._getScrollableDirection(),showScrollbar:"never",useKeyboard:!1,useNative:!1,scrollByContent:this.option("scrollByContent"),onScroll:()=>{this._updateNavButtonsState()}}),this.$element().append(this._scrollable.$element())},_scrollToItem(i){if(!this._scrollable)return;let e=this._editStrategy.getItemElement(i);this._scrollable.scrollToElement(e)},_renderNavButtons(){let{showNavButtons:i,rtlEnabled:e}=this.option();if(this.$element().toggleClass("dx-tabs-nav-buttons",i),!i)return;this._leftButton=this._createNavButton(-30,e?"chevronnext":"chevronprev");let t=this._leftButton.$element();t.addClass("dx-tabs-nav-button-left"),this.$element().prepend(t),this._rightButton=this._createNavButton(30,e?"chevronprev":"chevronnext");let n=this._rightButton.$element();n.addClass("dx-tabs-nav-button-right"),this.$element().append(n)},_updateNavButtonsAriaDisabled(){[this._leftButton,this._rightButton].forEach(e=>{e?.$element().attr({"aria-disabled":null})})},_updateNavButtonsState(){let i=this._isVertical(),e=this.getScrollable();if(i){var t,n;(t=this._leftButton)===null||t===void 0||t.option("disabled",wL(e.scrollTop(),1)),(n=this._rightButton)===null||n===void 0||n.option("disabled",SL(u(e.container()).get(0),e.scrollTop(),0,1))}else{var o,s;(o=this._leftButton)===null||o===void 0||o.option("disabled",OL(e.scrollLeft(),1)),(s=this._rightButton)===null||s===void 0||s.option("disabled",EL(u(e.container()).get(0),e.scrollLeft(),1))}this._updateNavButtonsAriaDisabled()},_updateScrollPosition(i,e){this._scrollable.update(),this._scrollable.scrollBy(i/e)},_createNavButton(i,e){let t=this._createAction(()=>{this._holdInterval=setInterval(()=>{this._updateScrollPosition(i,5)},5)}),n=D(yn.name,"dxNavButton"),o=D(le.up,"dxNavButton"),s=D(le.out,"dxNavButton"),r=this._createComponent(u("<div>").addClass("dx-tabs-nav-button"),_t,{focusStateEnabled:!1,icon:e,integrationOptions:{},elementAttr:{role:null,"aria-label":null,"aria-disabled":null},onClick:()=>{this._updateScrollPosition(i,1)}}),a=r.$element();return _.on(a,n,{timeout:300},l=>{t({event:l})}),_.on(a,o,()=>{this._clearInterval()}),_.on(a,s,()=>{this._clearInterval()}),r},_clearInterval(){this._holdInterval&&clearInterval(this._holdInterval)},_updateSelection(i){this._scrollable&&this._scrollable.scrollToElement(this.itemElements().eq(i[0]))},_visibilityChanged(i){i&&this._dimensionChanged()},_dimensionChanged(){this._renderScrolling()},_itemSelectHandler(i){this.option("selectionMode")==="single"&&this.isItemSelected(i.currentTarget)||this.callBase(i)},_clean(){this._deferredTemplates=[],this._cleanScrolling(),this.callBase()},_toggleTabsVerticalClass(i){this.$element().toggleClass(DL.vertical,i)},_toggleTabsHorizontalClass(i){this.$element().toggleClass(DL.horizontal,i)},_getIndicatorPositionClass:i=>TL[i],_getIndicatorPosition(){let{_indicatorPosition:i,rtlEnabled:e}=this.option();if(i)return i;let t=this._isVertical();return e?t?nf.left:nf.bottom:t?nf.right:nf.bottom},_toggleIndicatorPositionClass(i){let e=this._getIndicatorPositionClass(i);this._toggleElementClasses(TL,e)},_toggleScrollingEnabledClass(i){this.$element().toggleClass("dx-tabs-scrolling-enabled",!!i)},_toggleOrientationClass(i){let e=i===QO.vertical;this._toggleTabsVerticalClass(e),this._toggleTabsHorizontalClass(!e)},_getTabsIconPositionClass(){switch(this.option("iconPosition")){case Bd.top:return eh.top;case Bd.end:return eh.end;case Bd.bottom:return eh.bottom;default:return eh.start}},_toggleIconPositionClass(){let i=this._getTabsIconPositionClass();this._toggleElementClasses(eh,i)},_toggleStylingModeClass(i){let e=XO[i]??XO.primary;this._toggleElementClasses(XO,e)},_toggleElementClasses(i,e){for(let t in i)this.$element().removeClass(i[t]);this.$element().addClass(e)},_toggleFocusedDisabledNextClass(i,e){this._itemElements().eq(i).toggleClass("dx-focused-disabled-next-tab",e)},_toggleFocusedDisabledPrevClass(i,e){this._itemElements().eq(i).toggleClass("dx-focused-disabled-prev-tab",e)},_toggleFocusedDisabledClasses(i){let{selectedIndex:e}=this.option();this._itemElements().removeClass("dx-focused-disabled-next-tab").removeClass("dx-focused-disabled-prev-tab");let t=e-1,n=e+1,o=u(i).index(),s=this._itemElements().eq(n).hasClass("dx-state-disabled"),r=this._itemElements().eq(t).hasClass("dx-state-disabled"),a=s&&o===n,l=r&&o===t;this._toggleFocusedDisabledNextClass(e,a),this._toggleFocusedDisabledPrevClass(e,l)},_updateFocusedElement(){let{focusStateEnabled:i,selectedIndex:e}=this.option(),t=this._itemElements();if(i&&t.length){let n=t.get(e);this.option({focusedElement:n})}},_optionChanged(i){switch(i.name){case"useInkRipple":case"scrollingEnabled":this._toggleScrollingEnabledClass(i.value),this._invalidate();break;case"showNavButtons":case"badgeExpr":this._invalidate();break;case"scrollByContent":this._scrollable&&this._scrollable.option(i.name,i.value);break;case"width":case"height":this.callBase(i),this._dimensionChanged();break;case"selectionMode":this._renderMultiple(),this.callBase(i);break;case"focusedElement":this._toggleFocusedDisabledClasses(i.value),this.callBase(i),this._scrollToItem(i.value);break;case"rtlEnabled":{this.callBase(i);let e=this._getIndicatorPosition();this._toggleIndicatorPositionClass(e);break}case"orientation":{this._toggleOrientationClass(i.value);let e=this._getIndicatorPosition();this._toggleIndicatorPositionClass(e),j()&&this._updateScrollable();break}case"iconPosition":this._toggleIconPositionClass(),j()&&this._dimensionChanged();break;case"stylingMode":this._toggleStylingModeClass(i.value),j()&&this._dimensionChanged();break;case"_indicatorPosition":this._toggleIndicatorPositionClass(i.value);break;case"selectedIndex":case"selectedItem":case"selectedItems":this.callBase(i),this._updateFocusedElement();break;default:this.callBase(i)}},_afterItemElementInserted(){this.callBase(),this._deferRenderScrolling()},_afterItemElementDeleted(i,e){this.callBase(i,e),this._renderScrolling()},getScrollable(){return this._scrollable}});ZO.ItemClass=IL;K("dxTabs",ZO);var RL=ZO;var FL=RL;var of=class extends mo{_renderWatchers(){return this._startWatcher("badge",E),super._renderWatchers()}};var Vd={top:"dx-tabpanel-tabs-position-top",right:"dx-tabpanel-tabs-position-right",bottom:"dx-tabpanel-tabs-position-bottom",left:"dx-tabpanel-tabs-position-left"},Xa={top:"top",right:"right",bottom:"bottom",left:"left"},SQ={top:"bottom",right:"left",bottom:"top",left:"right"},PL={horizontal:"horizontal",vertical:"vertical"},kL={top:"top",end:"end",bottom:"bottom",start:"start"},BL={primary:"primary",secondary:"secondary"},JO=bL.inherit({_getDefaultOptions(){return m(this.callBase(),{itemTitleTemplate:"title",hoverStateEnabled:!0,showNavButtons:!1,scrollByContent:!0,scrollingEnabled:!0,tabsPosition:Xa.top,iconPosition:kL.start,stylingMode:BL.primary,onTitleClick:null,onTitleHold:null,onTitleRendered:null,badgeExpr:i=>i?i.badge:void 0,_tabsIndicatorPosition:null})},_defaultOptionsRules(){let i=yt();return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>!ao,options:{swipeEnabled:!1}},{device:{platform:"generic"},options:{animationEnabled:!1}},{device:()=>Ot(i),options:{stylingMode:BL.secondary}},{device:()=>wt(i),options:{iconPosition:kL.top}}])},_init(){this.callBase(),this.$element().addClass("dx-tabpanel"),this._toggleTabPanelTabsPositionClass()},_getElementAria:()=>({role:"tabpanel"}),_getItemAria:()=>({role:"tabpanel"}),_initMarkup(){this.callBase(),this._createTitleActions(),this._renderLayout()},_prepareTabsItemTemplate(i,e){let t=Mi(i?.icon);t&&e.append(t);let n=X(i)?i?.title:i;if(f(n)&&!X(n)){let o=u("<span>").addClass("dx-tab-text-span");o.append(S.createTextNode(n));let s=u("<span>").addClass("dx-tab-text-span-pseudo");s.append(S.createTextNode(n)),s.appendTo(o),o.appendTo(e)}},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new Ai((i,e)=>{this._prepareTabsItemTemplate(e,i);let t=u("<div>").addClass("dx-tab-text");i.wrapInner(t)},["title","icon"],this.option("integrationOptions.watchMethod"))})},_createTitleActions(){this._createTitleClickAction(),this._createTitleHoldAction(),this._createTitleRenderedAction()},_createTitleClickAction(){this._titleClickAction=this._createActionByOption("onTitleClick")},_createTitleHoldAction(){this._titleHoldAction=this._createActionByOption("onTitleHold")},_createTitleRenderedAction(){this._titleRenderedAction=this._createActionByOption("onTitleRendered")},_renderLayout(){if(this._tabs)return;let i=this.$element();this._$tabContainer=u("<div>").addClass("dx-tabpanel-tabs").appendTo(i);let e=u("<div>").appendTo(this._$tabContainer);this._tabs=this._createComponent(e,FL,this._tabConfig()),this._$container=u("<div>").addClass("dx-tabpanel-container").appendTo(i),this._$container.append(this._$wrapper)},_refreshActiveDescendant(){if(!this._tabs)return;let i=this._tabs,e=i.itemElements(),t=u(e[i.option("selectedIndex")]),n=this.getFocusedItemId();this.setAria("controls",void 0,u(e)),this.setAria("controls",n,t)},_getTabsIndicatorPosition(){let{_tabsIndicatorPosition:i,tabsPosition:e}=this.option();return i??SQ[e]},_tabConfig(){let i=this._getTabsIndicatorPosition();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){let t=u(e.value),n=this._itemElements().eq(t.index());this.option("focusedElement",H(n))}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),orientation:this._getTabsOrientation(),iconPosition:this.option("iconPosition"),stylingMode:this.option("stylingMode"),_itemAttributes:{class:"dx-tabpanel-tab"},_indicatorPosition:i}},_renderFocusTarget(){this._focusTarget().attr("tabIndex",-1)},_getTabsOrientation(){let{tabsPosition:i}=this.option();return[Xa.right,Xa.left].includes(i)?PL.vertical:PL.horizontal},_getTabPanelTabsPositionClass(){switch(this.option("tabsPosition")){case Xa.right:return Vd.right;case Xa.bottom:return Vd.bottom;case Xa.left:return Vd.left;case Xa.top:default:return Vd.top}},_toggleTabPanelTabsPositionClass(){for(let e in Vd)this.$element().removeClass(Vd[e]);let i=this._getTabPanelTabsPositionClass();this.$element().addClass(i)},_updateTabsOrientation(){let i=this._getTabsOrientation();this._setTabsOption("orientation",i)},_toggleWrapperFocusedClass(i){this._toggleFocusClass(i,this._$wrapper)},_toggleDisabledFocusedClass(i){this._focusTarget().toggleClass("dx-disabled-focused-tab",i)},_updateFocusState(i,e){this.callBase(i,e);let t=i.target===this._tabs._focusTarget().get(0),n=i.target===this._focusTarget().get(0);if(t&&this._toggleFocusClass(e,this._focusTarget()),t||n){let o=this._isDisabled(this.option("focusedElement"));this._toggleWrapperFocusedClass(e&&!o),this._toggleDisabledFocusedClass(e&&o)}n&&this._toggleFocusClass(e,this._tabs.option("focusedElement"))},_focusOutHandler(i){this._isFocusOutHandlerExecuting=!0,this.callBase.apply(this,arguments),this._tabs._focusOutHandler(i),this._isFocusOutHandlerExecuting=!1},_setTabsOption(i,e){this._tabs&&this._tabs.option(i,e)},_visibilityChanged(i){i&&this._tabs._dimensionChanged()},registerKeyHandler(i,e){this.callBase(i,e),this._tabs&&this._tabs.registerKeyHandler(i,e)},repaint(){this.callBase(),this._tabs.repaint()},_updateTabsIndicatorPosition(){let i=this._getTabsIndicatorPosition();this._setTabsOption("_indicatorPosition",i)},_optionChanged(i){let{name:e,value:t,fullName:n}=i;switch(e){case"dataSource":default:this.callBase(i);break;case"items":this._setTabsOption(e,this.option(e)),this.option("repaintChangesOnly")||this._tabs.repaint(),this.callBase(i);break;case"width":this.callBase(i),this._tabs.repaint();break;case"selectedIndex":case"selectedItem":if(this._setTabsOption(n,t),this.callBase(i),this.option("focusStateEnabled")===!0){let o=this.option("selectedIndex"),s=this._itemElements().eq(o);this.option("focusedElement",H(s))}break;case"itemHoldTimeout":case"focusStateEnabled":case"hoverStateEnabled":this._setTabsOption(n,t),this.callBase(i);break;case"scrollingEnabled":case"scrollByContent":case"showNavButtons":this._setTabsOption(n,t);break;case"focusedElement":{let o=t&&u(t).index(),s=t&&this._tabs._itemElements().eq(o);if(this._setTabsOption("focusedElement",H(s)),t){let r=this._isDisabled(t);this._toggleWrapperFocusedClass(!r),this._toggleDisabledFocusedClass(r)}this.callBase(i);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",t);break;case"badgeExpr":this._invalidate();break;case"tabsPosition":this._toggleTabPanelTabsPositionClass(),this._updateTabsIndicatorPosition(),this._updateTabsOrientation();break;case"iconPosition":this._setTabsOption("iconPosition",t);break;case"stylingMode":this._setTabsOption("stylingMode",t);break;case"_tabsIndicatorPosition":this._setTabsOption("_indicatorPosition",t)}}});JO.ItemClass=of;K("dxTabPanel",JO);var VL=JO;var LL=VL;var Ss=class{constructor(e){this._options=e,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(){pe.abstract()}};var sf=(i,e)=>`${e?"tabs":"items"}[${i}]`,e0=(i,e)=>f(i)&&f(e)?`${i}.${e}`:i||e,rf=i=>i?i.replace(/\s/g,""):void 0,NL=(i,e)=>i?i.dataField===e||i.name===e||rf(i.title)===e||i.itemType==="group"&&rf(i.caption)===e:!1,Qa=(i,e)=>`${i}.${e}`,t0=i=>{let e=i.split(".");return e[e.length-1].replace(/\[\d+]/,"")},HL=i=>{let e=i.split("."),t=[...e];for(let n=e.length-1;n>=0;n--){if(i0(e[n]))return t.join(".");t.splice(n,1)}return""},i0=i=>i.indexOf("tabs")>-1,n0=(i,e,t)=>{let n=i.indexOf(e);if(n>-1)return sf(n,t);for(let o=0;o<i.length;o++){let s=i[o],r=s.tabs||s.items;if(r){let a=n0(r,e,s.tabs);if(a)return e0(sf(o,t),a)}}};function $L(i){let{form:e,$formElement:t,formOptions:n,items:o,validationGroup:s,extendedLayoutManagerOptions:r,onFieldDataChanged:a,onContentReady:l,onDisposing:d,onFieldItemRendered:c}=i,h={form:e,items:o,$formElement:t,validationGroup:s,onFieldDataChanged:a,onContentReady:l,onDisposing:d,onFieldItemRendered:c,validationBoundary:n.scrollingEnabled?t: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};return m(h,{isRoot:r.isRoot,colCount:r.colCount,alignItemLabels:r.alignItemLabels,cssItemClass:r.cssItemClass,colCountByScreen:r.colCountByScreen,onLayoutChanged:r.onLayoutChanged,width:r.width})}var o0=class extends Ss{tryExecute(){let{value:e}=this._options,t=this.findInstance();return t?(t.option(e),!0):!1}},af=class extends Ss{tryExecute(){let e=this.findInstance();if(e){let{optionName:t,item:n,value:o}=this._options,s=this._itemsRunTimeInfo.findItemIndexByItem(n);if(s>=0)return e.option(Qa(`items[${s}]`,t),o),!0}return!1}},s0=class extends Ss{tryExecute(){return!1}},r0=class extends Ss{tryExecute(){let e=this.findPreparedItem();return e!=null&&e._prepareGroupItemTemplate&&e._renderGroupContentTemplate?(e._prepareGroupItemTemplate(this._options.item.template),e._renderGroupContentTemplate(),!0):!1}},a0=class extends Ss{tryExecute(){let e=this.findInstance();if(e){let{value:t}=this._options;return e.option("dataSource",t),!0}return!1}},l0=class extends Ss{tryExecute(){let{item:e}=this._options,t=this.findInstance(),n=t&&Xe(t.$element()[0],"dxValidator");if(n&&e){let o=a=>a.type==="required",s=(n.option("validationRules")||[]).some(o),r=(e.validationRules||[]).some(o);if(!s&&!r||s&&r)return n.option("validationRules",e.validationRules),!0}return!1}},d0=class extends Ss{tryExecute(){let e=this.findItemContainer(),{previousValue:t,value:n}=this._options;return e?(e.removeClass(t).addClass(n),!0):!1}},IQ=(i,e)=>{switch(i){case"editorOptions":case"buttonOptions":return new o0(e);case"validationRules":return new l0(e);case"cssClass":return new d0(e);case"badge":case"disabled":case"icon":case"tabTemplate":case"title":return new af(m(e,{optionName:i}));case"tabs":return new a0(e);case"template":{var t,n;let o=(e==null||(t=e.item)===null||t===void 0?void 0:t.itemType)??((n=e.itemsRunTimeInfo.findPreparedItemByItem(e?.item))===null||n===void 0?void 0:n.itemType);return o==="simple"?new s0(e):o==="group"?new r0(e):new af(m(e,{optionName:i}))}default:return null}},zL=IQ;var DQ=["items","isRequired","validationRules","visible"],WL=at.inherit({_init(){this.callBase(),this._dirtyFields=new Set,this._cachedColCountOptions=[],this._itemsRunTimeInfo=new kd,this._groupsColCount=[],this._attachSyncSubscriptions()},_getDefaultOptions(){return m(this.callBase(),{formID:`dx-${new Ae}`,formData:{},colCount:1,screenByWidth:lc,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:O.format("dxForm-optionalMark"),requiredMessage:O.getFormatter("dxForm-requiredMessage"),showValidationSummary:!1,items:void 0,scrollingEnabled:!1,validationGroup:void 0,stylingMode:xe().editorStylingMode,labelMode:"outside",isDirty:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>wt(),options:{labelLocation:"top"}},{device:()=>ht(),options:{showColonAfterLabel:!1}}])},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{formData:!0,validationGroup:!0})},_getGroupColCount:i=>parseInt(i.attr(GO)),_applyLabelsWidthByCol(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=t.inOneColumn?Zm:LO+e,s=t.excludeTabbed?`:not(.${zO})`:"";uL(i,`.${o}${s}`,n)},_applyLabelsWidth(i,e,t,n,o){n=t?1:n||this._getGroupColCount(i);let s={excludeTabbed:e,inOneColumn:t},r;for(r=0;r<n;r++)this._applyLabelsWidthByCol(i,r,s,o)},_getGroupElementsInColumn(i,e,t){let n=f(t)?`.${WO}${t}`:"",o=`.${LO}${e} > .${Qu} > .${Qm}${n}`;return i.find(o)},_applyLabelsWidthWithGroups(i,e,t,n){if(this.option("alignRootItemLabels")===!0){let s=i.find(`.${Jm}`);for(let r=0;r<e;r++)this._applyLabelsWidthByCol(s,r,t,n)}if(this.option("alignItemLabelsInAllGroups"))this._applyLabelsWidthWithNestedGroups(i,e,t,n);else{let s=this.$element().find(`.${Qm}`),r;for(r=0;r<s.length;r++)this._applyLabelsWidth(s.eq(r),t,void 0,void 0,n)}},_applyLabelsWidthWithNestedGroups(i,e,t,n){let o={excludeTabbed:t},s,r,a,l;for(s=0;s<e;s++)for(l=this._getGroupElementsInColumn(i,s),this._applyLabelsWidthByCol(l,0,o,n),r=0;r<this._groupsColCount.length;r++){l=this._getGroupElementsInColumn(i,s,this._groupsColCount[r]);let d=this._getGroupColCount(l);for(a=1;a<d;a++)this._applyLabelsWidthByCol(l,a,o,n)}},_labelLocation(){return this.option("labelLocation")},_alignLabelsInColumn(i){let{layoutManager:e,inOneColumn:t,$container:n,excludeTabbed:o,items:s}=i;if(!j()||this._labelLocation()==="top")return;let r=jO(e._getMarkOptions());t?this._applyLabelsWidth(n,o,!0,void 0,r):this._checkGrouping(s)?this._applyLabelsWidthWithGroups(n,e._getColCount(),o,r):this._applyLabelsWidth(n,o,!1,e._getColCount(),r)},_prepareFormData(){f(this.option("formData"))||this.option("formData",{})},_setStylingModeClass(){this.option("stylingMode")==="underlined"&&this.$element().addClass(aL)},_initMarkup(){fi.addGroup(this._getValidationGroup(),!1),this._clearCachedInstances(),this._prepareFormData(),this.$element().addClass(QV),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(),this._attachResizeObserverSubscription()},_attachResizeObserverSubscription(){if(j()){let i=this.$element().get(0);ps.unobserve(i),ps.observe(i,()=>{this._resizeHandler()})}},_resizeHandler(){this._cachedLayoutManagers.length&&x(this._cachedLayoutManagers,(i,e)=>{var t;(t=e.option("onLayoutChanged"))===null||t===void 0||t(e.isSingleColumnMode())})},_getCurrentScreenFactor(){return j()?Vh(this.option("screenByWidth")):"lg"},_clearCachedInstances(){this._itemsRunTimeInfo.clear(),this._cachedLayoutManagers=[]},_alignLabels(i,e){this._alignLabelsInColumn({$container:this.$element(),layoutManager:i,excludeTabbed:!0,items:this.option("items"),inOneColumn:e}),Li(this.$element().find(`.${gm}`))},_clean(){this._clearValidationSummary(),this.callBase(),this._groupsColCount=[],this._cachedColCountOptions=[],this._lastMarkupScreenFactor=void 0,ps.unobserve(this.$element().get(0))},_renderScrollable(){let i=this.option("useNativeScrolling");this._scrollable=new Xi(this.$element(),{useNative:!!i,useSimulatedScrollbar:!i,useKeyboard:!1,direction:"both",bounceEnabled:!1})},_getContent(){return this.option("scrollingEnabled")?u(this._scrollable.content()):this.$element()},_clearValidationSummary(){var i;(i=this._$validationSummary)===null||i===void 0||i.remove(),this._$validationSummary=void 0,this._validationSummary=void 0},_renderValidationSummary(){this._clearValidationSummary(),this.option("showValidationSummary")&&(this._$validationSummary=u("<div>").addClass(rL).appendTo(this._getContent()),this._validationSummary=this._$validationSummary.dxValidationSummary({validationGroup:this._getValidationGroup()}).dxValidationSummary("instance"))},_prepareItems(i,e,t,n){if(i){let o=[];for(let s=0;s<i.length;s++){let r=i[s],a=e0(t,sf(s,n)),l={item:r,itemIndex:s,path:a},d=this._itemsRunTimeInfo.add(l);if(B(r)&&(r={dataField:r}),z(r)){let c=I({},r);l.preparedItem=c,c.guid=d,this._tryPrepareGroupItemCaption(c),this._tryPrepareGroupItem(c),this._tryPrepareTabbedItem(c,a),this._tryPrepareItemTemplate(c),e&&(c.cssItemClass=zO),c.items&&(c.items=this._prepareItems(c.items,e,a)),o.push(c)}else o.push(r)}return o}},_tryPrepareGroupItemCaption(i){i.itemType==="group"&&(i._prepareGroupCaptionTemplate=e=>{i.captionTemplate&&(i.groupCaptionTemplate=this._getTemplate(e)),i.captionTemplate=this._itemGroupTemplate.bind(this,i)},i._prepareGroupCaptionTemplate(i.captionTemplate))},_tryPrepareGroupItem(i){i.itemType==="group"&&(i.alignItemLabels=Be(i.alignItemLabels,!0),i._prepareGroupItemTemplate=e=>{i.template&&(i.groupContentTemplate=this._getTemplate(e)),i.template=this._itemGroupTemplate.bind(this,i)},i._prepareGroupItemTemplate(i.template))},_tryPrepareTabbedItem(i,e){i.itemType==="tabbed"&&(i.template=this._itemTabbedTemplate.bind(this,i),i.tabs=this._prepareItems(i.tabs,!0,e,!0))},_tryPrepareItemTemplate(i){i.template&&(i.template=this._getTemplate(i.template))},_checkGrouping(i){if(i){for(let e=0;e<i.length;e++)if(i[e].itemType==="group")return!0}},_renderLayout(){let i=this,e=i.option("items"),t=i._getContent();e=i._prepareItems(e),i._rootLayoutManager=i._renderLayoutManager(t,this._createLayoutManagerOptions(e,{isRoot:!0,colCount:i.option("colCount"),alignItemLabels:i.option("alignItemLabels"),screenByWidth:this.option("screenByWidth"),colCountByScreen:this.option("colCountByScreen"),onLayoutChanged(n){i._alignLabels.bind(i)(i._rootLayoutManager,n)},onContentReady(n){i._alignLabels(n.component,n.component.isSingleColumnMode())}}))},_tryGetItemsForTemplate:i=>i.items||[],_itemTabbedTemplate(i,e,t){let n=u("<div>").appendTo(t),o=m({},i.tabPanelOptions,{dataSource:i.tabs,onItemRendered:a=>{var l,d;(l=i.tabPanelOptions)===null||l===void 0||(d=l.onItemRendered)===null||d===void 0||d.call(l,a),Bl(a.itemElement)},itemTemplate:(a,l,d)=>{let c=u(d),h=Be(a.alignItemLabels,!0),p=this._renderLayoutManager(c,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(a),{colCount:a.colCount,alignItemLabels:h,screenByWidth:this.option("screenByWidth"),colCountByScreen:a.colCountByScreen,cssItemClass:a.cssItemClass,onLayoutChanged:g=>{this._alignLabelsInColumn({$container:c,layoutManager:p,items:a.items,inOneColumn:g})}}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(a.guid,{layoutManager:p}),h&&this._alignLabelsInColumn({$container:c,layoutManager:p,items:a.items,inOneColumn:p.isSingleColumnMode()})}}),s=(a,l)=>{Array.isArray(a)&&a.forEach(d=>this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(d.guid,{widgetInstance:l}))},r=this._createComponent(n,LL,o);u(t).parent().addClass(oL),r.on("optionChanged",a=>{a.fullName==="dataSource"&&s(a.value,a.component)}),s([{guid:i.guid},...i.tabs??[]],r)},_itemGroupCaptionTemplate(i,e,t){if(i.groupCaptionTemplate){let n=u("<div>").addClass(JV).attr("id",t).appendTo(e);i._renderGroupCaptionTemplate=()=>{let o={component:this,caption:i.caption,name:i.name};i.groupCaptionTemplate.render({model:o,container:H(n)})},i._renderGroupCaptionTemplate();return}i.caption&&u("<span>").addClass(ZV).text(i.caption).attr("id",t).appendTo(e)},_itemGroupContentTemplate(i,e){let t=u("<div>").addClass(iL).appendTo(e);if(i.groupContentTemplate)i._renderGroupContentTemplate=()=>{t.empty();let n={formData:this.option("formData"),component:this};i.groupContentTemplate.render({model:n,container:H(t)})},i._renderGroupContentTemplate();else{let n=this._renderLayoutManager(t,this._createLayoutManagerOptions(this._tryGetItemsForTemplate(i),{colCount:i.colCount,colCountByScreen:i.colCountByScreen,alignItemLabels:i.alignItemLabels,cssItemClass:i.cssItemClass}));this._itemsRunTimeInfo&&this._itemsRunTimeInfo.extendRunTimeItemInfoByKey(i.guid,{layoutManager:n});let o=n._getColCount();this._groupsColCount.includes(o)||this._groupsColCount.push(o),e.addClass(WO+o),e.attr(GO,o)}},_itemGroupTemplate(i,e,t){let{id:n}=e.editorOptions.inputAttr,o=u("<div>").toggleClass(sL,f(i.caption)&&i.caption.length).addClass(Qm).appendTo(t),s={role:"group",labelledby:n};this.setAria(s,o),u(t).parent().addClass(nL),this._itemGroupCaptionTemplate(i,o,n),this._itemGroupContentTemplate(i,o)},_createLayoutManagerOptions(i,e){return $L({form:this,formOptions:this.option(),$formElement:this.$element(),items:i,validationGroup:this._getValidationGroup(),extendedLayoutManagerOptions:e,onFieldDataChanged:t=>{this._isDataUpdating||this._triggerOnFieldDataChanged(t)},onContentReady:t=>{this._itemsRunTimeInfo.addItemsOrExtendFrom(t.component._itemsRunTimeInfo),e.onContentReady&&e.onContentReady(t)},onDisposing:t=>{let{component:n}=t,o=n.getItemsRunTimeInfo();this._itemsRunTimeInfo.removeItemsByItems(o)},onFieldItemRendered:()=>{var t;(t=this._validationSummary)===null||t===void 0||t.refreshValidationGroup()}})},_renderLayoutManager(i,e){let t={lg:e.colCount,md:e.colCount,sm:e.colCount,xs:1};this._cachedColCountOptions.push({colCountByScreen:m(t,e.colCountByScreen)});let n=u("<div>");n.appendTo(i);let o=this._createComponent(n,"dxLayoutManager",e);return o.on("autoColCountChanged",()=>{this._clearAutoColCountChangedTimeout(),this.autoColCountChangedTimeoutId=setTimeout(()=>!this._disposed&&this._refresh(),0)}),this._cachedLayoutManagers.push(o),o},_getValidationGroup(){return this.option("validationGroup")||this},_createComponent(i,e,t){return t=t||{},this._extendConfig(t,{readOnly:this.option("readOnly")}),this.callBase(i,e,t)},_attachSyncSubscriptions(){let i=this;i.on("optionChanged",e=>{let t=e.fullName;t==="formData"&&(f(e.value)||i._options.silent("formData",e.value={}),i._triggerOnFieldDataChangedByDataSet(e.value)),i._cachedLayoutManagers.length&&x(i._cachedLayoutManagers,(n,o)=>{t==="formData"&&(i._isDataUpdating=!0,o.option("layoutData",e.value),i._isDataUpdating=!1),(e.name==="readOnly"||e.name==="disabled")&&o.option(t,e.value)})})},_optionChanged(i){let e=i.fullName.split(".");e.length>1&&e[0].search("items")!==-1&&this._itemsOptionChangedHandler(i)||e.length>1&&e[0].search("formData")!==-1&&this._formDataOptionChangedHandler(i)||this._defaultOptionChangedHandler(i)},_defaultOptionChangedHandler(i){switch(i.name){case"formData":this.option("items")?bt(i.value)&&this._clear():this._invalidate();break;case"onFieldDataChanged":case"alignRootItemLabels":case"readOnly":case"isDirty":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"width":this.callBase(i),this._rootLayoutManager.option(i.name,i.value),this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode());break;case"validationGroup":fi.removeGroup(i.previousValue||this),this._invalidate();break;default:this.callBase(i)}},_itemsOptionChangedHandler(i){let e=i.fullName.split("."),{value:t}=i,n=this._getItemPath(e),o=this.option(n),s=i.fullName.replace(`${n}.`,""),r=s.split(".")[0].replace(/\[\d+]/,""),a=this._tryCreateItemOptionAction(r,o,o[r],i.previousValue,n),l=this._tryExecuteItemOptionAction(a)||this._tryChangeLayoutManagerItemOption(i.fullName,t);if(!l&&o){this._changeItemOption(o,s,t);let d=this._generateItemsFromData(this.option("items"));this.option("items",d),l=!0}return l},_formDataOptionChangedHandler(i){let e=i.fullName.split("."),{value:t}=i,n=e.slice(1).join("."),o=this.getEditor(n);return o?o.option("value",t):this._triggerOnFieldDataChanged({dataField:n,value:t}),!0},_tryCreateItemOptionAction(i,e,t,n,o){return i==="tabs"&&(this._itemsRunTimeInfo.removeItemsByPathStartWith(`${o}.tabs`),t=this._prepareItems(t,!0,o,!0)),zL(i,{item:e,value:t,previousValue:n,itemsRunTimeInfo:this._itemsRunTimeInfo})},_tryExecuteItemOptionAction:i=>i&&i.tryExecute(),_updateValidationGroupAndSummaryIfNeeded(i){let e=t0(i);if(DQ.includes(e)&&(fi.addGroup(this._getValidationGroup(),!1),this.option("showValidationSummary"))){var t;(t=this._validationSummary)===null||t===void 0||t.refreshValidationGroup()}},_setLayoutManagerItemOption(i,e,t,n){if(this._updateLockCount>0){!i._updateLockCount&&i.beginUpdate();let s=this._itemsRunTimeInfo.findKeyByPath(n);this.postponedOperations.add(s,()=>(!i._disposed&&i.endUpdate(),y().resolve()))}let o=s=>{if(s.component.off("contentReady",o),i0(n)){let r=HL(n),a=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(r);a&&this._alignLabelsInColumn({items:a.option("items"),layoutManager:a,$container:a.$element(),inOneColumn:a.isSingleColumnMode()})}else this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())};i.on("contentReady",o),i.option(e,t),this._updateValidationGroupAndSummaryIfNeeded(e)},_tryChangeLayoutManagerItemOption(i,e){let t=i.split("."),n=t0(i);if(n==="items"&&t.length>1){let o=this._getItemPath(t),s=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(o);if(s){this._itemsRunTimeInfo.removeItemsByItems(s.getItemsRunTimeInfo());let r=this._prepareItems(e,!1,o);return this._setLayoutManagerItemOption(s,n,r,o),!0}}else if(t.length>2){let o=t.length-2,s=this._getItemPath(t.slice(0,o)),r=this._itemsRunTimeInfo.findGroupOrTabLayoutManagerByPath(s);if(r){let a=Qa(t[o],n);if(n==="editorType"&&r.option(a)!==e)return!1;if(n==="visible"){let l=this.option(Qa(s,"items"));if(l&&l.length){let d=r.option("items");l.forEach((c,h)=>{let p=d[h];p.visibleIndex=c.visibleIndex})}}return this._setLayoutManagerItemOption(r,a,e,s),!0}}return!1},_tryChangeLayoutManagerItemOptions(i,e){let t;return this.beginUpdate(),x(e,(n,o)=>{if(t=this._tryChangeLayoutManagerItemOption(Qa(i,n),o),!t)return!1}),this.endUpdate(),t},_getItemPath(i){let e=i[0],t;for(t=1;t<i.length&&i[t].search(/items\[\d+]|tabs\[\d+]/)!==-1;t++)e+=`.${i[t]}`;return e},_triggerOnFieldDataChanged(i){this._updateIsDirty(i.dataField),this._createActionByOption("onFieldDataChanged")(i)},_triggerOnFieldDataChangedByDataSet(i){i&&z(i)&&Object.keys(i).forEach(e=>{this._triggerOnFieldDataChanged({dataField:e,value:i[e]})})},_updateFieldValue(i,e){if(f(this.option("formData"))){let t=this.getEditor(i);this.option(`formData.${i}`,e),t&&t.option("value")!==e&&t.option("value",e)}},_generateItemsFromData(i){let e=this.option("formData"),t=[];return!i&&f(e)&&x(e,n=>{t.push({dataField:n})}),i&&x(i,(n,o)=>{z(o)?t.push(o):t.push({dataField:o})}),t},_getItemByField(i,e){let t=this,n=z(i)?i:t._getFieldParts(i),{fieldName:o}=n,{fieldPath:s}=n,r;return e.length&&x(e,(a,l)=>{let{itemType:d}=l;if(s.length){let c=s.slice();l=t._getItemByFieldPath(c,o,l)}else if(d==="group"&&!(l.caption||l.name)||d==="tabbed"&&!l.name){let c=t._getSubItemField(d);l.items=t._generateItemsFromData(l.items),l=t._getItemByField({fieldName:o,fieldPath:s},l[c])}if(NL(l,o))return r=l,!1}),r},_getFieldParts(i){let e=i,t=e.indexOf("."),n=[];for(;t!==-1;)n.push(e.substr(0,t)),e=e.substr(t+1),t=e.indexOf(".");return{fieldName:e,fieldPath:n.reverse()}},_getItemByFieldPath(i,e,t){let n=this,{itemType:o}=t,s=n._getSubItemField(o),r=o==="group"||o==="tabbed"||t.title,a;do if(r){let l=t.name||t.caption||t.title,d=f(l),c=rf(l),h;if(t[s]=n._generateItemsFromData(t[s]),d&&(h=i.pop()),!i.length&&(a=n._getItemByField(e,t[s]),a))break;(!d||d&&c===h)&&i.length&&(a=n._searchItemInEverySubItem(i,e,t[s]))}else break;while(i.length&&!f(a));return a},_getSubItemField:i=>i==="tabbed"?"tabs":"items",_searchItemInEverySubItem(i,e,t){let n=this,o;return x(t,(s,r)=>{if(o=n._getItemByFieldPath(i.slice(),e,r),o)return!1}),o||(o=!1),o},_changeItemOption(i,e,t){z(i)&&(i[e]=t)},_dimensionChanged(){let i=this._getCurrentScreenFactor();this._lastMarkupScreenFactor!==i&&(this._isColCountChanged(this._lastMarkupScreenFactor,i)&&(this._targetScreenFactor=i,this._refresh(),this._targetScreenFactor=void 0),this._lastMarkupScreenFactor=i)},_isColCountChanged(i,e){let t=!1;return x(this._cachedColCountOptions,(n,o)=>{if(o.colCountByScreen[i]!==o.colCountByScreen[e])return t=!0,!1}),t},_refresh(){let i=`.${sR}.dx-state-focused:not(.${iB}) .${rR}`;_.trigger(this.$element().find(i),"change"),this.callBase()},_updateIsDirty(i){let e=this.getEditor(i);e&&(e.option("isDirty")?this._dirtyFields.add(i):this._dirtyFields.delete(i),this.option("isDirty",!!this._dirtyFields.size))},updateRunTimeInfoForEachEditor(i){this._itemsRunTimeInfo.each((e,t)=>{let{widgetInstance:n}=t;f(n)&&vi.isEditor(n)&&i(n)})},_clear(){this.updateRunTimeInfoForEachEditor(i=>{i.clear(),i.option("isValid",!0)}),fi.resetGroup(this._getValidationGroup())},_updateData(i,e,t){let n=this,o=t?e:i;z(o)?x(o,(s,r)=>{n._updateData(t?`${i}.${s}`:s,r,z(r))}):B(i)&&n._updateFieldValue(i,e)},registerKeyHandler(i,e){this.callBase(i,e),this._itemsRunTimeInfo.each((t,n)=>{f(n.widgetInstance)&&n.widgetInstance.registerKeyHandler(i,e)})},_focusTarget(){return this.$element().find(`.${Qu} [tabindex]`).first()},_visibilityChanged(){this._alignLabels(this._rootLayoutManager,this._rootLayoutManager.isSingleColumnMode())},_clearAutoColCountChangedTimeout(){this.autoColCountChangedTimeoutId&&(clearTimeout(this.autoColCountChangedTimeoutId),this.autoColCountChangedTimeoutId=void 0)},_dispose(){this._clearAutoColCountChangedTimeout(),fi.removeGroup(this._getValidationGroup()),this.callBase()},clear(){this._clear()},resetValues(){this._clear()},reset(i){this.updateRunTimeInfoForEachEditor(e=>{let t=e.option("name");i&&t in i?e.reset(i[t]):e.reset()}),this._renderValidationSummary()},updateData(i,e){this._updateData(i,e)},getEditor(i){return this._itemsRunTimeInfo.findWidgetInstanceByDataField(i)||this._itemsRunTimeInfo.findWidgetInstanceByName(i)},getButton(i){return this._itemsRunTimeInfo.findWidgetInstanceByName(i)},updateDimensions(){let i=this,e=y();return i._scrollable?i._scrollable.update().done(()=>{e.resolveWith(i)}):e.resolveWith(i),e.promise()},itemOption(i,e,t){let n=this._generateItemsFromData(this.option("items")),o=this._getItemByField(i,n),s=n0(n,o);if(o)switch(arguments.length){case 1:return o;case 3:{let r=this._tryCreateItemOptionAction(e,o,t,o[e],s);this._changeItemOption(o,e,t);let a=Qa(s,e);!this._tryExecuteItemOptionAction(r)&&!this._tryChangeLayoutManagerItemOption(a,t)&&this.option("items",n);break}default:if(z(e)&&!this._tryChangeLayoutManagerItemOptions(s,e)){let r;x(e,(a,l)=>{let d=this._tryCreateItemOptionAction(a,o,l,o[a],s);this._changeItemOption(o,a,l),!r&&!this._tryExecuteItemOptionAction(d)&&(r=!0)}),r&&this.option("items",n)}}},validate(){return fi.validateGroup(this._getValidationGroup())},getItemID(i){return`dx_${this.option("formID")}_${i||new Ae}`},getTargetScreenFactor(){return this._targetScreenFactor}});K("dxForm",WL);var GL=WL;var jL=GL;var lf=jL;var TQ=i=>class extends i{init(){this._editForm=null,this._updateEditFormDeferred=null,super.init()}isEditRow(e){return!this.isPopupEditMode()&&super.isEditRow(e)}isFormOrPopupEditMode(){return this.isPopupEditMode()||this.isFormEditMode()}isFormEditMode(){return this.option("editing.mode")===Yu}getFirstEditableColumnIndex(){let e=this._firstFormItem;if(this.isFormEditMode()&&e){let t=this.option(an),n=this._dataController.getRowIndexByKey(t),o=this._rowsView.getCellElements(n);return this._rowsView._getEditFormEditorVisibleIndex(o,e.column)}return super.getFirstEditableColumnIndex()}getEditFormRowIndex(){return this.isFormOrPopupEditMode()?this._getVisibleEditRowIndex():super.getEditFormRowIndex()}_isEditColumnVisible(){let e=super._isEditColumnVisible(),t=this.option("editing");return this.isFormOrPopupEditMode()&&t.allowUpdating||e}_handleDataChanged(e){if(this.isPopupEditMode()){var t,n;let o=this.option("editing.editRowKey"),s=e==null||(t=e.items)===null||t===void 0?void 0:t.some(a=>Ee(a.key,o)),r=((n=e.changeTypes)===null||n===void 0?void 0:n.length)&&e.changeTypes.every(a=>a==="insert");(e.changeType==="refresh"||s&&e.isOptionChanged)&&!r&&this._repaintEditPopup()}super._handleDataChanged(e)}getPopupContent(){var e;let t=(e=this._editPopup)===null||e===void 0?void 0:e.option("visible");if(this.isPopupEditMode()&&t)return this._$popupContent}_showAddedRow(e){this.isPopupEditMode()?this._showEditPopup(e):super._showAddedRow(e)}_cancelEditDataCore(){super._cancelEditDataCore(),this.isPopupEditMode()&&this._hideEditPopup()}_updateEditRowCore(e,t,n){let o=this._editForm;if(this.isPopupEditMode())if(this.option("repaintChangesOnly")){var s;(s=e.update)===null||s===void 0||s.call(e,e),this._rowsView.renderDelayedTemplates()}else o&&(this._updateEditFormDeferred=new y().done(()=>o.repaint()),this._updateLockCount||this._updateEditFormDeferred.resolve());else super._updateEditRowCore(e,t,n)}_showEditPopup(e,t){let n=F.current().deviceType!=="desktop",o=this.addWidgetPrefix(FV),s=m({showTitle:!1,fullScreen:n,wrapperAttr:{class:o},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(Md));if(!this._editPopup){let r=u("<div>").appendTo(this.component.$element()).addClass(o);this._editPopup=this._createComponent(r,Oi),this._editPopup.on("hiding",this._getEditPopupHiddenHandler()),this._editPopup.on("shown",a=>{if(_.trigger(a.component.$content().find(Rd).not(`.${kV}`).first(),"focus"),t){var l;(l=this._editForm)===null||l===void 0||l.repaint()}})}this._editPopup.option(s),this._editPopup.show(),super._showEditPopup(e,t)}_getPopupEditFormTemplate(e){let t=this.component.getVisibleRows()[e],n={row:t,values:t.values,rowType:t.rowType,key:t.key,rowIndex:e};return this._rowsView._addWatchMethod(n,t),o=>{let s=this.getEditFormTemplate(),r=this._createComponent(u("<div>").appendTo(o),Xi);this._$popupContent=u(r.content()),s(this._$popupContent,n,{isPopupForm:!0}),this._rowsView.renderDelayedTemplates(),u(o).parent().attr("aria-label",this.localize("dxDataGrid-ariaEditForm"))}}_repaintEditPopup(){let e=this._getVisibleEditRowIndex();if(e>=0){var t,n;let o=(t=this._editPopup)===null||t===void 0?void 0:t.option("animation");(n=this._editPopup)===null||n===void 0||n.option("animation",null),this._showEditPopup(e,!0),o!==void 0&&this._editPopup.option("animation",o)}}_hideEditPopup(){var e;(e=this._editPopup)===null||e===void 0||e.option("visible",!1)}optionChanged(e){if(e.name==="editing"&&this.isFormOrPopupEditMode()){let{fullName:t}=e;t.indexOf(jm)===0?(this._handleFormOptionChange(e),e.handled=!0):t.indexOf(Md)===0&&(this._handlePopupOptionChange(e),e.handled=!0)}super.optionChanged(e)}_handleFormOptionChange(e){var t;if(this.isFormEditMode()){let n=this._getVisibleEditRowIndex();n>=0&&this._dataController.updateItems({changeType:"update",rowIndices:[n]})}else(t=this._editPopup)!==null&&t!==void 0&&t.option("visible")&&e.fullName.indexOf(jm)===0&&this._repaintEditPopup()}_handlePopupOptionChange(e){let t=this._editPopup;if(t){let n=e.fullName.slice(Md.length+1);n?t.option(n,e.value):t.option(e.value)}}renderFormEditorTemplate(e,t,n,o,s){let r=this,a=u(o),{column:l}=t,d=zV(t),c=e?.row,h=c?.data,p=n.component,g=l.calculateCellValue(h),C=R.getDisplayValue(l,g,h,c?.rowType),{label:v,labelMark:b,labelMode:T}=n.editorOptions||{},M=m({},e,{data:h,cellElement:null,isOnForm:!0,item:t,id:p.getItemID(t.name||t.dataField),column:m({},l,{editorType:d,editorOptions:m({label:v,labelMark:b,labelMode:T},l.editorOptions,t.editorOptions)}),columnIndex:l.index,setValue:!s&&l.allowEditing&&function(te,oe){r.updateFieldValue(M,te,oe)}});M.value=g,M.displayValue=C,M.text=l.command?"":R.formatValue(C,l);let G=this._getFormEditItemTemplate.bind(this)(M,l);return this._rowsView.renderTemplate(a,G,M,!!ls(a)).done(()=>{this._rowsView._updateCell(a,M)}),M}getFormEditorTemplate(e,t){let n=this.component.columnOption(t.name||t.dataField);return(o,s)=>{let r=u(s),{row:a}=e;if(a!=null&&a.watch){let l=a.watch(()=>n.selector(a.data),()=>{var d;let c=r.find(".dx-widget").first(),h=c.data("dxValidator"),p=(d=h)===null||d===void 0?void 0:d.option();r.contents().remove(),e=this.renderFormEditorTemplate.bind(this)(e,t,o,r),c=r.find(".dx-widget").first(),h=c.data("dxValidator"),p&&!h&&c.dxValidator({validationRules:p.validationRules,validationGroup:p.validationGroup,dataGetter:p.dataGetter})});_.on(r,ai,l)}e=this.renderFormEditorTemplate.bind(this)(e,t,o,r)}}getEditFormOptions(e){var t;let n=(t=this._getValidationGroupsInForm)===null||t===void 0?void 0:t.call(this,e),o=this.option("editing.form.customizeItem"),s=this.addWidgetPrefix(TO),r=this.option("editing.form.items"),a={};if(r)PO(r,l=>{let d=l?.name||l?.dataField;d&&(a[d]=!!l.editorType)});else{let l=this._columnsController.getColumns();r=[],x(l,(d,c)=>{!c.isBand&&!c.type&&r.push({column:c,name:c.name,dataField:c.dataField})})}return m({},n,{items:r,formID:`dx-${new Ae}`,customizeItem:l=>{let d,c=l.name||l.dataField;if((l.column||c)&&(d=l.column||this._columnsController.columnOption(l.name?`name:${l.name}`:`dataField:${l.dataField}`)),d){if(l.label=l.label||{},l.label.text=l.label.text||d.caption,d.dataType==="boolean"&&l.label.visible===void 0){let p=this.option("editing.form.labelMode");(p==="floating"||p==="static")&&(l.label.visible=!0)}l.template=l.template||this.getFormEditorTemplate(e,l),l.column=d,l.isCustomEditorType=a[c],d.formItem&&m(l,d.formItem),l.isRequired===void 0&&d.validationRules&&(l.isRequired=d.validationRules.some(p=>p.type==="required"),l.validationRules=[]);let h=f(l.visible)?l.visible:!0;!this._firstFormItem&&h&&(this._firstFormItem=l)}o?.call(this,l),l.cssClass=B(l.cssClass)?`${l.cssClass} ${s}`:s}})}getEditFormTemplate(){return(e,t,n)=>{let o=this.option(jm),s=this.getEditFormOptions(t),r=u("<div>").appendTo(e),a=n?.isPopupForm;if(this._firstFormItem=void 0,a&&r.addClass(this.addWidgetPrefix(PV)),this._editForm=this._createComponent(r,lf,m({},o,s)),!a){let l=u("<div>").addClass(this.addWidgetPrefix(VV)).appendTo(e);this._createComponent(u("<div>").appendTo(l),_t,this._getSaveButtonConfig()),this._createComponent(u("<div>").appendTo(l),_t,this._getCancelButtonConfig())}this._editForm.on("contentReady",()=>{var l;this._rowsView.renderDelayedTemplates(),(l=this._editPopup)===null||l===void 0||l.repaint()})}}getEditForm(){return this._editForm}_endUpdateCore(){var e;(e=this._updateEditFormDeferred)===null||e===void 0||e.resolve()}_beforeEndSaving(e){if(super._beforeEndSaving(e),this.isPopupEditMode()){var t;(t=this._editPopup)===null||t===void 0||t.hide()}}_processDataItemCore(e,t,n,o,s){let{type:r}=t;this.isPopupEditMode()&&r===qn&&(e.visible=!1),super._processDataItemCore(e,t,n,o,s)}_editRowFromOptionChangedCore(e,t){let n=this.isPopupEditMode();super._editRowFromOptionChangedCore(e,t,n),n&&this._showEditPopup(t)}},AQ=i=>class extends i{_updateEditItem(e){this._editingController.isFormEditMode()&&(e.rowType="detail")}_getChangedColumnIndices(e,t,n,o){if(!(o===!1&&t.isEditing&&this._editingController.isFormEditMode()))return super._getChangedColumnIndices.apply(this,arguments)}},MQ=i=>class extends i{_renderCellContent(e,t){t.rowType==="data"&&this._editingController.isPopupEditMode()&&t.row.visible===!1||super._renderCellContent.apply(this,arguments)}getCellElements(e){let t=super.getCellElements(e),n=this._editingController,o=n.getEditForm();return n.getEditFormRowIndex()===e&&t&&o?o.$element().find(`.${this.addWidgetPrefix(TO)}, .${BV}`):t}_getVisibleColumnIndex(e,t,n){if(this._editingController.getEditFormRowIndex()===t&&B(n)){let s=this._columnsController.columnOption(n);return this._getEditFormEditorVisibleIndex(e,s)}return super._getVisibleColumnIndex.apply(this,arguments)}_getEditFormEditorVisibleIndex(e,t){let n=-1;return x(e,(o,s)=>{let r=u(s).find(".dx-field-item-content").data("dx-form-item");if(r!=null&&r.column&&t&&r.column.index===t.index)return n=o,!1}),n}_isFormItem(e){let t=e.rowType==="detail"||e.rowType==="detailAdaptive",n=e.rowType==="data"&&this._editingController.isPopupEditMode();return(t||n)&&e.item}_updateCell(e,t){this._isFormItem(t)?this._formItemPrepared(t,e):super._updateCell(e,t)}_updateContent(){let e=this._editingController,t=e.getEditForm(),n=t?.option("validationGroup");return super._updateContent.apply(this,arguments).done(()=>{let s=e.getEditForm();n&&s&&s!==t&&s.option("validationGroup",n)})}},KL={extenders:{controllers:{editing:TQ,data:AQ},views:{rowsView:MQ}}};$.registerModule("editingFormBased",KL);var RQ=i=>class extends i{init(){let e=!this._saveEditorHandler;if(super.init(),e){let t,n;this._pointerUpEditorHandler=()=>{var o;n=(o=this._columnsResizerController)===null||o===void 0?void 0:o.isResizing()},this._pointerDownEditorHandler=o=>t=u(o.target),this._saveEditorHandler=this.createAction(function(o){let{event:s}=o,r=u(s.target),a=s[Km],{component:l}=this;if($V(t)&&!t.is(r))return;function d(c){if(!c)return!1;let h=c.closest(`.${TV}`),p=l.$element();return h.length>0&&p.closest(h).length===0}if(this.isCellOrBatchEditMode()&&!this._editCellInProgress){let c=d(r)||d(a?.$element()),h=a&&!a._disposed&&a!==this.component,p=!!r.closest(`.${this.addWidgetPrefix(DV)}`).length,g=r.hasClass(this.addWidgetPrefix(IV)),C=this.isCellEditMode();!n&&!c&&!g&&!(p&&C&&this.isEditing())&&(ls(r)||h)&&this._closeEditItem.bind(this)(r)}}),_.on(S.getDocument(),le.up,this._pointerUpEditorHandler),_.on(S.getDocument(),le.down,this._pointerDownEditorHandler),_.on(S.getDocument(),de,this._saveEditorHandler)}}isCellEditMode(){return this.option("editing.mode")===qu}isBatchEditMode(){return this.option("editing.mode")===Uu}isCellOrBatchEditMode(){return this.isCellEditMode()||this.isBatchEditMode()}_needToCloseEditableCell(e){let t=this.component.$element(),n=this.isEditing();if((!t||!!e.closest(t).length)&&e.closest(`.${AV}`).length){let a=e.closest(`.${Wo}> td`),l=this._rowsView.getRowIndex(a.parent()),d=this._rowsView.getCellElements(l);if(d!=null&&d.length){var s;let c=d.index(a),p=(s=this._columnsController.getVisibleColumns()[c])===null||s===void 0?void 0:s.allowEditing,g=this.isEditCell(l,c);n=n&&!p&&!g}}return n||super._needToCloseEditableCell(e)}_closeEditItem(e){this._needToCloseEditableCell(e)&&this.closeEditCell()}_focusEditorIfNeed(){if(this._needFocusEditor&&this.isCellOrBatchEditMode()){var e;let t=this._getVisibleEditColumnIndex(),n=(e=this._rowsView)===null||e===void 0?void 0:e._getCellElement(this._getVisibleEditRowIndex(),t);this._refocusEditCell=!1,clearTimeout(this._inputFocusTimeoutID),n&&!n.find(":focus").length?this._focusEditingCell(()=>{this._editCellInProgress=!1},n,!0):this._editCellInProgress=!1,this._needFocusEditor=!1}else super._focusEditorIfNeed()}isEditing(){if(this.isCellOrBatchEditMode()){let e=f(this.option(an)),t=f(this.option(cr));return e&&t}return super.isEditing()}_handleEditColumnNameChange(e){let t=this._getVisibleEditRowIndex(e.previousValue);if(this.isCellOrBatchEditMode()&&t!==-1&&f(e.value)&&e.value!==e.previousValue){let n=this._columnsController.getVisibleColumnIndex(e.value),o=this._columnsController.getVisibleColumnIndex(e.previousValue);this._editCellFromOptionChanged(n,o,t)}}_addRow(e){if(this.isCellEditMode()&&this.hasChanges()){let t=new y;return this.saveEditData().done(()=>{this.hasChanges()?t.reject("cancel"):this.addRow(e).done(t.resolve).fail(t.reject)}),t.promise()}return super._addRow(e)}editCell(e,t){return this._editCell({rowIndex:e,columnIndex:t})}_editCell(e){let t=new y,n;return this.executeOperation(t,()=>{n=this._editCellCore(e),P(n).done(t.resolve).fail(t.reject)}),n!==void 0?n:t.promise()}_editCellCore(e){let t=this._dataController,n=f(e.oldColumnIndex)||f(e.oldRowIndex),{columnIndex:o,rowIndex:s,column:r,item:a}=this._getNormalizedEditCellOptions(e),l={data:a?.data,cancel:!1,column:r};if(a.key===void 0){this._dataController.fireError("E1043");return}if(r&&(a.rowType==="data"||a.rowType==="detailAdaptive")&&!a.removed&&this.isCellOrBatchEditMode()){if(!n&&this.isEditCell(s,o))return!0;let d=s+t.getRowIndexOffset();return P(this._beforeEditCell(s,o,a)).done(c=>{c||this._prepareEditCell(l,a,o,d)||this._processCanceledEditingCell()})}return!1}_beforeEditCell(e,t,n){if(this.isCellEditMode()&&!n.isNewRow&&this.hasChanges()){let o=new y;return this.saveEditData().always(()=>{o.resolve(this.hasChanges())}),this.addDeferred(o),o}return!1}publicMethods(){return super.publicMethods().concat(["editCell","closeEditCell"])}_getNormalizedEditCellOptions(e){let{oldColumnIndex:t,oldRowIndex:n,columnIndex:o,rowIndex:s}=e,r=this._columnsController,a=r.getVisibleColumns(),d=this._dataController.items()[s],c;f(t)?c=a[t]:c=this._getEditColumn(),f(n)||(n=this._getVisibleEditRowIndex()),B(o)&&(o=r.columnOption(o,"index"),o=r.getVisibleIndex(o));let h=a[o];return{oldColumn:c,columnIndex:o,oldRowIndex:n,rowIndex:s,column:h,item:d}}_prepareEditCell(e,t,n,o){return t.isNewRow||(e.key=t.key),this._isEditingStart(e)?!1:(this._pageIndex=this._dataController.pageIndex(),this._setEditRowKey(t.key),this._setEditColumnNameByIndex(n),e.column.showEditorAlways||this._addInternalData({key:t.key,oldData:t.oldData??t.data}),!0)}closeEditCell(e,t){let n=P(),o=this._getVisibleEditRowIndex();if(this.isCellOrBatchEditMode()){let s=new y;n=new y,this.executeOperation(s,()=>{this._closeEditCellCore(e,o,t).always(n.resolve)})}return n.promise()}_closeEditCellCore(e,t,n){let o=this._dataController,s=new y,r=s.promise();if(this.isCellEditMode()&&this.hasChanges()){if(!n)return this.saveEditData().done(a=>{if(!this.hasChanges()){this.closeEditCell(!!a).always(s.resolve);return}s.resolve()}),r}else if(this._resetEditRowKey(),this._resetEditColumnName(),t>=0){let a=[t];this._beforeCloseEditCellInBatchMode(a),e||o.updateItems({changeType:"update",rowIndices:a})}return s.resolve(),r}_resetModifiedClassCells(e){if(this.isBatchEditMode()){let t=this._columnsController.getVisibleColumns().length;e.forEach(n=>{let{key:o}=n,s=this._dataController.getRowIndexByKey(o);for(let r=0;r<t;r++){let a=this._rowsView._getCellElement(s,r);a?.removeClass(oV)}})}}_prepareChange(e,t,n){let o=u(e.cellElement);return this.isBatchEditMode()&&e.key!==void 0&&this._applyModified(o,e),super._prepareChange(e,t,n)}_cancelSaving(e){let t=this._dataController;this.isCellOrBatchEditMode()&&(this.isBatchEditMode()&&this._resetEditIndices(),t.updateItems()),super._cancelSaving(e)}optionChanged(e){let{fullName:t}=e;e.name==="editing"&&t===cr?(this._handleEditColumnNameChange(e),e.handled=!0):super.optionChanged(e)}_editCellFromOptionChanged(e,t,n){let o=this._columnsController.getVisibleColumns();e>-1&&pt(()=>{this._repaintEditCell(o[e],o[t],n)})}_handleEditRowKeyChange(e){if(this.isCellOrBatchEditMode()){let n=this._getVisibleEditColumnIndex(),o=this._getEditRowIndexCorrection(),s=this._dataController.getRowIndexByKey(e.previousValue)+o;if(f(e.value)&&e.value!==e.previousValue){var t;(t=this._editCellFromOptionChanged)===null||t===void 0||t.call(this,n,n,s)}}else super._handleEditRowKeyChange(e)}deleteRow(e){if(this.isCellEditMode()&&this.isEditing()){let{isNewRow:t}=this._dataController.items()[e],n=this._dataController.getKeyByRowIndex(e);this.closeEditCell(null,t).always(()=>{e=this._dataController.getRowIndexByKey(n),this._checkAndDeleteRow(e)})}else super.deleteRow(e)}_checkAndDeleteRow(e){this.isBatchEditMode()?this._deleteRowCore(e):super._checkAndDeleteRow(e)}_refreshCore(e){let{isPageChanged:t}=e??{},n=this.isBatchEditMode()||t&&this.option("scrolling.mode")!=="virtual";this.isCellOrBatchEditMode()?n&&(this._resetEditColumnName(),this._resetEditRowKey()):super._refreshCore(e)}_allowRowAdding(e){return this.isBatchEditMode()?!0:super._allowRowAdding(e)}_afterDeleteRow(e,t){let n=this._dataController;return this.isBatchEditMode()?(n.updateItems({changeType:"update",rowIndices:[t,e]}),new y().resolve()):super._afterDeleteRow(e,t)}_updateEditRow(e,t,n){this.isCellOrBatchEditMode()?this._updateRowImmediately(e,t,n):super._updateEditRow(e,t,n)}_isDefaultButtonVisible(e,t){if(this.isCellOrBatchEditMode()){let n=this.isBatchEditMode();switch(e.name){case"save":case"cancel":case"edit":return!1;case"delete":return super._isDefaultButtonVisible(e,t)&&(!n||!t.row.removed);case"undelete":return n&&this.allowDeleting(t)&&t.row.removed;default:return super._isDefaultButtonVisible(e,t)}}return super._isDefaultButtonVisible(e,t)}_isRowDeleteAllowed(){return super._isRowDeleteAllowed()||this.isBatchEditMode()}_beforeEndSaving(e){if(this.isCellEditMode()){var t;((t=e[0])===null||t===void 0?void 0:t.type)!=="update"&&super._beforeEndSaving(e)}else this.isBatchEditMode()&&this._resetModifiedClassCells(e),super._beforeEndSaving(e)}prepareEditButtons(e){let t=this.option("editing")??{},n=super.prepareEditButtons(e);return(t.allowUpdating||t.allowAdding||t.allowDeleting)&&this.isBatchEditMode()&&(n.push(this.prepareButtonItem(e,"save","saveEditData",21)),n.push(this.prepareButtonItem(e,"revert","cancelEditData",22))),n}_saveEditDataInner(){var e;let t=this._dataController.getVisibleRows()[this.getEditRowIndex()],n=this._getEditColumn(),o=n?.showEditorAlways,s=this.isCellEditMode()&&!(t!=null&&t.isNewRow),r;return s&&o&&(r=new y,this.addDeferred(r)),super._saveEditDataInner().always((e=r)===null||e===void 0?void 0:e.resolve)}_applyChange(e,t,n){let o=this.isCellEditMode()&&e.row&&!e.row.isNewRow,{showEditorAlways:s}=e.column,r=e.column.setCellValue!==e.column.defaultSetCellValue;if(s&&!n&&o&&this.hasEditData()&&!this.isEditCell(e.rowIndex,e.columnIndex)){this._focusEditingCell(),this._updateEditRow(e.row,!0,r);return}return super._applyChange(e,t,n)}_applyChangeCore(e,t){let{showEditorAlways:n}=e.column,o=this.isCellEditMode()&&e.row&&!e.row.isNewRow;if(n&&!t){if(o)return this._setEditRowKey(e.row.key,!0),this._setEditColumnNameByIndex(e.columnIndex,!0),this.saveEditData();if(this.isBatchEditMode())return t=this._needUpdateRow(e.column),super._applyChangeCore(e,t)}return super._applyChangeCore(e,t)}_processDataItemCore(e,t,n,o,s){let{data:r,type:a}=t;this.isBatchEditMode()&&a===Go&&(e.data=To(e.data,r)),super._processDataItemCore(e,t,n,o,s)}_processRemoveCore(e,t,n){if(!(this.isBatchEditMode()&&!n))return super._processRemoveCore(e,t,n)}_processRemoveIfError(e,t){if(!this.isBatchEditMode())return super._processRemoveIfError(e,t)}_beforeFocusElementInRow(e){super._beforeFocusElementInRow(e);let t=e>=0?e:0,n=this.getFirstEditableColumnIndex();n>=0&&this.editCell(t,n)}},FQ=i=>class extends i{_createTable(){let e=super._createTable.apply(this,arguments),t=this._editingController;return t.isCellOrBatchEditMode()&&this.option("editing.allowUpdating")&&_.on(e,D(yn.name,"dxDataGridRowsView"),`td:not(.${aa})`,this.createAction(()=>{t.isEditing()&&t.closeEditCell()})),e}_createRow(e){let t=super._createRow.apply(this,arguments);if(e){let n=this._editingController,o=!!e.removed;n.isBatchEditMode()&&o&&t.addClass(MV)}return t}},UL={extenders:{controllers:{editing:RQ},views:{rowsView:FQ}}};$.registerModule("editingCellBased",UL);var qL="__DX_INSERT_INDEX__";var YL="row";var df="batch",Ld="cell";var XL=["popup","form"];var kn={valid:"valid",invalid:"invalid",pending:"pending"};var th=function(i){return f(i)&&i!=="cancel"},QL=function(i,e){return i!==void 0||i===void 0&&e&&!e.isNewRow},c0=class extends ye.Controller{constructor(){super(...arguments),this._isValidationInProgress=!1,this._disableApplyValidationResults=!1}init(){this._editingController=this.getController("editing"),this._editorFactoryController=this.getController("editorFactory"),this._columnsController=this.getController("columns"),this.createAction("onRowValidating"),this._validationState||this.initValidationState()}initValidationState(){this._validationState=[],this._validationStateCache={}}_rowIsValidated(e){let t=this._getValidationData(e?.key);return!!t&&!!t.validated}_getValidationData(e,t){let n=Di(e),o=z(n),s;return o?s=this._validationState.filter(r=>Ee(r.key,e))[0]:s=this._validationStateCache[n],!s&&t&&(s={key:e,isValid:!0},this._validationState.push(s),o||(this._validationStateCache[n]=s)),s}_getBrokenRules(e,t){let n;return t?n=t.brokenRules||t.brokenRule&&[t.brokenRule]:n=e.brokenRules||[],n}_rowValidating(e,t){let n=new y,o=this._editingController.getChangeByKey(e?.key),s=this._getBrokenRules(e,t),r=t?t.isValid:e.isValid,a={brokenRules:s,isValid:r,key:o.key,newData:o.data,oldData:this._editingController._getOldData(o.key),promise:null,errorText:this.getHiddenValidatorsErrorText(s)};return this.executeAction("onRowValidating",a),P(Et(a.promise)).always(()=>{e.isValid=a.isValid,e.errorText=a.errorText,n.resolve(a)}),n.promise()}getHiddenValidatorsErrorText(e){let t=[];return x(e,(n,o)=>{let{column:s}=o,r=s&&s.groupIndex!==void 0&&!s.showWhenGrouped,a=s&&s.visible;!o.validator.$element().parent().length&&(!a||r)&&t.push(o.message)}),t.join(", ")}validate(e){let t=!0,n=this._editingController,o=new y,s=[],r=n.getEditMode();if(e=e||r===YL,this._isValidationInProgress)return o.resolve(!1).promise();if(this._isValidationInProgress=!0,e){n.addDeferred(o);let a=n.getChanges();x(a,(l,d)=>{let{type:c,key:h}=d;if(c!=="remove"){let p=this._getValidationData(h,!0),g=this.validateGroup(p);s.push(g),g.done(C=>{p.validated=!0,t=t&&C.isValid})}})}else if(this._currentCellValidator){let a=this.validateGroup(this._currentCellValidator._findGroup());s.push(a),a.done(l=>{t=l.isValid})}return P(...s).done(()=>{this._isValidationInProgress=!1,o.resolve(t)}),o.promise()}validateGroup(e){var t;let n=new y,o=e&&fi.getGroupConfig(e),s;return o!=null&&o.validators.length&&(this.resetRowValidationResults(e),s=fi.validateGroup(e)),P(((t=s)===null||t===void 0?void 0:t.complete)||s).done(r=>{P(this._rowValidating(e,r)).done(n.resolve)}),n.promise()}isRowDataModified(e){return!bt(e.data)}updateValidationState(e){let t=this._editingController.getEditMode(),{key:n}=e,o=this._getValidationData(n,!0);if(XL.includes(t))o.isValid=!0;else{if(e.type==="insert"&&!this.isRowDataModified(e)){o.isValid=!0;return}if(this.setDisableApplyValidationResults(!0),fi.getGroupConfig(o)){let r=fi.validateGroup(o);P(r.complete||r).done(a=>{o.isValid=a.isValid,o.brokenRules=a.brokenRules})}else(!o.brokenRules||!o.brokenRules.length)&&(o.isValid=!0);this.setDisableApplyValidationResults(!1)}}setValidator(e){this._currentCellValidator=e}renderCellPendingIndicator(e){let t=e.find(".dx-pending-indicator");if(!t.length){let n=e;t=u("<div>").appendTo(n).addClass("dx-pending-indicator"),this._createComponent(t,bi),e.addClass("dx-validation-pending")}}disposeCellPendingIndicator(e){let t=e.find(".dx-pending-indicator");if(t.length){let n=bi.getInstance(t);n&&(n.dispose(),n.$element().remove()),e.removeClass("dx-validation-pending")}}validationStatusChanged(e){let{validator:t}=e,n=t.option("validationGroup"),{column:o}=t.option("dataGetter")();this.updateCellValidationResult({rowKey:n.key,columnIndex:o.index,validationResult:e})}validatorInitialized(e){e.component.on("validating",this.validationStatusChanged.bind(this)),e.component.on("validated",this.validationStatusChanged.bind(this))}validatorDisposing(e){let t=e.component,n=t.option("validationGroup"),{column:o}=t.option("dataGetter")(),s=this.getCellValidationResult({rowKey:n?.key,columnIndex:o.index});th(s)&&s.status===kn.pending&&this.cancelCellValidationResult({change:n,columnIndex:o.index})}applyValidationResult(e,t){let{validator:n}=t,o=n.option("validationGroup"),{column:s}=n.option("dataGetter")();if(t.brokenRules&&t.brokenRules.forEach(r=>{r.columnIndex=s.index,r.column=s}),e){let r=this.getCellValidationResult({rowKey:o.key,columnIndex:s.index}),a=th(r)&&r.disabledPendingId===t.id;if(this._disableApplyValidationResults||a)return;if(t.status===kn.invalid){let d=e.find(":focus");Tn(d)||(_.trigger(d,"focus"),_.trigger(d,le.down))}let l=!s.editCellTemplate&&this._editorFactoryController.getEditorInstance(e);t.status===kn.pending?l?l.option("validationStatus",kn.pending):this.renderCellPendingIndicator(e):l?l.option("validationStatus",kn.valid):this.disposeCellPendingIndicator(e),e.toggleClass(this.addWidgetPrefix("invalid"),t.status===kn.invalid)}}_syncInternalEditingData(e){var t;let n=this._editingController,o=n.getChangeByKey(e.key),s=n._getOldData(e.key),r=(t=e.row)===null||t===void 0?void 0:t.oldData;o&&r&&!s&&n._addInternalData({key:e.key,oldData:r})}createValidator(e,t){let n=this._editingController,{column:o}=e,{showEditorAlways:s}=o;if(f(o.command)||!o.validationRules||!Array.isArray(o.validationRules)||!o.validationRules.length)return;let a=n.getIndexByKey(e.key,n.getChanges())>-1;if(!a){if(!s){var l;s=(((l=this._columnsController)===null||l===void 0?void 0:l.getVisibleColumns())||[]).some(g=>g.showEditorAlways)}let c=Ee(this.option("editing.editRowKey"),e.key),h=n.isCellOrBatchEditMode()&&n.allowUpdating({row:e.row});if(a=c||h&&s,h&&s){var d;n._addInternalData({key:e.key,oldData:((d=e.row)===null||d===void 0?void 0:d.oldData)??e.data})}}if(a){if(t&&!t.length){ie.log("E1050");return}this._syncInternalEditingData(e);let c=this._getValidationData(e.key,!0),h=()=>{let C=n.getChangeByKey(c?.key),v=o.calculateCellValue(C?.data||{});return v!==void 0?v:e.value},p=t&&t.hasClass("dx-widget");t&&t.addClass(this.addWidgetPrefix("validator"));let g=new Xm(t||u("<div>"),{name:o.caption,validationRules:m(!0,[],o.validationRules),validationGroup:c,adapter:p?null:{getValue:h,applyValidationResults:C=>{this.applyValidationResult(t,C)}},dataGetter(){let C=c?.key,v=n.getChangeByKey(C),b=n._getOldData(C);return{data:To(b,v?.data),column:o}},onInitialized:this.validatorInitialized.bind(this),onDisposing:this.validatorDisposing.bind(this)});if(p){let C=g.option("adapter");if(C){let v=C.bypass,b=()=>e.row.isNewRow&&!this._isValidationInProgress&&!n.isCellModified(e);C.getValue=h,C.validationRequestsCallbacks=[],C.bypass=()=>v.call(C)||b()}}return g}}setDisableApplyValidationResults(e){this._disableApplyValidationResults=e}getDisableApplyValidationResults(){return this._disableApplyValidationResults}isCurrentValidatorProcessing(e){let{rowKey:t,columnIndex:n}=e;return this._currentCellValidator&&Ee(this._currentCellValidator.option("validationGroup").key,t)&&this._currentCellValidator.option("dataGetter")().column.index===n}validateCell(e){let t={rowKey:e.option("validationGroup").key,columnIndex:e.option("dataGetter")().column.index,validationResult:null},n=this.getCellValidationResult(t),o=th(n),s=e.option("adapter");if(!o)n=e.validate();else{let a=s.getValue();Ee(a,n.value)||(n=e.validate())}let r=new y;return o&&n.status===kn.pending&&(this.updateCellValidationResult(t),s.applyValidationResults(n)),P(n.complete||n).done(a=>{o&&s.applyValidationResults(a),r.resolve(a)}),r.promise()}updateCellValidationResult(e){let{rowKey:t,columnIndex:n,validationResult:o}=e,s=this._getValidationData(t);if(!s)return;s.validationResults||(s.validationResults={});let r;if(o){if(r=m({},o),s.validationResults[n]=r,o.status===kn.pending&&(this._editingController.getEditMode()===Ld&&(r.deferred=new y,r.complete.always(()=>{r.deferred.resolve()}),this._editingController.addDeferred(r.deferred)),this._disableApplyValidationResults)){r.disabledPendingId=o.id;return}}else r=s.validationResults[n];r&&r.disabledPendingId&&delete r.disabledPendingId}getCellValidationResult(e){var t;let{rowKey:n,columnIndex:o}=e,s=this._getValidationData(n,!0);return s==null||(t=s.validationResults)===null||t===void 0?void 0:t[o]}removeCellValidationResult(e){let{change:t,columnIndex:n}=e,o=this._getValidationData(t?.key);o&&o.validationResults&&(this.cancelCellValidationResult({change:t,columnIndex:n}),delete o.validationResults[n])}cancelCellValidationResult(e){let{change:t,columnIndex:n}=e,o=this._getValidationData(t.key);if(t&&o.validationResults){let s=o.validationResults[n];s&&(s.deferred&&s.deferred.reject("cancel"),o.validationResults[n]="cancel")}}resetRowValidationResults(e){e&&(e.validationResults&&delete e.validationResults,delete e.validated)}isInvalidCell(e){let{rowKey:t,columnIndex:n}=e,o=this.getCellValidationResult({rowKey:t,columnIndex:n});return th(o)&&o.status===kn.invalid}getCellValidator(e){let{rowKey:t,columnIndex:n}=e,o=this._getValidationData(t),s=o&&fi.getGroupConfig(o),r=s&&s.validators;return r&&r.filter(a=>{let{column:l}=a.option("dataGetter")();return l?l.index===n:!1})[0]}setCellValidationStatus(e){let t=this.getCellValidationResult({rowKey:e.key,columnIndex:e.column.index});f(t)?e.validationStatus=t!=="cancel"?t.status:"cancel":delete e.validationStatus}},PQ=i=>class extends i{processDataItemTreeListHack(e){super.processDataItem.apply(this,arguments)}processItemsTreeListHack(e,t){return super.processItems.apply(this,arguments)}_addChange(e){let t=super._addChange.apply(this,arguments);return t&&e.type!=="remove"&&this._validatingController.updateValidationState(t),t}_handleChangesChange(e){super._handleChangesChange.apply(this,arguments),e.value.forEach(t=>{this._validatingController._getValidationData(t.key)===void 0&&this._validatingController.updateValidationState(t)})}_updateRowAndPageIndices(){let e=this,t=e.getView("rowsView").getTopVisibleItemIndex(),n=t;x(e.getChanges(),(o,s)=>{let{key:r,type:a}=s,l=this._validatingController._getValidationData(r);l&&!l.isValid&&l.pageIndex!==e._pageIndex&&(l.pageIndex=e._pageIndex,a==="insert"?l.rowIndex=t:l.rowIndex=n,n++)})}_getValidationGroupsInForm(e){return{validationGroup:this._validatingController._getValidationData(e.key,!0)}}_validateEditFormAfterUpdate(e,t){t&&this._editForm&&this._editForm.validate(),super._validateEditFormAfterUpdate.apply(this,arguments)}_prepareEditCell(e){let t=super._prepareEditCell.apply(this,arguments);return t&&e.column.showEditorAlways&&this._validatingController.updateValidationState({key:e.key}),t}processItems(e,t){let n=this.getChanges(),o=(r,a)=>{let l=-1,d=r.type==="insert",{key:c}=r;return x(a,(h,p)=>{if(Ee(c,d?p.key:this._dataController.keyOf(p)))return l=h,!1}),l};e=super.processItems(e,t);let s=e.length;return this.getEditMode()===df&&t!=="prepend"&&t!=="append"&&n.forEach(r=>{let{key:a}=r,l=this._validatingController._getValidationData(a);l&&r.type&&l.pageIndex===this._pageIndex&&r?.pageIndex!==this._pageIndex&&function(d,c){let h={key:d.key};if(o(d,e)>=0)return;c.rowIndex=c.rowIndex>s?c.rowIndex%s:c.rowIndex;let{rowIndex:g}=c;h[qL]=1,e.splice(g,0,h)}(r,l)}),e}processDataItem(e){let t=e.data[qL],n=t?e.data.key:e.key;if(this.getEditMode()===df&&t&&n){let s=this.getChanges(),r=R.getIndexByKey(n,s);if(r>=0){let a=s[r];if(a.type!=="insert"){let l=this._getOldData(a.key);e.data=m(!0,{},l,a.data),e.key=n}}}super.processDataItem.apply(this,arguments)}_createInvisibleColumnValidators(e){let t=this,n=this._columnsController.getColumns(),o=this._columnsController.getInvisibleColumns().filter(l=>!l.isBand),s=this._columnsController.getGroupColumns().filter(l=>!l.showWhenGrouped&&o.indexOf(l)===-1),r=[],a=(l,d)=>this._dataController.getRowIndexByKey(d)>=0&&o.indexOf(l)<0;return o.push(...s),XL.includes(this.getEditMode())||x(n,(l,d)=>{e.forEach(c=>{let h;if(!a(d,c.key)){if(c.type==="insert")h=c.data;else if(c.type==="update"){let p=t._getOldData(c.key);if(!f(p))return;h=To(p,c.data)}if(h){let p=this._validatingController.createValidator({column:d,key:c.key,value:d.calculateCellValue(h)});p&&r.push(p)}}})}),function(){r.forEach(l=>{l.dispose()})}}_beforeSaveEditData(e,t){let n=super._beforeSaveEditData.apply(this,arguments),o=this._validatingController._getValidationData(e?.key,!0);if(e){let s=e.type==="remove"||o.isValid;n=n||!s}else{let s=this._createInvisibleColumnValidators(this.getChanges());n=new y,this.executeOperation(n,()=>{this._validatingController.validate(!0).done(r=>{switch(s(),this._updateRowAndPageIndices(),this.getEditMode()){case Ld:r||this._focusEditingCell();break;case df:r||(this._resetEditRowKey(),this._resetEditColumnName(),this._dataController.updateItems())}n.resolve(!r)})})}return n.promise?n.promise():n}_beforeEditCell(e,t,n){let o=super._beforeEditCell(e,t,n);if(this.getEditMode()===Ld){let s=this._rowsView._getCellElement(e,t),r=s&&s.data("dxValidator"),a=s&&s.closest(".dx-row").data("options"),l=r&&r.option("adapter").getValue();if(r&&QL(l,a)){let d=new y;return P(this._validatingController.validateCell(r),o).done((c,h)=>{d.resolve(c.status===kn.valid&&h)}),d.promise()}if(!r)return o}return!1}_afterSaveEditData(e){let t,n=this.getEditMode()===Ld;if(x(this.getChanges(),(o,s)=>{let r=this._showErrorRow(s);t=t||r}),t){let o=this._rowsView.getScrollable();o&&(o.update(),o.scrollToElement(t))}if(e&&n&&this._needUpdateRow()){let o=this.getEditRowIndex();this._dataController.updateItems({changeType:"update",rowIndices:[o]}),this._focusEditingCell()}else if(!e){let o=!0;n&&(o=!(this._columnsController.getColumns().filter(a=>{var l;return a.showEditorAlways&&((l=a.validationRules)===null||l===void 0?void 0:l.length)>0}).length>0)),o&&this._validatingController.initValidationState()}}_handleDataChanged(e){let t=this._validatingController._validationState;this.option("scrolling.mode")==="standard"&&this.resetRowAndPageIndices(),e.changeType==="prepend"&&x(t,(n,o)=>{o.rowIndex+=e.items.length}),super._handleDataChanged(e)}resetRowAndPageIndices(){let e=this._validatingController._validationState;x(e,(t,n)=>{n.pageIndex!==this._pageIndex&&(delete n.pageIndex,delete n.rowIndex)})}_beforeCancelEditData(){this._validatingController.initValidationState(),super._beforeCancelEditData()}_showErrorRow(e){let t,n=this._dataController.items(),o=this.getIndexByKey(e.key,n),s=this._validatingController._getValidationData(e.key);if(!(s!=null&&s.isValid)&&s!==null&&s!==void 0&&s.errorText&&o>=0)return t=this.getPopupContent(),this._errorHandlingController&&this._errorHandlingController.renderErrorRow(s?.errorText,o,t)}updateFieldValue(e){let t=new y;return this._validatingController.removeCellValidationResult({change:this.getChangeByKey(e.key),columnIndex:e.column.index}),super.updateFieldValue.apply(this,arguments).done(()=>{let n=this._validatingController.getCellValidator({rowKey:e.key,columnIndex:e.column.index});P(n&&this._validatingController.validateCell(n)).done(o=>{this._editorFactoryController.refocus(),t.resolve(o)})}),t.promise()}highlightDataCell(e,t){super.highlightDataCell.apply(this,arguments),this._validatingController.setCellValidationStatus(t);let n=!!t.setValue,o=this.isCellModified(t),s=f(t.validationStatus);if(o&&t.column.setCellValue||n&&!o&&!(t.row.isNewRow||!s)){let a=e.data("dxValidator");a&&P(this._validatingController.validateCell(a)).done(()=>{this._validatingController.setCellValidationStatus(t)})}}getChangeByKey(e){let t=this.getChanges();return t[R.getIndexByKey(e,t)]}isCellModified(e){let t=super.isCellModified(e),n=this.getChangeByKey(e.key),o=!!e.row&&this._validatingController.isInvalidCell({rowKey:e.key,columnIndex:e.column.index});return t||this._validatingController._rowIsValidated(n)&&o}},kQ=function(i,e){let t=u(e).closest("tr").index(),n=u(i._rowsView.getRowElement(t)).first().children().filter(":not(.dx-hidden-cell)");return i._rowsView._getWidths(n).reduce((o,s)=>o+s,0)},BQ=function(i){let e,t;return i.some((n,o)=>{if(n.command==="transparent")return e=o===0?-1:o,t=o===i.length-1?-1:o+n.colspan-1,!0}),{startColumnIndex:e,endColumnIndex:t}},VQ=i=>class extends i{_showRevertButton(e){var t,n;let o=(t=this._revertTooltip)===null||t===void 0?void 0:t.$element();if(!e||!e.length){var s;(s=o)===null||s===void 0||s.remove(),this._revertTooltip=void 0;return}if(e.find(o).length)return;let r=e.closest(`.${this.addWidgetPrefix("content")}`).parent(),a=this.addWidgetPrefix("revert-tooltip");(n=o)===null||n===void 0||n.remove(),o=u("<div>").addClass(a).appendTo(e);let l={animation:null,visible:!0,width:"auto",height:"auto",shading:!1,container:r,propagateOutsideClick:!0,hideOnOutsideClick:!1,wrapperAttr:{class:a},contentTemplate:()=>{let d=u("<div>").addClass("dx-revert-button"),c={icon:"revert",hint:this.option("editing.texts.validationCancelChanges"),elementAttr:{id:"dxRevertButton","aria-label":O.format("dxDataGrid-ariaRevertButton")},onClick:()=>{this._editingController.cancelEditData()}};return new _t(d,c).$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)};this._revertTooltip=new nn(o,l)}_hideFixedGroupCell(e,t){let n,o,s=this._rowsView.isFixedColumns(),r=this._editingController.isFormOrPopupEditMode();if(s&&!r){let a=e.closest(".dx-row").next().data("options");a&&a.rowType==="group"&&(n=u(this._rowsView.getRowElement(a.rowIndex)).last(),o=n.find(".dx-group-cell"),o.length&&o.get(0).style.visibility!=="hidden"&&(o.css("visibility","hidden"),t.onDisposing=function(){o.css("visibility","")}))}}_positionedHandler(e,t){if(!e.component.__skipPositionProcessing){let n=u(e.element).hasClass(this.addWidgetPrefix("revert-tooltip")),o=!n&&this._rowsView.updateFreeSpaceRowHeight(),s=this._normalizeValidationMessagePositionAndMaxWidth(e,n,t);e.component.__skipPositionProcessing=!!(o||s),s?e.component.option(s):o&&e.component.repaint()}}_showValidationMessage(e,t,n){var o;let s=e.find(".dx-dropdowneditor-overlay").data("dxPopup"),r=s&&s.option("visible"),a=r?"top right":`top ${n}`,l=r?"top left":`bottom ${n}`,c=((o=this._columnsController.getFixedColumns())===null||o===void 0?void 0:o.length)>0?this.getView("rowsView").element():e.closest(`.${this.addWidgetPrefix("content")}`),h="";t&&t.forEach(v=>{h+=(h.length?"<br/>":"")+Rh(v)});let p=this.addWidgetPrefix("invalid-message");this._rowsView.element().find(`.${p}`).remove();let g=u("<div>").addClass("dx-invalid-message").addClass("dx-invalid-message-always").addClass(p).html(h).appendTo(e),C={container:c,shading:!1,width:"auto",height:"auto",visible:!0,animation:!1,propagateOutsideClick:!0,hideOnOutsideClick:!1,wrapperAttr:{id:"dxInvalidMessage",class:`dx-invalid-message dx-invalid-message-always ${p}`},position:{collision:"flip",boundary:this._rowsView.element(),boundaryOffset:"0 0",offset:{x:0,y:!r&&we.mozilla?-1:0},my:a,at:l,of:e},onPositioned:v=>{this._positionedHandler(v,r),this._shiftValidationMessageIfNeed(v.component.$content(),e)}};this._hideFixedGroupCell(e,C),new nn(g,C)}_hideValidationMessage(){var e;let t=(e=this._rowsView.element())===null||e===void 0?void 0:e.find(this._getValidationMessagesSelector());t?.remove()}_normalizeValidationMessagePositionAndMaxWidth(e,t,n){let o=this._columnsController.getFixedColumns();if(!o||!o.length)return;let s,r=!t&&kQ(this,e.element),a=e.component.$content(),l=ae(a,!0),d=!t&&l>r,c=this._rowsView.getCellIndex(u(e.element).closest("td")),h=BQ(o);return!t&&(c===h.startColumnIndex||d)?s={collision:"none flip",my:"top left",at:n?"top right":"bottom left"}:c===h.endColumnIndex&&(s={collision:"none flip",my:"top right",at:t||n?"top left":"bottom right"},t&&(s.offset="-1 0")),s&&{position:s,maxWidth:d?r-2:void 0}}_shiftValidationMessageIfNeed(e,t){let n=this._revertTooltip&&this._revertTooltip.$content();if(!n)return;let o=e.offset(),s=n.offset();if(o.top===s.top&&o.left+W(e)>s.left){let r=W(n)+2;e.css("left",s.left<t.offset().left?-r:r)}}_getRevertTooltipsSelector(){return`.dx-editor-cell .${this.addWidgetPrefix("revert-tooltip")}`}_getValidationMessagesSelector(){let e=this.addWidgetPrefix("invalid-message");return`.dx-editor-cell .${e}, .dx-cell-modified .${e}`}loseFocus(e){e||this._validatingController.setValidator(null),super.loseFocus()}updateCellState(e,t,n){var o;let s=e?.closest(this._getFocusCellSelector()),r=s!=null&&s.is("td")?s:null,a=s?.closest(".dx-row").data("options"),l=a?this._editingController.getChangeByKey(a.key):null,d=r&&this._columnsController.getVisibleColumns()[r.index()],c=(l==null||(o=l.data)===null||o===void 0?void 0:o[d?.name])!==void 0&&!this._editingController.isSaving(),h=[];if(this._editingController.getEditMode()===Ld&&(t?.status===kn.invalid||c?(this._showRevertButton(s),h.push("dxRevertButton")):this._revertTooltip&&this._revertTooltip.$element().remove()),t&&t.status===kn.invalid&&r&&d&&t&&t.brokenRules){let g=[];t.brokenRules.forEach(C=>{C.message&&g.push(C.message)}),g.length&&(this._showValidationMessage(s,g,d.alignment||"left"),h.push("dxInvalidMessage"))}this._updateAriaValidationAttributes(s,h),!n&&this._rowsView.element()&&this._rowsView.updateFreeSpaceRowHeight()}_updateAriaValidationAttributes(e,t){if(t.length===0)return;let n=this._editingController.getEditMode();if([Ld,df,YL].includes(n)){let s=this._getCurrentFocusElement(e);s.attr("aria-labelledby",t.join(" ")),s.attr("aria-invalid",!0)}}_getCurrentFocusElement(e){return this._editingController.isEditing()?e.find(Ku).first():e}focus(e,t){if(!arguments.length)return super.focus();if(this._hideValidationMessage(),e!=null&&e.hasClass("dx-row")||e!=null&&e.hasClass("dx-master-detail-cell"))return super.focus(e,t);let n=e?.closest(this._getFocusCellSelector()),o=n&&(n.data("dxValidator")||e.find(`.${this.addWidgetPrefix("validator")}`).eq(0).data("dxValidator")),s=n&&n.closest(".dx-row").data("options"),r=s?this._editingController.getChangeByKey(s.key):null,a;if(o){this._validatingController.setValidator(o);let l=o.option("adapter").getValue();if(QL(l,s)||this._validatingController._rowIsValidated(r))return this._editingController.waitForDeferredOperations().done(()=>{this._rowsView.isElementInside(e)&&P(this._validatingController.validateCell(o)).done(c=>{a=c;let{column:h}=a.validator.option("dataGetter")();r&&h&&!this._validatingController.isCurrentValidatorProcessing({rowKey:r.key,columnIndex:h.index})||(!Ot(yt())&&a.status===kn.invalid&&(t=!0),this.updateCellState(e,a,t),super.focus.call(this,e,t))})}),super.focus(e,t)}return this.updateCellState(e,a,t),super.focus(e,t)}getEditorInstance(e){let t=e.find(".dx-texteditor").eq(0);return R.getWidgetInstance(t)}},LQ=i=>class extends i{_getValidationStatus(e){return(th(e)?e.status:e)||kn.valid}_isCellChanged(e,t,n,o,s){var r,a;let l=(r=e.cells)===null||r===void 0?void 0:r[o],d=this._getValidationStatus({status:l?.validationStatus}),c=this._validatingController.getCellValidationResult({rowKey:e.key,columnIndex:o}),h=this._validatingController._getValidationData(e.key),p=this._getValidationStatus(c),g=JSON.stringify(t.modifiedValues)!==JSON.stringify(e.modifiedValues),C=d!==p&&g,v=u(l?.cellElement).hasClass(this.addWidgetPrefix("invalid")),b=l==null||(a=l.column.validationRules)===null||a===void 0?void 0:a.length,T=e.isEditing!==t.isEditing&&b,M=C||h.isValid&&v;return T||M?!0:super._isCellChanged.apply(this,arguments)}},NQ=i=>class extends i{updateFreeSpaceRowHeight(e){let t=this,n,o,s,r=t.element(),a=r&&r.find(`.${t.addWidgetPrefix("invalid-message")} .dx-overlay-content`);if(super.updateFreeSpaceRowHeight(e),a&&a.length&&(n=t._getRowElements(),s=t._getFreeSpaceRowElements(e),o=s.first(),o&&n.length===1&&(!o.is(":visible")||ee(a)>ee(o))))return s.show(),Bi(s,ee(a)),!0}_formItemPrepared(e,t){super._formItemPrepared.apply(this,arguments),Ci(()=>{let n=t.find(".dx-widget").first();n.length&&!n.children().length||this._validatingController.createValidator(e,n)})}_cellPrepared(e,t){this._editingController.isFormOrPopupEditMode()||this._validatingController.createValidator(t,e),super._cellPrepared.apply(this,arguments)}_restoreErrorRow(e){this._editingController&&this._editingController.hasChanges()&&this._getRowElements(e).each((t,n)=>{let o=u(n).data("options");if(o){let s=this._editingController.getChangeByKey(o.key);s&&this._editingController._showErrorRow(s)}})}},ZL={defaultOptions:()=>({editing:{texts:{validationCancelChanges:O.format("dxDataGrid-validationCancelChanges")}}}),controllers:{validating:c0},extenders:{controllers:{editing:PQ,editorFactory:VQ,data:LQ},views:{rowsView:NQ}}};$.registerModule("validating",ZL);var u0="scrolling.legacyMode",tN=i=>i.option("scrolling.loadTwoPagesOnStart")||i._controller.isVirtual()||i._controller.getViewportItemIndex()>0,cf=i=>i._cache.length?i._cache[0].pageIndex:-1,h0=i=>i._cache.length?i._cache[i._cache.length-1].pageIndex:-1,hf=(i,e,t)=>{i._isChangedFiring=!0,e(t),i._isChangedFiring=!1},JL=(i,e,t)=>{if(i._isDelayChanged)return i._isDelayChanged=!1,hf(i,e,t),!0},HQ=i=>{let e=i._dataOptions.pageSize();if(i.option("scrolling.preventPreload"))return 0;let n=i._controller.viewportSize();if(i._controller.isVirtualMode()&&i.option("scrolling.removeInvisiblePages")){n=0;let o=i._controller.viewportSize()*i._controller.viewportItemSize(),s=i._controller.getContentOffset(),r=i._controller.getViewportPosition(),a=i._controller.virtualItemsCount(),l=i._dataOptions.totalItemsCount();for(let d=a.begin;d<l&&!(s>=r+o);d++){let c=i._controller.getItemSizes()[d]||i._controller.viewportItemSize();s+=c,s>=r&&n++}}return e&&n>0?Math.ceil(n/e):1},uf=(i,e)=>{let t=i.option("scrolling.preloadEnabled"),n=HQ(i),o=i._controller.isAppendMode();return n&&(e?n=t?1:0:(t&&n++,(o||!tN(i))&&n--)),n},$Q=i=>{let e=-1,t=cf(i),n=i._dataOptions;return t<0?e=i._pageIndex:i._cache[i._pageIndex-t]?t>=0&&i._controller.viewportSize()>=0&&(t>0&&(h0(i)+1===n.pageCount()&&i._cache.length<uf(i)+1||i._pageIndex===t&&uf(i,!0))&&(e=t-1),e<0&&t+i._cache.length<=i._pageIndex+uf(i)&&(e=t+i._cache.length)):e=i._pageIndex,i._loadingPageIndexes[e]&&(e=-1),e},zQ=(i,e)=>{let t=i._dataOptions;if(e===i.pageIndex()||!t.isLoading()&&e<t.pageCount()||!t.hasKnownLastPage()&&e===t.pageCount())return t.pageIndex(e),i._loadingPageIndexes[e]=!0,P(t.load()).always(()=>{i._loadingPageIndexes[e]=!1})},eN=(i,e,t,n,o)=>{let s=i._dataOptions,r=s.items().slice(),a=z(t)?t:void 0,l=t==="prepend",d=s.viewportItems();t&&B(t)&&!i._isDelayChanged&&(a={changeType:t,items:r},o&&(a.removeCount=o.itemsCount,a.removeCount&&s.correctCount&&(a.removeCount=s.correctCount(d,a.removeCount,l))));let c=o?o.itemsLength:0;c&&s.correctCount&&(c=s.correctCount(d,c,l)),t==="append"?(d.push.apply(d,r),o&&d.splice(0,c)):l?(d.unshift.apply(d,r),o&&d.splice(-c)):i._dataOptions.viewportItems(r),s.updateLoading(),i._lastPageIndex=i.pageIndex(),i._isDelayChanged=n,n||hf(i,e,a)},pf=class{constructor(e,t){this._dataOptions=t,this._controller=e,this._pageIndex=this._lastPageIndex=t.pageIndex(),this._cache=[],this._loadingPageIndexes={}}option(){return this._controller.option.apply(this._controller,arguments)}viewportItemIndexChanged(e){let t=this._dataOptions.pageSize(),n=this._dataOptions.pageCount(),o=this._controller.isVirtualMode(),s=this._controller.isAppendMode(),r=this._dataOptions.totalItemsCount(),a;if(t&&(o||s)&&r>=0){let l=this._controller.viewportSize();if(l&&e+l>=r&&!this._controller.isVirtual())if(this._dataOptions.hasKnownLastPage()){a=n-1;let d=r%t;a>0&&d>0&&d<l&&a--}else a=n;else{a=Math.floor(e/t);let d=n-1;a=Math.max(a,0),a=Math.min(a,d)}return this.pageIndex(a),this.load()}}pageIndex(e){let t=this._controller.isVirtualMode(),n=this._controller.isAppendMode();return this.option(u0)!==!1&&(t||n)?(e!==void 0&&(this._pageIndex=e),this._pageIndex):this._dataOptions.pageIndex(e)}beginPageIndex(e){let t=cf(this);return t<0&&(t=e!==void 0?e:this.pageIndex()),t}endPageIndex(){let e=h0(this);return e>0?e:this._lastPageIndex}pageSize(){return this._dataOptions.pageSize()}load(){let e=this._dataOptions,t,n=this._controller.isVirtualMode(),o=this._controller.isAppendMode();if(this.option(u0)!==!1&&(n||o)){let s=$Q(this);if(s>=0){let r=zQ(this,s);r&&(t=new y,r.done(()=>{let a=this._delayDeferred;a?a.done(t.resolve).fail(t.reject):t.resolve()}).fail(t.reject),e.updateLoading())}}else t=e.load();return!t&&this._lastPageIndex!==this.pageIndex()&&this._dataOptions.onChanged({changeType:"pageIndex"}),t||new y().resolve()}loadIfNeed(){let e=this._controller.isVirtualMode(),t=this._controller.isAppendMode();if((e||t)&&!this._dataOptions.isLoading()&&(!this._isChangedFiring||this._controller.isVirtual())){let n=this._controller.getViewportPosition();n>0?this._controller._setViewportPositionCore(n):this.load()}}handleDataChanged(e,t){let n=this._dataOptions,o=this._cache.length,s,r,a=this._controller.isVirtualMode(),l=this._controller.isAppendMode();if(t&&t.changes)hf(this,e,t);else if(this.option(u0)!==!1&&(a||l)){let d=cf(this);if(d>=0&&(a&&d+this._cache.length!==n.pageIndex()&&d-1!==n.pageIndex()&&(o=0,this._cache=[]),l)){if(n.pageIndex()===0)this._cache=[];else if(n.pageIndex()<h0(this)){hf(this,e,{changeType:"append",items:[]});return}}let c={pageIndex:n.pageIndex(),itemsLength:n.items(!0).length,itemsCount:this.itemsCount(!0)};this.option("scrolling.removeInvisiblePages")&&a?r=this._cache.length>Math.max(uf(this)+(this.option("scrolling.preloadEnabled")?1:0),2):JL(this,e,{isDelayed:!0});let h;d===n.pageIndex()+1?(r&&(h=this._cache.pop()),s="prepend",this._cache.unshift(c)):(r&&(h=this._cache.shift()),s="append",this._cache.push(c));let p=a&&o===0&&tN(this);eN(this,e,this._cache.length>1?s:void 0,p,h),this._delayDeferred=this.load().done(()=>{JL(this,e)&&this.load()})}else eN(this,e,t)}getDelayDeferred(){return this._delayDeferred}itemsCount(e){let t=0,n=this._controller.isVirtualMode();return!e&&n?this._cache.forEach(o=>{t+=o.itemsCount}):t=this._dataOptions.itemsCount(),t}virtualItemsCount(){let e=cf(this);e<0&&(e=this._dataOptions.pageIndex());let t=e*this._dataOptions.pageSize(),n=this._cache.length*this._dataOptions.pageSize(),o=Math.max(0,this._dataOptions.totalItemsCount()-n-t);return{begin:t,end:o}}reset(){this._loadingPageIndexes={},this._cache=[]}};var gf="scrolling.legacyMode",iN=i=>i.option("scrolling.mode")==="virtual"||i._isVirtual,WQ=i=>i.option("scrolling.mode")==="infinite"&&!i._isVirtual;function p0(i,e,t){let n,o=[],s=[],r=[];t=t||i;function a(h){let p=h.element?h.$element():h,g=xt.offset(p);return g?h.scrollTop()-(g.top-i.offset().top):i.offset().top}let l={on(h,p,g){h.on("scroll",g)},off(h,p,g){h.off("scroll",g)}};function d(h){let p=h.get(0).nodeName==="#document",g=h.get(0).nodeType===q().Node.ELEMENT_NODE,C=h.data("dxScrollable"),v=l;if(!C&&(C=p&&u(q())||g&&h.css("overflowY")==="auto"&&h,v=_,!C))return;let b=function(T){return function(){let M=T.scrollTop()-a(T);M=M>0?M:0,e(M)}}(C);v.on(C,"scroll",b),s.push(T=>{let M=a(C),G=C.scrollTo?"scrollTo":"scrollTop";T-M>=0&&C[G](T+M)}),o.push(C),r.push(()=>{v.off(C,"scroll",b)})}let c=h=>u(h.get(0).parentNode??h.get(0).host);for(n=t.parent();n.length;n=c(n))d(n);return{scrollTo(h){x(s,(p,g)=>{g(h)})},dispose(){x(r,(h,p)=>{p()})}}}var ih=class{constructor(e,t,n){this._dataOptions=t,this.component=e,this._viewportSize=e.option(gf)===!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=ge(),this._dataLoader=new pf(this,this._dataOptions)}getItemSizes(){return this._itemSizes}option(e,t){return this.component.option.apply(this.component,arguments)}isVirtual(){return this._isVirtual}virtualItemsCount(){if(iN(this)){let e=this._dataOptions,t=e.totalItemsCount();if(this.option(gf)===!1&&t!==-1){let n=this.getViewportParams(),o=e.loadedOffset(),s=e.loadedItemCount(),r=Math.max(n.skip,o),a=Math.min(n.take,s),l=Math.max(t-(r+a),0);return{begin:r,end:l}}return this._dataLoader.virtualItemsCount.apply(this._dataLoader,arguments)}}getScrollingTimeout(){let e=this.option("scrolling.renderAsync"),t=0;return f(e)?e&&(t=this.option("scrolling.timeout")??0):(t=Math.min(this.option("scrolling.timeout")||0,this._dataOptions.changingDuration()),t<this.option("scrolling.renderingThreshold")&&(t=this.option("scrolling.minTimeout")||0)),t}setViewportPosition(e){let t=new y,n=this.getScrollingTimeout();return clearTimeout(this._scrollTimeoutID),n>0?this._scrollTimeoutID=setTimeout(()=>{this._setViewportPositionCore(e),t.resolve()},n):(this._setViewportPositionCore(e),t.resolve()),t.promise()}getViewportPosition(){return this._position}getItemIndexByPosition(e,t,n){e=e??this._position;let o=this.getItemSize(),s=0,r=0,a=Object.keys(this._itemSizes).concat(-1);for(let l=0;l<a.length&&s<e;l++){let d=parseInt(a[l]),c=(e-s)/o;if(d<0||r+c<d){r+=c,this._sizeRatio<1&&f(t)&&(r=t+n/this._viewportItemSize);break}else c=d-r,s+=c*o,r+=c;let h=this._itemSizes[d];s+=h,r+=s<e?1:(e-s+h)/h}return Math.round(50*r)/50}isScrollingBack(){return this._isScrollingBack}_setViewportPositionCore(e){let t=this._position||0;this._position=e,t!==this._position&&(this._isScrollingBack=this._position<t);let n=this.getItemIndexByPosition(),o=this.setViewportItemIndex(n);return this.positionChanged.fire(),o}setContentItemSizes(e){let t=this.virtualItemsCount();if(this._contentSize=e.reduce((n,o)=>n+o,0),t){e.forEach((s,r)=>{this._itemSizes[t.begin+r]=s});let n=(t.begin+t.end+this.itemsCount())*this._viewportItemSize,o=R.getContentHeightLimit(we);n>o?this._sizeRatio=o/n:this._sizeRatio=1}}getItemSize(){return this._viewportItemSize*this._sizeRatio}getItemOffset(e,t){let n=this.virtualItemsCount(),o=e;if(!n)return 0;let s=0,r=this._dataOptions.totalItemsCount();return Object.keys(this._itemSizes).forEach(a=>{o&&(t?a>=r-e:a<e)&&(s+=this._itemSizes[a],o--)}),Math.floor(s+o*this._viewportItemSize*this._sizeRatio)}getContentOffset(e){let t=e==="end",n=this.virtualItemsCount();return n?this.getItemOffset(t?n.end:n.begin,t):0}getVirtualContentSize(){return this.virtualItemsCount()?this.getContentOffset("begin")+this.getContentOffset("end")+this._contentSize:0}getViewportItemIndex(){return this._viewportItemIndex}setViewportItemIndex(e){if(this._viewportItemIndex=e,this.option(gf)!==!1)return this._dataLoader.viewportItemIndexChanged.apply(this._dataLoader,arguments)}viewportItemSize(e){return e!==void 0&&(this._viewportItemSize=e),this._viewportItemSize}viewportSize(e){return e!==void 0&&(this._viewportSize=e),this._viewportSize}viewportHeight(e,t){let n=t??this._position,o=this.getItemIndexByPosition(n),s=this.getItemIndexByPosition(n+e,o,e);this.viewportSize(Math.ceil(s-o)),!f(t)&&this._viewportItemIndex!==o&&this._setViewportPositionCore(n)}reset(e){this._dataLoader.reset(),e||(this._itemSizes={})}subscribeToWindowScrollEvents(e){this._windowScroll=this._windowScroll||p0(e,t=>{this.viewportItemSize()&&this.setViewportPosition(t)})}dispose(){clearTimeout(this._scrollTimeoutID),this._windowScroll&&this._windowScroll.dispose(),this._windowScroll=null}scrollTo(e){this._windowScroll&&this._windowScroll.scrollTo(e)}isVirtualMode(){return iN(this)}isAppendMode(){return WQ(this)}getViewportParams(){let e=this.option("scrolling.mode")==="virtual",t=this._dataOptions.totalItemsCount(),o=this._dataOptions.hasKnownLastPage()&&this._viewportItemIndex>t?t:this._viewportItemIndex,s=this._viewportSize+o,r=this.option("scrolling.prerenderedRowChunkSize")||1,a=this.isScrollingBack(),l=this.option("scrolling.prerenderedRowCount")??1,d=a?l:0,c=a?0:l,h=Math.floor(Math.max(0,o-d)/r)*r,p=Math.ceil((s+c-h)/r)*r;if(e){let g=Math.max(0,t-h);p=Math.min(p,g)}return{skip:h,take:p}}itemsCount(){let e=0;return this.option(gf)?e=this._dataLoader.itemsCount.apply(this._dataLoader,arguments):e=this._dataOptions.itemsCount(),e}pageIndex(){return this._dataLoader.pageIndex(...arguments)}beginPageIndex(){return this._dataLoader.beginPageIndex(...arguments)}endPageIndex(){return this._dataLoader.endPageIndex(...arguments)}pageSize(){return this._dataLoader.pageSize(...arguments)}load(){return this._dataLoader.load(...arguments)}loadIfNeed(){return this._dataLoader.loadIfNeed(...arguments)}handleDataChanged(){return this._dataLoader.handleDataChanged(...arguments)}getDelayDeferred(){return this._dataLoader.getDelayDeferred()}};var sN="dx-freespace-row";var GQ="dx-row-inserted";var Le="scrolling.legacyMode";var jQ=["beginPageIndex","endPageIndex","pageIndex"],xn=function(i){return i.option("scrolling.mode")==="virtual"},Is=function(i){return i.option("scrolling.mode")==="infinite"},jo=function(i){return xn(i)||Is(i)},nN=function(i,e,t,n){for(let o=0;o<e+1;o++){let s=i[t?i.length-1-o:o];s&&!n(s,o===e,t)&&e++}return e},mf=function(i,e){return i.rowType==="data"&&!i.isNewRow||i.rowType==="group"&&e.isGroupItemCountable(i.data)},KQ=function(i){return i.forEach((e,t)=>{e.rowIndex=t}),i},g0=function(i){let e=i._virtualScrollController.beginPageIndex(-1);xn(i)&&(e<0||i.viewportSize()>=0&&i.getViewportItemIndex()>=0&&(e*i.pageSize()>i.getViewportItemIndex()||e*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)))},Cn=function(i,e,t){if(i.option(Le)===!1&&jQ.includes(e)){let o=i._dataSource;return o.pageIndex.apply(o,t)}let n=i._virtualScrollController;return n[e].apply(n,t)},oN=function(i,e){let t=i.toArray().map(o=>u(o).parent(`.${e}`).get(0)).filter(o=>o);t.length&&(i=u(t));let n=e===sN?i.length-1:i.length;for(let o=0;o<n;o++)i.eq(o).remove()},rN=i=>class extends i{init(){super.init.apply(this,arguments),this._items=[],this._totalCount=-1,this._isLoaded=!0,this._loadPageCount=1,this._virtualScrollController=new ih(this.component,this._getVirtualScrollDataOptions())}dispose(){this._virtualScrollController.dispose(),super.dispose.apply(this,arguments)}_getVirtualScrollDataOptions(){let e=this;return{pageSize:()=>e.pageSize(),totalItemsCount:()=>e.totalItemsCount(),hasKnownLastPage:()=>e.hasKnownLastPage(),pageIndex:t=>e._dataSource.pageIndex(t),isLoading:()=>e._dataSource.isLoading()&&!e.isCustomLoading(),pageCount:()=>e.pageCount(),load:()=>e._dataSource.load(),updateLoading(){g0(e)},itemsCount:()=>e.itemsCount(!0),items:()=>e._dataSource.items(),viewportItems(t){return t&&(e._items=t),e._items},onChanged(t){e.changed.fire(t)},changingDuration(){return e.isLoading()?300:e._renderTime||0}}}_handleLoadingChanged(e){if(this.option(Le)===!1){super._handleLoadingChanged.apply(this,arguments);return}(!xn(this)||this._isLoadingAll)&&(this._isLoading=e,super._handleLoadingChanged.apply(this,arguments)),e?this._startLoadTime=new Date:this._startLoadTime=void 0}_handleLoadError(){this.option(Le)!==!1&&(this._isLoading=!1,this.loadingChanged.fire(!1)),super._handleLoadError.apply(this,arguments)}_handleDataChanged(e){if(this.option(Le)===!1){this._items=this._dataSource.items().slice(),this._totalCount=this._dataSourceTotalCount(!0),super._handleDataChanged.apply(this,arguments);return}let t=super._handleDataChanged.bind(this);this._virtualScrollController.handleDataChanged(t,e)}_customizeRemoteOperations(e,t){let n=this.option(Le)===!1,o=this.option("scrolling.renderAsync");f(o)||(o=this._renderTime>=this.option("scrolling.renderingThreshold")),(xn(this)||Is(this)&&n)&&!t.reload&&(t.skip||n)&&!o&&(e.delay=void 0),super._customizeRemoteOperations.apply(this,arguments)}items(){return this._items}_dataSourceTotalCount(e){return this.option(Le)===!1&&xn(this)&&!e?this._totalCount:super._dataSourceTotalCount()}itemsCount(e){return e||this.option(Le)===!1?super.itemsCount():this._virtualScrollController.itemsCount()}load(e){return this.option(Le)===!1||e?super.load(e):this._virtualScrollController.load()}isLoading(){return this.option(Le)===!1?this._dataSource.isLoading():this._isLoading}isLoaded(){return this._dataSource.isLoaded()&&this._isLoaded}resetPagesCache(e){e||this._virtualScrollController.reset(!0),super.resetPagesCache.apply(this,arguments)}_changeRowExpandCore(){let e=super._changeRowExpandCore.apply(this,arguments);return this.option(Le)===!1||(this.resetPagesCache(),g0(this)),e}reload(){this._dataSource.pageIndex(this.pageIndex());let e=this._virtualScrollController;if(this.option(Le)!==!1&&e){let t=new y;return super.reload.apply(this,arguments).done(n=>{let o=e.getDelayDeferred();o?o.done(t.resolve).fail(t.reject):t.resolve(n)}).fail(t.reject),t}return super.reload.apply(this,arguments)}refresh(e,t){if(this.option(Le)!==!1){let{storeLoadOptions:n}=e,o=this._dataSource;t.reload?(this._virtualScrollController.reset(),o.items().length=0,this._isLoaded=!1,g0(this),this._isLoaded=!0,Is(this)?(this.pageIndex(0),o.pageIndex(0),n.pageIndex=0,e.pageIndex=0,n.skip=0):(o.pageIndex(this.pageIndex()),o.paginate()&&(e.pageIndex=this.pageIndex(),n.skip=this.pageIndex()*this.pageSize()))):Is(this)&&n.skip&&this._totalCountCorrection<0&&(n.skip+=this._totalCountCorrection)}return super.refresh.apply(this,arguments)}loadPageCount(e){if(!f(e))return this._loadPageCount;this._loadPageCount=e}_handleDataLoading(e){let t=this.loadPageCount(),n=this.pageSize(),o=this.option(Le)===!1,{storeLoadOptions:s}=e,r=f(s.take);e.loadPageCount=t,!e.isCustomLoading&&o&&r&&t>1&&n>0&&(s.take=t*n),super._handleDataLoading.apply(this,arguments)}_loadPageSize(){return super._loadPageSize.apply(this,arguments)*this.loadPageCount()}beginPageIndex(){return Cn(this,"beginPageIndex",[...arguments])}endPageIndex(){return Cn(this,"endPageIndex",[...arguments])}pageIndex(e){return Cn(this,"pageIndex",[...arguments])}virtualItemsCount(){return Cn(this,"virtualItemsCount",[...arguments])}getContentOffset(){return Cn(this,"getContentOffset",[...arguments])}getVirtualContentSize(){return Cn(this,"getVirtualContentSize",[...arguments])}setContentItemSizes(){return Cn(this,"setContentItemSizes",[...arguments])}setViewportPosition(){return Cn(this,"setViewportPosition",[...arguments])}getViewportItemIndex(){return Cn(this,"getViewportItemIndex",[...arguments])}setViewportItemIndex(e){return Cn(this,"setViewportItemIndex",[...arguments])}getItemIndexByPosition(){return Cn(this,"getItemIndexByPosition",[...arguments])}viewportSize(){return Cn(this,"viewportSize",[...arguments])}viewportItemSize(){return Cn(this,"viewportItemSize",[...arguments])}getItemSize(){return Cn(this,"getItemSize",[...arguments])}getItemSizes(){return Cn(this,"getItemSizes",[...arguments])}loadIfNeed(){return Cn(this,"loadIfNeed",[...arguments])}},UQ=i=>class extends i{dispose(){let e=this._rowsScrollController;e&&e.dispose(),super.dispose.apply(this,arguments)}_refreshDataSource(){let e=super._refreshDataSource.apply(this,arguments)||new y().resolve().promise();return e.done(this.initVirtualRows.bind(this)),e}_loadDataSource(){if(this._rowsScrollController&&jo(this)){var e;let{loadPageCount:t}=f(this._loadViewportParams)?this.getLoadPageParams():{loadPageCount:0};t>=1&&((e=this._dataSource)===null||e===void 0||e.loadPageCount(t))}return super._loadDataSource.apply(this,arguments)}getRowPageSize(){let e=this.option("scrolling.rowPageSize"),t=this.pageSize();return t&&t<e?t:e}reload(){let e=this._rowsScrollController||this._dataSource,t=e&&e.getItemIndexByPosition(),n=super.reload.apply(this,arguments);return n&&n.done(()=>{if(xn(this)||R.isVirtualRowRendering(this)){let s=this.getRowIndexOffset(),r=Math.floor(t)-s,{component:a}=this,l=a.getScrollable&&a.getScrollable(),d=this.dataSource().operationTypes().sorting;if(l&&!d&&r>=0){var o;let c=a.getRowElement(r),h=c&&c[0]&&u(c[0]),p=h&&((o=h.position())===null||o===void 0?void 0:o.top),g=we.chrome&&Number(we.version??0)>=91,C=we.mozilla||g?1:0;p&&p>C&&(p=Math.round(p+ee(h)*(t%1)),l.scrollTo({y:p}))}}})}initVirtualRows(){let e=R.isVirtualRowRendering(this);if(this._allItems=null,this._loadViewportParams=null,this.option("scrolling.mode")!=="virtual"&&!e||!e||this.option(Le)!==!1&&!this.option("scrolling.rowPageSize")){this._visibleItems=null,this._rowsScrollController=null;return}let t=!xn(this)&&this.pageIndex()>=this.pageCount()?this.pageCount()-1:this.pageIndex();this._rowPageIndex=Math.ceil(t*this.pageSize()/this.getRowPageSize()),this._visibleItems=this.option(Le)===!1?null:[],this._viewportChanging=!1,this._needUpdateViewportAfterLoading=!1,this._rowsScrollController||(this._rowsScrollController=new ih(this.component,this._getRowsScrollDataOptions(),!0),this._rowsScrollController.positionChanged.add(()=>{var n;if(this.option(Le)===!1){this._viewportChanging=!0,this.loadViewport(),this._viewportChanging=!1;return}(n=this._dataSource)===null||n===void 0||n.setViewportItemIndex(this._rowsScrollController.getViewportItemIndex())})),this.option(Le)===!1&&this._updateLoadViewportParams(),this.isLoaded()&&this.option(Le)!==!1&&this._rowsScrollController.load()}isViewportChanging(){return this._viewportChanging}_getRowsScrollDataOptions(){let e=this,t=function(n){return mf(n,e._dataSource)};return{pageSize:()=>e.getRowPageSize(),loadedOffset(){var n;return xn(e)&&((n=e._dataSource)===null||n===void 0?void 0:n.lastLoadOptions().skip)||0},loadedItemCount:()=>e._itemCount,totalItemsCount(){return jo(e)?e.totalItemsCount():e.option(Le)===!1?e._itemCount:e._items.filter(t).length},hasKnownLastPage:()=>e.option(Le)===!1?e.hasKnownLastPage():!0,pageIndex(n){return n!==void 0&&(e._rowPageIndex=n),e._rowPageIndex},isLoading:()=>e.isLoading(),pageCount(){return Math.ceil(this.totalItemsCount()/this.pageSize())||1},load(){e._rowsScrollController.pageIndex()>=this.pageCount()&&(e._rowPageIndex=this.pageCount()-1,e._rowsScrollController.pageIndex(e._rowPageIndex)),!(!this.items().length&&this.totalItemsCount())&&e._rowsScrollController.handleDataChanged(n=>{n=n||{},n.changeType=n.changeType||"refresh",n.items=n.items||e._visibleItems,e._visibleItems.forEach((o,s)=>{o.rowIndex=s}),e._fireChanged(n)})},updateLoading(){},itemsCount(){return this.items(!0).length},correctCount:(n,o,s)=>nN(n,o,s,(r,a,l)=>r.isNewRow?a&&!l:a&&l?!r.isNewRow:t(r)),items(n){let o=e._items;if(e.option(Le)){let s=e.dataSource(),r=s?.virtualItemsCount(),a=r?r.begin:0,l=e.getRowPageSize(),d=e._rowPageIndex*l-a,c=l;if(d<0)return[];d&&(d=this.correctCount(o,d),o=o.slice(d)),c&&(c=this.correctCount(o,c),o=o.slice(0,c))}return n?o.filter(t):o},viewportItems(n){return n&&e.option(Le)!==!1&&(e._visibleItems=n),e._visibleItems},onChanged(){},changingDuration(){let n=e.dataSource();return n!=null&&n.isLoading()&&e.option(Le)!==!1?300:n?._renderTime||0}}}_updateItemsCore(e){let t=this.getRowIndexDelta();if(super._updateItemsCore.apply(this,arguments),this.option(Le)===!1&&R.isVirtualRowRendering(this)){e.changeType==="update"&&e.rowIndices.length===0&&e.cancelEmptyChanges&&(e.cancel=!0);return}let n=this._rowsScrollController;if(n){let o=this._visibleItems,s=e.changeType==="refresh"||e.isLiveUpdate;if(e.changeType==="append"&&e.items&&!e.items.length)return;s||e.changeType==="append"||e.changeType==="prepend"?(e.cancel=!0,s&&n.reset(!0),n.load()):(e.changeType==="update"?e.rowIndices.forEach((r,a)=>{let l=e.changeTypes[a],d=e.items[a];l==="update"?o[r]=d:l==="insert"?o.splice(r,0,d):l==="remove"&&o.splice(r,1)}):(o.forEach((r,a)=>{o[a]=this._items[a+t]||o[a]}),e.items=o),KQ(o))}}_updateLoadViewportParams(){let e=this._rowsScrollController.getViewportParams(),t=this.pageSize();if(e&&!jo(this)&&t>0){let n=this.pageIndex()*t;e.skip+=n}this._loadViewportParams=e}_processItems(){let e=super._processItems.apply(this,arguments);if(this.option(Le)===!1){let t=this._dataSource,n=t?.lastLoadOptions().skip??0,o,s,r,a=!1,l=[];e.forEach(d=>{let{rowType:c}=d,h=mf(d,t),p=c==="group"&&(o||h||s!=="group"&&n>0),g=c==="data"&&h&&(o||s!=="group");!d.isNewRow&&f(o)&&(p||g)&&!(r&&!a)&&n++,(p||g)&&(a=!0),d.isNewRow?l.push(d):(l.forEach(C=>{C.loadIndex=n}),l=[]),d.loadIndex=n,o=h,s=c,r=d.isNewRow}),l.forEach(d=>{d.loadIndex=n})}return e}_afterProcessItems(e){if(this._itemCount=e.filter(t=>mf(t,this._dataSource)).length,f(this._loadViewportParams)){this._updateLoadViewportParams();let t=e;if(this._allItems=e,e.length){let{skipForCurrentPage:n}=this.getLoadPageParams(!0),o=e[0].loadIndex+n,{take:s}=this._loadViewportParams;t=e.filter(r=>{let a=r.isNewRow&&r.loadIndex===o&&s===0,l=r.loadIndex>=o,d=r.loadIndex<o+s||a;return l&&d})}return t}return super._afterProcessItems.apply(this,arguments)}_applyChange(e){let t=this,{items:n}=e,{changeType:o}=e,{removeCount:s}=e;if(s){let r=o==="prepend";s=nN(t._items,s,r,(a,l)=>a.rowType==="data"&&!a.isNewRow||a.rowType==="group"&&(t._dataSource.isGroupItemCountable(a.data)||l)),e.removeCount=s}switch(o){case"prepend":t._items.unshift.apply(t._items,n),s&&t._items.splice(-s);break;case"append":t._items.push.apply(t._items,n),s&&t._items.splice(0,s);break;default:super._applyChange(e)}}items(e){return e?this._allItems||this._items:this._visibleItems||this._items}getRowIndexDelta(){let e=0;if(this.option(Le)){let t=this._visibleItems;t&&t[0]&&(e=this._items.indexOf(t[0]))}return e<0?0:e}getRowIndexOffset(e,t){let n=0,o=this.dataSource(),s=this._rowsScrollController,r=this.option(Le)===!1,a=jo(this);if(s&&!e)if(r&&f(this._loadViewportParams)){let{skipForCurrentPage:d,pageIndex:c}=this.getLoadPageParams(!0),h=this.items(!0);if(n=a?c*this.pageSize():0,h.length){let p=h[0].loadIndex;n+=h.filter(g=>g.loadIndex<p+d).length}}else n=s.beginPageIndex()*s.pageSize();else if(a&&r&&o){var l;let d=o.lastLoadOptions();t&&(l=d.skips)!==null&&l!==void 0&&l.length?n=d.skips.reduce((c,h)=>c+h,0):n=d.skip??0}else xn(this)&&o&&(n=o.beginPageIndex()*o.pageSize());return n}getDataIndex(){return this.option(Le)===!1?this.getRowIndexOffset(!0,!0):super.getDataIndex.apply(this,arguments)}viewportSize(){let e=this._rowsScrollController,t=this._dataSource,n=e?.viewportSize.apply(e,arguments);return this.option(Le)===!1?n:t?.viewportSize.apply(t,arguments)}viewportHeight(e,t){var n;(n=this._rowsScrollController)===null||n===void 0||n.viewportHeight(e,t)}viewportItemSize(){let e=this._rowsScrollController,t=this._dataSource,n=e?.viewportItemSize.apply(e,arguments);return this.option(Le)===!1?n:t?.viewportItemSize.apply(t,arguments)}setViewportPosition(){let e=this._rowsScrollController,t=this._dataSource;this._isPaging=!1,e?e.setViewportPosition.apply(e,arguments):t?.setViewportPosition.apply(t,arguments)}setContentItemSizes(e){let t=this._rowsScrollController,n=this._dataSource,o=t?.setContentItemSizes(e);return this.option(Le)===!1?o:n?.setContentItemSizes(e)}getPreloadedRowCount(){let e=this.option("scrolling.preloadedRowCount"),t=this.option("scrolling.preloadEnabled");if(f(e))return e;let n=this.viewportSize();return t?2*n:n}getLoadPageParams(e){var t,n;let o=this.pageSize(),s=this._loadViewportParams,r=(t=this._dataSource)===null||t===void 0?void 0:t.lastLoadOptions(),a=r?.pageIndex||0,l=r?.take||0,d=this._rowsScrollController.isScrollingBack(),c=d?this.getPreloadedRowCount():0,h=d?0:this.getPreloadedRowCount(),p=((n=this._dataSource)===null||n===void 0?void 0:n.totalCountCorrection())||0,g=Math.max(0,s.skip-c),C=e?a:Math.floor(o?g/o:0),v=C*o,b=s.skip-v,T=s.take+b+h-p,G=Math.ceil(o?(e?l:T)/o:0);return{pageIndex:C,loadPageCount:Math.max(1,G),skipForCurrentPage:Math.max(0,b)}}_updateVisiblePageIndex(e){if(!this._rowsScrollController)return;if(f(e)){this._silentOption("paging.pageIndex",e),this.pageChanged.fire();return}let t=this._rowsScrollController.getViewportItemIndex(),n=Math.floor(t/this.pageSize());this.pageIndex()!==n&&(this._silentOption("paging.pageIndex",n),this.updateItems({changeType:"pageIndex"}))}_getChangedLoadParams(){let e=this.getLoadPageParams(!0),{pageIndex:t,loadPageCount:n}=this.getLoadPageParams(),o=this._pageIndexIsValid(t),s=null;return!this._isLoading&&o&&(t!==e.pageIndex||n!==e.loadPageCount)&&(s={pageIndex:t,loadPageCount:n}),s}_pageIndexIsValid(e){let t=!0;return(Is(this)&&this.hasKnownLastPage()||xn(this))&&(t=e*this.pageSize()<this.totalItemsCount()),t}_loadItems(e,t){let n=jo(this),o=this._dataSource,s=this._getChangedLoadParams(),r=o?.loadPageCount()??0,a=this.pageSize()*r,l=o?.pageIndex()??0,d=s?.pageIndex===l,c=Is(this)&&this.totalItemsCount()<a,h=this.option("editing.refreshMode")==="repaint",p=s?.pageIndex>l,g=!1;if(!o||n&&e&&(h&&t||p||d&&c))return g;if(n&&this._isLoading&&(this._needUpdateViewportAfterLoading=!0),n&&s){g=!0,o.pageIndex(s.pageIndex),o.loadPageCount(s.loadPageCount),this._repaintChangesOnly=!0,this._needUpdateDimensions=!0;let C=this._viewportChanging;this.load().always(()=>{this._repaintChangesOnly=void 0,this._needUpdateDimensions=void 0}).done(()=>{let v=this.pageCount()>0&&this.pageIndex()===this.pageCount()-1;(C||v)&&this._updateVisiblePageIndex(),this._needUpdateViewportAfterLoading&&(this._needUpdateViewportAfterLoading=!1,this.loadViewport({checkLoadedParamsOnly:!0}))})}return g}loadViewport(e){let{checkLoadedParamsOnly:t,checkLoading:n,viewportIsNotFilled:o}=e??{};if(jo(this)||R.isVirtualRowRendering(this)){var r;this._updateLoadViewportParams();let l=this._loadItems(n,!o),d=(r=this._dataSource)===null||r===void 0?void 0:r.isCustomLoading(),c=n&&!d&&this._isLoading;if(!(l||c||t)){var a;let p=!((a=this._editingController)!==null&&a!==void 0&&(a=a.getChanges())!==null&&a!==void 0&&a.length);this.updateItems({repaintChangesOnly:!0,needUpdateDimensions:!0,useProcessedItemsCache:p,cancelEmptyChanges:!0})}}}updateViewport(){var e;let t=this.viewportSize(),n=this.items().length,o=t>n,s=((e=this._loadViewportParams)===null||e===void 0?void 0:e.take)??0,r=this._rowsScrollController,a=r?.getViewportParams().take;(o||s<a)&&!this._isPaging&&n&&this.loadViewport({checkLoading:!0,viewportIsNotFilled:o})}loadIfNeed(){if(this.option(Le)===!1)return;let e=this._rowsScrollController;e&&e.loadIfNeed();let t=this._dataSource;return t&&t.loadIfNeed()}getItemSize(){let e=this._rowsScrollController;if(e)return e.getItemSize.apply(e,arguments);let t=this._dataSource;return t&&t.getItemSize.apply(t,arguments)}getItemSizes(){let e=this._rowsScrollController;if(e)return e.getItemSizes.apply(e,arguments);let t=this._dataSource;return t&&t.getItemSizes.apply(t,arguments)}getContentOffset(){let e=this._rowsScrollController;if(e)return e.getContentOffset.apply(e,arguments);let t=this._dataSource;return t&&t.getContentOffset.apply(t,arguments)}refresh(e){let t=this._dataSource;return t&&e&&e.load&&Is(this)&&t.resetCurrentTotalCount(),super.refresh.apply(this,arguments)}topItemIndex(){var e;return(e=this._loadViewportParams)===null||e===void 0?void 0:e.skip}bottomItemIndex(){let e=this._loadViewportParams;return e&&e.skip+e.take}virtualItemsCount(){let e=this._rowsScrollController;if(e)return e.virtualItemsCount.apply(e,arguments);let t=this._dataSource;return t?.virtualItemsCount.apply(t,arguments)}pageIndex(e){let t=jo(this),n=this._rowsScrollController;return this.option(Le)===!1&&t&&n&&e===void 0?this.option("paging.pageIndex")??0:super.pageIndex.apply(this,arguments)}_fireChanged(e){super._fireChanged.apply(this,arguments);let{operationTypes:t}=e;if(this.option(Le)===!1&&jo(this)&&t){let{fullReload:n,pageIndex:o}=t;e.isDataChanged&&!n&&o&&this._updateVisiblePageIndex(this._dataSource.pageIndex())}}_getPagingOptionValue(e){let t=super._getPagingOptionValue.apply(this,arguments);return this.option(Le)===!1&&jo(this)&&(t=this[e]()),t}isEmpty(){return this.option(Le)===!1?!this.items(!0).length:super.isEmpty.apply(this,arguments)}isLastPageLoaded(){let e=!1;if(this.option(Le)===!1&&jo(this)){let{pageIndex:t,loadPageCount:n}=this.getLoadPageParams(!0),o=this.pageCount();e=t+n>=o}else e=super.isLastPageLoaded.apply(this,arguments);return e}reset(){this._itemCount=0,this._allItems=null,super.reset.apply(this,arguments)}_applyFilter(){var e;return(e=this._dataSource)===null||e===void 0||e.loadPageCount(1),super._applyFilter.apply(this,arguments)}getVirtualContentSize(){var e;return(e=this._dataSource)===null||e===void 0?void 0:e.getVirtualContentSize.apply(this._dataSource,arguments)}setViewportItemIndex(){var e;return(e=this._dataSource)===null||e===void 0?void 0:e.setViewportItemIndex.apply(this._dataSource,arguments)}},qQ=i=>class extends i{dispose(){super.dispose.apply(this,arguments),clearTimeout(this._resizeTimeout)}_updateMasterDataGridCore(e){return P(super._updateMasterDataGridCore.apply(this,arguments)).done(t=>{let n=xn(e)&&e.option(Le)===!1;!t&&n&&e.getScrollable()&&e.updateDimensions()})}hasResizeTimeout(){return!!this._resizeTimeout}resize(){let e;if(xn(this)||R.isVirtualRowRendering(this)){clearTimeout(this._resizeTimeout),this._resizeTimeout=null;let t=new Date-this._lastTime,n=this.option("scrolling.updateTimeout");this._lastTime&&t<n?(e=new y,this._resizeTimeout=setTimeout(()=>{this._resizeTimeout=null,super.resize.apply(this).done(e.resolve).fail(e.reject),this._lastTime=new Date},n),this._lastTime=new Date):(e=super.resize.apply(this),this._dataController.isLoaded()&&(this._lastTime=new Date))}else e=super.resize.apply(this);return e}},YQ=i=>class extends i{init(){var e;super.init(),this._dataController.pageChanged.add(t=>{let n=this._scrollTop;this.scrollToPage(t??this._dataController.pageIndex()),this.option(Le)===!1&&this._scrollTop===n&&this._dataController.updateViewport()}),this._dataController.dataSourceChanged.add(()=>{!this._scrollTop&&this._scrollToCurrentPageOnResize()}),(e=this._dataController.stateLoaded)===null||e===void 0||e.add(()=>{this._scrollToCurrentPageOnResize()}),this._scrollToCurrentPageOnResize()}dispose(){clearTimeout(this._scrollTimeoutID),super.dispose()}_scrollToCurrentPageOnResize(){if(this._dataController.pageIndex()>0){let e=()=>{this.resizeCompleted.remove(e),this.scrollToPage(this._dataController.pageIndex())};this.resizeCompleted.add(e)}}scrollToPage(e){let t=this._dataController?this._dataController.pageSize():0,n;if(xn(this)||Is(this)){let o=this._dataController.getItemSize(),s=this._dataController.getItemSizes(),r=e*t;n=r*o;for(let a in s)parseInt(a)<r&&(n+=s[a]-o)}else n=0;this.scrollTo({y:n,x:this._scrollLeft})}renderDelayedTemplates(){this.waitAsyncTemplates().done(()=>{this._updateContentPosition(!0)}),super.renderDelayedTemplates.apply(this,arguments)}_renderCore(e){let t=new Date,n=super._renderCore.apply(this,arguments),o=this._dataController._dataSource;if(o&&e){let s=e.items?e.items.length:20,r=this._dataController.viewportSize()||20;R.isVirtualRowRendering(this)&&s>0&&this.option(Le)!==!1?o._renderTime=(new Date-t)*r/s:o._renderTime=new Date-t}return n}_getRowElements(e){let t=super._getRowElements(e);return t&&t.not(".dx-virtual-row")}_removeRowsElements(e,t,n){let o=this._getRowElements(e).toArray();n==="append"?o=o.slice(0,t):o=o.slice(-t),o.map(s=>{let r=u(s);this._errorHandlingController&&this._errorHandlingController.removeErrorRow(r.next()),r.remove()})}_updateContent(e,t){let n,o=this._findContentElement(),s=t&&t.changeType,r=y(),a=o.children().first();return s==="append"||s==="prepend"?this.waitAsyncTemplates().done(()=>{let l=this._getBodies(e);l.length===1?this._getBodies(a)[s==="append"?"append":"prepend"](l.children()):l[s==="append"?"appendTo":"prependTo"](a),e.remove(),n=this._getFreeSpaceRowElements(a),oN(n,sN),t.removeCount&&this._removeRowsElements(a,t.removeCount,s),this._restoreErrorRow(a),r.resolve()}).fail(r.reject):super._updateContent.apply(this,arguments).done(()=>{s==="update"&&this._restoreErrorRow(a),r.resolve()}).fail(r.reject),r.promise().done(()=>{this._updateBottomLoading()})}_addVirtualRow(e,t,n,o){if(!o)return;let s=this._createEmptyRow("dx-virtual-row",t,o);s=this._wrapRowIfNeed(e,s),this._appendEmptyRow(e,s,n)}_updateContentItemSizes(){let e=this._getRowHeights(),t=this._correctRowHeights(e);this._dataController.setContentItemSizes(t)}_updateViewportSize(e,t){f(e)||(e=this._hasHeight?ee(this.element()):ee(q())),this._dataController.viewportHeight(e,t)}_getRowHeights(){var e,t;let n=(e=this._editingController)===null||e===void 0||(t=e.isPopupEditMode)===null||t===void 0?void 0:t.call(e),o=this._getRowElements(this._tableElement).toArray();return n&&(o=o.filter(s=>!u(s).hasClass(GQ))),o.map(s=>Pe(s).height)}_correctRowHeights(e){let t=this._dataController,n=t._dataSource,o=[],s=t.getVisibleRows(),r=0,a=!0,l=-1;for(let d=0;d<e.length;d++){let c=s[d];f(c)&&(this.option(Le)===!1?(l>=0&&l!==c.loadIndex&&(o.push(r),r=0),l=c.loadIndex):mf(c,n)&&(a?a=!1:(o.push(r),r=0)),r+=e[d])}return r>0&&o.push(r),o}_updateContentPosition(e){let t=this._rowHeight||20;if(this._dataController.viewportItemSize(t),xn(this)||R.isVirtualRowRendering(this)){if(this._dataController.isEmpty())return;e||this._updateContentItemSizes();let o=this._dataController.getContentOffset("begin"),s=this._dataController.getContentOffset("end"),r=this.getTableElements(),a=r.children("tbody").children(".dx-virtual-row");oN(a,"dx-virtual-row"),r.each((l,d)=>{let c=l>0,h=this._isFixedTableRendering;this._isFixedTableRendering=c,this._addVirtualRow(u(d),c,"top",o),this._addVirtualRow(u(d),c,"bottom",s),this._isFixedTableRendering=h})}}_isTableLinesDisplaysCorrect(e){return e.find(".dx-column-lines").length>0===this.option("showColumnLines")}_isColumnElementsEqual(e,t){let n=e.length===t.length;return n&&x(e,(o,s)=>{if(s.style.width!==t[o].style.width)return n=!1,n}),n}_getCellClasses(e){let t=[],{cssClass:n}=e,o=e.command==="expand";return n&&t.push(n),o&&t.push(this.addWidgetPrefix("group-space")),t}_findBottomLoadPanel(e){let t=e||this.element(),n=t&&t.find(`.${this.addWidgetPrefix("bottom-load-panel")}`);if(n&&n.length)return n}_updateBottomLoading(){let e=this,t=xn(this),n=Is(this),o=!e._dataController.hasKnownLastPage()&&e._dataController.isLoaded()&&(t||n),s=e._findContentElement(),r=e._findBottomLoadPanel(s);o?r||u("<div>").addClass(e.addWidgetPrefix("bottom-load-panel")).append(e._createComponent(u("<div>"),bi,{elementAttr:{role:null,"aria-label":null}}).$element()).appendTo(s):r&&r.remove()}_handleScroll(e){let t=this.option(Le)===!0,n=e.scrollOffset.top===0,s=this._scrollTop!==e.scrollOffset.top||e.forceUpdateScrollPosition,r=this._hasHeight||!t&&n;s&&r&&this._rowHeight&&(this._scrollTop=e.scrollOffset.top,(xn(this)||this.option("scrolling.rowRenderingMode")!=="standard")&&this.option(Le)===!1&&(this._updateContentItemSizes(),this._updateViewportSize(null,this._scrollTop)),this._dataController.setViewportPosition(e.scrollOffset.top)),super._handleScroll.apply(this,arguments)}_needUpdateRowHeight(e){return super._needUpdateRowHeight.apply(this,arguments)||e>0&&Is(this)&&!R.isVirtualRowRendering(this)}_updateRowHeight(){if(super._updateRowHeight.apply(this,arguments),this._rowHeight){this._updateContentPosition();let e=this._hasHeight?ee(this.element()):ee(q());this.option(Le)===!1?(this._updateViewportSize(e),this._dataController.updateViewport()):this._dataController.viewportSize(Math.ceil(e/this._rowHeight))}}updateFreeSpaceRowHeight(){let e=super.updateFreeSpaceRowHeight.apply(this,arguments);return e&&this._updateContentPosition(),e}setLoading(e,t){let n=this._dataController,o=n.pageIndex()>0&&n.isLoaded()&&!!this._findBottomLoadPanel();this.option(Le)===!1&&e&&n.isViewportChanging()||(o&&(e=!1),super.setLoading.call(this,e,t))}throwHeightWarningIfNeed(){if(this._hasHeight===void 0)return;!this._hasHeight&&jo(this)&&!this._heightWarningIsThrown&&(this._heightWarningIsThrown=!0,ie.log("W1025"))}_resizeCore(){let e=this,t=e.element();super._resizeCore(),this.throwHeightWarningIfNeed(),e.component.$element()&&!e._windowScroll&&ls(t)&&(e._windowScroll=p0(t,n=>{!e._hasHeight&&e._rowHeight&&e._dataController.setViewportPosition(n)},e.component.$element()),e.on("disposing",()=>{e._windowScroll.dispose()})),this.option(Le)!==!1&&e.loadIfNeed()}loadIfNeed(){var e,t;(e=this._dataController)===null||e===void 0||(t=e.loadIfNeed)===null||t===void 0||t.call(e)}_restoreErrorRow(e){if(this.option(Le)===!1){var t;(t=this._errorHandlingController)===null||t===void 0||t.removeErrorRow()}super._restoreErrorRow.apply(this,arguments)}},aN={defaultOptions:()=>({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:{controllers:{data:UQ,resizing:qQ},views:{rowsView:YQ}}};$.registerModule("virtualScrolling",aN);ea.extend(rN);var Nd=(i,e)=>{let t=u(q()),{top:n}=i.offset(),o;if(Oe(e)){if(e<n)return n-e;o=_a(t)-e+t.scrollTop()}else{let s=n-t.scrollTop(),r=_a(t)-s-ee(i);o=Math.max(s,r)}return .9*o};var m0=class extends Kg{_getDefaultOptions(){return m(super._getDefaultOptions(),{orientation:"horizontal",tabIndex:null,onHoverStart:E})}_initDataAdapter(){this._dataAdapter=this.option("_dataAdapter"),this._dataAdapter||super._initDataAdapter()}_renderContentImpl(){this._renderContextMenuOverlay(),super._renderContentImpl();let e=this._dataAdapter.getNodeByKey(this.option("_parentKey"));e&&this._renderItems(this._getChildNodes(e)),this._renderDelimiter()}_renderDelimiter(){this.$contentDelimiter=u("<div>").appendTo(this._itemContainer()).addClass("dx-context-menu-content-delimiter")}_getOverlayOptions(){return m(!0,super._getOverlayOptions(),{onPositioned:this._overlayPositionedActionHandler.bind(this),position:{precise:!0}})}_overlayPositionedActionHandler(e){this._showDelimiter(e)}_hoverEndHandler(e){super._hoverEndHandler(e),this._toggleFocusClass(!1,e.currentTarget)}_isMenuHorizontal(){return this.option("orientation")==="horizontal"}_hoverStartHandler(e){this.option("onHoverStart")(e),super._hoverStartHandler(e),this._toggleFocusClass(!0,e.currentTarget)}_drawSubmenu(e){this._actions.onShowing({rootItem:H(e),submenu:this}),super._drawSubmenu(e),this._actions.onShown({rootItem:H(e),submenu:this})}_hideSubmenu(e){this._actions.onHiding({cancel:!0,rootItem:H(e),submenu:this}),super._hideSubmenu(e),this._actions.onHidden({rootItem:H(e),submenu:this})}_showDelimiter(e){if(!this.$contentDelimiter)return;let t=this._itemContainer().children(".dx-submenu").eq(0),n=this.option("position").of.find(".dx-context-menu-container-border"),o={of:t,precise:!0},s=e.position,r=s.v.location,a=s.h.location,l=n.offset(),d=Math.round(l.left),c=Math.round(l.top),h=W(n),p=Q(n),g=W(t),C=Q(t);this.$contentDelimiter.css("display","block"),is(this.$contentDelimiter,this._isMenuHorizontal()?h<g?h:g:3),Bi(this.$contentDelimiter,this._isMenuHorizontal()?3:p<C?p:C),this._isMenuHorizontal()?r>c?Math.round(a)===d?(o.offset="0 -2.5",o.at=o.my="left top"):(o.offset="0 -2.5",o.at=o.my="right top"):(Bi(this.$contentDelimiter,5),Math.round(a)===d?(o.offset="0 5",o.at=o.my="left bottom"):(o.offset="0 5",o.at=o.my="right bottom")):a>d?Math.round(r)===c?(o.offset="-2.5 0",o.at=o.my="left top"):(o.offset="-2.5 0",o.at=o.my="left bottom"):Math.round(r)===c?(o.offset="2.5 0",o.at=o.my="right top"):(o.offset="2.5 0",o.at=o.my="right bottom"),xt.setup(this.$contentDelimiter,o)}_getContextMenuPosition(){return this.option("position")}isOverlayVisible(){return this._overlay.option("visible")}getOverlayContent(){return this._overlay.$content()}},ff=m0;var _f="dx-menu-adaptive-mode";var XQ=`${_f}-overlay-wrapper`;var QQ={show:50,hide:300},lN=["onSubmenuShowing","onSubmenuShown","onSubmenuHiding","onSubmenuHidden","onItemContextMenu","onItemClick","onSelectionChanged","onItemRendered"],Cf=class extends Gg{_getDefaultOptions(){return m(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(),m(this._optionsByReference,{animation:!0,selectedItem:!0})}_itemElements(){let e=super._itemElements(),t=this._submenuItemElements();return e.add(t)}_submenuItemElements(){let e=[],t=this._submenus.length&&this._submenus[0];return t&&t.itemsContainer()&&(e=t.itemsContainer().find(".dx-menu-item")),e}_focusTarget(){return this.$element()}_isMenuHorizontal(){return this.option("orientation")==="horizontal"}_moveFocus(e){let t=this._getAvailableItems(),n=this._isMenuHorizontal(),o=this._getActiveItem(!0),s,r,a,l;switch(e){case"up":r=n?"showSubmenu":this._getItemsNavigationOperation("prevItem"),s=n?o:t,a=this._getKeyboardNavigationAction(r,s),l=a();break;case"down":r=n?"showSubmenu":this._getItemsNavigationOperation("nextItem"),s=n?o:t,a=this._getKeyboardNavigationAction(r,s),l=a();break;case"right":r=n?this._getItemsNavigationOperation("nextItem"):"showSubmenu",s=n?t:o,a=this._getKeyboardNavigationAction(r,s),l=a();break;case"left":r=n?this._getItemsNavigationOperation("prevItem"):"showSubmenu",s=n?t:o,a=this._getKeyboardNavigationAction(r,s),l=a();break;default:return super._moveFocus(e)}l&&l.length!==0&&this.option("focusedElement",H(l))}_getItemsNavigationOperation(e){let t=e;return this.option("rtlEnabled")&&(t=e==="prevItem"?"nextItem":"prevItem"),t}_getKeyboardNavigationAction(e,t){let n=E;switch(e){case"showSubmenu":t.hasClass("dx-state-disabled")||(n=this._showSubmenu.bind(this,t));break;case"nextItem":n=this._nextItem.bind(this,t);break;case"prevItem":n=this._prevItem.bind(this,t)}return n}_clean(){super._clean(),this.option("templatesRenderAsynchronously")&&clearTimeout(this._resizeEventTimer)}_visibilityChanged(e){e&&(this._menuItemsWidth||this._updateItemsWidthCache(),this._dimensionChanged())}_isAdaptivityEnabled(){return this.option("adaptivityEnabled")&&this.option("orientation")==="horizontal"}_updateItemsWidthCache(){let e=this.$element().find("ul").first().children("li").children(".dx-menu-item");this._menuItemsWidth=this._getSummaryItemsSize("width",e,!0)}_dimensionChanged(){if(!this._isAdaptivityEnabled())return;let e=ae(this.$element());this._toggleAdaptiveMode(this._menuItemsWidth>e)}_init(){super._init(),this._submenus=[]}_initActions(){this._actions={},x(lN,(e,t)=>{this._actions[t]=this._createActionByOption(t)})}_initMarkup(){this._visibleSubmenu=null,this.$element().addClass("dx-menu"),super._initMarkup(),this._addCustomCssClass(this.$element()),this.setAria("role","menubar")}_render(){super._render(),this._initAdaptivity()}_isTargetOutOfComponent(e){let t=u(e).closest(".dx-menu").length!==0,n=u(e).closest(".dx-context-menu").length!==0;return!(t||n)}_focusOutHandler(e){let{relatedTarget:t}=e;t&&this._isTargetOutOfComponent(t)&&this._hideVisibleSubmenu(),super._focusOutHandler(e)}_renderHamburgerButton(){return this._hamburger=new _t(u("<div>").addClass("dx-menu-hamburger-button"),{icon:"menu",activeStateEnabled:!1,onClick:this._toggleTreeView.bind(this)}),this._hamburger.$element()}_toggleTreeView(e){X(e)&&(e=!this._overlay.option("visible")),this._overlay.option("visible",e),e&&this._treeView.focus(),this._toggleHamburgerActiveState(e)}_toggleHamburgerActiveState(e){this._hamburger&&this._hamburger.$element().toggleClass("dx-state-active",e)}_toggleAdaptiveMode(e){let t=this.$element().find(".dx-menu-horizontal"),n=this.$element().find(`.${_f}`);e?this._hideVisibleSubmenu():(this._treeView&&this._treeView.collapseAll(),this._overlay&&this._toggleTreeView(e)),t.toggle(!e),n.toggle(e)}_removeAdaptivity(){this._$adaptiveContainer&&(this._toggleAdaptiveMode(!1),this._$adaptiveContainer.remove(),this._$adaptiveContainer=null,this._treeView=null,this._hamburger=null,this._overlay=null)}_treeviewItemClickHandler(e){this._actions.onItemClick(e),e.node.children.length||this._toggleTreeView(!1)}_getAdaptiveOverlayOptions(){let t=this.option("rtlEnabled")?"right":"left";return{_ignoreFunctionValueDeprecation:!0,maxHeight:()=>Nd(this.$element()),deferRendering:!1,shading:!1,animation:!1,hideOnParentScroll:!0,onHidden:()=>{this._toggleHamburgerActiveState(!1)},height:"auto",hideOnOutsideClick:n=>!u(n.target).closest(".dx-menu-hamburger-button").length,position:{collision:"flipfit",at:`bottom ${t}`,my:`top ${t}`,of:this._hamburger.$element()}}}_getTreeViewOptions(){let e={};return x(["rtlEnabled","width","accessKey","activeStateEnabled","animation","dataSource","disabled","displayExpr","displayExpr","focusStateEnabled","hint","hoverStateEnabled","itemsExpr","items","itemTemplate","selectedExpr","selectionMode","tabIndex","visible"],(t,n)=>{e[n]=this.option(n)}),x(["onItemContextMenu","onSelectionChanged","onItemRendered"],(t,n)=>{e[n]=o=>{this._actions[n](o)}}),m(e,{dataSource:this.getDataSource(),animationEnabled:!!this.option("animation"),onItemClick:this._treeviewItemClickHandler.bind(this),onItemExpanded:t=>{this._overlay.repaint(),this._actions.onSubmenuShown(t)},onItemCollapsed:t=>{this._overlay.repaint(),this._actions.onSubmenuHidden(t)},selectNodesRecursive:!1,selectByClick:this.option("selectByClick"),expandEvent:"click",_supportItemUrl:!0})}_initAdaptivity(){if(!this._isAdaptivityEnabled())return;this._$adaptiveContainer=u("<div>").addClass(_f);let e=this._renderHamburgerButton();this._treeView=this._createComponent(u("<div>"),vs,this._getTreeViewOptions()),this._overlay=this._createComponent(u("<div>"),nn,this._getAdaptiveOverlayOptions()),this._overlay.$content().append(this._treeView.$element()).addClass(_f).addClass(this.option("cssClass")),this._overlay.$wrapper().addClass(XQ),this._$adaptiveContainer.append(e),this._$adaptiveContainer.append(this._overlay.$element()),this.$element().append(this._$adaptiveContainer),this._updateItemsWidthCache(),this._dimensionChanged()}_getDelay(e){let{delay:t}=this.option("showFirstSubmenuMode");return f(t)?z(t)?t[e]:t:QQ[e]}_keyboardHandler(e){return super._keyboardHandler(e,!!this._visibleSubmenu)}_renderContainer(){let e=u("<div>");return e.appendTo(this.$element()).addClass(this._isMenuHorizontal()?"dx-menu-horizontal":"dx-menu-vertical"),super._renderContainer(e)}_renderSubmenuItems(e,t){let n=this._createSubmenu(e,t);return this._submenus.push(n),this._renderBorderElement(t),n}_getKeyboardListeners(){return super._getKeyboardListeners().concat(this._visibleSubmenu)}_createSubmenu(e,t){let n=u("<div>").addClass("dx-context-menu").appendTo(t),o=this._getChildNodes(e),s=this._createComponent(n,ff,m(this._getSubmenuOptions(),{_dataAdapter:this._dataAdapter,_parentKey:e.internalFields.key,items:o,onHoverStart:this._clearTimeouts.bind(this),position:this.getSubmenuPosition(t)}));return this._attachSubmenuHandlers(t,s),s}_getSubmenuOptions(){let e=u("<div>"),t=this._isMenuHorizontal();return{itemTemplate:this.option("itemTemplate"),target:e,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:t?null:this._moveMainMenuFocus.bind(this,"prevItem"),onLeftLastItem:t?null:this._moveMainMenuFocus.bind(this,"nextItem"),onCloseRootSubmenu:this._moveMainMenuFocus.bind(this,t?"prevItem":null),onExpandLastSubmenu:t?this._moveMainMenuFocus.bind(this,"nextItem"):null}}_getShowFirstSubmenuMode(){if(!this._isDesktopDevice())return"onClick";let e=this.option("showFirstSubmenuMode");return z(e)?e.name:e}_moveMainMenuFocus(e){let t=this._getAvailableItems(),n=t.length,o=t.filter(".dx-menu-item-expanded").eq(0),s=t.index(o);this._hideSubmenu(this._visibleSubmenu),s+=e==="prevItem"?-1:1,s>=n?s=0:s<0&&(s=n-1);let r=t.eq(s);this.option("focusedElement",H(r))}_nestedItemOnSelectionChangedHandler(e){let t=e.addedItems.length&&e.addedItems[0],n=ff.getInstance(e.element),{onSelectionChanged:o}=this._actions;o(e),t&&this._clearSelectionInSubmenus(t[0],n),this._clearRootSelection(),this._setOptionWithoutOptionChange("selectedItem",t)}_clearSelectionInSubmenus(e,t){let n=!arguments.length;x(this._submenus,(o,s)=>{let r=s._itemContainer(),a=!r.is(t&&t._itemContainer()),l=r.find(`.${this._selectedItemClass()}`);if(a&&l.length||n){l.removeClass(this._selectedItemClass());let d=this._getItemData(l);d&&(d.selected=!1),s._clearSelectedItems()}})}_clearRootSelection(){let e=this.$element().find(".dx-menu-items-container").first().children().children().filter(`.${this._selectedItemClass()}`);if(e.length){let t=this._getItemData(e);t.selected=!1,e.removeClass(this._selectedItemClass())}}_nestedItemOnItemClickHandler(e){this._actions.onItemClick(e)}_nestedItemOnItemRenderedHandler(e){this._actions.onItemRendered(e)}_attachSubmenuHandlers(e,t){let o=t.getOverlayContent().find(".dx-submenu"),s=D(Hr,`${this.NAME}_submenu`);t.option({onShowing:this._submenuOnShowingHandler.bind(this,e,t),onShown:this._submenuOnShownHandler.bind(this,e,t),onHiding:this._submenuOnHidingHandler.bind(this,e,t),onHidden:this._submenuOnHiddenHandler.bind(this,e,t)}),x(o,(r,a)=>{_.off(a,s),_.on(a,s,null,this._submenuMouseLeaveHandler.bind(this,e))})}_submenuOnShowingHandler(e,t,n){let{rootItem:o}=n,s=e.children(".dx-context-menu-container-border"),r=this._getVisibilityChangeEventParams(o,t,e);this._actions.onSubmenuShowing(r),s.show(),e.addClass("dx-menu-item-expanded")}_submenuOnShownHandler(e,t,n){let{rootItem:o}=n,s=this._getVisibilityChangeEventParams(o,t,e);this._actions.onSubmenuShown(s)}_submenuOnHidingHandler(e,t,n){let o=e.children(".dx-context-menu-container-border"),s=this._getVisibilityChangeEventParams(n.rootItem,t,e,!0);n.itemData=s.itemData,n.rootItem=s.rootItem,n.submenuContainer=s.submenuContainer,n.submenu=s.submenu,this._actions.onSubmenuHiding(n),n.cancel||(this._visibleSubmenu===t&&(this._visibleSubmenu=null),o.hide(),e.removeClass("dx-menu-item-expanded"))}_submenuOnHiddenHandler(e,t,n){let{rootItem:o}=n,s=this._getVisibilityChangeEventParams(o,t,e,!0);this._actions.onSubmenuHidden(s)}_getVisibilityChangeEventParams(e,t,n,o){let s,r;if(e){let a=o?u(e).closest(".dx-menu-item")[0]:e;s=this._getItemData(a),r=u(a).find(".dx-submenu").first()}else{let a=u(t._overlay.content());s=this._getItemData(n),r=a.find(".dx-submenu").first()}return{itemData:s,rootItem:H(n),submenuContainer:H(r),submenu:t}}_submenuMouseLeaveHandler(e,t){let n=u(t.relatedTarget).parents(".dx-context-menu")[0],o=this._getSubmenuByRootElement(e).getOverlayContent()[0];this.option("hideSubmenuOnMouseLeave")&&n!==o&&(this._clearTimeouts(),setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide")))}_hideSubmenuAfterTimeout(){if(!this._visibleSubmenu)return;let e=u(this._visibleSubmenu.$element().context).hasClass("dx-state-hover"),t=this._visibleSubmenu.getOverlayContent().find(".dx-state-hover").length;!this._visibleSubmenu.getOverlayContent().get(0).querySelector(":hover")&&!t&&!e&&this._visibleSubmenu.hide()}_getSubmenuByRootElement(e){if(!e)return!1;let t=e.children(".dx-context-menu");return t.length&&ff.getInstance(t)}getSubmenuPosition(e){let t=this._isMenuHorizontal(),n=this.option("submenuDirection").toLowerCase(),o=this.option("rtlEnabled"),s={collision:"flip",of:e,precise:!0};switch(n){case"leftortop":s.at="left top",s.my=t?"left bottom":"right top";break;case"rightorbottom":s.at=t?"left bottom":"right top",s.my="left top";break;default:t?(s.at=o?"right bottom":"left bottom",s.my=o?"right top":"left top"):(s.at=o?"left top":"right top",s.my=o?"right top":"left top")}return s}_renderBorderElement(e){u("<div>").appendTo(e).addClass("dx-context-menu-container-border").hide()}_itemPointerDownHandler(e){if(u(e.target).closest(this._itemElements()).hasClass("dx-menu-item-has-submenu")){this.option("focusedElement",null);return}super._itemPointerDownHandler(e)}_hoverStartHandler(e){let t=D(le.move,this.NAME),n=this._getItemElementByEventArgs(e),o=this._dataAdapter.getNodeByItem(this._getItemData(n)),s=f(e.buttons)&&e.buttons===1||!f(e.buttons)&&e.which===1;if(!this._isItemDisabled(n)){if(_.off(n,t),!this._hasChildren(o)){this._showSubmenuTimer=setTimeout(this._hideSubmenuAfterTimeout.bind(this),this._getDelay("hide"));return}if(this._getShowFirstSubmenuMode()==="onHover"&&!s){let r=this._getSubmenuByElement(n);this._clearTimeouts(),r.isOverlayVisible()||(_.on(n,t,this._itemMouseMoveHandler.bind(this)),this._showSubmenuTimer=this._getDelay("hide"))}}}_hoverEndHandler(e){let t=this._getItemElementByEventArgs(e),n=u(e.relatedTarget);super._hoverEndHandler(e),this._clearTimeouts(),!this._isItemDisabled(t)&&(n.hasClass("dx-context-menu-content-delimiter")||this.option("hideSubmenuOnMouseLeave")&&!n.hasClass("dx-menu-items-container")&&(this._hideSubmenuTimer=setTimeout(()=>{this._hideSubmenuAfterTimeout()},this._getDelay("hide"))))}_hideVisibleSubmenu(){return this._visibleSubmenu?(this._hideSubmenu(this._visibleSubmenu),!0):!1}_showSubmenu(e){let t=this._getSubmenuByElement(e);this._visibleSubmenu!==t&&this._hideVisibleSubmenu(),t&&(this._clearTimeouts(),this.focus(),t.show(),this.option("focusedElement",t.option("focusedElement"))),this._visibleSubmenu=t,this._hoveredRootItem=e}_hideSubmenu(e){e&&e.hide(),this._visibleSubmenu===e&&(this._visibleSubmenu=null),this._hoveredRootItem=null}_itemMouseMoveHandler(e){if(e.pointers&&e.pointers.length)return;let t=u(e.currentTarget);f(this._showSubmenuTimer)&&(this._clearTimeouts(),this._showSubmenuTimer=setTimeout(()=>{let n=this._getSubmenuByElement(t);n&&!n.isOverlayVisible()&&this._showSubmenu(t)},this._getDelay("show")))}_clearTimeouts(){clearTimeout(this._hideSubmenuTimer),clearTimeout(this._showSubmenuTimer)}_getSubmenuByElement(e,t){let n=this._getSubmenuByRootElement(e);if(n)return n;t=t??this._getItemData(e);let o=this._dataAdapter.getNodeByItem(t);return this._hasChildren(o)&&this._renderSubmenuItems(o,e)}_updateSubmenuVisibilityOnClick(e){let t=e.args.length&&e.args[0];if(!t||this._disabledGetter(t.itemData))return;let n=u(t.itemElement),o=this._getSubmenuByElement(n,t.itemData);if(this._updateSelectedItemOnClick(e),this._visibleSubmenu){if(this._visibleSubmenu===o){this.option("showFirstSubmenuMode")==="onClick"&&this._hideSubmenu(this._visibleSubmenu);return}this._hideSubmenu(this._visibleSubmenu)}o&&(o.isOverlayVisible()||this._showSubmenu(n))}_optionChanged(e){if(lN.includes(e.name)){this._initActions();return}switch(e.name){case"orientation":case"submenuDirection":this._invalidate();break;case"showFirstSubmenuMode":case"hideSubmenuOnMouseLeave":break;case"showSubmenuMode":this._changeSubmenusOption(e.name,e.value);break;case"adaptivityEnabled":e.value?this._initAdaptivity():this._removeAdaptivity();break;case"width":this._isAdaptivityEnabled()&&(this._treeView.option(e.name,e.value),this._overlay.option(e.name,e.value)),super._optionChanged(e),this._dimensionChanged();break;case"animation":this._isAdaptivityEnabled()&&this._treeView.option("animationEnabled",!!e.value),super._optionChanged(e);break;default:this._isAdaptivityEnabled()&&(e.name===e.fullName||e.name==="items")&&this._treeView.option(e.fullName,e.value),super._optionChanged(e)}}_changeSubmenusOption(e,t){x(this._submenus,(n,o)=>{o.option(e,t)})}selectItem(e){this._hideSubmenu(this._visibleSubmenu),super.selectItem(e)}unselectItem(e){this._hideSubmenu(this._visibleSubmenu),super.unselectItem(e)}};K("dxMenu",Cf);var dN=Cf;var f0=dN;var _0={"=":"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"},cN={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",between:"between"};var ZQ="dx-filter-menu";var nh="input:not([type='hidden'])",JQ=["date","datetime","number"],e8=O.format("dxDataGrid-ariaSearchBox");function Hd(i){return i.option("filterRow.applyFilter")==="onClick"}var C0=function(i){let e=i&&i.children(),t=e&&e.data("dxComponents"),n=t&&t.length&&e.data(t[0]);return n instanceof vi?n:null},x0=function(i,e){let t="",n="",o=y0(i,e),s=R.getFormatOptionsByColumn(e,"filterRow");return Array.isArray(o)?(t=R.formatValue(o[0],s),n=R.formatValue(o[1],s),n!==""&&(t+=` - ${n}`)):f(o)&&(t=R.formatValue(o,s)),t};function y0(i,e){if(e)return Hd(i)&&e.bufferedFilterValue!==void 0?e.bufferedFilterValue:e.filterValue}var Ds=function(i,e){if(e)return Hd(i)&&e.bufferedSelectedFilterOperation!==void 0?e.bufferedSelectedFilterOperation:e.selectedFilterOperation},t8=function(i,e){return e&&JQ.includes(e.dataType)&&Array.isArray(i)?!1:i!==void 0},v0=function(i,e,t){let n=i._columnsController.columnOption(e),o=y0(i,n),s=t.closest(`.${i.addWidgetPrefix("filter-range-overlay")}`).length,r=t.hasClass(i.addWidgetPrefix("filter-range-start"));return o&&Array.isArray(o)&&Ds(i,n)==="between"?r?o[0]:o[1]:!s&&t8(o,n)?o:null},i8=function(i,e,t,n){if(Ds(i,t)==="between"){let o=y0(i,t);return n.hasClass(i.addWidgetPrefix("filter-range-start"))?[e,Array.isArray(o)?o[1]:void 0]:[Array.isArray(o)?o[0]:o,e]}return e},n8=function(i,e){let t=e.value===""?null:e.value,n=e.container,o=i._columnsController.columnOption(e.column.index),s=v0(i,o.index,n);if(!f(s)&&!f(t))return;i._applyFilterViewController.setHighLight(n,s!==t);let r=Hd(i)?"bufferedFilterValue":"filterValue",a=i8(i,t,o,n),l=Ds(i,o)==="between",d=e.notFireEvent||l&&Array.isArray(a)&&a.includes(void 0);i._columnsController.columnOption(o.index,r,a,d)},o8=i=>class extends i{init(){super.init(),this._applyFilterViewController=this.getController("applyFilter")}optionChanged(e){switch(e.name){case"filterRow":case"showColumnLines":this._invalidate(!0,!0),e.handled=!0;break;case"syncLookupFilterValues":e.value?this.updateLookupDataSource():this.render(),e.handled=!0;break;default:super.optionChanged(e)}}_updateEditorValue(e,t){let n=C0(t);n&&n.option("value",v0(this,e.index,t))}_columnOptionChanged(e){let t=this,{optionNames:n}=e,o,s,r,a;if(R.checkChanges(n,["filterValue","bufferedFilterValue","selectedFilterOperation","bufferedSelectedFilterOperation","filterValues","filterType"])&&e.columnIndex!==void 0){let l=t._columnsController.getVisibleIndex(e.columnIndex),d=t._columnsController.columnOption(e.columnIndex);if(o=t._getCellElement(t.element().find(`.${t.addWidgetPrefix("filter-row")}`).index(),l)??u(),s=o.find(".dx-editor-container").first(),n.filterValue||n.bufferedFilterValue){t._updateEditorValue(d,s);let c=o.find(`.${t.addWidgetPrefix("filter-range-overlay")}`).data("dxOverlay");c&&(r=c.$content().find(".dx-editor-container"),t._updateEditorValue(d,r.first()),t._updateEditorValue(d,r.last())),(!c||!c.option("visible"))&&t._updateFilterRangeContent(o,x0(t,d))}(n.selectedFilterOperation||n.bufferedSelectedFilterOperation)&&l>=0&&d&&(a=o.find(".dx-menu"),a.length&&(t._updateFilterOperationChooser(a,d,s),Ds(t,d)==="between"?t._renderFilterRangeContent(o,d):s.find(".dx-filter-range-content").length&&(t._renderEditor(s,t._getEditorOptions(s,d)),t._hideFilterRange())));return}super._columnOptionChanged(e)}_renderCore(){return this._filterRangeOverlayInstance=null,super._renderCore.apply(this,arguments)}_resizeCore(){var e;super._resizeCore.apply(this,arguments),(e=this._filterRangeOverlayInstance)===null||e===void 0||e.repaint()}isFilterRowVisible(){return this._isElementVisible(this.option("filterRow"))}isVisible(){return super.isVisible()||this.isFilterRowVisible()}_initFilterRangeOverlay(e,t){let n=this,o={},s=e.find(".dx-editor-container"),r=n.addWidgetPrefix("filter-range-overlay"),a=u("<div>").addClass(r).appendTo(e);return n._createComponent(a,nn,{height:"auto",shading:!1,showTitle:!1,focusStateEnabled:!1,hideOnOutsideClick:!0,wrapperAttr:{class:r},animation:!1,position:{my:"top",at:"top",of:s.length&&s||e,offset:"0 -1"},contentTemplate(l){let d,c=u("<div>").addClass(`dx-editor-container ${n.addWidgetPrefix("filter-range-start")}`).appendTo(l);return t=n._columnsController.columnOption(t.index),d=n._getEditorOptions(c,t),d.sharedData=o,n._renderEditor(c,d),_.on(c.find(nh),"keydown",h=>{let p=e.find("[tabindex]").not(h.target).first();ke(h)==="tab"&&h.shiftKey&&(h.preventDefault(),n._hideFilterRange(),p.length||(p=e.prev().find("[tabindex]").last()),_.trigger(p,"focus"))}),c=u("<div>").addClass(`dx-editor-container ${n.addWidgetPrefix("filter-range-end")}`).appendTo(l),d=n._getEditorOptions(c,t),d.sharedData=o,n._renderEditor(c,d),_.on(c.find(nh),"keydown",h=>{ke(h)==="tab"&&!h.shiftKey&&(h.preventDefault(),n._hideFilterRange(),_.trigger(e.next().find("[tabindex]").first(),"focus"))}),u(l).addClass(n.getWidgetContainerClass())},onShown(l){let d=l.component.$content().find(".dx-editor-container").first();_.trigger(d.find(nh),"focus")},onHidden(){t=n._columnsController.columnOption(t.index),e.find(".dx-menu").parent().addClass("dx-editor-with-menu"),Ds(n,t)==="between"&&(n._updateFilterRangeContent(e,x0(n,t)),n.component.updateDimensions())}})}_updateFilterRangeOverlay(e){let t=this._filterRangeOverlayInstance;t&&t.option(e)}_showFilterRange(e,t){let n=this,o=e.children(`.${n.addWidgetPrefix("filter-range-overlay")}`),s=o.length&&o.data("dxOverlay");!s&&t&&(s=n._initFilterRangeOverlay(e,t)),s.option("visible")||(n._filterRangeOverlayInstance&&n._filterRangeOverlayInstance.hide(),n._filterRangeOverlayInstance=s,n._updateFilterRangeOverlay({width:ae(e,!0)+1}),n._filterRangeOverlayInstance&&n._filterRangeOverlayInstance.show())}_hideFilterRange(){let e=this._filterRangeOverlayInstance;e&&e.hide()}getFilterRangeOverlayInstance(){return this._filterRangeOverlayInstance}_createRow(e){let t=super._createRow(e);return e.rowType==="filter"&&(t.addClass(this.addWidgetPrefix("filter-row")),this.option("useLegacyKeyboardNavigation")||_.on(t,"keydown",n=>pu("filterRow",this,n))),t}_getRows(){let e=super._getRows();return this.isFilterRowVisible()&&e.push({rowType:"filter"}),e}_renderFilterCell(e,t){let n=this,{column:o}=t,s=u(e);n.component.option("showColumnHeaders")&&n.setAria("describedby",o.headerId,s),n.setAria("label",O.format("dxDataGrid-ariaFilterCell"),s),s.addClass("dx-editor-cell");let r=u("<div>").appendTo(s),a=u("<div>").addClass("dx-editor-container").appendTo(r);if(Ds(n,o)==="between")n._renderFilterRangeContent(s,o);else{let d=n._getEditorOptions(a,o);n._renderEditor(a,d)}let{alignment:l}=o;l&&l!=="center"&&s.find(nh).first().css("textAlign",o.alignment),o.filterOperations&&o.filterOperations.length&&n._renderFilterOperationChooser(r,o,a)}_renderCellContent(e,t){let n=this,{column:o}=t;if(t.rowType==="filter"){if(o.command)e.html("&nbsp;");else if(o.allowFiltering){n.renderTemplate(e,n._renderFilterCell.bind(n),t).done(()=>{n._updateCell(e,t)});return}}super._renderCellContent.apply(this,arguments)}_getEditorOptions(e,t){let n=this,o={editorOptions:{inputAttr:n._getFilterInputAccessibilityAttributes(t)}},s=m(o,t,{value:v0(n,t.index,e),parentType:"filterRow",showAllText:n.option("filterRow.showAllText"),updateValueTimeout:n.option("filterRow.applyFilter")==="onClick"?0:700,width:null,setValue(r,a){n8(n,{column:t,value:r,container:e,notFireEvent:a})}});return Ds(n,t)==="between"&&(e.hasClass(n.addWidgetPrefix("filter-range-start"))?s.placeholder=n.option("filterRow.betweenStartText"):s.placeholder=n.option("filterRow.betweenEndText")),s}_getFilterInputAccessibilityAttributes(e){let t=O.format("dxDataGrid-ariaFilterCell");return this.component.option("showColumnHeaders")?{"aria-label":t,"aria-describedby":e.headerId}:{"aria-label":t}}_renderEditor(e,t){e.empty();let n=u("<div>").appendTo(e),o=this._dataController.dataSource();if(t.lookup&&this.option("syncLookupFilterValues")){this._applyFilterViewController.setCurrentColumnForFiltering(t);let s=this._dataController.getCombinedFilter();this._applyFilterViewController.setCurrentColumnForFiltering(null);let r=R.getWrappedLookupDataSource(t,o,s),a=I({},t,{lookup:I({},t.lookup,{dataSource:r})});return this._editorFactoryController.createEditor(n,a)}return this._editorFactoryController.createEditor(n,t)}_renderFilterRangeContent(e,t){let n=this,o=e.find(".dx-editor-container").first();o.empty();let s=u("<div>").addClass("dx-filter-range-content").attr("tabindex",this.option("tabIndex"));_.on(s,"focusin",()=>{n._showFilterRange(e,t)}),s.appendTo(o),n._updateFilterRangeContent(e,x0(n,t))}_updateFilterRangeContent(e,t){let n=e.find(".dx-filter-range-content");n.length&&(t===""?n.html("&nbsp;"):n.text(t))}_updateFilterOperationChooser(e,t,n){let o=this,s,r=function(){let l=f0.getInstance(e);l&&l.option("focusedElement",null),s&&o._focusEditor(n)},a=this._editorFactoryController;o._createComponent(e,f0,{integrationOptions:{},activeStateEnabled:!1,selectionMode:"single",cssClass:`${o.getWidgetContainerClass()} dx-cell-focus-disabled ${ZQ}`,showFirstSubmenuMode:"onHover",hideSubmenuOnMouseLeave:!0,items:[{disabled:!(t.filterOperations&&t.filterOperations.length),icon:_0[Ds(o,t)||"default"],selectable:!1,items:o._getFilterOperationMenuItems(t)}],onItemRendered:l=>{let{itemElement:d}=l;this.setAria("label",e8,u(d))},onItemClick(l){let d=l.itemData.name,c=Ds(o,t),h=!1,p=Hd(o),g={};if(!(l.itemData.items||d&&d===c)){if(d?(g[p?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=d,(d==="between"||c==="between")&&(h=d==="between",g[p?"bufferedFilterValue":"filterValue"]=null)):(g[p?"bufferedFilterValue":"filterValue"]=null,g[p?"bufferedSelectedFilterOperation":"selectedFilterOperation"]=t.defaultSelectedFilterOperation||null),o._columnsController.columnOption(t.index,g),o._applyFilterViewController.setHighLight(n,!0),!d){let C=C0(n);C&&C.NAME==="dxDateBox"&&!C.option("isValid")&&(C.clear(),C.option("isValid",!0))}h?o._showFilterRange(n.closest(".dx-editor-cell"),t):o._focusEditor(n)}},onSubmenuShowing(){s=o._isEditorFocused(n),a.loseFocus()},onSubmenuHiding(){_.trigger(e,"blur"),r()},onContentReady(l){_.on(e,"blur",()=>{l.component._hideSubmenuAfterTimeout(),r()})},rtlEnabled:o.option("rtlEnabled")})}_isEditorFocused(e){return e.hasClass("dx-focused")||e.parents(".dx-focused").length}_focusEditor(e){this._editorFactoryController.focus(e),_.trigger(e.find(nh),"focus")}_renderFilterOperationChooser(e,t,n){let o=this,s;o.option("filterRow.showOperationChooser")&&(e.addClass("dx-editor-with-menu"),s=u("<div>").prependTo(e),o._updateFilterOperationChooser(s,t,n))}_getFilterOperationMenuItems(e){let t=this,n=[{}],o=t.option("filterRow"),s=o&&o.operationDescriptions||{};if(e.filterOperations&&e.filterOperations.length){let r=e.filterOperations.filter(a=>f(cN[a]));n=qe(r,a=>{let l=cN[a];return{name:a,selected:(Ds(t,e)||e.defaultFilterOperation)===a,text:s[l],icon:_0[a]}}),n.push({name:null,text:o&&o.resetOperationText,icon:_0.default})}return n}_handleDataChanged(e){var t,n,o,s,r;let a=(t=this._dataController)===null||t===void 0||(n=t.dataSource)===null||n===void 0?void 0:n.call(t),l=a==null||(o=a.lastLoadOptions)===null||o===void 0?void 0:o.call(a);if(super._handleDataChanged.apply(this,arguments),(s=e.operationTypes)!==null&&s!==void 0&&s.filtering||(r=e.operationTypes)!==null&&r!==void 0&&r.fullReload){var d;this.updateLookupDataSource(((d=e.operationTypes)===null||d===void 0?void 0:d.filtering)||l?.filter)}}updateLookupDataSource(e){if(!this.option("syncLookupFilterValues")||!this.element())return;let t=this._columnsController.getVisibleColumns(),n=this._dataController.dataSource(),o=this._applyFilterViewController,s=this.element().find(`.${this.addWidgetPrefix("filter-row")}`).index();s!==-1&&t.forEach((r,a)=>{if(!r.lookup||r.calculateCellValue!==r.defaultCalculateCellValue)return;let l=this._getCellElement(s,a),d=C0(l?.find(".dx-editor-container"));if(d){o.setCurrentColumnForFiltering(r);let c=this._dataController.getCombinedFilter()||null;o.setCurrentColumnForFiltering(null);let h=d.option("dataSource");if(!e||!Ee(h.__dataGridSourceFilter||null,c)){let g=R.getWrappedLookupDataSource(r,n,c);d.option("dataSource",g)}}})}},s8=i=>class extends i{skipCalculateColumnFilters(){return!1}_calculateAdditionalFilter(){if(this.skipCalculateColumnFilters())return super._calculateAdditionalFilter();let e=[super._calculateAdditionalFilter()],t=this._columnsController.getVisibleColumns(null,!0),n=this._applyFilterController;return x(t,function(){var o;let s=((o=n.getCurrentColumnForFiltering())===null||o===void 0?void 0:o.index)===this.index;if(this.allowFiltering&&this.calculateFilterExpression&&f(this.filterValue)&&!s){let r=this.createFilterExpression(this.filterValue,this.selectedFilterOperation||this.defaultFilterOperation,"filterRow");e.push(r)}}),R.combineFilters(e)}},b0=class extends ye.ViewController{init(){this._columnsController=this.getController("columns")}_getHeaderPanel(){return this._headerPanel||(this._headerPanel=this.getView("headerPanel")),this._headerPanel}setHighLight(e,t){Hd(this)&&(e&&e.toggleClass("dx-highlight-outline",t)&&e.closest(".dx-editor-cell").toggleClass("dx-filter-modified",t),this._getHeaderPanel().enableApplyButton(t))}applyFilter(){let e=this._columnsController.getColumns();this._columnsController.beginUpdate();for(let t=0;t<e.length;t++){let n=e[t];n.bufferedFilterValue!==void 0&&(this._columnsController.columnOption(t,"filterValue",n.bufferedFilterValue),n.bufferedFilterValue=void 0),n.bufferedSelectedFilterOperation!==void 0&&(this._columnsController.columnOption(t,"selectedFilterOperation",n.bufferedSelectedFilterOperation),n.bufferedSelectedFilterOperation=void 0)}this._columnsController.endUpdate(),this.removeHighLights()}removeHighLights(){if(Hd(this)){let e=this.getView("columnHeadersView").element();e.find(`.${this.addWidgetPrefix("filter-row")} .dx-highlight-outline`).removeClass("dx-highlight-outline"),e.find(`.${this.addWidgetPrefix("filter-row")} .dx-filter-modified`).removeClass("dx-filter-modified"),this._getHeaderPanel().enableApplyButton(!1)}}setCurrentColumnForFiltering(e){this._currentColumn=e}getCurrentColumnForFiltering(){return this._currentColumn}},r8=i=>class extends i{_startResizing(){let e=this;if(super._startResizing.apply(e,arguments),e.isResizing()){let t=e._columnHeadersView.getFilterRangeOverlayInstance();if(t){let n=t.$element().closest("td").index();(n===e._targetPoint.columnIndex||n===e._targetPoint.columnIndex+1)&&t.$content().hide()}}}_endResizing(){let e=this,t;if(e.isResizing()){let n=e._columnHeadersView.getFilterRangeOverlayInstance();n&&(t=n.$element().closest("td"),e._columnHeadersView._updateFilterRangeOverlay({width:ae(t,!0)+1}),n.$content().show())}super._endResizing.apply(e,arguments)}},a8=i=>class extends i{updateFieldValue(e){return e.column.lookup&&(this._needUpdateLookupDataSource=!0),super.updateFieldValue.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,super._afterSaveEditData.apply(this,arguments)}_afterCancelEditData(){return this._needUpdateLookupDataSource=!1,super._afterCancelEditData.apply(this,arguments)}},l8=i=>class extends i{init(){super.init(),this._dataController=this.getController("data"),this._applyFilterViewController=this.getController("applyFilter")}optionChanged(e){e.name==="filterRow"?(this._invalidate(),e.handled=!0):super.optionChanged(e)}_getToolbarItems(){let e=super._getToolbarItems();return this._prepareFilterItem().concat(e)}_prepareFilterItem(){let e=this,t=[];if(e._isShowApplyFilterButton()){let n=e.option("filterRow.applyFilterText"),l={widget:"dxButton",options:{icon:"apply-filter",disabled:!e._columnsController.getColumns().filter(d=>d.bufferedFilterValue!==void 0).length,onClick:function(){e._applyFilterViewController.applyFilter()},hint:n,text:n,onInitialized:function(d){u(d.element).addClass(e._getToolbarButtonClass("dx-apply-button"))}},showText:"inMenu",name:"applyFilterButton",location:"after",locateInMenu:"auto",sortIndex:10};t.push(l)}return t}_isShowApplyFilterButton(){let e=this.option("filterRow");return!!(e!=null&&e.visible)&&e.applyFilter==="onClick"}enableApplyButton(e){this.setToolbarItemDisabled("applyFilterButton",!e)}},uN={defaultOptions:()=>({syncLookupFilterValues:!0,filterRow:{visible:!1,showOperationChooser:!0,showAllText:O.format("dxDataGrid-filterRowShowAllText"),resetOperationText:O.format("dxDataGrid-filterRowResetOperationText"),applyFilter:"auto",applyFilterText:O.format("dxDataGrid-applyFilterText"),operationDescriptions:{equal:O.format("dxDataGrid-filterRowOperationEquals"),notEqual:O.format("dxDataGrid-filterRowOperationNotEquals"),lessThan:O.format("dxDataGrid-filterRowOperationLess"),lessThanOrEqual:O.format("dxDataGrid-filterRowOperationLessOrEquals"),greaterThan:O.format("dxDataGrid-filterRowOperationGreater"),greaterThanOrEqual:O.format("dxDataGrid-filterRowOperationGreaterOrEquals"),startsWith:O.format("dxDataGrid-filterRowOperationStartsWith"),contains:O.format("dxDataGrid-filterRowOperationContains"),notContains:O.format("dxDataGrid-filterRowOperationNotContains"),endsWith:O.format("dxDataGrid-filterRowOperationEndsWith"),between:O.format("dxDataGrid-filterRowOperationBetween"),isBlank:O.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:O.format("dxFilterBuilder-filterOperationIsNotBlank")},betweenStartText:O.format("dxDataGrid-filterRowOperationBetweenStartText"),betweenEndText:O.format("dxDataGrid-filterRowOperationBetweenEndText")}}),controllers:{applyFilter:b0},extenders:{controllers:{data:s8,columnsResizer:r8,editing:a8},views:{columnHeadersView:o8,headerPanel:l8}}};$.registerModule("filterRow",uN);$o.setEditorClass(_o);function pN(i){i=i||[];for(let e=0;e<i.length;e++)i[e].selected=!1,pN(i[e].items)}function gN(i){let e=i.NAME==="dxTreeView"?".dx-treeview-select-all-item":".dx-list-select-all-checkbox";return i.$element().find(e).dxCheckBox("instance")}function hN(i,e){if(i.component.option("searchValue"))return;let t=gN(i.component);t&&e&&e.length&&t.option("value",void 0)}function mN(i,e,t){if(e^t){if(i.selected=!0,t&&i.items){for(let n=0;n<i.items.length;n++)if(!i.items[n].selected){i.selected=void 0;break}}}else(t||i.selected)&&(i.selected=!1,pN(i.items))}var xf=class extends ye.View{getPopupContainer(){return this._popupContainer}getListComponent(){return this._listComponent}applyHeaderFilter(e){let t=this.getListComponent(),n=t.option("searchValue"),o=gN(t),s=!n&&!e.isFilterBuilder&&o?.option("value"),r=[],a=function(l,d,c){x(d,(h,p)=>{if(p.selected!==void 0&&!!p.selected^c){let g=t._getNode(p),v=t._hasChildren(g)&&p.items&&p.items.some(b=>b.selected);if(!n||!v){l.push(p.value);return}}p.items&&p.items.length&&a(l,p.items,c)})};s?(e.type==="tree"&&(e.filterType="exclude"),Array.isArray(e.filterValues)&&(e.filterValues=[])):e.type==="tree"&&(e.filterType&&(e.filterType="include"),a(r,t.option("items"),!1),e.filterValues=r),e.filterValues&&!e.filterValues.length&&(e.filterValues=null),e.apply(),this.hideHeaderFilterMenu()}showHeaderFilterMenu(e,t){let n=this;if(t){n._initializePopupContainer(t);let o=n.getPopupContainer();n.hideHeaderFilterMenu(),n.updatePopup(e,t),o.show()}}hideHeaderFilterMenu(){let e=this.getPopupContainer();e&&e.hide()}updatePopup(e,t){let n=this,o=this.option("showColumnLines"),s=t.alignment==="right"^!o?"left":"right";n._popupContainer.setAria({role:"dialog",label:O.format("dxDataGrid-headerFilterLabel")}),n._popupContainer&&(n._cleanPopupContent(),n._popupContainer.option("position",{my:`${s} top`,at:`${s} bottom`,of:e,collision:"fit fit"}))}_getSearchExpr(e,t){let{lookup:n}=e,{useDefaultSearchExpr:o}=e,s=t.dataSource,r=t.search.searchExpr;if(r)return r;if(o||f(s)&&!A(s))return"text";if(n)return n.displayExpr||"this";if(e.dataSource){let{group:a}=e.dataSource;if(Array.isArray(a)&&a.length>0)return a[0].selector;if(A(a)&&!e.remoteFiltering)return a}return e.dataField||e.selector}_cleanPopupContent(){this._popupContainer&&this._popupContainer.$content().empty()}_initializePopupContainer(e){let t=this,n=t.element(),o=this._normalizeHeaderFilterOptions(e),{height:s,width:r}=o,a={width:r,height:s,visible:!1,shading:!1,showTitle:!1,showCloseButton:!1,hideOnParentScroll:!1,dragEnabled:!1,hideOnOutsideClick:!0,wrapperAttr:{class:"dx-header-filter-menu"},focusStateEnabled:!1,toolbarItems:[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:o.texts.ok,onClick(){t.applyHeaderFilter(e)}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:o.texts.cancel,onClick(){t.hideHeaderFilterMenu()}}}],resizeEnabled:!0,onShowing(l){l.component.$content().parent().addClass("dx-dropdowneditor-overlay"),t._initializeListContainer(e,o),e.onShowing&&e.onShowing(l)},onShown(){t.getListComponent().focus()},onHidden:e.onHidden,onInitialized(l){let{component:d}=l;d.option("animation",d._getDefaultOptions().animation)}};f(t._popupContainer)?t._popupContainer.option(a):t._popupContainer=t._createComponent(n,Oi,a)}_initializeListContainer(e,t){let n=this,o=n._popupContainer.$content(),s=!e.isFilterBuilder&&t.allowSelectAll,r={searchEnabled:t.search.enabled,searchTimeout:t.search.timeout,searchEditorOptions:t.search.editorOptions,searchMode:t.search.mode||"",dataSource:e.dataSource,onContentReady(){n.renderCompleted.fire()},itemTemplate(l,d,c){let h=u(c);return e.encodeHtml?h.text(l.text):h.html(l.text)}};function a(l){l.fullName==="searchValue"&&s&&n.option("headerFilter.hideSelectAllOnSearch")!==!1&&(e.type==="tree"?l.component.option("showCheckBoxesMode",l.value?"normal":"selectAll"):l.component.option("selectionMode",l.value?"multiple":"all"))}e.type==="tree"?n._listComponent=n._createComponent(u("<div>").appendTo(o),vs,m(r,{showCheckBoxesMode:s?"selectAll":"normal",onOptionChanged:a,keyExpr:"id"})):n._listComponent=n._createComponent(u("<div>").appendTo(o),ys,m(r,{searchExpr:n._getSearchExpr(e,t),pageLoadMode:"scrollBottom",showSelectionControls:!0,selectionMode:s?"all":"multiple",onOptionChanged:a,onSelectionChanged(l){let d=l.component.option("items"),c=l.component.option("selectedItems");if(!l.component._selectedItemsUpdating&&!l.component.option("searchValue")&&!e.isFilterBuilder){let h=e.filterValues||[],p=e.filterType==="exclude";c.length===0&&d.length&&(h.length<=1||p&&h.length===d.length-1)?(e.filterType="include",e.filterValues=[]):c.length===d.length&&(e.filterType="exclude",e.filterValues=[])}x(d,(h,p)=>{let g=R.getIndexByKey(p,c,null)>=0;if(!!p.selected!==g){p.selected=g,e.filterValues=e.filterValues||[];let v=R.getIndexByKey(p.value,e.filterValues,null);v>=0&&e.filterValues.splice(v,1);let b=e.filterType==="exclude";g^b&&e.filterValues.push(p.value)}}),hN(l,e.filterValues)},onContentReady(l){let{component:d}=l,c=d.option("items"),h=[];x(c,function(){this.selected&&h.push(this)}),d._selectedItemsUpdating=!0,d.option("selectedItems",h),d._selectedItemsUpdating=!1,hN(l,e.filterValues)}}))}_normalizeHeaderFilterOptions(e){let t=this.option("headerFilter")||{},n=e.headerFilter||{},o={search:{enabled:t.allowSearch,timeout:t.searchTimeout}},s={search:{enabled:n.allowSearch,mode:n.searchMode,timeout:n.searchTimeout}};return m(!0,{},t,o,n,s)}_renderCore(){this.element().addClass("dx-header-filter-menu")}},oh=function(i){return f(i.allowHeaderFiltering)?i.allowHeaderFiltering:i.allowFiltering},O0=i=>class extends i{optionChanged(e){if(e.name==="headerFilter"){let t=this.name==="columnHeadersView";this._invalidate(t,t),e.handled=!0}else super.optionChanged(e)}_applyColumnState(e){let t,{rootElement:n}=e,{column:o}=e;if(e.name==="headerFilter"){if(n.find(".dx-header-filter").remove(),oh(o)){t=super._applyColumnState(e).toggleClass("dx-header-filter-empty",this._isHeaderFilterEmpty(o)),this.option("useLegacyKeyboardNavigation")||t.attr("tabindex",this.option("tabindex")||0);let s=O.format("dxDataGrid-headerFilterIndicatorLabel",o.caption);t.attr("aria-label",s),t.attr("aria-haspopup","dialog"),t.attr("role","button")}return t}return super._applyColumnState(e)}_isHeaderFilterEmpty(e){return!e.filterValues||!e.filterValues.length}_getIndicatorClassName(e){return e==="headerFilter"?"dx-header-filter":super._getIndicatorClassName(e)}_renderIndicator(e){let t=e.container,n=e.indicator;if(e.name==="headerFilter"){let o=this.option("rtlEnabled");if(t.children().length&&(!o&&e.columnAlignment==="right"||o&&e.columnAlignment==="left")){t.prepend(n);return}}super._renderIndicator(e)}};var d8={month:i=>he.getMonthNames()[i-1],quarter:i=>he.format(new Date(2e3,3*i-1),"quarter")};function fN(i,e,t){return e=e||[],t=t||[],i.forEach(n=>{if(f(n.key)){let o=e.length===1;if(e.push(o?n.key-1:n.key),n.items)fN(n.items,e,t);else{let s=new Date(Date.UTC.apply(Date,e));t.push(s)}e.pop()}else t.push(null)}),t}function c8(i,e){let t=fN(i),n=Mt(t),o=R.getHeaderFilterGroupParameters(I({},e,{calculateCellValue:s=>s}));return cn.queryByOptions(n,{group:o}).toArray()}function u8(i){return i?.slice(-1)==="Z"||i?.slice(-3)==="'Z'"}var h8=function(i,e,t){let n=vo.getGroupInterval(e),o=R.getFormatOptionsByColumn(e,"headerFilter");return n&&(o.groupInterval=n[t],R.isDateType(e.dataType)?o.format=d8[n[t]]:e.dataType==="number"&&(o.getDisplayFormat=function(){let s={format:e.format,target:"headerFilter"},r=R.formatValue(i,s),a=i+n[t],l=R.formatValue(a,s);return r&&l?`${r} - ${l}`:""})),o},E0=class extends ye.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._headerFilterView=this.getView("headerFilterView")}_updateSelectedState(e,t){let n=e.length,o=t.filterType==="exclude";for(;n--;){let s=e[n];"items"in e[n]&&this._updateSelectedState(e[n].items,t),mN(s,R.getIndexByKey(e[n].value,t.filterValues,null)>-1,o)}}_normalizeGroupItem(e,t,n){let o,s,{path:r}=n,{valueSelector:a}=n,{displaySelector:l}=n,{column:d}=n;return a&&l?(o=a(e),s=l(e)):(o=e.key,s=o),z(e)?e=m({},e):e={},r.push(o),r.length===1?e.value=r[0]:e.value=r.join("/"),e.text=this.getHeaderItemText(s,d,t,n.headerFilterOptions),e}getHeaderItemText(e,t,n,o){let s=R.formatValue(e,h8(e,t,n));return s||(s=o.texts.emptyValue),s}_processGroupItems(e,t,n,o){let s=this,r,a,{column:l}=o,{lookup:d}=l,{level:c}=o;n=n||[],t=t||0,d&&(r=Ce(d.displayExpr),a=Ce(d.valueExpr));for(let h=0;h<e.length;h++)e[h]=s._normalizeGroupItem(e[h],t,{column:o.column,headerFilterOptions:o.headerFilterOptions,displaySelector:r,valueSelector:a,path:n}),"items"in e[h]&&(t===c||!f(e[h].value)?delete e[h].items:s._processGroupItems(e[h].items,t+1,n,o)),n.pop()}getDataSource(e){var t;let n=this._dataController.dataSource(),o=n?.remoteOperations().grouping,s=R.getHeaderFilterGroupParameters(e,o),r=(t=e.headerFilter)===null||t===void 0?void 0:t.dataSource,a=this.option("headerFilter"),l=!1,d={component:this.component};if(!n)return;if(f(r)&&!A(r))d.dataSource=gn(r);else if(e.lookup)if(l=!0,this.option("syncLookupFilterValues")){this._currentColumn=e;let p=this._dataController.getCombinedFilter();this._currentColumn=null,d.dataSource=R.getWrappedLookupDataSource(e,n,p)}else d.dataSource=R.normalizeLookupDataSource(e.lookup);else{let p=Array.isArray(s)?s.length-1:0;this._currentColumn=e;let g=this._dataController.getCombinedFilter();this._currentColumn=null,d.dataSource={filter:g,group:s,useDefaultSearch:!0,load:C=>{let v=new y;return C.dataField=e.dataField||e.name,n.load(C).done(b=>{o&&u8(e.serializationFormat)&&p>3&&(b=c8(b,e)),h._processGroupItems(b,null,null,{level:p,column:e,headerFilterOptions:a}),v.resolve(b)}).fail(v.reject),v}}}A(r)&&r.call(e,d);let c=d.dataSource.postProcess,h=this;return d.dataSource.postProcess=function(p){let g=p;return l&&(g=g.filter(C=>C[e.lookup.valueExpr]!==null),this.pageIndex()===0&&!this.searchValue()&&(g=g.slice(0),g.unshift(null)),h._processGroupItems(g,null,null,{level:0,column:e,headerFilterOptions:a})),g=c&&c.call(this,g)||g,h._updateSelectedState(g,e),g},d.dataSource}getCurrentColumn(){return this._currentColumn}showHeaderFilterMenu(e,t){let n=this._columnsController,o=m(!0,{},this._columnsController.getColumns()[e]);if(o){let s=n.getVisibleIndex(e),a=(t?this.getView("headerPanel"):this.getView("columnHeadersView")).getColumnElements().eq(t?o.groupIndex:s);this.showHeaderFilterMenuBase({columnElement:a,column:o,applyFilter:!0,apply(){n.columnOption(e,{filterValues:this.filterValues,filterType:this.filterType})}})}}showHeaderFilterMenuBase(e){let t=this,{column:n}=e;if(n){let o=vo.getGroupInterval(n),s=t._dataController.dataSource(),r=s&&s.remoteOperations().filtering,a=e.onHidden;m(e,n,{type:o&&o.length>1?"tree":"list",remoteFiltering:r,onShowing:l=>{let d=l.component.$overlayContent().dxResizable("instance");d&&d.option("onResizeEnd",c=>{let h=this._columnsController.columnOption(e.dataField,"headerFilter");h=h||{},h.width=c.width,h.height=c.height,this._columnsController.columnOption(e.dataField,"headerFilter",h,!0)})},onHidden:()=>{a?.(),cd(this)}}),e.dataSource=t.getDataSource(e),e.isFilterBuilder&&(e.dataSource.filter=null,e.alignment="right"),t._headerFilterView.showHeaderFilterMenu(e.columnElement,e)}}hideHeaderFilterMenu(){this._headerFilterView.hideHeaderFilterMenu()}},p8=i=>class extends O0(i){_renderCellContent(e,t){let n=this,o,{column:s}=t;!s.command&&oh(s)&&n.option("headerFilter.visible")&&t.rowType==="header"&&(o=n._applyColumnState({name:"headerFilter",rootElement:e,column:s,showColumnLines:n.option("showColumnLines")}),o&&n._subscribeToIndicatorEvent(o,s,"headerFilter")),super._renderCellContent.apply(this,arguments)}_subscribeToIndicatorEvent(e,t,n){n==="headerFilter"&&_.on(e,de,this.createAction(o=>{o.event.stopPropagation(),Rb(e,this),this._headerFilterController.showHeaderFilterMenu(t.index,!1)}))}_updateIndicator(e,t,n){let o=super._updateIndicator(e,t,n);o&&this._subscribeToIndicatorEvent(o,t,n)}_updateHeaderFilterIndicators(){this.option("headerFilter.visible")&&this._updateIndicators("headerFilter")}_needUpdateFilterIndicators(){return!0}_columnOptionChanged(e){let{optionNames:t}=e,n=R.checkChanges(t,["filterValues","filterValue"]),o=R.checkChanges(t,["filterValues","filterType"]);(n||o)&&this._needUpdateFilterIndicators()&&this._updateHeaderFilterIndicators(),o||super._columnOptionChanged(e)}},g8=i=>class extends O0(i){_createGroupPanelItem(e,t){let n=this,o=super._createGroupPanelItem.apply(n,arguments),s;return!t.command&&oh(t)&&n.option("headerFilter.visible")&&(s=n._applyColumnState({name:"headerFilter",rootElement:o,column:{alignment:un(n.option("rtlEnabled")),filterValues:t.filterValues,allowHeaderFiltering:!0,caption:t.caption},showColumnLines:!0}),s&&_.on(s,de,n.createAction(r=>{let{event:a}=r;a.stopPropagation(),this._headerFilterController.showHeaderFilterMenu(t.index,!0)}))),o}};var m8=i=>class extends i{skipCalculateColumnFilters(){return!1}_calculateAdditionalFilter(){if(this.skipCalculateColumnFilters())return super._calculateAdditionalFilter();let e=[super._calculateAdditionalFilter()],t=this._columnsController.getVisibleColumns(null,!0),o=this._headerFilterController.getCurrentColumn();return x(t,(s,r)=>{let a;if(!(o&&o.index===r.index)&&oh(r)&&r.calculateFilterExpression&&Array.isArray(r.filterValues)&&r.filterValues.length){let l=[];x(r.filterValues,(d,c)=>{Array.isArray(c)?a=c:(r.deserializeValue&&!R.isDateType(r.dataType)&&r.dataType!=="number"&&(c=r.deserializeValue(c)),a=r.createFilterExpression(c,"=","headerFilter")),a&&(a.columnIndex=r.index),l.push(a)}),l=R.combineFilters(l,"or"),e.push(r.filterType==="exclude"?["!",l]:l)}}),R.combineFilters(e)}},_N={defaultOptions:()=>({syncLookupFilterValues:!0,headerFilter:{visible:!1,width:252,height:325,allowSelectAll:!0,search:{enabled:!1,timeout:500,mode:"contains",editorOptions:{}},texts:{emptyValue:O.format("dxDataGrid-headerFilterEmptyValue"),ok:O.format("dxDataGrid-headerFilterOK"),cancel:O.format("dxDataGrid-headerFilterCancel")}}}),controllers:{headerFilter:E0},views:{headerFilterView:xf},extenders:{controllers:{data:m8},views:{columnHeadersView:p8,headerPanel:g8}}};$.registerModule("headerFilter",_N);var vf="dx-filterbuilder-range",f8=`${vf}-start`,_8=`${vf}-end`,C8=`${vf}-separator`,CN="\u2013";function x8(i,e){let t=u("<div>").addClass(f8),n=u("<div>").addClass(_8),o=i.value||[],s=function(a){return a&&a.length>0?a[0]:null},r=function(a){return a&&a.length===2?a[1]:null};e.append(t),e.append(u("<span>").addClass(C8).text(CN)),e.append(n),e.addClass(vf),this._editorFactory.createEditor.call(this,t,m({},i.field,i,{value:s(o),parentType:"filterBuilder",setValue(a){o=[a,r(o)],i.setValue(o)}})),this._editorFactory.createEditor.call(this,n,m({},i.field,i,{value:r(o),parentType:"filterBuilder",setValue(a){o=[s(o),a],i.setValue(o)}}))}function w0(i,e){return{name:"between",caption:i,icon:"range",valueSeparator:CN,dataTypes:["number","date","datetime"],editorTemplate:x8.bind(e),notForLookup:!0}}var v8={"=":"equal","<>":"notequal","<":"less","<=":"lessorequal",">":"greater",">=":"greaterorequal",notcontains:"doesnotcontain",contains:"contains",startswith:"startswith",endswith:"endswith",isblank:"isblank",isnotblank:"isnotblank"},b8={"=":"equal","<>":"notEqual","<":"lessThan","<=":"lessThanOrEqual",">":"greaterThan",">=":"greaterThanOrEqual",startswith:"startsWith",contains:"contains",notcontains:"notContains",endswith:"endsWith",isblank:"isBlank",isnotblank:"isNotBlank",between:"between"},S0={getIconByFilterOperation:i=>v8[i],getNameByFilterOperation:i=>b8[i]};var A0="string";var da="and",M0="=",y8="<>",O8={number:["=","<>","<",">","<=",">=","isblank","isnotblank"],string:["contains","notcontains","startswith","endswith","=","<>","isblank","isnotblank"],date:["=","<>","<",">","<=",">=","isblank","isnotblank"],datetime:["=","<>","<",">","<=",">=","isblank","isnotblank"],boolean:["=","<>","isblank","isnotblank"],object:["isblank","isnotblank"]},E8={date:"shortDate",datetime:"shortDateShortTime"},w8=["=","<>","isblank","isnotblank"],S8=["caption","customizeText","dataField","dataType","editorTemplate","falseText","editorOptions","filterOperations","format","lookup","trueText","calculateFilterExpression","name"];function I8(i,e){let t=i.format||E8[i.dataType];return om.format(e,t)}function Za(i){return i&&i.length>1&&i[0]==="!"&&!_i(i)}function pr(i){return Za(i)?i[1]:i}function D8(i,e){return Za(i)?i[1]=e:i=e,i}function T8(i,e){(function(t){return t.indexOf("!")!==-1})(e)?Za(i)||function(t){let n=t.slice(0);t.length=0,t.push("!",n)}(i):Za(i)&&function(t){let n=pr(t);t.length=0,[].push.apply(t,n)}(i)}function yN(i,e){T8(i,e);let t=pr(i),n;return e=function(o){return o.indexOf("!")===-1?o:o.substring(1)}(e),function(o,s){for(n=0;n<o.length;n++)Array.isArray(o[n])||(o[n]=s)}(t,e),i}function ON(i,e){let t=gr(i);return e.filter(n=>n.value===t)[0]}function EN(i){if(_i(i))return da;let e="";for(let t=0;t<i.length;t++){let n=i[t];if(!Array.isArray(n)){if(e&&e!==n)throw new mt.Error("E4019");n!=="!"&&(e=n)}}return e}function gr(i){let e=pr(i),t=EN(e);return t||(t=da),e!==i&&(t=`!${t}`),t}function A8(i){return i.lookup&&w8||O8[i.dataType||A0]}function M8(i){return Array.isArray(i)&&i.length}function wN(i){let e=M8(i.filterOperations)?i.filterOperations:A8(i);return m([],e)}function yf(i,e){let t=S0.getNameByFilterOperation(i);return e&&e[t]?e[t]:t}function SN(i,e){for(let t=0;t<e.length;t++)if(e[t].value===i)return e[t];throw new ie.Error("E1048",i)}function Ko(i,e){let t=i.filter(n=>n.name===e);return t.length?t[0]:null}function IN(i,e,t){let n=wN(i),o=!!i.lookup;return t.forEach(s=>{if(!i.filterOperations&&n.indexOf(s.name)===-1){let r=s&&s.dataTypes;!(o?!!s.notForLookup:!1)&&r&&r.indexOf(i.dataType||A0)>=0&&n.push(s.name)}}),n.map(s=>{let r=Ko(t,s);return r?{icon:r.icon||"icon-none",text:r.caption||to(r.name),value:r.name,isCustom:!0}:{icon:S0.getIconByFilterOperation(s)||"icon-none",text:yf(s,e),value:s}})}function rh(i){return i.defaultFilterOperation||wN(i)[0]}function DN(i,e){let t=[i.dataField,"",""],n=rh(i);return If(t,n,e),t}function Of(i,e){let t=pr(i),n=t.indexOf(e);return t.splice(n,1),t.length!==1&&t.splice(n,1),i}function R0(i){let e=F0(i),t=e?P0(i):i;return e?["!",[t]]:[t]}function $d(i,e){let t=pr(e),n=gr(t);return t.length===1?t.unshift(i):t.push(i,n),e}function zd(i,e){for(let n=0;n<e.length;n++)if(e[n].name===i||e[n].dataField.toLowerCase()===i.toLowerCase())return e[n];let t=k0(e,!0).filter(n=>n.dataField.toLowerCase()===i.toLowerCase());if(t.length>0)return t[0];throw new ie.Error("E1047",i)}function Uo(i){return Array.isArray(i)?i.length<2||Array.isArray(i[0])||Array.isArray(i[1]):!1}function _i(i){return Array.isArray(i)?i.length>1&&!Array.isArray(i[0])&&!Array.isArray(i[1]):!1}function xN(i,e,t){t=t||da;let n=EN(i).toLowerCase()||t,o=[];for(let s=0;s<i.length;s++)Uo(i[s])?(o.push(Ef(i[s],e,t)),o=D0(o,n)):_i(i[s])&&(o.push(bf(i[s],e)),o=D0(o,n));return o.length===0&&(o=D0(o,n)),o}function R8(i,e){let t=Ko(e,i[1]);return t&&t.name===i[1]}function bf(i,e){return R8(i,e)||i.length<3&&(i[2]=i[1],i[1]=M0),i}function F0(i){return i.indexOf("not")!==-1}function P0(i){return i.substring(3).toLowerCase()}function I0(i,e){let t=F0(e);return e=t?P0(e):e,t?["!",i,e]:[i,e]}function D0(i,e){let t=F0(e);e=t?P0(e):e,i.push(e);let n=i;return t&&(n=["!",n]),n}function Ef(i,e,t){return t=t||da,i?(i=m(!0,[],i),_i(i)?I0(bf(i,e),t):Za(i)?["!",_i(i[1])?I0(bf(i[1],e),t):Za(i[1])?I0(Ef(i[1],e),t):xN(i[1],e,t)]:xN(i,e,t)):R0(t)}function TN(i){return i.reduce((e,t)=>{if(f(t.dataField)){let n={};for(let o in t)t[o]&&S8.includes(o)&&(n[o]=t[o]);n.defaultCalculateFilterExpression=vo.defaultCalculateFilterExpression,f(n.dataType)||(n.dataType=A0),f(n.trueText)||(n.trueText=O.format("dxDataGrid-trueText")),f(n.falseText)||(n.falseText=O.format("dxDataGrid-falseText")),e.push(n)}return e},[])}function vN(i,e,t,n){let o=zd(i[0],e),s=bf(i,t),r=t.length&&Ko(t,s[1]);return r&&r.calculateFilterExpression?r.calculateFilterExpression.apply(r,[s[2],o,e]):o.createFilterExpression?o.createFilterExpression.apply(o,[s[2],s[1],n]):o.calculateFilterExpression?o.calculateFilterExpression.apply(o,[s[2],s[1],n]):o.defaultCalculateFilterExpression.apply(o,[s[2],s[1],n])}function hr(i,e,t,n){if(!f(i))return null;if(Za(i))return["!",hr(i[1],e,t,n)];let o=pr(i);if(_i(o))return vN(o,e,t,n)||null;let s=[],r,a=gr(o);for(let l=0;l<o.length;l++)Uo(o[l])?(r=hr(o[l],e,t,n),r&&(l&&s.push(a),s.push(r))):_i(o[l])&&(r=vN(o[l],e,t,n),r&&(s.length&&s.push(a),s.push(r)));return s.length===1&&(s=s[0]),s.length?s:null}function Ja(i){let e=pr(i),t;if(e.length===0)return null;let n=[];for(t=0;t<e.length;t++)if(Uo(e[t])){let o=Ja(e[t]);o?e[t]=o:n.push(e[t])}else _i(e[t])&&(P8(e[t])||n.push(e[t]));for(t=0;t<n.length;t++)Of(e,n[t]);return e.length===1||(e.splice(e.length-1,1),e.length===1&&(i=D8(i,e[0])),i.length===0)?null:i}function wf(i,e,t){if(e===""){t("");return}let{lookup:n}=i;if(n.items)t(n.calculateCellValue(e)||"");else{let o=A(n.dataSource)?n.dataSource({}):n.dataSource;new gi(o).loadSingle(n.valueExpr,e).done(r=>{let a="";r&&(a=n.displayExpr?Ce(n.displayExpr)(r):r),i.customizeText&&(a=i.customizeText({value:e,valueText:a})),t(a)}).fail(()=>{t("")})}}function AN(i,e,t,n,o){let s;return e===!0?s=i.trueText||O.format("dxDataGrid-trueText"):e===!1?s=i.falseText||O.format("dxDataGrid-falseText"):s=I8(i,e),i.customizeText&&(s=i.customizeText.call(i,{value:e,valueText:s,target:n})),t&&t.customizeText&&(s=t.customizeText.call(t,{value:e,valueText:s,field:i,target:n},o)),s}function F8(i,e,t,n){let o={values:e};return e.map(s=>AN(i,s,t,n,o))}function T0(i){return i===""||i===null}function Sf(i,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"filterBuilder";if(T0(e))return"";if(Array.isArray(e)){let o=new y;return P.apply(this,F8(i,e,t,n)).done(function(){for(var s=arguments.length,r=new Array(s),a=0;a<s;a++)r[a]=arguments[a];let l=r.some(d=>!T0(d))?r.map(d=>T0(d)?"?":d):"";o.resolve(l)}),o}return AN(i,e,t,n)}function bN(i,e){return i.some(t=>t.dataField===e)}function MN(i,e,t){let{dataField:n}=t;B0(n)&&(t.parentId=FN(n),!bN(e,t.parentId)&&!bN(i,t.parentId)&&MN(i,e,{id:t.parentId,dataType:"object",dataField:t.parentId,caption:RN(t.parentId,!0),filterOperations:["isblank","isnotblank"],defaultCalculateFilterExpression:vo.defaultCalculateFilterExpression})),e.push(t)}function RN(i,e){let t="";if(e)i=i.substring(i.lastIndexOf(".")+1);else if(B0(i))return i.split(".").forEach((n,o,s)=>{t+=to(n),o!==s.length-1&&(t+=".")}),t;return to(i)}function k0(i,e){let t=[];for(let n=0;n<i.length;n++){let o=m(!0,{caption:RN(i[n].dataField,e)},i[n]);o.id=o.name||o.dataField,e?MN(i,t,o):t.push(o)}return t}function B0(i){return i.lastIndexOf(".")!==-1}function FN(i){return i.substring(0,i.lastIndexOf("."))}function V0(i,e){if(B0(i.dataField)){let t=FN(i.dataField);for(let n=0;n<e.length;n++)if(e[n].dataField===t)return`${V0(e[n],e)}.${i.caption}`}return i.caption}function If(i,e,t){let n=Ko(t,e);return n?(n.hasValue===!1?(i[1]=e,i.length=2):(i[1]=e,i[2]=""),i):(e==="isblank"?(i[1]=M0,i[2]=null):e==="isnotblank"?(i[1]=y8,i[2]=null):(n=Ko(t,i[1]),(n||i.length===2||i[2]===null)&&(i[2]=""),i[1]=e),i)}function L0(i){let e;return i[2]===null?i[1]===M0?e="isblank":e="isnotblank":e=i[1],e}function P8(i){return i[2]!==""}function PN(i,e,t){let n=m(!0,[],i),o=-1;return n.some((s,r)=>{if(s.name==="between")return o=r,!0}),o!==-1?n[o]=m(w0(e,t),n[o]):n.unshift(w0(e,t)),n}function sh(i,e){return i[0]===e}function Df(i,e){return!i||i.length===0?null:_i(i)?sh(i,e)?null:i:kN(i,[e],!1)}function kN(i,e,t){let n=[];return i.forEach(o=>{_i(o)?sh(o,e[0])?t?(n.push(e),t=!1):n.splice(n.length-1,1):n.push(o):(n.length||Uo(o))&&n.push(o)}),n.length===0?null:(t&&(n.push(da),n.push(e)),n.length===1?n[0]:n)}function N0(i,e){return i===null||i.length===0?e:_i(i)?sh(i,e[0])?e:[i,da,e]:gr(i)!==da?[e,"and",i]:kN(i,e,!0)}function BN(i,e){return i===null||i.length===0?[]:_i(i)?sh(i,e)?[i]:[]:gr(i)!==da?[]:i.filter(o=>_i(o)&&sh(o,e))}function H0(i,e){return i===null||i.length===0?!1:_i(i)?i[0]===e:i.some(t=>(_i(t)||Uo(t))&&H0(t,e))}var ah=function(i,e,t){if(Array.isArray(e)){let n=e.length-1;i.empty(),e.forEach((o,s)=>{u("<span>").addClass("dx-filterbuilder-text-part").text(o).appendTo(i),s!==n&&u("<span>").addClass("dx-filterbuilder-text-separator").text(t&&t.valueSeparator?t.valueSeparator:"|").addClass("dx-filterbuilder-text-separator-empty").appendTo(i)})}else e?i.text(e):i.text(O.format("dxFilterBuilder-enterValueText"))};function VN(i){let e=function(o,s){return s?`${s}/${o}`:o},t=function(o,s){let r=[];return o.forEach(a=>{if(a.items){let l=t(a.items,e(a.text,s));r=r.concat(l)}a.selected&&r.push(e(a.text,s))}),r},n=i&&i.getController("headerFilter");return{dataTypes:["string","date","datetime","number","boolean","object"],calculateFilterExpression:function(o,s,r){let a=[],l=o.length-1;return o&&o.forEach((d,c)=>{if(_i(d)||Uo(d)){let h=hr(d,r,[],"headerFilter");a.push(h)}else{let h=hr([s.dataField,"=",d],r,[],"headerFilter");a.push(h)}c!==l&&a.push("or")}),a.length===1?a[0]:a},editorTemplate(o,s){let r=u("<div>").addClass("dx-filterbuilder-item-value-text").appendTo(s),a=m(!0,{},i.columnOption(o.field.dataField));return ah(r,o.text&&o.text.split("|")),a.filterType="include",a.filterValues=o.value?o.value.slice():[],n.showHeaderFilterMenuBase({columnElement:r,column:a,apply(){l=this.filterValues,o.setValue(l);var l;n.hideHeaderFilterMenu(),o.closeEditor()},onHidden(){o.closeEditor()},isFilterBuilder:!0}),s},customizeText:function(o,s){s=s||{};let{value:r}=o,a=i.columnOption(o.field.dataField),l=a&&a.headerFilter,d=a&&a.lookup,c=s.values||[r];if(l&&l.dataSource||d&&d.dataSource){let p=new y,g=s.items||new y;if(!s.items){a=m({},a,{filterType:"include",filterValues:c});let C=n.getDataSource(a);C.paginate=!1;let v=new gi(C),b=v.store().key();if(b){let{values:T}=s;if(T&&T.length>1){let M=T.reduce((G,te)=>(G.length&&G.push("or"),G.push([b,"=",te]),G),[]);v.filter(M)}else v.filter([b,"=",o.value])}else o.field.calculateDisplayValue&&ie.log("W1017");s.items=g,v.load().done(g.resolve)}return g.done(C=>{let v=c.indexOf(o.value);p.resolve(t(C,null)[v])}),p}return n.getHeaderItemText(r,a,0,i.option("headerFilter"))}}}function LN(i){return m(VN(i),{name:"anyof",icon:"selectall",caption:O.format("dxFilterBuilder-filterOperationAnyOf")})}function NN(i){let e=VN(i);return m({},e,{calculateFilterExpression(t,n,o){let s=e.calculateFilterExpression(t,n,o);return!s||s.length===0?null:s[0]==="!"?s:["!",s]},name:"noneof",icon:"unselectall",caption:O.format("dxFilterBuilder-filterOperationNoneOf")})}var k8=["=","<>","<","<=",">",">=","notcontains","contains","startswith","endswith","between"];function Ts(i){return i.name||i.dataField}function B8(i){i.forEach(e=>{let t=Ts(e);if(!f(t)&&e.allowFiltering)throw new ie.Error("E1049",e.caption)})}var $0=function(){return{filterType:"include",filterValues:void 0}},GN=function(i){let e=i.filterValues||[];return!vo.getGroupInterval(i)&&!(i.headerFilter&&i.headerFilter.dataSource)||e.length===1&&e[0]===null},V8=function(i,e){if(!i)return $0();let t,n=i[1],o=i[2],s=Array.isArray(o);if(!s&&!GN(e))return $0();switch(n){case"anyof":case"=":t="include";break;case"noneof":case"<>":t="exclude";break;default:return $0()}return{filterType:t,filterValues:s?o:[o]}},HN=function(i){let e=i.filterValue;if(f(e)){let t=i.selectedFilterOperation||i.defaultFilterOperation||rh(i);return[Ts(i),t,i.filterValue]}return null},$N=function(i){let e,t,{filterValues:n}=i;return n?(n.length===1&&GN(i)&&!Array.isArray(n[0])?(i.filterType==="exclude"?e="<>":e="=",t=n[0]):(i.filterType==="exclude"?e="noneof":e="anyof",t=n),[Ts(i),e,t]):null},zN=function(i,e,t){let n=V8(t,e);i.columnOption(Ts(e),n)},WN=function(i,e,t){let n,o=t?.[1],s=t?.[2],r=e.filterOperations||e.defaultFilterOperations,a=!r||r.indexOf(o)>=0,l=o===e.defaultFilterOperation,d=k8.includes(o);(a||l)&&d&&(s!==null&&s!=="")?(l&&!f(e.selectedFilterOperation)&&(o=e.selectedFilterOperation),n={filterValue:s,selectedFilterOperation:o}):n={filterValue:void 0,selectedFilterOperation:void 0},i.columnOption(Ts(e),n)},z0=class extends ye.Controller{init(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._dataController.isFilterSyncActive()&&(this._columnsController.isAllDataTypesDefined()?this._initSync():this._dataController.dataSourceChanged.add(()=>this._initSync()))}publicMethods(){return["getCustomFilterOperations"]}syncFilterValue(){let e=this,t=this._columnsController.getFilteringColumns();this._skipSyncColumnOptions=!0,t.forEach(n=>{let o=BN(e.option("filterValue"),Ts(n));if(o.length===1){let s=o[0];zN(this._columnsController,n,s),WN(this._columnsController,n,s)}else f(n.filterValues)&&zN(this._columnsController,n,null),f(n.filterValue)&&WN(this._columnsController,n,null)}),this._skipSyncColumnOptions=!1}_initSync(){let e=this._columnsController.getColumns(),t=this._dataController.pageIndex();if(B8(e),!this.option("filterValue")){let n=this._columnsController.getFilteringColumns(),o=this.getFilterValueFromColumns(n);this._silentOption("filterValue",o)}this.syncFilterValue(),this._dataController.pageIndex(t)}_getSyncFilterRow(e,t){let n=HN(t);return f(n)?N0(e,n):Df(e,Ts(t))}_getSyncHeaderFilter(e,t){let n=$N(t);return n?N0(e,n):Df(e,Ts(t))}getFilterValueFromColumns(e){if(!this._dataController.isFilterSyncActive())return null;let t=["and"];return e&&e.forEach(n=>{let o=$N(n),s=HN(n);o&&$d(o,t),s&&$d(s,t)}),Ja(t)}syncFilterRow(e,t){this.option("filterValue",this._getSyncFilterRow(this.option("filterValue"),e))}syncHeaderFilter(e){this.option("filterValue",this._getSyncHeaderFilter(this.option("filterValue"),e))}getCustomFilterOperations(){let e=this.option("filterBuilder.customOperations")??[];return[LN(this.component),NN(this.component)].concat(e)}},L8=i=>class extends i{optionChanged(e){switch(e.name){case"filterValue":this._applyFilter(),this.isFilterSyncActive()&&this._filterSyncController.syncFilterValue(),e.handled=!0;break;case"filterSyncEnabled":e.handled=!0;break;case"columns":if(this.isFilterSyncActive()){let t=this._columnsController.getColumnByPath(e.fullName);if(t&&!this._filterSyncController._skipSyncColumnOptions){let n=this._parseColumnPropertyName(e.fullName);this._filterSyncController._skipSyncColumnOptions=!0,n==="filterType"?(e.value==="exclude"||e.previousValue==="exclude")&&this._filterSyncController.syncHeaderFilter(t):n==="filterValues"?this._filterSyncController.syncHeaderFilter(t):["filterValue","selectedFilterOperation"].includes(n)&&this._filterSyncController.syncFilterRow(t,t.filterValue),this._filterSyncController._skipSyncColumnOptions=!1}}super.optionChanged(e);break;default:super.optionChanged(e)}}isFilterSyncActive(){let e=this.option("filterSyncEnabled");return e==="auto"?this.option("filterPanel.visible"):e}skipCalculateColumnFilters(){return(f(this.option("filterValue"))||this._filterSyncController._skipSyncColumnOptions)&&this.isFilterSyncActive()}_calculateAdditionalFilter(){if(this.option("filterPanel.filterEnabled")===!1)return super._calculateAdditionalFilter();let e=[super._calculateAdditionalFilter()],t=this._columnsController.getFilteringColumns(),n=this.option("filterValue");if(this.isFilterSyncActive()){let r=this._headerFilterController.getCurrentColumn(),a=this._applyFilterController.getCurrentColumnForFiltering(),l=r||a;(r||f(a?.filterValue))&&n&&(n=Df(n,Ts(l)))}let o=this._filterSyncController.getCustomFilterOperations(),s=hr(n,t,o,"filterBuilder");return s&&e.push(s),R.combineFilters(e)}_parseColumnPropertyName(e){let t=e.match(/.*\.(.*)/);return t?t[1]:null}clearFilter(e){this.component.beginUpdate(),arguments.length>0?(e==="filterValue"&&this.option("filterValue",null),super.clearFilter(e)):(this.option("filterValue",null),super.clearFilter()),this.component.endUpdate()}_applyFilter(){return this._filterSyncController._skipSyncColumnOptions?new y().resolve():super._applyFilter.apply(this,arguments)}},N8=i=>class extends i{optionChanged(e){e.name==="filterValue"?this._updateHeaderFilterIndicators():super.optionChanged(e)}_isHeaderFilterEmpty(e){return this._dataController.isFilterSyncActive()?!H0(this.option("filterValue"),Ts(e)):super._isHeaderFilterEmpty(e)}_needUpdateFilterIndicators(){return!this._dataController.isFilterSyncActive()}},jN={defaultOptions:()=>({filterValue:null,filterSyncEnabled:"auto"}),controllers:{filterSync:z0},extenders:{controllers:{data:L8},views:{columnHeadersView:N8}}};$.registerModule("filterSync",jN);var KN="dx-filterbuilder-action-icon";var Tf="dx-state-active";var UN="filterBuilder";var H8=[{name:"onEditorPreparing",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onEditorPrepared",config:{excludeValidators:["disabled","readOnly"],category:"rendering"}},{name:"onValueChanged",config:{excludeValidators:["disabled","readOnly"]}}],qN={and:"and",or:"or",notAnd:"!and",notOr:"!or"},$8=Wm(class{}),Af=class extends at{_getDefaultOptions(){return m(super._getDefaultOptions(),{onEditorPreparing:null,onEditorPrepared:null,onValueChanged:null,fields:[],groupOperations:["and","or","notAnd","notOr"],maxGroupLevel:void 0,value:null,allowHierarchicalFields:!1,groupOperationDescriptions:{and:O.format("dxFilterBuilder-and"),or:O.format("dxFilterBuilder-or"),notAnd:O.format("dxFilterBuilder-notAnd"),notOr:O.format("dxFilterBuilder-notOr")},customOperations:[],closePopupOnTargetScroll:!0,filterOperationDescriptions:{between:O.format("dxFilterBuilder-filterOperationBetween"),equal:O.format("dxFilterBuilder-filterOperationEquals"),notEqual:O.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:O.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:O.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:O.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:O.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:O.format("dxFilterBuilder-filterOperationStartsWith"),contains:O.format("dxFilterBuilder-filterOperationContains"),notContains:O.format("dxFilterBuilder-filterOperationNotContains"),endsWith:O.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:O.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:O.format("dxFilterBuilder-filterOperationIsNotBlank")}})}_optionChanged(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){let 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:super._optionChanged(e)}}getFilterExpression(){let e=this._getNormalizedFields(),t=m(!0,[],this._model);return hr(Ja(t),e,this._customOperations,UN)}_getNormalizedFields(){return TN(this.option("fields"))}_updateFilter(){this._disableInvalidateForValue=!0;let e=m(!0,[],this._model),t=Ja(e),n=Ja(this._getModel(this.option("value")));JSON.stringify(n)!==JSON.stringify(t)&&this.option("value",t),this._disableInvalidateForValue=!1,this._fireContentReadyAction()}_init(){this._initCustomOperations(),this._initModel(),this._initEditorFactory(),this._initActions(),super._init()}_initEditorFactory(){this._editorFactory=new $8}_initCustomOperations(){this._customOperations=PN(this.option("customOperations"),this.option("filterOperationDescriptions.between"),this)}_getDefaultGroupOperation(){var e;return((e=this.option("groupOperations"))===null||e===void 0?void 0:e[0])??qN.and}_getModel(e){return Ef(e,this._customOperations,this._getDefaultGroupOperation())}_initModel(){this._model=this._getModel(this.option("value"))}_initActions(){let e=this;e._actions={},H8.forEach(t=>{let n=m({},t.config);e._actions[t.name]=e._createActionByOption(t.name,n)})}executeAction(e,t){let n=this._actions[e];return n&&n(t)}_initMarkup(){this.$element().addClass("dx-filterbuilder"),super._initMarkup(),this._createGroupElementByCriteria(this._model).appendTo(this.$element())}_createConditionElement(e,t){return u("<div>").addClass("dx-filterbuilder-group").append(this._createConditionItem(e,t))}_createGroupElementByCriteria(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=this._createGroupElement(e,t,n),s=o.find(".dx-filterbuilder-group-content"),r=pr(e);for(let a=0;a<r.length;a++){let l=r[a];Uo(l)?this._createGroupElementByCriteria(l,e,n+1).appendTo(s):_i(l)&&this._createConditionElement(l,e).appendTo(s)}return o}_createGroupElement(e,t,n){let o=u("<div>").addClass("dx-filterbuilder-group-item"),s=u("<div>").addClass("dx-filterbuilder-group-content"),r=u("<div>").addClass("dx-filterbuilder-group").append(o).append(s);return t!=null&&this._createRemoveButton(()=>{Of(t,e),r.remove(),this._updateFilter()}).appendTo(o),this._createGroupOperationButton(e).appendTo(o),this._createAddButton(()=>{let a=R0(this._getDefaultGroupOperation());$d(a,e),this._createGroupElement(a,e,n+1).appendTo(s),this._updateFilter()},()=>{let a=this.option("fields")[0],l=DN(a,this._customOperations);$d(l,e),this._createConditionElement(l,e).appendTo(s),this._updateFilter()},n).appendTo(o),r}_createButton(e){return u("<div>").text(e)}_createGroupOperationButton(e){let t=this._getGroupOperations(e),n=ON(e,t),o=n.text,s=t&&t.length<2?this._createButton(o).addClass("dx-state-disabled"):this._createButtonWithMenu({caption:o,menu:{items:t,displayExpr:"text",keyExpr:"value",onItemClick:r=>{n!==r.itemData&&(yN(e,r.itemData.value),s.text(r.itemData.text),n=r.itemData,this._updateFilter())},onContentReady(r){r.component.selectItem(n)},cssClass:"dx-filterbuilder-group-operations"}});return s.addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-group-operation").attr("tabindex",0)}_createButtonWithMenu(e){let t=this,n=function(){t.$element().find(`.${Tf}`).removeClass(Tf),t.$element().find(".dx-overlay .dx-treeview").remove(),t.$element().find(".dx-overlay").remove()},o=this.option("rtlEnabled"),s=o?"right":"left",r=this._createButton(e.caption);m(e.menu,{focusStateEnabled:!0,selectionMode:"single",onItemClick:(a=e.menu.onItemClick,function(l){a(l),l.event.type==="dxclick"&&n()}),onHiding(){r.removeClass(Tf)},position:{my:`${s} top`,at:`${s} bottom`,offset:"0 1",of:r,collision:"flip"},animation:null,onHidden(){n()},cssClass:`dx-filterbuilder-overlay ${e.menu.cssClass}`,rtlEnabled:o});var a;return e.popup={onShown(l){let d=u(l.component.content()).find(".dx-treeview"),c=d.dxTreeView("instance");_.on(d,"keyup keydown",h=>{let p=ke(h);(h.type==="keydown"&&p==="tab"||h.type==="keyup"&&(p==="escape"||p==="enter"))&&(l.component.hide(),_.trigger(e.menu.position.of,"focus"))}),c.focus(),c.option("focusedElement",null)}},this._subscribeOnClickAndEnterKey(r,()=>{n(),t._createPopupWithTreeView(e,t.$element()),r.addClass(Tf)}),r}_hasValueButton(e){let t=Ko(this._customOperations,e[1]);return t?t.hasValue!==!1:e[2]!==null}_createOperationButtonWithMenu(e,t){let n=this,o=IN(t,this.option("filterOperationDescriptions"),this._customOperations),s=SN(L0(e),o),r=this._createButtonWithMenu({caption:s.text,menu:{items:o,displayExpr:"text",onItemRendered(a){a.itemData.isCustom&&u(a.itemElement).addClass("dx-filterbuilder-menu-custom-operation")},onContentReady(a){a.component.selectItem(s)},onItemClick:a=>{if(s!==a.itemData){s=a.itemData,If(e,s.value,n._customOperations);let l=r.siblings().filter(".dx-filterbuilder-item-value");n._hasValueButton(e)?(l.length!==0&&l.remove(),n._createValueButton(e,t).appendTo(r.parent())):l.remove(),r.text(s.text),this._updateFilter()}},cssClass:"dx-filterbuilder-operations"}}).addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-item-operation").attr("tabindex",0);return r}_createOperationAndValueButtons(e,t,n){this._createOperationButtonWithMenu(e,t).appendTo(n),this._hasValueButton(e)&&this._createValueButton(e,t).appendTo(n)}_createFieldButtonWithMenu(e,t,n){let o=this,s=this.option("allowHierarchicalFields"),r=k0(e,s),a=zd(n.name||n.dataField,r),l=function(c,h){return s?V0(c,h):c.caption};t[0]=a.name||a.dataField;let d=this._createButtonWithMenu({caption:l(a,r),menu:{items:r,dataStructure:"plain",keyExpr:"id",parentId:"parentId",displayExpr:"caption",onItemClick:c=>{if(a!==c.itemData){a=c.itemData,t[0]=a.name||a.dataField,t[2]=a.dataType==="object"?null:"",If(t,rh(a),o._customOperations),d.siblings().filter(".dx-filterbuilder-text").remove(),o._createOperationAndValueButtons(t,a,d.parent());let h=l(a,c.component.option("items"));d.text(h),this._updateFilter()}},onContentReady(c){c.component.selectItem(a)},cssClass:"dx-filterbuilder-fields"}}).addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-item-field").attr("tabindex",0);return d}_createConditionItem(e,t){let n=u("<div>").addClass("dx-filterbuilder-group-item"),o=this._getNormalizedFields(),s=zd(e[0],o);return this._createRemoveButton(()=>{Of(t,e),n.parent().children().length===1?n.parent().remove():n.remove(),this._updateFilter()}).appendTo(n),this._createFieldButtonWithMenu(o,e,s).appendTo(n),this._createOperationAndValueButtons(e,s,n),n}_getGroupOperations(e){let t=this.option("groupOperations"),n=this.option("groupOperationDescriptions");return(!t||!t.length)&&(t=[gr(e).replace("!","not")]),t.map(o=>({text:n[o],value:qN[o]}))}_createRemoveButton(e){let t=u("<div>").addClass(KN).addClass("dx-icon-remove").addClass("dx-filterbuilder-action").attr("tabindex",0);return this._subscribeOnClickAndEnterKey(t,e),t}_createAddButton(e,t,n){let o,s=this.option("maxGroupLevel");return f(s)&&n>=s?(o=this._createButton(),this._subscribeOnClickAndEnterKey(o,t)):o=this._createButtonWithMenu({menu:{items:[{caption:O.format("dxFilterBuilder-addCondition"),click:t},{caption:O.format("dxFilterBuilder-addGroup"),click:e}],displayExpr:"caption",onItemClick(r){r.itemData.click()},cssClass:"dx-filterbuilder-add-condition"}}),o.addClass(KN).addClass("dx-icon-plus").addClass("dx-filterbuilder-action").attr("tabindex",0)}_createValueText(e,t,n){let o=this,s=u("<div>").html("&nbsp;").addClass("dx-filterbuilder-item-value-text").attr("tabindex",0).appendTo(n),r=e[2],a=Ko(o._customOperations,e[1]);return!a&&t.lookup?wf(t,r,l=>{ah(s,l)}):P(Sf(t,r,a)).done(l=>{ah(s,l,a)}),o._subscribeOnClickAndEnterKey(s,l=>{l.type==="keyup"&&l.stopPropagation(),o._createValueEditorWithEvents(e,t,n)}),s}_updateConditionValue(e,t,n){e[2]!==t&&(e[2]=t),n(),this._updateFilter()}_addDocumentKeyUp(e,t){let n=!1,o=!1,s=S.getDocument(),r=l=>{if(n||o){o=!1;return}t(l)};_.on(s,"keyup",r);let a=e.find("input");_.on(a,"compositionstart",()=>{n=!0}),_.on(a,"compositionend",()=>{n=!1,o=!0}),_.on(a,"keydown",l=>{l.which!==229&&(o=!1)}),this._documentKeyUpHandler=r}_addDocumentClick(e,t){let n=S.getDocument(),o=s=>{this._isFocusOnEditorParts(e,s.target)||(_.trigger(e.find("input"),"change"),t())};_.on(n,"dxpointerdown",o),this._documentClickHandler=o}_isFocusOnEditorParts(e,t){let n=t||S.getActiveElement();return u(n).closest(e.children()).length||u(n).closest(".dx-dropdowneditor-overlay").length}_removeEvents(){let e=S.getDocument();f(this._documentKeyUpHandler)&&_.off(e,"keyup",this._documentKeyUpHandler),f(this._documentClickHandler)&&_.off(e,"dxpointerdown",this._documentClickHandler)}_dispose(){this._removeEvents(),super._dispose()}_createValueEditorWithEvents(e,t,n){let o=e[2],s=()=>(n.empty(),this._removeEvents(),this._createValueText(e,t,n)),r=()=>{this._updateConditionValue(e,o,()=>{s()})},a={value:o===""?null:o,filterOperation:L0(e),setValue(d){o=d===null?"":d},closeEditor:r,text:n.text()};n.empty();let l=this._createValueEditor(n,t,a);_.trigger(l.find("input").not(":hidden").eq(0),"focus"),this._removeEvents(),this._addDocumentClick(l,r),this._addDocumentKeyUp(l,d=>{let c=ke(d);if(c==="tab"){if(this._isFocusOnEditorParts(l))return;this._updateConditionValue(e,o,()=>{s(),d.shiftKey&&_.trigger(n.prev(),"focus")})}c==="escape"&&_.trigger(s(),"focus"),c==="enter"&&this._updateConditionValue(e,o,()=>{_.trigger(s(),"focus")})}),this._fireContentReadyAction()}_createValueButton(e,t){let n=u("<div>").addClass("dx-filterbuilder-text").addClass("dx-filterbuilder-item-value");return this._createValueText(e,t,n),n}_createValueEditor(e,t,n){let o=u("<div>").attr("tabindex",0).appendTo(e),s=Ko(this._customOperations,n.filterOperation),r=s&&s.editorTemplate?s.editorTemplate:t.editorTemplate;return r?this._getTemplate(r).render({model:m({field:t},n),container:o}):this._editorFactory.createEditor.call(this,o,m({},t,n,{parentType:UN})),o}_createPopupWithTreeView(e,t){let n=this,o=u("<div>").addClass(e.menu.cssClass).appendTo(t);this._createComponent(o,Oi,{onHiding:e.menu.onHiding,onHidden:e.menu.onHidden,rtlEnabled:e.menu.rtlEnabled,position:e.menu.position,animation:e.menu.animation,contentTemplate(s){let r=u("<div>").appendTo(s);n._createComponent(r,vs,e.menu),this.repaint()},_ignoreFunctionValueDeprecation:!0,maxHeight:()=>Nd(e.menu.position.of),visible:!0,focusStateEnabled:!1,preventScrollEvents:!1,hideOnParentScroll:this.option("closePopupOnTargetScroll"),hideOnOutsideClick:!0,onShown:e.popup.onShown,shading:!1,width:"auto",height:"auto",showTitle:!1,_wrapperClassExternal:e.menu.cssClass,_ignorePreventScrollEventsDeprecation:!0})}_subscribeOnClickAndEnterKey(e,t){_.on(e,"dxclick",t),_.on(e,"keyup",n=>{ke(n)==="enter"&&t(n)})}};K("dxFilterBuilder",Af);var YN=Af;var XN=YN;var W0=class extends ye.View{init(){super.init(),this._columnsController=this.getController("columns"),this._filterSyncController=this.getController("filterSync")}optionChanged(e){switch(e.name){case"filterBuilder":case"filterBuilderPopup":this._invalidate(),e.handled=!0;break;default:super.optionChanged(e)}}_renderCore(){this._updatePopupOptions()}_updatePopupOptions(){this.option("filterBuilderPopup.visible")?this._initPopup():this._filterBuilderPopup&&this._filterBuilderPopup.hide()}_disposePopup(){this._filterBuilderPopup&&(this._filterBuilderPopup.dispose(),this._filterBuilderPopup=void 0),this._filterBuilder&&(this._filterBuilder.dispose(),this._filterBuilder=void 0)}_initPopup(){let e=this;e._disposePopup(),e._filterBuilderPopup=e._createComponent(e.element(),Oi,m({title:O.format("dxDataGrid-filterBuilderPopupTitle"),contentTemplate:t=>e._getPopupContentTemplate(t),onOptionChanged(t){t.name==="visible"&&e.option("filterBuilderPopup.visible",t.value)},toolbarItems:e._getPopupToolbarItems()},e.option("filterBuilderPopup"),{onHidden(){cd(e),e._disposePopup()}}))}_getPopupContentTemplate(e){let t=u(e),n=u("<div>").appendTo(u(e));this._filterBuilder=this._createComponent(n,XN,m({value:this.option("filterValue"),fields:this._columnsController.getFilteringColumns()},this.option("filterBuilder"),{customOperations:this._filterSyncController.getCustomFilterOperations()})),this._createComponent(t,fd,{direction:"both"})}_getPopupToolbarItems(){let e=this;return[{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:O.format("OK"),onClick(){let t=e._filterBuilder.option("value");e.option("filterValue",t),e._filterBuilderPopup.hide()}}},{toolbar:"bottom",location:"after",widget:"dxButton",options:{text:O.format("Cancel"),onClick(){e._filterBuilderPopup.hide()}}}]}},QN={defaultOptions:()=>({filterBuilder:{groupOperationDescriptions:{and:O.format("dxFilterBuilder-and"),or:O.format("dxFilterBuilder-or"),notAnd:O.format("dxFilterBuilder-notAnd"),notOr:O.format("dxFilterBuilder-notOr")},filterOperationDescriptions:{between:O.format("dxFilterBuilder-filterOperationBetween"),equal:O.format("dxFilterBuilder-filterOperationEquals"),notEqual:O.format("dxFilterBuilder-filterOperationNotEquals"),lessThan:O.format("dxFilterBuilder-filterOperationLess"),lessThanOrEqual:O.format("dxFilterBuilder-filterOperationLessOrEquals"),greaterThan:O.format("dxFilterBuilder-filterOperationGreater"),greaterThanOrEqual:O.format("dxFilterBuilder-filterOperationGreaterOrEquals"),startsWith:O.format("dxFilterBuilder-filterOperationStartsWith"),contains:O.format("dxFilterBuilder-filterOperationContains"),notContains:O.format("dxFilterBuilder-filterOperationNotContains"),endsWith:O.format("dxFilterBuilder-filterOperationEndsWith"),isBlank:O.format("dxFilterBuilder-filterOperationIsBlank"),isNotBlank:O.format("dxFilterBuilder-filterOperationIsNotBlank")}},filterBuilderPopup:{}}),views:{filterBuilderView:W0}};$.registerModule("filterBuilder",QN);var G0=class extends ye.View{init(){this._dataController=this.getController("data"),this._columnsController=this.getController("columns"),this._filterSyncController=this.getController("filterSync"),this._dataController.dataSourceChanged.add(()=>this.render())}isVisible(){return this.option("filterPanel.visible")&&this._dataController.dataSource()}_renderCore(){let e=this.element();if(e.empty(),!!!this._columnsController.getColumns().length)return;e.addClass(this.addWidgetPrefix("filter-panel"));let n=u("<div>").addClass(this.addWidgetPrefix("filter-panel-left")).appendTo(e);this._renderFilterBuilderText(e,n)}_renderFilterBuilderText(e,t){let n=this._getFilterElement(),o=this._getTextElement();if(this.option("filterValue")||this._filterValueBuffer){let s=this._getCheckElement(),r=this._getRemoveButtonElement();t.append(s).append(n).append(o),e.append(r);return}t.append(n).append(o)}_getCheckElement(){let e=this,t=u("<div>").addClass(this.addWidgetPrefix("filter-panel-checkbox"));return e._createComponent(t,na,{value:e.option("filterPanel.filterEnabled"),onValueChanged(n){e.option("filterPanel.filterEnabled",n.value)}}),t.attr("title",this.option("filterPanel.texts.filterEnabledHint")),t}_getFilterElement(){let e=this,t=u("<div>").addClass("dx-icon-filter");return _.on(t,"click",()=>e._showFilterBuilder()),Kr("filterPanel",e,t,void 0,()=>e._showFilterBuilder()),e._addTabIndexToElement(t),t}_getTextElement(){let e=this,t=u("<div>").addClass(e.addWidgetPrefix("filter-panel-text")),n,o=e.option("filterValue");return o?P(e.getFilterText(o,this._filterSyncController.getCustomFilterOperations())).done(s=>{let r=e.option("filterPanel.customizeText");if(r){let a=r({component:e.component,filterValue:o,text:s});typeof a=="string"&&(s=a)}t.text(s)}):(n=e.option("filterPanel.texts.createFilter"),t.text(n)),_.on(t,"click",()=>e._showFilterBuilder()),Kr("filterPanel",e,t,void 0,()=>e._showFilterBuilder()),e._addTabIndexToElement(t),t}_showFilterBuilder(){this.option("filterBuilderPopup.visible",!0)}_getRemoveButtonElement(){let e=this,t=()=>e.option("filterValue",null),n=u("<div>").addClass(e.addWidgetPrefix("filter-panel-clear-filter")).text(e.option("filterPanel.texts.clearFilter"));return _.on(n,"click",t),Kr("filterPanel",this,n,void 0,t),e._addTabIndexToElement(n),n}_addTabIndexToElement(e){if(!this.option("useLegacyKeyboardNavigation")){let t=this.option("tabindex")||0;e.attr("tabindex",t)}}optionChanged(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:super.optionChanged(e)}}_getConditionText(e,t,n){let o=`[${e}] ${t}`;return f(n)&&(o+=n),o}_getValueMaskedText(e){return Array.isArray(e)?`('${e.join("', '")}')`:` '${e}'`}_getValueText(e,t,n){let o=new y,s=t&&t.customizeText;if(f(n)||s)if(!s&&e.lookup)wf(e,n,r=>{o.resolve(this._getValueMaskedText(r))});else{let r=Array.isArray(n)?n:R.getDisplayValue(e,n,null);P(Sf(e,r,t,"filterPanel")).done(a=>{o.resolve(this._getValueMaskedText(a))})}else o.resolve("");return o.promise()}getConditionText(e,t){let n=this,o=e[1],s=new y,r=Ko(t.customOperations,o),a,l=zd(e[0],t.columns),d=l.caption||"",c=e[2];return r?a=r.caption||to(r.name):c===null?a=yf(o==="="?"isblank":"isnotblank",t.filterOperationDescriptions):a=yf(o,t.filterOperationDescriptions),this._getValueText(l,r,c).done(h=>{s.resolve(n._getConditionText(d,a,h))}),s}getGroupText(e,t,n){let o=this,s=new y,r=[],a=gr(e);return e.forEach(l=>{_i(l)?r.push(o.getConditionText(l,t)):Uo(l)&&r.push(o.getGroupText(l,t,!0))}),P.apply(this,r).done(function(){let l;for(var d=arguments.length,c=new Array(d),h=0;h<d;h++)c[h]=arguments[h];a.startsWith("!")?l=`${t.groupOperationDescriptions[`not${a.substring(1,2).toUpperCase()}${a.substring(2)}`].split(" ")[0]} ${c[0]}`:l=c.join(` ${t.groupOperationDescriptions[a]} `),n&&(l=`(${l})`),s.resolve(l)}),s}getFilterText(e,t){let n={customOperations:t,columns:this._columnsController.getFilteringColumns(),filterOperationDescriptions:this.option("filterBuilder.filterOperationDescriptions"),groupOperationDescriptions:this.option("filterBuilder.groupOperationDescriptions")};return _i(e)?this.getConditionText(e,n):this.getGroupText(e,n)}},z8=i=>class extends i{optionChanged(e){e.name==="filterPanel"?(this._applyFilter(),e.handled=!0):super.optionChanged(e)}},ZN={defaultOptions:()=>({filterPanel:{visible:!1,filterEnabled:!0,texts:{createFilter:O.format("dxDataGrid-filterPanelCreateFilter"),clearFilter:O.format("dxDataGrid-filterPanelClearFilter"),filterEnabledHint:O.format("dxDataGrid-filterPanelFilterEnabledHint")}}}),views:{filterPanelView:G0},extenders:{controllers:{data:z8}}};$.registerModule("filterPanel",ZN);function JN(i){return!!(i.allowSearch??i.allowFiltering)}function eH(i,e){let{lookup:t}=i;return i.parseValue?t?i.parseValue.call(t,e):i.parseValue(e):e}var W8=i=>class extends i{optionChanged(e){switch(e.fullName){case"searchPanel.text":case"searchPanel":this._applyFilter(),e.handled=!0;break;default:super.optionChanged(e)}}publicMethods(){return super.publicMethods().concat(["searchByText"])}_calculateAdditionalFilter(){var e,t,n;let o=(e=this._dataController)===null||e===void 0||(t=e.getDataSource)===null||t===void 0?void 0:t.call(e),s=o==null||(n=o.loadOptions)===null||n===void 0||(n=n.call(o))===null||n===void 0?void 0:n.langParams,r=super._calculateAdditionalFilter(),a=this.calculateSearchFilter(this.option("searchPanel.text"),s);return R.combineFilters([r,a])}searchByText(e){this.option("searchPanel.text",e)}calculateSearchFilter(e,t){let n,o=this._columnsController.getColumns(),s=this.option("searchPanel.searchVisibleColumnsOnly"),r,a=[];if(!e)return null;function l(c){let h=Ce(r.valueExpr);for(let p=0;p<c.length;p++){let g=h(c[p]);a.push(n.createFilterExpression(g,null,"search"))}}for(let c=0;c<o.length;c++)if(n=o[c],!(s&&!n.visible)&&JN(n)&&n.calculateFilterExpression){var d;r=n.lookup;let h=eH(n,e);(d=r)!==null&&d!==void 0&&d.items?Mt(r.items,{langParams:t}).filter(n.createFilterExpression.call({dataField:r.displayExpr,dataType:r.dataType,calculateFilterExpression:n.calculateFilterExpression},h,null,"search")).enumerate().done(l):h!==void 0&&a.push(n.createFilterExpression(h,null,"search"))}return a.length===0?["!"]:R.combineFilters(a,"or")}},G8=i=>class extends i{optionChanged(e){if(e.name==="searchPanel"){if(e.fullName==="searchPanel.text"){let t=this.getSearchTextEditor();t&&t.option("value",e.value)}else this._invalidate();e.handled=!0}else super.optionChanged(e)}_getToolbarItems(){let e=super._getToolbarItems();return this._prepareSearchItem(e)}_prepareSearchItem(e){let t=this,n=this._dataController,o=this.option("searchPanel");if(o&&o.visible){let s={template(r,a,l){let d=u("<div>").addClass(t.addWidgetPrefix("search-panel")).appendTo(l);t._editorFactoryController.createEditor(d,{width:o.width,placeholder:o.placeholder,parentType:"searchPanel",value:t.option("searchPanel.text"),updateValueTimeout:700,setValue(c){n.searchByText(c)},editorOptions:{inputAttr:{"aria-label":O.format(`${t.component.NAME}-ariaSearchInGrid`)}}}),t.resize()},name:"searchPanel",location:"after",locateInMenu:"never",sortIndex:40};e.push(s)}return e}getSearchTextEditor(){let e=this,t=e.element(),n=t.find(`.${e.addWidgetPrefix("search-panel")}`).filter(function(){return u(this).closest(`.${e.addWidgetPrefix("header-panel")}`).is(t)});return n.length?n.dxTextBox("instance"):null}},j8=i=>class extends i{init(){super.init.apply(this,arguments),this._searchParams=[],this._dataController=this.getController("data")}dispose(){clearTimeout(this._highlightTimer),super.dispose()}_getFormattedSearchText(e,t){let n=eH(e,t),o=R.getFormatOptionsByColumn(e,"search");return R.formatValue(n,o)}_getStringNormalizer(){var e,t,n;let o=this.option("searchPanel.highlightCaseSensitive"),s=(e=this._dataController)===null||e===void 0||(t=e.getDataSource)===null||t===void 0?void 0:t.call(e),r=s==null||(n=s.loadOptions)===null||n===void 0||(n=n.call(s))===null||n===void 0?void 0:n.langParams;return a=>Pt(a,o,r)}_findHighlightingTextNodes(e,t,n){var o;let s=this,r=t.parent(),a,l=this._getStringNormalizer(),d=l(n),c=[];if(!r.length)r=u("<div>").append(t);else if(e)if(e.groupIndex>=0&&!e.showWhenGrouped)a=t;else{let h=s._columnsController.getVisibleIndex(e.index);a=r.children("td").eq(h).find("*")}return a=(o=a)!==null&&o!==void 0&&o.length?a:r.find("*"),a.each((h,p)=>{let g=u(p).contents();for(let C=0;C<g.length;C++){let v=g.get(C);v.nodeType===3&&l(v.textContent??v.nodeValue??"").includes(d)&&c.push(v)}}),c}_highlightSearchTextCore(e,t){let n=this,o=u("<span>").addClass(n.addWidgetPrefix("search-text")),s=e.text(),r=e[0],a=this._getStringNormalizer(),l=a(s).indexOf(a(t));if(l>=0)return r.textContent?r.textContent=s.substr(0,l):r.nodeValue=s.substr(0,l),e.after(o.text(s.substr(l,t.length))),e=u(S.createTextNode(s.substr(l+t.length))).insertAfter(o),n._highlightSearchTextCore(e,t)}_highlightSearchText(e,t,n){let o=this,s=this._getStringNormalizer(),r=o.option("searchPanel.text");t&&n&&(r=r&&o._getFormattedSearchText(n,r)),r&&o.option("searchPanel.highlightSearchText")&&o._findHighlightingTextNodes(n,e,r).forEach(l=>{t?s(u(l).text())===s(r??"")&&u(l).replaceWith(u("<span>").addClass(o.addWidgetPrefix("search-text")).text(u(l).text())):o._highlightSearchTextCore(u(l),r)})}_renderCore(){let e=super._renderCore.apply(this,arguments);return(this.option().rowTemplate||this.option("dataRowTemplate"))&&(this.option("templatesRenderAsynchronously")?(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout(()=>{this._highlightSearchText(this.getTableElement())})):this._highlightSearchText(this.getTableElement())),e}_updateCell(e,t){let{column:n}=t,s=(n.lookup&&n.lookup.dataType||n.dataType)!=="string";JN(n)&&!t.isOnForm&&(this.option("templatesRenderAsynchronously")?(this._searchParams.length||(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout(()=>{this._searchParams.forEach(r=>{this._highlightSearchText.apply(this,r)}),this._searchParams=[]})),this._searchParams.push([e,s,n])):this._highlightSearchText(e,s,n)),super._updateCell(e,t)}},tH={defaultOptions:()=>({searchPanel:{visible:!1,width:160,placeholder:O.format("dxDataGrid-searchPanelPlaceholder"),highlightSearchText:!0,highlightCaseSensitive:!1,text:"",searchVisibleColumnsOnly:!1}}),extenders:{controllers:{data:W8},views:{headerPanel:G8,rowsView:j8}}};$.registerModule("search",tH);var Mf=class extends nd{_optionChanged(e){switch(e.name){case"pageIndex":{let t=this.option("pageIndexChanged");t&&t(e.value);break}case"pageSize":{let t=this.option("pageSizeChanged");t&&t(e.value);break}}super._optionChanged(e)}};function j0(i){var e;let t=q();return i?(e=t.getComputedStyle)===null||e===void 0?void 0:e.call(t,i):null}function As(i,e){let t=j0(e)??{};return bm(t[i])}function iH(i){let e=As("paddingLeft",i)+As("paddingRight",i);return As("width",i)-e}function lh(i){let e=As("marginLeft",i)+As("marginRight",i),t=As("width",i);return e+t}function Rf(i){return As("minWidth",i)}var K8=["contentTemplate","pagerProps"],U8=i=>{let{contentAttributes:e,infoTextRef:t,infoTextVisible:n,isLargeDisplayMode:o,pageSizesRef:s,pagesRef:r,parentRef:a,props:{contentTemplate:l}}=i;return l(I({rootElementRef:a,pageSizesRef:s,infoTextRef:t,pagesRef:r,infoTextVisible:n,isLargeDisplayMode:o},e))};function q8(i){let{pageSizes:e,pages:t,parent:n}=i;return n-(e+t)>0}function Y8(i){let{info:e,pageSizes:t,pages:n,parent:o}=i,s=t+n+e;return o-s>0}function X8(i){let{info:e,pageSizes:t,pages:n,parent:o}=i,s=iH(o),r=lh(t),a=lh(e),l=lh(n);return{parent:s,pageSizes:r,info:a+As("marginLeft",e)+As("marginRight",e),pages:l}}var Q8={},Z8=i=>i&&(i.defaultProps?e=>Ft(Re(2,i,I({},e))):i),nH=(()=>{class i extends $i{constructor(t){super(t),this.parentRef=Ct(),this.pageSizesRef=Ct(),this.infoTextRef=Ct(),this.pagesRef=Ct(),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 Ke(this.subscribeToResize,[this.state.infoTextVisible,this.state.isLargeDisplayMode]),new Ke(this.effectUpdateChildProps,[this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])]}updateEffects(){var t,n;(t=this._effects[0])===null||t===void 0||t.update([this.state.infoTextVisible,this.state.isLargeDisplayMode]),(n=this._effects[1])===null||n===void 0||n.update([this.props,this.state.infoTextVisible,this.state.isLargeDisplayMode,this.props.pagerProps,this.props.contentTemplate])}subscribeToResize(){let t=()=>{this.parentWidth>0&&this.updateAdaptivityProps()};return Mo.add(t),()=>{Mo.remove(t)}}effectUpdateChildProps(){this.parentWidth>0&&this.updateAdaptivityProps()}get contentAttributes(){let{className:t,displayMode:n,gridCompatibility:o,hasKnownLastPage:s,infoText:r,label:a,lightModeEnabled:l,maxPagesCount:d,onKeyDown:c,pageCount:h,pageIndex:p,pageIndexChange:g,pageSize:C,pageSizeChange:v,pageSizes:b,pagesCountText:T,pagesNavigatorVisible:M,rtlEnabled:G,showInfo:te,showNavigationButtons:oe,showPageSizes:re,totalCount:Ie,visible:Fe}=this.props.pagerProps;return I({},this.restAttributes,{pageSize:C,pageIndex:p,pageIndexChange:g,pageSizeChange:v,gridCompatibility:o,className:t,showInfo:te,infoText:r,lightModeEnabled:l,displayMode:n,maxPagesCount:d,pageCount:h,pagesCountText:T,visible:Fe,hasKnownLastPage:s,pagesNavigatorVisible:M,showPageSizes:re,pageSizes:b,rtlEnabled:G,showNavigationButtons:oe,totalCount:Ie,onKeyDown:c,label:a})}get parentWidth(){return this.parentRef.current?lh(this.parentRef.current):0}updateAdaptivityProps(){let t=X8({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)return;let n=!f(this.elementsWidth);n&&(this.elementsWidth={}),(n||this.state.isLargeDisplayMode)&&(this.elementsWidth.pageSizes=t.pageSizes,this.elementsWidth.pages=t.pages),(n||this.state.infoTextVisible)&&(this.elementsWidth.info=t.info),this.actualIsLargeDisplayMode=q8(I({parent:t.parent},{pageSizes:this.elementsWidth.pageSizes,pages:this.elementsWidth.pages})),this.actualInfoTextVisible=Y8(I({},t,{info:this.elementsWidth.info})),this.setState(o=>({infoTextVisible:this.actualInfoTextVisible})),this.setState(o=>({isLargeDisplayMode:this.actualIsLargeDisplayMode}))}get restAttributes(){let t=this.props;return _e(t,K8)}render(){let t=this.props;return U8({props:I({},t,{contentTemplate:Z8(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})}}return i.defaultProps=Q8,i})();var K0={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,get label(){return O.format("dxPager-ariaLabel")}};var oH=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(K0),Object.getOwnPropertyDescriptors({defaultPageSize:5,pageSizeChange:()=>{},defaultPageIndex:1,pageIndexChange:()=>{}}))),Tt=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(K0),Object.getOwnPropertyDescriptors({pageSize:5,pageIndex:1})));var J8=["infoText","pageCount","pageIndex","rootElementRef","totalCount"],sH="dx-info",eZ=i=>{let{props:{rootElementRef:e},text:t}=i;return tt(1,"div","dx-info",t,0,null,null,e)};var tZ={get pageIndex(){return Tt.pageIndex},get pageCount(){return Tt.pageCount},get totalCount(){return Tt.totalCount}},rH=(()=>{class i extends Dt{constructor(t){super(t),this.state={}}get infoText(){return(this.props.infoText??"")||O.getFormatter("dxPager-infoText")()}get text(){let{pageCount:t,pageIndex:n,totalCount:o}=this.props;return Gi(this.infoText,(n+1).toString(),t.toString(),o.toString())}get restAttributes(){let t=this.props;return _e(t,J8)}render(){let t=this.props;return eZ({props:I({},t),infoText:this.infoText,text:this.text,restAttributes:this.restAttributes})}}return i.defaultProps=tZ,i})();var el=Fg(void 0);var iZ=["children","className","label","onClick","selected","tabIndex"],nZ=i=>{let{props:{children:e,className:t,label:n,selected:o,tabIndex:s},widgetRef:r}=i;return tt(1,"div",t,e,0,{tabIndex:s,role:"button","aria-label":n,"aria-current":o?"page":void 0},null,r)},oZ={className:"",label:"",tabIndex:0,selected:!1},tl=(()=>{class i extends $i{get keyboardContext(){return this.context[el.id]?this.context[el.id]:el.defaultValue}constructor(t){super(t),this.state={},this.widgetRef=Ct(),this.keyboardEffect=this.keyboardEffect.bind(this),this.subscribeToClick=this.subscribeToClick.bind(this)}createEffects(){return[new Ke(this.keyboardEffect,[this.keyboardContext,this.props.onClick]),new Ke(this.subscribeToClick,[this.props.onClick])]}updateEffects(){var t,n;(t=this._effects[0])===null||t===void 0||t.update([this.keyboardContext,this.props.onClick]),(n=this._effects[1])===null||n===void 0||n.update([this.props.onClick])}keyboardEffect(){return this.keyboardContext.registerKeyboardAction(this.widgetRef.current,this.props.onClick)}subscribeToClick(){return WM(this.widgetRef.current,this.props.onClick)}get restAttributes(){let t=this.props;return _e(t,iZ)}render(){let t=this.props;return nZ({props:I({},t),widgetRef:this.widgetRef,keyboardContext:this.keyboardContext,restAttributes:this.restAttributes})}}return i.defaultProps=oZ,i})();var aH="dx-pager",lH="dx-light-mode",dH="dx-pages",cH="dx-page-indexes",uH="dx-page",hH="dx-selection",pH="dx-page-size",gH="dx-page-sizes",mH="dx-page-size dx-selection",fH="dx-first-child";var sZ=["className","index","onClick","selected"],rZ=i=>{let{className:e,label:t,props:{onClick:n,selected:o},value:s}=i;return Re(2,tl,{className:e,label:t,onClick:n,selected:o,children:s})},aZ={index:0,selected:!1,className:uH},Ff=(()=>{class i extends Dt{constructor(t){super(t),this.state={}}get label(){return Gi(O.getFormatter("dxPager-page"),this.value)}get value(){return this.props.index+1}get className(){let{selected:t}=this.props;return yi({[`${this.props.className}`]:!!this.props.className,[hH]:!!t})}get restAttributes(){let t=this.props;return _e(t,sZ)}render(){let t=this.props;return rZ({props:I({},t),label:this.label,value:this.value,className:this.className,restAttributes:this.restAttributes})}}return i.defaultProps=aZ,i})();var lZ=["pageIndexes"],dZ=["maxPagesCount","pageCount","pageIndex","pageIndexChange"];var cZ=i=>{let{pages:e}=i,t=e.map(n=>{let{key:o,pageProps:s}=n;return s?Re(2,Ff,{index:s.index,selected:s.selected,onClick:s.onClick},o):tt(1,"div","dx-separator",". . .",16,null,o)});return fn(t,0)};function _H(i,e,t){return i===1?"high":i+e===t-1?"low":"both"}function xH(i,e,t){let n=[],o=[];switch(t){case"none":n=[...i];break;case"both":n=[0,"low",...i,"high",e-1],o=i.slice(1,-1);break;case"high":n=[0,...i,"high",e-1],o=i.slice(0,-1);break;case"low":n=[0,"low",...i,e-1],o=i.slice(1)}return{slidingWindowIndexes:i,indexesForReuse:o,pageIndexes:n}}function CH(i,e,t,n){let o=[];for(let s=0;s<e;s+=1)o.push(s+i);return xH(o,t,n)}var uZ={get pageIndex(){return Tt.pageIndex},get maxPagesCount(){return Tt.maxPagesCount},get pageCount(){return Tt.pageCount}},vH=(()=>{class i extends Dt{get config(){return this.context[li.id]?this.context[li.id]:li.defaultValue}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 slidingWindowState(){let t=this.slidingWindowStateHolder;return t||{indexesForReuse:[],slidingWindowIndexes:[]}}canReuseSlidingWindow(t,n){let{indexesForReuse:o}=this.slidingWindowState,s=o.slice(-1)[0]<t-1,r=o.includes(n);return s&&r}generatePageIndexes(){let{pageCount:t,pageIndex:n}=this.props,o=0,{slidingWindowIndexes:s}=this.slidingWindowState;n===s[0]?o=n-1:n===s[s.length-1]?o=n+2-4:n<4?o=1:n>=t-4?o=t-4-1:o=n-1;let r=_H(o,4,t),a=CH(o,4,t,r),{pageIndexes:l}=a,d=_e(a,lZ);return this.slidingWindowStateHolder=d,l}isSlidingWindowMode(){let{maxPagesCount:t,pageCount:n}=this.props;return n<=4||n<=t}onPageClick(t){this.props.pageIndexChange(t)}get pageIndexes(){let{pageCount:t}=this.props;if(this.isSlidingWindowMode())return CH(0,t,t,"none").pageIndexes;if(this.canReuseSlidingWindow(t,this.props.pageIndex)){let{slidingWindowIndexes:n}=this.slidingWindowState,o=_H(n[0],4,t);return xH(n,t,o).pageIndexes}return this.generatePageIndexes()}get pages(){var t;let{pageIndex:n}=this.props,o=r=>{let a=r==="low"||r==="high"?null:{index:r,onClick:()=>this.onPageClick(r),selected:n===r};return{key:r.toString(),pageProps:a}};return((t=this.config)!==null&&t!==void 0&&t.rtlEnabled?[...this.pageIndexes].reverse():this.pageIndexes).map(r=>o(r))}get restAttributes(){let t=this.props;return _e(t,dZ)}render(){let t=this.props;return cZ({props:I({},t),config:this.config,pageIndexes:this.pageIndexes,pages:this.pages,restAttributes:this.restAttributes})}}return i.defaultProps=uZ,i})();var ca={hoverStateEnabled:!0,activeStateEnabled:!0,get focusStateEnabled(){return F.real().deviceType==="desktop"&&!F.isSimulator()}};var Wd={label:"",get labelMode(){return ht(yt())?"floating":"static"}};var hZ=["accessKey","activeStateEnabled","className","defaultValue","disabled","focusStateEnabled","height","hint","hoverStateEnabled","inputAttr","invalidValueMessage","isDirty","isValid","label","labelMode","max","min","mode","name","onClick","onFocusIn","onKeyDown","readOnly","rtlEnabled","showSpinButtons","step","tabIndex","useLargeSpinButtons","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","visible","width"];var pZ=i=>{let{componentProps:e,restAttributes:t}=i;return Ft(Re(2,Cd,I({componentType:ja,componentProps:e,templateNames:[]},t)))},Sn=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(kt),Object.getOwnPropertyDescriptors({defaultValue:0,isReactComponentWrapper:!0}))),gZ={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 validationMessagePosition(){return Sn.validationMessagePosition},get validationStatus(){return Sn.validationStatus},get isValid(){return Sn.isValid},get isDirty(){return Sn.isDirty},get inputAttr(){return Sn.inputAttr},get className(){return Sn.className},get activeStateEnabled(){return ca.activeStateEnabled},get disabled(){return Sn.disabled},get focusStateEnabled(){return ca.focusStateEnabled},get hoverStateEnabled(){return ca.hoverStateEnabled},get tabIndex(){return Sn.tabIndex},get visible(){return Sn.visible},get label(){return Wd.label},get labelMode(){return Wd.labelMode},isReactComponentWrapper:!0},bH=(()=>{class i extends Dt{constructor(t){super(t),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue}}get componentProps(){return I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})}get restAttributes(){let t=I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value});return _e(t,hZ)}render(){let t=this.props;return pZ({props:I({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}return i.defaultProps=gZ,i})();function Pf(i,e){return i+10*Math.max(...e).toString().length}var mZ=["inputAttr","pageCount","pageIndex","pageIndexChange","pagesCountText"],fZ=`${sH}  dx-info-text`;var _Z=i=>{let{pageIndexRef:e,pagesCountText:t,props:{inputAttr:n,pageCount:o},selectLastPageIndex:s,value:r,valueChange:a,width:l}=i;return tt(1,"div","dx-light-pages",[Re(2,bH,{className:"dx-page-index",min:1,max:Math.max(o,r),width:l,value:r,valueChange:a,inputAttr:n}),tt(1,"span",fZ,t,0),Re(2,Ff,{className:"dx-pages-count",selected:!1,index:o-1,onClick:s})],4,null,null,e)},CZ={inputAttr:Object.freeze({"aria-label":O.format("dxPager-ariaPageNumber")})},xZ={get pageIndex(){return Tt.pageIndex},get pageCount(){return Tt.pageCount},get inputAttr(){return CZ.inputAttr}},yH=(()=>{class i extends $i{constructor(t){super(t),this.pageIndexRef=Ct(),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 Ke(this.updateWidth,[this.state.minWidth])]}updateEffects(){var t;(t=this._effects[0])===null||t===void 0||t.update([this.state.minWidth])}updateWidth(){var t;let n=(t=this.pageIndexRef.current)===null||t===void 0?void 0:t.querySelector(".dx-page-index");this.setState(o=>({minWidth:n&&Rf(n)||o.minWidth}))}get value(){return this.props.pageIndex+1}get width(){let{pageCount:t}=this.props;return Pf(this.state.minWidth,[t])}get pagesCountText(){return(this.props.pagesCountText??"")||O.getFormatter("dxPager-pagesCountText")()}selectLastPageIndex(){this.props.pageIndexChange(this.props.pageCount-1)}valueChange(t){this.props.pageIndexChange(t-1)}get restAttributes(){let t=this.props;return _e(t,mZ)}render(){let t=this.props;return _Z({props:I({},t),pageIndexRef:this.pageIndexRef,value:this.value,width:this.width,pagesCountText:this.pagesCountText,selectLastPageIndex:this.selectLastPageIndex,valueChange:this.valueChange,restAttributes:this.restAttributes})}}return i.defaultProps=xZ,i})();var vZ=["hasKnownLastPage","isLargeDisplayMode","maxPagesCount","pageCount","pageIndex","pageIndexChange","pagesCountText","showNavigationButtons","totalCount"];var bZ=()=>O.getFormatter("dxPager-nextPage")(),yZ=()=>O.getFormatter("dxPager-prevPage")(),OZ={nextEnabledClass:"dx-navigate-button dx-next-button",prevEnabledClass:"dx-navigate-button dx-prev-button",nextDisabledClass:"dx-button-disable dx-navigate-button dx-next-button",prevDisabledClass:"dx-button-disable dx-navigate-button dx-prev-button"},EZ={next:"prev",prev:"next"},wZ=i=>{let{nextButtonProps:e,pageIndexChange:t,prevButtonProps:n,props:{isLargeDisplayMode:o,maxPagesCount:s,pageCount:r,pageIndex:a,pagesCountText:l},renderNextButton:d,renderPrevButton:c}=i;return fn([c&&Re(2,tl,{label:yZ(),className:n.className,tabIndex:n.tabIndex,onClick:n.navigate}),o&&Re(2,vH,{maxPagesCount:s,pageCount:r,pageIndex:a,pageIndexChange:t}),!o&&Re(2,yH,{pageCount:r,pageIndex:a,pageIndexChange:t,pagesCountText:l}),d&&Re(2,tl,{label:bZ(),className:e.className,tabIndex:e.tabIndex,onClick:e.navigate})],0)};function SZ(i){return i==="next"?1:-1}var IZ={isLargeDisplayMode:!0},DZ={get pageIndex(){return Tt.pageIndex},get maxPagesCount(){return Tt.maxPagesCount},get pageCount(){return Tt.pageCount},get hasKnownLastPage(){return Tt.hasKnownLastPage},get showNavigationButtons(){return Tt.showNavigationButtons},get totalCount(){return Tt.totalCount},get isLargeDisplayMode(){return IZ.isLargeDisplayMode}},OH=(()=>{class i extends Dt{get config(){return this.context[li.id]?this.context[li.id]:li.defaultValue}constructor(t){super(t),this.state={},this.__getterCache={},this.pageIndexChange=this.pageIndexChange.bind(this),this.getButtonProps=this.getButtonProps.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)}pageIndexChange(t){this.canNavigateToPage(t)&&this.props.pageIndexChange(t)}getButtonProps(t){var n;let o=(n=this.config)!==null&&n!==void 0&&n.rtlEnabled?EZ[t]:t,s=this.canNavigateTo(o);return{className:OZ[`${t}${s?"Enabled":"Disabled"}Class`],tabIndex:s?0:-1,navigate:()=>this.navigateToPage(o)}}canNavigateToPage(t){return this.props.hasKnownLastPage?t>=0&&t<=this.props.pageCount-1:t>=0}getNextPageIndex(t){return this.props.pageIndex+SZ(t)}canNavigateTo(t){return this.canNavigateToPage(this.getNextPageIndex(t))}navigateToPage(t){this.pageIndexChange(this.getNextPageIndex(t))}get renderPrevButton(){let{isLargeDisplayMode:t,showNavigationButtons:n}=this.props;return!t||n}get renderNextButton(){return this.renderPrevButton||!this.props.hasKnownLastPage}get prevButtonProps(){return this.__getterCache.prevButtonProps!==void 0?this.__getterCache.prevButtonProps:this.__getterCache.prevButtonProps=this.getButtonProps("prev")}get nextButtonProps(){return this.__getterCache.nextButtonProps!==void 0?this.__getterCache.nextButtonProps:this.__getterCache.nextButtonProps=this.getButtonProps("next")}get restAttributes(){let t=this.props;return _e(t,vZ)}componentWillUpdate(t,n,o){(this.context[li.id]!==o[li.id]||this.props.hasKnownLastPage!==t.hasKnownLastPage||this.props.pageCount!==t.pageCount||this.props.pageIndex!==t.pageIndex||this.props.pageIndexChange!==t.pageIndexChange)&&(this.__getterCache.prevButtonProps=void 0),(this.context[li.id]!==o[li.id]||this.props.hasKnownLastPage!==t.hasKnownLastPage||this.props.pageCount!==t.pageCount||this.props.pageIndex!==t.pageIndex||this.props.pageIndexChange!==t.pageIndexChange)&&(this.__getterCache.nextButtonProps=void 0)}render(){let t=this.props;return wZ({props:I({},t),config:this.config,pageIndexChange:this.pageIndexChange,renderPrevButton:this.renderPrevButton,renderNextButton:this.renderNextButton,prevButtonProps:this.prevButtonProps,nextButtonProps:this.nextButtonProps,restAttributes:this.restAttributes})}}return i.defaultProps=DZ,i})();var TZ=["accessKey","activeStateEnabled","className","dataSource","defaultValue","disabled","displayExpr","focusStateEnabled","height","hint","hoverStateEnabled","inputAttr","isDirty","isValid","label","labelMode","name","onClick","onFocusIn","onKeyDown","placeholder","readOnly","rtlEnabled","searchEnabled","tabIndex","validationError","validationErrors","validationMessageMode","validationMessagePosition","validationStatus","value","valueChange","valueExpr","visible","width"],AZ=i=>{let{componentProps:e,restAttributes:t}=i;return Ft(Re(2,Cd,I({componentType:Nm,componentProps:e,templateNames:["dropDownButtonTemplate","groupTemplate","itemTemplate"]},t)))},ln=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(kt),Object.getOwnPropertyDescriptors({placeholder:"",hoverStateEnabled:!0,searchEnabled:!1,defaultValue:null,isReactComponentWrapper:!0}))),MZ={get placeholder(){return ln.placeholder},get hoverStateEnabled(){return ca.hoverStateEnabled},get searchEnabled(){return ln.searchEnabled},get defaultValue(){return ln.defaultValue},get readOnly(){return ln.readOnly},get name(){return ln.name},get validationError(){return ln.validationError},get validationErrors(){return ln.validationErrors},get validationMessageMode(){return ln.validationMessageMode},get validationMessagePosition(){return ln.validationMessagePosition},get validationStatus(){return ln.validationStatus},get isValid(){return ln.isValid},get isDirty(){return ln.isDirty},get inputAttr(){return ln.inputAttr},get className(){return ln.className},get activeStateEnabled(){return ca.activeStateEnabled},get disabled(){return ln.disabled},get focusStateEnabled(){return ca.focusStateEnabled},get tabIndex(){return ln.tabIndex},get visible(){return ln.visible},get label(){return Wd.label},get labelMode(){return Wd.labelMode},isReactComponentWrapper:!0},EH=(()=>{class i extends Dt{constructor(t){super(t),this.state={value:this.props.value!==void 0?this.props.value:this.props.defaultValue}}get componentProps(){return I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value})}get restAttributes(){let t=I({},this.props,{value:this.props.value!==void 0?this.props.value:this.state.value});return _e(t,TZ)}render(){let t=this.props;return AZ({props:I({},t,{value:this.props.value!==void 0?this.props.value:this.state.value}),componentProps:this.componentProps,restAttributes:this.restAttributes})}}return i.defaultProps=MZ,i})();var RZ=["inputAttr","pageSize","pageSizeChange","pageSizes","parentRef"],FZ=i=>{let{props:{inputAttr:e,pageSize:t,pageSizeChange:n,pageSizes:o},width:s}=i;return Re(2,EH,{displayExpr:"text",valueExpr:"value",dataSource:o,value:t,valueChange:n,width:s,inputAttr:e})},PZ={inputAttr:Object.freeze({"aria-label":O.format("dxPager-ariaPageSize")})},kZ={get pageSize(){return Tt.pageSize},get inputAttr(){return PZ.inputAttr}},wH=(()=>{class i extends $i{constructor(t){super(t),this.state={minWidth:10},this.updateWidth=this.updateWidth.bind(this)}createEffects(){return[new Ke(this.updateWidth,[this.props,this.state.minWidth,this.props.pageSize,this.props.pageSizeChange,this.props.pageSizes,this.props.inputAttr])]}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,this.props.inputAttr])}updateWidth(){this.setState(t=>({minWidth:Rf(this.props.parentRef.current)||t.minWidth}))}get width(){return Pf(this.state.minWidth,this.props.pageSizes.map(t=>t.value))}get restAttributes(){let t=this.props;return _e(t,RZ)}render(){let t=this.props;return FZ({props:I({},t),width:this.width,restAttributes:this.restAttributes})}}return i.defaultProps=kZ,i})();var BZ=["pageSize","pageSizeChange","pageSizes"],VZ=i=>{let{pageSizesText:e}=i;return fn(e.map(t=>{let{className:n,click:o,label:s,text:r}=t;return Re(2,tl,{className:n,label:s,onClick:o,children:r},r)}),0)};var LZ={get pageSize(){return Tt.pageSize}},SH=(()=>{class i extends Dt{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=(()=>{let{pageSize:t,pageSizes:n}=this.props;return n.map((o,s)=>{let{text:r,value:a}=o;return{className:yi({[a===t?mH:pH]:!0,[fH]:s===0}),click:this.onPageSizeChange(a),label:Gi(O.getFormatter("dxPager-pageSize"),a||O.getFormatter("dxPager-pageSizesAllText")),text:r}})})()}onPageSizeChange(t){return()=>(this.props.pageSizeChange(t),this.props.pageSize)}get restAttributes(){let t=this.props;return _e(t,BZ)}componentWillUpdate(t,n,o){(this.props.pageSize!==t.pageSize||this.props.pageSizes!==t.pageSizes||this.props.pageSizeChange!==t.pageSizeChange)&&(this.__getterCache.pageSizesText=void 0)}render(){let t=this.props;return VZ({props:I({},t),pageSizesText:this.pageSizesText,restAttributes:this.restAttributes})}}return i.defaultProps=LZ,i})();var NZ=["isLargeDisplayMode","pageSize","pageSizeChange","pageSizes","rootElementRef"],HZ=i=>{let{htmlRef:e,normalizedPageSizes:t,props:{isLargeDisplayMode:n,pageSize:o,pageSizeChange:s}}=i;return tt(1,"div",gH,[n&&Re(2,SH,{pageSizes:t,pageSize:o,pageSizeChange:s}),!n&&Re(2,wH,{parentRef:e,pageSizes:t,pageSize:o,pageSizeChange:s})],0,null,null,e)};function $Z(){return O.getFormatter("dxPager-pageSizesAllText")()}var zZ={isLargeDisplayMode:!0},WZ={get pageSize(){return Tt.pageSize},get pageSizes(){return Tt.pageSizes},get isLargeDisplayMode(){return zZ.isLargeDisplayMode}},IH=(()=>{class i extends $i{constructor(t){super(t),this.state={},this.htmlRef=Ct(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this)}createEffects(){return[new Ke(this.setRootElementRef,[])]}setRootElementRef(){let{rootElementRef:t}=this.props;t&&(t.current=this.htmlRef.current)}get normalizedPageSizes(){return this.__getterCache.normalizedPageSizes!==void 0?this.__getterCache.normalizedPageSizes:this.__getterCache.normalizedPageSizes=(()=>{let{pageSizes:t}=this.props;return t.map(n=>n==="all"||n===0?{text:$Z(),value:0}:{text:String(n),value:n})})()}get restAttributes(){let t=this.props;return _e(t,NZ)}componentWillUpdate(t,n,o){super.componentWillUpdate(),this.props.pageSizes!==t.pageSizes&&(this.__getterCache.normalizedPageSizes=void 0)}render(){let t=this.props;return HZ({props:I({},t),htmlRef:this.htmlRef,normalizedPageSizes:this.normalizedPageSizes,restAttributes:this.restAttributes})}}return i.defaultProps=WZ,i})();var GZ=["className","displayMode","gridCompatibility","hasKnownLastPage","infoText","infoTextRef","infoTextVisible","isLargeDisplayMode","label","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pageSizesRef","pagesCountText","pagesNavigatorVisible","pagesRef","rootElementRef","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"],jZ=i=>{let{aria:e,classes:t,infoVisible:n,isLargeDisplayMode:o,pageIndexSelectorVisible:s,pagesContainerVisibility:r,pagesContainerVisible:a,props:{hasKnownLastPage:l,infoText:d,infoTextRef:c,maxPagesCount:h,pageCount:p,pageIndex:g,pageIndexChange:C,pageSize:v,pageSizeChange:b,pageSizes:T,pageSizesRef:M,pagesCountText:G,pagesRef:te,rtlEnabled:oe,showNavigationButtons:re,showPageSizes:Ie,totalCount:Fe,visible:We},restAttributes:di,widgetRootElementRef:St}=i;return Ft(Re(2,sd,I({rootElementRef:St,rtlEnabled:oe,classes:t,visible:We,aria:e},di,{children:[Ie&&Re(2,IH,{rootElementRef:M,isLargeDisplayMode:o,pageSize:v,pageSizeChange:b,pageSizes:T}),a&&tt(1,"div",dH,[n&&Re(2,rH,{rootElementRef:c,infoText:d,pageCount:p,pageIndex:g,totalCount:Fe}),s&&tt(1,"div",cH,Re(2,OH,{hasKnownLastPage:l,isLargeDisplayMode:o,maxPagesCount:h,pageCount:p,pageIndex:g,pageIndexChange:C,pagesCountText:G,showNavigationButtons:re,totalCount:Fe}),2,null,null,te)],0,{style:id({visibility:r})})]})))},KZ=Object.create(Object.prototype,Object.assign(Object.getOwnPropertyDescriptors(Tt),Object.getOwnPropertyDescriptors({infoTextVisible:!0,isLargeDisplayMode:!0}))),DH=(()=>{class i extends $i{constructor(t){super(t),this.state={},this.widgetRootElementRef=Ct(),this.__getterCache={},this.setRootElementRef=this.setRootElementRef.bind(this),this.createFakeInstance=this.createFakeInstance.bind(this)}createEffects(){return[new Ke(this.setRootElementRef,[])]}getChildContext(){return I({},this.context,{[el.id]:this.keyboardAction||el.defaultValue})}setRootElementRef(){let{rootElementRef:t}=this.props;t&&(t.current=this.widgetRootElementRef.current)}createFakeInstance(){return{option:()=>!1,element:()=>this.widgetRootElementRef.current,_createActionByOption:()=>t=>{var n,o;(n=(o=this.props).onKeyDown)===null||n===void 0||n.call(o,t)}}}get keyboardAction(){return this.__getterCache.keyboardAction!==void 0?this.__getterCache.keyboardAction:this.__getterCache.keyboardAction={registerKeyboardAction:(t,n)=>{let o=this.createFakeInstance();return qg("pager",o,t,void 0,n)}}}get infoVisible(){let{infoTextVisible:t,showInfo:n}=this.props;return n&&t}get pageIndexSelectorVisible(){return this.props.pageSize!==0}get normalizedDisplayMode(){let{displayMode:t,lightModeEnabled:n}=this.props;return t==="adaptive"&&n!==void 0?n?"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(){let t=this.normalizedDisplayMode,n=!1;return t==="adaptive"?n=this.props.isLargeDisplayMode:n=t==="full",n}get classes(){let t={[`${this.props.className}`]:!!this.props.className,[aH]:!0,[lH]:!this.isLargeDisplayMode};return yi(t)}get aria(){return{role:"navigation",label:this.props.label}}get restAttributes(){let t=this.props;return _e(t,GZ)}componentWillUpdate(t,n,o){super.componentWillUpdate(),this.props.onKeyDown!==t.onKeyDown&&(this.__getterCache.keyboardAction=void 0)}render(){let t=this.props;return jZ({props:I({},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,aria:this.aria,restAttributes:this.restAttributes})}}return i.defaultProps=KZ,i})();var UZ=["className","defaultPageIndex","defaultPageSize","displayMode","gridCompatibility","hasKnownLastPage","infoText","label","lightModeEnabled","maxPagesCount","onKeyDown","pageCount","pageIndex","pageIndexChange","pageSize","pageSizeChange","pageSizes","pagesCountText","pagesNavigatorVisible","rtlEnabled","showInfo","showNavigationButtons","showPageSizes","totalCount","visible"],qZ=i=>{let{pagerProps:e,restAttributes:t}=i;return Ft(Re(2,nH,I({contentTemplate:DH,pagerProps:e},t)))},TH=(()=>{class i extends fo{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[_s()]}pageIndexChange(t){if(this.props.gridCompatibility){let n;this.setState(o=>(n=t+1,{pageIndex:n})),this.props.pageIndexChange(n)}else{let n;this.setState(o=>(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){{let n;this.setState(o=>(n=t,{pageSize:n})),this.props.pageSizeChange(n)}}get className(){return this.props.gridCompatibility?yi({"dx-datagrid-pager":!0,[`${this.props.className}`]:!!this.props.className}):this.props.className}get pagerProps(){return this.__getterCache.pagerProps!==void 0?this.__getterCache.pagerProps:this.__getterCache.pagerProps=I({},I({},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(){let t=I({},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});return _e(t,UZ)}componentWillUpdate(t,n,o){super.componentWillUpdate(),(this.props!==t||this.props.gridCompatibility!==t.gridCompatibility||this.props.className!==t.className||this.state.pageIndex!==n.pageIndex||this.props.pageIndex!==t.pageIndex||this.props.pageIndexChange!==t.pageIndexChange||this.props.pageSizeChange!==t.pageSizeChange)&&(this.__getterCache.pagerProps=void 0)}render(){let t=this.props;return qZ({props:I({},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})}}return i.defaultProps=oH,i})();var dh=class extends Mf{getProps(){let e=super.getProps();return e.onKeyDown=this._wrapKeyDownHandler(e.onKeyDown),e}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","label","onKeyDown","pageSize","pageIndex"]}}get _viewComponent(){return TH}};K("dxPager",dh);var AH=dh;var MH=function(i){return 1+(parseInt(i.pageIndex())||0)},U0=class extends ye.View{init(){let e=this.getController("data");e.changed.add(t=>{if(t&&t.repaintChangesOnly){let n=this._pager;n?n.option({pageIndex:MH(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())})}dispose(){this._pager=null}optionChanged(e){let{name:t}=e,n=t==="pager",o=t==="paging",s=t==="dataSource",r=t==="scrolling",a=this.getController("data");if(n||o||r||s){if(e.handled=!0,a.skipProcessingPagingChange(e.fullName))return;(n||o)&&(this._pageSizes=null),s||(this._pager=null,this._invalidate(),j()&&n&&this.component&&this.component.resize())}}_renderCore(){let e=this,t=e.element().addClass(e.addWidgetPrefix("pager")),n=e.option("pager")??{},o=e.getController("data"),s=e.getController("keyboardNavigation"),r={maxPagesCount:10,pageIndex:MH(o),pageCount:o.pageCount(),pageSize:o.pageSize(),showPageSizes:n.showPageSizeSelector,showInfo:n.showInfo,displayMode:n.displayMode,pagesNavigatorVisible:n.visible,showNavigationButtons:n.showNavigationButtons,label:n.label,pageSizes:e.getPageSizes(),totalCount:o.totalCount(),hasKnownLastPage:o.hasKnownLastPage(),pageIndexChanged(a){o.pageIndex()!==a-1&&o.pageIndex(a-1)},pageSizeChanged(a){o.pageSize(a)},onKeyDown:a=>s&&s.executeAction("onKeyDown",a),useLegacyKeyboardNavigation:this.option("useLegacyKeyboardNavigation"),useKeyboard:this.option("keyboardNavigation.enabled")};if(f(n.infoText)&&(r.infoText=n.infoText),this._pager){this._pager.repaint();return}j()?this._pager=e._createComponent(t,AH,r):t.addClass("dx-pager").html('<div class="dx-pages"><div class="dx-page"></div></div>')}getPager(){return this._pager}getPageSizes(){let e=this,t=e.getController("data"),n=e.option("pager"),o=n&&n.allowedPageSizes,s=t.pageSize();return(!f(e._pageSizes)||!e._pageSizes.includes(s))&&(e._pageSizes=[],n&&(Array.isArray(o)?e._pageSizes=o:o&&s>1&&(e._pageSizes=[Math.floor(s/2),s,2*s]))),e._pageSizes}isVisible(){let e=this.getController("data"),t=this.option("pager"),n=t&&t.visible,o=this.option("scrolling");return n==="auto"&&(o&&(o.mode==="virtual"||o.mode==="infinite")?n=!1:n=e.pageCount()>1||e.isLoaded()&&!e.hasKnownLastPage()),!!n}getHeight(){return this.getElementHeight()}},RH={defaultOptions:()=>({pager:{visible:"auto",showPageSizeSelector:!1,allowedPageSizes:"auto",label:O.format("dxPager-ariaLabel")}}),views:{pagerView:U0}};$.registerModule("pager",RH);var FH="columns-separator-transparent";var Bn="dxDataGridResizingReordering";var ch=function(i){return i.option("allowColumnResizing")||i.getController("columns").isColumnOptionUsed("allowResizing")},PH=function(i){return i.option("allowColumnReordering")||i.getController("columns").isColumnOptionUsed("allowReordering")},Y0=class extends ye.View{init(){super.init(),this._tablePositionController=this.getController("tablePosition"),this._subscribeToCallback()}dispose(){this._unsubscribeFromCallback(),super.dispose()}optionChanged(e){e.name==="allowColumnResizing"&&(this._unsubscribeFromCallback(),e.value&&(this._subscribeToCallback(),this._invalidate())),super.optionChanged(e)}_renderCore(){let e=super._renderCore();return this.element().addClass(this.addWidgetPrefix("tracker")),this.hide(),e}_unsubscribeFromCallback(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)}_subscribeToCallback(){let e=this;e._positionChanged=function(t){let n=e.element();n&&n.hasClass(e.addWidgetPrefix("tracker"))&&(n.css({top:t.top}),Bi(n,t.height))},this._tablePositionController.positionChanged.add(e._positionChanged)}isVisible(){return ch(this)}show(){this.element().show()}hide(){this.element()&&this.element().hide()}setHeight(e){Bi(this.element(),e)}},kf=class extends ye.View{_renderSeparator(){}_renderCore(e){let t=super._renderCore(e);return this._isShown=!0,this._renderSeparator(),this.hide(),t}show(){this._isShown=!0}hide(){this._isShown=!1}height(e){let t=this.element();if(t)if(f(e))Bi(t,e);else return Q(t)}width(e){let t=this.element();if(t)if(f(e))is(t,e);else return W(t)}},X0=class extends kf{init(){super.init(),this._tablePositionController=this.getController("tablePosition"),this._init()}dispose(){this._unsubscribeFromCallback(),super.dispose()}optionChanged(e){e.name==="allowColumnResizing"&&(e.value?(this._init(),this._invalidate(),this.hide(!0)):(this._unsubscribeFromCallback(),this._isTransparent=ch(this),this.hide(!0))),super.optionChanged(e)}_renderSeparator(){super._renderSeparator(),this.element().addClass(this.addWidgetPrefix("columns-separator"))}_subscribeToCallback(){let e=this,t;e._positionChanged=function(n){t=e.element(),t&&(t.css({top:n.top}),Bi(t,n.height))},e._tablePositionController.positionChanged.add(e._positionChanged)}_unsubscribeFromCallback(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)}_init(){this._isTransparent=ch(this),this.isVisible()&&this._subscribeToCallback()}isVisible(){return this.option("showColumnHeaders")&&(PH(this)||ch(this))}show(){let e=this,t=this.element();t&&!e._isShown&&(e._isTransparent?t.removeClass(e.addWidgetPrefix(FH)):t.show()),super.show()}hide(e){let t=this.element(),n=this.addWidgetPrefix(FH);t&&(this._isShown||e)&&(this._isTransparent?(t.addClass(n),t.css("left",""),t.show()):(t.hasClass(n)&&t.removeClass(n),t.hide())),super.hide()}moveByX(e){let t=this.element();t&&t.css("left",e===null?0:e-this._parentElement().offset().left)}changeCursor(e){e=f(e)?e:"";let t=this.element();t&&t.css("cursor",e)}},Q0=class extends kf{init(){super.init(),this.getController("data").loadingChanged.add(t=>{t||this.hide()})}_renderSeparator(){super._renderSeparator(),this.element().addClass("dx-block-separator").html("&nbsp;")}hide(){let e=this,t=this._parentElement(),n=this.element();n&&this._isShown&&n.css("display","none"),t&&!t.children(".dx-block-separator").length&&t.prepend(e.element()),super.hide()}isVisible(){let e=this.option("groupPanel"),t=this.option("columnChooser");return e&&e.visible||t&&t.enabled}show(e){let t=this.element();if(t&&!this._isShown)switch(e){case"group":this.element().css("display","block");break;case"columnChooser":(function(n){fe.stop(t,!0),fe.animate(t,{type:"slide",from:{width:0,display:n.display},to:n,duration:300,easing:"swing"})})({width:"100%",display:"block"});break;default:t.css("display","")}super.show()}},Z0=class extends ye.View{init(){super.init();let e=this.getController("data");this._controller=this.getController("draggingHeader"),this._columnsResizerViewController=this.getController("columnsResizer"),this._columnsController=this.getController("columns"),this._isDragging=!1,e.loadingChanged.add(t=>{let n=this.element();!t&&n&&n.hide()})}isDragging(){return this._isDragging}_getDraggingPanelByPos(e){let t;return x(this._dragOptions.draggingPanels,(n,o)=>{if(o){let s=o.getBoundingRect();if(s&&(s.bottom===void 0||e.y<s.bottom)&&(s.top===void 0||e.y>s.top)&&(s.left===void 0||e.x>s.left)&&(s.right===void 0||e.x<s.right))return t=o,!1}}),t}_renderCore(){this.element().addClass(`${this.addWidgetPrefix("drag-header")} ${this.addWidgetPrefix("text-content")} dx-widget`).hide()}_resetTargetColumnOptions(){let e=this._dropOptions;e.targetColumnIndex=-1,delete e.targetColumnElement,delete e.isLast,delete e.posX,delete e.posY}_getVisibleIndexObject(e,t){return f(e)?{columnIndex:t,rowIndex:e}:t}dispose(){let e=this.element();this._dragOptions=null,e&&e.parent().find(`.${this.addWidgetPrefix("drag-header")}`).remove()}isVisible(){let e=this._columnsController.getCommonSettings();return this.option("showColumnHeaders")&&(PH(this)||e.allowGrouping||e.allowHiding)}dragHeader(e){let{columnElement:t}=e,n=!!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};let o=S.getDocument();this._onSelectStart=o.onselectstart,o.onselectstart=function(){return!1},this._controller.drag(this._dropOptions),this.element().css({textAlign:t&&t.css("textAlign"),height:t&&(n&&t.get(0).clientHeight||Q(t)),width:t&&(n&&t.get(0).clientWidth||W(t)),whiteSpace:t&&t.css("whiteSpace")}).addClass(this.addWidgetPrefix("drag-action")).toggleClass("dx-drag-command-cell",n).text(n?"":e.sourceColumn.caption),this.element().appendTo(Kp.getSwatchContainer(t))}moveHeader(e){let t=e.event,{that:n}=t.data,o=rt(t),s=n._columnsResizerViewController?n._columnsResizerViewController.isResizing():!1,r=n._dragOptions;if(n._isDragging&&!s){let a=n.element(),l=Math.abs(o.x-r.columnElement.offset().left-r.deltaX),d=Math.abs(o.y-r.columnElement.offset().top-r.deltaY);if(a.is(":visible")||l>5||d>5){a.show();let c=o.x-r.deltaX,h=o.y-r.deltaY;a.css({left:c,top:h}),n.dockHeader(o)}t.preventDefault()}}dockHeader(e){let t=this,n=t._getDraggingPanelByPos(e),o=t._controller,s=t._dropOptions,r=t._dragOptions;if(n){let a=t.option("rtlEnabled"),l=n.getName()==="columnChooser",d=l?"y":"x",c=n.getName(),h=c==="headers"?r.rowIndex:void 0,{sourceColumn:p}=r,g=n.getColumnElements(h,p?.ownerBand)||[],C=r.pointsByTarget=r.pointsByTarget||{},v=c==="columnChooser"?[]:C[c]||o._generatePointsByColumns(m({},r,{targetDraggingPanel:n,columns:n.getColumns(h),columnElements:g,isVerticalOrientation:l,startColumnIndex:c==="headers"&&u(g[0]).index()}));if(C[c]=v,s.targetLocation=c,v.length>0)for(let b=0;b<v.length;b++){let T=v[b+1]&&(v[b][d]+v[b+1][d])/2;if(T===void 0||(a&&d==="x"?e[d]>T:e[d]<T)){s.targetColumnIndex=t._getVisibleIndexObject(h,v[b].columnIndex),g[b]?(s.targetColumnElement=g.eq(b),s.isLast=!1):(s.targetColumnElement=g.last(),s.isLast=!0),s.posX=v[b].x,s.posY=v[b].y,o.dock(s);break}}else t._resetTargetColumnOptions(),o.dock(s)}}dropHeader(e){let t=e.event,{that:n}=t.data,o=n._controller;n.element().hide(),o&&n._isDragging&&o.drop(n._dropOptions),n.element().appendTo(n._parentElement()),n._dragOptions=null,n._dropOptions=null,n._isDragging=!1,S.getDocument().onselectstart=n._onSelectStart||null}},q0=function(i){return i.option("columnResizingMode")!=="widget"},J0=class extends ye.ViewController{init(){this._subscribesToCallbacks=[],ch(this)&&this._init()}dispose(){this._unsubscribes(),super.dispose()}optionChanged(e){super.optionChanged(e),e.name==="allowColumnResizing"&&(e.value?(this._init(),this._subscribeToEvents()):this._unsubscribes())}_isHeadersRowArea(e){if(this._columnHeadersView){let t=this._columnHeadersView.element();if(t){let n=t.offset().top,o=this._columnHeadersView.getHeadersRowHeight();return e>=n&&e<=n+o}}return!1}_isRtlParentStyle(){var e;return this.option("rtlEnabled")&&((e=this._$parentContainer)===null||e===void 0?void 0:e.parent().css("direction"))==="rtl"}_pointCreated(e,t,n){let o=q0(this),s=this.option("rtlEnabled"),r=this._isRtlParentStyle(),a=!o&&s&&!r?0:1;if(e.index>=a&&e.index<t+(!o&&(!s||r)?1:0)){e.columnIndex-=a;let l=n[e.columnIndex]||{},d=n[e.columnIndex+1]||{};return!(o?l.allowResizing&&d.allowResizing:l.allowResizing)}return!0}_getTargetPoint(e,t,n){if(e){for(let o=0;o<e.length;o++)if(!(e[o].x===e[0].x&&e[o+1]&&e[o].x===e[o+1].x)&&e[o].x-n<=t&&t<=e[o].x+n)return e[o]}return null}_moveSeparator(e){var t;let n=e.event,o=n.data,s=o._columnsSeparatorView.width(),r=q0(o),a=s/2,l=o._$parentContainer.offset(),d=l.left,c=rt(n),h=o.option("rtlEnabled"),p=this._isRtlParentStyle(),g=(t=o._draggingHeaderView)===null||t===void 0?void 0:t.isDragging();if(o._isResizing&&o._resizingInfo){if((d<=c.x||!r&&p)&&(!r||c.x<=d+W(o._$parentContainer))&&o._updateColumnsWidthIfNeeded(c.x)){let C=o._columnHeadersView.getColumnElements().eq(o._resizingInfo.currentColumnIndex),v=C[0];if(v){let b=v.getBoundingClientRect().width;o._columnsSeparatorView.moveByX(C.offset().left+((r||p)&&h?0:b)),o._tablePositionController.update(o._targetPoint.y),n.preventDefault()}}}else g||(o._isHeadersRowArea(c.y)?(o._previousParentOffset&&(o._previousParentOffset.left!==l.left||o._previousParentOffset.top!==l.top)&&o.pointsByColumns(null),o._targetPoint=o._getTargetPoint(o.pointsByColumns(),c.x,s),o._previousParentOffset=l,o._isReadyResizing=!1,o._targetPoint?(o._columnsSeparatorView.changeCursor("col-resize"),o._columnsSeparatorView.moveByX(o._targetPoint.x-a),o._tablePositionController.update(o._targetPoint.y),o._isReadyResizing=!0,n.preventDefault()):(o._columnsSeparatorView.changeCursor(),o._columnsSeparatorView.moveByX(null))):(o.pointsByColumns(null),o._isReadyResizing=!1,o._columnsSeparatorView.changeCursor(),o._columnsSeparatorView.moveByX(null)))}_endResizing(e){let n=e.event.data;n._isResizing&&(n.pointsByColumns(null),n._resizingInfo=null,n._columnsSeparatorView.hide(),n._columnsSeparatorView.changeCursor(),n._trackerView.hide(),n._isReadyResizing=!1,n._isResizing=!1)}_getNextColumnIndex(e){return e+1}_setupResizingInfo(e){let t=this._targetPoint.columnIndex,n=this._getNextColumnIndex(t),o=this._columnHeadersView.getHeaderElement(t),s=this._columnHeadersView.getHeaderElement(n);this._resizingInfo={startPosX:e,currentColumnIndex:t,currentColumnWidth:o&&o.length>0?Pe(o[0]).width:0,nextColumnIndex:n,nextColumnWidth:s&&s.length>0?Pe(s[0]).width:0}}_startResizing(e){let t=e.event,n=t.data,o=rt(t);if(Ws(t)&&(n._isHeadersRowArea(o.y)?(n._targetPoint=n._getTargetPoint(n.pointsByColumns(),o.x,10),n._targetPoint&&(n._columnsSeparatorView.moveByX(n._targetPoint.x-n._columnsSeparatorView.width()/2),n._isReadyResizing=!0)):n._isReadyResizing=!1),n._isReadyResizing){n._setupResizingInfo(o.x),n._isResizing=!0,n._tablePositionController.update(n._targetPoint.y),n._columnsSeparatorView.show(),n._trackerView.show();let s=n.component.getScrollable();s&&n._isRtlParentStyle()&&(n._scrollRight=W(s.$content())-W(s.container())-s.scrollLeft()),t.preventDefault(),t.stopPropagation()}this.isResizing()&&this._editorFactoryController.loseFocus()}_generateColumnsTopYIndex(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this,n=t._columnsController.getRowCount(),o={},s=r=>{let a=Math.ceil(r.x);return o[a]||(o[a]=r.y),!0};for(let r=0;r<n-1;r++){let a=t._columnHeadersView.getColumnElements(r);a&&a.length>0&&R.getPointsByColumns(a,s,!1,0,e)}return o}_generatePointsByColumns(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this,n=t._generateColumnsTopYIndex(e),o=t._columnsController?t._columnsController.getVisibleColumns():[],s=t._columnHeadersView.getColumnElements();t._pointsByColumns=[],s&&s.length>0&&(t._pointsByColumns=R.getPointsByColumns(s,r=>t._pointCreated((a=>{let l=Math.ceil(a.x);return n[l]&&(a.y=n[l]),a})(r),s.length,o),!1,0,e))}_unsubscribeFromEvents(){this._moveSeparatorHandler&&_.off(S.getDocument(),D(le.move,Bn),this._moveSeparatorHandler),this._startResizingHandler&&_.off(this._$parentContainer,D(le.down,Bn),this._startResizingHandler),this._endResizingHandler&&(_.off(this._columnsSeparatorView.element(),D(le.up,Bn),this._endResizingHandler),_.off(S.getDocument(),D(le.up,Bn),this._endResizingHandler))}_subscribeToEvents(){this._moveSeparatorHandler=this.createAction(this._moveSeparator),this._startResizingHandler=this.createAction(this._startResizing),this._endResizingHandler=this.createAction(this._endResizing),_.on(S.getDocument(),D(le.move,Bn),this,this._moveSeparatorHandler),_.on(this._$parentContainer,D(le.down,Bn),this,this._startResizingHandler),_.on(this._columnsSeparatorView.element(),D(le.up,Bn),this,this._endResizingHandler),_.on(S.getDocument(),D(le.up,Bn),this,this._endResizingHandler)}_updateColumnsWidthIfNeeded(e){let t,n=!1,o=this._rowsView.contentWidth(),s=this._resizingInfo,r=this._columnsController,a=r.getVisibleColumns(),l=this._columnsSeparatorView.width(),d=q0(this),c=d&&this.option("adaptColumnWidthByRatio")&&!this.option("columnAutoWidth"),h=this.option("rtlEnabled"),p=this._isRtlParentStyle(),g=a[s.currentColumnIndex],C=a[s.nextColumnIndex];function v(G){return B(G)&&G.endsWith("%")}function b(G,te,oe,re){if(G){let Ie=G.width;Ie&&(re=v(Ie)),re?(r.columnOption(G.index,"visibleWidth",te),r.columnOption(G.index,"width",`${(te/oe*100).toFixed(3)}%`)):(r.columnOption(G.index,"visibleWidth",null),r.columnOption(G.index,"width",te))}}t=e-s.startPosX,(d||p)&&h&&(t=-t);let{cellWidth:T,nextCellWidth:M}=function(G){let te,oe,re,Ie=s.currentColumnWidth+G,Fe=g&&g.minWidth||l,We={};return Ie>=Fe?We.cellWidth=Ie:(We.cellWidth=Fe,re=!0),d&&(oe=s.nextColumnWidth-G,te=C&&C.minWidth||l,oe>=te?re?We.nextCellWidth=s.nextColumnWidth-(G+Fe-Ie):We.nextCellWidth=oe:(We.nextCellWidth=te,We.cellWidth=s.currentColumnWidth+(G-te+oe))),We}(t);if(n=g.width!==T,n){if(r.beginUpdate(),T=Math.floor(T),o=function(G,te){if(te.every(re=>re.width)){let re=te.reduce((Ie,Fe)=>(v(Fe.width)&&(Ie+=parseFloat(Fe.width)),Ie),0);re>100&&(G=G/re*100)}return G}(o,a),b(g,T,o,c),d)M=Math.floor(M),b(C,M,o,c);else{let G=this._columnHeadersView.getColumnWidths();if(G[s.currentColumnIndex]=T,!(G.reduce((oe,re)=>oe+re,0)>this._rowsView.contentWidth())){let oe=R.getLastResizableColumnIndex(a);oe>=0&&r.columnOption(a[oe].index,"visibleWidth","auto")}for(let oe=0;oe<G.length;oe++)a[oe]&&a[oe]!==g&&a[oe].width===void 0&&r.columnOption(a[oe].index,"width",G[oe])}if(r.endUpdate(),!d){this.component.updateDimensions();let G=this.component.getScrollable();if(G&&p){let te=W(G.$content())-W(G.container())-this._scrollRight;G.scrollTo({left:te})}}}return n}_subscribeToCallback(e,t){e.add(t),this._subscribesToCallbacks.push({callback:e,handler:t})}_unsubscribeFromCallbacks(){for(let e=0;e<this._subscribesToCallbacks.length;e++){let t=this._subscribesToCallbacks[e];t.callback.remove(t.handler)}this._subscribesToCallbacks=[]}_unsubscribes(){this._unsubscribeFromEvents(),this._unsubscribeFromCallbacks()}_init(){let e=()=>{this._isResizing||this.pointsByColumns(null)},t=s=>{this._scrollLeft!==s.left&&(this._scrollLeft=s.left,this.pointsByColumns(null))};this._columnsSeparatorView=this.getView("columnsSeparatorView"),this._columnHeadersView=this.getView("columnHeadersView"),this._trackerView=this.getView("trackerView"),this._rowsView=this.getView("rowsView"),this._columnsController=this.getController("columns"),this._tablePositionController=this.getController("tablePosition"),this._editorFactoryController=this.getController("editorFactory"),this._draggingHeaderView=this.component.getView("draggingHeaderView"),this._$parentContainer=this.component.$element(),this._subscribeToCallback(this._columnHeadersView.renderCompleted,e),this._subscribeToCallback(this._columnHeadersView.resizeCompleted,e),this._subscribeToCallback(this._columnsSeparatorView.renderCompleted,()=>{this._unsubscribeFromEvents(),this._subscribeToEvents()}),this._subscribeToCallback(this._rowsView.renderCompleted,()=>{this._rowsView.scrollChanged.remove(t),this._rowsView.scrollChanged.add(t)});let n=this._rowsView.getScrollbarWidth()!==0,o=0;this._subscribeToCallback(this._tablePositionController.positionChanged,s=>{if(this._isResizing&&!this._rowsView.isResizing){let r=this._rowsView.getScrollbarWidth()!==0;n!==r||o&&o!==s.height?(n=r,o=s.height,this.component.updateDimensions()):this._rowsView.updateFreeSpaceRowHeight()}o=s.height})}isResizing(){return this._isResizing}pointsByColumns(e){if(e!==void 0)this._pointsByColumns=e;else return this._pointsByColumns||this._generatePointsByColumns(),this._pointsByColumns}},eE=class extends ye.ViewController{constructor(e){super(e),this.positionChanged=ge()}init(){super.init(),this._columnsResizerController=this.getController("columnsResizer"),this._columnHeadersView=this.getView("columnHeadersView"),this._rowsView=this.getView("rowsView"),this._pagerView=this.getView("pagerView"),this._rowsView.resizeCompleted.add(()=>{if(this.option("allowColumnResizing")){let e=this._columnsResizerController._targetPoint;this.update(e?e.y:null)}})}update(e){let t={},n=this._columnHeadersView.element(),o=n&&n.offset(),s=o&&o.top||0,r=f(e)?Math.abs(e-s):0,a=this._columnHeadersView?this._columnHeadersView.getHeight():0,l=this._rowsView.getScrollbarWidth(!0),d=this._rowsView?this._rowsView.height()-l:0,c=this.component.getView("draggingHeaderView");t.height=a,(this._columnsResizerController.isResizing()||c.isDragging())&&(t.height+=d-r),e!==null&&n&&n.length&&(t.top=n[0].offsetTop+r),this.positionChanged.fire(t)}},tE=class extends ye.ViewController{init(){super.init(),this._columnsController=this.getController("columns"),this._tablePositionController=this.getController("tablePosition"),this._columnHeadersView=this.getView("columnHeadersView"),this._columnsSeparatorView=this.getView("columnsSeparatorView"),this._draggingHeaderView=this.getView("draggingHeaderView"),this._rowsView=this.getView("rowsView"),this._blockSeparatorView=this.getView("blockSeparatorView"),this._headerPanelView=this.getView("headerPanel"),this._columnChooserView=this.getView("columnChooserView");let e=()=>{if(this._draggingHeaderView){let t=[this._columnChooserView,this._columnHeadersView,this._headerPanelView];this._unsubscribeFromEvents(this._draggingHeaderView,t),this._subscribeToEvents(this._draggingHeaderView,t)}};this._columnHeadersView.renderCompleted.add(e),this._headerPanelView&&this._headerPanelView.renderCompleted.add(e),this._columnChooserView&&this._columnChooserView.renderCompleted.add(e)}dispose(){this._draggingHeaderView&&this._unsubscribeFromEvents(this._draggingHeaderView,[this._columnChooserView,this._columnHeadersView,this._headerPanelView])}_generatePointsByColumns(e){let t=this;return this.isCustomGroupColumnPosition=this.checkIsCustomGroupColumnPosition(e),R.getPointsByColumns(e.columnElements,o=>t._pointCreated(o,e.columns,e.targetDraggingPanel.getName(),e.sourceColumn),e.isVerticalOrientation,e.startColumnIndex)}checkIsCustomGroupColumnPosition(e){let t=!0;for(let n=0;n<e.columns.length;n+=1){let o=e.columns[n];if(o.command==="expand"&&!t)return!0;o.command||(t=!1)}return!1}_pointCreated(e,t,n,o){let s=t[e.columnIndex],r=t[e.columnIndex-1],a=r?.command==="expand",l=s?.command==="expand"&&r?.command!=="expand",d=o&&!o.allowReordering,c=!(s!=null&&s.allowReordering)&&!(r!=null&&r.allowReordering);switch(n){case"columnChooser":return!0;case"headers":if(d)return!0;if(!l)return a||c;if(this.isCustomGroupColumnPosition)return!1;for(;((h=t[e.columnIndex])===null||h===void 0?void 0:h.command)==="expand";){var h;e.columnIndex+=1}return!1;default:return t.length===0}}_subscribeToEvents(e,t){let n=this;x(t,(o,s)=>{if(s){let r,a=s.getRowCount?s.getRowCount():1,l=s.getName(),d=function(c,h){if(!h)return;let p=u(h),g=r[c];g&&s.allowDragging(g)&&(p.addClass(n.addWidgetPrefix("drag-action")),_.on(p,D(js,Bn),n.createAction(C=>{let v=C.event,b=rt(v);e.dragHeader({deltaX:b.x-u(v.currentTarget).offset().left,deltaY:b.y-u(v.currentTarget).offset().top,sourceColumn:g,index:g.index,columnIndex:c,columnElement:p,sourceLocation:l,draggingPanels:t,rowIndex:n._columnsController.getRowIndex(g.index,!0)})})),_.on(p,D(Po,Bn),{that:e},n.createAction(e.moveHeader)),_.on(p,D(Ks,Bn),{that:e},n.createAction(e.dropHeader)))};for(let c=0;c<a;c++){let h=s.getColumnElements(c)||[];h.length&&(r=s.getColumns(c)||[],x(h,d))}}})}_unsubscribeFromEvents(e,t){let n=this;x(t,(o,s)=>{if(s){let r=s.getColumnElements()||[];x(r,(a,l)=>{let d=u(l);_.off(d,D(js,Bn)),_.off(d,D(Po,Bn)),_.off(d,D(Ks,Bn)),d.removeClass(n.addWidgetPrefix("drag-action"))})}})}_getSeparator(e){return e==="headers"?this._columnsSeparatorView:this._blockSeparatorView}hideSeparators(e){let t=this._blockSeparatorView,n=this._columnsSeparatorView;this._animationColumnIndex=void 0,t&&t.hide(),e!=="block"&&n&&n.hide()}allowDrop(e){return this._columnsController.allowMoveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)}drag(e){let{sourceIndex:t}=e,{sourceLocation:n}=e,{sourceColumnElement:o}=e,s=this._columnHeadersView,r=this._rowsView;o&&(o.css({opacity:.5}),n==="headers"&&(s&&s.setRowsOpacity(t,.5),r&&r.setRowsOpacity(t,.5)))}dock(e){let t=this,n=z(e.targetColumnIndex)?e.targetColumnIndex.columnIndex:e.targetColumnIndex,{sourceLocation:o}=e,{targetLocation:s}=e,r=t._getSeparator(s),a=n>=0;t._columnHeadersView.element().find(".dx-header-row").toggleClass(t.addWidgetPrefix("drop-highlight"),o!=="headers"&&s==="headers"&&!a),r&&(t.allowDrop(e)&&a?s==="group"||s==="columnChooser"?function(){t._animationColumnIndex!==n&&(t.hideSeparators(),r.element()[e.isLast?"insertAfter":"insertBefore"](e.targetColumnElement),t._animationColumnIndex=n,r.show(s))}():(t.hideSeparators("block"),t._tablePositionController.update(e.posY),r.moveByX(e.posX-r.width()),r.show()):t.hideSeparators())}drop(e){let{sourceColumnElement:t}=e;if(t&&(t.css({opacity:""}),this._columnHeadersView.setRowsOpacity(e.sourceIndex,""),this._rowsView.setRowsOpacity(e.sourceIndex,""),this._columnHeadersView.element().find(".dx-header-row").removeClass(this.addWidgetPrefix("drop-highlight"))),this.allowDrop(e)){let n=this._getSeparator(e.targetLocation);n&&n.hide(),this._columnsController.moveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)}}},YZ=i=>class extends i{_needUpdateRowHeight(e){let t=this.option("wordWrapEnabled"),n=this._columnsResizerController.isResizing();return super._needUpdateRowHeight.apply(this,arguments)||e>0&&!!t&&!!n}},XZ=i=>class extends i{renderFocusOverlay(){if(!this._columnsResizerController.isResizing())return super.renderFocusOverlay.apply(this,arguments)}},ua={views:{columnsSeparatorView:X0,blockSeparatorView:Q0,draggingHeaderView:Z0,trackerView:Y0},controllers:{draggingHeader:tE,tablePosition:eE,columnsResizer:J0},extenders:{views:{rowsView:YZ},controllers:{editorFactory:XZ}}};var hrt=ua.views.draggingHeaderView,prt=ua.controllers.draggingHeader,grt=ua.views.columnsSeparatorView,mrt=ua.controllers.tablePosition,frt=ua.controllers.columnsResizer,_rt=ua.views.trackerView;$.registerModule("columnsResizingReordering",ua);var QZ=(i,e)=>i.length===e.length&&!Object.keys(i).some(t=>i[t]!==e[t]),ZZ=(i,e)=>Ee(i,e,{maxDepth:4}),JZ=(i,e,t,n)=>{let o=i,s=e;return function(){for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return n(a,o)||(o=a,s=t(...o)),s}},e7={compareType:"reference"},iE=function(i){let{compareType:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e7,t=null;return function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];if(!t){let r=i(...o);return t=JZ(o,r,i,e==="reference"?QZ:ZZ),r}return t(...o)}};var Bf={ariaColIndex:"aria-colindex",dragCell:"dx-drag-cell"},Vf="rowsview",kH="table",BH="edit-form";var Lf="dx-data-row",VH="dx-group-row",LH="dx-header-row",NH="edit-form-item",nE="dx-master-detail-row",Nf="dx-freespace-row",HH="dx-virtual-row",Hf="dx-master-detail-cell";var $H="dx-dropdowneditor-overlay",uh="dx-command-expand",zH="dx-command-adaptive",$f="dx-command-select",oE="dx-command-edit",zf="[class^=dx-command]",hh="dx-cell-focus-disabled",WH="dxDateBox",sE="dx-state-focused",GH="dx-widget",jH="dx-revert-button",rE="dx-focused",Wf="delete",Gd=`
  input:not([type="hidden"]):not([disabled]),
  textarea:not([disabled]),
  a:not([disabled]),
  select:not([disabled]),
  button:not([disabled]),
  [tabindex]:not([disabled]),
  .dx-checkbox:not([disabled],.dx-state-readonly)
`,aE=`${Gd}, .dx-dropdowneditor-icon`;var lE="row",dE="cell",cE="columnHeadersView",KH="rowsView",UH=["shift","control","alt"];var t7=i=>i.attr(Bf.dragCell)!==void 0,i7=i=>[`[${Bf.ariaColIndex}="${i+1}"]`,`:not([${Bf.dragCell}])`,":not([aria-hidden=true])"].join(""),n7=(i,e)=>i.filter(i7(e)).first(),uE={isDragCell:t7,getCellToFocus:n7};function jd(i){return i&&i.hasClass(VH)}function qH(i){return i&&i.hasClass("dx-datagrid-group-footer")}function YH(i){return i&&i.hasClass(nE)}function XH(i){return i&&i.hasClass(nE)&&i.hasClass(BH)}function Kd(i){return i&&i.hasClass(Lf)}function QH(i){return!i||i.hasClass(Nf)||i.hasClass(HH)}function hE(i,e){return!i._isRowEditMode()&&e&&!e.hasClass($f)&&e.hasClass(aa)}function Yn(i){return f(i)&&i.length>0}function Gf(){return F.current().deviceType!=="desktop"}function pE(i){return!!i.parent(`.${LH}`).length}function ZH(i,e){return i.option("rtlEnabled")?!(e.fixedPosition==="right"||f(e.command)&&!f(e.fixedPosition)):!(!f(e.fixedPosition)||e.fixedPosition==="left")}function JH(i){let e=i.getController("keyboardNavigation");return e._isVirtualScrolling()?i.option("focusedRowIndex")===e.getRowIndex():!1}var e1=i=>class extends i{rowsViewFocusHandler(e){let t=u(e.target);this.translateFocusIfNeed(e,t),super.rowsViewFocusHandler(e)}rowsViewFocusOutHandler(){super.rowsViewFocusOutHandler(),this.makeScrollableFocusableIfNeed()}translateFocusIfNeed(e,t){let n=this.isScrollableNeedFocusable(),o=this._isFixedColumn(0);if(!n||!o)return;let s=this._rowsView.getCell({rowIndex:0,columnIndex:0}),r=!!s.attr("tabindex"),a=t.is(this._$firstNotFixedCell);r&&a&&(e.preventDefault(),this._focus(s))}renderCompleted(e){this._$firstNotFixedCell=this.getFirstNotFixedCell(),this.makeScrollableFocusableIfNeed(),super.renderCompleted(e)}_focus(e,t,n){super._focus(e,t,n),this.makeScrollableFocusableIfNeed()}_tabKeyHandler(e,t){let o=!(f(this._focusedCellPosition)&&!bt(this._focusedCellPosition))||!e.shift&&this._isLastValidCell(this._focusedCellPosition)||e.shift&&this._isFirstValidCell(this._focusedCellPosition),s=this.isScrollableNeedFocusable();if(o&&s){var r;(r=this._$firstNotFixedCell)===null||r===void 0||r.removeAttr("tabIndex")}super._tabKeyHandler(e,t)}getFirstNotFixedCell(){var e;let n=this._columnsController.getVisibleColumns().findIndex(s=>{let{fixed:r}=s;return!r}),o=(e=this._editingController)===null||e===void 0?void 0:e.isEditing();return n===-1||o?void 0:this._rowsView._getCellElement(0,n)}isScrollableNeedFocusable(){var e,t;let n=!!this._rowsView.getScrollable(),o=!!((e=this._rowsView._fixedTableElement)!==null&&e!==void 0&&e.length),s=!!((t=this._rowsView.getCellElements(0))!==null&&t!==void 0&&t.length);return n&&o&&s}makeScrollableFocusableIfNeed(){!this.isScrollableNeedFocusable()||!this._$firstNotFixedCell||this._applyTabIndexToElement(this._$firstNotFixedCell)}};var gE=class extends ye.ViewController{init(){if(this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._editingController=this.getController("editing"),this._headerPanel=this.getView("headerPanel"),this._rowsView=this.getView("rowsView"),this._columnsController=this.getController("columns"),this._editorFactory=this.getController("editorFactory"),this._focusController=this.getController("focus"),this._adaptiveColumnsController=this.getController("adaptiveColumns"),this._columnResizerController=this.getController("columnsResizer"),this._memoFireFocusedCellChanged=iE(this._memoFireFocusedCellChanged.bind(this),{compareType:"value"}),this._memoFireFocusedRowChanged=iE(this._memoFireFocusedRowChanged.bind(this),{compareType:"value"}),this.focusedHandlerWithContext=this.focusedHandlerWithContext||this.focusedHandler.bind(this),this.renderCompletedWithContext=this.renderCompletedWithContext||this.renderCompleted.bind(this),this.rowsViewFocusHandlerContext=this.rowsViewFocusHandlerContext||this.rowsViewFocusHandler.bind(this),this.rowsViewFocusOutHandlerContext=this.rowsViewFocusOutHandlerContext??this.rowsViewFocusOutHandler.bind(this),this._updateFocusTimeout=null,this._fastEditingStarted=!1,this._focusedCellPosition={},this._canceledCellPosition=null,this.isKeyboardEnabled()){var e;PR(),(e=this._editorFactory)===null||e===void 0||e.focused.add(this.focusedHandlerWithContext),this.createAction("onKeyDown")}else{var t;Fb(),(t=this._editorFactory)===null||t===void 0||t.focused.remove(this.focusedHandlerWithContext)}this.initViewHandlers(),this.initDocumentHandlers()}dispose(){super.dispose(),this._resetFocusedView(),po.off(this._keyDownListener),_.off(S.getDocument(),D(le.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),clearTimeout(this._updateFocusTimeout),Fb()}focusedHandler(e){this.setupFocusedView(),this._isNeedScroll&&e.is(":visible")&&this._focusedView&&this._focusedView.getScrollable()&&(this._focusedView._scrollToElement(e),this._isNeedScroll=!1)}rowsViewFocusHandler(e){let t=u(e.target),n=u(e.relatedTarget).closest(this._rowsView.element()).length,o=t.is("a");if(e.relatedTarget&&o&&!n&&this._isEventInCurrentGrid(e)){let a=this._getFocusedCell();a=Yn(a)?a:this._rowsView.getCellElements(0).filter("[tabindex]").eq(0),t.closest(a).length||(e.preventDefault(),_.trigger(a,"focus"))}let s=t.is("td"),r=(this.option("focusedRowIndex")??-1)<0;s&&r&&this._updateFocusedCellPosition(t)}rowsViewFocusOutHandler(){this._toggleInertAttr(!1)}subscribeToRowsViewFocusEvent(){var e;let t=(e=this._rowsView)===null||e===void 0?void 0:e.element();_.on(t,"focusin",this.rowsViewFocusHandlerContext),_.on(t,"focusout",this.rowsViewFocusOutHandlerContext)}unsubscribeFromRowsViewFocusEvent(){var e;let t=(e=this._rowsView)===null||e===void 0?void 0:e.element();_.off(t,"focusin",this.rowsViewFocusHandlerContext),_.off(t,"focusout",this.rowsViewFocusOutHandlerContext)}renderCompleted(e){let t=this._rowsView.element(),n=!e||e.changeType==="refresh",o=this._focusedView&&this._focusedView.name===this._rowsView.name,s=!1,r=e&&(e.changeType==="append"||e.changeType==="prepend"),l=u(S.getRootNode(t.get&&t.get(0))).find(":focus"),d=this._isFocusedElementCorrect(l,t,e);this.unsubscribeFromRowsViewFocusEvent(),this.subscribeToRowsViewFocusEvent(),this.initPointerEventHandler(),this.initKeyDownHandler(),this._setRowsViewAttributes(),o&&d&&(s=this._isNeedFocus?!r:this._isHiddenFocus&&n&&!(e!=null&&e.virtualColumnsScrolling),s&&this._updateFocus(!0))}_isFocusedElementCorrect(e,t,n){if(e.length&&!e.closest(t).length)return!1;if(!e.length&&n!==null&&n!==void 0&&n.virtualColumnsScrolling){var o;let s=((o=this._focusedCellPosition)===null||o===void 0?void 0:o.columnIndex)??-1;return s-this._getFocusedColumnIndexOffset(s)>=0}return!0}initViewHandlers(){var e;this.unsubscribeFromRowsViewFocusEvent(),this.unsubscribeFromPointerEvent(),this.unsubscribeFromKeyDownEvent(),(e=this._rowsView)===null||e===void 0||(e=e.renderCompleted)===null||e===void 0||e.remove(this.renderCompletedWithContext),this.isKeyboardEnabled()&&this._rowsView.renderCompleted.add(this.renderCompletedWithContext)}initDocumentHandlers(){let e=S.getDocument();this._documentClickHandler=this._documentClickHandler||this.createAction(t=>{var n;let o=u(t.event.target),s=`.${this.addWidgetPrefix(kH)}`,r=`.${this.addWidgetPrefix(Vf)}`,a=`.${$H}`;if(!!o.closest(s).length&&!ls(o)){t.event.preventDefault();return}let d=this._isEventInCurrentGrid(t.event)&&!!o.closest(r).length,c=!!o.closest(a).length,h=!!((n=this._columnResizerController)!==null&&n!==void 0&&n.isResizing());!d&&!c&&!h&&((!this._focusedView||o.closest(this._focusedView.element()).length===0)&&this._resetFocusedCell(!0),this._resetFocusedView())}),_.off(e,D(le.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler),this.isKeyboardEnabled()&&_.on(e,D(le.down,"dxDataGridKeyboardNavigation"),this._documentClickHandler)}_setRowsViewAttributes(){let e=this._getRowsViewElement();!this._dataController.getVisibleRows().length&&this._applyTabIndexToElement(e)}unsubscribeFromPointerEvent(){let e=Gf()?de:le.down,t=this._getRowsViewElement();this._pointerEventAction&&_.off(t,D(e,"dxDataGridKeyboardNavigation"),this._pointerEventAction)}subscribeToPointerEvent(){let e=Gf()?de:le.down,t=this._getRowsViewElement(),n=`.${Wo} > td, .${Wo}`;_.on(t,D(e,"dxDataGridKeyboardNavigation"),n,this._pointerEventAction)}initPointerEventHandler(){this._pointerEventAction=this._pointerEventAction||this.createAction(this._pointerEventHandler),this.unsubscribeFromPointerEvent(),this.subscribeToPointerEvent()}unsubscribeFromKeyDownEvent(){po.off(this._keyDownListener)}subscribeToKeyDownEvent(){let e=this._getRowsViewElement();this._keyDownListener=po.on(e,null,t=>this._keyDownHandler(t))}initKeyDownHandler(){this._keyDownListener&&this.unsubscribeFromKeyDownEvent(),this.subscribeToKeyDownEvent()}optionChanged(e){switch(e.name){case"keyboardNavigation":e.fullName==="keyboardNavigation.enabled"&&this.init(),e.handled=!0;break;case"useLegacyKeyboardNavigation":this.init(),e.handled=!0;break;default:super.optionChanged(e)}}isRowFocusType(){return this.focusType===lE}isCellFocusType(){return this.focusType===dE}setRowFocusType(){this.option("focusedRowEnabled")&&(this.focusType=lE)}setCellFocusType(){this.focusType=dE}_keyDownHandler(e){var t;let n=!0;this._isNeedFocus=!0,this._isNeedScroll=!0;let o=this._processOnKeyDown(e),s=(t=this._editingController)===null||t===void 0?void 0:t.isEditing(),{originalEvent:r}=e;if(r.isDefaultPrevented()){this._isNeedFocus=!1,this._isNeedScroll=!1;return}if(!UH.includes(e.keyName)&&this._updateFocusedCellPositionByTarget(r.target),!o){switch(e.keyName){case"leftArrow":case"rightArrow":this._leftRightKeysHandler(e,s),o=!0;break;case"upArrow":case"downArrow":e.ctrl?pu("rowsView",this,r):this._upDownKeysHandler(e,s),o=!0;break;case"pageUp":case"pageDown":this._pageUpDownKeyHandler(e),o=!0;break;case"space":o=this._spaceKeyHandler(e,s);break;case"A":ft(e.originalEvent)?(this._ctrlAKeyHandler(e,s),o=!0):o=this._beginFastEditing(e.originalEvent);break;case"tab":this._tabKeyHandler(e,s),o=!0;break;case"enter":this._enterKeyHandler(e,s),o=!0;break;case"escape":o=this._escapeKeyHandler(e,s);break;case"F":ft(e.originalEvent)?(this._ctrlFKeyHandler(e),o=!0):o=this._beginFastEditing(e.originalEvent);break;case"F2":this._f2KeyHandler(),o=!0;break;case"del":case"backspace":this._isFastEditingAllowed()&&!this._isFastEditingStarted()&&(o=this._beginFastEditing(r,!0))}!o&&!this._beginFastEditing(r)&&(this._isNeedFocus=!1,this._isNeedScroll=!1,n=!1),n&&r.stopPropagation()}}_processOnKeyDown(e){let{originalEvent:t}=e,n={handled:!1,event:t};return this.executeAction("onKeyDown",n),e.ctrl=t.ctrlKey,e.alt=t.altKey,e.shift=t.shiftKey,!!n.handled}_closeEditCell(){let e=y();return setTimeout(()=>{this._editingController.closeEditCell().always(e.resolve)}),e}_leftRightKeysHandler(e,t){let n=this.getVisibleRowIndex(),o=e.originalEvent,s=this._focusedView&&this._focusedView.getRow(n),r=this._getDirectionCodeByKey(e.keyName),a=this._isFastEditingStarted();if((!t||a)&&Kd(s)){this.setCellFocusType(),a&&this._closeEditCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(r);let d=this._getNextCell(r);Yn(d)&&this._arrowKeysHandlerFocusCell(o,d,r),o&&o.preventDefault()}}isInsideMasterDetail(e){let t=e.closest(`.${Hf}`);return!!t.get(0)&&this.elementIsInsideGrid(t)&&!e.is(t)}_upDownKeysHandler(e,t){var n,o;let s=this.getVisibleRowIndex(),r=this._focusedView&&this._focusedView.getRow(s),a=e.originalEvent,l=e.keyName==="upArrow",d=this._dataController.dataSource(),c=(n=this._editingController)===null||n===void 0||(o=n.isEditRowByIndex)===null||o===void 0?void 0:o.call(n,s),h=this._isFastEditingStarted(),p=this.isInsideMasterDetail(u(a?.target));if((!c||!t||h)&&r&&!XH(r)&&!p){if(h&&this._closeEditCell(),!this._navigateNextCell(a,e.keyName)&&this._isVirtualRowRender()&&l&&d&&!d.isLoading()){let C=ee(r),v=this._focusedCellPosition.rowIndex-1;this._scrollBy(0,-C,v,a)}a&&a.preventDefault()}}_pageUpDownKeyHandler(e){let t=this._dataController.pageIndex(),n=this._dataController.pageCount(),o=this.option("paging.enabled"),s=e.keyName==="pageUp",r=s?-1:1,a=this._rowsView.getScrollable();o&&!this._isVirtualScrolling()?(s?t>0:t<n-1)&&!this._isVirtualScrolling()&&(this._dataController.pageIndex(t+r),e.originalEvent.preventDefault()):a&&Q(a.container())<Q(a.$content())&&(this._scrollBy(0,Q(a.container())*r),e.originalEvent.preventDefault())}_spaceKeyHandler(e,t){let n=this.getVisibleRowIndex(),o=u(e.originalEvent&&e.originalEvent.target);if(this.option("selection")&&this.option("selection").mode!=="none"&&!t){let s=this._getElementType(o)==="row"&&this.isRowFocusType()&&Kd(o);return o.hasClass($f)&&this.option("selection.showCheckBoxesMode")==="onClick"&&this._selectionController.startSelectionWithCheckboxes(),s||o.parent().hasClass(Lf)||o.hasClass(this.addWidgetPrefix(Vf))?(this._selectionController.changeItemSelection(n,{shift:e.shift,control:e.ctrl}),e.originalEvent.preventDefault(),!0):!1}return this._beginFastEditing(e.originalEvent)}_ctrlAKeyHandler(e,t){!t&&!e.alt&&this.option("selection.mode")==="multiple"&&this.option("selection.allowSelectAll")&&(this._selectionController.selectAll(),e.originalEvent.preventDefault())}_toggleInertAttr(e){}_tabKeyHandler(e,t){let n=this.option("editing"),o=e.shift?"previous":"next",s=f(this._focusedCellPosition)&&!bt(this._focusedCellPosition),r=e.shift&&this._isFirstValidCell(this._focusedCellPosition),a=!e.shift&&this._isLastValidCell(this._focusedCellPosition),l=!s||r||a,d=e.originalEvent.target,c=this._focusedView&&this._focusedView.element();if(!this._handleTabKeyOnMasterDetailCell(d,o)){if(u(c).addClass(sE),n&&d&&!l)if(u(d).hasClass(this.addWidgetPrefix(Vf))&&this._resetFocusedCell(),this._isVirtualColumnRender()&&this._processVirtualHorizontalPosition(o),t){if(!this._editingCellTabHandler(e,o))return}else this._targetCellTabHandler(e,o)&&(l=!0);if(l){let p=this._getFocusedCell().is(zf);a&&!p&&this._toggleInertAttr(!0),this._editorFactory.loseFocus(),this._editingController.isEditing()&&!this._isRowEditMode()&&(this._resetFocusedCell(!0),this._resetFocusedView(),this._closeEditCell())}else e.originalEvent.preventDefault()}}_getMaxHorizontalOffset(){let e=this.component.getScrollable();return e?e.scrollWidth()-W(this._rowsView.element()):0}_isColumnRendered(e){let t=this._columnsController.getVisibleColumns(null,!0),n=this._columnsController.getVisibleColumns(),o=t[e],s=!1;return o&&(s=n.indexOf(o)>=0),s}_isFixedColumn(e){let n=this._columnsController.getVisibleColumns(null,!0)[e];return!!n&&!!n.fixed}_isColumnVirtual(e){let t=e-this._columnsController.getColumnIndexOffset(),o=this._columnsController.getVisibleColumns()[t];return!!o&&o.command==="virtual"}_processVirtualHorizontalPosition(e){let t=this.component.getScrollable(),n=this.getColumnIndex(),o,s=0,r=!1;switch(e){case"next":case"nextInRow":{let a=this._getVisibleColumnCount();o=n+1,s=this.option("rtlEnabled")?this._getMaxHorizontalOffset():0,e==="next"?r=a===o||this._isFixedColumn(n)&&!this._isColumnRendered(o):r=a>o&&this._isFixedColumn(n)&&!this._isColumnRendered(o);break}case"previous":case"previousInRow":if(o=n-1,s=this.option("rtlEnabled")?0:this._getMaxHorizontalOffset(),e==="previous"){let a=this._columnsController.getColumnIndexOffset();r=o<0&&a===0||this._isFixedColumn(n)&&!this._isColumnRendered(o)}else r=o>=0&&this._isFixedColumn(n)&&!this._isColumnRendered(o)}r?t.scrollTo({left:s}):f(o)&&f(e)&&this._isColumnVirtual(o)&&(s=this._getHorizontalScrollPositionOffset(e),s!==0&&t.scrollBy({left:s,top:0}))}_getHorizontalScrollPositionOffset(e){let t=0,n=this._getCell(this._focusedCellPosition),o=n&&ae(n);if(o>0){let s=this.option("rtlEnabled")?-1:1;t=e==="nextInRow"||e==="next"?o*s:o*s*-1}return t}_editingCellTabHandler(e,t){let n=e.originalEvent.target,o=this._getCellElementFromTarget(n),s,r=e.originalEvent,a=this._getElementType(n);if(o.is(zf))return!this._targetCellTabHandler(e,t);this._updateFocusedCellPosition(o);let l=this._getNextCellByTabKey(r,t,a);if(o=l.$cell,!o||this._handleTabKeyOnMasterDetailCell(o,t))return!1;let d=this._getColumnByCellElement(o),c=o.parent(),h=this._getRowIndex(c),p=this._dataController.items()[h],g=this._editingController;if(d&&d.allowEditing){let C=!p||p.rowType==="data";s=g.allowUpdating({row:p})?C:p&&p.isNewRow}return s||this._closeEditCell(),this._focusCell(o,!l.isHighlighted)&&(!this._isRowEditMode()&&s?this._editFocusedCell():this._focusInteractiveElement(o,e.shift)),!0}_targetCellTabHandler(e,t){let n=e.originalEvent,o=n.target,s=this._getElementType(o),r=this._getCellElementFromTarget(o),a=s==="cell"&&this._getInteractiveElement(r,!e.shift),l=!1;if(!hE(this,r)&&a!==null&&a!==void 0&&a.length&&o!==a.get(0))l=!0;else{this._focusedCellPosition.rowIndex===void 0&&u(o).hasClass(Wo)&&this._updateFocusedCellPosition(r),s=this._getElementType(o),this.isRowFocusType()&&(this.setCellFocusType(),s==="row"&&Kd(u(o))&&(o=this.getFirstValidCellInRow(u(o)),s=this._getElementType(o)));let d=this._getNextCellByTabKey(n,t,s);if(r=d.$cell,!r||(r=this._checkNewLineTransition(n,r),!r))return!1;this._focusCell(r,!d.isHighlighted),hE(this,r)||this._focusInteractiveElement(r,e.shift)}return l}_getNextCellByTabKey(e,t,n){let o=this._getNextCell(t,n),s=o&&this._fireFocusedCellChanging(e,o,!0);return!s||s.cancel?{}:(s.$newCellElement&&(o=s.$newCellElement),{$cell:o,isHighlighted:s.isHighlighted})}_checkNewLineTransition(e,t){let n=this.getVisibleRowIndex(),o=t.parent();if(n!==this._getRowIndex(o)){let s=this._getCellPosition(t),r=this._fireFocusedRowChanging(e,o);if(r.cancel)return;r.rowIndexChanged&&s&&(this.setFocusedColumnIndex(s.columnIndex),t=this._getFocusedCell())}return t}_enterKeyHandler(e,t){var n,o;let s=this.getVisibleRowIndex(),r=this._dataController.getKeyByRowIndex(s),a=(n=this._focusedView)===null||n===void 0?void 0:n.getRow(s),l=this._getFocusedCell(),d=this.option("grouping.allowCollapsing")&&jd(a),c=this.option("masterDetail.enabled")&&l?.hasClass(uh),h=l?.hasClass(zH);if(d||c){let p=this._dataController.items()[s],g=p?.data&&!p.data.isContinuation;f(r)&&g&&this._dataController.changeRowExpand(r)}else h?(this._adaptiveColumnsController.toggleExpandAdaptiveDetailRow(r),this._updateFocusedCellPosition(l)):(o=this.getMasterDetailCell(l))!==null&&o!==void 0&&o.is(l)?l.is(":focus")&&this.focusFirstInteractiveElementInside(l):l!=null&&l.hasClass(oE)||this._processEnterKeyForDataCell(e,t)}focusFirstInteractiveElementInside(e){e.find(Gd).get(0).focus()}_processEnterKeyForDataCell(e,t){let n=this._getEnterKeyDirection(e),o=this._allowEditingOnEnterKey();t||!o&&n?this._handleEnterKeyEditingCell(e.originalEvent).done(()=>{n==="next"||n==="previous"?this._targetCellTabHandler(e,n):(n==="upArrow"||n==="downArrow")&&this._navigateNextCell(e.originalEvent,n)}):o&&this._startEditing(e)}_getEnterKeyDirection(e){let t=this.option("keyboardNavigation.enterKeyDirection"),n=e.shift;if(t==="column")return n?"upArrow":"downArrow";if(t==="row")return n?"previous":"next"}_handleEnterKeyEditingCell(e){let t=y(),{target:n}=e,o=this._getCellElementFromTarget(n),s=this._isRowEditMode();return this._updateFocusedCellPosition(o),s?(this._focusEditFormCell(o),setTimeout(this._editingController.saveEditData.bind(this._editingController)),t.resolve()):(_.trigger(u(n),"change"),this._closeEditCell().always(t.resolve),e.preventDefault()),t}_escapeKeyHandler(e,t){let n=this._getCellElementFromTarget(e.originalEvent.target);if(t)return this._updateFocusedCellPosition(n),this._isRowEditMode()?(this._focusEditFormCell(n),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(),!0;let o=this.getMasterDetailCell(n);return o?(this._focusCell(o),!0):!1}_ctrlFKeyHandler(e){if(this.option("searchPanel.visible")){let t=this._headerPanel.getSearchTextEditor();t&&(t.focus(),e.originalEvent.preventDefault())}}_f2KeyHandler(){let e=this._editingController.isEditing(),t=this.getVisibleRowIndex(),n=this._focusedView&&this._focusedView.getRow(t);!e&&Kd(n)&&this._startEditing()}_navigateNextCell(e,t){let n=this._getNextCell(t),o=this._getDirectionCodeByKey(t);return n&&this._isCellValid(n)?this._arrowKeysHandlerFocusCell(e,n,o):!1}_arrowKeysHandlerFocusCell(e,t,n){let o=n==="prevRow"||n==="nextRow",s=this._fireFocusChangingEvents(e,t,o,!0);return t=s.$newCellElement,!s.cancel&&this._isCellValid(t)?(this._focus(t,!s.isHighlighted),!0):!1}_beginFastEditing(e,t){if(!this._isFastEditingAllowed()||e.altKey||e.ctrlKey||this._editingController.isEditing())return!1;if(t)this._startEditing(e,Wf);else{let{key:n}=e,o=e.keyCode||e.which,s=n||o&&String.fromCharCode(o);s&&(s.length===1||s===Wf)&&this._startEditing(e,s)}return!0}_pointerEventHandler(e){var t;let n=e.event||e,o=u(n.currentTarget),s=(t=this._rowsView)===null||t===void 0?void 0:t.element(),r=o.parent(),a=u(n.target).is(Gd),l=!!u(n.target).closest(`.${jH}`).length,d=o.hasClass(uh);this._isEventInCurrentGrid(n)&&(!l&&(this._isCellValid(o,!a)||d)?(o=this._isInsideEditForm(o)?u(n.target):o,this._focusView(),u(s).removeClass(sE),r.hasClass(Nf)?(this._updateFocusedCellPosition(o),this._applyTabIndexToElement(this._focusedView.element()),this._focusedView.focus(!0)):this.getMasterDetailCell(o)?this._updateFocusedCellPosition(o):this._clickTargetCellHandler(n,o)):o.is("td")&&this._resetFocusedCell())}_clickTargetCellHandler(e,t){let n=this._getColumnByCellElement(t),o=this._isCellEditMode();this.setCellFocusType();let s=this._fireFocusChangingEvents(e,t,!0);if(t=s.$newCellElement,s.cancel)this.setRowFocusType(),this.setFocusedRowIndex(s.prevRowIndex),this._editingController.isEditing()&&o&&this._closeEditCell();else{if(s.resetFocusedRow){this._focusController._resetFocusedRow();return}if(s.rowIndexChanged&&(t=this._getFocusedCell()),!s.isHighlighted&&!o&&this.setRowFocusType(),this._updateFocusedCellPosition(t),this._allowRowUpdating()&&o&&n&&n.allowEditing)this._isNeedFocus=!1,this._isHiddenFocus=!1;else{t=this._getFocusedCell();let r=e&&u(e.target).closest(`${aE}, td`),a=r&&r.not(t).is(aE),d=!(!!n&&!n.command&&t.hasClass(aa))&&(!s.isHighlighted||a);this._focus(t,d,a)}}}_allowRowUpdating(){let e=this.getVisibleRowIndex(),t=this._dataController.items()[e];return this._editingController.allowUpdating({row:t},"click")}focus(e){let t,n=this.option("focusedRowEnabled"),o=this._isCellElement(u(e));e||(t=".dx-datagrid-rowsview .dx-row[tabindex]",n||(t+=", .dx-datagrid-rowsview .dx-row > td[tabindex]"),e=this.component.$element().find(t).first()),e&&this._focusElement(u(e),o)}getFocusedView(){return this._focusedView}setupFocusedView(){this.isKeyboardEnabled()&&!f(this._focusedView)&&this._focusView()}_focusElement(e,t){let n=u(this._getRowsViewElement()),o=e.closest(n),s=this.isRowFocusType(),r={};!o.length||this._isCellElement(e)&&!this._isCellValid(e)||(this._focusView(),this._isNeedFocus=!0,this._isNeedScroll=!0,(this._isCellElement(e)||jd(e))&&(this.setCellFocusType(),r=this._fireFocusChangingEvents(null,e,!0,t),e=r.$newCellElement,s&&!r.isHighlighted&&this.setRowFocusType()),r.cancel||(this._focus(e,!r.isHighlighted),this._focusInteractiveElement(e)))}_getFocusedViewByElement(e){let t=this.getFocusedView(),n=t&&u(t.element());return e&&e.closest(n).length!==0}_focusView(){this._focusedView=this._rowsView}_resetFocusedView(){this.setRowFocusType(),this._focusedView=null}_focusInteractiveElement(e,t){if(!e)return;let n=this._getInteractiveElement(e,t);R.focusAndSelectElement(this,n)}_focus(e,t,n){let o=e&&!e.hasClass(Wo)?e.closest(`.${Wo}`):e;if(o&&QH(o))return;let s=this._focusedView,r=s&&s.element(),a;this._isHiddenFocus=t;let l=jd(o)||qH(o)||this.isRowFocusType();l?(a=o,s&&this.setFocusedRowIndex(this._getRowIndex(o))):this._isCellElement(e)&&(a=e,this._updateFocusedCellPosition(e)),a&&(r&&r.find(".dx-row[tabindex], .dx-row > td[tabindex]").filter((d,c)=>R.isElementInCurrentGrid(this,u(c))).not(a).removeClass(hh).removeClass(rE).removeAttr("tabindex"),_.one(a,"blur",d=>{d.relatedTarget&&a.removeClass(hh).removeClass(rE)}),n||(this._applyTabIndexToElement(a),_.trigger(a,"focus")),t?(a.addClass(hh),l&&e.addClass(hh)):this._editorFactory.focus(a))}_updateFocus(e){this._updateFocusTimeout=setTimeout(()=>{if(this._needFocusEditingCell()){this._editingController._focusEditingCell();return}let t=this._getFocusedCell(),n=this._editingController.isEditing();if(!this.getMasterDetailCell(t)||this._isRowEditMode()){if(this._hasSkipRow(t.parent())){let o=this._focusedCellPosition&&this._focusedCellPosition.rowIndex>0?"upArrow":"downArrow";t=this._getNextCell(o)}if(Yn(t))if(t.is("td")||t.hasClass(this.addWidgetPrefix(NH))){let o=t.is(zf),s=t.find(":focus"),r=Yn(s),a=this._getColumnByCellElement(t);if((e||!o)&&this._editorFactory.focus()){if(o&&r){R.focusAndSelectElement(this,s);return}!r&&this._focus(t)}else!r&&(this._isNeedFocus||this._isHiddenFocus)&&this._focus(t,this._isHiddenFocus);n&&!(a!=null&&a.showEditorAlways)&&this._focusInteractiveElement.bind(this)(t)}else _.trigger(t,"focus")}})}_getColumnByCellElement(e){let n=this._rowsView.getCellIndex(e)+this._columnsController.getColumnIndexOffset();return this._columnsController.getVisibleColumns(null,!0)[n]}_needFocusEditingCell(){let e=this._editingController.getEditMode()===qu,t=this._editingController.getEditMode()===Uu,n=e&&this._editingController.hasChanges(),o=t&&this._editingController.isNewRowInEditMode(),s=this._getFocusedCell();return(s.children().length===0||s.find(Rd).length>0)&&(n||o)}_getFocusedCell(){return u(this._getCell(this._focusedCellPosition))}_updateFocusedCellPositionByTarget(e){var t;if(this._getElementType(e)==="row"&&f((t=this._focusedCellPosition)===null||t===void 0?void 0:t.columnIndex)){let o=u(e);this._focusedView&&jd(o)&&this.setFocusedRowIndex(this._getRowIndex(o))}else this._updateFocusedCellPosition(this._getCellElementFromTarget(e))}_updateFocusedCellPosition(e,t){let n=this._getCellPosition(e,t);return n&&(!e.length||n.rowIndex>=0&&n.columnIndex>=0)&&this.setFocusedCellPosition(n.rowIndex,n.columnIndex),n}_getFocusedColumnIndexOffset(e){let t=0,n=this._columnsController.getVisibleColumns()[e];return n&&n.fixed?t=this._getFixedColumnIndexOffset(n):e>=0&&(t=this._columnsController.getColumnIndexOffset()),t}_getFixedColumnIndexOffset(e){return ZH(this,e)?this._getVisibleColumnCount()-this._columnsController.getVisibleColumns().length:0}_getCellPosition(e,t){let n,o=Yn(e)&&e.closest("tr");if(Yn(o)){let s=this._getRowIndex(o);return n=this._rowsView.getCellIndex(e,s),n+=this._getFocusedColumnIndexOffset(n),t&&(n=t==="previous"?n-1:n+1,n=this._applyColumnIndexBoundaries(n)),{rowIndex:s,columnIndex:n}}}_focusCell(e,t){if(this._isCellValid(e))return this._focus(e,t),!0}_focusEditFormCell(e){e.hasClass(Hf)&&this._editorFactory.focus(e,!0)}_resetFocusedCell(e){var t;let n=this._getFocusedCell();Yn(n)&&n.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(e,t){let n=this,o,s,r=f(e),a=this._rowsView.element(),{columnIndex:l}=n._focusedCellPosition,d=n._dataController.getRowIndexOffset();e=r?e:this._rowsView.getTopVisibleItemIndex()+d,r?(s=this._rowsView.getRow(e-d),o=n._fireFocusedRowChanging(t,s),!o.cancel&&o.rowIndexChanged&&(e=o.newRowIndex)):(n._editorFactory.loseFocus(),n._applyTabIndexToElement(a),_.trigger(a,"focus")),(!r||!o.cancel)&&n.setFocusedCellPosition(e,l),r&&n._updateFocus()}_getNewPositionByCode(e,t,n){let{columnIndex:o}=e,{rowIndex:s}=e,r;if(e.rowIndex===void 0&&n==="next")return{columnIndex:0,rowIndex:0};switch(n){case"nextInRow":case"next":r=this._getVisibleColumnCount(),o<r-1&&t!=="row"&&this._hasValidCellAfterPosition({columnIndex:o,rowIndex:s})?o++:!this._isLastRow(s)&&n==="next"&&(o=0,s++);break;case"previousInRow":case"previous":o>0&&t!=="row"&&this._hasValidCellBeforePosition({columnIndex:o,rowIndex:s})?o--:s>0&&n==="previous"&&(s--,r=this._getVisibleColumnCount(),o=r-1);break;case"upArrow":s=s>0?s-1:s;break;case"downArrow":s=this._isLastRow(s)?s:s+1}return{columnIndex:o,rowIndex:s}}setFocusedCellPosition(e,t){this.setFocusedRowIndex(e),this.setFocusedColumnIndex(t)}setFocusedRowIndex(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.rowIndex=e}setFocusedColumnIndex(e){this._focusedCellPosition||(this._focusedCellPosition={}),this._focusedCellPosition.columnIndex=e}getRowIndex(){return this._focusedCellPosition?this._focusedCellPosition.rowIndex:-1}getColumnIndex(){return this._focusedCellPosition?this._focusedCellPosition.columnIndex:-1}getVisibleRowIndex(){var e;let t=(e=this._focusedCellPosition)===null||e===void 0?void 0:e.rowIndex;return!f(t)||t<0?-1:t-this._dataController.getRowIndexOffset()}getVisibleColumnIndex(){var e;let t=(e=this._focusedCellPosition)===null||e===void 0?void 0:e.columnIndex;return f(t)?t-this._columnsController.getColumnIndexOffset():-1}_applyColumnIndexBoundaries(e){let t=this._getVisibleColumnCount();return e<0?e=0:e>=t&&(e=t-1),e}_isCellByPositionValid(e){let t=u(this._getCell(e));return this._isCellValid(t)}_isLastRow(e){let t=this._dataController;if(this._isVirtualRowRender())return e>=t.getMaxRowIndex();let n=Math.max(...t.items().map((o,s)=>o.visible!==!1?s:-1));return e===n}_isFirstValidCell(e){let t=!1;return e.rowIndex===0&&e.columnIndex>=0&&(t=t||!this._hasValidCellBeforePosition(e)),t}_hasValidCellBeforePosition(e){let{columnIndex:t}=e,n=!1;for(;t>0&&!n;){let o={columnIndex:--t,rowIndex:e.rowIndex};n=this._isCellByPositionValid(o)}return n}_hasValidCellAfterPosition(e){let{columnIndex:t}=e,n=!1,o=this._getVisibleColumnCount();for(;t<o-1&&!n;){let s={columnIndex:++t,rowIndex:e.rowIndex};n=this._isCellByPositionValid(s)}return n}_isLastValidCell(e){let t=e.columnIndex>=0?e.columnIndex+1:0,{rowIndex:n}=e,o={columnIndex:t,rowIndex:n},s=this._dataController.getVisibleRows(),r=s&&s[n];return this._isLastRow(n)?(r?.rowType==="group"||r?.rowType==="groupFooter")&&e.columnIndex>0||e.columnIndex===this._getVisibleColumnCount()-1?!0:this._isCellByPositionValid(o)?!1:this._isLastValidCell(o):!1}_isCellValid(e,t){if(Yn(e)){let n=e.parent(),o=this._rowsView.getCellIndex(e)+this._columnsController.getColumnIndexOffset(),s=this._getColumnByCellElement(e),r=this._getVisibleColumnCount(),a=this._editingController,l=YH(n),d=s&&s.showWhenGrouped,c=s&&!e.hasClass(uh)&&Kd(n),h=function(){return!l&&s&&(!f(s.groupIndex)||d&&c)||parseInt(e.attr("colspan"),10)>1};if(uE.isDragCell(e))return!1;if(this.getMasterDetailCell(e))return!0;if(r>o&&h()){let g=this._dataController.items(),C=this._rowsView.getRowIndex(n),v=g[C],b=a&&this._isCellEditMode()&&a.isEditing(),T=a&&a.isEditRow(C),M=T||b;return s.command?this._isLegacyNavigation()?!M&&s.command==="expand":b?!1:T?s.command!=="select":!M:b&&v&&v.rowType!=="data"?!1:!M||s.allowEditing||t}}}getFirstValidCellInRow(e,t){let n=this,o=e.find("> td"),s,r;t=t||0;for(let a=t;a<o.length;++a)if(s=o.eq(a),n._isCellValid(s)){r=s;break}return r}_getNextCell(e,t,n){let o=n||this._focusedCellPosition,s=this.isRowFocusType(),r=s||["next","previous"].includes(e),a,l;if(this._focusedView&&o){let d=this._getNewPositionByCode(o,t,e);a=u(this._getCell(d));let c=e==="previous"?this._isFirstValidCell(d):this._isLastValidCell(d);if(Yn(a)&&!this._isCellValid(a)&&this._isCellInRow(d,r)&&!c&&(s?a=this.getFirstValidCellInRow(a.parent(),d.columnIndex):a=this._getNextCell(e,"cell",d)),l=Yn(a)&&a.parent(),this._hasSkipRow(l)){let h=this._getRowIndex(l);if(!this._isLastRow(h))a=this._getNextCell(e,"row",{columnIndex:o.columnIndex,rowIndex:h});else return null}return Yn(a)?a:null}return null}_startEditing(e,t){let n=this._focusedCellPosition,o=this.getVisibleRowIndex(),s=this.getVisibleColumnIndex(),r=this._dataController.items()[o],a=this._columnsController.getVisibleColumns()[s];this._isAllowEditing(r,a)&&(this._isRowEditMode()?this._editingController.editRow(o):n&&this._startEditCell(e,t))}_isAllowEditing(e,t){return this._editingController.allowUpdating({row:e})&&t&&t.allowEditing}_editFocusedCell(){let e=this.getVisibleRowIndex(),t=this.getVisibleColumnIndex();return this._editingController.editCell(e,t)}_startEditCell(e,t){this._fastEditingStarted=f(t);let n=this._editFocusedCell(),o=rl(n);if(!this._isFastEditingStarted()||!o&&!n)return;let r=o&&t===Wf?"":t,a=o?n:y().resolve(),l=this._rowsView.waitAsyncTemplates(!0);P(a,l).done(()=>{this._editingCellHandler(e,r)})}_editingCellHandler(e,t){var n;let o=this._getFocusedCell().find(Gd).eq(0),s=o.get(0);if(!s)return;let r=Ro(e,{type:"keydown",target:s}),a=Ro(e,{type:"keypress",target:s}),l=Ro(e,{type:"input",target:s});if(l.originalEvent&&(l.originalEvent=Ro(l.originalEvent,{data:t})),(n=s.select)===null||n===void 0||n.call(s),_.trigger(o,r),!r.isDefaultPrevented()&&(_.trigger(o,a),!a.isDefaultPrevented())){let d=we.mozilla?25:0;setTimeout(()=>{let c=this._getKeyPressInputValue(o,t);o.val(c);let h=o.closest(`.${GH}`);_.off(h,"focusout"),_.one(h,"focusout",()=>{_.trigger(o,"change")}),_.trigger(o,l)},d)}}_getKeyPressInputValue(e,t){let n=e.val();return t==="-"&&n==="-0"?"-0":t}_fireFocusChangingEvents(e,t,n,o){let s={},r=this._getCellPosition(t)??{};return this.isCellFocusType()&&(s=this._fireFocusedCellChanging(e,t,o),s.cancel||(r.columnIndex=s.newColumnIndex,r.rowIndex=s.newRowIndex,o=s.isHighlighted,t=u(this._getCell(r)))),!s.cancel&&n&&t&&(s=this._fireFocusedRowChanging(e,t.parent()),s.cancel||(r.rowIndex=s.newRowIndex,s.isHighlighted=o)),s.$newCellElement=u(this._getCell(r)),s.$newCellElement.length||(s.$newCellElement=t),s}_fireFocusedCellChanging(e,t,n){let o=this.option("focusedColumnIndex"),s=this.option("focusedRowIndex"),r=this._getCellPosition(t),a=r?r.columnIndex:-1,l=r?r.rowIndex:-1,d=this._dataController.getVisibleRows(),c=this._columnsController.getVisibleColumns(),h={cellElement:t,prevColumnIndex:o,prevRowIndex:s,newColumnIndex:a,newRowIndex:l,rows:d,columns:c,event:e,isHighlighted:n||!1,cancel:!1};return this._canceledCellPosition=null,this.executeAction("onFocusedCellChanging",h),(h.newColumnIndex!==a||h.newRowIndex!==l)&&(h.$newCellElement=u(this._getCell({columnIndex:h.newColumnIndex,rowIndex:h.newRowIndex}))),h.cancel&&(this._canceledCellPosition={rowIndex:l,columnIndex:a}),h}_fireFocusedCellChanged(e){let t=this._rowsView.getCellIndex(e),n=e?.parent().data("options"),o=n?.key;this._memoFireFocusedCellChanged(o,t)}_memoFireFocusedCellChanged(e,t){let n=this._getFocusedCell(),o=this._getRowIndex(n?.parent()),s=Math.min(o-this._dataController.getRowIndexOffset(),this._dataController.items().length-1);if(this._editingController.isEditCell(s,t))return;let a=this._dataController.items()[s],l=this._columnsController.getVisibleColumns()[t];this.executeAction("onFocusedCellChanged",{cellElement:n?H(n):void 0,columnIndex:t,rowIndex:o,row:a,column:l})}_fireFocusedRowChanging(e,t){let n=this._getRowIndex(t),o=this.option("focusedRowIndex"),s=this._dataController.loadingOperationTypes(),r={rowElement:t,prevRowIndex:o,newRowIndex:n,event:e,rows:this._dataController.getVisibleRows(),cancel:!1},a=s.sorting||s.grouping||s.filtering||s.paging;return!this._dataController||this._dataController.isLoading()&&a?(r.cancel=!0,r):(this.option("focusedRowEnabled")&&(this.executeAction("onFocusedRowChanging",r),!r.cancel&&r.newRowIndex!==n&&(r.resetFocusedRow=r.newRowIndex<0,r.resetFocusedRow||this.setFocusedRowIndex(r.newRowIndex),r.rowIndexChanged=!0)),r)}_fireFocusedRowChanged(){var e;let t=this.option("focusedRowEnabled"),n=this.option("focusedRowKey"),o=(e=this._focusController)===null||e===void 0?void 0:e.getFocusedRowIndexByKey(n);!t||f(n)&&o<0||this._memoFireFocusedRowChanged(n,o)}_memoFireFocusedRowChanged(e,t){let n=t-this._dataController.getRowIndexOffset();this.executeAction("onFocusedRowChanged",{rowElement:t<0?void 0:this._rowsView.getRowElement(n),rowIndex:t,row:t<0?void 0:this._dataController.getVisibleRows()[n]})}_isEventInCurrentGrid(e){return R.isElementInCurrentGrid(this,u(e.target))}_isRowEditMode(){let e=this._editingController.getEditMode();return e===la||e===Yu}_isCellEditMode(){let e=this._editingController.getEditMode();return e===qu||e===Uu}_isFastEditingAllowed(){return this._isCellEditMode()&&this.option("keyboardNavigation.editOnKeyPress")}_getInteractiveElement(e,t){let n=e.find(Gd).filter(":visible");return t?n.last():n.first()}_applyTabIndexToElement(e){let t=this.option("tabIndex")??0;e.attr("tabindex",t)}_getCell(e){if(this._focusedView&&e){let t=this._dataController.getRowIndexOffset(),n=this._columnsController.getVisibleColumns(null,!0)[e.columnIndex],o=n&&n.fixed?this._getFixedColumnIndexOffset(n):this._columnsController.getColumnIndexOffset(),s=e.rowIndex>=0?e.rowIndex-t:-1,r=e.columnIndex>=0?e.columnIndex-o:-1;return this._focusedView.getCell({rowIndex:s,columnIndex:r})}}_getRowIndex(e){let t=this._rowsView.getRowIndex(e);return t>=0&&(t+=this._dataController.getRowIndexOffset()),t}_hasSkipRow(e){let t=e&&e.get(0);return t&&t.style.display==="none"}_allowEditingOnEnterKey(){return this.option("keyboardNavigation.enterKeyAction")==="startEdit"}_isLegacyNavigation(){return this.option("useLegacyKeyboardNavigation")}_getDirectionCodeByKey(e){let 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(){let e=this.option("scrolling.mode");return e==="virtual"||e==="infinite"}_isVirtualRowRender(){return this._isVirtualScrolling()||R.isVirtualRowRendering(this)}_isVirtualColumnRender(){return this.option("scrolling.columnRenderingMode")==="virtual"}_scrollBy(e,t,n,o){let s=this,r=this._rowsView.getScrollable();if(s._focusedCellPosition){let a=function(){r.off("scroll",a),setTimeout(s.restoreFocusableElement.bind(s,n,o))};r.on("scroll",a)}return r.scrollBy({left:e,top:t})}_isInsideEditForm(e){let t=u(e).closest(`.${this.addWidgetPrefix(Ad)}`);return t.length&&this.elementIsInsideGrid(t)}getMasterDetailCell(e){let t=u(e).closest(`.${Hf}`);return t.length&&this.elementIsInsideGrid(t)?t:null}_processNextCellInMasterDetail(e,t){!this._isInsideEditForm(e)&&e&&this._applyTabIndexToElement(e)}_handleTabKeyOnMasterDetailCell(e,t){if(this.getMasterDetailCell(e)){this._updateFocusedCellPosition(u(e),t);let n=this._getNextCell(t,"row");return this._processNextCellInMasterDetail(n,u(e)),!0}return!1}_getElementType(e){return u(e).is("tr")?"row":"cell"}_isFastEditingStarted(){return this._isFastEditingAllowed()&&this._fastEditingStarted}_getVisibleColumnCount(){return this._columnsController.getVisibleColumns(null,!0).length}_isCellInRow(e,t){let{columnIndex:n}=e,o=this._getVisibleColumnCount();return t?n>=0&&n<=o-1:n>0&&n<o-1}_isCellElement(e){return e.length&&e[0].tagName==="TD"}_getCellElementFromTarget(e){let t=this._getElementType(e),n=u(e),o;return t==="cell"?o=n.closest(`.${Wo} > td`):o=n.children().not(`.${uh}`).first(),o}_getRowsViewElement(){var e;return(e=this._rowsView)===null||e===void 0?void 0:e.element()}isKeyboardEnabled(){return this.option("keyboardNavigation.enabled")}_processCanceledEditCellPosition(e,t){if(this._canceledCellPosition){let n=this._canceledCellPosition.rowIndex===e&&this._canceledCellPosition.columnIndex===t;return this._canceledCellPosition=null,n}}updateFocusedRowIndex(){let e=this._dataController,t=this.getVisibleRowIndex(),n=e.items(),o=n.length?n.length-1:-1,s=e.getRowIndexOffset();o>=0&&t>o&&this.setFocusedRowIndex(o+s)}},o7=i=>class extends i{_rowClick(e){let t=this._editingController.getEditRowIndex(),n=this._keyboardNavigationController.isKeyboardEnabled();t===e.rowIndex&&this._keyboardNavigationController.setCellFocusType(),(Gf()||!n)&&this.option("focusedRowEnabled")&&this._triggerPointerDownEventHandler(e,!n),super._rowClick.apply(this,arguments)}_triggerPointerDownEventHandler(e,t){let{originalEvent:n}=e.event;if(n){let o=u(n.target),s=this.getCellIndex(o),r=this._columnsController.getVisibleColumns()[s],a=this._dataController.items()[e.rowIndex];if(this._keyboardNavigationController._isAllowEditing(a,r)||t){let l=Ro(n,{currentTarget:n.target});this._keyboardNavigationController._pointerEventHandler(l)}}}renderFocusState(e){super.renderFocusState(e);let{preventScroll:t,pageSizeChanged:n}=e??{},o=this.element();o&&!Tn(o)&&o.attr("tabindex",null),n&&this._keyboardNavigationController.updateFocusedRowIndex();let s=this._keyboardNavigationController.getVisibleRowIndex();(!f(s)||s<0)&&(s=0);let r=this.getCellElements(s);this._keyboardNavigationController.isKeyboardEnabled()&&r!==null&&r!==void 0&&r.length&&this.updateFocusElementTabIndex(r,t)}updateFocusElementTabIndex(e,t){let n=e.eq(0).parent();if(jd(n))this._keyboardNavigationController._applyTabIndexToElement(n);else{let o=this._keyboardNavigationController.getColumnIndex();(!f(o)||o<0)&&(o=0),this._updateFocusedCellTabIndex(e,o)}}_updateFocusedCellTabIndex(e,t){let n=this._keyboardNavigationController,o=e?e.length:-1,s=function(a){let l=!!n.getMasterDetailCell(a),d=n._isCellValid(a);if(!l&&d&&n._isCellElement(a))return n._applyTabIndexToElement(a),n.setCellFocusType(),!0},r=uE.getCellToFocus(e,t);if(r.length)s(r);else{o<=t&&(t=o-1);for(let a=t;a<o&&!s(u(e[a]));++a);}}renderDelayedTemplates(e){super.renderDelayedTemplates.apply(this,arguments),this.waitAsyncTemplates().done(()=>{this._renderFocusByChange(e)})}_renderFocusByChange(e){var t;let{operationTypes:n,repaintChangesOnly:o}=e??{},{fullReload:s,pageSize:r}=n??{},a=!!(e!=null&&(t=e.changeTypes)!==null&&t!==void 0&&t.find(l=>l==="insert"||l==="remove"));if(!e||!o||s||r||a){let l=JH(this);this.renderFocusState({preventScroll:l,pageSizeChanged:r})}}_renderCore(e){let t=super._renderCore.apply(this,arguments);return this._renderFocusByChange(e),t}_editCellPrepared(e){var t;let n=this._getEditorInstance(e),o=(t=this._keyboardNavigationController)===null||t===void 0?void 0:t._isFastEditingStarted();n&&o&&this._handleEditingNavigationMode(n),super._editCellPrepared.apply(this,arguments)}_handleEditingNavigationMode(e){["downArrow","upArrow"].forEach(n=>{let o=e._supportedKeys()[n];e.registerKeyHandler(n,s=>{if(e._input().attr("aria-expanded")==="true")return o&&o.call(e,s)})}),e.registerKeyHandler("leftArrow",E),e.registerKeyHandler("rightArrow",E),e.NAME===WH&&e.option("useMaskBehavior")&&e.registerKeyHandler("enter",E)}_getEditorInstance(e){let t=e.find(".dx-texteditor").eq(0);return R.getWidgetInstance(t)}},s7=i=>class extends i{editCell(e,t){if(this._keyboardNavigationController._processCanceledEditCellPosition(e,t))return!1;let n=super.editCell(e,t);return n&&this._keyboardNavigationController.setupFocusedView(),n}editRow(e){let t=this._keyboardNavigationController.getVisibleColumnIndex(),n=this._columnsController.getVisibleColumns()[t];(n&&n.type||this.option("editing.mode")===Yu)&&this._keyboardNavigationController._resetFocusedCell(),super.editRow(e)}addRow(e){return this._keyboardNavigationController.setupFocusedView(),this._keyboardNavigationController.setCellFocusType(),super.addRow.apply(this,arguments)}getFocusedCellInRow(e){let t=super.getFocusedCellInRow(e),n=this._dataController.getRowIndexOffset(),o=this._keyboardNavigationController._focusedCellPosition.rowIndex-n;if(this._keyboardNavigationController.isKeyboardEnabled()&&o===e){let s=this._keyboardNavigationController._getFocusedCell();Yn(s)&&!s.hasClass(oE)&&(t=s)}return t}_processCanceledEditingCell(){this.closeEditCell().done(()=>{this._keyboardNavigationController._updateFocus()})}closeEditCell(){let e=this._keyboardNavigationController;e._fastEditingStarted=!1;let t=super.closeEditCell.apply(this,arguments);return!!this._getFocusedElement().closest(`.${this.addWidgetPrefix(RV)}`).length||e._updateFocus(),t}_getFocusedElement(){var e,t;return u((e=(t=this.component).element)===null||e===void 0?void 0:e.call(t)).find(":focus")}_delayedInputFocus(){this._keyboardNavigationController._isNeedScroll=!0,super._delayedInputFocus.apply(this,arguments)}_isEditingStart(){let e=super._isEditingStart.apply(this,arguments);if(e&&!this._keyboardNavigationController._isNeedFocus){let t=this._keyboardNavigationController._getFocusedCell();this._keyboardNavigationController._focus(t,!0)}return e}},r7=i=>class extends i{_correctRowIndices(e){let t=this._keyboardNavigationController._focusedCellPosition;if(super._correctRowIndices.apply(this,arguments),t&&t.rowIndex>=0){let n=e(t.rowIndex);n&&(t.rowIndex+=n,this._editorFactoryController.refocus())}}getMaxRowIndex(){let e=this.items().length-1,t=this.virtualItemsCount();if(t){let n=this.getRowIndexOffset();e+=n+t.end}return e}},a7=i=>class extends i{_showHiddenCellsInView(e){let{viewName:t,$cells:n,isCommandColumn:o}=e;super._showHiddenCellsInView.apply(this,arguments),t===cE&&!o&&n.each((s,r)=>{let a=u(r);pE(a)&&a.attr("tabindex",0)})}_hideVisibleCellInView(e){let{viewName:t,$cell:n,isCommandColumn:o}=e;super._hideVisibleCellInView.apply(this,arguments),t===cE&&!o&&pE(n)&&n.removeAttr("tabindex")}_hideVisibleColumnInView(e){let{view:t,isCommandColumn:n,visibleIndex:o}=e;super._hideVisibleColumnInView({view:t,isCommandColumn:n,visibleIndex:o}),t.name===KH&&this._rowsView.renderFocusState(null)}},t1={defaultOptions:()=>({useLegacyKeyboardNavigation:!1,keyboardNavigation:{enabled:!0,enterKeyAction:"startEdit",enterKeyDirection:"none",editOnKeyPress:!1}}),controllers:{keyboardNavigation:gE},extenders:{views:{rowsView:o7},controllers:{editing:s7,data:r7,adaptiveColumns:a7,keyboardNavigation:e1}}};$.registerModule("keyboardNavigation",t1);function mE(i,e,t,n){let o=0;if(i<e)for(;o<t.items.length;o++)mE(i+1,e,t.items[o],n);i===e&&n(t)}function jf(i,e){let t;if("map"in i)return i.map(e);let n=new Array(i.length);for(t in i)n[t]=e(i[t],t);return n}function l7(i){return i!==i||i===""||i===null||i===void 0}function d7(i){return i===_c.count}function i1(i){let e=Ce(i.selector),t="skipEmptyValues"in i?i.skipEmptyValues:!0,{aggregator:n}=i;if(typeof n=="string"&&(n=_c[n],!n))throw mt.Error("E4001",i.aggregator);return{selector:e,aggregator:n,skipEmptyValues:t}}var Kf=class{constructor(e){this._data=e.data,this._groupLevel=e.groupLevel||0,this._totalAggregates=jf(e.totalAggregates||[],i1),this._groupAggregates=jf(e.groupAggregates||[],i1),this._totals=[]}calculate(){this._totalAggregates.length&&this._calculateTotals(0,{items:this._data}),this._groupAggregates.length&&this._groupLevel>0&&this._calculateGroups({items:this._data})}totalAggregates(){return this._totals}_aggregate(e,t,n){let o=t.items?t.items.length:0;for(let s=0;s<e.length;s++){if(d7(e[s].aggregator)){n[s]=(n[s]||0)+o;continue}for(let r=0;r<o;r++)this._accumulate(s,e[s],n,t.items[r])}}_calculateTotals(e,t){if(e===0&&(this._totals=this._seed(this._totalAggregates)),e===this._groupLevel)this._aggregate(this._totalAggregates,t,this._totals);else for(let n=0;n<t.items.length;n++)this._calculateTotals(e+1,t.items[n]);e===0&&(this._totals=this._finalize(this._totalAggregates,this._totals))}_calculateGroups(e){let t=this._groupLevel,n=t+1,o=this._seed.bind(this,this._groupAggregates),s=this._aggregate.bind(this,this._groupAggregates),r=this._finalize.bind(this,this._groupAggregates);function a(l){l.aggregates=o(n-1),n===t?s(l,l.aggregates):mE(n,t,l,d=>{s(d,l.aggregates)}),l.aggregates=r(l.aggregates)}for(;--n>0;)mE(0,n,e,a)}_seed(e,t){return jf(e,n=>{let{aggregator:o}=n;return"seed"in o?A(o.seed)?o.seed(t):o.seed:NaN})}_accumulate(e,t,n,o){let s=t.selector(o),{aggregator:r}=t,{skipEmptyValues:a}=t;a&&l7(s)||(n[e]!==n[e]?n[e]=s:n[e]=r.step(n[e],s))}_finalize(e,t){return jf(e,(n,o)=>{let s=n.aggregator.finalize;return s?s(t[o]):t[o]})}};var c7="dx-cell-focus-disabled";var s1=function(i,e){let t=u(i),{column:n}=e,{summaryItems:o}=e,s=[];if(!n.command&&o){for(let r=0;r<o.length;r++){let a=o[r],l=$.getSummaryText(a,e.summaryTexts);s.push(u("<div>").css("textAlign",a.alignment||n.alignment).addClass("dx-datagrid-summary-item").addClass("dx-datagrid-text-content").addClass(a.cssClass).toggleClass("dx-datagrid-group-text-content",e.rowType==="group").text(l).attr("aria-label",`${n.caption} ${l}`))}t.append(s)}},r1=function(i,e){let t=i.option("summary.texts")||{};return{totalItem:e.row,summaryItems:e.row.summaryCells[e.columnIndex],summaryTexts:t}},fE=function(i){return i.summary||i.aggregates||[]},CE=function(i){return i.option("summary.recalculateWhileEditing")},a1=function(i,e,t,n){n=n||[];for(let o=0;o<i.length;o++)n.push(i[o].key),e===1?t(n,i[o].items):a1(i[o].items,e-1,t,n),n.pop()},l1=function(i,e,t){return t?l1(i,e.map(n=>({items:[n]}),t-1)):i.concat(e)},d1=function(i,e,t){return t?i.map(n=>{let o={},s=d1(n.items||[],e,t-1);return Object.defineProperty(o,"aggregates",{get:()=>n.aggregates,set:r=>{n.aggregates=r}}),m(o,n,{items:s})}):i.filter(n=>e.indexOf(n)<0)},c1=function(i,e,t){if(!i||!e.length)return i;let n=e[0],o=t[0],s;return n&&o&&o.length&&(s=Mt(i),x(o,function(r){r===0?s=s.sortBy(this.selector,this.desc):s=s.thenBy(this.selector,this.desc)}),s.enumerate().done(r=>{i=r})),e=e.slice(1),t=t.slice(1),e.length&&t.length&&x(i,function(){this.items=c1(this.items,e,t)}),i},n1=function(i,e,t){let n=t&&t.sortByGroups&&t.sortByGroups();return n&&n.length?c1(i,e,n):i},o1=function(i,e,t,n){let o;if(CE(i)){let s=i._editingController;if(s){let r=s.getInsertedData();r.length&&(t=l1(t,r,n));let a=s.getRemovedData();a.length&&(t=d1(t,a,n))}}return e&&(o=new Kf({totalAggregates:e.totalAggregates,groupAggregates:e.groupAggregates,data:t,groupLevel:n}),o.calculate()),o?o.totalAggregates():[]},_E=class extends bo{_getRows(){return this._dataController.footerItems()}_getCellOptions(e){return m(super._getCellOptions(e),r1(this,e))}_renderCellContent(e,t){s1(e,t),super._renderCellContent.apply(this,arguments)}_renderCore(e){let t=!1,n=this._dataController.footerItems()[0];(!e||!e.columnIndices)&&(this.element().empty().addClass("dx-datagrid-total-footer").toggleClass("dx-datagrid-nowrap",!this.option("wordWrapEnabled")),t=!0),n&&n.summaryCells&&n.summaryCells.length&&(this._updateContent(this._renderTable({change:e}),e),t&&this._updateScrollLeftPosition())}_updateContent(e,t){return t&&t.changeType==="update"&&t.columnIndices?this.waitAsyncTemplates().done(()=>{let n=this.getTableElement().find(".dx-row"),o=e.find(".dx-row");this._updateCells(n,o,t.columnIndices[0])}):super._updateContent.apply(this,arguments)}_rowClick(e){let t=this._dataController.footerItems()[e.rowIndex]||{};this.executeAction("onRowClick",m({},e,t))}_columnOptionChanged(e){let{optionNames:t}=e;e.changeTypes.grouping||(t.width||t.visibleWidth)&&super._columnOptionChanged(e)}_handleDataChanged(e){let{changeType:t}=e;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(e){let t=super._createRow.apply(this,arguments);return e.rowType==="totalFooter"&&(t.addClass("dx-footer-row"),t.addClass(c7),t.attr("tabindex",0)),t}getHeight(){return this.getElementHeight()}isVisible(){return!!this._dataController.footerItems().length}},u7=i=>class extends i{init(){super.init.apply(this,arguments),this._editingController=this.getController("editing"),this._totalAggregates=[],this._summaryGetter=E}summaryGetter(e){if(!arguments.length)return this._summaryGetter;A(e)&&(this._summaryGetter=e)}summary(e){if(!arguments.length)return this._summaryGetter();this._summaryGetter=function(){return e}}totalAggregates(){return this._totalAggregates}isLastLevelGroupItemsPagingLocal(){let e=this.summary(),t=e?.sortByGroups();return t?.length}sortLastLevelGroupItems(e,t,n){let o=cn.multiLevelGroup(Mt(e),t).toArray(),s=[];return n.forEach(r=>{a1(o,t.length,(a,l)=>{r.toString()===a.toString()&&(s=s.concat(l))})}),s}_customizeRemoteOperations(e){let t=this.summary();t&&(e.remoteOperations.summary?(!e.isCustomLoading||e.storeLoadOptions.isLoadingAll)&&(e.storeLoadOptions.group&&(e.remoteOperations.grouping?e.storeLoadOptions.groupSummary=t.groupAggregates:t.groupAggregates.length&&(e.remoteOperations.paging=!1)),e.storeLoadOptions.totalSummary=t.totalAggregates):(t.totalAggregates.length||t.groupAggregates.length&&e.storeLoadOptions.group)&&(e.remoteOperations.paging=!1)),super._customizeRemoteOperations.apply(this,arguments);let n=e.cachedData.extra;n!=null&&n.summary&&!e.isCustomLoading&&(e.storeLoadOptions.totalSummary=void 0)}_handleDataLoadedCore(e){let t=vn(e.storeLoadOptions.group||e.loadOptions.group||[]),n=e.remoteOperations||{},o=this.summaryGetter()(n);if(!e.isCustomLoading||e.storeLoadOptions.isLoadingAll){if(n.summary)!n.paging&&t.length&&o&&(n.grouping||o1(this,{groupAggregates:o.groupAggregates},e.data,t.length),e.data=n1(e.data,t,o));else if(!n.paging&&o){var s;let r=e.operationTypes||{};if(!Object.keys(r).some(l=>r[l])||!((s=e.cachedData)!==null&&s!==void 0&&(s=s.extra)!==null&&s!==void 0&&s.summary)||t.length&&o.groupAggregates.length){let l=o1(this,o,e.data,t.length);e.extra=X(e.extra)?e.extra:{},e.extra.summary=l,e.cachedData&&(e.cachedData.extra=e.extra)}e.data=n1(e.data,t,o)}}e.isCustomLoading||(this._totalAggregates=e.extra&&e.extra.summary||this._totalAggregates),super._handleDataLoadedCore(e)}};ea.extend(u7);var h7=i=>class extends i{_isDataColumn(e){return e&&(!f(e.groupIndex)||e.showWhenGrouped)}_isGroupFooterVisible(){let e=this.option("summary.groupItems")||[];for(let t=0;t<e.length;t++){let n=e[t],o=this._columnsController.columnOption(n.showInColumn||n.column);if(n.showInGroupFooter&&this._isDataColumn(o))return!0}return!1}_processGroupItems(e,t,n){let o=n&&n.data,s=super._processGroupItems.apply(this,arguments);return n&&(n.isGroupFooterVisible===void 0&&(n.isGroupFooterVisible=this._isGroupFooterVisible()),o&&o.items&&n.isGroupFooterVisible&&(n.collectContinuationItems||!o.isContinuationOnNextPage)&&s.push({rowType:"groupFooter",key:n.path.slice(),data:o,groupIndex:n.path.length-1,values:[]})),s}_processGroupItem(e,t){let n=this;if(t.summaryGroupItems||(t.summaryGroupItems=n.option("summary.groupItems")||[]),e.rowType==="group"){let o=-1,s=-1;x(t.visibleColumns,function(r){let a=t.visibleColumns[r-1];e.groupIndex===this.groupIndex&&(o=this.index),r>0&&a.command==="expand"&&this.command!=="expand"&&(s=this.index)}),e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,fE(e.data),t.visibleColumns,(r,a)=>r.showInGroupFooter?-1:r.alignByColumn&&a&&!f(a.groupIndex)&&a.index!==s?a.index:o,!0)}return e.rowType==="groupFooter"&&(e.summaryCells=this._calculateSummaryCells(t.summaryGroupItems,fE(e.data),t.visibleColumns,(o,s)=>o.showInGroupFooter&&n._isDataColumn(s)?s.index:-1)),e}_calculateSummaryCells(e,t,n,o,s){let r=this,a=[],l={};return x(e,(d,c)=>{let h=r._columnsController.columnOption(c.column),p=c.showInColumn&&r._columnsController.columnOption(c.showInColumn)||h,g=o(c,p);if(g>=0){l[g]||(l[g]=[]);let C=t[d];if(C===C){let v;f(c.valueFormat)?v=c.valueFormat:c.summaryType!=="count"&&(v=$.getFormatByDataType(h&&h.dataType)),l[g].push(m({},c,{value:B(C)&&h&&h.deserializeValue?h.deserializeValue(C):C,valueFormat:v,columnCaption:h&&h.index!==g?h.caption:void 0}))}}}),bt(l)||n.forEach((d,c)=>{let h=n[c-1],p=s&&(h?.command==="expand"||d.command==="expand")?h?.index:d.index;a.push(l[p]||[])}),a}_getSummaryCells(e,t){let n=this,o=n._columnsController;return n._calculateSummaryCells(e,t,o.getVisibleColumns(),(s,r)=>n._isDataColumn(r)?r.index:-1)}_updateItemsCore(e){let t=this,n,o=t._dataSource,s=t._footerItems,r=s&&s[0]&&s[0].summaryCells,a=t.option("summary.totalItems");if(t._footerItems=[],o&&a&&a.length){let l=o.totalAggregates();n=t._getSummaryCells(a,l),e&&e.repaintChangesOnly&&r&&(e.totalColumnIndices=n.map((d,c)=>JSON.stringify(d)!==JSON.stringify(r[c])?c:-1).filter(d=>d>=0)),n.length&&t._footerItems.push({rowType:"totalFooter",summaryCells:n})}super._updateItemsCore(e)}_prepareUnsavedDataSelector(e){if(CE(this)){let t=this._editingController;if(t)return function(n){return n=t.getUpdatedData(n),e(n)}}return e}_prepareAggregateSelector(e,t){return e=this._prepareUnsavedDataSelector(e),t==="avg"||t==="sum"?function(n){let o=e(n);return f(o)?Number(o):o}:e}_getAggregates(e,t){let n=this,o=n.option("summary.calculateCustomSummary"),s=n.option("summary.skipEmptyValues");return qe(e||[],r=>{let a=this._columnsController.columnOption(r.column),l=a&&a.calculateCellValue?a.calculateCellValue.bind(a):Ce(a?a.dataField:r.column),d=r.summaryType||"count",c=f(r.skipEmptyValues)?r.skipEmptyValues:s;if(t)return{selector:r.column,summaryType:d};let h=n._prepareAggregateSelector(l,d);if(d==="custom"){o||(ie.log("E1026"),o=function(){});let p={component:n.component,name:r.name};o(p),p.summaryProcess="calculate",d={seed(g){return p.summaryProcess="start",p.totalValue=void 0,p.groupIndex=g,delete p.value,o(p),p.totalValue},step(g,C){return p.summaryProcess="calculate",p.totalValue=g,p.value=C,o(p),p.totalValue},finalize(g){return p.summaryProcess="finalize",p.totalValue=g,delete p.value,o(p),p.totalValue}}}return{selector:h,aggregator:d,skipEmptyValues:c}})}_addSortInfo(e,t,n,o){if(t){let{groupIndex:s}=t;o=o||t.sortOrder,f(s)&&(e[s]=e[s]||[],e[s].push({selector:n,desc:o==="desc"}))}}_findSummaryItem(e,t){let n=-1;return f(t)&&x(e||[],function(o){if(this.name===t||o===t||this.summaryType===t||this.column===t||function(s){let{summaryType:r}=s,{column:a}=s;return r&&a&&`${r}_${a}`}(this)===t)return n=o,!1}),n}_getSummarySortByGroups(e,t){let n=this,o=n._columnsController,s=o.getGroupColumns(),r=[];if(!(!t||!t.length))return x(e||[],function(){let{sortOrder:a}=this,{groupColumn:l}=this,d=n._findSummaryItem(t,this.summaryItem);if(d<0)return;let c=function(h){return fE(h)[d]};f(l)?(l=o.columnOption(l),n._addSortInfo(r,l,c,a)):x(s,(h,p)=>{n._addSortInfo(r,p,c,a)})}),r}_createDataSourceAdapterCore(e,t){let n=this,o=super._createDataSourceAdapterCore(e,t);return o.summaryGetter(s=>n._getSummaryOptions(s||t)),o}_getSummaryOptions(e){let t=this,n=t.option("summary.groupItems"),o=t.option("summary.totalItems"),s=t.option("sortByGroupSummaryInfo"),r=t._getAggregates(n,e&&e.grouping&&e.summary),a=t._getAggregates(o,e&&e.summary),l=function(){return t._getSummarySortByGroups(s,n)};if(r.length||a.length)return{groupAggregates:r,totalAggregates:a,sortByGroups:l}}publicMethods(){let e=super.publicMethods();return e.push("getTotalSummaryValue"),e}getTotalSummaryValue(e){let t=this._findSummaryItem(this.option("summary.totalItems"),e),n=this._dataSource.totalAggregates();if(n.length&&t>-1)return n[t]}optionChanged(e){(e.name==="summary"||e.name==="sortByGroupSummaryInfo")&&(e.name="dataSource"),super.optionChanged(e)}init(){this._footerItems=[],super.init()}footerItems(){return this._footerItems}},p7=i=>class extends i{_refreshSummary(){CE(this)&&!this.isSaving()&&this._dataController.refresh({load:!0,changesOnly:!0})}_addChange(e){let t=super._addChange.apply(this,arguments);return e.type&&this._refreshSummary(),t}_removeChange(){let e=super._removeChange.apply(this,arguments);return this._refreshSummary(),e}cancelEditData(){let e=super.cancelEditData.apply(this,arguments);return this._refreshSummary(),e}},g7=i=>class extends i{_createRow(e){let t=super._createRow.apply(this,arguments);return e&&t.addClass(e.rowType==="groupFooter"?"dx-datagrid-group-footer":""),t}_renderCells(e,t){super._renderCells.apply(this,arguments),t.row.rowType==="group"&&t.row.summaryCells&&t.row.summaryCells.length&&this._renderGroupSummaryCells(e,t)}_hasAlignByColumnSummaryItems(e,t){return!f(t.columns[e].groupIndex)&&t.row.summaryCells[e].length}_getAlignByColumnCellCount(e,t){let n=0;for(let o=1;o<e;o++){let s=t.row.summaryCells.length-o;n=this._hasAlignByColumnSummaryItems(s,t)?o:n}return n}_renderGroupSummaryCells(e,t){let n=e.children().last(),o=Number(n.attr("colSpan"))||1,s=this._getAlignByColumnCellCount(o,t);this._renderGroupSummaryCellsCore(n,t,o,s)}_renderGroupSummaryCellsCore(e,t,n,o){if(o>0){e.attr("colSpan",n-o);for(let s=0;s<o;s++){let r=t.columns.length-o+s;this._renderCell(e.parent(),m({column:t.columns[r],columnIndex:this._getSummaryCellIndex(r,t.columns)},t))}}}_getSummaryCellIndex(e,t){return e}_getCellTemplate(e){return!e.column.command&&!f(e.column.groupIndex)&&e.summaryItems&&e.summaryItems.length?s1:super._getCellTemplate(e)}_getCellOptions(e){let t=this,n=super._getCellOptions(e);return e.row.summaryCells?m(n,r1(t,e)):n}};$.registerModule("summary",{defaultOptions:()=>({summary:{groupItems:void 0,totalItems:void 0,calculateCustomSummary:void 0,skipEmptyValues:!0,recalculateWhileEditing:!1,texts:{sum:O.format("dxDataGrid-summarySum"),sumOtherColumn:O.format("dxDataGrid-summarySumOtherColumn"),min:O.format("dxDataGrid-summaryMin"),minOtherColumn:O.format("dxDataGrid-summaryMinOtherColumn"),max:O.format("dxDataGrid-summaryMax"),maxOtherColumn:O.format("dxDataGrid-summaryMaxOtherColumn"),avg:O.format("dxDataGrid-summaryAvg"),avgOtherColumn:O.format("dxDataGrid-summaryAvgOtherColumn"),count:O.format("dxDataGrid-summaryCount")}},sortByGroupSummaryInfo:void 0}),views:{footerView:_E},extenders:{controllers:{data:h7,editing:p7},views:{rowsView:g7}}});var m7="dx-master-detail-row",mr=function(i){let e=-1;return x(i,(t,n)=>{if(n.command==="transparent")return e=t,!1}),e},u1=function(i,e,t){let n=0;if(i&&e&&t)for(let o=0;o<i.length;o++)i[o].command==="transparent"?n+=i[o].colspan:(e[n]<t[o]&&(e[n]=t[o]),n++);return e},xE=i=>class extends i{init(){super.init(),this._isFixedTableRendering=!1,this._isFixedColumns=!1}_createCol(e){return super._createCol(e).toggleClass("dx-col-fixed",!!(this._isFixedTableRendering&&(e.fixed||e.command&&e.command!=="transparent")))}isIndicesArray(e){return Array.isArray(e)&&e.length>0}_correctColumnIndicesForFixedColumns(e,t){var n;let o=t?.columnIndices;if(!this.isIndicesArray(o))return;let s=mr(e),r=e[s].colspan,a=s+r,l=t==null||(n=t.items)===null||n===void 0?void 0:n.map(d=>{let{rowType:c}=d;return c});t.columnIndices=o.map((d,c)=>this.isIndicesArray(d)?l&&l[c]==="group"?[...d]:d.reduce((p,g)=>{switch(!0){case g<s:p.push(g);break;case g>=a:p.push(g-r+1)}return p},[]):d)}_partialUpdateFixedTable(e,t){let n=this._fixedTableElement,o=this._getRowElementsCore(n);n.children("colgroup").replaceWith(this._createColGroup(e));for(let r=0;r<t.length;r++)this._partialUpdateFixedRow(u(o[r]),e,t[r])}_partialUpdateFixedRow(e,t,n){let o=e.get(0).childNodes,s=mr(t),r=t[s],a=this._columnsController.getColumnIndexOffset(),l,d=a+1,{colspan:c}=r;if(e.hasClass(m7)){var h;o[0].setAttribute("colspan",(h=this._columnsController.getVisibleColumns())===null||h===void 0?void 0:h.length);return}if(e.hasClass("dx-group-row"))if(l=this._getGroupCellOptions({row:n,columns:this._columnsController.getVisibleColumns()}),n.summaryCells.length>0){let g=this._getAlignByColumnCellCount(l.colspan,{columns:this._columnsController.getVisibleColumns(),row:n,isFixed:!0});c=l.colspan-g}else c=l.colspan-Math.max(0,o.length-(l.columnIndex+2));for(let p=0;p<o.length;p++){let g=l?p===l.columnIndex+1:p===s;o[p].setAttribute("aria-colindex",d),g?(o[p].setAttribute("colspan",c),d+=c):d++}}_renderTable(e){let t,n=this.getFixedColumns();this._isFixedColumns=!!n.length;let o=super._renderTable(e);if(this._isFixedColumns){var s;let a=e?.change,l=this._getRowElements(this._fixedTableElement),d=a?.virtualColumnsScrolling&&l.length===(a==null||(s=a.items)===null||s===void 0?void 0:s.length);if(this._isFixedTableRendering=!0,d&&this.option("scrolling.legacyMode")!==!0){var r;this._partialUpdateFixedTable(n,e==null||(r=e.change)===null||r===void 0?void 0:r.items),this._isFixedTableRendering=!1}else{let c=a?.columnIndices;this._correctColumnIndicesForFixedColumns(n,a),t=this._createTable(n),this._renderRows(t,m({},e,{columns:n})),this._updateContent(t,a,!0),c&&(a.columnIndices=c),this._isFixedTableRendering=!1}}else this._fixedTableElement&&this._fixedTableElement.parent().remove(),this._fixedTableElement=null;return o}_renderRow(e,t){let n,{cells:o}=t.row;if(super._renderRow.apply(this,arguments),this._isFixedTableRendering&&o&&o.length){n=0;let s=t.row.cells||[];o=o.slice(),t.row.cells=o;for(let r=0;r<s.length;r++){if(s[r].column&&s[r].column.command==="transparent"){n=(s[r].column.colspan||1)-1;continue}o[r+n]=s[r]}}}_createCell(e){let t=this,{column:n}=e,o=n&&n.command,{rowType:s}=e,r=super._createCell.apply(t,arguments),a,l,d;(t._isFixedTableRendering||s==="filter")&&(a=t.getFixedColumns(),d=mr(a),l=a[d-1]),t._isFixedTableRendering?o==="transparent"&&(r.addClass("dx-pointer-events-none").toggleClass("dx-first-cell",d===0||l&&l.command==="expand").toggleClass("dx-last-cell",a.length&&d===a.length-1),s!=="freeSpace"&&R.setEmptyText(r)):s==="filter"&&r.toggleClass("dx-first-cell",e.columnIndex===d);let c=t.option("rowAlternationEnabled")&&e.isAltRow,h=t.option("selection.mode")==="multiple"&&e.columnIndex===0&&e.rowType==="header";return we.mozilla&&e.column.fixed&&e.rowType!=="group"&&!c&&!h&&r.addClass("dx-col-fixed"),r}_getContent(e){var t;return e?(t=this._fixedTableElement)===null||t===void 0?void 0:t.parent():super._getContent.apply(this,arguments)}_wrapTableInScrollContainer(e,t){let n=super._wrapTableInScrollContainer.apply(this,arguments);return(this._isFixedTableRendering||t)&&n.addClass(this.addWidgetPrefix("content-fixed")),n}_renderCellContent(e,t){let n,{column:o}=t,s=this._isFixedTableRendering,r=t.rowType==="group"&&f(o.groupIndex);if(s&&r&&!o.command&&!o.groupCellTemplate&&e.css("pointerEvents","none"),!s&&this._isFixedColumns){if(n=o.fixed||o.command&&o.fixed!==!1,r&&(n=!1,t.row.summaryCells&&t.row.summaryCells.length)){var a;let l=this._columnsController.getVisibleColumns(),d=((a=this._getAlignByColumnCellCount)===null||a===void 0?void 0:a.call(this,o.colspan,{columns:l,row:t.row,isFixed:!0}))??0;if(d>0){let c=mr(this._columnsController.getFixedColumns());n=l.length-d<c}}if(n){if(o.command&&o.type!=="buttons"||t.rowType==="group"){e.html("&nbsp;").addClass(o.cssClass);return}e.addClass("dx-hidden-cell")}}o.command!=="transparent"&&super._renderCellContent.apply(this,arguments)}_getCellElementsCore(e){let t=super._getCellElementsCore.apply(this,arguments),n=t?.parent().hasClass("dx-group-row"),o=this.name==="columnHeadersView"?e:void 0;if(this._fixedTableElement&&t){let s=this.getFixedColumns(o),r=this._getRowElements(this._fixedTableElement).eq(e).children("td");x(r,(a,l)=>{if(n)t[a]&&l.style.visibility!=="hidden"&&(t[a]=l);else{let d=s[a];if(d)if(d.command==="transparent")r.eq(a).hasClass("dx-master-detail-cell")&&(t[a]=l||t[a]);else{let c=this._columnsController.getVisibleIndexByColumn(d,o);t[c]=l||t[c]}}})}return t}getColumnWidths(e){let t=super.getColumnWidths(),n=this.getFixedColumns(),o=this._fixedTableElement&&t.length?super.getColumnWidths(this._fixedTableElement):void 0;return u1(n,t,o)}getTableElement(e){return e=this._isFixedTableRendering||e,e?this._fixedTableElement:super.getTableElement()}setTableElement(e,t){this._isFixedTableRendering||t?this._fixedTableElement=e.addClass("dx-pointer-events-none"):super.setTableElement(e)}getColumns(e){let t=this.getTableElement();return this._isFixedTableRendering?this.getFixedColumns(e):super.getColumns(e,t)}getRowIndex(e){let t=this._fixedTableElement;return t&&t.find(e).length?this._getRowElements(t).index(e):super.getRowIndex(e)}getTableElements(){let e=super.getTableElements.apply(this,arguments);return this._fixedTableElement&&(e=u([e.get(0),this._fixedTableElement.get(0)])),e}getFixedColumns(e){return this._columnsController.getFixedColumns(e)}getFixedColumnsOffset(){let e={left:0,right:0},t;if(this._fixedTableElement){t=this.getTransparentColumnElement();let n=t.position();e={left:n.left,right:ae(this.element(),!0)-(ae(t,!0)+n.left)}}return e}getTransparentColumnElement(){return this._fixedTableElement&&this._fixedTableElement.find(".dx-pointer-events-none").first()}getFixedTableElement(){return this._fixedTableElement}isFixedColumns(){return this._isFixedColumns}_resizeCore(){super._resizeCore(),this.synchronizeRows()}setColumnWidths(e){var t;let{widths:n}=e,o=this._columnsController.getVisibleColumns(),s=n?.length&&o.some(d=>f(d.visibleWidth)),r=(t=e.optionNames)===null||t===void 0?void 0:t.width;if(super.setColumnWidths(e),this._fixedTableElement){let h=n?.some(p=>p==="auto"||!f(p))&&(!s||!this.isScrollbarVisible(!0))?o:this.getFixedColumns();this.setFixedTableColumnWidths(h,n)}let a=this.option("wordWrapEnabled");(s||r&&a)&&this.synchronizeRows()}setFixedTableColumnWidths(e,t){if(!this._fixedTableElement||!t)return;let n=this._fixedTableElement.children("colgroup").children("col");n.toArray().forEach(s=>s.removeAttribute("style"));let o=0;e.forEach(s=>{if(s.colspan){o+=s.colspan;return}let r=ey(t[o]);f(r)&&hc(n.eq(o),r),o+=1})}_getClientHeight(e){let t=e.getBoundingClientRect&&Pe(e);return t&&t.height?t.height:e.clientHeight}synchronizeRows(){let e=[],t=[],n,o,s,r;this.waitAsyncTemplates(!0).done(()=>{if(this._isFixedColumns&&this._tableElement&&this._fixedTableElement){let a=this._getClientHeight(this._tableElement.get(0)),l=this._getClientHeight(this._fixedTableElement.get(0));if(o=this._getRowElements(this._tableElement),s=this._getRowElements(this._fixedTableElement),r=this._findContentElement(),a!==l){for(r&&r.css("height",a),o.css("height",""),s.css("height",""),n=0;n<o.length;n++)e.push(this._getClientHeight(o.get(n))),t.push(this._getClientHeight(s.get(n)));for(n=0;n<o.length;n++){let d=e[n],c=t[n];d>c?s.eq(n).css("height",d):d<c&&o.eq(n).css("height",c)}r&&r.css("height","")}}})}setScrollerSpacing(e,t){let n=this.option("rtlEnabled");super.setScrollerSpacing(e),this.element().children(`.${this.addWidgetPrefix("content-fixed")}`).css({paddingLeft:n?e:"",paddingRight:n?"":e})}},f7=i=>class extends xE(i){_getRowVisibleColumns(e){return this._isFixedTableRendering?this.getFixedColumns(e):super._getRowVisibleColumns(e)}getContextMenuItems(e){let{column:t}=e,n=this.option("columnFixing"),o=super.getContextMenuItems(e);if(e.row&&e.row.rowType==="header"&&n.enabled===!0&&t&&t.allowFixing){let s=r=>{switch(r.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"})}};o=o||[],o.push({text:n.texts.fix,beginGroup:!0,items:[{text:n.texts.leftPosition,value:"left",disabled:t.fixed&&(!t.fixedPosition||t.fixedPosition==="left"),onItemClick:s},{text:n.texts.rightPosition,value:"right",disabled:t.fixed&&t.fixedPosition==="right",onItemClick:s}]},{text:n.texts.unfix,value:"none",disabled:!t.fixed,onItemClick:s})}return o}getFixedColumnElements(e){let t=this;if(f(e))return this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(e).children();let n=t.getColumnElements(),o=t.getTransparentColumnElement();if(n&&o&&o.length){let s=mr(t.getFixedColumns());n.splice(s,o.get(0).colSpan,o.get(0))}return n}getColumnWidths(){let e=this,t,n=super.getColumnWidths(),o=e.getFixedColumnElements(),s=e.getFixedColumns();return e._fixedTableElement&&(o&&o.length?t=e._getWidths(o):t=super.getColumnWidths(e._fixedTableElement)),u1(s,n,t)}},_7=i=>class extends xE(i){dispose(){super.dispose.apply(this,arguments),clearTimeout(this._fixedScrollTimeout)}optionChanged(e){super.optionChanged(e),e.name==="hoverStateEnabled"&&this._isFixedColumns&&(e.value?this._attachHoverEvents():this._detachHoverEvents())}_detachHoverEvents(){let e=this.element();this._fixedTableElement&&this._tableElement&&_.off(e,"mouseover mouseout",".dx-data-row")}_attachHoverEvents(){this._fixedTableElement&&this._tableElement&&_.on(this.element(),"mouseover mouseout",".dx-data-row",this.createAction(e=>{let{event:t}=e,n=this.getRowIndex(u(t.target).closest(".dx-row")),o=t.type==="mouseover";n>=0&&(this._tableElement&&this._getRowElements(this._tableElement).eq(n).toggleClass("dx-state-hover",o),this._fixedTableElement&&this._getRowElements(this._fixedTableElement).eq(n).toggleClass("dx-state-hover",o))}))}_getScrollDelay(){var e;return((e=this._resizingController)===null||e===void 0?void 0:e.hasResizeTimeout())?this.option("scrolling.updateTimeout"):we.mozilla?60:0}_findContentElement(e){let t,n,o=this.addWidgetPrefix("content"),s=this.element();if(e=this._isFixedTableRendering||e,s&&e){t=s.children(`.${o}`);let r=this.getScrollable();return!t.length&&r&&(t=u("<div>").addClass(o),_.on(t,"scroll",a=>{let{target:l}=a,d=this._getScrollDelay();clearTimeout(this._fixedScrollTimeout),this._fixedScrollTimeout=setTimeout(()=>{n=u(l).scrollTop(),r.scrollTo({y:n})},d)}),_.on(t,Vr,a=>{let l=u(a.target).closest(".dx-scrollable"),d=!1;if(r&&r.$element().is(l))d=!0;else{let c=l.length&&Xi.getInstance(l.get(0)),h=c&&c.scrollHeight()-c.clientHeight()>0;d=c&&!h}if(d){n=r.scrollTop(),r.scrollTo({y:n-a.delta});let c=r.scrollTop()+r.clientHeight(),h=r.scrollHeight()+this.getScrollbarWidth();if(r.scrollTop()>0&&c<h)return!1}}),t.appendTo(s)),t}return super._findContentElement()}_updateScrollable(){super._updateScrollable();let e=this.getScrollable();if(e!=null&&e._disposed)return;let t=e&&e.scrollOffset().top;this._updateFixedTablePosition(t)}_renderContent(e,t,n){return this._isFixedTableRendering||n?e.empty().addClass(`${this.addWidgetPrefix("content")} ${this.addWidgetPrefix("content-fixed")}`).append(t):super._renderContent(e,t)}_getGroupCellOptions(e){return this._isFixedTableRendering?super._getGroupCellOptions(m({},e,{columns:this._columnsController.getVisibleColumns()})):super._getGroupCellOptions(e)}_renderGroupedCells(e,t){return super._renderGroupedCells(e,m({},t,{columns:this._columnsController.getVisibleColumns()}))}_renderGroupSummaryCells(e,t){this._isFixedTableRendering?super._renderGroupSummaryCells(e,m({},t,{columns:this._columnsController.getVisibleColumns()})):super._renderGroupSummaryCells(e,t)}_hasAlignByColumnSummaryItems(e,t){let n=super._hasAlignByColumnSummaryItems.apply(this,arguments),o=t.columns[e];return t.isFixed?o.fixed&&(n||o.fixedPosition==="right"):n&&(!this._isFixedColumns||!o.fixed)}_renderGroupSummaryCellsCore(e,t,n,o){let s;if(this._isFixedTableRendering){t.isFixed=!0,s=this._getAlignByColumnCellCount(n,t),t.isFixed=!1;let r=t.columns.length-s;t=m({},t,{columns:this.getFixedColumns()});let a=mr(t.columns);r<a?(s-=t.columns[a].colspan-1||0,n-=t.columns[a].colspan-1||0):o>0&&e.css("visibility","hidden"),o=s}super._renderGroupSummaryCellsCore(e,t,n,o)}_getSummaryCellIndex(e,t){if(this._isFixedTableRendering){let n=mr(t);return e>n&&(e+=t[n].colspan-1),e}return super._getSummaryCellIndex.apply(this,arguments)}_renderCore(e){this._detachHoverEvents();let t=super._renderCore(e),n=this._isFixedColumns;return this.element().toggleClass("dx-fixed-columns",n),this.option("hoverStateEnabled")&&n&&this._attachHoverEvents(),t}setAriaOwns(e,t,n){if(n){var o;let s=this.addWidgetPrefix("content-fixed"),r=(o=this.element())===null||o===void 0?void 0:o.children(`.${s}`),a=this.getFixedTableElement();r.length&&a!==null&&a!==void 0&&a.length&&this.setAria("owns",`${e??""} ${a.attr("id")??""} ${t??""}`.trim(),r)}else super.setAriaOwns.apply(this,arguments)}setRowsOpacity(e,t){super.setRowsOpacity(e,t);let n=this._getRowElements(this._fixedTableElement);this._setRowsOpacityCore(n,this.getFixedColumns(),e,t)}getCellIndex(e){let t=this._fixedTableElement,n=0;if(t&&e.is("td")&&e.closest(t).length){let o=this.getFixedColumns();return x(o,(s,r)=>{if(s===e[0].cellIndex)return!1;if(r.colspan){n+=r.colspan;return}n++}),n}return super.getCellIndex.apply(this,arguments)}_updateFixedTablePosition(e,t){if(this._fixedTableElement&&this._tableElement){let n;this._fixedTableElement.parent().scrollTop(e),t&&this._editorFactoryController&&(n=this._editorFactoryController.focus(),n&&this._editorFactoryController.focus(n))}}setScrollerSpacing(e,t){let n=this,o={marginBottom:0},s=n.element().children(`.${this.addWidgetPrefix("content-fixed")}`);s.length&&n._fixedTableElement&&(s.css(o),n._fixedTableElement.css(o),o[n.option("rtlEnabled")?"marginLeft":"marginRight"]=e,o.marginBottom=t,(n._scrollable&&n._scrollable.option("useNative")?s:n._fixedTableElement).css(o))}_getElasticScrollTop(e){let t=0;if(e.scrollOffset.top<0)t=-e.scrollOffset.top;else if(e.reachedBottom){let n=u(e.component.content()),o=u(e.component.container()),s=Math.max(n.get(0).clientHeight-o.get(0).clientHeight,0);t=Math.min(s-e.scrollOffset.top,0)}return Math.floor(t)}_applyElasticScrolling(e){if(this._fixedTableElement){let t=this._getElasticScrollTop(e);Math.ceil(t)!==0?Ve(this._fixedTableElement,{top:t}):this._fixedTableElement.css("transform","")}}_handleScroll(e){this._updateFixedTablePosition(e.scrollOffset.top,!0),this._applyElasticScrolling(e),super._handleScroll(e)}_updateContentPosition(e){super._updateContentPosition.apply(this,arguments),e||this._updateFixedTablePosition(this._scrollTop)}_afterRowPrepared(e){this._isFixedTableRendering||super._afterRowPrepared(e)}_scrollToElement(e){super._scrollToElement(e,this.getFixedColumnsOffset())}},C7=i=>class extends xE(i){},x7=function(i,e,t){let n=mr(e),o=i.length-e.length;return x(t,(s,r)=>{r.index>n&&(r.columnIndex+=o,r.index+=o)}),t},v7=i=>class extends i{_generatePointsByColumns(e){let t=e.columns,{targetDraggingPanel:n}=e;if(n&&n.getName()==="headers"&&n.isFixedColumns()&&e.sourceColumn.fixed){e.rowIndex||(e.columnElements=n.getFixedColumnElements(0)),e.columns=n.getFixedColumns(e.rowIndex);let o=super._generatePointsByColumns(e);return x7(t,e.columns,o),o}return super._generatePointsByColumns(e)}_pointCreated(e,t,n,o){let s=super._pointCreated.apply(this,arguments),r=t[e.columnIndex],a=this._columnHeadersView.getTransparentColumnElement();if(!s&&n==="headers"&&a&&a.length){let l=Pe(a.get(0));return o&&o.fixed?o.fixedPosition==="right"?e.x<l.right:e.x>l.left:r&&r.fixed&&r.fixedPosition!=="right"?!0:e.x<l.left||e.x>l.right}return s}},b7=i=>class extends i{_generatePointsByColumns(){let e=this,t=e._columnsController,n=t&&e._columnsController.getVisibleColumns(),o=t&&e._columnsController.getFixedColumns(),s=mr(o),r=n.length-o.length,a=e._columnHeadersView.getFixedColumnElements();super._generatePointsByColumns(),a&&a.length>0&&(e._pointsByFixedColumns=R.getPointsByColumns(a,l=>(l.index>s&&(l.columnIndex+=r,l.index+=r),e._pointCreated(l,n.length,n))))}_getTargetPoint(e,t,n){let o=this._columnHeadersView.getTransparentColumnElement();if(o&&o.length){let s=Pe(o.get(0));if(t<=s.left||t>=s.right)return super._getTargetPoint(this._pointsByFixedColumns,t,n)}return super._getTargetPoint(e,t,n)}},y7=i=>class extends i{_setAriaOwns(){var e,t,n;super._setAriaOwns.apply(this,arguments);let o=(e=this._columnHeadersView)===null||e===void 0?void 0:e.getFixedTableElement(),s=(t=this._footerView)===null||t===void 0?void 0:t.getFixedTableElement();(n=this._rowsView)===null||n===void 0||n.setAriaOwns(o?.attr("id"),s?.attr("id"),!0)}},O7=i=>class extends i{_toggleInertAttr(e){var t;let n=(t=this._rowsView)===null||t===void 0?void 0:t.getFixedContentElement();e?n?.attr("inert",!0):n?.removeAttr("inert")}},h1={defaultOptions:()=>({columnFixing:{enabled:!1,texts:{fix:O.format("dxDataGrid-columnFixingFix"),unfix:O.format("dxDataGrid-columnFixingUnfix"),leftPosition:O.format("dxDataGrid-columnFixingLeftPosition"),rightPosition:O.format("dxDataGrid-columnFixingRightPosition")}}}),extenders:{views:{columnHeadersView:f7,rowsView:_7,footerView:C7},controllers:{draggingHeader:v7,columnsResizer:b7,resizing:y7,keyboardNavigation:O7}}};$.registerModule("columnFixing",h1);var p1="rowsView",E7="footerView",vE=["columnHeadersView",p1,E7],w7="dxDataGridAdaptivity";var g1="dxDataGrid-ariaAdaptiveExpand",S7="dxDataGrid-ariaAdaptiveCollapse",I7="scrolling.legacyMode";function Uf(i,e){return i._columnsController.getColumnId(e)}function D7(i){return i.find("td:not(.dx-datagrid-hidden-column):not([class*='dx-command-'])")}function T7(i,e){let t,n=u(i),o=e.component.getController("adaptiveColumns");e.rowType==="data"?(t=u("<span>").addClass(o.addWidgetPrefix("adaptive-more")),_.on(t,D(de,w7),o.createAction(()=>{o.toggleExpandAdaptiveDetailRow(e.key)})),t.appendTo(n)):R.setEmptyText(n)}function bE(i){var e;let t=(e=i.data)===null||e===void 0?void 0:e.$nextCell;_.off(t,"focus",bE),_.trigger(t,"dxclick")}var yE=class extends ye.ViewController{init(){this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._editingController=this.getController("editing"),this._keyboardNavigationController=this.getController("keyboardNavigation"),this._rowsView=this.getView("rowsView"),this._columnsController.addCommandColumn({type:"adaptive",command:"adaptive",visible:!0,adaptiveHidden:!0,cssClass:"dx-command-adaptive",alignment:"center",width:"auto",cellTemplate:T7,fixedPosition:"right"}),this._columnsController.columnsChanged.add(()=>{let e=!!this.updateHidingQueue(this._columnsController.getColumns()).length;this._columnsController.columnOption("command:adaptive","adaptiveHidden",!e,!0)}),this._hidingColumnsQueue=[],this._hiddenColumns=[],this.createAction("onAdaptiveDetailRowPreparing"),super.init()}optionChanged(e){e.name==="columnHidingEnabled"&&this._columnsController.columnOption("command:adaptive","adaptiveHidden",!e.value),super.optionChanged(e)}publicMethods(){return["isAdaptiveDetailRowExpanded","expandAdaptiveDetailRow","collapseAdaptiveDetailRow"]}_isRowEditMode(){return this._getEditMode()==="row"}_isItemModified(e,t){let n=this._columnsController.getVisibleIndex(e.column.index),o=this._dataController.getRowIndexByKey(t.key),s=this._dataController.items()[o+1];return s&&s.modifiedValues&&f(s.modifiedValues[n])}_renderFormViewTemplate(e,t,n){let o=this,{column:s}=e,r=o.createAction(()=>{o._editingController.isEditing()&&_.trigger(n,de)}),a=t.row.data,l=s.calculateCellValue(a),d=R.getDisplayValue(s,l,a,t.rowType),c=R.formatValue(d,s),h=this._editingController.isCellOrBatchEditMode(),p=o._rowsView;if(s.allowEditing&&this._keyboardNavigationController.isKeyboardEnabled()&&(n.attr("tabIndex",o.option("tabIndex")),h&&(_.off(n,"focus",r),_.on(n,"focus",r))),s.cellTemplate){let g=m({},t,{value:l,displayValue:d,text:c,column:s});p.renderTemplate(n,s.cellTemplate,g,ls(n)).done(()=>{p._cellPrepared(n,t)})}else{let g=n.get(0);s.encodeHtml?g.textContent=c:g.innerHTML=c,n.addClass("dx-adaptive-item-text"),(!f(c)||c==="")&&n.html("&nbsp;"),o._isRowEditMode()||o._isItemModified(e,t)&&n.addClass("dx-item-modified"),p._cellPrepared(n,t)}}_getTemplate(e,t,n){let o=this,{column:s}=e,r=this._editingController;return function(a,l){let d=u(l),c=o._columnsController.getVisibleIndex(s.index),h=m({},t),p=function(){let g=o._isItemEdited(e);h.value=t.row.values[c],g||s.showEditorAlways?r.renderFormEditorTemplate(h,e,a,d,!g):(h.column=s,h.columnIndex=c,o._renderFormViewTemplate(e,h,d))};if(p(),h.watch){let g=h.watch(()=>({isItemEdited:o._isItemEdited(e),value:t.row.values[c]}),()=>{d.contents().remove(),d.removeClass("dx-adaptive-item-text"),p()});_.on(d,ai,g)}}}_isVisibleColumnsValid(e){return!(e<2||e.length-function(){let t=0;for(let n=0;n<e.length;n++)e[n].command&&t++;return t}()<=1)}_calculatePercentWidths(e,t){let n=this,o=0;return t.forEach((s,r)=>{e[r]!=="adaptiveHidden"&&(o+=n._getItemPercentWidth(s))}),o}_isPercentWidth(e){return B(e)&&e.endsWith("%")}_isColumnHidden(e){return this._hiddenColumns.filter(t=>t.index===e.index).length>0}_getAverageColumnsWidth(e,t,n){let o=this,s=0,r=0;return t.forEach(a=>{if(!o._isColumnHidden(a)){let{width:l}=a;f(l)&&!isNaN(parseFloat(l))?s+=o._isPercentWidth(l)?o._calculatePercentWidth({visibleIndex:a.visibleIndex,columnsCount:t.length,columnsCanFit:n,bestFitWidth:a.bestFitWidth,columnWidth:l,containerWidth:e}):parseFloat(l):r++}}),(e-s)/r}_calculateColumnWidth(e,t,n,o){let s=Uf(this,e),r=this._columnsController.columnOption(s,"width"),a=this._columnsController.columnOption(s,"bestFitWidth"),l=n.length,d;if(r&&r!=="auto")if(this._isPercentWidth(r))d=this._calculatePercentWidth({visibleIndex:e.visibleIndex,columnsCount:l,columnsCanFit:o,bestFitWidth:a,columnWidth:r,containerWidth:t});else return parseFloat(r);else d=this.option("columnAutoWidth")||e.command?a:this._getAverageColumnsWidth(t,n,o);return d}_calculatePercentWidth(e){let t=e.visibleIndex<e.columnsCount-1&&e.columnsCanFit,n=e.containerWidth*parseFloat(e.columnWidth)/100,o=e.columnsCanFit&&n<e.bestFitWidth?e.bestFitWidth:n;return t?e.containerWidth*parseFloat(e.columnWidth)/100:o}_getNotTruncatedColumnWidth(e,t,n,o){let s=Uf(this,e),r=this._columnsController.columnOption(s,"width"),a=this._columnsController.columnOption(s,"bestFitWidth");if(r&&r!=="auto"&&!this._isPercentWidth(r))return parseFloat(r);let l=this._calculateColumnWidth(e,t,n,o);return l<a?null:l}_getItemPercentWidth(e){let t=0;return e.width&&this._isPercentWidth(e.width)&&(t=parseFloat(e.width)),t}_getCommandColumnsWidth(){let e=this,t=e._columnsController.getVisibleColumns(),n=0;return x(t,(o,s)=>{(s.index<0||s.command)&&(n+=e._columnsController.columnOption(Uf(e,s),"bestFitWidth")||0)}),n}_isItemEdited(e){if(this.isFormOrPopupEditMode())return!1;if(this._isRowEditMode()){let t=this.option("editing.editRowKey");if(Ee(t,this._dataController.adaptiveExpandedKey()))return!0}else{let t=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,n=this._columnsController.getVisibleIndex(e.column.index);return this._editingController.isEditCell(t,n)}}_getFormItemsByHiddenColumns(e){let t=[];return x(e,(n,o)=>{t.push({column:o,name:o.name,dataField:o.dataField,visibleIndex:o.visibleIndex})}),t}_getAdaptiveColumnVisibleIndex(e){for(let t=0;t<e.length;t++)if(e[t].command==="adaptive")return t}_hideAdaptiveColumn(e,t){let n=this._getAdaptiveColumnVisibleIndex(t);f(n)&&(e[n]="adaptiveHidden",this._hideVisibleColumn({isCommandColumn:!0,visibleIndex:n}))}_showHiddenCellsInView(e){let{$cells:t,isCommandColumn:n}=e,o=this.addWidgetPrefix("hidden-column");n?(o="dx-command-adaptive-hidden",t.attr({tabIndex:0,"aria-hidden":null}).removeClass(o)):t.removeClass(o)}_showHiddenColumns(){for(let e=0;e<vE.length;e++){let t=this.getView(vE[e]);if(t&&t.isVisible()&&t.element()){let n=t.name,o=t.element().find(".dx-command-adaptive-hidden");this._showHiddenCellsInView({viewName:n,$cells:o,isCommandColumn:!0});let s=t.element().find(`.${this.addWidgetPrefix("hidden-column")}`);this._showHiddenCellsInView({viewName:n,$cells:s})}}}_isCellValid(e){return e&&e.length&&!e.hasClass("dx-master-detail-cell")&&!e.hasClass("dx-group-cell")}_hideVisibleColumn(e){let{isCommandColumn:t,visibleIndex:n}=e,o=this;vE.forEach(s=>{let r=o.getView(s);r&&o._hideVisibleColumnInView({view:r,isCommandColumn:t,visibleIndex:n})})}_hideVisibleColumnInView(e){let{view:t,isCommandColumn:n,visibleIndex:o}=e,s=t.name,r,a=this._columnsController.getVisibleColumns()[o],l=this._editingController&&this._editingController.getEditFormRowIndex();if(t&&t.isVisible()&&a){let d=t.getRowsCount(),c=t._getRowElements();for(let h=0;h<d;h++)if(!(h===l&&s===p1&&this.option("editing.mode")!=="popup")){let g=s==="columnHeadersView"?this._columnsController.getVisibleIndex(a.index,h):o;if(g>=0){let C=c.eq(h);r=this._findCellElementInRow(C,g),this._isCellValid(r)&&this._hideVisibleCellInView({viewName:s,isCommandColumn:n,$cell:r})}}}}_findCellElementInRow(e,t){let n=e.children(),o=t,s=!1;if(e.hasClass("dx-group-row")){let a=e.find(".dx-group-cell"),l=a.attr("colspan");if(a.length&&f(l)){let d=parseInt(l),c=a.index()+d-1;t>c?o=t-d+1:s=!0}}return s?void 0:n.eq(o)}_hideVisibleCellInView(e){let{$cell:t,isCommandColumn:n}=e,o=n?"dx-command-adaptive-hidden":this.addWidgetPrefix("hidden-column");t.attr({tabIndex:-1,"aria-hidden":!0}).addClass(o)}_getEditMode(){return this._editingController.getEditMode()}isFormOrPopupEditMode(){let e=this._getEditMode();return e==="form"||e==="popup"}hideRedundantColumns(e,t,n){let o=this;if(this._hiddenColumns=[],o._isVisibleColumnsValid(t)&&n.length){let s=0,r=o.component.$element(),a=W(r)-o._getCommandColumnsWidth(),l=function(){return t.filter(C=>!C.command&&this._hiddenColumns.filter(v=>v.index===C.index).length===0)}.bind(this),d=l(),c=d.length,h,p,g;do{g=!1,s=0;let C=o._calculatePercentWidths(e,t),v=C<100&&C!==0;for(h=0;h<t.length;h++){let b=t[h],T=o._getNotTruncatedColumnWidth(b,a,d,v),M=Uf(o,b),G=o._columnsController.columnOption(M,"width"),te=o._columnsController.columnOption(M,"minWidth"),oe=o._columnsController.columnOption(M,"bestFitWidth");if(e[h]==="adaptiveHidden"){p=!0;continue}if(!T&&!b.command&&!b.fixed){g=!0;break}(!G||G==="auto")&&(T=Math.max(oe||0,te||0)),(b.command!=="adaptive"||p)&&(s+=T)}if(g=g||s>W(r),g){let b=n.pop(),T=o._columnsController.getVisibleIndex(b.index);a+=o._calculateColumnWidth(b,a,d,v),o._hideVisibleColumn({visibleIndex:T}),e[T]="adaptiveHidden",this._hiddenColumns.push(b),d=l()}}while(g&&d.length>1&&n.length);c===d.length&&o._hideAdaptiveColumn(e,t)}else o._hideAdaptiveColumn(e,t)}getAdaptiveDetailItems(){return this._$itemContents}getItemContentByColumnIndex(e){let t;for(let n=0;n<this._$itemContents.length;n++){t=this._$itemContents.eq(n);let o=t.data("dx-form-item");if(o&&o.column&&this._columnsController.getVisibleIndex(o.column.index)===e)return t}}toggleExpandAdaptiveDetailRow(e,t){this.isFormOrPopupEditMode()&&this._editingController.isEditing()||this._dataController.toggleExpandAdaptiveDetailRow(e,t)}createFormByHiddenColumns(e,t){let n=this,o=u(e),s={items:n._getFormItemsByHiddenColumns(n._hiddenColumns),formID:`dx-${new Ae}`},r=ht()?{colCount:2}:{};this.executeAction("onAdaptiveDetailRowPreparing",{formOptions:s}),n._$itemContents=null,n._form=n._createComponent(u("<div>").appendTo(o),lf,m(r,s,{customizeItem(a){let l=a.column||n._columnsController.columnOption(a.name||a.dataField);l&&(a.label=a.label||{},a.label.text=a.label.text||l.caption,a.column=l,a.template=n._getTemplate(a,t,n.updateForm.bind(n))),s.customizeItem&&s.customizeItem.call(this,a)},onContentReady(a){s.onContentReady&&s.onContentReady.call(this,a),n._$itemContents=o.find(".dx-field-item-content")}}))}hasAdaptiveDetailRowExpanded(){return f(this._dataController.adaptiveExpandedKey())}updateForm(e){this.hasAdaptiveDetailRowExpanded()&&this._form&&f(this._form._contentReadyAction)&&(e&&e.length?this._form.option("items",this._getFormItemsByHiddenColumns(e)):this._form.repaint())}updateHidingQueue(e){let t=this,n=e.filter(r=>r.visible&&!r.type&&!r.fixed&&!(f(r.groupIndex)&&r.groupIndex>=0)),o,s;if(t._hidingColumnsQueue=[],t.option("allowColumnResizing")&&t.option("columnResizingMode")==="widget")return t._hidingColumnsQueue;for(s=0;s<n.length;s++)f(n[s].hidingPriority)&&n[s].hidingPriority>=0&&(o=!0,t._hidingColumnsQueue[n[s].hidingPriority]=n[s]);if(o)t._hidingColumnsQueue.reverse();else if(t.option("columnHidingEnabled"))for(s=0;s<n.length;s++){let r=t._columnsController.getVisibleIndex(n[s].index);t._hidingColumnsQueue[r]=n[s]}return t._hidingColumnsQueue=t._hidingColumnsQueue.filter(Object),t._hidingColumnsQueue}getHiddenColumns(){return this._hiddenColumns}hasHiddenColumns(){return this._hiddenColumns.length>0}getHidingColumnsQueue(){return this._hidingColumnsQueue}isAdaptiveDetailRowExpanded(e){let t=this._dataController;return t.adaptiveExpandedKey()&&Ee(t.adaptiveExpandedKey(),e)}expandAdaptiveDetailRow(e){this.hasAdaptiveDetailRowExpanded()||this.toggleExpandAdaptiveDetailRow(e)}collapseAdaptiveDetailRow(){this.hasAdaptiveDetailRowExpanded()&&this.toggleExpandAdaptiveDetailRow()}updateCommandAdaptiveAriaLabel(e,t){let n=this._dataController.getRowIndexByKey(e);if(n===-1)return;let o=u(this.component.getRowElement(n));this.setCommandAdaptiveAriaLabel(o,t)}setCommandAdaptiveAriaLabel(e,t){e.find(".dx-command-adaptive").attr("aria-label",O.format(t))}},A7=i=>class extends i{_isCellValid(e,t){return super._isCellValid(e,t)&&!e.hasClass(this.addWidgetPrefix("hidden-column"))&&!e.hasClass("dx-command-adaptive-hidden")}_processNextCellInMasterDetail(e,t){super._processNextCellInMasterDetail(e,t);let n=this._editingController.isCellOrBatchEditMode();this._editingController.isEditing()&&e&&n&&!this._isInsideEditForm(e)&&(_.off(e,"focus",bE),_.on(e,"focus",{$nextCell:e},bE),_.trigger(t,"focus"))}_isCellElement(e){return super._isCellElement(e)||e.hasClass("dx-adaptive-item-text")}},M7=i=>class extends i{_getCellTemplate(e){let t=this,{column:n}=e;return e.rowType==="detailAdaptive"&&n.command==="detail"?function(o,s){t._adaptiveColumnsController.createFormByHiddenColumns(u(o),s)}:super._getCellTemplate(e)}_createRow(e){let t=super._createRow.apply(this,arguments);return e&&e.rowType==="detailAdaptive"&&e.key===this._dataController.adaptiveExpandedKey()&&t.addClass("dx-adaptive-detail-row"),t}_renderCells(e,t){super._renderCells(e,t);let n=this._adaptiveColumnsController,o=n.getHidingColumnsQueue().length,s=n.getHiddenColumns().length;o&&!s&&D7(e).last().addClass("dx-last-data-cell"),t.row.rowType==="data"&&n.setCommandAdaptiveAriaLabel(e,g1)}_getColumnIndexByElementCore(e){let t=e.closest(".dx-field-item-content");if(t.length&&t.closest(this.component.$element()).length){let n=t.length?t.first().data("dx-form-item"):null;return n&&n.column&&this._columnsController.getVisibleIndex(n.column.index)}return super._getColumnIndexByElementCore(e)}_cellPrepared(e,t){super._cellPrepared.apply(this,arguments),t.row.rowType!=="detailAdaptive"&&t.column.visibleWidth==="adaptiveHidden"&&e.addClass(this.addWidgetPrefix("hidden-column"))}getCell(e,t){let n=this._dataController.items()[e?.rowIndex];if(n?.rowType==="detailAdaptive"){let o=this._adaptiveColumnsController.getAdaptiveDetailItems();return super.getCell(e,t,o)}return super.getCell.apply(this,arguments)}_getCellElement(e,t){let n=this._dataController.items()[e];return n&&n.rowType==="detailAdaptive"?this._adaptiveColumnsController.getItemContentByColumnIndex(t):super._getCellElement.apply(this,arguments)}getContextMenuItems(e){var t;if(e.row&&e.row.rowType==="detailAdaptive"){let n=this._columnHeadersView,o=u(e.targetElement).closest(".dx-field-item-label").next().data("dx-form-item");return e.column=o?o.column:e.column,n.getContextMenuItems&&n.getContextMenuItems(e)}return(t=super.getContextMenuItems)===null||t===void 0?void 0:t.call(this,e)}isClickableElement(e){var t;return(((t=super.isClickableElement)===null||t===void 0?void 0:t.call(this,e))??!1)||!!e.closest(".dx-command-adaptive").length}},R7=i=>class extends i{_updateColumnWidth(e,t){super._updateColumnWidth(e,e.visibleWidth==="adaptiveHidden"?e.bestFitWidth:t)}},F7=i=>class extends i{_pointCreated(e,t,n){let o=super._pointCreated(e,t,n),s=n[e.columnIndex]||{},r=this._getNextColumnIndex(e.columnIndex),a=n[r]||{},l=r!==e.columnIndex+1&&a.command,d=s.visibleWidth==="adaptiveHidden"||l;return o||d}_getNextColumnIndex(e){let t=this._columnsController.getVisibleColumns(),n=super._getNextColumnIndex(e);for(;t[n]&&t[n].visibleWidth==="adaptiveHidden";)n++;return n}},P7=i=>class extends i{_pointCreated(e,t,n,o){let s=super._pointCreated(e,t,n,o),a=(t[e.columnIndex-1]||{}).visibleWidth==="adaptiveHidden";return s||a}},k7=i=>class extends i{_isRowEditMode(){return this.getEditMode()==="row"}_getFormEditItemTemplate(e,t){return this.getEditMode()!=="row"&&e.rowType==="detailAdaptive"?(e.columnIndex=this._columnsController.getVisibleIndex(t.index),this.getColumnTemplate(e)):super._getFormEditItemTemplate(e,t)}_closeEditItem(e){let t=e.closest(".dx-field-item-content"),n=this._dataController.getRowIndexByKey(this._dataController.adaptiveExpandedKey())+1,o=t.length?t.first().data("dx-form-item"):null,s=o&&o.column&&this._columnsController.getVisibleIndex(o.column.index);this.isEditCell(n,s)||super._closeEditItem(e)}_beforeUpdateItems(e,t){if(!this._adaptiveColumnsController.isFormOrPopupEditMode()&&this._adaptiveColumnsController.hasHiddenColumns()){let n=this._dataController.items(),o=n[t],s=R.getIndexByKey(this._dataController.adaptiveExpandedKey(),n);this._isForceRowAdaptiveExpand=!this._adaptiveColumnsController.hasAdaptiveDetailRowExpanded(),s>=0&&e.push(s+1),e.push(t+1),this._dataController.adaptiveExpandedKey(o.key)}}_afterInsertRow(e){super._afterInsertRow.apply(this,arguments),this._adaptiveColumnsController.hasHiddenColumns()&&(this._adaptiveColumnsController.toggleExpandAdaptiveDetailRow(e,this.isRowEditMode()),this._isForceRowAdaptiveExpand=!0)}_collapseAdaptiveDetailRow(){this._isRowEditMode()&&this._isForceRowAdaptiveExpand&&(this._adaptiveColumnsController.collapseAdaptiveDetailRow(),this._isForceRowAdaptiveExpand=!1)}_cancelEditAdaptiveDetailRow(){this._adaptiveColumnsController.hasHiddenColumns()&&this._collapseAdaptiveDetailRow()}_afterSaveEditData(){super._afterSaveEditData.apply(this,arguments);let e=new y;return this._isRowEditMode()&&this._adaptiveColumnsController.hasHiddenColumns()?P(this._validatingController.validate(!0)).done(t=>{t&&this._cancelEditAdaptiveDetailRow(),e.resolve()}):e.resolve(),e.promise()}_beforeCancelEditData(){super._beforeCancelEditData(),this._cancelEditAdaptiveDetailRow()}_getRowIndicesForCascadeUpdating(e){let t=super._getRowIndicesForCascadeUpdating.apply(this,arguments);return this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(e.key)&&t.push(e.rowType==="detailAdaptive"?e.rowIndex-1:e.rowIndex+1),t}_beforeCloseEditCellInBatchMode(e){let t=this._dataController._adaptiveExpandedKey;if(t){let n=R.getIndexByKey(t,this._dataController.items());n>-1&&e.unshift(n)}}editRow(e){return this._adaptiveColumnsController.isFormOrPopupEditMode()&&this._adaptiveColumnsController.collapseAdaptiveDetailRow(),super.editRow(e)}deleteRow(e){let t=this._dataController.getKeyByRowIndex(e);this.getEditMode()==="batch"&&this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(t)&&this._adaptiveColumnsController.collapseAdaptiveDetailRow(),super.deleteRow(e)}},B7=i=>class extends i{init(){super.init(),this._adaptiveExpandedKey=void 0}_processItems(e,t){let{changeType:n}=t;if(e=super._processItems.apply(this,arguments),n==="loadingAll"||!f(this._adaptiveExpandedKey))return e;let o=R.getIndexByKey(this._adaptiveExpandedKey,e),s=this.option(I7)===!1;if(o>=0){let r=e[o];e.splice(o+1,0,{visible:!0,rowType:"detailAdaptive",key:r.key,data:r.data,node:r.node,modifiedValues:r.modifiedValues,isNewRow:r.isNewRow,values:r.values})}else n==="refresh"&&!(s&&t.repaintChangesOnly)&&(this._adaptiveExpandedKey=void 0);return e}_getRowIndicesForExpand(e){let t=super._getRowIndicesForExpand.apply(this,arguments);if(this._adaptiveColumnsController.isAdaptiveDetailRowExpanded(e)){let n=t[t.length-1];t.push(n+1)}return t}adaptiveExpandedKey(e){if(f(e))this._adaptiveExpandedKey=e;else return this._adaptiveExpandedKey}toggleExpandAdaptiveDetailRow(e,t){let n=R.getIndexByKey(this._adaptiveExpandedKey,this._items),o=R.getIndexByKey(e,this._items);n>=0&&n===o&&!t&&(e=void 0,o=-1);let s=this._adaptiveExpandedKey;this._adaptiveExpandedKey=e,n>=0&&n++,o>=0&&o++;let r=this.getRowIndexDelta();this.updateItems({allowInvisibleRowIndices:!0,changeType:"update",rowIndices:[n-r,o-r]}),this._adaptiveColumnsController.updateCommandAdaptiveAriaLabel(e,S7),this._adaptiveColumnsController.updateCommandAdaptiveAriaLabel(s,g1)}},V7=i=>class extends i{_needHideBorder(e){return super._needHideBorder(e)||e?.hasClass("dx-field-item-content")&&e?.find(".dx-checkbox").length}_getFocusCellSelector(){return`${super._getFocusCellSelector()}, .dx-adaptive-detail-row .dx-field-item > .dx-field-item-content`}_getRevertTooltipsSelector(){return`${super._getRevertTooltipsSelector()}, .dx-field-item-content .${this.addWidgetPrefix("revert-tooltip")}`}},L7=i=>class extends i{_isColumnVisible(e){return super._isColumnVisible(e)&&!e.adaptiveHidden}},N7=i=>class extends i{dispose(){super.dispose.apply(this,arguments),clearTimeout(this._updateScrollableTimeoutID)}_needBestFit(){return super._needBestFit()||!!this._adaptiveColumnsController.getHidingColumnsQueue().length}_correctColumnWidths(e,t){let n=this._adaptiveColumnsController,o=n.getHiddenColumns(),s=n.updateHidingQueue(this._columnsController.getColumns());n.hideRedundantColumns(e,t,s);let r=n.getHiddenColumns();return n.hasAdaptiveDetailRowExpanded()&&o.length!==r.length&&n.updateForm(r),!r.length&&n.collapseAdaptiveDetailRow(),super._correctColumnWidths.apply(this,arguments)}_toggleBestFitMode(e){e&&this._adaptiveColumnsController._showHiddenColumns(),super._toggleBestFitMode(e)}_needStretch(){let e=this._adaptiveColumnsController;return super._needStretch.apply(this,arguments)||e.getHidingColumnsQueue().length||e.hasHiddenColumns()}},m1={defaultOptions:()=>({columnHidingEnabled:!1,onAdaptiveDetailRowPreparing:null}),controllers:{adaptiveColumns:yE},extenders:{views:{rowsView:M7},controllers:{export:R7,columnsResizer:F7,draggingHeader:P7,editing:k7,resizing:N7,data:B7,editorFactory:V7,columns:L7,keyboardNavigation:A7}}};$.registerModule("adaptivity",m1);function f1(i,e,t,n,o,s){t=t||0,n=n||[],s=s||[],n[t]=n[t]||0;let r=i[t],a=s[t]+1||0,l=0,d;if(r){for(d=a;d<r.length;d++){let c=r[d],h=d+n[t],p=c.colspan||1;if(f1(i,e,t+(c.rowspan||1),n,p,s),n[t]+=p-1,l+=p,c.rowspan)for(let g=t+1;g<t+c.rowspan;g++)n[g]=n[g]||0,n[g]+=c.colspan||1;if(e(c,h,t,d)===!1||o!==void 0&&l>=o)break}s[t]=d}}function qf(i,e,t){let n=[];f1(i,(o,s,r)=>{let a=o,l,d=a.colspan||1,c=s+d-1>=e&&s<t;if(n[r]=n[r]||[],c)s<e?(l=d-(e-s),s=e):l=d,s+l>t&&(l=t-s),l!==d&&(a=m({},a,{colspan:l})),n[r].push(a);else if(s>t)return!1});for(let o=0;o<n.length;o++)n[o]=n[o]||[];return n}var _1=i=>class extends i{_needToSetCellWidths(){let e=super._needToSetCellWidths();return!e&&this._columnsController.isVirtualMode()&&(e=this._columnsController.getColumns().some(n=>n.width==="auto")),e}},H7=i=>class extends _1(i){_resizeCore(){super._resizeCore.apply(this,arguments),this._columnsController.resize()}_handleScroll(e){let t=this.getScrollable(),{left:n}=e.scrollOffset;super._handleScroll.apply(this,arguments),this.option("rtlEnabled")&&t&&(n=W(t.$content())-W(t.$element())-n),this._columnsController.setScrollPosition(n)}_renderCore(e){if(e!=null&&e.virtualColumnsScrolling){var t,n;let o=this._findContentElement(),s=(t=this._columnsController)===null||t===void 0?void 0:t.getFixedColumns(),r=(n=this._scrollable)===null||n===void 0?void 0:n.option("useNative");if(s!=null&&s.length){o.css({minHeight:r?Q(o):R.getContentHeightLimit(we)});let a=()=>{this.resizeCompleted.remove(a),o.css({minHeight:""})};this.resizeCompleted.add(a)}}return super._renderCore.apply(this,arguments)}},$7=i=>class extends _1(i){_renderCore(){let e=super._renderCore.apply(this,arguments);return this._columnsController.isVirtualMode()&&this._updateScrollLeftPosition(),e}},Yf=function(i){return i.map(e=>e.visibleWidth||parseFloat(e.width)||50)},z7=i=>class extends i{init(){super.init.apply(this,arguments),this._resizingController=this.getController("resizing"),this._beginPageIndex=null,this._endPageIndex=null,this._position??(this._position=0),this._virtualVisibleColumns={}}dispose(){clearTimeout(this._changedTimeout),super.dispose.apply(this,arguments)}resetColumnsCache(){super.resetColumnsCache(),this._virtualVisibleColumns={}}getBeginPageIndex(e){let t=this.getVisibleColumns(void 0,!0),n=Yf(t),o=0;for(let s=0;s<n.length;s++){if(o>=e)return Math.floor(s/this.getColumnPageSize());o+=n[s]}return 0}getTotalWidth(){let e=this.option("width");return typeof e=="number"?e:this._resizingController._lastWidth||ae(this.component.$element())}getEndPageIndex(e){let t=this.getVisibleColumns(void 0,!0),n=Yf(t),o=0;e+=this.getTotalWidth();for(let s=0;s<n.length;s++){if(o>=e)return Math.ceil(s/this.getColumnPageSize());o+=n[s]}return Math.ceil(n.length/this.getColumnPageSize())}getColumnPageSize(){return this.option("scrolling.columnPageSize")}_fireColumnsChanged(){let e=new Date;this.columnsChanged.fire({optionNames:{all:!0,length:1},changeTypes:{columns:!0,virtualColumnsScrolling:!0,length:2}}),this._renderTime=new Date-e}getScrollingTimeout(){let e=this.option("scrolling.columnRenderingThreshold"),t=this.option("scrolling.renderAsync"),n=0;return(!f(t)&&this._renderTime>e||t)&&(n=this.option("scrolling.timeout")),n}setScrollPosition(e){let t=this.getScrollingTimeout();t>0?(clearTimeout(this._changedTimeout),this._changedTimeout=setTimeout(()=>{this._setScrollPositionCore(e)},t)):this._setScrollPositionCore(e)}isVirtualMode(){return j()&&this.option("scrolling.columnRenderingMode")==="virtual"}resize(){this._setScrollPositionCore(this._position)}_setScrollPositionCore(e){let t=this;if(t.isVirtualMode()){let n=t.getBeginPageIndex(e),o=t.getEndPageIndex(e),s=e<t._position?t._beginPageIndex>n:t._endPageIndex<o;t._position=e,s&&(t._beginPageIndex=n,t._endPageIndex=o,t._fireColumnsChanged())}}getFixedColumns(e,t){let n=super.getFixedColumns(e);if(this.isVirtualMode()&&!t&&n.length){let o=n.map(s=>s.command).indexOf("transparent");return n[o].colspan=this.getVisibleColumns().length-super.getFixedColumns().length+1,n}return n}_compileVisibleColumns(e,t){var n;if(t||!this.isVirtualMode()||!this._shouldReturnVisibleColumns())return super._compileVisibleColumns(e);(n=this._columns)!==null&&n!==void 0&&n.length&&!f(this._beginPageIndex)&&!f(this._endPageIndex)&&(this._beginPageIndex=this.getBeginPageIndex(this._position),this._endPageIndex=this.getEndPageIndex(this._position));let o=this._beginPageIndex,s=this._endPageIndex,r=`${e}-${o}-${s}`;if(this._virtualVisibleColumns[r])return this._virtualVisibleColumns[r];let a=super._compileVisibleColumns(),l=this.getRowCount(),d=this.getColumnPageSize(),c=o*d,h=s*d,p=this.getFixedColumns(void 0,!0),g=p.map(re=>re.command).indexOf("transparent"),C=p.length?g:0,v=a.slice(0,C),b=a.slice(C,c),T=Yf(b).reduce((re,Ie)=>re+Ie,0);T||(c=0);let M=p.length?p.length-g-1:0,G=a.slice(a.length-M),te=a.slice(h,a.length-M),oe=Yf(te).reduce((re,Ie)=>re+Ie,0);if(oe||(h=a.length),l>1&&typeof e=="number"){let re=[];for(let Ie=0;Ie<=l;Ie++)re.push(super._compileVisibleColumns(Ie));v=qf(re,0,v.length)[e]||[],G=qf(re,a.length-G.length,a.length)[e]||[],a=qf(re,c,h)[e]||[]}else a=a.slice(c,h);return T&&(a.unshift({command:"virtual",type:"virtual",width:T}),a=v.concat(a)),oe&&(a.push({command:"virtual",type:"virtual",width:oe}),a=a.concat(G)),this._virtualVisibleColumns[r]=a,a}getColumnIndexOffset(){let e=0;if(this._beginPageIndex>0){let n=this.getFixedColumns().map(s=>s.command).indexOf("transparent"),o=n>=0?n:0;e=this._beginPageIndex*this.getColumnPageSize()-o-1}return e>0?e:0}},C1={defaultOptions:()=>({scrolling:{columnRenderingMode:"standard",columnPageSize:5,columnRenderingThreshold:300}}),extenders:{controllers:{columns:z7},views:{columnHeadersView:$7,rowsView:H7}}};$.registerModule("virtualColumns",C1);var OE=class{constructor(e,t){let{key:n}=t;this._isSharedDataSource=!1,this._keyExpr=n,this.updateDataSource(e)}_updateDataSource(e){if(e)if(e instanceof gi)this._isSharedDataSource=!0,this._dataSource=e;else{let t=gn(e);this._dataSource=new gi(m(!0,{},{},t))}}_updateDataSourceByItems(e){this._dataSource=new gi({store:new hs({key:this.key(),data:e}),pageSize:0})}_disposeDataSource(){this._dataSource&&(this._isSharedDataSource?this._isSharedDataSource=!1:this._dataSource.dispose(),delete this._dataSource)}load(){return this._dataSource.load()}loadSingle(e,t){if(!this._dataSource)return new y().reject();let n=e,o=t;return arguments.length<2&&(o=e,n=this.key()),this._dataSource.loadSingle(n,o)}loadFromStore(e){return this.store().load(e)}loadNextPage(){return this.pageIndex(1+this.pageIndex()),this.load()}loadOptions(){return this._dataSource.loadOptions()}userData(){return this._dataSource._userData}cancel(e){this._dataSource.cancel(e)}cancelAll(){this._dataSource.cancelAll()}filter(e){return this._dataSource.filter(e)}addSearchFilter(e){this._dataSource._addSearchFilter(e)}group(e){return this._dataSource.group(e)}paginate(){return this._dataSource.paginate()}pageSize(){return this._dataSource._pageSize}pageIndex(e){return e===void 0?this._dataSource.pageIndex(void 0):this._dataSource.pageIndex(e)}resetDataSource(){this._disposeDataSource()}resetDataSourcePageIndex(){this.pageIndex()&&(this.pageIndex(0),this.load())}updateDataSource(e,t){let n=e??this.items();t&&(this._keyExpr=t),this._disposeDataSource(),Array.isArray(n)?this._updateDataSourceByItems(n):this._updateDataSource(n)}totalCount(){return this._dataSource.totalCount()}isLastPage(){return this._dataSource.isLastPage()||!this._dataSource._pageSize}isLoading(){return this._dataSource.isLoading()}isLoaded(){return this._dataSource.isLoaded()}searchValue(e){return this._dataSource.searchValue(e)}searchOperation(e){return this._dataSource.searchOperation(e)}searchExpr(e){return this._dataSource.searchExpr(e)}select(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this._dataSource.select(t)}key(){var e;let t=(e=this._dataSource)===null||e===void 0?void 0:e.key();return f(t)&&this._keyExpr==="this"?t:this._keyExpr}keyOf(e){return this.store().keyOf(e)}store(){return this._dataSource.store()}items(){var e;return(e=this._dataSource)===null||e===void 0?void 0:e.items()}applyMapFunction(e){return this._dataSource._applyMapFunction(e)}getDataSource(){return this._dataSource??null}reload(){return this._dataSource.reload()}on(e,t){this._dataSource.on(e,t)}off(e,t){this._dataSource.off(e,t)}},x1=OE;var v1=x1;var b1="dx-buttongroup-item-has-width";var Xf={contained:"dx-buttongroup-mode-contained",outlined:"dx-buttongroup-mode-outlined",text:"dx-buttongroup-mode-text"},W7=jn.inherit({_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new Ai((i,e,t)=>{this._prepareItemStyles(i);let n=this.option("buttonTemplate");this._createComponent(i,_t,m({},t,e,this._getBasicButtonOptions(),{_templateData:this._hasCustomTemplate(n)?t:{},template:t.template||n}))},["text","type","icon","disabled","visible","hint"],this.option("integrationOptions.watchMethod"))})},_getBasicButtonOptions(){return{focusStateEnabled:!1,onClick:null,hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode")}},_getDefaultOptions(){return m(this.callBase(),{itemTemplateProperty:null})},_hasCustomTemplate(i){return A(i)||this.option("integrationOptions.templates")[i]},_selectedItemClass:()=>"dx-item-selected dx-state-selected",_prepareItemStyles(i){let e=i.data("dxItemIndex");e===0&&i.addClass("dx-buttongroup-first-item");let t=this.option("items");t&&e===t.length-1&&i.addClass("dx-buttongroup-last-item"),i.addClass("dx-shape-standard")},_renderItemContent(i){return i.container=u(i.container).parent(),this.callBase(i)},_setAriaSelectionAttribute(i,e){this.setAria("pressed",e,i)},_renderItemContentByNode(i,e){return i.container=u(i.container.children().first()),this.callBase(i,e)},_focusTarget(){return this.$element().parent()},_keyboardEventBindingTarget(){return this._focusTarget()},_refreshContent(){this._prepareContent(),this._renderContent()},_itemClass:()=>"dx-buttongroup-item",_itemSelectHandler(i){this.option("selectionMode")==="single"&&this.isItemSelected(i.currentTarget)||this.callBase(i)}}),y1=at.inherit({_getDefaultOptions(){return m(this.callBase(),{hoverStateEnabled:!0,focusStateEnabled:!0,selectionMode:"single",selectedItems:[],selectedItemKeys:[],stylingMode:"contained",keyExpr:"text",items:[],buttonTemplate:"content",onSelectionChanged:null,onItemClick:null})},_init(){this.callBase(),this._createItemClickAction()},_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_initMarkup(){this.setAria("role","group"),this.$element().addClass("dx-buttongroup"),this._renderStylingMode(),this._renderButtons(),this._syncSelectionOptions(),this.callBase()},_renderStylingMode(){let{stylingMode:i}=this.option();for(let e in Xf)this.$element().removeClass(Xf[e]);this.$element().addClass(Xf[i]??Xf.contained)},_fireSelectionChangeEvent(i,e){this._createActionByOption("onSelectionChanged",{excludeValidators:["disabled","readOnly"]})({addedItems:i,removedItems:e})},_renderButtons(){let i=u("<div>").addClass("dx-buttongroup-wrapper").appendTo(this.$element()),e=this.option("selectedItems"),t={selectionMode:this.option("selectionMode"),items:this.option("items"),keyExpr:this.option("keyExpr"),buttonTemplate:this.option("buttonTemplate"),scrollingEnabled:!1,selectedItemKeys:this.option("selectedItemKeys"),focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),activeStateEnabled:this.option("activeStateEnabled"),stylingMode:this.option("stylingMode"),accessKey:this.option("accessKey"),tabIndex:this.option("tabIndex"),noDataText:"",selectionRequired:!1,onItemRendered:n=>{let o=this.option("width");f(o)&&u(n.itemElement).addClass(b1)},onSelectionChanged:n=>{this._syncSelectionOptions(),this._fireSelectionChangeEvent(n.addedItems,n.removedItems)},onItemClick:n=>{this._itemClickAction(n)}};f(e)&&e.length&&(t.selectedItems=e),this._buttonsCollection=this._createComponent(i,W7,t)},_syncSelectionOptions(){this._setOptionWithoutOptionChange("selectedItems",this._buttonsCollection.option("selectedItems")),this._setOptionWithoutOptionChange("selectedItemKeys",this._buttonsCollection.option("selectedItemKeys"))},_optionChanged(i){switch(i.name){case"stylingMode":case"selectionMode":case"keyExpr":case"buttonTemplate":case"items":case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":case"tabIndex":this._invalidate();break;case"selectedItemKeys":case"selectedItems":this._buttonsCollection.option(i.name,i.value);break;case"onItemClick":this._createItemClickAction();break;case"onSelectionChanged":break;case"width":this.callBase(i),this._buttonsCollection.itemElements().toggleClass(b1,!!i.value);break;default:this.callBase(i)}}});K("dxButtonGroup",y1);var O1=y1;var E1=O1;var G7="dx-dropdownbutton-content";var j7=at.inherit({_getDefaultOptions(){return m(this.callBase(),{itemTemplate:"item",keyExpr:"this",displayExpr:void 0,selectedItem:null,selectedItemKey:null,stylingMode:"outlined",deferRendering:!0,noDataText:O.format("dxCollectionWidget-noDataText"),useSelectMode:!1,splitButton:!1,showArrowIcon:!0,template:null,text:"",type:"normal",icon:void 0,onButtonClick:null,onSelectionChanged:null,onItemClick:null,opened:!1,items:null,dataSource:null,focusStateEnabled:!0,hoverStateEnabled:!0,dropDownOptions:{},dropDownContentTemplate:"content",wrapItemText:!1,useItemTextAsTitle:!0,grouped:!1,groupTemplate:"group",buttonGroupOptions:{}})},_setOptionsByReference(){this.callBase(),m(this._optionsByReference,{selectedItem:!0})},_init(){this.callBase(),this._createItemClickAction(),this._createActionClickAction(),this._createSelectionChangedAction(),this._initDataController(),this._compileKeyGetter(),this._compileDisplayGetter(),this._options.cache("buttonGroupOptions",this.option("buttonGroupOptions")),this._options.cache("dropDownOptions",this.option("dropDownOptions"))},_initDataController(){let i=this.option("dataSource");this._dataController=new v1(i??this.option("items"),{key:this.option("keyExpr")})},_initTemplates(){this._templateManager.addDefaultTemplates({content:new Mn(i=>{let e=u(i.container),t=u("<div>").appendTo(e);this._list=this._createComponent(t,ys,this._listOptions()),this._list.registerKeyHandler("escape",this._escHandler.bind(this)),this._list.registerKeyHandler("tab",this._escHandler.bind(this)),this._list.registerKeyHandler("leftArrow",this._escHandler.bind(this)),this._list.registerKeyHandler("rightArrow",this._escHandler.bind(this))})}),this.callBase()},_compileKeyGetter(){this._keyGetter=Ce(this._dataController.key())},_compileDisplayGetter(){this._displayGetter=Ce(this.option("displayExpr"))},_initMarkup(){this.callBase(),this.$element().addClass("dx-dropdownbutton"),this._renderButtonGroup(),this._updateArrowClass(),f(this.option("selectedItemKey"))&&this._loadSelectedItem().done(this._updateActionButton.bind(this))},_renderFocusTarget:E,_render(){(!this.option("deferRendering")||this.option("opened"))&&this._renderPopup(),this.callBase()},_renderContentImpl(){return this._popup&&this._renderPopupContent(),this.callBase()},_loadSelectedItem(){var i;(i=this._loadSingleDeferred)===null||i===void 0||i.reject();let e=y();if(this._list&&this._lastSelectedItemData!==void 0){let n=this.option("useSelectMode")?this._list.option("selectedItem"):this._lastSelectedItemData;return e.resolve(n)}this._lastSelectedItemData=void 0;let t=this.option("selectedItemKey");return this._dataController.loadSingle(t).done(e.resolve).fail(()=>{e.reject(null)}),this._loadSingleDeferred=e,e.promise()},_createActionClickAction(){this._actionClickAction=this._createActionByOption("onButtonClick")},_createSelectionChangedAction(){this._selectionChangedAction=this._createActionByOption("onSelectionChanged")},_createItemClickAction(){this._itemClickAction=this._createActionByOption("onItemClick")},_fireSelectionChangedAction(i){let{previousValue:e,value:t}=i;this._selectionChangedAction({item:t,previousItem:e})},_fireItemClickAction(i){let{event:e,itemElement:t,itemData:n}=i;return this._itemClickAction({event:e,itemElement:t,itemData:this._actionItem||n})},_getButtonTemplate(){let{template:i,splitButton:e,showArrowIcon:t}=this.option();return i||(e||!t?"content":(n,o)=>{let{text:s,icon:r}=n,a=Mi(r),l=s?u("<span>").text(s).addClass("dx-button-text"):void 0,d=Mi("spindown").addClass("dx-icon-right");u(o).append(a,l,d)})},_getActionButtonConfig(){let{icon:i,text:e,type:t,splitButton:n}=this.option(),o={text:e,icon:i,type:t,template:this._getButtonTemplate(),elementAttr:{class:"dx-dropdownbutton-action"}};return n&&(o.elementAttr.role="menuitem"),o},_getSpinButtonConfig(){let{type:i}=this.option();return{type:i,icon:"spindown",elementAttr:{class:"dx-dropdownbutton-toggle",role:"menuitem"}}},_getButtonGroupItems(){let{splitButton:i}=this.option(),e=[this._getActionButtonConfig()];return i&&e.push(this._getSpinButtonConfig()),e},_buttonGroupItemClick(i){let{event:e,itemData:t}=i,n=t.elementAttr.class==="dx-dropdownbutton-action";t.elementAttr.class==="dx-dropdownbutton-toggle"?this.toggle():n&&(this._actionClickAction({event:e,selectedItem:this.option("selectedItem")}),this.option("splitButton")||this.toggle())},_getButtonGroupOptions(){let{accessKey:i,focusStateEnabled:e,hoverStateEnabled:t,splitButton:n,stylingMode:o,tabIndex:s}=this.option();return m({items:this._getButtonGroupItems(),width:"100%",height:"100%",selectionMode:"none",focusStateEnabled:e,hoverStateEnabled:t,stylingMode:o,accessKey:i,tabIndex:s,elementAttr:{role:n?"menu":"group"},onItemClick:this._buttonGroupItemClick.bind(this),onKeyboardHandled:a=>this._keyboardHandler(a)},this._options.cache("buttonGroupOptions"))},_renderPopupContent(){let i=this._popup.$content(),e=this._getTemplateByOption("dropDownContentTemplate");return i.empty(),this._popupContentId=`dx-${new Ae}`,this.setAria("id",this._popupContentId,i),e.render({container:H(i),model:this.option("items")||this._dataController.getDataSource()})},_popupOptions(){let i=this.option("rtlEnabled")?"right":"left";return m({dragEnabled:!1,focusStateEnabled:!1,deferRendering:this.option("deferRendering"),hideOnOutsideClick:e=>{let t=this.$element();return!u(e.target).closest(".dx-dropdownbutton").is(t)},showTitle:!1,animation:{show:{type:"fade",duration:0,from:0,to:1},hide:{type:"fade",duration:400,from:1,to:0}},_ignoreFunctionValueDeprecation:!0,width:()=>Od(this.$element()),height:"auto",shading:!1,position:{of:this.$element(),collision:"flipfit",my:`${i} top`,at:`${i} bottom`},_wrapperClassExternal:"dx-dropdowneditor-overlay"},this._options.cache("dropDownOptions"),{visible:this.option("opened")})},_listOptions(){let i=this.option("selectedItemKey"),e=this.option("useSelectMode");return{selectionMode:e?"single":"none",wrapItemText:this.option("wrapItemText"),focusStateEnabled:this.option("focusStateEnabled"),hoverStateEnabled:this.option("hoverStateEnabled"),useItemTextAsTitle:this.option("useItemTextAsTitle"),onContentReady:()=>this._fireContentReadyAction(),selectedItemKeys:f(i)&&e?[i]:[],grouped:this.option("grouped"),groupTemplate:this.option("groupTemplate"),keyExpr:this._dataController.key(),noDataText:this.option("noDataText"),displayExpr:this.option("displayExpr"),itemTemplate:this.option("itemTemplate"),items:this.option("items"),dataSource:this._dataController.getDataSource(),onItemClick:t=>{this.option("useSelectMode")||(this._lastSelectedItemData=t.itemData),this.option("selectedItemKey",this._keyGetter(t.itemData)),this._fireItemClickAction(t)!==!1&&(this.toggle(!1),this._buttonGroup.focus())}}},_upDownKeyHandler(){return this._popup&&this._popup.option("visible")&&this._list?this._list.focus():this.open(),!0},_escHandler(){return this.close(),this._buttonGroup.focus(),!0},_tabHandler(){return this.close(),!0},_renderPopup(){let i=u("<div>");this.$element().append(i),this._popup=this._createComponent(i,Oi,this._popupOptions()),this._popup.$content().addClass(G7),this._popup.$wrapper().addClass("dx-dropdownbutton-popup-wrapper"),this._popup.$overlayContent().attr("aria-label","Dropdown"),this._popup.on("hiding",this._popupHidingHandler.bind(this)),this._popup.on("showing",this._popupShowingHandler.bind(this)),this._bindInnerWidgetOptions(this._popup,"dropDownOptions")},_popupHidingHandler(){this.option("opened",!1),this._updateAriaAttributes(!1)},_popupOptionChanged(i){let e=at.getOptionsFromContainer(i);this._setPopupOption(e);let t=Object.keys(e);(t.includes("width")||t.includes("height"))&&this._dimensionChanged()},_dimensionChanged(){Ed(this.option("dropDownOptions.width"))===void 0&&this._setPopupOption("width",()=>Od(this.$element()))},_setPopupOption(i,e){this._setWidgetOption("_popup",arguments)},_popupShowingHandler(){this.option("opened",!0),this._updateAriaAttributes(!0)},_setElementAria(i){let e={owns:i?this._popupContentId:void 0};this.setAria(e,this.$element())},_setButtonsAria(i){let e={expanded:i,haspopup:"listbox"},t={};this.option("text")||(t.label="dropdownbutton"),this._getButtons().each((n,o)=>{n===0?this.setAria(I({},t,e),u(o)):this.setAria(e,u(o))})},_updateAriaAttributes(i){this._setElementAria(i),this._setButtonsAria(i)},_getButtons(){return this._buttonGroup.$element().find(".dx-button")},_renderButtonGroup(){let i=this._buttonGroup&&this._buttonGroup.$element()||u("<div>");this._buttonGroup||this.$element().append(i),this._buttonGroup=this._createComponent(i,E1,this._getButtonGroupOptions()),this._buttonGroup.registerKeyHandler("downArrow",this._upDownKeyHandler.bind(this)),this._buttonGroup.registerKeyHandler("tab",this._tabHandler.bind(this)),this._buttonGroup.registerKeyHandler("upArrow",this._upDownKeyHandler.bind(this)),this._buttonGroup.registerKeyHandler("escape",this._escHandler.bind(this)),this._bindInnerWidgetOptions(this._buttonGroup,"buttonGroupOptions"),this._updateAriaAttributes(this.option("opened"))},_updateArrowClass(){let i=this.option("splitButton")||this.option("showArrowIcon");this.$element().toggleClass("dx-dropdownbutton-has-arrow",i)},toggle(i){return this._popup||(this._renderPopup(),this._renderContent()),this._popup.toggle(i)},open(){return this.toggle(!0)},close(){return this.toggle(!1)},_setListOption(i,e){this._list&&this._list.option(i,e)},_getDisplayValue(i){let t=!z(i)?i:this._displayGetter(i);return z(t)?"":String(Be(t,""))},_updateActionButton(i){this.option("useSelectMode")&&this.option({text:this._getDisplayValue(i),icon:X(i)?i.icon:void 0}),this._setOptionWithoutOptionChange("selectedItem",i),this._setOptionWithoutOptionChange("selectedItemKey",this._keyGetter(i))},_clean(){this._list&&this._list.$element().remove(),this._popup&&this._popup.$element().remove()},_selectedItemKeyChanged(i){this._setListOption("selectedItemKeys",this.option("useSelectMode")&&f(i)?[i]:[]);let e=this.option("selectedItem");this._loadSelectedItem().always(t=>{this._updateActionButton(t),this._displayGetter(e)!==this._displayGetter(t)&&this._fireSelectionChangedAction({previousValue:e,value:t})})},_updateButtonGroup(i,e){this._buttonGroup.option(i,e),this._updateAriaAttributes(this.option("opened"))},_actionButtonOptionChanged(i){let{name:e,value:t}=i,n={};n[e]=t,this._updateButtonGroup("items[0]",m({},this._getActionButtonConfig(),n)),this._popup&&this._popup.repaint()},_selectModeChanged(i){if(i){this._setListOption("selectionMode","single");let e=this.option("selectedItemKey");this._setListOption("selectedItemKeys",f(e)?[e]:[]),this._selectedItemKeyChanged(this.option("selectedItemKey"))}else this._setListOption("selectionMode","none"),this.option({selectedItemKey:void 0,selectedItem:void 0}),this._actionButtonOptionChanged({text:this.option("text")})},_updateItemCollection(i){let e=this.option("selectedItemKey");this._setListOption("selectedItem",null),this._setWidgetOption("_list",[i]),f(e)&&this._loadSelectedItem().done(t=>{this._setListOption("selectedItemKeys",[e]),this._setListOption("selectedItem",t)}).fail(t=>{this._setListOption("selectedItemKeys",[])}).always(this._updateActionButton.bind(this))},_updateDataController(i){this._dataController.updateDataSource(i,this.option("keyExpr")),this._updateKeyExpr()},_updateKeyExpr(){this._compileKeyGetter(),this._setListOption("keyExpr",this._dataController.key())},focus(){this._buttonGroup.focus()},_optionChanged(i){var e;let{name:t,value:n}=i;switch(t){case"useSelectMode":this._selectModeChanged(n);break;case"splitButton":this._updateArrowClass(),this._renderButtonGroup();break;case"displayExpr":this._compileDisplayGetter(),this._setListOption(t,n),this._updateActionButton(this.option("selectedItem"));break;case"keyExpr":this._updateDataController();break;case"buttonGroupOptions":this._innerWidgetOptionChanged(this._buttonGroup,i);break;case"dropDownOptions":if(i.fullName==="dropDownOptions.visible")break;i.value.visible!==void 0&&delete i.value.visible,this._popupOptionChanged(i),this._innerWidgetOptionChanged(this._popup,i);break;case"opened":this.toggle(n);break;case"focusStateEnabled":case"hoverStateEnabled":this._setListOption(t,n),this._updateButtonGroup(t,n),this.callBase(i);break;case"items":this._updateDataController(this.option("items")),this._updateItemCollection(t);break;case"dataSource":this._dataController.updateDataSource(n),this._updateKeyExpr(),this._updateItemCollection(t);break;case"icon":case"text":this._actionButtonOptionChanged(i);break;case"showArrowIcon":this._updateArrowClass(),this._renderButtonGroup(),this._popup&&this._popup.repaint();break;case"width":case"height":this.callBase(i),(e=this._popup)===null||e===void 0||e.repaint();break;case"stylingMode":case"tabIndex":this._updateButtonGroup(t,n);break;case"type":this._updateButtonGroup("items",this._getButtonGroupItems());break;case"itemTemplate":case"grouped":case"noDataText":case"groupTemplate":case"wrapItemText":case"useItemTextAsTitle":this._setListOption(t,n);break;case"dropDownContentTemplate":this._renderContent();break;case"selectedItemKey":this._selectedItemKeyChanged(n);break;case"selectedItem":break;case"onItemClick":this._createItemClickAction();break;case"onButtonClick":this._createActionClickAction();break;case"onSelectionChanged":this._createSelectionChangedAction();break;case"deferRendering":this.toggle(this.option("opened"));break;case"template":this._renderButtonGroup();break;default:this.callBase(i)}},getDataSource(){return this._dataController.getDataSource()}});K("dxDropDownButton",j7);function w1(i,e){let t=d=>d||1,n=[],o=(i[0]||[]).reduce((d,c)=>d+t(c.colspan),0),s=(d=>{let c=0,h=0;return()=>{let p=d[c]||[],g=p[h++];return h>=p.length&&(c++,h=0),g&&(g.colspan=t(g.colspan),g.rowspan=t(g.rowspan)),g}})(i),r=(d,c,h)=>{let p=n[d]=n[d]||[];if(p[c]=h,h.colspan>1||h.rowspan>1){let g=(C=>m({},C,e))(h);for(let C=1;C<h.colspan;C++)r(d,c+C,g);for(let C=1;C<h.rowspan;C++)for(let v=0;v<h.colspan;v++)r(d+C,c+v,g)}},a=s(),l=0;for(;a;){for(let d=0;d<o&&a;d++)n[l]&&n[l][d]||(r(l,d,a),d+=a.colspan-1,a=s());l++}return n}var EE=class{constructor(e,t,n){this._exportController=e,this._initialColumnWidthsByColumnIndex=t,this._selectedRowsOnly=n}_getGroupValue(e){let{key:t,data:n,rowType:o,groupIndex:s,summaryCells:r}=e,a=this._options.groupColumns[s],l=$.getDisplayValue(a,a.deserializeValue?a.deserializeValue(t[s]):t[s],n,o),d=`${a.caption}: ${$.formatValue(l,a)}`;return r&&r[0]&&r[0].length&&(d+=` ${$.getGroupRowSummaryText(r[0],this._options.summaryTexts)}`),d}_correctCellIndex(e){return e}_initOptions(){let e=this._exportController,t=e._columnsController.getGroupColumns();this._options={columns:e._getColumns(this._initialColumnWidthsByColumnIndex),groupColumns:t,items:this._selectedRowsOnly||e._selectionOnly?e._getSelectedItems():e._getAllItems(),isHeadersVisible:e.option("showColumnHeaders"),summaryTexts:e.option("summary.texts"),rtlEnabled:e.option("rtlEnabled")}}getHeaderStyles(){return[{bold:!0,alignment:"center"},{bold:!0,alignment:"left"},{bold:!0,alignment:"right"}]}getGroupRowStyle(){return{bold:!0,alignment:un(this._options.rtlEnabled)}}getColumnStyles(){let e=[];return this.getColumns().forEach(t=>{e.push({alignment:t.alignment||"left",format:t.format,dataType:t.dataType})}),e}getStyles(){return[...this.getHeaderStyles(),...this.getColumnStyles(),this.getGroupRowStyle()]}_getTotalCellStyleId(e){var t;let n=((t=this.getColumns()[e])===null||t===void 0?void 0:t.alignment)||"right";return this.getHeaderStyles().map(o=>o.alignment).indexOf(n)}getStyleId(e,t){return e<this.getHeaderRowCount()?0:this.isTotalCell(e-this.getHeaderRowCount(),t)?this._getTotalCellStyleId(t):this.isGroupRow(e-this.getHeaderRowCount())?this.getHeaderStyles().length+this.getColumns().length:t+this.getHeaderStyles().length}getColumns(e){let{columns:t}=this._options;return e?t:t[t.length-1]}getColumnsWidths(){let e=this.getColumns();return f(e)?e.map(t=>t.width):void 0}getRowsCount(){return this._options.items.length+this.getHeaderRowCount()}getHeaderRowCount(){return this.isHeadersVisible()?this._options.columns.length-1:0}isGroupRow(e){return e<this._options.items.length&&this._options.items[e].rowType==="group"}getGroupLevel(e){let t=this._options.items[e-this.getHeaderRowCount()],n=t&&t.groupIndex;return t&&t.rowType==="totalFooter"?0:f(n)?n:this._options.groupColumns.length}getCellType(e,t){let n=this.getColumns();if(e<this.getHeaderRowCount())return"string";if(e-=this.getHeaderRowCount(),t<n.length){let o=this._options.items.length&&this._options.items[e],s=n[t];return o&&o.rowType==="data"&&isFinite(o.values[this._correctCellIndex(t)])&&!f(s.customizeText)?f(s.lookup)?s.lookup.dataType:s.dataType:"string"}}ready(){this._initOptions();let e=this._options;return P(e.items).done(t=>{e.items=t}).fail(()=>{e.items=[]})}_convertFromGridGroupSummaryItems(e){if(f(e)&&e.length>0)return e.map(t=>({value:t.value,name:t.name}))}getCellData(e,t,n){let o,s,r={cellSourceData:{},value:o},a=this.getColumns(),l=this._correctCellIndex(t);if(e<this.getHeaderRowCount())s=this.getColumns(!0)[e][t],r.cellSourceData.rowType="header",r.cellSourceData.column=s&&s.gridColumn,r.value=s&&s.caption;else{e-=this.getHeaderRowCount();let d=this._options.items.length&&this._options.items[e];if(d){let c=d.values;switch(r.cellSourceData.rowType=d.rowType,r.cellSourceData.column=a[t]&&a[t].gridColumn,d.rowType){case"groupFooter":case"totalFooter":l<c.length&&(o=c[l],f(o)?(r.cellSourceData.value=o.value,r.cellSourceData.totalSummaryItemName=o.name,r.value=$.getSummaryText(o,this._options.summaryTexts)):r.cellSourceData.value=void 0);break;case"group":if(r.cellSourceData.groupIndex=d.groupIndex,t<1)r.cellSourceData.column=this._options.groupColumns[d.groupIndex],r.cellSourceData.value=d.key[d.groupIndex],r.cellSourceData.groupSummaryItems=this._convertFromGridGroupSummaryItems(d.summaryCells[0]),r.value=this._getGroupValue(d);else{let h=d.values[l];if(Array.isArray(h)){r.cellSourceData.groupSummaryItems=this._convertFromGridGroupSummaryItems(h),o="";for(let p=0;p<h.length;p++)o+=(p>0?n?`
`:` 
 `:"")+$.getSummaryText(h[p],this._options.summaryTexts);r.value=o}else r.cellSourceData.value=void 0}break;default:if(s=a[t],s){let h=c[l],p=$.getDisplayValue(s,h,d.data,d.rowType);!isFinite(p)||f(s.customizeText)?n&&f(s.customizeText)&&s.customizeText===this._exportController._columnsController.getCustomizeTextByDataType("boolean")?r.value=p:r.value=$.formatValue(p,s):r.value=p,r.cellSourceData.value=h}r.cellSourceData.data=d.data}}}return r}isHeadersVisible(){return this._options.isHeadersVisible}isTotalCell(e,t){let{items:n}=this._options,o=n[e],s=this._correctCellIndex(t),r=o.summaryCells&&o.summaryCells[s]&&o.summaryCells[s].length>0&&o.summaryCells[s][0].alignByColumn;return o&&o.rowType==="groupFooter"||o.rowType==="totalFooter"||r}getCellMerging(e,t){let{columns:n}=this._options,o=n[e]&&n[e][t];return o?{colspan:(o.exportColspan||1)-1,rowspan:(o.rowspan||1)-1}:{colspan:0,rowspan:0}}getFrozenArea(){return{x:0,y:this.getHeaderRowCount()}}},wE=class extends $.ViewController{init(){this.throwWarningIfNoOnExportingEvent(),this._columnsController=this.getController("columns"),this._dataController=this.getController("data"),this._selectionController=this.getController("selection"),this._rowsView=this.getView("rowsView"),this._headersView=this.getView("columnHeadersView"),this.createAction("onExporting",{excludeValidators:["disabled","readOnly"]})}_getEmptyCell(){return{caption:"",colspan:1,rowspan:1}}_updateColumnWidth(e,t){e.width=t}_getColumns(e){let t=[],n,o,s=this._columnsController,r=s.getRowCount();for(n=0;n<=r;n++){let a=[];o=s.getVisibleColumns(n,!0);let l;if(n===r)if(this._updateLockCount)l=e;else{let d=this._getColumnWidths(this._headersView,this._rowsView);if(d&&d.length){l={};for(let c=0;c<o.length;c++)l[o[c].index]=d[c]}}for(let d=0;d<o.length;d++){let c=m({},o[d],{dataType:o[d].dataType==="datetime"?"date":o[d].dataType,gridColumn:o[d]});if(this._needColumnExporting(c)){let h=this._calculateExportColspan(c);f(h)&&(c.exportColspan=h),l&&this._updateColumnWidth(c,l[c.index]),a.push(c)}}t.push(a)}return o=t[r],t=w1(t.slice(0,-1),this._getEmptyCell()),t.push(o),t}_calculateExportColspan(e){if(!e.isBand)return;let t=this._columnsController.getChildrenByBandColumn(e.index,!0);if(f(t))return t.reduce((n,o)=>this._needColumnExporting(o)?n+(this._calculateExportColspan(o)||1):n,0)}_needColumnExporting(e){return!e.command&&(e.allowExporting||e.allowExporting===void 0)}_getFooterSummaryItems(e,t){let n=[],o=1,s=0;do{let r=[];for(let a=0;a<e.length;a++){let l=e[a],d=l.length;o<d&&(o=d),r.push(l[s])}n.push({values:r,rowType:t?"totalFooter":"groupFooter"})}while(s++<o-1);return n}_hasSummaryGroupFooters(){let e=this.option("summary.groupItems");if(f(e)){for(let t=0;t<e.length;t++)if(e[t].showInGroupFooter)return!0}return!1}_getItemsWithSummaryGroupFooters(e){let t=[],n=[],o=[];for(let s=0;s<e.length;s++){let r=e[s];r.rowType==="groupFooter"?(o=this._getFooterSummaryItems(r.summaryCells),t=t.concat(n,o),n=[]):n.push(r)}return t.length?t:n}_updateGroupValuesWithSummaryByColumn(e){let t=[];for(let n=0;n<e.length;n++){let o=e[n],{summaryCells:s}=o;if(o.rowType==="group"&&s&&s.length>1){let r=o.values.length;for(let a=1;a<s.length;a++)for(let l=0;l<s[a].length;l++){let d=s[a][l];d&&d.alignByColumn&&(Array.isArray(t[a-r])||(t[a-r]=[]),t[a-r].push(d))}t.length>0&&(o.values.push(...t),t=[])}}}_processUnExportedItems(e){let t=this._columnsController.getVisibleColumns(null,!0),n=this._columnsController.getGroupColumns(),o,s;for(let r=0;r<e.length;r++){let a=e[r],l=!1;o=[],s=[];for(let d=0;d<t.length;d++){let c=t[d];if(l||(l=["detailExpand","buttons"].includes(c.type)),this._needColumnExporting(c)&&(a.values&&(a.rowType==="group"&&!o.length?o.push(a.key[a.groupIndex]):o.push(a.values[d])),a.summaryCells))if(a.rowType==="group"&&!s.length){let h=d-n.length+a.groupIndex;s.push(a.summaryCells[l?h:h+1])}else s.push(a.summaryCells[d])}o.length&&(a.values=o),s.length&&(a.summaryCells=s)}}_getAllItems(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this,o=new y,s=this._dataController.footerItems(),r=s.length&&s[0],a=n.option("summary.totalItems"),l;return P(e).done(d=>{this._dataController.loadAll(d,t).done((c,h)=>{n._updateGroupValuesWithSummaryByColumn(c),n._hasSummaryGroupFooters()&&(c=n._getItemsWithSummaryGroupFooters(c)),l=r&&r.summaryCells,f(h)&&a&&(l=n._getSummaryCells(a,h));let p=r&&n._getFooterSummaryItems(l,!0);p&&(c=c.concat(p)),n._processUnExportedItems(c),o.resolve(c)}).fail(o.reject)}).fail(o.reject),o}_getSummaryCells(e,t){return this._dataController._calculateSummaryCells(e,t,this._columnsController.getVisibleColumns(null,!0),(n,o)=>this._dataController._isDataColumn(o)?o.index:-1)}_getSelectedItems(){return this.needLoadItemsOnExportingSelectedItems()?this._getAllItems(this._selectionController.loadSelectedItemsWithFilter(),!0):this._getAllItems(this._selectionController.getSelectedRowsData())}_getColumnWidths(e,t){return e&&e.isVisible()?e.getColumnWidths():t.getColumnWidths()}throwWarningIfNoOnExportingEvent(){var e,t;let n=(e=(t=this.component).hasActionSubscription)===null||e===void 0?void 0:e.call(t,"onExporting");this.option("export.enabled")&&!n&&ie.log("W1024")}callbackNames(){return["selectionOnlyChanged"]}getDataProvider(e){let t=this._getColumnWidths(this._headersView,this._rowsView),n;if(t&&t.length){n={};let o=this._columnsController.getVisibleColumns(this._columnsController.getRowCount(),!0);for(let s=0;s<o.length;s++)n[o[s].index]=t[s]}return new EE(this,n,e)}exportTo(e,t){this._selectionOnly=e;let n=this.getAction("onExporting"),o={rtlEnabled:this.option("rtlEnabled"),selectedRowsOnly:!!e,format:t,fileName:"DataGrid",cancel:!1};A(n)&&n(o)}publicMethods(){return["getDataProvider"]}selectionOnly(e){if(f(e))this._isSelectedRows=e,this.selectionOnlyChanged.fire();else return this._isSelectedRows}optionChanged(e){super.optionChanged(e),e.name==="export"&&this.throwWarningIfNoOnExportingEvent()}needLoadItemsOnExportingSelectedItems(){return this.option("loadItemsOnExportingSelectedItems")??this._dataController._dataSource.remoteOperations().filtering}},K7=i=>class extends i{callbackNames(){let e=super.callbackNames();return f(e)?e.push("editingButtonsUpdated"):["editingButtonsUpdated"]}_updateEditButtons(){super._updateEditButtons(),this.editingButtonsUpdated.fire()}},U7=i=>class extends i{_getToolbarItems(){let e=super._getToolbarItems(),t=this._getExportToolbarButton();return t&&(e.push(t),this._correctItemsPosition(e)),e}_getExportToolbarButton(){let e=this._getExportToolbarItems();if(e.length===0)return null;let t=this._needDisableExportButton(),n={name:"exportButton",location:"after",locateInMenu:"auto",sortIndex:30,options:{items:e},disabled:t};if(e.length===1){let o=I({},e[0],{hint:e[0].text,elementAttr:{class:"dx-datagrid-export-button"}});n.widget="dxButton",n.showText="inMenu",n.options=o}else{let o={icon:"export",displayExpr:"text",items:e,hint:this.option("export.texts.exportTo"),elementAttr:{class:"dx-datagrid-export-button"},dropDownOptions:{width:"auto",_wrapperClassExternal:"dx-datagrid-export-menu"}};n.options=o,n.widget="dxDropDownButton",n.menuItemTemplate=(s,r,a)=>{this._createComponent(u(a),ys,{items:e})}}return n}_getExportToolbarItems(){let e=this.option("export"),t=this.option("export.texts"),n=this.option("export.formats")??[];if(!e.enabled)return[];let o=[];return n.forEach(s=>{let r=s.toUpperCase(),a="export";s==="xlsx"&&(r="Excel",a="xlsxfile"),s==="pdf"&&(a="pdffile"),o.push({text:Gi(t.exportAll,r),icon:a,onClick:()=>{this._exportController.exportTo(!1,s)}}),e.allowExportSelectedData&&o.push({text:Gi(t.exportSelectedRows,r),icon:"exportselected",onClick:()=>{this._exportController.exportTo(!0,s)}})}),o}_correctItemsPosition(e){e.sort((t,n)=>t.sortIndex-n.sortIndex)}_isExportButtonVisible(){return this.option("export.enabled")}optionChanged(e){super.optionChanged(e),e.name==="export"&&(e.handled=!0,this._invalidate())}_needDisableExportButton(){let e=!this._columnsController.hasVisibleDataColumns(),t=this._editingController.hasChanges();return e||t}_columnOptionChanged(e){if(super._columnOptionChanged(e),$.checkChanges(e.optionNames,["groupIndex","visible","all"])){let n=this._needDisableExportButton();this.setToolbarItemDisabled("exportButton",n)}}init(){super.init(),this._exportController=this.getController("export"),this._editingController.editingButtonsUpdated.add(()=>{let e=this._needDisableExportButton();this.setToolbarItemDisabled("exportButton",e)})}};$.registerModule("export",{defaultOptions:()=>({export:{enabled:!1,fileName:"DataGrid",formats:["xlsx"],allowExportSelectedData:!1,texts:{exportTo:O.format("dxDataGrid-exportTo"),exportAll:O.format("dxDataGrid-exportAll"),exportSelectedRows:O.format("dxDataGrid-exportSelectedRows")}}}),controllers:{export:wE},extenders:{controllers:{editing:K7},views:{headerPanel:U7}}});var q7=(i,e,t)=>{let{isRemoteFiltering:n,dateSerializationFormat:o,getSelector:s}=t,{selector:r}=i,a=A(r)?r:s(r),l=a?a(e):e[r],d=n&&Vt(l)?ut.serializeDate(l,o):l;return{getter:a,rawValue:l,safeValue:d}},S1={getSortFilterValue:q7};var Y7=".dx-row.dx-row-focused";var SE=class extends ye.ViewController{getKeyboardController(){return this.getController("keyboardNavigation")}getDataController(){return this.getController("data")}init(){this.component._optionsByReference.focusedRowKey=!0}optionChanged(e){let{name:t,value:n,previousValue:o}=e;switch(t){case"focusedRowIndex":this._focusRowByIndex(n),this.getKeyboardController()._fireFocusedRowChanged(),e.handled=!0;break;case"focusedRowKey":if(Array.isArray(n)&&JSON.stringify(n)===JSON.stringify(o))return;this._focusRowByKey(n),this.getKeyboardController()._fireFocusedRowChanged(),e.handled=!0;break;case"focusedColumnIndex":case"focusedRowEnabled":case"autoNavigateToFocusedRow":e.handled=!0;break;default:super.optionChanged(e)}}publicMethods(){return["navigateToRow","isRowFocused"]}isAutoNavigateToFocusedRow(){return this.option("scrolling.mode")!=="infinite"&&this.option("autoNavigateToFocusedRow")}_focusRowByIndex(e,t){if(!this.option("focusedRowEnabled"))return;let n=this.getDataController().isEmpty(),o=this._getCurrentFocusRowIndex(n,e);o<0?(n||this.isAutoNavigateToFocusedRow())&&this._resetFocusedRow():this._focusRowByIndexCore(o,t)}_getCurrentFocusRowIndex(e,t){let n=t;return n===void 0&&(e?n=-1:n=this.option("focusedRowIndex")),n}_focusRowByIndexCore(e,t){let n=this.getDataController().pageSize(),o=()=>{if(this._isValidFocusedRowIndex(e)){let s=e-this.getDataController().getRowIndexOffset(!0);if(!t||t.paging&&!t.filtering){let a=this.getDataController()._getLastItemIndex();s=Math.min(s,a)}let r=this.getDataController().getKeyByRowIndex(s,!0);f(r)&&!this.isRowFocused(r)&&this.option("focusedRowKey",r)}};if(n>=0)if(this._isLocalRowIndex(e))o();else{let s=Math.floor(e/this.getDataController().pageSize());P(this.getDataController().pageIndex(s),this.getDataController().waitReady()).done(()=>{o()})}}_isLocalRowIndex(e){if(this.getKeyboardController()._isVirtualScrolling()){let n=Math.floor(e/this.getDataController().pageSize()),o=this.getDataController().virtualItemsCount(),s=o?o.begin:-1,r=this.getDataController().getVisibleRows().length+this.getDataController().getRowIndexOffset(),a=Math.ceil(r/this.getDataController().pageSize());return s<=e&&a>n}return!0}_setFocusedRowKeyByIndex(e){if(this._isValidFocusedRowIndex(e)){let t=Math.min(e-this.getDataController().getRowIndexOffset(),this.getDataController().items().length-1),n=this.getDataController().getKeyByRowIndex(t);f(n)&&!this.isRowFocused(n)&&this.option("focusedRowKey",n)}}_focusRowByKey(e){f(e)?this._navigateToRow(e,!0):this._resetFocusedRow()}_resetFocusedRow(){let e=this.option("focusedRowKey"),t=f(e);!t&&this.option("focusedRowIndex")<0||(t&&this.option("focusedRowKey",null),this.getKeyboardController().setFocusedRowIndex(-1),this.option("focusedRowIndex",-1),this.getDataController().updateItems({changeType:"updateFocusedRow",focusedRowKey:null}),this.getKeyboardController()._fireFocusedRowChanged())}_isValidFocusedRowIndex(e){let t=this.getDataController().getVisibleRows()[e];return!t||t.rowType==="data"||t.rowType==="group"}navigateToRow(e){return this.isAutoNavigateToFocusedRow()||this.option("focusedRowIndex",-1),this._navigateToRow(e)}_navigateToRow(e,t){let n=this,o=n.isAutoNavigateToFocusedRow(),s=new y;if(e===void 0||!this.getDataController().dataSource())return s.reject().promise();let r=n.getFocusedRowIndexByKey(e);return!o&&t||r>=0?n._navigateTo(e,s,t):this.getDataController().getPageIndexByKey(e).done(a=>{if(a<0){s.resolve(-1);return}a===this.getDataController().pageIndex()?this.getDataController().reload().done(()=>{n.isRowFocused(e)&&this.getDataController().getRowIndexByKey(e)>=0?s.resolve(n.getFocusedRowIndexByKey(e)):n._navigateTo(e,s,t)}).fail(s.reject):this.getDataController().pageIndex(a).done(()=>{n._navigateTo(e,s,t)}).fail(s.reject)}).fail(s.reject),s.promise()}_navigateTo(e,t,n){let o=this.getDataController().getRowIndexByKey(e),s=R.isVirtualRowRendering(this);this.isAutoNavigateToFocusedRow()&&s&&o<0?this._navigateToVirtualRow(e,t,n):this._navigateToVisibleRow(e,t,n)}_navigateToVisibleRow(e,t,n){if(n)this._triggerUpdateFocusedRow(e,t);else{let o=this.getFocusedRowIndexByKey(e);this.getView("rowsView").scrollToRowElement(e,t).done(()=>{t.resolve(o)})}}_navigateToVirtualRow(e,t,n){let o=this.getDataController()._rowsScrollController,s=R.getIndexByKey(e,this.getDataController().items(!0)),r=this.getView("rowsView").getScrollable();if(o&&r&&s>=0){let a=s+this.getDataController().getRowIndexOffset(!0),l=o.getItemOffset(a),d=()=>{this.getDataController().totalCount()&&!this.getDataController().items().length||(this.component.off("contentReady",d),n?this._triggerUpdateFocusedRow(e,t):t.resolve(a))};this.component.on("contentReady",d),this.getView("rowsView").scrollTopPosition(l)}else t.resolve(-1)}_triggerUpdateFocusedRow(e,t){let n=this.getFocusedRowIndexByKey(e);if(this._isValidFocusedRowIndex(n)){let o;this.option("focusedRowEnabled")?this.getDataController().updateItems({changeType:"updateFocusedRow",focusedRowKey:e}):o=this.getView("rowsView").scrollToRowElement(e),P(o).done(()=>{this.getKeyboardController().setFocusedRowIndex(n),t&&t.resolve(n)})}else t&&t.resolve(-1)}getFocusedRowIndexByKey(e){let t=this.getDataController().getRowIndexByKey(e,!0);return t>=0?t+this.getDataController().getRowIndexOffset(!0):-1}_focusRowByKeyOrIndex(){let e=this.option("focusedRowKey"),t=this.option("focusedRowIndex");if(f(e)){let n=this.getDataController().getRowIndexByKey(e);n>=0?(this.getKeyboardController()._isVirtualScrolling()&&(t=n+this.getDataController().getRowIndexOffset()),this.getKeyboardController().setFocusedRowIndex(t),this._triggerUpdateFocusedRow(e)):this._navigateToRow(e,!0).done(o=>{t>=0&&o<0?this._focusRowByIndex():t<0&&o>=0&&this.getKeyboardController().setFocusedRowIndex(o)})}else t>=0&&this._focusRowByIndex(t)}isRowFocused(e){let t=this.option("focusedRowKey");if(f(t))return Ee(e,this.option("focusedRowKey"))}updateFocusedRow(e){let t=this,n=t.getDataController().getRowIndexByKey(e.focusedRowKey),o=t.getView("rowsView"),s,r;x(o.getTableElements(),(a,l)=>{let d=a===0;s=u(l),t._clearPreviousFocusedRow(s,n);let c=t._prepareFocusedRow({changedItem:t.getDataController().getVisibleRows()[n],$tableElement:s,focusedRowIndex:n});d&&(r=c)}),!e.preventScroll&&r&&o.scrollToElementVertically(r)}_clearPreviousFocusedRow(e,t){let n=e.find(Y7).filter((o,s)=>{let r=u(s).closest(`.${this.addWidgetPrefix("table")}`);return e.is(r)});n.removeClass("dx-row-focused").removeClass("dx-cell-focus-disabled").removeAttr("tabindex"),n.children("td").removeAttr("tabindex"),t!==0&&u(this.getView("rowsView").getRowElement(0)).removeClass("dx-cell-focus-disabled").removeAttr("tabIndex")}_prepareFocusedRow(e){let t,{changedItem:n}=e;if(n&&(n.rowType==="data"||n.rowType==="group")){let{focusedRowIndex:o}=e,{$tableElement:s}=e,r=this.option("tabindex")||0,a=this.getView("rowsView");t=u(a._getRowElements(s).eq(o)),t.addClass("dx-row-focused").attr("tabindex",r)}return t}},X7=i=>class extends i{init(){let e=this.option("focusedRowIndex"),t=this.option("focusedColumnIndex");this.createAction("onFocusedRowChanging",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedRowChanged",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedCellChanging",{excludeValidators:["disabled","readOnly"]}),this.createAction("onFocusedCellChanged",{excludeValidators:["disabled","readOnly"]}),super.init(),this.setRowFocusType(),this._focusedCellPosition={},f(e)&&e>=0&&(this._focusedCellPosition.rowIndex=e),f(t)&&t>=0&&(this._focusedCellPosition.columnIndex=t)}setFocusedRowIndex(e){super.setFocusedRowIndex(e),this.option("focusedRowIndex",e)}setFocusedColumnIndex(e){super.setFocusedColumnIndex(e),this.option("focusedColumnIndex",e)}_escapeKeyHandler(e,t){return t||!this.option("focusedRowEnabled")?super._escapeKeyHandler(e,t):this.isCellFocusType()?(this.setRowFocusType(),this._focus(this._getCellElementFromTarget(e.originalEvent.target),!0),!0):!1}_updateFocusedCellPosition(e,t){let n=super._updateFocusedCellPosition(e,t);return n&&n.columnIndex>=0&&this._fireFocusedCellChanged(e),n}},Q7=i=>class extends i{renderFocusOverlay(e,t){var n;let o=this.option("focusedRowEnabled"),s;!o||!((n=this._keyboardNavigationController)!==null&&n!==void 0&&n.isRowFocusType())||this._editingController.isEditing()?super.renderFocusOverlay(e,t):o&&this._keyboardNavigationController._getElementType(e)==="row"&&!e.hasClass("dx-row-focused")&&(s=this._keyboardNavigationController.getFirstValidCellInRow(e),this._keyboardNavigationController.focus(s))}},Z7=i=>class extends i{getSortDataSourceParameters(e,t){let n=super.getSortDataSourceParameters.apply(this,arguments),o=this._dataController._dataSource,s=this._dataController.store(),r=s&&s.key(),a=o&&o.remoteOperations()||{},l=Object.keys(a).every(d=>!a[d]);if(r&&(this.option("focusedRowEnabled")&&this._focusController.isAutoNavigateToFocusedRow()!==!1||t)){r=Array.isArray(r)?r:[r];let d=r.filter(c=>!this.columnOption(c,"sortOrder"));d.length&&(n=n||[],l?n.push({selector:o.getDataIndexGetter(),desc:!1}):d.forEach(c=>n.push({selector:c,desc:!1})))}return n}},J7=i=>class extends i{constructor(){super(...arguments),this._needToUpdateFocusedRowByIndex=!1}_applyChange(e){if(!(e&&e.changeType==="updateFocusedRow"))return super._applyChange.apply(this,arguments)}_fireChanged(e){if(super._fireChanged(e),this.option("focusedRowEnabled")&&this._dataSource){let n=e.changeType==="update"&&e.repaintChangesOnly&&e.changeTypes&&e.changeTypes.indexOf("remove")>=0;this._needToUpdateFocusedRowByIndex?(this._needToUpdateFocusedRowByIndex=!1,this._focusController._focusRowByIndex()):e.changeType==="refresh"&&e.items.length||n?(this._updatePageIndexes(),this._updateFocusedRow(e)):e.changeType==="append"||e.changeType==="prepend"?this._updatePageIndexes():e.changeType==="update"&&e.repaintChangesOnly&&this._updateFocusedRow(e)}}_handleDataPushed(e){super._handleDataPushed(e);let t=this.option("focusedRowKey");this._needToUpdateFocusedRowByIndex=e?.some(n=>n.type==="remove"&&Ee(n.key,t))}_updatePageIndexes(){let e=this._lastRenderingPageIndex||0,t=this._rowsScrollController?this._rowsScrollController.pageIndex():0;this._lastRenderingPageIndex=t,this._isPagingByRendering=t!==e}isPagingByRendering(){return this._isPagingByRendering}_updateFocusedRow(e){let t=e.operationTypes||{},{reload:n,fullReload:o,pageIndex:s,paging:r}=t,a=this._keyboardNavigationController._isVirtualScrolling(),l=r&&!a,d=this.option("focusedRowKey"),c=this._focusController.isAutoNavigateToFocusedRow();if(n&&s===!1&&!o&&f(d))this._focusController._navigateToRow(d,!0).done(p=>{p<0&&this._focusController._focusRowByIndex(void 0,t)});else if(l&&c){let p=this.getRowIndexByKey(d),g=this.option("focusedRowIndex"),C=p>=0;g>=0&&(g===p||!C)&&this._focusController._focusRowByIndex(g,t)}else l&&!c&&this.getRowIndexByKey(d)<0?this.option("focusedRowIndex",-1):t.fullReload&&this._focusController._focusRowByKeyOrIndex()}getPageIndexByKey(e){let t=this,n=new y;return t.getGlobalRowIndexByKey(e).done(o=>{n.resolve(o>=0?Math.floor(o/t.pageSize()):-1)}).fail(n.reject),n.promise()}getGlobalRowIndexByKey(e){return this._dataSource.group()?this._calculateGlobalRowIndexByGroupedData(e):this._calculateGlobalRowIndexByFlatData(e)}_calculateGlobalRowIndexByFlatData(e,t,n){let o=this,s=new y,r=o._dataSource;if(Array.isArray(e)||HV(e))return s.resolve(-1).promise();let a=o._generateFilterByKey(e);return r.load({filter:o._concatWithCombinedFilter(a),skip:0,take:1}).done(l=>{l.length>0?(a=o._generateOperationFilterByKey(e,l[0],n),r.load({filter:o._concatWithCombinedFilter(a,t),skip:0,take:1,requireTotalCount:!0}).done((d,c)=>{s.resolve(c.totalCount)})):s.resolve(-1)}),s.promise()}_concatWithCombinedFilter(e,t){let n=this.getCombinedFilter();return R.combineFilters([e,n,t])}_generateBooleanFilter(e,t,n){let{desc:o}=n;switch(!0){case(t===!1&&o):return[e,"=",!0];case(t===!1&&!o):return[e,"=",null];case(t===!0&&!o):case(!yr(t)&&o):return[e,"<>",t];default:return}}_generateOperationFilterByKey(e,t,n){let o=this,s=o.option("dateSerializationFormat"),r=o._dataSource.remoteOperations().filtering,a=o._dataSource.remoteOperations().sorting,l=o._generateFilterByKey(e,"<"),d=o._columnsController.getSortDataSourceParameters(!r,!0);if(n){let c=o._columnsController.getGroupDataSourceParameters(!r);c&&(d=d?c.concat(d):c)}return d&&d.slice().reverse().forEach(c=>{let{selector:h,desc:p,compare:g}=c,{getter:C,rawValue:v,safeValue:b}=S1.getSortFilterValue(c,t,{isRemoteFiltering:r,dateSerializationFormat:s,getSelector:T=>o._columnsController.columnOption(T,"selector")});if(l=[[h,"=",b],"and",l],v===null||yr(v)){let T=o._generateBooleanFilter(h,b,p);T&&(l=[T,"or",l])}else{let T=p?">":"<",M;g&&!a?M=G=>T==="<"?g(v,C(G))>=1:g(v,C(G))<=-1:(M=[h,T,b],p||(M=[M,"or",[h,"=",null]])),l=[M,"or",l]}}),l}_generateFilterByKey(e,t){let n=this._dataSource.key(),o=[];if(t||(t="="),Array.isArray(n))for(let s=0;s<n.length;++s){let r=e[n[s]];r&&(o.length>0&&o.push("and"),o.push([n[s],t,r]))}else o=[n,t,e];return o}_getLastItemIndex(){return this.items(!0).length-1}},eJ=i=>class extends i{_deleteRowCore(e){let t=super._deleteRowCore.apply(this,arguments),n=this._dataController.getKeyByRowIndex(e);t.done(()=>{let o=this._dataController.getRowIndexByKey(n),s=this._dataController.getVisibleRows();o===-1&&!s.length&&this._focusController._resetFocusedRow()})}},tJ=i=>class extends i{_createRow(e){let t=super._createRow.apply(this,arguments);return this.option("focusedRowEnabled")&&e&&this._focusController.isRowFocused(e.key)&&t.addClass("dx-row-focused"),t}_checkRowKeys(e){if(super._checkRowKeys.apply(this,arguments),this.option("focusedRowEnabled")&&this.option("dataSource")){let t=this._dataController.store();t&&!t.key()&&this._dataController.fireError("E1042","Row focusing")}}_update(e){e.changeType==="updateFocusedRow"?this.option("focusedRowEnabled")&&this._focusController.updateFocusedRow(e):super._update(e)}updateFocusElementTabIndex(e,t){this.option("focusedRowEnabled")?this._setFocusedRowElementTabIndex(t):super.updateFocusElementTabIndex(e)}_setFocusedRowElementTabIndex(e){let t=this.option("focusedRowKey"),n=this.option("tabIndex")??0,o=this._columnsController,s=this._dataController.getRowIndexByKey(t),r=this.option("focusedColumnIndex"),a=this._findRowElementForTabIndex(),l=this._dataController.dataSource(),d=l?.operationTypes(),c=!d||d.paging;f(this._scrollToFocusOnResize)||(this._scrollToFocusOnResize=()=>{this.scrollToElementVertically(this._findRowElementForTabIndex()),this.resizeCompleted.remove(this._scrollToFocusOnResize)}),a.attr("tabIndex",n);let h=this.option("focusedRowIndex")-this._dataController.getRowIndexOffset(!0);!c&&s<0&&h>=0&&this._focusController.updateFocusedRow({focusedRowKey:t,preventScroll:e}),s>=0&&!e&&(r<0&&(r=0),s+=this._dataController.getRowIndexOffset(),r+=o.getColumnIndexOffset(),this._keyboardNavigationController.setFocusedCellPosition(s,r),this._focusController.isAutoNavigateToFocusedRow()&&!c&&!this._dataController.isPagingByRendering()&&(this.resizeCompleted.remove(this._scrollToFocusOnResize),this.resizeCompleted.add(this._scrollToFocusOnResize)))}_findRowElementForTabIndex(){let e=this.option("focusedRowKey"),t=this._dataController.getRowIndexByKey(e);return u(this.getRowElement(t>=0?t:0))}scrollToRowElement(e){let t=this._dataController.getRowIndexByKey(e),n=u(this.getRow(t));return this.scrollToElementVertically(n)}scrollToElementVertically(e){let t=this.getScrollable();if(t&&e.length){let n=t.getScrollElementPosition(e,"vertical");return this.scrollTopPosition(n)}return new y().resolve()}scrollTopPosition(e){let t=new y,n=this.getScrollable();if(n){let o=n.scrollTop(),s=()=>{n.off("scroll",s),t.resolve()};if(e!==o)return n.on("scroll",s),this._dataController.resetFilterApplying(),n.scrollTo({top:e}),t.promise()}return t.resolve()}},ph={defaultOptions:()=>({focusedRowEnabled:!1,autoNavigateToFocusedRow:!0,focusedRowKey:null,focusedRowIndex:-1,focusedColumnIndex:-1}),controllers:{focus:SE},extenders:{controllers:{keyboardNavigation:X7,editorFactory:Q7,columns:Z7,data:J7,editing:eJ},views:{rowsView:tJ}}};var iJ=Number.MAX_SAFE_INTEGER||9007199254740991,nJ=i=>class extends ph.extenders.controllers.data(i){changeRowExpand(e,t){return this.option("focusedRowEnabled")&&Array.isArray(e)&&this.isRowExpanded(e)&&(!t||!this._keyboardNavigationController.isKeyboardEnabled())&&this._isFocusedRowInsideGroup(e)&&this.option("focusedRowKey",e),super.changeRowExpand(e,t)}_isFocusedRowInsideGroup(e){let t=this.option("focusedRowKey"),n=this.getRowIndexByKey(t),o=n>=0&&this.getVisibleRows()[n],s=this._columnsController.getGroupDataSourceParameters(!0);if(o){for(let r=0;r<e.length;++r)if(Ce(s[r]&&s[r].selector)(o.data)!==e[r])return!1}return!0}_getGroupPath(e,t){let n=[],o=[e];for(;o&&o[0]&&t;){let s=o[0];s.key!==void 0&&n.push(s.key),o=s.items,t--}return n}_expandGroupByPath(e,t,n){let o=new y;return n++,e.expandRow(t.slice(0,n)).done(()=>{n===t.length?o.resolve():e._expandGroupByPath(e,t,n).done(o.resolve).fail(o.reject)}).fail(o.reject),o.promise()}_calculateGlobalRowIndexByGroupedData(e){let t=this,n=t._dataSource,o=t._generateFilterByKey(e),s=new y,r=Array.isArray(e),a=n.group();return r?s.resolve(-1).promise():n._grouping._updatePagingOptions?(n.load({filter:t._concatWithCombinedFilter(o),group:a}).done(l=>{if(!l||l.length===0||!f(l[0].key)||l[0].key===-1)return s.resolve(-1).promise();let d=t._getGroupPath(l[0],a.length);t._expandGroupByPath(t,d,0).done(()=>{t._calculateExpandedRowGlobalIndex(s,e,d,a)}).fail(s.reject)}).fail(s.reject),s.promise()):(t._calculateGlobalRowIndexByFlatData(e,null,!0).done(s.resolve).fail(s.reject),s)}_calculateExpandedRowGlobalIndex(e,t,n,o){let s=bs(n,{group:o}),r=this._dataSource,a=this.option("scrolling.mode"),l=a==="virtual"||a==="infinite",d=r.pageSize(),c;r._grouping._updatePagingOptions({skip:0,take:iJ},(h,p)=>{Ee(h.path,n)&&(c=p)}),this._calculateGlobalRowIndexByFlatData(t,s).done(h=>{let p,g;if(h<0){e.resolve(-1);return}p=(c%d||d)+h-n.length,l?g=0:g=Math.floor(p/(d-n.length))*n.length,p=c+h+g,e.resolve(p)}).fail(e.reject)}};$.registerModule("focus",I({},ph,{extenders:I({},ph.extenders,{controllers:I({},ph.extenders.controllers,{data:nJ})})}));var I1=q();var Ms="dxDraggable",oJ=D(js,Ms),sJ=D(Po,Ms),rJ=D(Ks,Ms),aJ=D($c,Ms),lJ=D(zc,Ms),dJ=D(le.down,Ms),cJ=D("keydown",Ms);var IE,Qf;var DE=i=>({x:i.pageX-u(I1).scrollLeft(),y:i.pageY-u(I1).scrollTop()});var Zf=class{constructor(e,t){this._$scrollableAtPointer=null,this._preventScroll=!0,this._component=t,e==="vertical"?(this._scrollValue="scrollTop",this._overFlowAttr="overflowY",this._sizeAttr="height",this._scrollSizeProp="scrollHeight",this._clientSizeProp="clientHeight",this._limitProps={start:"top",end:"bottom"}):(this._scrollValue="scrollLeft",this._overFlowAttr="overflowX",this._sizeAttr="width",this._scrollSizeProp="scrollWidth",this._clientSizeProp="clientWidth",this._limitProps={start:"left",end:"right"})}updateScrollable(e,t){let n=!1;e.some(o=>{let s=u(o),r=s.hasClass("dx-overlay-wrapper"),a=s.hasClass("dx-overlay-content");return r||a?!0:(n=this._trySetScrollable(o,t),n)}),n||(this._$scrollableAtPointer=null,this._scrollSpeed=0)}isScrolling(){return!!this._scrollSpeed}isScrollable(e){return(e.css(this._overFlowAttr)==="auto"||e.hasClass("dx-scrollable-container"))&&e.prop(this._scrollSizeProp)>Math.ceil(this._sizeAttr==="width"?W(e):Q(e))}_trySetScrollable(e,t){let n=this,o=u(e),s,r=n._component.option("scrollSensitivity"),a=n.isScrollable(o);return a&&(s=n._calculateDistanceToBorders(o,t),r>s[n._limitProps.start]?n._preventScroll||(n._scrollSpeed=-n._calculateScrollSpeed(s[n._limitProps.start]),n._$scrollableAtPointer=o):r>s[n._limitProps.end]?n._preventScroll||(n._scrollSpeed=n._calculateScrollSpeed(s[n._limitProps.end]),n._$scrollableAtPointer=o):(a=!1,n._preventScroll=!1)),a}_calculateDistanceToBorders(e,t){let n=e.get(0),o;return n?(o=Pe(n),{left:t.x-o.left,top:t.y-o.top,right:o.right-t.x,bottom:o.bottom-t.y}):{}}_calculateScrollSpeed(e){let t=this._component,n=t.option("scrollSensitivity"),o=t.option("scrollSpeed");return Math.ceil(((n-e)/n)**2*o)}scrollByStep(){let e=this;if(e._$scrollableAtPointer&&e._scrollSpeed){if(e._$scrollableAtPointer.hasClass("dx-scrollable-container")){let n=e._$scrollableAtPointer.closest(".dx-scrollable"),o=n.data("dxScrollable")||n.data("dxScrollView");if(o){let s=o.scrollOffset()[e._limitProps.start]+e._scrollSpeed;o.scrollTo({[e._limitProps.start]:s})}}else{let n=e._$scrollableAtPointer[e._scrollValue]()+e._scrollSpeed;e._$scrollableAtPointer[e._scrollValue](n)}let t=e._component._dragMoveArgs;t&&e._component._dragMoveHandler(t)}}reset(){this._$scrollableAtPointer=null,this._scrollSpeed=0,this._preventScroll=!0}isOutsideScrollable(e,t){if(!e)return!1;let n=Pe(e.get(0)),o=n[this._limitProps.start],s=n[this._sizeAttr],r=DE(t),a=this._sizeAttr==="width"?r.x:r.y;return a<o||a>o+s}},uJ=ng.inherit({ctor(i){this.callBase(),this._strategy=i},_step(){let i=this._strategy._horizontalScrollHelper,e=this._strategy._verticalScrollHelper;i&&i.scrollByStep(),e&&e.scrollByStep()}}),D1=pn.inherit({reset:E,dragMove:E,dragEnter:E,dragLeave:E,dragEnd(i){return this._getSourceDraggable()._fireRemoveEvent(i),y().resolve()},_fireRemoveEvent:E,_getDefaultOptions(){return m(this.callBase(),{onDragStart:null,onDragMove:null,onDragEnd:null,onDragEnter:null,onDragLeave:null,onDragCancel:null,onCancelByEsc:!1,onDrop:null,immediate:!0,dragDirection:"both",boundary:void 0,boundOffset:0,allowMoveByClick:!1,itemData:null,container:void 0,dragTemplate:void 0,contentTemplate:"content",handle:"",filter:"",clone:!1,autoScroll:!0,scrollSpeed:30,scrollSensitivity:60,group:void 0,data:void 0})},_setOptionsByReference(){this.callBase.apply(this,arguments),m(this._optionsByReference,{component:!0,group:!0,itemData:!0,data:!0})},_init(){this.callBase(),this._attachEventHandlers(),this._scrollAnimator=new uJ(this),this._horizontalScrollHelper=new Zf("horizontal",this),this._verticalScrollHelper=new Zf("vertical",this),this._initScrollTop=0,this._initScrollLeft=0},_normalizeCursorOffset(i){return z(i)&&(i={h:i.x,v:i.y}),i=es(i).map(e=>parseFloat(e)),{left:i[0],top:i.length===1?i[0]:i[1]}},_getNormalizedCursorOffset(i,e){return A(i)&&(i=i.call(this,e)),this._normalizeCursorOffset(i)},_calculateElementOffset(i){let e,t,{event:n}=i,o=u(i.itemElement),s=u(i.dragElement),r=this._dragElementIsCloned(),a=this.option("cursorOffset"),l={left:0,top:0},d=this._initialLocate=Ti(s);return(r||i.initialOffset||a)&&(e=i.initialOffset||o.offset(),a&&(l=this._getNormalizedCursorOffset(a,i),isFinite(l.left)&&(e.left=n.pageX),isFinite(l.top)&&(e.top=n.pageY)),t=s.offset(),e.top-=t.top+(l.top||0)-d.top,e.left-=t.left+(l.left||0)-d.left),e},_initPosition(i){let e=u(i.dragElement),t=this._calculateElementOffset(i);t&&this._move(t,e),this._startPosition=Ti(e)},_startAnimator(){this._scrollAnimator.inProgress()||this._scrollAnimator.start()},_stopAnimator(){this._scrollAnimator.stop()},_addWidgetPrefix(i){let e=this.NAME;return uc(e)+(i?`-${i}`:"")},_getItemsSelector(){return this.option("filter")||""},_$content(){let i=this.$element(),e=i.children(".dx-template-wrapper");return e.length?e:i},_attachEventHandlers(){if(this.option("disabled"))return;let i=this._$content(),e=this._getItemsSelector(),t=this.option("allowMoveByClick"),n={direction:this.option("dragDirection"),immediate:this.option("immediate"),checkDropTarget:(o,s)=>{let r=this.option("group"),a=this._getSourceDraggable().option("group"),l=this._getScrollable(o);return this._verticalScrollHelper.isOutsideScrollable(l,s)||this._horizontalScrollHelper.isOutsideScrollable(l,s)?!1:a&&a===r}};t&&(i=this._getArea(),_.on(i,dJ,n,this._pointerDownHandler.bind(this))),e[0]===">"&&(e=e.slice(1)),_.on(i,oJ,e,n,this._dragStartHandler.bind(this)),_.on(i,sJ,n,this._dragMoveHandler.bind(this)),_.on(i,rJ,n,this._dragEndHandler.bind(this)),_.on(i,aJ,n,this._dragEnterHandler.bind(this)),_.on(i,lJ,n,this._dragLeaveHandler.bind(this)),this.option("onCancelByEsc")&&_.on(i,cJ,this._keydownHandler.bind(this))},_dragElementIsCloned(){return this._$dragElement&&this._$dragElement.hasClass(this._addWidgetPrefix("clone"))},_getDragTemplateArgs(i,e){return{container:H(e),model:{itemData:this.option("itemData"),itemElement:H(i)}}},_createDragElement(i){let e=i,t=this.option("clone"),n=this._getContainer(),o=this.option("dragTemplate");return o?(o=this._getTemplate(o),e=u("<div>").appendTo(n),o.render(this._getDragTemplateArgs(i,e))):t&&(e=u("<div>").appendTo(n),i.clone().css({width:i.css("width"),height:i.css("height")}).appendTo(e)),e.toggleClass(this._addWidgetPrefix("clone"),e.get(0)!==i.get(0)).toggleClass("dx-rtl",this.option("rtlEnabled"))},_resetDragElement(){this._dragElementIsCloned()?this._$dragElement.remove():this._toggleDraggingClass(!1),this._$dragElement=null},_resetSourceElement(){this._toggleDragSourceClass(!1),this._$sourceElement=null},_detachEventHandlers(){_.off(this._$content(),`.${Ms}`),_.off(this._getArea(),`.${Ms}`)},_move(i,e){Ve(e||this._$dragElement,i)},_getDraggableElement(i){let e=this._getSourceElement();if(e)return e;if(this.option("allowMoveByClick"))return this.$element();let n=u(i&&i.target),o=this._getItemsSelector();if(o[0]===">"){let s=this._$content().find(o);s.is(n)||(n=n.closest(s))}return n},_getSourceElement(){return this._getSourceDraggable()._$sourceElement},_pointerDownHandler(i){if(Ep(i))return;let e={},t=this.$element(),n=this.option("dragDirection");(n==="horizontal"||n==="both")&&(e.left=i.pageX-t.offset().left+Ti(t).left-W(t)/2),(n==="vertical"||n==="both")&&(e.top=i.pageY-t.offset().top+Ti(t).top-Q(t)/2),this._move(e,t),this._getAction("onDragMove")(this._getEventArgs(i))},_isValidElement(i,e){let t=this.option("handle"),n=u(i.originalEvent&&i.originalEvent.target);return t&&!n.closest(t).length||!e.length?!1:!e.is(".dx-state-disabled, .dx-state-disabled *")},_dragStartHandler(i){let e=this._getDraggableElement(i);if(this.dragInProgress=!0,!this._isValidElement(i,e)){i.cancel=!0;return}if(this._$sourceElement)return;let t=this._getDragStartArgs(i,e);if(this._getAction("onDragStart")(t),t.cancel){i.cancel=!0;return}this.option("itemData",t.itemData),this._setSourceDraggable(),this._$sourceElement=e;let n=e.offset();!this._hasClonedDraggable()&&this.option("autoScroll")&&(this._initScrollTop=this._getScrollableScrollTop(),this._initScrollLeft=this._getScrollableScrollLeft(),n=this._getDraggableElementOffset(n.left,n.top));let o=this._$dragElement=this._createDragElement(e);this._toggleDraggingClass(!0),this._toggleDragSourceClass(!0),this._setGestureCoverCursor(o.children());let s=o.css("position")==="fixed";this._initPosition(m({},t,{dragElement:o.get(0),initialOffset:s&&n})),this._getAction("onDraggableElementShown")(I({},t,{dragElement:o}));let r=this._getArea(),a=this._getAreaOffset(r),l=this._getBoundOffset(),d=ae(r),c=ee(r),h=W(o),p=Q(o),g=o.offset().left-a.left,C=o.offset().top-a.top;r.length&&(i.maxLeftOffset=g-l.left,i.maxRightOffset=d-g-h-l.right,i.maxTopOffset=C-l.top,i.maxBottomOffset=c-C-p-l.bottom),this.option("autoScroll")&&this._startAnimator()},_getAreaOffset(i){return i&&xt.offset(i)||{left:0,top:0}},_toggleDraggingClass(i){this._$dragElement&&this._$dragElement.toggleClass(this._addWidgetPrefix("dragging"),i)},_toggleDragSourceClass(i,e){let t=e||this._$sourceElement;t&&t.toggleClass(this._addWidgetPrefix("source"),i)},_setGestureCoverCursor(i){u(".dx-gesture-cover").css("cursor",i.css("cursor"))},_getBoundOffset(){let i=this.option("boundOffset");return A(i)&&(i=i.call(this)),bw(i)},_getArea(){let i=this.option("boundary");return A(i)&&(i=i.call(this)),u(i)},_getContainer(){let i=this.option("container");return i===void 0&&(i=zn()),u(i)},_getDraggableElementOffset(i,e){var t,n;let o=this._initScrollTop,s=this._initScrollLeft,r=this._getScrollableScrollTop(),a=this._getScrollableScrollLeft(),d=u(this.element()).css("position")==="fixed",c={left:(((t=this._startPosition)===null||t===void 0?void 0:t.left)??0)+i,top:(((n=this._startPosition)===null||n===void 0?void 0:n.top)??0)+e};return d||this._hasClonedDraggable()?c:{left:Oe(a)?c.left+a-s:c.left,top:Oe(r)?c.top+r-o:c.top}},_hasClonedDraggable(){return this.option("clone")||this.option("dragTemplate")},_dragMoveHandler(i){if(this._dragMoveArgs=i,!this._$dragElement){i.cancel=!0;return}let e=this._getDraggableElementOffset(i.offset.x,i.offset.y);this._move(e),this._updateScrollable(i);let t=this._getEventArgs(i);if(this._getAction("onDragMove")(t),t.cancel===!0)return;this._getTargetDraggable().dragMove(i,scrollBy)},_updateScrollable(i){let e=this;if(e.option("autoScroll")){let t=DE(i),n=S.elementsFromPoint(t.x,t.y,this.$element().get(0));e._verticalScrollHelper.updateScrollable(n,t),e._horizontalScrollHelper.updateScrollable(n,t)}},_getScrollable(i){let e;return i.parents().toArray().some(t=>{let n=u(t);return this._horizontalScrollHelper.isScrollable(n)||this._verticalScrollHelper.isScrollable(n)?(e=n,!0):!1}),e},_getScrollableScrollTop(){var i;return((i=this._getScrollable(u(this.element())))===null||i===void 0?void 0:i.scrollTop())??0},_getScrollableScrollLeft(){var i;return((i=this._getScrollable(u(this.element())))===null||i===void 0?void 0:i.scrollLeft())??0},_defaultActionArgs(){let i=this.callBase.apply(this,arguments),e=this.option("component");return e&&(i.component=e,i.element=e.element()),i},_getEventArgs(i){let e=this._getSourceDraggable(),t=this._getTargetDraggable();return{event:i,itemData:e.option("itemData"),itemElement:H(e._$sourceElement),fromComponent:e.option("component")||e,toComponent:t.option("component")||t,fromData:e.option("data"),toData:t.option("data")}},_getDragStartArgs(i,e){let t=this._getEventArgs(i);return{event:t.event,itemData:t.itemData,itemElement:e,fromData:t.fromData}},_revertItemToInitialPosition(){!this._dragElementIsCloned()&&this._move(this._initialLocate,this._$sourceElement)},_dragEndHandler(i){let e=y(),t=this._getEventArgs(i),n=this._getEventArgs(i),o=this._getTargetDraggable(),s=!0;this.dragInProgress=!1;try{this._getAction("onDragEnd")(t)}finally{P(Et(t.cancel)).done(r=>{if(!r&&(o!==this&&o._getAction("onDrop")(n),!n.cancel)){s=!1,P(Et(o.dragEnd(t))).always(e.resolve);return}e.resolve()}).fail(e.resolve),e.done(()=>{s&&this._revertItemToInitialPosition(),this._resetDragOptions(o)})}},_isTargetOverAnotherDraggable(i){let e=this._getSourceDraggable();if(this===e)return!1;let t=e._$dragElement,n=e.$element(),o=this.$element(),s=DE(i),a=S.elementsFromPoint(s.x,s.y,this.element()).filter(h=>{let p=u(h);return p.hasClass(this._addWidgetPrefix())?!p.closest(t).length:!1})[0],l=this._getSourceElement(),d=a===n.get(0),c=u(a).closest(l).length;return!a||a===o.get(0)&&!d&&!c},_dragEnterHandler(i){this._fireDragEnterEvent(i),this._isTargetOverAnotherDraggable(i)&&this._setTargetDraggable(),this._getSourceDraggable().dragEnter(i)},_dragLeaveHandler(i){this._fireDragLeaveEvent(i),this._resetTargetDraggable(),this!==this._getSourceDraggable()&&this.reset(),this._getSourceDraggable().dragLeave(i)},_keydownHandler(i){this.dragInProgress&&i.key==="Escape"&&this._keydownEscapeHandler(i)},_keydownEscapeHandler(i){var e;if(!this._getSourceElement())return;let n=this._getEventArgs(i);if(this._getAction("onDragCancel")(n),n.cancel)return;this.dragInProgress=!1,(e=Qf)===null||e===void 0||e._toggleDraggingClass(!1),this._detachEventHandlers(),this._revertItemToInitialPosition();let o=this._getTargetDraggable();this._resetDragOptions(o),this._attachEventHandlers()},_getAction(i){return this[`_${i}Action`]||this._createActionByOption(i)},_getAnonymousTemplateName:()=>"content",_initTemplates(){this.option("contentTemplate")&&(this._templateManager.addDefaultTemplates({content:new tn}),this.callBase.apply(this,arguments))},_render(){this.callBase(),this.$element().addClass(this._addWidgetPrefix());let i=this._templateManager.anonymousTemplateName===this.option("contentTemplate"),e=this._getTemplateByOption("contentTemplate");e&&u(e.render({container:this.element(),transclude:i}))},_optionChanged(i){let{name:e}=i;switch(e){case"onDragStart":case"onDragMove":case"onDragEnd":case"onDrop":case"onDragEnter":case"onDragLeave":case"onDragCancel":case"onDraggableElementShown":this[`_${e}Action`]=this._createActionByOption(e);break;case"dragTemplate":case"contentTemplate":case"container":case"clone":case"scrollSensitivity":case"scrollSpeed":case"boundOffset":case"handle":case"group":case"data":case"itemData":break;case"allowMoveByClick":case"dragDirection":case"disabled":case"boundary":case"filter":case"immediate":this._resetDragElement(),this._detachEventHandlers(),this._attachEventHandlers();break;case"onCancelByEsc":this._keydownHandler();break;case"autoScroll":this._verticalScrollHelper.reset(),this._horizontalScrollHelper.reset();break;default:this.callBase(i)}},_getTargetDraggable(){return IE||this},_getSourceDraggable(){return Qf||this},_setTargetDraggable(){let i=this.option("group"),e=this._getSourceDraggable();i&&i===e.option("group")&&(IE=this)},_setSourceDraggable(){Qf=this},_resetSourceDraggable(){Qf=null},_resetTargetDraggable(){IE=null},_resetDragOptions(i){this.reset(),i.reset(),this._stopAnimator(),this._horizontalScrollHelper.reset(),this._verticalScrollHelper.reset(),this._resetDragElement(),this._resetSourceElement(),this._resetTargetDraggable(),this._resetSourceDraggable()},_dispose(){this.callBase(),this._detachEventHandlers(),this._resetDragElement(),this._resetTargetDraggable(),this._resetSourceDraggable(),this._$sourceElement=null,this._stopAnimator()},_fireDragEnterEvent(i){let e=this._getEventArgs(i);this._getAction("onDragEnter")(e)},_fireDragLeaveEvent(i){let e=this._getEventArgs(i);this._getAction("onDragLeave")(e)}});K(Ms,D1);var T1=D1;var A1=q(),hJ="dxSortable";var M1=i=>u(i).is(":visible"),pJ=(i,e)=>{var t,n;if(!i)return;let o=((t=e.to)===null||t===void 0?void 0:t.left)||0,s=((n=e.to)===null||n===void 0?void 0:n.top)||0;i.style.transform=`translate(${o}px,${s}px)`,i.style.transition=fe.off?"":`transform ${e.duration}ms ${e.easing}`},gJ=i=>{i&&(i.style.transform="",i.style.transition="")};function mJ(i){let e=i.offset(),{style:t}=i[0],n=parseFloat(t.paddingLeft)||0,o=parseFloat(t.paddingRight)||0,s=parseFloat(t.paddingTop)||0,r=i[0].clientWidth-(n+o),a=Q(i),l=e.left+n,d=e.top+s;return{left:l,right:l+r,top:d,bottom:d+a}}var R1=T1.inherit({_init(){this.callBase(),this._sourceScrollHandler=this._handleSourceScroll.bind(this),this._sourceScrollableInfo=null},_getDefaultOptions(){return m(this.callBase(),{clone:!0,filter:"> *",itemOrientation:"vertical",dropFeedbackMode:"push",allowDropInsideItem:!1,allowReordering:!0,moveItemOnDrop:!1,onDragChange:null,onAdd:null,onRemove:null,onReorder:null,onPlaceholderPrepared:null,animation:{type:"slide",duration:300,easing:"ease"},fromIndex:null,toIndex:null,dropInsideItem:!1,itemPoints:null,fromIndexOffset:0,offset:0,autoUpdate:!1,draggableElementSize:0})},reset(){this.option({dropInsideItem:!1,toIndex:null,fromIndex:null,itemPoints:null,fromIndexOffset:0,draggableElementSize:0}),this._$placeholderElement&&this._$placeholderElement.remove(),this._$placeholderElement=null,!this._isIndicateMode()&&this._$modifiedItem&&(this._$modifiedItem.css("marginBottom",this._modifiedItemMargin),this._$modifiedItem=null)},_getPrevVisibleItem:(i,e)=>i.slice(0,e).reverse().filter(M1)[0],_dragStartHandler(i){if(this.callBase.apply(this,arguments),i.cancel===!0)return;let e=this._getSourceElement();this._updateItemPoints(),this._subscribeToSourceScroll(i),this.option("fromIndex",this._getElementIndex(e)),this.option("fromIndexOffset",this.option("offset"))},_subscribeToSourceScroll(i){let e=this._getScrollable(u(i.target));e&&(this._sourceScrollableInfo={element:e,scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop()},_.off(e,"scroll",this._sourceScrollHandler),_.on(e,"scroll",this._sourceScrollHandler))},_unsubscribeFromSourceScroll(){this._sourceScrollableInfo&&(_.off(this._sourceScrollableInfo.element,"scroll",this._sourceScrollHandler),this._sourceScrollableInfo=null)},_handleSourceScroll(i){let e=this._sourceScrollableInfo;e&&["scrollLeft","scrollTop"].forEach(t=>{if(i.target[t]!==e[t]){let n=i.target[t]-e[t];this._correctItemPoints(n),this._movePlaceholder(),e[t]=i.target[t]}})},_dragEnterHandler(i){if(this.callBase.apply(this,arguments),this!==this._getSourceDraggable()&&(this._subscribeToSourceScroll(i),this._updateItemPoints(),this.option("fromIndex",-1),!this._isIndicateMode())){let e=this.option("itemPoints"),t=e[e.length-1];if(t){let n=this.$element(),o=this._getSourceElement(),s=this._isVerticalOrientation(),r=s?ee(o,!0):ae(o,!0),a=n.get(0)[s?"scrollHeight":"scrollWidth"],l=n.get(0)[s?"scrollTop":"scrollLeft"],d=s?"top":"left",c=t[d],p=n.offset()[d]+a-l-c;if(p<r&&s){let g=this._getItems(),C=u(this._getPrevVisibleItem(g));this._$modifiedItem=C,this._modifiedItemMargin=C.get(0).style.marginBottom,C.css("marginBottom",r-p);let v=C.closest(".dx-sortable"),b=v.data("dxScrollable")||v.data("dxScrollView");b&&b.update()}}}},_dragLeaveHandler(){this.callBase.apply(this,arguments),this!==this._getSourceDraggable()&&this._unsubscribeFromSourceScroll()},dragEnter(){this!==this._getTargetDraggable()&&this.option("toIndex",-1)},dragLeave(){this!==this._getTargetDraggable()&&this.option("toIndex",this.option("fromIndex"))},_allowDrop(i){let t=this._getTargetDraggable().$element(),n=this._getScrollable(t);if(n){let{left:o,right:s,top:r,bottom:a}=mJ(n),l=this.option("toIndex"),d=this.option("itemPoints"),c=d?.filter(h=>h.index===l)[0];if(c&&c.top!==void 0)return this._isVerticalOrientation()?r<=Math.ceil(c.top)&&Math.floor(c.top)<=a:o<=Math.ceil(c.left)&&Math.floor(c.left)<=s}return!0},dragEnd(i){this._unsubscribeFromSourceScroll();let e=this._getSourceElement(),t=this._getSourceDraggable(),n=t.NAME!==this.NAME,o=this.option("toIndex"),{event:s}=i,r=this._allowDrop(s);if(o!==null&&o>=0&&r){let a,l;if(t!==this&&(a=this._fireAddEvent(s),a||(l=this._fireRemoveEvent(s))),n&&rs(e),this.option("moveItemOnDrop")&&!a&&this._moveItem(e,o,l),t===this)return this._fireReorderEvent(s)}return y().resolve()},dragMove(i){let e=this.option("itemPoints");if(!e)return;let t=this._isVerticalOrientation(),n=t?"top":"left",o=t?i.pageY:i.pageX,s=this.option("rtlEnabled"),r;for(let a=e.length-1;a>=0;a--){let l=e[a+1]&&(e[a][n]+e[a+1][n])/2;if((!t&&s?o>l:l>o)||l===void 0)r=e[a];else break}r&&(this._updatePlaceholderPosition(i,r),this._verticalScrollHelper.isScrolling()&&this._isIndicateMode()&&this._movePlaceholder())},_isIndicateMode(){return this.option("dropFeedbackMode")==="indicate"||this.option("allowDropInsideItem")},_createPlaceholder(){let i;return this._isIndicateMode()&&(i=u("<div>").addClass(this._addWidgetPrefix("placeholder")).insertBefore(this._getSourceDraggable()._$dragElement)),this._$placeholderElement=i,i},_getItems(){let i=this._getItemsSelector();return this._$content().find(i).not(`.${this._addWidgetPrefix("placeholder")}`).not(`.${this._addWidgetPrefix("clone")}`).toArray()},_allowReordering(){let i=this._getSourceDraggable(),e=this._getTargetDraggable();return i!==e||this.option("allowReordering")},_isValidPoint(i,e,t){let n=this.option("allowDropInsideItem");return!(t||this._allowReordering())&&(i!==0||!n)?!1:this._isIndicateMode()?e===-1||i!==e&&(t||i!==e+1):!0},_getItemPoints(){let i=this,e=[],t,n,o,s=i.option("rtlEnabled"),r=i._isVerticalOrientation(),a=i._getItems(),l=a.filter(M1),d=l.length,c=this._getDraggableElement(),h=l.indexOf(c.get(0));if(d){for(let p=0;p<=d;p++){let g=!r&&s^p===d,C=r&&p===d;p<d&&(t=u(l[p]),n=t.offset(),o=ae(t)),e.push({dropInsideItem:!1,left:n.left+(g?o:0),top:n.top+(C?e[p-1].height:0),index:p===d?a.length:a.indexOf(t.get(0)),$item:t,width:ae(t),height:ee(t),isValid:i._isValidPoint(p,h)})}if(this.option("allowDropInsideItem")){let p=e;e=[];for(let g=0;g<p.length;g++)e.push(p[g]),p[g+1]&&e.push(m({},p[g],{dropInsideItem:!0,top:Math.floor((p[g].top+p[g+1].top)/2),left:Math.floor((p[g].left+p[g+1].left)/2),isValid:this._isValidPoint(g,h,!0)}))}}else e.push({dropInsideItem:!1,index:0,isValid:!0});return e},_updateItemPoints(i){(i||this.option("autoUpdate")||!this.option("itemPoints"))&&this.option("itemPoints",this._getItemPoints())},_correctItemPoints(i){let e=this.option("itemPoints");if(i&&e&&!this.option("autoUpdate")){let n=this._isVerticalOrientation()?"top":"left";e.forEach(o=>{o[n]-=i})}},_getElementIndex(i){return this._getItems().indexOf(i.get(0))},_getDragTemplateArgs(i){let e=this.callBase.apply(this,arguments);return e.model.fromIndex=this._getElementIndex(i),e},_togglePlaceholder(i){this._$placeholderElement&&this._$placeholderElement.toggle(i)},_isVerticalOrientation(){return this.option("itemOrientation")==="vertical"},_normalizeToIndex(i,e){let t=this._getSourceDraggable()!==this._getTargetDraggable(),n=this._getActualFromIndex();return i===null?n:Math.max(t||n>=i||e?i:i-1,0)},_updatePlaceholderPosition(i,e){let t=this._getSourceDraggable(),n=this._normalizeToIndex(e.index,e.dropInsideItem),o=m(this._getEventArgs(i),{toIndex:n,dropInsideItem:e.dropInsideItem});if(e.isValid&&this._getAction("onDragChange")(o),o.cancel||!e.isValid){e.isValid||this.option({dropInsideItem:!1,toIndex:null});return}this.option({dropInsideItem:e.dropInsideItem,toIndex:e.index}),this._getAction("onPlaceholderPrepared")(m(this._getEventArgs(i),{placeholderElement:H(this._$placeholderElement),dragElement:H(t._$dragElement)})),this._updateItemPoints()},_makeWidthCorrection(i,e){if(this._$scrollable=this._getScrollable(i),this._$scrollable){let t=W(this._$scrollable),n=this._$scrollable.offset().left-i.offset().left,o=ae(i)-n-t;n>0&&(e-=n),o>0&&(e-=o)}return e},_updatePlaceholderSizes(i,e){let t=this.option("dropInsideItem"),n=u(e),o=this._isVerticalOrientation(),s="",r="";i.toggleClass(this._addWidgetPrefix("placeholder-inside"),t),(o||t)&&(s=ae(n)),(!o||t)&&(r=ee(n)),s=this._makeWidthCorrection(n,s),i.css({width:s,height:r})},_moveItem(i,e,t){let n,o=this._getItems(),s=o[e],r=this._getSourceDraggable();t&&(i=i.clone(),r._toggleDragSourceClass(!1,i)),s||(n=o[e-1]),this._moveItemCore(i,s,n)},_moveItemCore(i,e,t){!e&&!t?i.appendTo(this.$element()):t?i.insertAfter(u(t)):i.insertBefore(u(e))},_getDragStartArgs(i,e){return m(this.callBase.apply(this,arguments),{fromIndex:this._getElementIndex(e)})},_getEventArgs(i){let e=this._getSourceDraggable(),t=this._getTargetDraggable(),n=t.option("dropInsideItem");return m(this.callBase.apply(this,arguments),{fromIndex:e.option("fromIndex"),toIndex:this._normalizeToIndex(t.option("toIndex"),n),dropInsideItem:n})},_optionChanged(i){let{name:e}=i;switch(e){case"onDragChange":case"onPlaceholderPrepared":case"onAdd":case"onRemove":case"onReorder":this[`_${e}Action`]=this._createActionByOption(e);break;case"itemOrientation":case"allowDropInsideItem":case"moveItemOnDrop":case"dropFeedbackMode":case"itemPoints":case"animation":case"allowReordering":case"fromIndexOffset":case"offset":case"draggableElementSize":case"autoUpdate":break;case"fromIndex":[!1,!0].forEach(t=>{let n=t?i.value:i.previousValue;if(n!==null){let o=u(this._getItems()[n]);this._toggleDragSourceClass(t,o)}});break;case"dropInsideItem":this._optionChangedDropInsideItem(i);break;case"toIndex":this._optionChangedToIndex(i);break;default:this.callBase(i)}},_optionChangedDropInsideItem(){this._isIndicateMode()&&this._$placeholderElement&&this._movePlaceholder()},_isPositionVisible(i){let e=this.$element(),t;if(e.css("overflow")!=="hidden"?t=e.get(0):e.parents().each(function(){if(u(this).css("overflow")!=="visible")return t=this,!1}),t){let n=Pe(t),o=this._isVerticalOrientation(),s=o?"top":"left",r=o?"bottom":"right",a=o?A1.pageYOffset:A1.pageXOffset;if(i[s]<n[s]+a||i[s]>n[r]+a)return!1}return!0},_optionChangedToIndex(i){let e=i.value;if(this._isIndicateMode()){let t=e!==null&&e>=0;this._togglePlaceholder(t),t&&this._movePlaceholder()}else this._moveItems(i.previousValue,i.value,i.fullUpdate)},update(){if(this.option("fromIndex")===null&&this.option("toIndex")===null)return;this._updateItemPoints(!0),this._updateDragSourceClass();let i=this.option("toIndex");this._optionChangedToIndex({value:i,fullUpdate:!0})},_updateDragSourceClass(){let i=this._getActualFromIndex(),e=u(this._getItems()[i]);e.length&&(this._$sourceElement=e,this._toggleDragSourceClass(!0,e))},_makeLeftCorrection(i){let e=this._$scrollable;if(e&&this._isVerticalOrientation()){let t=e.offset().left-i;t>0&&(i+=t)}return i},_movePlaceholder(){let i=this,e=i._$placeholderElement||i._createPlaceholder();if(!e)return;let t=i._getItems(),n=i.option("toIndex"),o=i._isVerticalOrientation(),s=this.option("rtlEnabled"),r=i.option("dropInsideItem"),a=null,l=t[n];if(l){let d=u(l);a=d.offset(),!o&&s&&!r&&(a.left+=ae(d,!0))}else{let d=l=this._getPrevVisibleItem(t,n);d&&(a=u(d).offset(),o?a.top+=ee(d,!0):s||(a.left+=ae(d,!0)))}if(i._updatePlaceholderSizes(e,l),a&&!i._isPositionVisible(a)&&(a=null),a){let d=o&&n===t.length,c=ee(e);a.left=i._makeLeftCorrection(a.left),a.top=d&&a.top>=c?a.top-c:a.top,i._move(a,e)}e.toggle(!!a)},_getPositions(i,e,t,n){let o=[];for(let s=0;s<i.length;s++){let r=0;if(n===null||t===null){o.push(r);continue}t===-1?s>=n&&(r=e):n===-1?s>t&&(r=-e):t<n?s>t&&s<n&&(r=-e):t>n&&s>=n&&s<t&&(r=e),o.push(r)}return o},_getDraggableElementSize(i){let e=this._getDraggableElement(),t=this.option("draggableElementSize");return t||(t=i?(ee(e)+ee(e,!0))/2:(ae(e)+ae(e,!0))/2,this.option("autoUpdate")||this.option("draggableElementSize",t)),t},_getActualFromIndex(){let{fromIndex:i,fromIndexOffset:e,offset:t}=this.option();return i==null?null:i+e-t},_moveItems(i,e,t){let n=this._getActualFromIndex(),o=this._isVerticalOrientation(),s=o?"top":"left",r=this._getDraggableElementSize(o),a=this._getItems(),l=this._getPositions(a,r,n,i),d=this._getPositions(a,r,n,e),c=this.option("animation"),h=this.option("rtlEnabled");for(let p=0;p<a.length;p++){let g=a[p],C=l[p],v=d[p];e===null||n===null?gJ(g):(C!==v||t&&f(v))&&pJ(g,m({},c,{to:{[s]:!o&&h?-v:v}}))}},_toggleDragSourceClass(i,e){let t=e||this._$sourceElement;this.callBase.apply(this,arguments),this._isIndicateMode()||t&&t.toggleClass(this._addWidgetPrefix("source-hidden"),i)},_dispose(){this.reset(),this.callBase()},_fireAddEvent(i){let e=this._getEventArgs(i);return this._getAction("onAdd")(e),e.cancel},_fireRemoveEvent(i){let e=this._getSourceDraggable(),t=this._getEventArgs(i);return e._getAction("onRemove")(t),t.cancel},_fireReorderEvent(i){let e=this._getEventArgs(i);return this._getAction("onReorder")(e),e.promise||y().resolve()}});K(hJ,R1);var F1=R1;var P1=F1;var k1={dragCell:"dx-drag-cell"},fr={cellFocusDisabled:"dx-cell-focus-disabled",handleIcon:"drag-icon",commandDrag:"dx-command-drag",sortableWithoutHandle:"dx-sortable-without-handle",rowsView:"rowsview",dragView:"dragview"};var fJ=i=>(e,t)=>{let n=u(e);if(t.rowType==="data")return n.addClass(fr.cellFocusDisabled),u("<span>").addClass(i(fr.handleIcon));R.setEmptyText(n)},B1={createHandleTemplateFunc:fJ};var _J=i=>class extends i{init(){super.init.apply(this,arguments),this._updateHandleColumn()}optionChanged(e){e.name==="rowDragging"&&(this._updateHandleColumn(),this._invalidate(!0,!0),e.handled=!0),super.optionChanged.apply(this,arguments)}_allowReordering(){let e=this.option("rowDragging");return!!(e&&(e.allowReordering||e.allowDropInsideItem||e.group))}_updateHandleColumn(){let e=this.option("rowDragging"),t=this._allowReordering(),n=this._columnsController,o=t&&e.showDragIcons;n?.addCommandColumn({type:"drag",command:"drag",visibleIndex:-2,alignment:"center",elementAttr:[{name:k1.dragCell,value:""}],cssClass:fr.commandDrag,width:"auto",cellTemplate:this._getHandleTemplate(),visible:o}),n?.columnOption("type:drag","visible",o)}_renderContent(){let e=this.option("rowDragging"),t=this._allowReordering(),n=super._renderContent.apply(this,arguments),o=this._isFixedTableRendering,s=o?"_sortableFixed":"_sortable",r=o?"_sortable":"_sortableFixed",a=c=>{var h;(h=this._sortableFixed)===null||h===void 0||h.$element().css("pointerEvents",c?"auto":"")},l=".dx-row:not(.dx-freespace-row):not(.dx-virtual-row):not(.dx-header-row):not(.dx-footer-row)",d=this.option("dataRowTemplate")?`> table > tbody${l}`:`> table > tbody > ${l}`;return(t||this[s])&&n.length&&(this[s]=this._createComponent(n,P1,m({component:this.component,contentTemplate:null,filter:d,cursorOffset:c=>{let{event:h}=c,p=u(this.element()).offset();return{x:h.pageX-p.left}},onDraggableElementShown:c=>{if(e.dragTemplate)return;let p=u(c.dragElement).children(".dx-widget").data(this.component.NAME);this._synchronizeScrollLeftPosition(p)},dragTemplate:this._getDraggableRowTemplate(),handle:e.showDragIcons&&`.${fr.commandDrag}`,dropFeedbackMode:"indicate"},e,{onDragStart:c=>{var h,p;(h=this.getController("keyboardNavigation"))===null||h===void 0||h._resetFocusedCell();let g=c.component.getVisibleRows()[c.fromIndex];c.itemData=g&&g.data;let C=g&&g.rowType==="data";c.cancel=!t||!C,(p=e.onDragStart)===null||p===void 0||p.call(e,c)},onDragEnter:c=>{c.fromComponent!==c.toComponent&&a(!0)},onDragLeave:()=>{a(!1)},onDragEnd:c=>{var h;a(!1),(h=e.onDragEnd)===null||h===void 0||h.call(e,c)},onAdd:c=>{var h;a(!1),(h=e.onAdd)===null||h===void 0||h.call(e,c)},dropFeedbackMode:e.dropFeedbackMode,onOptionChanged:c=>{this._sortableFixed&&(c.name==="fromIndex"||c.name==="toIndex")&&this[r].option(c.name,c.value)}})),n.toggleClass("dx-scrollable-container",o),n.toggleClass(fr.sortableWithoutHandle,t&&!e.showDragIcons)),n}_renderCore(e){super._renderCore.apply(this,arguments),e&&e.changeType==="update"&&e.repaintChangesOnly&&R.isVirtualRowRendering(this)&&Ci(()=>{this._updateSortable()})}_updateSortable(){let e=this._dataController.getRowIndexOffset(),t=e-this._previousOffset;[this._sortable,this._sortableFixed].forEach(n=>{let o=n?.option("toIndex");f(o)&&f(this._previousOffset)&&n?.option("toIndex",o-t),n?.option("offset",e),n?.update()}),this._previousOffset=e}_resizeCore(){super._resizeCore.apply(this,arguments),this._updateSortable()}_getDraggableGridOptions(e){let t=this.option(),n=this.getColumns(),o=u(this.getRowElement(e.rowIndex));return{dataSource:[{id:1,parentId:0}],showBorders:!0,showColumnHeaders:!1,scrolling:{useNative:!1,showScrollbar:"never"},pager:{visible:!1},loadingTimeout:null,columnFixing:t.columnFixing,columnAutoWidth:t.columnAutoWidth,showColumnLines:t.showColumnLines,columns:n.map(s=>({width:s.width||s.visibleWidth,fixed:s.fixed,fixedPosition:s.fixedPosition})),onRowPrepared:s=>{let r=s.component.getView("rowsView");u(s.rowElement).replaceWith(o.eq(r._isFixedTableRendering?1:0).clone())}}}_synchronizeScrollLeftPosition(e){let t=e?.getScrollable();t?.scrollTo({x:this._scrollLeft})}_getDraggableRowTemplate(){return e=>{let t=this.component.$element(),n=u("<div>");is(n,W(t));let o=this._dataController.items(),s=o&&o[e.fromIndex],r=this._getDraggableGridOptions(s);return this._createComponent(n,this.component.NAME,r),n.find(".dx-gridbase-container").children(`:not(.${this.addWidgetPrefix(fr.rowsView)})`).hide(),n.addClass(this.addWidgetPrefix(fr.dragView)),n}}_getHandleTemplate(){return B1.createHandleTemplateFunc(e=>this.addWidgetPrefix(e))}},V1={defaultOptions:()=>({rowDragging:{showDragIcons:!0,dropFeedbackMode:"indicate",allowReordering:!1,allowDropInsideItem:!1}}),extenders:{views:{rowsView:_J}}};$.registerModule("rowDragging",V1);var L1=WP;var N1=L1;var CJ=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get allowColumnReordering(){return this._getOption("allowColumnReordering")}set allowColumnReordering(t){this._setOption("allowColumnReordering",t)}get allowColumnResizing(){return this._getOption("allowColumnResizing")}set allowColumnResizing(t){this._setOption("allowColumnResizing",t)}get autoNavigateToFocusedRow(){return this._getOption("autoNavigateToFocusedRow")}set autoNavigateToFocusedRow(t){this._setOption("autoNavigateToFocusedRow",t)}get cacheEnabled(){return this._getOption("cacheEnabled")}set cacheEnabled(t){this._setOption("cacheEnabled",t)}get cellHintEnabled(){return this._getOption("cellHintEnabled")}set cellHintEnabled(t){this._setOption("cellHintEnabled",t)}get columnAutoWidth(){return this._getOption("columnAutoWidth")}set columnAutoWidth(t){this._setOption("columnAutoWidth",t)}get columnChooser(){return this._getOption("columnChooser")}set columnChooser(t){this._setOption("columnChooser",t)}get columnFixing(){return this._getOption("columnFixing")}set columnFixing(t){this._setOption("columnFixing",t)}get columnHidingEnabled(){return this._getOption("columnHidingEnabled")}set columnHidingEnabled(t){this._setOption("columnHidingEnabled",t)}get columnMinWidth(){return this._getOption("columnMinWidth")}set columnMinWidth(t){this._setOption("columnMinWidth",t)}get columnResizingMode(){return this._getOption("columnResizingMode")}set columnResizingMode(t){this._setOption("columnResizingMode",t)}get columns(){return this._getOption("columns")}set columns(t){this._setOption("columns",t)}get columnWidth(){return this._getOption("columnWidth")}set columnWidth(t){this._setOption("columnWidth",t)}get customizeColumns(){return this._getOption("customizeColumns")}set customizeColumns(t){this._setOption("customizeColumns",t)}get dataRowTemplate(){return this._getOption("dataRowTemplate")}set dataRowTemplate(t){this._setOption("dataRowTemplate",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get dateSerializationFormat(){return this._getOption("dateSerializationFormat")}set dateSerializationFormat(t){this._setOption("dateSerializationFormat",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get editing(){return this._getOption("editing")}set editing(t){this._setOption("editing",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get errorRowEnabled(){return this._getOption("errorRowEnabled")}set errorRowEnabled(t){this._setOption("errorRowEnabled",t)}get export(){return this._getOption("export")}set export(t){this._setOption("export",t)}get filterBuilder(){return this._getOption("filterBuilder")}set filterBuilder(t){this._setOption("filterBuilder",t)}get filterBuilderPopup(){return this._getOption("filterBuilderPopup")}set filterBuilderPopup(t){this._setOption("filterBuilderPopup",t)}get filterPanel(){return this._getOption("filterPanel")}set filterPanel(t){this._setOption("filterPanel",t)}get filterRow(){return this._getOption("filterRow")}set filterRow(t){this._setOption("filterRow",t)}get filterSyncEnabled(){return this._getOption("filterSyncEnabled")}set filterSyncEnabled(t){this._setOption("filterSyncEnabled",t)}get filterValue(){return this._getOption("filterValue")}set filterValue(t){this._setOption("filterValue",t)}get focusedColumnIndex(){return this._getOption("focusedColumnIndex")}set focusedColumnIndex(t){this._setOption("focusedColumnIndex",t)}get focusedRowEnabled(){return this._getOption("focusedRowEnabled")}set focusedRowEnabled(t){this._setOption("focusedRowEnabled",t)}get focusedRowIndex(){return this._getOption("focusedRowIndex")}set focusedRowIndex(t){this._setOption("focusedRowIndex",t)}get focusedRowKey(){return this._getOption("focusedRowKey")}set focusedRowKey(t){this._setOption("focusedRowKey",t)}get grouping(){return this._getOption("grouping")}set grouping(t){this._setOption("grouping",t)}get groupPanel(){return this._getOption("groupPanel")}set groupPanel(t){this._setOption("groupPanel",t)}get headerFilter(){return this._getOption("headerFilter")}set headerFilter(t){this._setOption("headerFilter",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get highlightChanges(){return this._getOption("highlightChanges")}set highlightChanges(t){this._setOption("highlightChanges",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get keyboardNavigation(){return this._getOption("keyboardNavigation")}set keyboardNavigation(t){this._setOption("keyboardNavigation",t)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(t){this._setOption("keyExpr",t)}get loadPanel(){return this._getOption("loadPanel")}set loadPanel(t){this._setOption("loadPanel",t)}get masterDetail(){return this._getOption("masterDetail")}set masterDetail(t){this._setOption("masterDetail",t)}get noDataText(){return this._getOption("noDataText")}set noDataText(t){this._setOption("noDataText",t)}get pager(){return this._getOption("pager")}set pager(t){this._setOption("pager",t)}get paging(){return this._getOption("paging")}set paging(t){this._setOption("paging",t)}get remoteOperations(){return this._getOption("remoteOperations")}set remoteOperations(t){this._setOption("remoteOperations",t)}get renderAsync(){return this._getOption("renderAsync")}set renderAsync(t){this._setOption("renderAsync",t)}get repaintChangesOnly(){return this._getOption("repaintChangesOnly")}set repaintChangesOnly(t){this._setOption("repaintChangesOnly",t)}get rowAlternationEnabled(){return this._getOption("rowAlternationEnabled")}set rowAlternationEnabled(t){this._setOption("rowAlternationEnabled",t)}get rowDragging(){return this._getOption("rowDragging")}set rowDragging(t){this._setOption("rowDragging",t)}get rowTemplate(){return this._getOption("rowTemplate")}set rowTemplate(t){this._setOption("rowTemplate",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get scrolling(){return this._getOption("scrolling")}set scrolling(t){this._setOption("scrolling",t)}get searchPanel(){return this._getOption("searchPanel")}set searchPanel(t){this._setOption("searchPanel",t)}get selectedRowKeys(){return this._getOption("selectedRowKeys")}set selectedRowKeys(t){this._setOption("selectedRowKeys",t)}get selection(){return this._getOption("selection")}set selection(t){this._setOption("selection",t)}get selectionFilter(){return this._getOption("selectionFilter")}set selectionFilter(t){this._setOption("selectionFilter",t)}get showBorders(){return this._getOption("showBorders")}set showBorders(t){this._setOption("showBorders",t)}get showColumnHeaders(){return this._getOption("showColumnHeaders")}set showColumnHeaders(t){this._setOption("showColumnHeaders",t)}get showColumnLines(){return this._getOption("showColumnLines")}set showColumnLines(t){this._setOption("showColumnLines",t)}get showRowLines(){return this._getOption("showRowLines")}set showRowLines(t){this._setOption("showRowLines",t)}get sortByGroupSummaryInfo(){return this._getOption("sortByGroupSummaryInfo")}set sortByGroupSummaryInfo(t){this._setOption("sortByGroupSummaryInfo",t)}get sorting(){return this._getOption("sorting")}set sorting(t){this._setOption("sorting",t)}get stateStoring(){return this._getOption("stateStoring")}set stateStoring(t){this._setOption("stateStoring",t)}get summary(){return this._getOption("summary")}set summary(t){this._setOption("summary",t)}get syncLookupFilterValues(){return this._getOption("syncLookupFilterValues")}set syncLookupFilterValues(t){this._setOption("syncLookupFilterValues",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get toolbar(){return this._getOption("toolbar")}set toolbar(t){this._setOption("toolbar",t)}get twoWayBindingEnabled(){return this._getOption("twoWayBindingEnabled")}set twoWayBindingEnabled(t){this._setOption("twoWayBindingEnabled",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get wordWrapEnabled(){return this._getOption("wordWrapEnabled")}set wordWrapEnabled(t){this._setOption("wordWrapEnabled",t)}onAdaptiveDetailRowPreparing;onCellClick;onCellDblClick;onCellHoverChanged;onCellPrepared;onContentReady;onContextMenuPreparing;onDataErrorOccurred;onDisposing;onEditCanceled;onEditCanceling;onEditingStart;onEditorPrepared;onEditorPreparing;onExporting;onFocusedCellChanged;onFocusedCellChanging;onFocusedRowChanged;onFocusedRowChanging;onInitialized;onInitNewRow;onKeyDown;onOptionChanged;onRowClick;onRowCollapsed;onRowCollapsing;onRowDblClick;onRowExpanded;onRowExpanding;onRowInserted;onRowInserting;onRowPrepared;onRowRemoved;onRowRemoving;onRowUpdated;onRowUpdating;onRowValidating;onSaved;onSaving;onSelectionChanged;onToolbarPreparing;accessKeyChange;activeStateEnabledChange;allowColumnReorderingChange;allowColumnResizingChange;autoNavigateToFocusedRowChange;cacheEnabledChange;cellHintEnabledChange;columnAutoWidthChange;columnChooserChange;columnFixingChange;columnHidingEnabledChange;columnMinWidthChange;columnResizingModeChange;columnsChange;columnWidthChange;customizeColumnsChange;dataRowTemplateChange;dataSourceChange;dateSerializationFormatChange;disabledChange;editingChange;elementAttrChange;errorRowEnabledChange;exportChange;filterBuilderChange;filterBuilderPopupChange;filterPanelChange;filterRowChange;filterSyncEnabledChange;filterValueChange;focusedColumnIndexChange;focusedRowEnabledChange;focusedRowIndexChange;focusedRowKeyChange;groupingChange;groupPanelChange;headerFilterChange;heightChange;highlightChangesChange;hintChange;hoverStateEnabledChange;keyboardNavigationChange;keyExprChange;loadPanelChange;masterDetailChange;noDataTextChange;pagerChange;pagingChange;remoteOperationsChange;renderAsyncChange;repaintChangesOnlyChange;rowAlternationEnabledChange;rowDraggingChange;rowTemplateChange;rtlEnabledChange;scrollingChange;searchPanelChange;selectedRowKeysChange;selectionChange;selectionFilterChange;showBordersChange;showColumnHeadersChange;showColumnLinesChange;showRowLinesChange;sortByGroupSummaryInfoChange;sortingChange;stateStoringChange;summaryChange;syncLookupFilterValuesChange;tabIndexChange;toolbarChange;twoWayBindingEnabledChange;visibleChange;widthChange;wordWrapEnabledChange;get columnsChildren(){return this._getOption("columns")}set columnsChildren(t){this.setChildren("columns",t)}get sortByGroupSummaryInfoChildren(){return this._getOption("sortByGroupSummaryInfo")}set sortByGroupSummaryInfoChildren(t){this.setChildren("sortByGroupSummaryInfo",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"adaptiveDetailRowPreparing",emit:"onAdaptiveDetailRowPreparing"},{subscribe:"cellClick",emit:"onCellClick"},{subscribe:"cellDblClick",emit:"onCellDblClick"},{subscribe:"cellHoverChanged",emit:"onCellHoverChanged"},{subscribe:"cellPrepared",emit:"onCellPrepared"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"contextMenuPreparing",emit:"onContextMenuPreparing"},{subscribe:"dataErrorOccurred",emit:"onDataErrorOccurred"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"editCanceled",emit:"onEditCanceled"},{subscribe:"editCanceling",emit:"onEditCanceling"},{subscribe:"editingStart",emit:"onEditingStart"},{subscribe:"editorPrepared",emit:"onEditorPrepared"},{subscribe:"editorPreparing",emit:"onEditorPreparing"},{subscribe:"exporting",emit:"onExporting"},{subscribe:"focusedCellChanged",emit:"onFocusedCellChanged"},{subscribe:"focusedCellChanging",emit:"onFocusedCellChanging"},{subscribe:"focusedRowChanged",emit:"onFocusedRowChanged"},{subscribe:"focusedRowChanging",emit:"onFocusedRowChanging"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"initNewRow",emit:"onInitNewRow"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"rowClick",emit:"onRowClick"},{subscribe:"rowCollapsed",emit:"onRowCollapsed"},{subscribe:"rowCollapsing",emit:"onRowCollapsing"},{subscribe:"rowDblClick",emit:"onRowDblClick"},{subscribe:"rowExpanded",emit:"onRowExpanded"},{subscribe:"rowExpanding",emit:"onRowExpanding"},{subscribe:"rowInserted",emit:"onRowInserted"},{subscribe:"rowInserting",emit:"onRowInserting"},{subscribe:"rowPrepared",emit:"onRowPrepared"},{subscribe:"rowRemoved",emit:"onRowRemoved"},{subscribe:"rowRemoving",emit:"onRowRemoving"},{subscribe:"rowUpdated",emit:"onRowUpdated"},{subscribe:"rowUpdating",emit:"onRowUpdating"},{subscribe:"rowValidating",emit:"onRowValidating"},{subscribe:"saved",emit:"onSaved"},{subscribe:"saving",emit:"onSaving"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{subscribe:"toolbarPreparing",emit:"onToolbarPreparing"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"allowColumnReorderingChange"},{emit:"allowColumnResizingChange"},{emit:"autoNavigateToFocusedRowChange"},{emit:"cacheEnabledChange"},{emit:"cellHintEnabledChange"},{emit:"columnAutoWidthChange"},{emit:"columnChooserChange"},{emit:"columnFixingChange"},{emit:"columnHidingEnabledChange"},{emit:"columnMinWidthChange"},{emit:"columnResizingModeChange"},{emit:"columnsChange"},{emit:"columnWidthChange"},{emit:"customizeColumnsChange"},{emit:"dataRowTemplateChange"},{emit:"dataSourceChange"},{emit:"dateSerializationFormatChange"},{emit:"disabledChange"},{emit:"editingChange"},{emit:"elementAttrChange"},{emit:"errorRowEnabledChange"},{emit:"exportChange"},{emit:"filterBuilderChange"},{emit:"filterBuilderPopupChange"},{emit:"filterPanelChange"},{emit:"filterRowChange"},{emit:"filterSyncEnabledChange"},{emit:"filterValueChange"},{emit:"focusedColumnIndexChange"},{emit:"focusedRowEnabledChange"},{emit:"focusedRowIndexChange"},{emit:"focusedRowKeyChange"},{emit:"groupingChange"},{emit:"groupPanelChange"},{emit:"headerFilterChange"},{emit:"heightChange"},{emit:"highlightChangesChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"keyboardNavigationChange"},{emit:"keyExprChange"},{emit:"loadPanelChange"},{emit:"masterDetailChange"},{emit:"noDataTextChange"},{emit:"pagerChange"},{emit:"pagingChange"},{emit:"remoteOperationsChange"},{emit:"renderAsyncChange"},{emit:"repaintChangesOnlyChange"},{emit:"rowAlternationEnabledChange"},{emit:"rowDraggingChange"},{emit:"rowTemplateChange"},{emit:"rtlEnabledChange"},{emit:"scrollingChange"},{emit:"searchPanelChange"},{emit:"selectedRowKeysChange"},{emit:"selectionChange"},{emit:"selectionFilterChange"},{emit:"showBordersChange"},{emit:"showColumnHeadersChange"},{emit:"showColumnLinesChange"},{emit:"showRowLinesChange"},{emit:"sortByGroupSummaryInfoChange"},{emit:"sortingChange"},{emit:"stateStoringChange"},{emit:"summaryChange"},{emit:"syncLookupFilterValuesChange"},{emit:"tabIndexChange"},{emit:"toolbarChange"},{emit:"twoWayBindingEnabledChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wordWrapEnabledChange"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new N1(t,n)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("columns",t),this.setupChanges("dataSource",t),this.setupChanges("keyExpr",t),this.setupChanges("selectedRowKeys",t),this.setupChanges("sortByGroupSummaryInfo",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("columns"),this._idh.doCheck("dataSource"),this._idh.doCheck("keyExpr"),this._idh.doCheck("selectedRowKeys"),this._idh.doCheck("sortByGroupSummaryInfo"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-data-grid"]],contentQueries:function(n,o,s){if(n&1&&(je(s,iI,4),je(s,nI,4)),n&2){let r;Ne(r=He())&&(o.columnsChildren=r),Ne(r=He())&&(o.sortByGroupSummaryInfoChildren=r)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",allowColumnReordering:"allowColumnReordering",allowColumnResizing:"allowColumnResizing",autoNavigateToFocusedRow:"autoNavigateToFocusedRow",cacheEnabled:"cacheEnabled",cellHintEnabled:"cellHintEnabled",columnAutoWidth:"columnAutoWidth",columnChooser:"columnChooser",columnFixing:"columnFixing",columnHidingEnabled:"columnHidingEnabled",columnMinWidth:"columnMinWidth",columnResizingMode:"columnResizingMode",columns:"columns",columnWidth:"columnWidth",customizeColumns:"customizeColumns",dataRowTemplate:"dataRowTemplate",dataSource:"dataSource",dateSerializationFormat:"dateSerializationFormat",disabled:"disabled",editing:"editing",elementAttr:"elementAttr",errorRowEnabled:"errorRowEnabled",export:"export",filterBuilder:"filterBuilder",filterBuilderPopup:"filterBuilderPopup",filterPanel:"filterPanel",filterRow:"filterRow",filterSyncEnabled:"filterSyncEnabled",filterValue:"filterValue",focusedColumnIndex:"focusedColumnIndex",focusedRowEnabled:"focusedRowEnabled",focusedRowIndex:"focusedRowIndex",focusedRowKey:"focusedRowKey",grouping:"grouping",groupPanel:"groupPanel",headerFilter:"headerFilter",height:"height",highlightChanges:"highlightChanges",hint:"hint",hoverStateEnabled:"hoverStateEnabled",keyboardNavigation:"keyboardNavigation",keyExpr:"keyExpr",loadPanel:"loadPanel",masterDetail:"masterDetail",noDataText:"noDataText",pager:"pager",paging:"paging",remoteOperations:"remoteOperations",renderAsync:"renderAsync",repaintChangesOnly:"repaintChangesOnly",rowAlternationEnabled:"rowAlternationEnabled",rowDragging:"rowDragging",rowTemplate:"rowTemplate",rtlEnabled:"rtlEnabled",scrolling:"scrolling",searchPanel:"searchPanel",selectedRowKeys:"selectedRowKeys",selection:"selection",selectionFilter:"selectionFilter",showBorders:"showBorders",showColumnHeaders:"showColumnHeaders",showColumnLines:"showColumnLines",showRowLines:"showRowLines",sortByGroupSummaryInfo:"sortByGroupSummaryInfo",sorting:"sorting",stateStoring:"stateStoring",summary:"summary",syncLookupFilterValues:"syncLookupFilterValues",tabIndex:"tabIndex",toolbar:"toolbar",twoWayBindingEnabled:"twoWayBindingEnabled",visible:"visible",width:"width",wordWrapEnabled:"wordWrapEnabled"},outputs:{onAdaptiveDetailRowPreparing:"onAdaptiveDetailRowPreparing",onCellClick:"onCellClick",onCellDblClick:"onCellDblClick",onCellHoverChanged:"onCellHoverChanged",onCellPrepared:"onCellPrepared",onContentReady:"onContentReady",onContextMenuPreparing:"onContextMenuPreparing",onDataErrorOccurred:"onDataErrorOccurred",onDisposing:"onDisposing",onEditCanceled:"onEditCanceled",onEditCanceling:"onEditCanceling",onEditingStart:"onEditingStart",onEditorPrepared:"onEditorPrepared",onEditorPreparing:"onEditorPreparing",onExporting:"onExporting",onFocusedCellChanged:"onFocusedCellChanged",onFocusedCellChanging:"onFocusedCellChanging",onFocusedRowChanged:"onFocusedRowChanged",onFocusedRowChanging:"onFocusedRowChanging",onInitialized:"onInitialized",onInitNewRow:"onInitNewRow",onKeyDown:"onKeyDown",onOptionChanged:"onOptionChanged",onRowClick:"onRowClick",onRowCollapsed:"onRowCollapsed",onRowCollapsing:"onRowCollapsing",onRowDblClick:"onRowDblClick",onRowExpanded:"onRowExpanded",onRowExpanding:"onRowExpanding",onRowInserted:"onRowInserted",onRowInserting:"onRowInserting",onRowPrepared:"onRowPrepared",onRowRemoved:"onRowRemoved",onRowRemoving:"onRowRemoving",onRowUpdated:"onRowUpdated",onRowUpdating:"onRowUpdating",onRowValidating:"onRowValidating",onSaved:"onSaved",onSaving:"onSaving",onSelectionChanged:"onSelectionChanged",onToolbarPreparing:"onToolbarPreparing",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",allowColumnReorderingChange:"allowColumnReorderingChange",allowColumnResizingChange:"allowColumnResizingChange",autoNavigateToFocusedRowChange:"autoNavigateToFocusedRowChange",cacheEnabledChange:"cacheEnabledChange",cellHintEnabledChange:"cellHintEnabledChange",columnAutoWidthChange:"columnAutoWidthChange",columnChooserChange:"columnChooserChange",columnFixingChange:"columnFixingChange",columnHidingEnabledChange:"columnHidingEnabledChange",columnMinWidthChange:"columnMinWidthChange",columnResizingModeChange:"columnResizingModeChange",columnsChange:"columnsChange",columnWidthChange:"columnWidthChange",customizeColumnsChange:"customizeColumnsChange",dataRowTemplateChange:"dataRowTemplateChange",dataSourceChange:"dataSourceChange",dateSerializationFormatChange:"dateSerializationFormatChange",disabledChange:"disabledChange",editingChange:"editingChange",elementAttrChange:"elementAttrChange",errorRowEnabledChange:"errorRowEnabledChange",exportChange:"exportChange",filterBuilderChange:"filterBuilderChange",filterBuilderPopupChange:"filterBuilderPopupChange",filterPanelChange:"filterPanelChange",filterRowChange:"filterRowChange",filterSyncEnabledChange:"filterSyncEnabledChange",filterValueChange:"filterValueChange",focusedColumnIndexChange:"focusedColumnIndexChange",focusedRowEnabledChange:"focusedRowEnabledChange",focusedRowIndexChange:"focusedRowIndexChange",focusedRowKeyChange:"focusedRowKeyChange",groupingChange:"groupingChange",groupPanelChange:"groupPanelChange",headerFilterChange:"headerFilterChange",heightChange:"heightChange",highlightChangesChange:"highlightChangesChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",keyboardNavigationChange:"keyboardNavigationChange",keyExprChange:"keyExprChange",loadPanelChange:"loadPanelChange",masterDetailChange:"masterDetailChange",noDataTextChange:"noDataTextChange",pagerChange:"pagerChange",pagingChange:"pagingChange",remoteOperationsChange:"remoteOperationsChange",renderAsyncChange:"renderAsyncChange",repaintChangesOnlyChange:"repaintChangesOnlyChange",rowAlternationEnabledChange:"rowAlternationEnabledChange",rowDraggingChange:"rowDraggingChange",rowTemplateChange:"rowTemplateChange",rtlEnabledChange:"rtlEnabledChange",scrollingChange:"scrollingChange",searchPanelChange:"searchPanelChange",selectedRowKeysChange:"selectedRowKeysChange",selectionChange:"selectionChange",selectionFilterChange:"selectionFilterChange",showBordersChange:"showBordersChange",showColumnHeadersChange:"showColumnHeadersChange",showColumnLinesChange:"showColumnLinesChange",showRowLinesChange:"showRowLinesChange",sortByGroupSummaryInfoChange:"sortByGroupSummaryInfoChange",sortingChange:"sortingChange",stateStoringChange:"stateStoringChange",summaryChange:"summaryChange",syncLookupFilterValuesChange:"syncLookupFilterValuesChange",tabIndexChange:"tabIndexChange",toolbarChange:"toolbarChange",twoWayBindingEnabledChange:"twoWayBindingEnabledChange",visibleChange:"visibleChange",widthChange:"widthChange",wordWrapEnabledChange:"wordWrapEnabledChange"},standalone:!1,features:[ue([se,ce,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),xJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[dC,Yt,zt,Wt,Gt,Ut,qt,GC,jC,uC,JC,cC,xi,TC,FC,Sl,OC,MC,oC,fC,aC,EC,lC,Ki,ZC,sC,rC,LC,$t,Kt,jt,Qt,Xt,Ui,_C,xC,pC,gC,vC,SC,CC,bC,yC,kC,DC,IC,AC,RC,PC,BC,VC,NC,HC,hC,$C,WC,UC,qC,YC,QC,wC,tx,XC,ex,st,Se,dC,Yt,zt,Wt,Gt,Ut,qt,GC,jC,uC,JC,cC,xi,TC,FC,Sl,OC,MC,oC,fC,aC,EC,lC,Ki,ZC,sC,rC,LC,$t,Kt,jt,Qt,Xt,Ui,_C,xC,pC,gC,vC,SC,CC,bC,yC,kC,DC,IC,AC,RC,PC,BC,VC,NC,HC,hC,$C,WC,UC,qC,YC,QC,wC,tx,XC,ex,Se]})}return i})();var vJ={provide:Yi,useExisting:Zt(()=>H1),multi:!0},H1=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(t){this._setOption("acceptCustomValue",t)}get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get adaptivityEnabled(){return this._getOption("adaptivityEnabled")}set adaptivityEnabled(t){this._setOption("adaptivityEnabled",t)}get applyButtonText(){return this._getOption("applyButtonText")}set applyButtonText(t){this._setOption("applyButtonText",t)}get applyValueMode(){return this._getOption("applyValueMode")}set applyValueMode(t){this._setOption("applyValueMode",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get calendarOptions(){return this._getOption("calendarOptions")}set calendarOptions(t){this._setOption("calendarOptions",t)}get cancelButtonText(){return this._getOption("cancelButtonText")}set cancelButtonText(t){this._setOption("cancelButtonText",t)}get dateOutOfRangeMessage(){return this._getOption("dateOutOfRangeMessage")}set dateOutOfRangeMessage(t){this._setOption("dateOutOfRangeMessage",t)}get dateSerializationFormat(){return this._getOption("dateSerializationFormat")}set dateSerializationFormat(t){this._setOption("dateSerializationFormat",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get disabledDates(){return this._getOption("disabledDates")}set disabledDates(t){this._setOption("disabledDates",t)}get displayFormat(){return this._getOption("displayFormat")}set displayFormat(t){this._setOption("displayFormat",t)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(t){this._setOption("dropDownButtonTemplate",t)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(t){this._setOption("dropDownOptions",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get interval(){return this._getOption("interval")}set interval(t){this._setOption("interval",t)}get invalidDateMessage(){return this._getOption("invalidDateMessage")}set invalidDateMessage(t){this._setOption("invalidDateMessage",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get maxLength(){return this._getOption("maxLength")}set maxLength(t){this._setOption("maxLength",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get opened(){return this._getOption("opened")}set opened(t){this._setOption("opened",t)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(t){this._setOption("openOnFieldClick",t)}get pickerType(){return this._getOption("pickerType")}set pickerType(t){this._setOption("pickerType",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showAnalogClock(){return this._getOption("showAnalogClock")}set showAnalogClock(t){this._setOption("showAnalogClock",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(t){this._setOption("showDropDownButton",t)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(t){this._setOption("spellcheck",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get todayButtonText(){return this._getOption("todayButtonText")}set todayButtonText(t){this._setOption("todayButtonText",t)}get type(){return this._getOption("type")}set type(t){this._setOption("type",t)}get useMaskBehavior(){return this._getOption("useMaskBehavior")}set useMaskBehavior(t){this._setOption("useMaskBehavior",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onClosed;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;adaptivityEnabledChange;applyButtonTextChange;applyValueModeChange;buttonsChange;calendarOptionsChange;cancelButtonTextChange;dateOutOfRangeMessageChange;dateSerializationFormatChange;deferRenderingChange;disabledChange;disabledDatesChange;displayFormatChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;intervalChange;invalidDateMessageChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maxChange;maxLengthChange;minChange;nameChange;openedChange;openOnFieldClickChange;pickerTypeChange;placeholderChange;readOnlyChange;rtlEnabledChange;showAnalogClockChange;showClearButtonChange;showDropDownButtonChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;todayButtonTextChange;typeChange;useMaskBehaviorChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"adaptivityEnabledChange"},{emit:"applyButtonTextChange"},{emit:"applyValueModeChange"},{emit:"buttonsChange"},{emit:"calendarOptionsChange"},{emit:"cancelButtonTextChange"},{emit:"dateOutOfRangeMessageChange"},{emit:"dateSerializationFormatChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"disabledDatesChange"},{emit:"displayFormatChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"intervalChange"},{emit:"invalidDateMessageChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxChange"},{emit:"maxLengthChange"},{emit:"minChange"},{emit:"nameChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"pickerTypeChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showAnalogClockChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"todayButtonTextChange"},{emit:"typeChange"},{emit:"useMaskBehaviorChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new zm(t,n)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",n=>{this.eventHelper.fireNgEvent("onBlur",[n])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("disabledDates",t),this.setupChanges("validationErrors",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("disabledDates"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-date-box"]],contentQueries:function(n,o,s){if(n&1&&je(s,Ao,4),n&2){let r;Ne(r=He())&&(o.buttonsChildren=r)}},hostBindings:function(n,o){n&1&&et("valueChange",function(r){return o.change(r)})("onBlur",function(r){return o.touched(r)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",adaptivityEnabled:"adaptivityEnabled",applyButtonText:"applyButtonText",applyValueMode:"applyValueMode",buttons:"buttons",calendarOptions:"calendarOptions",cancelButtonText:"cancelButtonText",dateOutOfRangeMessage:"dateOutOfRangeMessage",dateSerializationFormat:"dateSerializationFormat",deferRendering:"deferRendering",disabled:"disabled",disabledDates:"disabledDates",displayFormat:"displayFormat",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",interval:"interval",invalidDateMessage:"invalidDateMessage",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",max:"max",maxLength:"maxLength",min:"min",name:"name",opened:"opened",openOnFieldClick:"openOnFieldClick",pickerType:"pickerType",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showAnalogClock:"showAnalogClock",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",todayButtonText:"todayButtonText",type:"type",useMaskBehavior:"useMaskBehavior",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onClosed:"onClosed",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",adaptivityEnabledChange:"adaptivityEnabledChange",applyButtonTextChange:"applyButtonTextChange",applyValueModeChange:"applyValueModeChange",buttonsChange:"buttonsChange",calendarOptionsChange:"calendarOptionsChange",cancelButtonTextChange:"cancelButtonTextChange",dateOutOfRangeMessageChange:"dateOutOfRangeMessageChange",dateSerializationFormatChange:"dateSerializationFormatChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",disabledDatesChange:"disabledDatesChange",displayFormatChange:"displayFormatChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",intervalChange:"intervalChange",invalidDateMessageChange:"invalidDateMessageChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxChange:"maxChange",maxLengthChange:"maxLengthChange",minChange:"minChange",nameChange:"nameChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",pickerTypeChange:"pickerTypeChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showAnalogClockChange:"showAnalogClockChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",todayButtonTextChange:"todayButtonTextChange",typeChange:"typeChange",useMaskBehaviorChange:"useMaskBehaviorChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},standalone:!1,features:[ue([se,ce,vJ,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),bJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[xi,qi,El,wl,$s,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,st,Se,xi,qi,El,wl,$s,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,Se]})}return i})();var zi=i=>ut.deserializeDate(i),il=(i,e)=>!i&&!e?!0:Y.sameDate(zi(i),zi(e)),nl=(i,e)=>{let[t,n]=i,[o,s]=e;return il(t,o)&&il(n,s)},$1=i=>{let[e,t]=i;return e&&t&&zi(e)>zi(t)?[t,e]:i},z1=(i,e)=>12*(e.getFullYear()-i.getFullYear())-i.getMonth()+e.getMonth();var TE=class extends Dd{constructor(e){super(),this._dateSelectedCounter=0,this.dateBox=e,this.dateRangeBox=e.option("_dateRangeBoxInstance")}popupConfig(e){return m(!0,super.popupConfig(e),{position:{of:this.getDateRangeBox().$element()}})}popupShowingHandler(){this.getWidget()._restoreViewsMinMaxOptions(),this._dateSelectedCounter=0}_getPopup(){return super._getPopup()||this.getDateRangeBox().getStartDateBox()._popup}supportedKeys(){let e=this.getDateRangeBox();return I({},super.supportedKeys(),{rightArrow:()=>{if(e.option("opened"))return!0},leftArrow:()=>{if(e.option("opened"))return!0},enter:t=>{if(e.option("opened")){let n=this.dateBox.dateOption("value");this.dateBox._valueChangeEventHandler(t);let o=this.dateBox.dateOption("value");return!il(n,o)?e.getStartDateBox().getStrategy().getWidget().option("value",e.option("value")):e.getStartDateBox().getStrategy().getWidget()._enterKeyHandler(t),!1}},tab:t=>{if(!e.option("opened"))return;if(!this._getPopup().getFocusableElements().length){(!t.shiftKey&&e._isEndDateActiveElement()||t.shiftKey&&e._isStartDateActiveElement())&&e.close();return}if(!t.shiftKey&&e._isStartDateActiveElement()||t.shiftKey&&e._isEndDateActiveElement())return;let n=t.shiftKey?e.getStartDateBox()._getLastPopupElement():e.getStartDateBox()._getFirstPopupElement();n&&(_.trigger(n,"focus"),n.select()),t.preventDefault()}})}_getWidgetOptions(){let{disabledDates:e,value:t,multiView:n}=this.dateRangeBox.option(),o=A(e)?this._injectComponent(e):e??void 0;return m(super._getWidgetOptions(),{disabledDates:o,value:t,selectionMode:"range",viewsCount:n?2:1,_allowChangeSelectionOrder:!0,_currentSelection:this.getCurrentSelection()})}_refreshActiveDescendant(e){this.getDateRangeBox().setAria("activedescendant",e.actionValue)}_injectComponent(e){return t=>e(m(t,{component:this.getDateRangeBox()}))}getKeyboardListener(){let e=this.getDateRangeBox();return e.getStartDateBox()?e.getStartDateBox().getStrategy().getWidget():this.getWidget()}getValue(){return this.getWidget().option("value")}_updateValue(){let{value:e}=this.getDateRangeBox().option();this.getWidget()&&(this._shouldPreventFocusChange=!0,this.getWidget().option("value",e))}_isInstantlyMode(){return this.getDateRangeBox().option("applyValueMode")==="instantly"}_valueChangedHandler(e){let{value:t,previousValue:n,event:o}=e;if(nl(t,n)&&!this.getWidget()._valueSelected){this._shouldPreventFocusChange=!1;return}this.getWidget()._valueSelected=!1;let s=this.getDateRangeBox();if(this._isInstantlyMode()){if(!s.option("disableOutOfRangeSelection")){if(this._getCalendarCurrentSelection()==="startDate")this._dateSelectedCounter=0;else if(this._dateSelectedCounter=1,!t[0])this._dateSelectedCounter=-1;else if(zi(t[0])>zi(t[1])){s.updateValue([t[0],null],o);return}}if(s.updateValue(t,o),this._dateSelectedCounter+=1,this._dateSelectedCounter===2){s.close();return}}else if(this._getCalendarCurrentSelection()==="endDate"&&t[0]&&zi(t[0])>zi(t[1]))return;this._shouldPreventFocusChange||this._moveFocusToNextInput(),this._shouldPreventFocusChange=!1}_moveFocusToNextInput(){let e=this._getCalendarCurrentSelection()==="startDate"?this.getDateRangeBox().getEndDateBox():this.getDateRangeBox().getStartDateBox();e.focus(),_.trigger(e.field(),"dxclick")}getCurrentSelection(){return this.getDateRangeBox().option("_currentSelection")}_getCalendarCurrentSelection(){return this.getWidget().option("_currentSelection")}_closeDropDownByEnter(){return this._getCalendarCurrentSelection()!=="startDate"}dateBoxValue(){let{dateBox:e}=this;return arguments.length?e.dateValue.apply(e,arguments):e.dateOption.apply(e,["value"])}_cellClickHandler(){}setActiveStartDateBox(){this.dateBox=this.getDateRangeBox().getStartDateBox()}setActiveEndDateBox(){this.dateBox=this.getDateRangeBox().getEndDateBox()}getDateRangeBox(){return this.dateRangeBox}getWidget(){return this._widget}},W1=TE;var yJ=zm,AE=class extends yJ{_initStrategy(){this._strategy=new W1(this)}_initMarkup(){super._initMarkup(),this._renderInputClickEvent()}_renderInputClickEvent(){let e=D("dxclick",this.NAME);_.off(this._input(),e),_.on(this._input(),e,t=>{this._processValueChange(t)})}_applyButtonHandler(e){let{event:t}=e,n=this.getStrategy(),o=n.getValue();n.getDateRangeBox().updateValue(o,t),this.close(),this.option("focusStateEnabled")&&this.focus()}_openHandler(e){this.getStrategy().getDateRangeBox().option("opened")||super._openHandler(e)}_renderOpenedState(){let{opened:e}=this.option();this._getDateRangeBox().option("opened",e),this._isStartDateBox()&&(e&&this._createPopup(),this._getDateRangeBox()._popupContentIdentifier(this._getControlsAria()),this._setPopupOption("visible",e),this._getDateRangeBox()._setAriaAttributes())}_getDateRangeBox(){return this.getStrategy().getDateRangeBox()}_isStartDateBox(){return u(this.element()).hasClass("dx-start-datebox")}_renderPopup(){super._renderPopup(),this._isStartDateBox()&&this._getDateRangeBox()._bindInnerWidgetOptions(this._popup,"dropDownOptions")}_popupShownHandler(){var e;super._popupShownHandler(),(e=this._getDateRangeBox()._validationMessage)===null||e===void 0||e.option("positionSide",this._getValidationMessagePositionSide())}_popupHiddenHandler(){var e;super._popupHiddenHandler(),(e=this._getDateRangeBox()._validationMessage)===null||e===void 0||e.option("positionSide",this._getValidationMessagePositionSide())}_focusInHandler(e){super._focusInHandler(e),this._processValueChange(e)}_popupTabHandler(e){let t=u(e.target);e.shiftKey&&t.is(this._getFirstPopupElement())&&(this._getDateRangeBox().getEndDateBox().focus(),e.preventDefault()),!e.shiftKey&&t.is(this._getLastPopupElement())&&(this._getDateRangeBox().getStartDateBox().focus(),e.preventDefault())}_processValueChange(e){let{target:t}=e,n=this._getDateRangeBox(),[o,s]=n.field();if(u(t).is(u(o))&&n.option("_currentSelection","startDate"),u(t).is(u(s))&&n.option("_currentSelection","endDate"),!n.getStartDateBox().getStrategy().getWidget())return;let r=n.getStartDateBox().getStrategy().getWidget(),{value:a}=r.option(),l=zi(a?.[0]),d=zi(a?.[1]);u(t).is(u(o))&&(l&&(r._skipNavigate=!0,r.option("currentDate",l)),this.getStrategy().setActiveStartDateBox(),r.option("_currentSelection","startDate"),n.option("disableOutOfRangeSelection")&&r._setViewsMaxOption(d)),u(t).is(u(s))&&(d&&(l&&z1(l,d)>1&&(r.option("currentDate",r._getDateByOffset(null,d)),r.option("currentDate",r._getDateByOffset(-1,d))),r._skipNavigate=!0,r.option("currentDate",d)),n.getStartDateBox().getStrategy().setActiveEndDateBox(),r.option("_currentSelection","endDate"),n.option("disableOutOfRangeSelection")&&r._setViewsMinOption(l))}_invalidate(){super._invalidate(),this._refreshStrategy()}_updateInternalValidationState(e,t){this.option({isValid:e,validationError:e?null:{message:t}})}_recallInternalValidation(e){this._applyInternalValidation(e)}_isTargetOutOfComponent(e){let t=u(this._getDateRangeBox().element()),n=u(e).closest(t).length===0;return super._isTargetOutOfComponent(e)&&n}_updateLabelWidth(){let e=this._getDateRangeBox()._$beforeButtonsContainer,{labelMode:t}=this.option();if(t==="outside"&&e&&this._isStartDateBox()){this._label._updateLabelTransform(W(e));return}super._updateLabelWidth()}_optionChanged(e){switch(e.name){case"isValid":{let t=this._getDateRangeBox().option("isValid");if(this._skipIsValidOptionChange||t===e.value){super._optionChanged(e);return}this._skipIsValidOptionChange=!0,this.option({isValid:t}),this._skipIsValidOptionChange=!1;break}default:super._optionChanged(e)}}close(){this.getStrategy().getDateRangeBox().getStartDateBox().option("opened",!1)}getStrategy(){return this._strategy}},ME=AE;var G1="dx-texteditor-with-floating-label";var OJ="dx-show-invalid-badge";var EJ=["KeyDown","KeyUp","Change","Cut","Copy","Paste","Input","EnterKey"],Jf=class extends vi{_getDefaultOptions(){return m(super._getDefaultOptions(),{acceptCustomValue:!0,activeStateEnabled:!0,applyButtonText:O.format("OK"),applyValueMode:"instantly",buttons:void 0,calendarOptions:{},cancelButtonText:O.format("Cancel"),endDateOutOfRangeMessage:O.format("dxDateRangeBox-endDateOutOfRangeMessage"),dateSerializationFormat:void 0,deferRendering:!0,disableOutOfRangeSelection:!1,disabledDates:null,displayFormat:null,dropDownButtonTemplate:"dropDownButton",dropDownOptions:{},endDate:null,endDateInputAttr:{},endDateLabel:O.format("dxDateRangeBox-endDateLabel"),endDateName:"",endDatePlaceholder:"",endDateText:void 0,focusStateEnabled:!0,hoverStateEnabled:!0,invalidStartDateMessage:O.format("dxDateRangeBox-invalidStartDateMessage"),invalidEndDateMessage:O.format("dxDateRangeBox-invalidEndDateMessage"),isValid:!0,labelMode:"static",max:void 0,min:void 0,multiView:!0,onChange:null,onClosed:null,onCopy:null,onCut:null,onEnterKey:null,onInput:null,onKeyDown:null,onKeyUp:null,onOpened:null,onPaste:null,onValueChanged:null,openOnFieldClick:!0,opened:!1,pickerType:"calendar",readOnly:!1,showClearButton:!1,showDropDownButton:!0,spellcheck:!1,startDate:null,startDateInputAttr:{},startDateLabel:O.format("dxDateRangeBox-startDateLabel"),startDateName:"",startDateOutOfRangeMessage:O.format("dxDateRangeBox-startDateOutOfRangeMessage"),startDatePlaceholder:"",startDateText:void 0,stylingMode:xe().editorStylingMode??"outlined",todayButtonText:O.format("dxCalendar-todayButtonText"),useHiddenSubmitElement:!1,useMaskBehavior:!1,validationError:null,validationErrors:null,validationMessageMode:"auto",validationMessagePosition:"auto",validationStatus:"valid",value:[null,null],valueChangeEvent:"change",_internalValidationErrors:[],_currentSelection:"startDate"})}_defaultOptionsRules(){return super._defaultOptionsRules().concat([{device(){let e=yt();return ht(e)},options:{labelMode:"floating",stylingMode:xe().editorStylingMode??"filled"}},{device(){let e=yt();return Ot(e)},options:{labelMode:"outside"}},{device(){let e=F.real(),{platform:t}=e;return t==="ios"||t==="android"},options:{multiView:!1}}])}_initOptions(e){super._initOptions(e);let{value:t}=this.initialOption(),{value:n,startDate:o,endDate:s}=this.option();n[0]&&n[1]&&zi(n[0])>zi(n[1])&&(n=[n[1],n[0]]),o&&s&&zi(o)>zi(s)&&([o,s]=[s,o]),nl(t,n)?n=[o,s]:[o,s]=n,this.option({startDate:o,endDate:s,value:n})}_createOpenAction(){this._openAction=this._createActionByOption("onOpened",{excludeValidators:["disabled","readOnly"]})}_raiseOpenAction(){this._openAction||this._createOpenAction(),this._openAction()}_createCloseAction(){this._closeAction=this._createActionByOption("onClosed",{excludeValidators:["disabled","readOnly"]})}_raiseCloseAction(){this._closeAction||this._createCloseAction(),this._closeAction()}_createEventAction(e){this[`_${ki(e)}Action`]=this._createActionByOption(`on${e}`,{excludeValidators:["readOnly"]})}_raiseAction(e,t){this[`_${ki(e)}Action`]||this._createEventAction(e),this[`_${ki(e)}Action`]({event:t})}_initTemplates(){this._templateManager.addDefaultTemplates({dropDownButton:new Mn(e=>{let t=u("<div>").addClass("dx-dropdowneditor-icon");u(e.container).append(t)})}),super._initTemplates()}_getDefaultButtons(){return[{name:"clear",Ctor:Zl},{name:"dropDown",Ctor:yd}]}_initMarkup(){u(this.element()).addClass("dx-daterangebox").addClass("dx-texteditor").addClass("dx-dropdowneditor"),this._toggleDropDownEditorActiveClass(),this._toggleEditorLabelClass(),this._toggleReadOnlyState(),this._renderStylingMode(),this._renderEndDateBox(),this._renderSeparator(),this._renderStartDateBox(),this._toggleEmptinessState(),this._renderEmptinessEvent(),this._renderButtonsContainer(),super._initMarkup(),u(this.element()).removeClass(OJ)}_renderEmptinessEvent(){let e=D("input blur",this.NAME);_.off(this._focusTarget(),e),_.on(this._focusTarget(),e,this._toggleEmptinessState.bind(this))}_toggleEmptinessState(){let e=u(this.getStartDateBox().element()).hasClass("dx-texteditor-empty")&&u(this.getEndDateBox().element()).hasClass("dx-texteditor-empty");u(this.element()).toggleClass("dx-texteditor-empty",e)}_attachKeyboardEvents(){this.option("readOnly")||super._attachKeyboardEvents()}_toggleReadOnlyState(){let{readOnly:e}=this.option();u(this.element()).toggleClass("dx-state-readonly",!!e)}_toggleDropDownEditorActiveClass(){let{opened:e}=this.option();u(this.element()).toggleClass("dx-dropdowneditor-active",e)}_toggleEditorLabelClass(){let{startDateLabel:e,endDateLabel:t,labelMode:n}=this.option(),o=(!!e||!!t)&&n!=="hidden";u(this.element()).removeClass(G1).removeClass("dx-texteditor-label-outside").removeClass("dx-texteditor-with-label"),o&&(u(this.element()).addClass(n==="floating"?G1:"dx-texteditor-with-label"),n==="outside"&&u(this.element()).addClass("dx-texteditor-label-outside"))}_renderStartDateBox(){this._$startDateBox=u("<div>").addClass("dx-start-datebox").prependTo(this.$element()),this._startDateBox=this._createComponent(this._$startDateBox,ME,this._getStartDateBoxConfig()),this._startDateBox.NAME="_StartDateBox"}_renderEndDateBox(){this._$endDateBox=u("<div>").addClass("dx-end-datebox").appendTo(this.$element()),this._endDateBox=this._createComponent(this._$endDateBox,ME,this._getEndDateBoxConfig()),this._endDateBox.NAME="_EndDateBox"}_renderSeparator(){let e=Mi("to");this._$separator=u("<div>").addClass("dx-daterangebox-separator").prependTo(this.$element()),this._renderPreventBlurOnSeparatorClick(),e?.appendTo(this._$separator)}_renderPreventBlurOnSeparatorClick(){let e=D("mousedown",this.NAME);_.off(this._$separator,e),_.on(this._$separator,e,t=>{this._hasActiveElement()||this.focus(),t.preventDefault()})}_renderButtonsContainer(){this._buttonCollection=new ad(this,this._getDefaultButtons()),this._$beforeButtonsContainer=void 0,this._$afterButtonsContainer=void 0;let{buttons:e}=this.option();this._$beforeButtonsContainer=this._buttonCollection.renderBeforeButtons(e,this.$element()),this._$afterButtonsContainer=this._buttonCollection.renderAfterButtons(e,this.$element())}_updateButtons(e){this._buttonCollection.updateButtons(e)}_openHandler(){this._toggleOpenState()}_shouldCallOpenHandler(){return!0}_toggleOpenState(){let{opened:e}=this.option();e||this.getStartDateBox()._focusInput(),this.option("readOnly")||this.option("opened",!this.option("opened"))}_clearValueHandler(e){e.stopPropagation(),this._saveValueChangeEvent(e),this.clear(),!this._isStartDateActiveElement()&&this.focus(),_.trigger(u(this.startDateField()),"input")}_isClearButtonVisible(){return this.option("showClearButton")&&!this.option("readOnly")}_focusInHandler(e){this._shouldSkipFocusEvent(e)||super._focusInHandler(e)}_focusOutHandler(e){this._shouldSkipFocusEvent(e)||super._focusOutHandler(e)}_shouldSkipFocusEvent(e){let{target:t,relatedTarget:n}=e;return u(t).is(u(this.startDateField()))&&u(n).is(u(this.endDateField()))||u(t).is(u(this.endDateField()))&&u(n).is(u(this.startDateField()))}_getPickerType(){let{pickerType:e}=this.option();return["calendar","native"].includes(e)?e:"calendar"}_getRestErrors(e,t){return e.filter(n=>!t.some(o=>n.message===o.message))}_syncValidationErrors(e,t,n){t||(t=[]),n||(n=[]);let o=this.option(e)||[],s=this._getRestErrors(o,n);this.option(e,[...s,...t])}_getDateBoxConfig(){let e=this.option(),t={acceptCustomValue:e.acceptCustomValue,activeStateEnabled:e.activeStateEnabled,applyValueMode:e.applyValueMode,dateSerializationFormat:e.dateSerializationFormat,deferRendering:e.deferRendering,disabled:e.disabled,displayFormat:e.displayFormat,focusStateEnabled:e.focusStateEnabled,isValid:e.isValid,tabIndex:e.tabIndex,height:e.height,hoverStateEnabled:e.hoverStateEnabled,labelMode:e.labelMode,max:e.max,min:e.min,openOnFieldClick:e.openOnFieldClick,pickerType:this._getPickerType(),readOnly:e.readOnly,rtlEnabled:e.rtlEnabled,spellcheck:e.spellcheck,stylingMode:e.stylingMode,type:"date",useMaskBehavior:e.useMaskBehavior,validationMessageMode:e.validationMessageMode,validationMessagePosition:e.validationMessagePosition,valueChangeEvent:e.valueChangeEvent,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,onChange:e.onChange,onInput:e.onInput,onCut:e.onCut,onCopy:e.onCopy,onPaste:e.onPaste,onEnterKey:e.onEnterKey,_dateRangeBoxInstance:this,_showValidationMessage:!1};return x(EJ,(n,o)=>{let s=`on${o}`;this.hasActionSubscription(s)&&(t[s]=r=>{this._raiseAction(o,r.event)})}),t}_hideOnOutsideClickHandler(e){let{target:t}=e,n=u(t),o=this.getButton("dropDown"),s=o?.$element(),r=!!n.closest(u(this.element())).length,a=!!n.closest(s).length;return!r&&!a}_getStartDateBoxConfig(){var e;let t=this.option();return I({},this._getDateBoxConfig(),{applyButtonText:t.applyButtonText,calendarOptions:t.calendarOptions,cancelButtonText:t.cancelButtonText,dateOutOfRangeMessage:t.startDateOutOfRangeMessage,deferRendering:t.deferRendering,disabledDates:(e=t.dropDownOptions)===null||e===void 0?void 0:e.disabledDates,dropDownOptions:I({showTitle:!1,title:"",hideOnOutsideClick:n=>this._hideOnOutsideClickHandler(n),hideOnParentScroll:!1,preventScrollEvents:!1},t.dropDownOptions),invalidDateMessage:t.invalidStartDateMessage,onValueChanged:n=>{let{value:o,event:s}=n,r=[o,this.option("value")[1]];this.updateValue(r,s)},opened:t.opened,onOpened:()=>{this._raiseOpenAction()},onClosed:()=>{this._raiseCloseAction()},onOptionChanged:n=>{let{name:o,value:s,previousValue:r}=n;o==="text"&&this.option("startDateText",s),o==="validationErrors"&&this._syncValidationErrors("_internalValidationErrors",s,r)},todayButtonText:t.todayButtonText,showClearButton:!1,showDropDownButton:!1,value:this.option("value")[0],label:t.startDateLabel,placeholder:t.startDatePlaceholder,inputAttr:t.startDateInputAttr,name:t.startDateName,_showValidationIcon:!1})}_getEndDateBoxConfig(){let e=this.option();return I({},this._getDateBoxConfig(),{invalidDateMessage:e.invalidEndDateMessage,dateOutOfRangeMessage:e.endDateOutOfRangeMessage,onValueChanged:t=>{let{value:n,event:o}=t,s=[this.option("value")[0],n];this.updateValue(s,o)},onOptionChanged:t=>{let{name:n,value:o,previousValue:s}=t;n==="text"&&this.option("endDateText",o),n==="validationErrors"&&this._syncValidationErrors("_internalValidationErrors",o,s)},opened:e.opened,showClearButton:!1,showDropDownButton:!1,value:this.option("value")[1],label:e.endDateLabel,placeholder:e.endDatePlaceholder,deferRendering:!0,inputAttr:e.endDateInputAttr,name:e.endDateName})}_getValidationMessagePosition(){let{validationMessagePosition:e}=this.option();return e==="auto"?this.option("opened")?"top":"bottom":e}_getSerializedDates(e){let[t,n]=e;return[this.getStartDateBox()._serializeDate(zi(t)),this.getStartDateBox()._serializeDate(zi(n))]}updateValue(e,t){nl(e,this.option("value"))||(t&&this._saveValueChangeEvent(t),this.option("value",this._getSerializedDates(e)))}_updateDateBoxesValue(e){let t=this.getStartDateBox(),n=this.getEndDateBox(),[o,s]=e,r=t.option("value"),a=n.option("value");il(o,r)||t.option("value",o),il(s,a)||n.option("value",s)}_renderAccessKey(){let e=u(this.field()[0]),{accessKey:t}=this.option();e.attr("accesskey",t)}_focusTarget(){return u(this.element()).find(".dx-texteditor-input")}_focusEventTarget(){return this.element()}_focusClassTarget(){return this.$element()}_toggleFocusClass(e,t){super._toggleFocusClass(e,this._focusClassTarget(t))}_hasActiveElement(){return this._isStartDateActiveElement()||this._isEndDateActiveElement()}_isStartDateActiveElement(){return this._isActiveElement(this.startDateField())}_isEndDateActiveElement(){return this._isActiveElement(this.endDateField())}_isActiveElement(e){return u(e).is(u(S.getActiveElement(e)))}_popupContentIdentifier(e){return e&&(this._popupContentId=e),this._popupContentId}_setAriaAttributes(){let{opened:e}=this.option(),t={expanded:e,controls:this._popupContentIdentifier()},n=e?this._popupContentIdentifier():void 0;this.setAria(t),this.setAria("owns",n,this.$element())}_cleanButtonContainers(){var e,t;(e=this._$beforeButtonsContainer)===null||e===void 0||e.remove(),(t=this._$afterButtonsContainer)===null||t===void 0||t.remove(),this._buttonCollection.clean(),this._$beforeButtonsContainer=void 0,this._$afterButtonsContainer=void 0}_applyCustomValidation(e){this.validationRequest.fire({editor:this,value:e})}_clean(){var e,t,n;this._cleanButtonContainers(),(e=this._$startDateBox)===null||e===void 0||e.remove(),(t=this._$endDateBox)===null||t===void 0||t.remove(),(n=this._$separator)===null||n===void 0||n.remove(),super._clean()}_optionChanged(e){let{name:t,fullName:n,value:o,previousValue:s}=e;switch(t){case"acceptCustomValue":case"dateSerializationFormat":case"displayFormat":case"max":case"min":case"openOnFieldClick":case"spellcheck":case"useMaskBehavior":case"valueChangeEvent":this.getStartDateBox().option(t,o),this.getEndDateBox().option(t,o);break;case"rtlEnabled":default:super._optionChanged(e);break;case"labelMode":this._toggleEditorLabelClass(),this.getStartDateBox().option(t,o),this.getEndDateBox().option(t,o);break;case"applyButtonText":case"applyValueMode":case"cancelButtonText":case"deferRendering":case"disabledDates":case"todayButtonText":this.getStartDateBox().option(t,o);break;case"opened":this._toggleDropDownEditorActiveClass(),this.getStartDateBox().option(t,o),this.getEndDateBox()._setOptionWithoutOptionChange(t,o);break;case"buttons":this._cleanButtonContainers(),this._renderButtonsContainer();break;case"calendarOptions":case"dropDownOptions":this.getStartDateBox().option(n,o);break;case"pickerType":{let r=this._getPickerType();this.getStartDateBox().option(t,r),this.getEndDateBox().option(t,r);break}case"height":this.getStartDateBox().option(t,o),this.getEndDateBox().option(t,o),super._optionChanged(e);break;case"dropDownButtonTemplate":case"showDropDownButton":this._updateButtons(["dropDown"]);break;case"showClearButton":this._updateButtons(["clear"]);break;case"endDate":this.updateValue([this.option("value")[0],o]);break;case"startDateLabel":this._toggleEditorLabelClass(),this.getStartDateBox().option("label",o);break;case"endDateLabel":this._toggleEditorLabelClass(),this.getEndDateBox().option("label",o);break;case"startDatePlaceholder":this.getStartDateBox().option("placeholder",o);break;case"endDatePlaceholder":this.getEndDateBox().option("placeholder",o);break;case"startDateInputAttr":this.getStartDateBox().option("inputAttr",o);break;case"startDateName":this.getStartDateBox().option("name",o);break;case"endDateInputAttr":this.getEndDateBox().option("inputAttr",o);break;case"endDateName":this.getEndDateBox().option("name",o);break;case"multiView":this.getStartDateBox().option("calendarOptions.viewsCount",o?2:1);break;case"tabIndex":case"activeStateEnabled":case"focusStateEnabled":case"hoverStateEnabled":super._optionChanged(e),this.getStartDateBox().option(t,o),this.getEndDateBox().option(t,o);break;case"onValueChanged":this._createValueChangeAction();break;case"onOpened":this._createOpenAction();break;case"onClosed":this._createCloseAction();break;case"onKeyDown":case"onKeyUp":case"onChange":case"onInput":case"onCut":case"onCopy":case"onPaste":case"onEnterKey":this._createEventAction(t.replace("on",""));break;case"readOnly":case"disabled":this._updateButtons(),super._optionChanged(e),this.getStartDateBox().option(t,o),this.getEndDateBox().option(t,o);break;case"disableOutOfRangeSelection":case"startDateText":case"endDateText":case"useHiddenSubmitElement":case"_currentSelection":break;case"startDate":this.updateValue([o,this.option("value")[1]]);break;case"stylingMode":this._renderStylingMode(),this.getStartDateBox().option(t,o),this.getEndDateBox().option(t,o);break;case"invalidStartDateMessage":this.getStartDateBox().option("invalidDateMessage",o);break;case"invalidEndDateMessage":this.getEndDateBox().option("invalidDateMessage",o);break;case"startDateOutOfRangeMessage":this.getStartDateBox().option("dateOutOfRangeMessage",o);break;case"endDateOutOfRangeMessage":this.getEndDateBox().option("dateOutOfRangeMessage",o);break;case"validationMessagePosition":this.getStartDateBox().option(t,o),super._optionChanged(e);break;case"_internalValidationErrors":{this._syncValidationErrors("validationErrors",o,s);let r=this.option("validationErrors");this.option("isValid",!(r!=null&&r.length));break}case"isValid":{this.getStartDateBox().option(t,o),this.getEndDateBox().option(t,o);let r=o&&!this.option("_internalValidationErrors").length;if(this._shouldSkipIsValidChange||r===o){super._optionChanged(e);return}this._shouldSkipIsValidChange=!0,this.option("isValid",r),this._shouldSkipIsValidChange=!1;break}case"validationErrors":{let r=this.option("_internalValidationErrors")||[],a=o||[],d=[...this._getRestErrors(a,r),...r],c=d.length?d:null;this._options.silent("validationErrors",c),super._optionChanged(I({},e,{value:c}));break}case"value":{let r=$1(o);if(!nl(r,s)){let a=!nl(r,this._initialValue);this.option("isDirty",a),this._setOptionWithoutOptionChange("value",r),this._setOptionWithoutOptionChange("startDate",r[0]),this._setOptionWithoutOptionChange("endDate",r[1]),this._applyCustomValidation(r),this._updateDateBoxesValue(r),this.getStartDateBox().getStrategy().renderValue(),this._toggleEmptinessState(),this._raiseValueChangeAction(r,s),this._saveValueChangeEvent(void 0)}break}}}getStartDateBox(){return this._startDateBox}getEndDateBox(){return this._endDateBox}getButton(e){return this._buttonCollection.getButton(e)}open(){this.option("opened",!0)}close(){this.option("opened",!1)}content(){return this.getStartDateBox().content()}field(){return[this.startDateField(),this.endDateField()]}startDateField(){return this.getStartDateBox().field()}endDateField(){return this.getEndDateBox().field()}focus(){this.getStartDateBox().focus()}reset(){super.reset();let e=this.getStartDateBox(),t=this.getEndDateBox();e.reset(),t.reset(),e._updateInternalValidationState(!0),t._updateInternalValidationState(!0)}clear(){super.clear(),this.getEndDateBox().clear(),this.getStartDateBox().clear()}};K("dxDateRangeBox",Jf);var j1=Jf;var K1=j1;var wJ={provide:Yi,useExisting:Zt(()=>U1),multi:!0},U1=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(t){this._setOption("acceptCustomValue",t)}get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get applyButtonText(){return this._getOption("applyButtonText")}set applyButtonText(t){this._setOption("applyButtonText",t)}get applyValueMode(){return this._getOption("applyValueMode")}set applyValueMode(t){this._setOption("applyValueMode",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get calendarOptions(){return this._getOption("calendarOptions")}set calendarOptions(t){this._setOption("calendarOptions",t)}get cancelButtonText(){return this._getOption("cancelButtonText")}set cancelButtonText(t){this._setOption("cancelButtonText",t)}get dateSerializationFormat(){return this._getOption("dateSerializationFormat")}set dateSerializationFormat(t){this._setOption("dateSerializationFormat",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get disableOutOfRangeSelection(){return this._getOption("disableOutOfRangeSelection")}set disableOutOfRangeSelection(t){this._setOption("disableOutOfRangeSelection",t)}get displayFormat(){return this._getOption("displayFormat")}set displayFormat(t){this._setOption("displayFormat",t)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(t){this._setOption("dropDownButtonTemplate",t)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(t){this._setOption("dropDownOptions",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get endDate(){return this._getOption("endDate")}set endDate(t){this._setOption("endDate",t)}get endDateInputAttr(){return this._getOption("endDateInputAttr")}set endDateInputAttr(t){this._setOption("endDateInputAttr",t)}get endDateLabel(){return this._getOption("endDateLabel")}set endDateLabel(t){this._setOption("endDateLabel",t)}get endDateName(){return this._getOption("endDateName")}set endDateName(t){this._setOption("endDateName",t)}get endDateOutOfRangeMessage(){return this._getOption("endDateOutOfRangeMessage")}set endDateOutOfRangeMessage(t){this._setOption("endDateOutOfRangeMessage",t)}get endDatePlaceholder(){return this._getOption("endDatePlaceholder")}set endDatePlaceholder(t){this._setOption("endDatePlaceholder",t)}get endDateText(){return this._getOption("endDateText")}set endDateText(t){this._setOption("endDateText",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get invalidEndDateMessage(){return this._getOption("invalidEndDateMessage")}set invalidEndDateMessage(t){this._setOption("invalidEndDateMessage",t)}get invalidStartDateMessage(){return this._getOption("invalidStartDateMessage")}set invalidStartDateMessage(t){this._setOption("invalidStartDateMessage",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get multiView(){return this._getOption("multiView")}set multiView(t){this._setOption("multiView",t)}get opened(){return this._getOption("opened")}set opened(t){this._setOption("opened",t)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(t){this._setOption("openOnFieldClick",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(t){this._setOption("showDropDownButton",t)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(t){this._setOption("spellcheck",t)}get startDate(){return this._getOption("startDate")}set startDate(t){this._setOption("startDate",t)}get startDateInputAttr(){return this._getOption("startDateInputAttr")}set startDateInputAttr(t){this._setOption("startDateInputAttr",t)}get startDateLabel(){return this._getOption("startDateLabel")}set startDateLabel(t){this._setOption("startDateLabel",t)}get startDateName(){return this._getOption("startDateName")}set startDateName(t){this._setOption("startDateName",t)}get startDateOutOfRangeMessage(){return this._getOption("startDateOutOfRangeMessage")}set startDateOutOfRangeMessage(t){this._setOption("startDateOutOfRangeMessage",t)}get startDatePlaceholder(){return this._getOption("startDatePlaceholder")}set startDatePlaceholder(t){this._setOption("startDatePlaceholder",t)}get startDateText(){return this._getOption("startDateText")}set startDateText(t){this._setOption("startDateText",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get todayButtonText(){return this._getOption("todayButtonText")}set todayButtonText(t){this._setOption("todayButtonText",t)}get useMaskBehavior(){return this._getOption("useMaskBehavior")}set useMaskBehavior(t){this._setOption("useMaskBehavior",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onClosed;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;applyButtonTextChange;applyValueModeChange;buttonsChange;calendarOptionsChange;cancelButtonTextChange;dateSerializationFormatChange;deferRenderingChange;disabledChange;disableOutOfRangeSelectionChange;displayFormatChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;endDateChange;endDateInputAttrChange;endDateLabelChange;endDateNameChange;endDateOutOfRangeMessageChange;endDatePlaceholderChange;endDateTextChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;invalidEndDateMessageChange;invalidStartDateMessageChange;isDirtyChange;isValidChange;labelModeChange;maxChange;minChange;multiViewChange;openedChange;openOnFieldClickChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showDropDownButtonChange;spellcheckChange;startDateChange;startDateInputAttrChange;startDateLabelChange;startDateNameChange;startDateOutOfRangeMessageChange;startDatePlaceholderChange;startDateTextChange;stylingModeChange;tabIndexChange;todayButtonTextChange;useMaskBehaviorChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"applyButtonTextChange"},{emit:"applyValueModeChange"},{emit:"buttonsChange"},{emit:"calendarOptionsChange"},{emit:"cancelButtonTextChange"},{emit:"dateSerializationFormatChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"disableOutOfRangeSelectionChange"},{emit:"displayFormatChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"endDateChange"},{emit:"endDateInputAttrChange"},{emit:"endDateLabelChange"},{emit:"endDateNameChange"},{emit:"endDateOutOfRangeMessageChange"},{emit:"endDatePlaceholderChange"},{emit:"endDateTextChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"invalidEndDateMessageChange"},{emit:"invalidStartDateMessageChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelModeChange"},{emit:"maxChange"},{emit:"minChange"},{emit:"multiViewChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"spellcheckChange"},{emit:"startDateChange"},{emit:"startDateInputAttrChange"},{emit:"startDateLabelChange"},{emit:"startDateNameChange"},{emit:"startDateOutOfRangeMessageChange"},{emit:"startDatePlaceholderChange"},{emit:"startDateTextChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"todayButtonTextChange"},{emit:"useMaskBehaviorChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new K1(t,n)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",n=>{this.eventHelper.fireNgEvent("onBlur",[n])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("validationErrors",t),this.setupChanges("value",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("validationErrors"),this._idh.doCheck("value"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-date-range-box"]],contentQueries:function(n,o,s){if(n&1&&je(s,Ao,4),n&2){let r;Ne(r=He())&&(o.buttonsChildren=r)}},hostBindings:function(n,o){n&1&&et("valueChange",function(r){return o.change(r)})("onBlur",function(r){return o.touched(r)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",applyButtonText:"applyButtonText",applyValueMode:"applyValueMode",buttons:"buttons",calendarOptions:"calendarOptions",cancelButtonText:"cancelButtonText",dateSerializationFormat:"dateSerializationFormat",deferRendering:"deferRendering",disabled:"disabled",disableOutOfRangeSelection:"disableOutOfRangeSelection",displayFormat:"displayFormat",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",endDate:"endDate",endDateInputAttr:"endDateInputAttr",endDateLabel:"endDateLabel",endDateName:"endDateName",endDateOutOfRangeMessage:"endDateOutOfRangeMessage",endDatePlaceholder:"endDatePlaceholder",endDateText:"endDateText",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",invalidEndDateMessage:"invalidEndDateMessage",invalidStartDateMessage:"invalidStartDateMessage",isDirty:"isDirty",isValid:"isValid",labelMode:"labelMode",max:"max",min:"min",multiView:"multiView",opened:"opened",openOnFieldClick:"openOnFieldClick",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",spellcheck:"spellcheck",startDate:"startDate",startDateInputAttr:"startDateInputAttr",startDateLabel:"startDateLabel",startDateName:"startDateName",startDateOutOfRangeMessage:"startDateOutOfRangeMessage",startDatePlaceholder:"startDatePlaceholder",startDateText:"startDateText",stylingMode:"stylingMode",tabIndex:"tabIndex",todayButtonText:"todayButtonText",useMaskBehavior:"useMaskBehavior",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onClosed:"onClosed",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",applyButtonTextChange:"applyButtonTextChange",applyValueModeChange:"applyValueModeChange",buttonsChange:"buttonsChange",calendarOptionsChange:"calendarOptionsChange",cancelButtonTextChange:"cancelButtonTextChange",dateSerializationFormatChange:"dateSerializationFormatChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",disableOutOfRangeSelectionChange:"disableOutOfRangeSelectionChange",displayFormatChange:"displayFormatChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",endDateChange:"endDateChange",endDateInputAttrChange:"endDateInputAttrChange",endDateLabelChange:"endDateLabelChange",endDateNameChange:"endDateNameChange",endDateOutOfRangeMessageChange:"endDateOutOfRangeMessageChange",endDatePlaceholderChange:"endDatePlaceholderChange",endDateTextChange:"endDateTextChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",invalidEndDateMessageChange:"invalidEndDateMessageChange",invalidStartDateMessageChange:"invalidStartDateMessageChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelModeChange:"labelModeChange",maxChange:"maxChange",minChange:"minChange",multiViewChange:"multiViewChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",spellcheckChange:"spellcheckChange",startDateChange:"startDateChange",startDateInputAttrChange:"startDateInputAttrChange",startDateLabelChange:"startDateLabelChange",startDateNameChange:"startDateNameChange",startDateOutOfRangeMessageChange:"startDateOutOfRangeMessageChange",startDatePlaceholderChange:"startDatePlaceholderChange",startDateTextChange:"startDateTextChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",todayButtonTextChange:"todayButtonTextChange",useMaskBehaviorChange:"useMaskBehaviorChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},standalone:!1,features:[ue([se,ce,wJ,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),SJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[xi,qi,El,wl,$s,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,st,Se,xi,qi,El,wl,$s,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,Se]})}return i})();var Eo={moveTo(i){let{$element:e}=i,{position:t}=i,n=i.direction||"left",o={},s;switch(n){case"right":o.transform=`translate(${t}px, 0px)`,s="custom";break;case"left":o.left=t,s="slide";break;case"top":case"bottom":o.top=t,s="slide"}fe.animate(e,{type:s,to:o,duration:i.duration,complete:i.complete})},margin(i){let{$element:e}=i,{margin:t}=i,n=i.direction||"left",o={};o[`margin${ki(n,!0)}`]=t,fe.animate(e,{to:o,duration:i.duration,complete:i.complete})},fade(i,e,t,n){fe.animate(i,{type:"fade",to:e.to,from:e.from,duration:t,complete:n})},size(i){let{$element:e}=i,{size:t}=i,n=i.direction||"left",o=i.marginTop||0,{duration:s}=i,r={};n==="right"||n==="left"?r.width=t:r.height=t,n==="bottom"&&(r.marginTop=o),fe.animate(e,{to:r,duration:s,complete:i.complete})},complete(i){fe.stop(i,!0)}};var RE=class{constructor(e){this._drawer=e}getDrawerInstance(){return this._drawer}renderPanelContent(e){let t=this.getDrawerInstance(),n=t._getTemplate(t.option("template"));n&&n.render({container:t.content(),onRendered:()=>{e.resolve()}})}renderPosition(e,t){let n=y(),o=y(),s=this.getDrawerInstance();e&&P.apply(u,[n,o]).done(()=>{s._animationCompleteHandler()}),this._internalRenderPosition(e,n),e||s.resizeViewContent(),this.renderShaderVisibility(e,t,o)}_getPanelOffset(e){let t=this.getDrawerInstance(),n=t.isHorizontalDirection()?t.getRealPanelWidth():t.getRealPanelHeight();return e?-(n-t.getMaxSize()):-(n-t.getMinSize())}_getPanelSize(e){return e?this.getDrawerInstance().getMaxSize():this.getDrawerInstance().getMinSize()}renderShaderVisibility(e,t,n){let o=this.getDrawerInstance(),s=o.option("opened"),r=s?{from:0,to:1}:{from:1,to:0};e?Eo.fade(u(o._$shader),r,t,()=>{this._drawer._toggleShaderVisibility(s),n.resolve()}):(o._toggleShaderVisibility(s),o._$shader.css("opacity",r.to))}getPanelContent(){return u(this.getDrawerInstance().content())}setPanelSize(e){this.refreshPanelElementSize(e)}refreshPanelElementSize(e){let t=this.getDrawerInstance(),n=this._getPanelSize(t.option("opened"));t.isHorizontalDirection()?is(u(t.content()),e?t.getRealPanelWidth():n):Bi(u(t.content()),e?t.getRealPanelHeight():n)}isViewContentFirst(){return!1}onPanelContentRendered(){}},Ud=RE;var FE=class extends Ud{renderPanelContent(e){delete this._initialPosition;let t=this.getDrawerInstance(),{opened:n,minSize:o}=t.option();t._overlay=t._createComponent(t.content(),nn,{shading:!1,container:t.content(),visualContainer:t.getOverlayTarget(),position:this._getOverlayPosition(),width:n?"auto":o||0,height:"100%",templatesRenderAsynchronously:t.option("templatesRenderAsynchronously"),animation:{show:{duration:0}},onPositioned:function(s){this._fixOverlayPosition(s.component.$content())}.bind(this),contentTemplate:t.option("template"),onContentReady:s=>{e.resolve(),this._processOverlayZIndex(s.component.content())},visible:!0,propagateOutsideClick:!0})}_fixOverlayPosition(e){let t=Be(this._initialPosition,{left:0,top:0});Ve(e,t),this.getDrawerInstance().calcTargetPosition()==="right"&&e.css("left","auto"),this.getDrawerInstance().calcTargetPosition()==="bottom"&&(e.css("top","auto"),e.css("bottom","0px"))}_getOverlayPosition(){let e=this.getDrawerInstance(),t=e.calcTargetPosition(),n={};switch(t){case"left":n={my:"top left",at:"top left"};break;case"right":n={my:e.option("rtlEnabled")?"top left":"top right",at:"top right"};break;case"top":case"bottom":n={my:t,at:t}}return n.of=e.getOverlayTarget(),n}refreshPanelElementSize(e){let t=this.getDrawerInstance(),n=t.getOverlay();t.isHorizontalDirection()?(n.option("height","100%"),n.option("width",e?t.getRealPanelWidth():this._getPanelSize(t.option("opened")))):(n.option("width",W(t.getOverlayTarget())),n.option("height",e?t.getRealPanelHeight():this._getPanelSize(t.option("opened"))))}onPanelContentRendered(){this._updateViewContentStyles()}_updateViewContentStyles(){let e=this.getDrawerInstance();u(e.viewContent()).css(`padding${ki(e.calcTargetPosition(),!0)}`,e.option("minSize")),u(e.viewContent()).css("transform","inherit")}_internalRenderPosition(e,t){let n=this.getDrawerInstance(),o=u(n.content()),s=n.getOverlay().$content(),r=n.option("revealMode"),a=n.calcTargetPosition(),l=this._getPanelSize(n.option("opened")),d=this._getPanelOffset(n.option("opened"))*n._getPositionCorrection(),c=n.getRealPanelHeight()-l;this._updateViewContentStyles(),e?r==="slide"?(this._initialPosition=n.isHorizontalDirection()?{left:d}:{top:d},Eo.moveTo({complete:()=>{t.resolve()},duration:n.option("animationDuration"),direction:a,$element:o,position:d})):r==="expand"&&(this._initialPosition=n.isHorizontalDirection()?{left:0}:{top:0},Ve(s,this._initialPosition),Eo.size({complete:()=>{t.resolve()},duration:n.option("animationDuration"),direction:a,$element:s,size:l,marginTop:c})):r==="slide"?(this._initialPosition=n.isHorizontalDirection()?{left:d}:{top:d},Ve(o,this._initialPosition)):r==="expand"&&(this._initialPosition=n.isHorizontalDirection()?{left:0}:{top:0},Ve(s,this._initialPosition),n.isHorizontalDirection()?u(s).css("width",l):(u(s).css("height",l),a==="bottom"&&u(s).css("marginTop",c)))}getPanelContent(){return u(this.getDrawerInstance().getOverlay().content())}_processOverlayZIndex(e){let n=u(e).get(0).style.zIndex||1;this.getDrawerInstance().setZIndex(n)}isViewContentFirst(e){return e==="right"||e==="bottom"}},q1=FE;var PE=class extends Ud{_internalRenderPosition(e,t){let n=this.getDrawerInstance(),o=this._getPanelSize(!0),s=this._getPanelSize(n.option("opened"))*n._getPositionCorrection();if(u(n.content()).css(n.isHorizontalDirection()?"width":"height",o),n.getMinSize()){let r="padding";switch(n.calcTargetPosition()){case"left":r+="Right";break;case"right":r+="Left";break;case"top":r+="Bottom";break;case"bottom":r+="Top"}u(n.viewContent()).css(r,n.getMinSize())}e?Eo.moveTo({$element:u(n.viewContent()),position:s,direction:n.calcTargetPosition(),duration:n.option("animationDuration"),complete:()=>{t.resolve()}}):n.isHorizontalDirection()?Ve(u(n.viewContent()),{left:s}):Ve(u(n.viewContent()),{top:s})}onPanelContentRendered(){u(this.getDrawerInstance().viewContent()).addClass("dx-theme-background-color")}},Y1=PE;var kE=class extends Ud{_internalRenderPosition(e,t){let n=this.getDrawerInstance(),o=n.calcTargetPosition(),s=u(n.content()),r=this._getPanelSize(n.option("opened")),a=this._getPanelOffset(n.option("opened")),l=n.option("revealMode");e?l==="slide"?Eo.margin({complete:()=>{t.resolve()},$element:s,duration:n.option("animationDuration"),direction:o,margin:a}):l==="expand"&&Eo.size({complete:()=>{t.resolve()},$element:s,duration:n.option("animationDuration"),direction:o,size:r}):l==="slide"?s.css(`margin${ki(o,!0)}`,a):l==="expand"&&s.css(n.isHorizontalDirection()?"width":"height",r)}isViewContentFirst(e,t){return(t?e==="left":e==="right")||e==="bottom"}},X1=kE;var IJ=at.inherit({_getDefaultOptions(){return m(this.callBase(),{position:"left",opened:!1,minSize:null,maxSize:null,shading:!1,template:"panel",openedStateMode:"shrink",revealMode:"slide",animationEnabled:!0,animationDuration:400,closeOnOutsideClick:!1,contentTemplate:"content"})},_init(){this.callBase(),this._initStrategy(),this.$element().addClass("dx-drawer"),this._whenAnimationCompleted=void 0,this._whenPanelContentRendered=void 0,this._whenPanelContentRefreshed=void 0,this._$wrapper=u("<div>").addClass("dx-drawer-wrapper"),this._$viewContentWrapper=u("<div>").addClass("dx-drawer-content"),this._$wrapper.append(this._$viewContentWrapper),this.$element().append(this._$wrapper)},_initStrategy(){switch(this.option("openedStateMode")){case"push":default:this._strategy=new Y1(this);break;case"shrink":this._strategy=new X1(this);break;case"overlap":this._strategy=new q1(this)}},_getAnonymousTemplateName:()=>"content",_initTemplates(){let i={};i.panel=new tn,i.content=new tn,this._templateManager.addDefaultTemplates(i),this.callBase()},_viewContentWrapperClickHandler(i){let e=this.option("closeOnOutsideClick");A(e)&&(e=e(i)),e&&this.option("opened")&&(this.stopAnimations(),this.option("shading")&&i.preventDefault(),this.hide())},_initMarkup(){this.callBase(),this._toggleOpenedStateClass(this.option("opened")),this._renderPanelContentWrapper(),this._refreshOpenedStateModeClass(),this._refreshRevealModeClass(),this._renderShader(),this._refreshPositionClass(),this._whenPanelContentRendered=y(),this._strategy.renderPanelContent(this._whenPanelContentRendered),this._strategy.onPanelContentRendered(),this._renderViewContent(),_.off(this._$viewContentWrapper,de),_.on(this._$viewContentWrapper,de,this._viewContentWrapperClickHandler.bind(this)),this._refreshWrapperChildrenOrder()},_render(){this._initMinMaxSize(),this.callBase(),this._whenPanelContentRendered.always(()=>{this._initMinMaxSize(),this._strategy.refreshPanelElementSize(this.option("revealMode")==="slide"),this._renderPosition(this.option("opened"),!0),this._removePanelManualPosition()})},_removePanelManualPosition(){this._$panelContentWrapper.attr("manualposition")&&(this._$panelContentWrapper.removeAttr("manualPosition"),this._$panelContentWrapper.css({position:"",top:"",left:"",right:"",bottom:""}))},_togglePanelContentHiddenClass(){let i=()=>{let{minSize:e,opened:t}=this.option(),n=e?!1:!t;this._$panelContentWrapper.toggleClass("dx-drawer-panel-content-hidden",n)};this._whenAnimationCompleted&&!this.option("opened")?P(this._whenAnimationCompleted).done(i):i()},_renderPanelContentWrapper(){let{openedStateMode:i,opened:e,minSize:t}=this.option();this._$panelContentWrapper=u("<div>").addClass("dx-drawer-panel-content"),this._togglePanelContentHiddenClass();let n=this.calcTargetPosition();i==="push"&&["top","bottom"].includes(n)&&this._$panelContentWrapper.addClass("dx-drawer-panel-content-push-top-or-bottom"),i!=="overlap"&&!e&&!t&&(this._$panelContentWrapper.attr("manualposition",!0),this._$panelContentWrapper.css({position:"absolute",top:"-10000px",left:"-10000px",right:"auto",bottom:"auto"})),this._$wrapper.append(this._$panelContentWrapper)},_refreshOpenedStateModeClass(i){i&&this.$element().removeClass(`dx-drawer-${i}`),this.$element().addClass(`dx-drawer-${this.option("openedStateMode")}`)},_refreshPositionClass(){this.$element().removeClass(["left","right","top","bottom"].map(i=>`dx-drawer-${i}`).join(" ")).addClass(`dx-drawer-${this.calcTargetPosition()}`)},_refreshWrapperChildrenOrder(){let i=this.calcTargetPosition();this._strategy.isViewContentFirst(i,this.option("rtlEnabled"))?this._$wrapper.prepend(this._$viewContentWrapper):this._$wrapper.prepend(this._$panelContentWrapper)},_refreshRevealModeClass(i){i&&this.$element().removeClass(`dx-drawer-${i}`),this.$element().addClass(`dx-drawer-${this.option("revealMode")}`)},_renderViewContent(){let i=this.option("contentTemplate"),e=this._getTemplate(i);if(e){let t=e.render({container:this.viewContent(),noModel:!0,transclude:this._templateManager.anonymousTemplateName===i});t.hasClass("ng-scope")&&u(this._$viewContentWrapper).children().not(".dx-drawer-shader").replaceWith(t)}},_renderShader(){this._$shader=this._$shader||u("<div>").addClass("dx-drawer-shader"),this._$shader.appendTo(this.viewContent()),this._toggleShaderVisibility(this.option("opened"))},_initSize(){this._initMinMaxSize()},_initMinMaxSize(){let i=this.isHorizontalDirection()?this.getRealPanelWidth():this.getRealPanelHeight();this._maxSize=this.option("maxSize")||i,this._minSize=this.option("minSize")||0},calcTargetPosition(){let{position:i,rtlEnabled:e}=this.option();return i==="before"?e?"right":"left":i==="after"?e?"left":"right":i},getOverlayTarget(){return this._$wrapper},getOverlay(){return this._overlay},getMaxSize(){return this._maxSize},getMinSize(){return this._minSize},getRealPanelWidth(){return j()?f(this.option("templateSize"))?this.option("templateSize"):Pe(this._getPanelTemplateElement()).width:0},getRealPanelHeight(){return j()?f(this.option("templateSize"))?this.option("templateSize"):Pe(this._getPanelTemplateElement()).height:0},_getPanelTemplateElement(){let i=this._strategy.getPanelContent(),e=i;return i.children().length&&(e=i.children().eq(0),i.hasClass("dx-overlay-content")&&e.hasClass("dx-template-wrapper")&&e.children().length&&(e=e.children().eq(0))),e.get(0)},getElementHeight(i){let e=i.children();return e.length?Pe(e.eq(0).get(0)).height:Pe(i.get(0)).height},isHorizontalDirection(){let i=this.calcTargetPosition();return i==="left"||i==="right"},stopAnimations(i){fe.stop(this._$shader,i),fe.stop(u(this.content()),i),fe.stop(u(this.viewContent()),i);let e=this.getOverlay();e&&fe.stop(u(e.$content()),i)},setZIndex(i){this._$shader.css("zIndex",i-1),this._$panelContentWrapper.css("zIndex",i)},resizeContent(){this.resizeViewContent},resizeViewContent(){Li(this.viewContent())},_isInvertedPosition(){let i=this.calcTargetPosition();return i==="right"||i==="bottom"},_renderPosition(i,e,t){if(this.stopAnimations(t),!j())return;u(this.viewContent()).css("paddingLeft",0),u(this.viewContent()).css("paddingRight",0),u(this.viewContent()).css("paddingTop",0),u(this.viewContent()).css("paddingBottom",0);let n=this.option("animationEnabled");e===!0&&(n=!1),i&&this._toggleShaderVisibility(i),this._strategy.renderPosition(n,this.option("animationDuration"))},_animationCompleteHandler(){this.resizeViewContent(),this._whenAnimationCompleted&&this._whenAnimationCompleted.resolve()},_getPositionCorrection(){return this._isInvertedPosition()?-1:1},_dispose(){Eo.complete(u(this.viewContent())),this.callBase()},_visibilityChanged(i){i&&this._dimensionChanged()},_dimensionChanged(){this._initMinMaxSize(),this._strategy.refreshPanelElementSize(this.option("revealMode")==="slide"),this._renderPosition(this.option("opened"),!0)},_toggleShaderVisibility(i){this.option("shading")?(this._$shader.toggleClass("dx-state-invisible",!i),this._$shader.css("visibility",i?"visible":"hidden")):this._$shader.toggleClass("dx-state-invisible",!0)},_toggleOpenedStateClass(i){this.$element().toggleClass("dx-drawer-opened",i)},_refreshPanel(){u(this.viewContent()).css("left",0),u(this.viewContent()).css("transform","translate(0px, 0px)"),u(this.viewContent()).removeClass("dx-theme-background-color"),this._removePanelContentWrapper(),this._removeOverlay(),this._renderPanelContentWrapper(),this._refreshWrapperChildrenOrder(),this._whenPanelContentRefreshed=y(),this._strategy.renderPanelContent(this._whenPanelContentRefreshed),this._strategy.onPanelContentRendered(),j()&&this._whenPanelContentRefreshed.always(()=>{this._strategy.refreshPanelElementSize(this.option("revealMode")==="slide"),this._renderPosition(this.option("opened"),!0,!0),this._removePanelManualPosition()})},_clean(){this._cleanFocusState(),this._removePanelContentWrapper(),this._removeOverlay()},_removePanelContentWrapper(){this._$panelContentWrapper&&this._$panelContentWrapper.remove()},_removeOverlay(){this._overlay&&(this._overlay.dispose(),delete this._overlay,delete this._$panelContentWrapper)},_optionChanged(i){switch(i.name){case"width":this.callBase(i),this._dimensionChanged();break;case"opened":this._renderPosition(this.option("opened")),this._toggleOpenedStateClass(i.value),this._togglePanelContentHiddenClass();break;case"position":this._refreshPositionClass(),this._refreshWrapperChildrenOrder(),this._invalidate();break;case"contentTemplate":case"template":this._invalidate();break;case"openedStateMode":this._initStrategy(),this._refreshOpenedStateModeClass(i.previousValue),this._refreshPanel();break;case"minSize":this._initMinMaxSize(),this._renderPosition(this.option("opened"),!0),this._togglePanelContentHiddenClass();break;case"maxSize":this._initMinMaxSize(),this._renderPosition(this.option("opened"),!0);break;case"revealMode":this._refreshRevealModeClass(i.previousValue),this._refreshPanel();break;case"shading":this._toggleShaderVisibility(this.option("opened"));break;case"animationEnabled":case"animationDuration":case"closeOnOutsideClick":break;default:this.callBase(i)}},content(){return H(this._$panelContentWrapper)},viewContent(){return H(this._$viewContentWrapper)},show(){return this.toggle(!0)},hide(){return this.toggle(!1)},toggle(i){let e=i===void 0?!this.option("opened"):i;return this._whenAnimationCompleted=y(),this.option("opened",e),this._whenAnimationCompleted.promise()}});K("dxDrawer",IJ);var DJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[st,Se,Se]})}return i})();var{getActiveElement:TJ}=S;var Q1=F.real(),Z1=wd.inherit({_supportedKeys(){return m({},this.callBase(),{tab(i){if(!this.option("opened"))return;let e=this._getTabbableElements(),t=i.shiftKey?e.last():e.first();t&&_.trigger(t,"focus"),i.preventDefault()}})},_getTabbableElements(){return this._getElements().filter(Rc)},_getElements(){return u(this.content()).find("*")},_getDefaultOptions(){return m(this.callBase(),{acceptCustomValue:!1,contentTemplate:"content",openOnFieldClick:!0,displayValueFormatter:i=>Array.isArray(i)?i.join(", "):i,useHiddenSubmitElement:!0})},_getAnonymousTemplateName:()=>"content",_initTemplates(){this.callBase()},_initMarkup(){this._initDataExpressions(),this.$element().addClass("dx-dropdownbox"),this.callBase()},_setSubmitValue(){let i=this.option("value"),e=this._shouldUseDisplayValue(i)?this._displayGetter(i):i;this._getSubmitElement().val(e)},_shouldUseDisplayValue(i){return this.option("valueExpr")==="this"&&z(i)},_sortValuesByKeysOrder(i,e){return e.sort((n,o)=>i.indexOf(n.itemKey)-i.indexOf(o.itemKey)).map(n=>n.itemDisplayValue)},_renderInputValue(){let{renderOnly:i}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._rejectValueLoading();let e=[];if(!this._dataSource)return this.callBase({renderOnly:i,value:e}),y().resolve();let n=this._getCurrentValue()??[];n=Array.isArray(n)?n:[n];let o=qe(n,r=>{let a=y();return this._loadItem(r).always(l=>{let d=this._displayGetter(l);f(d)?e.push({itemKey:r,itemDisplayValue:d}):this.option("acceptCustomValue")&&e.push({itemKey:r,itemDisplayValue:r}),a.resolve()}),a}),s=this.callBase.bind(this);return P.apply(this,o).always(()=>{let r=this._sortValuesByKeysOrder(n,e);this.option("displayValue",r),s({renderOnly:i,value:e.length&&r})})},_loadItem(i){let e=y(),t=this,n=At(this.option("items")||[],o=>this._isValueEquals(this._valueGetter(o),i))[0];return n!==void 0?e.resolve(n):this._loadValue(i).done(o=>{e.resolve(o)}).fail(o=>{o!=null&&o.shouldSkipCallback||(t.option("acceptCustomValue")?e.resolve(i):e.reject())}),e.promise()},_popupTabHandler(i){if(ke(i)!=="tab")return;let e=this._getTabbableElements().first().get(0),t=this._getTabbableElements().last().get(0),n=i.target,o=!!(n===e&&i.shiftKey),s=n===t&&!i.shiftKey;(o||s)&&(this.close(),_.trigger(this._input(),"focus"),o&&i.preventDefault())},_renderPopupContent(){if(this.option("contentTemplate")==="content")return;let i=this._getTemplateByOption("contentTemplate");if(!(i&&this.option("contentTemplate")))return;let e=this._popup.$content(),t={value:this._fieldRenderData(),component:this};e.empty(),i.render({container:H(e),model:t})},_canShowVirtualKeyboard:()=>Q1.mac,_isNestedElementActive(){let i=TJ();return i&&this._popup.$content().get(0).contains(i)},_shouldHideOnParentScroll(){return Q1.deviceType==="desktop"&&this._canShowVirtualKeyboard()&&this._isNestedElementActive()},_popupHiddenHandler(){this.callBase(),this._popupPosition=void 0},_popupPositionedHandler(i){this.callBase(i),this._popupPosition=i.position},_getDefaultPopupPosition(i){let{my:e,at:t}=this.callBase(i);return{my:e,at:t,offset:{v:-1},collision:"flipfit"}},_popupConfig(){let{focusStateEnabled:i}=this.option();return m(this.callBase(),{tabIndex:-1,dragEnabled:!1,focusStateEnabled:i,contentTemplate:"content",hideOnParentScroll:this._shouldHideOnParentScroll.bind(this),position:m(this.option("popupPosition"),{of:this.$element()}),_ignoreFunctionValueDeprecation:!0,maxHeight:function(){var e;let t=(e=this._popupPosition)===null||e===void 0?void 0:e.v.location;return Nd(this.$element(),t)}.bind(this)})},_popupShownHandler(){this.callBase();let i=this._getTabbableElements().first();_.trigger(i,"focus")},_setCollectionWidgetOption:E,_optionChanged(i){switch(this._dataExpressionOptionChanged(i),i.name){case"dataSource":this._renderInputValue();break;case"displayValue":this.option("text",i.value);break;case"displayExpr":this._renderValue();break;case"contentTemplate":this._invalidate();break;default:this.callBase(i)}}}).include(Nu);K("dxDropDownBox",Z1);var J1=Z1;var e$=J1;var AJ=["*"],MJ={provide:Yi,useExisting:Zt(()=>t$),multi:!0},t$=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get acceptCustomValue(){return this._getOption("acceptCustomValue")}set acceptCustomValue(t){this._setOption("acceptCustomValue",t)}get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get contentTemplate(){return this._getOption("contentTemplate")}set contentTemplate(t){this._setOption("contentTemplate",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(t){this._setOption("displayExpr",t)}get displayValueFormatter(){return this._getOption("displayValueFormatter")}set displayValueFormatter(t){this._setOption("displayValueFormatter",t)}get dropDownButtonTemplate(){return this._getOption("dropDownButtonTemplate")}set dropDownButtonTemplate(t){this._setOption("dropDownButtonTemplate",t)}get dropDownOptions(){return this._getOption("dropDownOptions")}set dropDownOptions(t){this._setOption("dropDownOptions",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get fieldTemplate(){return this._getOption("fieldTemplate")}set fieldTemplate(t){this._setOption("fieldTemplate",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get maxLength(){return this._getOption("maxLength")}set maxLength(t){this._setOption("maxLength",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get opened(){return this._getOption("opened")}set opened(t){this._setOption("opened",t)}get openOnFieldClick(){return this._getOption("openOnFieldClick")}set openOnFieldClick(t){this._setOption("openOnFieldClick",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showDropDownButton(){return this._getOption("showDropDownButton")}set showDropDownButton(t){this._setOption("showDropDownButton",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get valueExpr(){return this._getOption("valueExpr")}set valueExpr(t){this._setOption("valueExpr",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onClosed;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOpened;onOptionChanged;onPaste;onValueChanged;acceptCustomValueChange;accessKeyChange;activeStateEnabledChange;buttonsChange;contentTemplateChange;dataSourceChange;deferRenderingChange;disabledChange;displayExprChange;displayValueFormatterChange;dropDownButtonTemplateChange;dropDownOptionsChange;elementAttrChange;fieldTemplateChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;itemsChange;labelChange;labelModeChange;maxLengthChange;nameChange;openedChange;openOnFieldClickChange;placeholderChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showDropDownButtonChange;stylingModeChange;tabIndexChange;textChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;valueExprChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"closed",emit:"onClosed"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"opened",emit:"onOpened"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"acceptCustomValueChange"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"contentTemplateChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"displayExprChange"},{emit:"displayValueFormatterChange"},{emit:"dropDownButtonTemplateChange"},{emit:"dropDownOptionsChange"},{emit:"elementAttrChange"},{emit:"fieldTemplateChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"itemsChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxLengthChange"},{emit:"nameChange"},{emit:"openedChange"},{emit:"openOnFieldClickChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showDropDownButtonChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"valueExprChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new e$(t,n)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",n=>{this.eventHelper.fireNgEvent("onBlur",[n])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("dataSource",t),this.setupChanges("items",t),this.setupChanges("validationErrors",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-drop-down-box"]],contentQueries:function(n,o,s){if(n&1&&(je(s,Ao,4),je(s,so,4)),n&2){let r;Ne(r=He())&&(o.buttonsChildren=r),Ne(r=He())&&(o.itemsChildren=r)}},hostBindings:function(n,o){n&1&&et("valueChange",function(r){return o.change(r)})("onBlur",function(r){return o.touched(r)})},inputs:{acceptCustomValue:"acceptCustomValue",accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",contentTemplate:"contentTemplate",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",displayExpr:"displayExpr",displayValueFormatter:"displayValueFormatter",dropDownButtonTemplate:"dropDownButtonTemplate",dropDownOptions:"dropDownOptions",elementAttr:"elementAttr",fieldTemplate:"fieldTemplate",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",items:"items",label:"label",labelMode:"labelMode",maxLength:"maxLength",name:"name",opened:"opened",openOnFieldClick:"openOnFieldClick",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showDropDownButton:"showDropDownButton",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",valueExpr:"valueExpr",visible:"visible",width:"width"},outputs:{onChange:"onChange",onClosed:"onClosed",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOpened:"onOpened",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",acceptCustomValueChange:"acceptCustomValueChange",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",contentTemplateChange:"contentTemplateChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",displayExprChange:"displayExprChange",displayValueFormatterChange:"displayValueFormatterChange",dropDownButtonTemplateChange:"dropDownButtonTemplateChange",dropDownOptionsChange:"dropDownOptionsChange",elementAttrChange:"elementAttrChange",fieldTemplateChange:"fieldTemplateChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",itemsChange:"itemsChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxLengthChange:"maxLengthChange",nameChange:"nameChange",openedChange:"openedChange",openOnFieldClickChange:"openOnFieldClickChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showDropDownButtonChange:"showDropDownButtonChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",valueExprChange:"valueExprChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},standalone:!1,features:[ue([se,ce,MJ,k,Me]),ne,it],ngContentSelectors:AJ,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},encapsulation:2})}return i})(),RJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[xi,qi,$s,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,Ki,st,Se,xi,qi,$s,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,Ki,Se]})}return i})();var FJ="dx-gallery-item-image";var i$=at.inherit({_supportedKeys(){return m(this.callBase(),{pageUp:E,pageDown:E})},_getDefaultOptions(){return m(this.callBase(),{direction:"next",onClick:null,hoverStateEnabled:!0,activeStateEnabled:!0})},_render(){this.callBase();let i=this,e=this.$element(),t=D(de,this.NAME);e.addClass(`dx-gallery-nav-button-${this.option("direction")}`),_.off(e,t),_.on(e,t,n=>{i._createActionByOption("onClick")({event:n})})},_optionChanged(i){switch(i.name){case"onClick":case"direction":this._invalidate();break;default:this.callBase(i)}}}),n$=jn.inherit({_activeStateUnit:".dx-gallery-item",_wasAnyItemTemplateRendered:!1,_getDefaultOptions(){return m(this.callBase(),{activeStateEnabled:!1,animationDuration:400,animationEnabled:!0,loop:!1,swipeEnabled:!0,indicatorEnabled:!0,showIndicator:!0,selectedIndex:0,slideshowDelay:0,showNavButtons:!1,wrapAround:!1,initialItemWidth:void 0,stretchImages:!1,_itemAttributes:{role:"option","aria-label":O.format("dxGallery-itemName")},loopItemFocus:!1,selectOnFocus:!0,selectionMode:"single",selectionRequired:!0,selectByClick:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}}])},_init(){this.callBase(),this.option("loopItemFocus",this.option("loop"))},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({item:new Ai((i,e)=>{let t=u("<img>").addClass(FJ);X(e)?(this._prepareDefaultItemTemplate(e,i),t.attr({src:e.imageSrc,alt:e.imageAlt}).appendTo(i)):t.attr("src",String(e)).appendTo(i)},["imageSrc","imageAlt","text","html"],this.option("integrationOptions.watchMethod"))})},_dataSourceOptions:()=>({paginate:!1}),_itemContainer(){return this._$container},_itemClass:()=>"dx-gallery-item",_itemDataKey:()=>"dxGalleryItemData",_actualItemWidth(){let i=this.option("wrapAround");return this.option("stretchImages")?1/(i?this._itemsPerPage()+1:this._itemsPerPage()):i?this._itemPercentWidth()*this._itemsPerPage()/(this._itemsPerPage()+1):this._itemPercentWidth()},_itemPercentWidth(){let i,e=ae(this.$element()),t=this.option("initialItemWidth");return t&&t<=e?i=t/e:i=1,i},_itemsPerPage(){let i=j()?Math.floor(1/this._itemPercentWidth()):1;return Math.min(i,this._itemsCount())},_pagesCount(){return Math.ceil(this._itemsCount()/this._itemsPerPage())},_itemsCount(){return(this.option("items")||[]).length},_offsetDirection(){return this.option("rtlEnabled")?-1:1},_initMarkup(){this._renderWrapper(),this._renderItemsContainer(),this.$element().addClass("dx-gallery"),this.$element().toggleClass("dx-gallery-loop",this.option("loop")),this.callBase();let e={role:this._itemsCount()>0?"listbox":void 0,label:"gallery"};this.setAria(e)},_render(){this._renderDragHandler(),this._renderContainerPosition(),this._renderItemSizes(),this._renderItemPositions(),this._renderNavButtons(),this._renderIndicator(),this._renderSelectedItem(),this._renderItemVisibility(),this._renderUserInteraction(),this._setupSlideShow(),this._reviseDimensions(),this.callBase()},_dimensionChanged(){let i=this.option("selectedIndex")||0;this._stopItemAnimations(),this._clearCacheWidth(),this._cloneDuplicateItems(),this._renderItemSizes(),this._renderItemPositions(),this._renderIndicator(),this._renderContainerPosition(this._calculateIndexOffset(i),!0),this._renderItemVisibility()},_renderDragHandler(){let i=D("dragstart",this.NAME);_.off(this.$element(),i),_.on(this.$element(),i,"img",()=>!1)},_renderWrapper(){this._$wrapper||(this._$wrapper=u("<div>").addClass("dx-gallery-wrapper").appendTo(this.$element()))},_renderItems(i){if(!j()){let e=this.option("selectedIndex");i=i.length>e?i.slice(e,e+1):i.slice(0,1)}this.callBase(i),this._loadNextPageIfNeeded()},_onItemTemplateRendered(){return()=>{this._wasAnyItemTemplateRendered||(this._wasAnyItemTemplateRendered=!0,Li(this.$element()))}},_renderItemsContainer(){this._$container||(this._$container=u("<div>").addClass("dx-gallery-container").appendTo(this._$wrapper))},_cloneDuplicateItems(){if(!this.option("loop"))return;let e=(this.option("items")||[]).length,t=e-1,n;if(!e)return;this._getLoopedItems().remove();let o=Math.min(this._itemsPerPage(),e),s=this._getRealItems(),r=this._itemContainer();for(n=0;n<o;n++)this._cloneItemForDuplicate(s[n],r);for(n=0;n<o;n++)this._cloneItemForDuplicate(s[t-n],r)},_cloneItemForDuplicate(i,e){if(i){let t=u(i).clone(!1).addClass("dx-gallery-item-loop").removeAttr("id").css("margin",0).appendTo(e);this.setAria({hidden:!0},t)}},_getRealItems(){return this.$element().find(".dx-gallery-item:not(.dx-gallery-item-loop)")},_getLoopedItems(){return this.$element().find(".dx-gallery-item-loop")},_emptyMessageContainer(){return this._$wrapper},_renderItemSizes(i){let e=this._itemElements(),t=this._actualItemWidth();i!==void 0&&(e=e.slice(i)),e.each(n=>{gc(u(e[n]),100*t+"%")})},_renderItemPositions(){let i=this._actualItemWidth(),e=this._itemsCount(),t=this._itemsPerPage(),n=this.$element().find(".dx-gallery-item-loop").length,o=e+n-1,s=this.option("wrapAround")?.5:0,r=this._itemFreeSpace(),a=!!r,l=this.option("rtlEnabled"),d=this.option("selectedIndex"),c=l?"Right":"Left";this._itemElements().each(function(h){let p=h,g=u(this).hasClass("dx-gallery-item-loop");if(h>e+t-1&&(p=o-p-t),!g&&p!==0){a&&u(this).css(`margin${c}`,100*r+"%");return}let C=i*(p+s)+r*(p+1-s),v=g?c.toLowerCase():`margin${c}`;u(this).css(v,100*C+"%")}),this._relocateItems(d,d,!0)},_itemFreeSpace(){let i=this._itemsPerPage();return this.option("wrapAround")&&(i+=1),(1-this._actualItemWidth()*i)/(i+1)},_renderContainerPosition(i,e,t){this._releaseInvisibleItems(),i=i||0;let n=this,o=this._actualItemWidth(),s=i,r=this._offsetDirection()*s*(o+this._itemFreeSpace()),a;return f(this._animationOverride)&&(t=this._animationOverride,delete this._animationOverride),t?(n._startSwipe(),a=n._animate(r).done(n._endSwipe.bind(n))):(Ve(this._$container,{left:r*this._elementWidth(),top:0}),a=y().resolveWith(n)),a.done(function(){this._deferredAnimate&&n._deferredAnimate.resolveWith(n),e&&this._renderItemVisibility()}),a.promise()},_startSwipe(){this.$element().addClass("dx-gallery-active")},_endSwipe(){this.$element().removeClass("dx-gallery-active")},_animate(i,e){let t=this,n=this._$container,o=y();return fe.animate(this._$container,m({type:"slide",to:{left:i*this._elementWidth()},duration:t.option("animationDuration"),complete(){t._needMoveContainerForward()&&Ve(n,{left:0,top:0}),t._needMoveContainerBack()&&Ve(n,{left:t._maxContainerOffset()*t._elementWidth(),top:0}),o.resolveWith(t)}},e||{})),o},_needMoveContainerForward(){let i=this._$container.position().left*this._offsetDirection(),e=-this._maxItemWidth()*this._elementWidth()*this._itemsCount();return i<=e+1},_needMoveContainerBack(){let i=this._$container.position().left*this._offsetDirection(),e=this._actualItemWidth()*this._elementWidth();return i>=e-1},_maxContainerOffset(){return-this._maxItemWidth()*(this._itemsCount()-this._itemsPerPage())*this._offsetDirection()},_maxItemWidth(){return this._actualItemWidth()+this._itemFreeSpace()},_reviseDimensions(){let i=this,e=i._itemElements().first().find(".dx-item-content");!e||e.is(":hidden")||(i.option("height")||i.option("height",ee(e)),i.option("width")||i.option("width",ae(e)),this._dimensionChanged())},_renderIndicator(){let{showIndicator:i}=this.option();if(this._cleanIndicators(),this.$element().toggleClass("dx-gallery-indicator-visible",i),!i)return;let e=this._$indicator=u("<div>").addClass("dx-gallery-indicator").appendTo(this._$wrapper),t=this.option("indicatorEnabled");for(let n=0;n<this._pagesCount();n++){let o=u("<div>").addClass("dx-gallery-indicator-item").appendTo(e);t&&this._attachIndicatorClickHandler(o,n)}this._renderSelectedPageIndicator()},_attachIndicatorClickHandler(i,e){_.on(i,D(de,this.NAME),t=>{this._indicatorSelectHandler(t,e)})},_detachIndicatorClickHandler(i){_.off(i,D(de,this.NAME))},_toggleIndicatorInteraction(i){var e;let t=((e=this._$indicator)===null||e===void 0?void 0:e.find(".dx-gallery-indicator-item"))||[];t.length&&t.each((n,o)=>{i?this._attachIndicatorClickHandler(u(o),n):this._detachIndicatorClickHandler(u(o))})},_cleanIndicators(){this._$indicator&&this._$indicator.remove()},_renderSelectedItem(){let i=this.option("selectedIndex");this._itemElements().removeClass("dx-gallery-item-selected").eq(i).addClass("dx-gallery-item-selected")},_renderItemVisibility(){if(this.option("initialItemWidth")||this.option("wrapAround")){this._releaseInvisibleItems();return}let i=this.option("selectedIndex");this._itemElements().each((e,t)=>{i!==e&&u(t).find(".dx-item-content").addClass("dx-gallery-item-invisible")})},_releaseInvisibleItems(){this._itemElements().find(".dx-item-content").removeClass("dx-gallery-item-invisible")},_renderSelectedPageIndicator(){if(!this._$indicator)return;let i=this.option("selectedIndex"),e=this._pagesCount()-1,t=Math.ceil(i/this._itemsPerPage());t=Math.min(e,t),this._$indicator.find(".dx-gallery-indicator-item").removeClass("dx-gallery-indicator-item-selected").eq(t).addClass("dx-gallery-indicator-item-selected")},_renderUserInteraction(){let i=this.$element(),e=this.option("swipeEnabled")&&this._itemsCount()>1;this._createComponent(i,dr,{disabled:this.option("disabled")||!e,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._elementWidth.bind(this)})},_indicatorSelectHandler(i,e){if(!this.option("indicatorEnabled"))return;let t=this._fitPaginatedIndex(e*this._itemsPerPage());this._needLongMove=!0,this.option("selectedIndex",t),this._loadNextPageIfNeeded(t)},_renderNavButtons(){let i=this;if(!i.option("showNavButtons")){i._cleanNavButtons();return}i._prevNavButton=u("<div>").appendTo(this._$wrapper),i._createComponent(i._prevNavButton,i$,{direction:"prev",onClick(){i._prevPage()}}),i._nextNavButton=u("<div>").appendTo(this._$wrapper),i._createComponent(i._nextNavButton,i$,{direction:"next",onClick(){i._nextPage()}}),this._renderNavButtonsVisibility()},_prevPage(){let i=this._itemsPerPage(),e=this.option("selectedIndex")-i;return e===-i&&i===this._itemsCount()?this._relocateItems(e,0):this.goToItem(this._fitPaginatedIndex(e))},_nextPage(){let i=this._itemsPerPage(),e=this.option("selectedIndex")+i;return e===i&&i===this._itemsCount()?this._relocateItems(e,0):this.goToItem(this._fitPaginatedIndex(e)).done(this._loadNextPageIfNeeded)},_loadNextPageIfNeeded(i){i=i===void 0?this.option("selectedIndex"):i,this._dataSource&&this._dataSource.paginate()&&this._shouldLoadNextPage(i)&&!this._isDataSourceLoading()&&!this._isLastPage()&&this._loadNextPage().done(()=>{this._renderIndicator(),this._cloneDuplicateItems(),this._renderItemPositions(),this._renderNavButtonsVisibility(),this._renderItemSizes(i)})},_shouldLoadNextPage(i){let e=this._itemsPerPage();return i+2*e>this.option("items").length},_allowDynamicItemsAppend:()=>!0,_fitPaginatedIndex(i){let e=this._itemsPerPage(),t=i<0?e+i:this._itemsCount()-i;return i>this._itemsCount()-1?(i=0,this._goToGhostItem=!0):t<e&&t>0&&(i>0?i-=e-t:i+=e-t),i},_cleanNavButtons(){this._prevNavButton&&(this._prevNavButton.remove(),delete this._prevNavButton),this._nextNavButton&&(this._nextNavButton.remove(),delete this._nextNavButton)},_renderNavButtonsVisibility(){if(!this.option("showNavButtons")||!this._prevNavButton||!this._nextNavButton)return;let i=this.option("selectedIndex"),e=this.option("loop"),t=this._itemsCount();if(this._prevNavButton.show(),this._nextNavButton.show(),t===0&&(this._prevNavButton.hide(),this._nextNavButton.hide()),e)return;let n=i===t-this._itemsPerPage(),o=t<2||i===0;this._dataSource&&this._dataSource.paginate()?n=n&&this._isLastPage():n=n||t<2,o&&this._prevNavButton.hide(),n&&this._nextNavButton.hide()},_setupSlideShow(){let i=this,e=i.option("slideshowDelay");clearTimeout(i._slideshowTimer),e&&(i._slideshowTimer=setTimeout(()=>{if(i._userInteraction){i._setupSlideShow();return}i.nextItem(!0).done(i._setupSlideShow)},e))},_elementWidth(){return this._cacheElementWidth||(this._cacheElementWidth=W(this.$element())),this._cacheElementWidth},_clearCacheWidth(){delete this._cacheElementWidth},_swipeStartHandler(i){this._releaseInvisibleItems(),this._clearCacheWidth(),this._elementWidth();let e=this._itemsCount();if(!e){i.event.cancel=!0;return}if(this._stopItemAnimations(),this._startSwipe(),this._userInteraction=!0,!this.option("loop")){let t=this.option("selectedIndex"),n=e-t-this._itemsPerPage(),o=t,s=this.option("rtlEnabled");i.event.maxLeftOffset=s?o:n,i.event.maxRightOffset=s?n:o}},_stopItemAnimations(){fe.stop(this._$container,!0)},_swipeUpdateHandler(i){let e=this.option("wrapAround")?1:0,t=this._offsetDirection()*i.event.offset*(this._itemsPerPage()+e)-this.option("selectedIndex");t<0&&this._loadNextPageIfNeeded(Math.ceil(Math.abs(t))),this._renderContainerPosition(t)},_swipeEndHandler(i){let e=i.event.targetOffset*this._offsetDirection()*this._itemsPerPage(),t=this.option("selectedIndex"),n=this._fitIndex(t-e),o=this._fitPaginatedIndex(n);if(Math.abs(e)<this._itemsPerPage()){this._relocateItems(t);return}if(this._itemsPerPage()===this._itemsCount()){e>0?this._relocateItems(-e):this._relocateItems(0);return}this.option("selectedIndex",o)},_setFocusOnSelect(){this._userInteraction=!0;let i=this._getRealItems().filter(".dx-gallery-item-selected");this.option("focusedElement",H(i)),this._userInteraction=!1},_flipIndex(i){let e=this._itemsCount();return i%=e,i>(e+1)/2&&(i-=e),i<-(e-1)/2&&(i+=e),i},_fitIndex(i){if(!this.option("loop"))return i;let e=this._itemsCount();return(i>=e||i<0)&&(this._goToGhostItem=!0),i>=e&&(i=e-i),i%=e,i<0&&(i+=e),i},_clean(){this.callBase(),this._cleanIndicators(),this._cleanNavButtons()},_dispose(){this._wasAnyItemTemplateRendered=null,clearTimeout(this._slideshowTimer),this.callBase()},_updateSelection(i,e){this._stopItemAnimations(),this._renderNavButtonsVisibility(),this._renderSelectedItem(),this._relocateItems(i[0],e[0]),this._renderSelectedPageIndicator()},_relocateItems(i,e,t){e===void 0&&(e=i);let n=this._calculateIndexOffset(i,e);this._renderContainerPosition(n,!0,this.option("animationEnabled")&&!t).done(function(){this._setFocusOnSelect(),this._userInteraction=!1,this._setupSlideShow()})},_focusInHandler(){fe.isAnimating(this._$container)||this._userInteraction||this.callBase.apply(this,arguments)},_focusOutHandler(){fe.isAnimating(this._$container)||this._userInteraction||this.callBase.apply(this,arguments)},_selectFocusedItem:E,_moveFocus(){this._stopItemAnimations(),this.callBase.apply(this,arguments);let i=this.itemElements().index(u(this.option("focusedElement")));this.goToItem(i,this.option("animationEnabled"))},_visibilityChanged(i){i&&this._reviseDimensions()},_calculateIndexOffset(i,e){e===void 0&&(e=i);let t=e-i;return this.option("loop")&&!this._needLongMove&&this._goToGhostItem&&(this._isItemOnFirstPage(i)&&this._isItemOnLastPage(e)?t=-this._itemsPerPage():this._isItemOnLastPage(i)&&this._isItemOnFirstPage(e)&&(t=this._itemsPerPage()),this._goToGhostItem=!1),this._needLongMove=!1,t-=e,t},_isItemOnLastPage(i){return i>=this._itemsCount()-this._itemsPerPage()},_isItemOnFirstPage(i){return i<=this._itemsPerPage()},_optionChanged(i){switch(i.name){case"width":case"initialItemWidth":this.callBase.apply(this,arguments),this._dimensionChanged();break;case"animationDuration":this._renderNavButtonsVisibility();break;case"animationEnabled":break;case"loop":this.$element().toggleClass("dx-gallery-loop",i.value),this.option("loopItemFocus",i.value),j()&&(this._cloneDuplicateItems(),this._renderItemPositions(),this._renderNavButtonsVisibility());break;case"showIndicator":this._renderIndicator();break;case"showNavButtons":this._renderNavButtons();break;case"slideshowDelay":this._setupSlideShow();break;case"wrapAround":case"stretchImages":j()&&(this._renderItemSizes(),this._renderItemPositions(),this._renderItemVisibility());break;case"swipeEnabled":this._renderUserInteraction();break;case"indicatorEnabled":this._toggleIndicatorInteraction(i.value);break;default:this.callBase(i)}},goToItem(i,e){let t=this.option("selectedIndex"),n=this._itemsCount();return e!==void 0&&(this._animationOverride=e),i=this._fitIndex(i),this._deferredAnimate=y(),i>n-1||i<0||t===i?this._deferredAnimate.resolveWith(this).promise():(this.option("selectedIndex",i),this._deferredAnimate.promise())},prevItem(i){return this.goToItem(this.option("selectedIndex")-1,i)},nextItem(i){return this.goToItem(this.option("selectedIndex")+1,i)}});K("dxGallery",n$);var o$=n$;var s$=o$;var PJ=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get animationDuration(){return this._getOption("animationDuration")}set animationDuration(t){this._setOption("animationDuration",t)}get animationEnabled(){return this._getOption("animationEnabled")}set animationEnabled(t){this._setOption("animationEnabled",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get indicatorEnabled(){return this._getOption("indicatorEnabled")}set indicatorEnabled(t){this._setOption("indicatorEnabled",t)}get initialItemWidth(){return this._getOption("initialItemWidth")}set initialItemWidth(t){this._setOption("initialItemWidth",t)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(t){this._setOption("itemHoldTimeout",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(t){this._setOption("itemTemplate",t)}get loop(){return this._getOption("loop")}set loop(t){this._setOption("loop",t)}get noDataText(){return this._getOption("noDataText")}set noDataText(t){this._setOption("noDataText",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get selectedIndex(){return this._getOption("selectedIndex")}set selectedIndex(t){this._setOption("selectedIndex",t)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(t){this._setOption("selectedItem",t)}get showIndicator(){return this._getOption("showIndicator")}set showIndicator(t){this._setOption("showIndicator",t)}get showNavButtons(){return this._getOption("showNavButtons")}set showNavButtons(t){this._setOption("showNavButtons",t)}get slideshowDelay(){return this._getOption("slideshowDelay")}set slideshowDelay(t){this._setOption("slideshowDelay",t)}get stretchImages(){return this._getOption("stretchImages")}set stretchImages(t){this._setOption("stretchImages",t)}get swipeEnabled(){return this._getOption("swipeEnabled")}set swipeEnabled(t){this._setOption("swipeEnabled",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get wrapAround(){return this._getOption("wrapAround")}set wrapAround(t){this._setOption("wrapAround",t)}onContentReady;onDisposing;onInitialized;onItemClick;onItemContextMenu;onItemHold;onItemRendered;onOptionChanged;onSelectionChanged;accessKeyChange;animationDurationChange;animationEnabledChange;dataSourceChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;indicatorEnabledChange;initialItemWidthChange;itemHoldTimeoutChange;itemsChange;itemTemplateChange;loopChange;noDataTextChange;rtlEnabledChange;selectedIndexChange;selectedItemChange;showIndicatorChange;showNavButtonsChange;slideshowDelayChange;stretchImagesChange;swipeEnabledChange;tabIndexChange;visibleChange;widthChange;wrapAroundChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"animationDurationChange"},{emit:"animationEnabledChange"},{emit:"dataSourceChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"indicatorEnabledChange"},{emit:"initialItemWidthChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"loopChange"},{emit:"noDataTextChange"},{emit:"rtlEnabledChange"},{emit:"selectedIndexChange"},{emit:"selectedItemChange"},{emit:"showIndicatorChange"},{emit:"showNavButtonsChange"},{emit:"slideshowDelayChange"},{emit:"stretchImagesChange"},{emit:"swipeEnabledChange"},{emit:"tabIndexChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapAroundChange"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new s$(t,n)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("dataSource",t),this.setupChanges("items",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-gallery"]],contentQueries:function(n,o,s){if(n&1&&je(s,so,4),n&2){let r;Ne(r=He())&&(o.itemsChildren=r)}},inputs:{accessKey:"accessKey",animationDuration:"animationDuration",animationEnabled:"animationEnabled",dataSource:"dataSource",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",indicatorEnabled:"indicatorEnabled",initialItemWidth:"initialItemWidth",itemHoldTimeout:"itemHoldTimeout",items:"items",itemTemplate:"itemTemplate",loop:"loop",noDataText:"noDataText",rtlEnabled:"rtlEnabled",selectedIndex:"selectedIndex",selectedItem:"selectedItem",showIndicator:"showIndicator",showNavButtons:"showNavButtons",slideshowDelay:"slideshowDelay",stretchImages:"stretchImages",swipeEnabled:"swipeEnabled",tabIndex:"tabIndex",visible:"visible",width:"width",wrapAround:"wrapAround"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemContextMenu:"onItemContextMenu",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onOptionChanged:"onOptionChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",animationDurationChange:"animationDurationChange",animationEnabledChange:"animationEnabledChange",dataSourceChange:"dataSourceChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",indicatorEnabledChange:"indicatorEnabledChange",initialItemWidthChange:"initialItemWidthChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",loopChange:"loopChange",noDataTextChange:"noDataTextChange",rtlEnabledChange:"rtlEnabledChange",selectedIndexChange:"selectedIndexChange",selectedItemChange:"selectedItemChange",showIndicatorChange:"showIndicatorChange",showNavButtonsChange:"showNavButtonsChange",slideshowDelayChange:"slideshowDelayChange",stretchImagesChange:"stretchImagesChange",swipeEnabledChange:"swipeEnabledChange",tabIndexChange:"tabIndexChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapAroundChange:"wrapAroundChange"},standalone:!1,features:[ue([se,ce,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),kJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[Ki,st,Se,Ki,Se]})}return i})();var BJ={provide:Yi,useExisting:Zt(()=>r$),multi:!0},r$=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get format(){return this._getOption("format")}set format(t){this._setOption("format",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get invalidValueMessage(){return this._getOption("invalidValueMessage")}set invalidValueMessage(t){this._setOption("invalidValueMessage",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get max(){return this._getOption("max")}set max(t){this._setOption("max",t)}get min(){return this._getOption("min")}set min(t){this._setOption("min",t)}get mode(){return this._getOption("mode")}set mode(t){this._setOption("mode",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showSpinButtons(){return this._getOption("showSpinButtons")}set showSpinButtons(t){this._setOption("showSpinButtons",t)}get step(){return this._getOption("step")}set step(t){this._setOption("step",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get useLargeSpinButtons(){return this._getOption("useLargeSpinButtons")}set useLargeSpinButtons(t){this._setOption("useLargeSpinButtons",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOptionChanged;onPaste;onValueChanged;accessKeyChange;activeStateEnabledChange;buttonsChange;disabledChange;elementAttrChange;focusStateEnabledChange;formatChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;invalidValueMessageChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maxChange;minChange;modeChange;nameChange;placeholderChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showSpinButtonsChange;stepChange;stylingModeChange;tabIndexChange;textChange;useLargeSpinButtonsChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"formatChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"invalidValueMessageChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxChange"},{emit:"minChange"},{emit:"modeChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showSpinButtonsChange"},{emit:"stepChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useLargeSpinButtonsChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new ja(t,n)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",n=>{this.eventHelper.fireNgEvent("onBlur",[n])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("validationErrors",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-number-box"]],contentQueries:function(n,o,s){if(n&1&&je(s,Ao,4),n&2){let r;Ne(r=He())&&(o.buttonsChildren=r)}},hostBindings:function(n,o){n&1&&et("valueChange",function(r){return o.change(r)})("onBlur",function(r){return o.touched(r)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",format:"format",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",invalidValueMessage:"invalidValueMessage",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",max:"max",min:"min",mode:"mode",name:"name",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showSpinButtons:"showSpinButtons",step:"step",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",useLargeSpinButtons:"useLargeSpinButtons",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",formatChange:"formatChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",invalidValueMessageChange:"invalidValueMessageChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxChange:"maxChange",minChange:"minChange",modeChange:"modeChange",nameChange:"nameChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showSpinButtonsChange:"showSpinButtonsChange",stepChange:"stepChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",useLargeSpinButtonsChange:"useLargeSpinButtonsChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},standalone:!1,features:[ue([se,ce,BJ,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),VJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[xi,qi,Sl,st,Se,xi,qi,Sl,Se]})}return i})();var a$={left:"borderLeftWidth",top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth"};var LJ=["shading","target","$arrow"],_r={left:-1,top:-1,center:0,right:1,bottom:1},BE={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"}},NJ={h:10,v:10},e_=class extends $r{constructor(e){let{shading:t,target:n,$arrow:o}=e,s=_e(e,LJ);super(s),this._props=I({},this._props,{shading:t,target:n}),this._$arrow=o,this._positionSide=void 0,this.updatePosition(this._props.position)}positionWrapper(){this._props.shading&&this._$wrapper.css({top:0,left:0})}updateTarget(e){this._props.target=e,this.updatePosition(this._props.position)}_renderBoundaryOffset(){}_getContainerPosition(){let e=pl(this._position.offset||""),{h:t,v:n}=e,o=this._isVerticalSide(),s=this._isHorizontalSide();if(o||s){let a=(this._isPopoverInside()?-1:1)*_r[this._positionSide],l=o?Q(this._$arrow):W(this._$arrow),d=this._getContentBorderWidth(this._positionSide),c=a*(l-d);o?n+=c:t+=c}return m({},this._position,{offset:`${t} ${n}`})}_getContentBorderWidth(e){let t=this._$content.css(a$[e]);return parseInt(t)||0}_isPopoverInside(){let e=xt.setup.normalizeAlign(this._position.my),t=xt.setup.normalizeAlign(this._position.at);return e.h===t.h&&e.v===t.v}_isVerticalSide(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._positionSide;return e==="top"||e==="bottom"}_isHorizontalSide(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._positionSide;return e==="left"||e==="right"}_getDisplaySide(e){let t=xt.setup.normalizeAlign(e.my),n=xt.setup.normalizeAlign(e.at),o=_r[t.h]===_r[n.h]&&_r[t.v]===_r[n.v]?-1:1,s=Math.abs(_r[t.h]-o*_r[n.h]),r=Math.abs(_r[t.v]-o*_r[n.v]);return s>r?n.h:n.v}_normalizePosition(e){let t={of:this._props.target,boundaryOffset:NJ},n;return f(e)?n=m(!0,{},t,this._positionToObject(e)):n=t,this._positionSide=this._getDisplaySide(n),n}_positionToObject(e){return B(e)?m({},BE[e]):e}};var l$={left:"right",top:"bottom",right:"left",bottom:"top",center:"center"},d$=function(i){return z(i)?i.name:i},c$=function(i,e){let t=i.option(e);return d$(t)},HJ=function(i,e){let t=i.option(e);return z(t)&&t.delay},VE=function(i,e){let{target:t,shading:n,disabled:o,hideEvent:s}=i.option(),r=B(t),a=n&&e==="hide",l=a?null:c$(i,`${e}Event`);if(a&&s&&ie.log("W1020"),!l||o)return;let d=D(l,i.NAME),c=i._createAction(function(){let g=HJ(i,`${e}Event`);this._clearEventsTimeouts(),g?this._timeouts[e]=setTimeout(()=>{i[e]()},g):i[e]()}.bind(i),{validatingTargetName:"target"}),h=function(g){c({event:g,target:u(g.currentTarget)})},p=`_${e}EventHandler`;if(r)i[p]=h,_.on(S.getDocument(),d,t,h);else{let g=H(u(t));i[p]=void 0,_.on(g,d,h)}},LE=function(i,e,t,n){let o=n||c$(i,`${t}Event`);if(!o)return;o=D(o,i.NAME);let s=`_${t}EventHandler`;i[s]?_.off(S.getDocument(),o,e,i[s]):_.off(H(u(e)),o)},u$=Oi.inherit({_getDefaultOptions(){return m(this.callBase(),{target:void 0,shading:!1,position:m({},BE.bottom),hideOnOutsideClick:!0,animation:{show:{type:"fade",from:0,to:1},hide:{type:"fade",from:1,to:0}},showTitle:!1,width:"auto",height:"auto",dragEnabled:!1,resizeEnabled:!1,fullScreen:!1,hideOnParentScroll:!0,arrowPosition:"",arrowOffset:0,_fixWrapperPosition:!0})},_defaultOptionsRules:()=>[{device:{platform:"ios"},options:{arrowPosition:{boundaryOffset:{h:20,v:-10},collision:"fit"}}},{device:()=>!j(),options:{animation:null}},{device:()=>wt(),options:{useFlatToolbarButtons:!0}},{device:()=>ht(),options:{useDefaultToolbarButtons:!0,showCloseButton:!1}}],_init(){var i;this.callBase(),this._renderArrow(),this._timeouts={},this.$element().addClass("dx-popover"),this.$wrapper().addClass("dx-popover-wrapper");let e=(i=this.option("toolbarItems"))===null||i===void 0?void 0:i.length;this.setAria("role",e?"dialog":"tooltip")},_render(){this.callBase.apply(this,arguments),this._detachEvents(this.option("target")),this._attachEvents()},_detachEvents(i){LE(this,i,"show"),LE(this,i,"hide")},_attachEvents(){VE(this,"show"),VE(this,"hide")},_renderArrow(){this._$arrow=u("<div>").addClass("dx-popover-arrow").prependTo(this.$overlayContent())},_documentDownHandler(i){return this._isOutsideClick(i)?this.callBase(i):!0},_isOutsideClick(i){return!u(i.target).closest(this.option("target")).length},_animate(i){i&&i.to&&typeof i.to=="object"&&m(i.to,{position:this._getContainerPosition()}),this.callBase.apply(this,arguments)},_stopAnimation(){this.callBase.apply(this,arguments)},_renderTitle(){this.$wrapper().toggleClass("dx-popover-without-title",!this.option("showTitle")),this.callBase()},_renderPosition(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.callBase(),this._renderOverlayPosition(i),this._actions.onPositioned()},_renderOverlayPosition(i){this._resetOverlayPosition(i),this._updateContentSize(i);let e=this._getContainerPosition(),t=xt.setup(this.$overlayContent(),e),n=this._getSideByLocation(t);this._togglePositionClass(`dx-position-${n}`),this._toggleFlippedClass(t.h.flip,t.v.flip),(this._isHorizontalSide()||this._isVerticalSide())&&this._renderArrowPosition(n)},_resetOverlayPosition(i){this._setContentHeight(i),this._togglePositionClass(`dx-position-${this._positionController._positionSide}`),Ve(this.$overlayContent(),{left:0,top:0}),this._$arrow.css({top:"auto",right:"auto",bottom:"auto",left:"auto"})},_updateContentSize(i){if(!this.$content()||!i)return;let e=xt.calculate(this.$overlayContent(),this._getContainerPosition());if(e.h.oversize>0&&this._isHorizontalSide()&&!e.h.fit){let t=W(this.$overlayContent())-e.h.oversize;is(this.$overlayContent(),t)}if(e.v.oversize>0&&this._isVerticalSide()&&!e.v.fit){let t=Q(this.$overlayContent())-e.v.oversize,n=Q(this.$content())-e.v.oversize;Bi(this.$overlayContent(),t),Bi(this.$content(),n)}},_getContainerPosition(){return this._positionController._getContainerPosition()},_getHideOnParentScrollTarget(){return u(this._positionController._position.of||this.callBase())},_getSideByLocation(i){let e=i.v.flip,t=i.h.flip;return this._isVerticalSide()&&e||this._isHorizontalSide()&&t||this._isPopoverInside()?l$[this._positionController._positionSide]:this._positionController._positionSide},_togglePositionClass(i){this.$wrapper().removeClass("dx-position-left dx-position-right dx-position-top dx-position-bottom").addClass(i)},_toggleFlippedClass(i,e){this.$wrapper().toggleClass("dx-popover-flipped-horizontal",i).toggleClass("dx-popover-flipped-vertical",e)},_renderArrowPosition(i){let e=Pe(this._$arrow.get(0)),t=-(this._isVerticalSide(i)?e.height:e.width);this._$arrow.css(l$[i],t);let n=this._isVerticalSide(i)?"left":"top",o=this._isVerticalSide(i)?"width":"height",s=u(this._positionController._position.of),r=xt.offset(s)||{top:0,left:0},a=xt.offset(this.$overlayContent()),l=e[o],d=a[n],c=Pe(this.$overlayContent().get(0))[o],h=r[n],p=s.get(0),g=p&&!p.preventDefault?Pe(p)[o]:0,C=Math.max(d,h),v=Math.min(d+c,h+g),b;this.option("arrowPosition")==="start"?b=C-d:this.option("arrowPosition")==="end"?b=v-d-l:b=(C+v)/2-d-l/2;let T=this._positionController._getContentBorderWidth(i),M=It(b-T+this.option("arrowOffset"),T,c-l-2*T);this._$arrow.css(n,M)},_isPopoverInside(){return this._positionController._isPopoverInside()},_setContentHeight(i){i&&this.callBase()},_getPositionControllerConfig(){let{shading:i,target:e}=this.option();return m({},this.callBase(),{target:e,shading:i,$arrow:this._$arrow})},_initPositionController(){this._positionController=new e_(this._getPositionControllerConfig())},_renderWrapperDimensions(){this.option("shading")&&this.$wrapper().css({width:"100%",height:"100%"})},_isVerticalSide(i){return this._positionController._isVerticalSide(i)},_isHorizontalSide(i){return this._positionController._isHorizontalSide(i)},_clearEventTimeout(i){clearTimeout(this._timeouts[i])},_clearEventsTimeouts(){this._clearEventTimeout("show"),this._clearEventTimeout("hide")},_clean(){this._detachEvents(this.option("target")),this.callBase.apply(this,arguments)},_optionChanged(i){switch(i.name){case"arrowPosition":case"arrowOffset":this._renderGeometry();break;case"fullScreen":i.value&&this.option("fullScreen",!1);break;case"target":i.previousValue&&this._detachEvents(i.previousValue),this._positionController.updateTarget(i.value),this._invalidate();break;case"showEvent":case"hideEvent":{let e=i.name.substring(0,4),t=d$(i.previousValue);this.hide(),LE(this,this.option("target"),e,t),VE(this,e);break}case"visible":this._clearEventTimeout(i.value?"show":"hide"),this.callBase(i);break;case"disabled":this._detachEvents(this.option("target")),this._attachEvents(),this.callBase(i);break;default:this.callBase(i)}},show(i){return i&&this.option("target",i),this.callBase()}});K("dxPopover",u$);var h$=u$;var gh=h$;var NE=(()=>{class i extends gh{_getDefaultOptions(){return m(super._getDefaultOptions(),{preventScrollEvents:!1})}_getToolbarName(){return"dxToolbar"}}return i.defaultOptions=function(e){gh.defaultOptions(e)},i})();K("dxPopover",NE);var p$=NE;var g$=p$;var $J=["*"],mh=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get animation(){return this._getOption("animation")}set animation(t){this._setOption("animation",t)}get closeOnOutsideClick(){return this._getOption("closeOnOutsideClick")}set closeOnOutsideClick(t){this._setOption("closeOnOutsideClick",t)}get container(){return this._getOption("container")}set container(t){this._setOption("container",t)}get contentTemplate(){return this._getOption("contentTemplate")}set contentTemplate(t){this._setOption("contentTemplate",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get enableBodyScroll(){return this._getOption("enableBodyScroll")}set enableBodyScroll(t){this._setOption("enableBodyScroll",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hideEvent(){return this._getOption("hideEvent")}set hideEvent(t){this._setOption("hideEvent",t)}get hideOnOutsideClick(){return this._getOption("hideOnOutsideClick")}set hideOnOutsideClick(t){this._setOption("hideOnOutsideClick",t)}get hideOnParentScroll(){return this._getOption("hideOnParentScroll")}set hideOnParentScroll(t){this._setOption("hideOnParentScroll",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get maxHeight(){return this._getOption("maxHeight")}set maxHeight(t){this._setOption("maxHeight",t)}get maxWidth(){return this._getOption("maxWidth")}set maxWidth(t){this._setOption("maxWidth",t)}get minHeight(){return this._getOption("minHeight")}set minHeight(t){this._setOption("minHeight",t)}get minWidth(){return this._getOption("minWidth")}set minWidth(t){this._setOption("minWidth",t)}get position(){return this._getOption("position")}set position(t){this._setOption("position",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get shading(){return this._getOption("shading")}set shading(t){this._setOption("shading",t)}get shadingColor(){return this._getOption("shadingColor")}set shadingColor(t){this._setOption("shadingColor",t)}get showCloseButton(){return this._getOption("showCloseButton")}set showCloseButton(t){this._setOption("showCloseButton",t)}get showEvent(){return this._getOption("showEvent")}set showEvent(t){this._setOption("showEvent",t)}get showTitle(){return this._getOption("showTitle")}set showTitle(t){this._setOption("showTitle",t)}get target(){return this._getOption("target")}set target(t){this._setOption("target",t)}get title(){return this._getOption("title")}set title(t){this._setOption("title",t)}get titleTemplate(){return this._getOption("titleTemplate")}set titleTemplate(t){this._setOption("titleTemplate",t)}get toolbarItems(){return this._getOption("toolbarItems")}set toolbarItems(t){this._setOption("toolbarItems",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get wrapperAttr(){return this._getOption("wrapperAttr")}set wrapperAttr(t){this._setOption("wrapperAttr",t)}onContentReady;onDisposing;onHidden;onHiding;onInitialized;onOptionChanged;onShowing;onShown;onTitleRendered;animationChange;closeOnOutsideClickChange;containerChange;contentTemplateChange;deferRenderingChange;disabledChange;enableBodyScrollChange;heightChange;hideEventChange;hideOnOutsideClickChange;hideOnParentScrollChange;hintChange;hoverStateEnabledChange;maxHeightChange;maxWidthChange;minHeightChange;minWidthChange;positionChange;rtlEnabledChange;shadingChange;shadingColorChange;showCloseButtonChange;showEventChange;showTitleChange;targetChange;titleChange;titleTemplateChange;toolbarItemsChange;visibleChange;widthChange;wrapperAttrChange;get toolbarItemsChildren(){return this._getOption("toolbarItems")}set toolbarItemsChildren(t){this.setChildren("toolbarItems",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"hidden",emit:"onHidden"},{subscribe:"hiding",emit:"onHiding"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"showing",emit:"onShowing"},{subscribe:"shown",emit:"onShown"},{subscribe:"titleRendered",emit:"onTitleRendered"},{emit:"animationChange"},{emit:"closeOnOutsideClickChange"},{emit:"containerChange"},{emit:"contentTemplateChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"enableBodyScrollChange"},{emit:"heightChange"},{emit:"hideEventChange"},{emit:"hideOnOutsideClickChange"},{emit:"hideOnParentScrollChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"maxHeightChange"},{emit:"maxWidthChange"},{emit:"minHeightChange"},{emit:"minWidthChange"},{emit:"positionChange"},{emit:"rtlEnabledChange"},{emit:"shadingChange"},{emit:"shadingColorChange"},{emit:"showCloseButtonChange"},{emit:"showEventChange"},{emit:"showTitleChange"},{emit:"targetChange"},{emit:"titleChange"},{emit:"titleTemplateChange"},{emit:"toolbarItemsChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapperAttrChange"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new g$(t,n)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("toolbarItems",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("toolbarItems"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-popover"]],contentQueries:function(n,o,s){if(n&1&&je(s,Jh,4),n&2){let r;Ne(r=He())&&(o.toolbarItemsChildren=r)}},inputs:{animation:"animation",closeOnOutsideClick:"closeOnOutsideClick",container:"container",contentTemplate:"contentTemplate",deferRendering:"deferRendering",disabled:"disabled",enableBodyScroll:"enableBodyScroll",height:"height",hideEvent:"hideEvent",hideOnOutsideClick:"hideOnOutsideClick",hideOnParentScroll:"hideOnParentScroll",hint:"hint",hoverStateEnabled:"hoverStateEnabled",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",position:"position",rtlEnabled:"rtlEnabled",shading:"shading",shadingColor:"shadingColor",showCloseButton:"showCloseButton",showEvent:"showEvent",showTitle:"showTitle",target:"target",title:"title",titleTemplate:"titleTemplate",toolbarItems:"toolbarItems",visible:"visible",width:"width",wrapperAttr:"wrapperAttr"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onHidden:"onHidden",onHiding:"onHiding",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onShowing:"onShowing",onShown:"onShown",onTitleRendered:"onTitleRendered",animationChange:"animationChange",closeOnOutsideClickChange:"closeOnOutsideClickChange",containerChange:"containerChange",contentTemplateChange:"contentTemplateChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",enableBodyScrollChange:"enableBodyScrollChange",heightChange:"heightChange",hideEventChange:"hideEventChange",hideOnOutsideClickChange:"hideOnOutsideClickChange",hideOnParentScrollChange:"hideOnParentScrollChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",maxHeightChange:"maxHeightChange",maxWidthChange:"maxWidthChange",minHeightChange:"minHeightChange",minWidthChange:"minWidthChange",positionChange:"positionChange",rtlEnabledChange:"rtlEnabledChange",shadingChange:"shadingChange",shadingColorChange:"shadingColorChange",showCloseButtonChange:"showCloseButtonChange",showEventChange:"showEventChange",showTitleChange:"showTitleChange",targetChange:"targetChange",titleChange:"titleChange",titleTemplateChange:"titleTemplateChange",toolbarItemsChange:"toolbarItemsChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapperAttrChange:"wrapperAttrChange"},standalone:!1,features:[ue([se,ce,k,Me]),ne,it],ngContentSelectors:$J,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},encapsulation:2})}return i})(),fh=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Il,zs,Ui,st,Se,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Il,zs,Ui,Se]})}return i})();var zJ=["*"],WJ=(()=>{class i extends ct{instance=null;get bounceEnabled(){return this._getOption("bounceEnabled")}set bounceEnabled(t){this._setOption("bounceEnabled",t)}get direction(){return this._getOption("direction")}set direction(t){this._setOption("direction",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get pulledDownText(){return this._getOption("pulledDownText")}set pulledDownText(t){this._setOption("pulledDownText",t)}get pullingDownText(){return this._getOption("pullingDownText")}set pullingDownText(t){this._setOption("pullingDownText",t)}get reachBottomText(){return this._getOption("reachBottomText")}set reachBottomText(t){this._setOption("reachBottomText",t)}get refreshingText(){return this._getOption("refreshingText")}set refreshingText(t){this._setOption("refreshingText",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get scrollByContent(){return this._getOption("scrollByContent")}set scrollByContent(t){this._setOption("scrollByContent",t)}get scrollByThumb(){return this._getOption("scrollByThumb")}set scrollByThumb(t){this._setOption("scrollByThumb",t)}get showScrollbar(){return this._getOption("showScrollbar")}set showScrollbar(t){this._setOption("showScrollbar",t)}get useNative(){return this._getOption("useNative")}set useNative(t){this._setOption("useNative",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onDisposing;onInitialized;onOptionChanged;onPullDown;onReachBottom;onScroll;onUpdated;bounceEnabledChange;directionChange;disabledChange;elementAttrChange;heightChange;pulledDownTextChange;pullingDownTextChange;reachBottomTextChange;refreshingTextChange;rtlEnabledChange;scrollByContentChange;scrollByThumbChange;showScrollbarChange;useNativeChange;widthChange;constructor(t,n,o,s,r,a,l){super(t,n,o,s,a,l),this._createEventEmitters([{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"pullDown",emit:"onPullDown"},{subscribe:"reachBottom",emit:"onReachBottom"},{subscribe:"scroll",emit:"onScroll"},{subscribe:"updated",emit:"onUpdated"},{emit:"bounceEnabledChange"},{emit:"directionChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"heightChange"},{emit:"pulledDownTextChange"},{emit:"pullingDownTextChange"},{emit:"reachBottomTextChange"},{emit:"refreshingTextChange"},{emit:"rtlEnabledChange"},{emit:"scrollByContentChange"},{emit:"scrollByThumbChange"},{emit:"showScrollbarChange"},{emit:"useNativeChange"},{emit:"widthChange"}]),r.setHost(this)}_createInstance(t,n){return new fd(t,n)}ngOnDestroy(){this._destroyWidget()}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-scroll-view"]],inputs:{bounceEnabled:"bounceEnabled",direction:"direction",disabled:"disabled",elementAttr:"elementAttr",height:"height",pulledDownText:"pulledDownText",pullingDownText:"pullingDownText",reachBottomText:"reachBottomText",refreshingText:"refreshingText",rtlEnabled:"rtlEnabled",scrollByContent:"scrollByContent",scrollByThumb:"scrollByThumb",showScrollbar:"showScrollbar",useNative:"useNative",width:"width"},outputs:{onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onPullDown:"onPullDown",onReachBottom:"onReachBottom",onScroll:"onScroll",onUpdated:"onUpdated",bounceEnabledChange:"bounceEnabledChange",directionChange:"directionChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",heightChange:"heightChange",pulledDownTextChange:"pulledDownTextChange",pullingDownTextChange:"pullingDownTextChange",reachBottomTextChange:"reachBottomTextChange",refreshingTextChange:"refreshingTextChange",rtlEnabledChange:"rtlEnabledChange",scrollByContentChange:"scrollByContentChange",scrollByThumbChange:"scrollByThumbChange",showScrollbarChange:"showScrollbarChange",useNativeChange:"useNativeChange",widthChange:"widthChange"},standalone:!1,features:[ue([se,ce,k]),ne],ngContentSelectors:zJ,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},encapsulation:2})}return i})(),GJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[st,Se,Se]})}return i})();var jJ={provide:Yi,useExisting:Zt(()=>m$),multi:!0},m$=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get buttons(){return this._getOption("buttons")}set buttons(t){this._setOption("buttons",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get mask(){return this._getOption("mask")}set mask(t){this._setOption("mask",t)}get maskChar(){return this._getOption("maskChar")}set maskChar(t){this._setOption("maskChar",t)}get maskInvalidMessage(){return this._getOption("maskInvalidMessage")}set maskInvalidMessage(t){this._setOption("maskInvalidMessage",t)}get maskRules(){return this._getOption("maskRules")}set maskRules(t){this._setOption("maskRules",t)}get maxLength(){return this._getOption("maxLength")}set maxLength(t){this._setOption("maxLength",t)}get mode(){return this._getOption("mode")}set mode(t){this._setOption("mode",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get showClearButton(){return this._getOption("showClearButton")}set showClearButton(t){this._setOption("showClearButton",t)}get showMaskMode(){return this._getOption("showMaskMode")}set showMaskMode(t){this._setOption("showMaskMode",t)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(t){this._setOption("spellcheck",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get useMaskedValue(){return this._getOption("useMaskedValue")}set useMaskedValue(t){this._setOption("useMaskedValue",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOptionChanged;onPaste;onValueChanged;accessKeyChange;activeStateEnabledChange;buttonsChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maskChange;maskCharChange;maskInvalidMessageChange;maskRulesChange;maxLengthChange;modeChange;nameChange;placeholderChange;readOnlyChange;rtlEnabledChange;showClearButtonChange;showMaskModeChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;useMaskedValueChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};get buttonsChildren(){return this._getOption("buttons")}set buttonsChildren(t){this.setChildren("buttons",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"buttonsChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maskChange"},{emit:"maskCharChange"},{emit:"maskInvalidMessageChange"},{emit:"maskRulesChange"},{emit:"maxLengthChange"},{emit:"modeChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"showClearButtonChange"},{emit:"showMaskModeChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"useMaskedValueChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new _o(t,n)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",n=>{this.eventHelper.fireNgEvent("onBlur",[n])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("buttons",t),this.setupChanges("validationErrors",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("buttons"),this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-text-box"]],contentQueries:function(n,o,s){if(n&1&&je(s,Ao,4),n&2){let r;Ne(r=He())&&(o.buttonsChildren=r)}},hostBindings:function(n,o){n&1&&et("valueChange",function(r){return o.change(r)})("onBlur",function(r){return o.touched(r)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",buttons:"buttons",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",mask:"mask",maskChar:"maskChar",maskInvalidMessage:"maskInvalidMessage",maskRules:"maskRules",maxLength:"maxLength",mode:"mode",name:"name",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",showClearButton:"showClearButton",showMaskMode:"showMaskMode",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",useMaskedValue:"useMaskedValue",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",buttonsChange:"buttonsChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maskChange:"maskChange",maskCharChange:"maskCharChange",maskInvalidMessageChange:"maskInvalidMessageChange",maskRulesChange:"maskRulesChange",maxLengthChange:"maxLengthChange",modeChange:"modeChange",nameChange:"nameChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",showClearButtonChange:"showClearButtonChange",showMaskModeChange:"showMaskModeChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",useMaskedValueChange:"useMaskedValueChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},standalone:!1,features:[ue([se,ce,jJ,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),KJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[xi,qi,st,Se,xi,qi,Se]})}return i})();var UJ=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get animationEnabled(){return this._getOption("animationEnabled")}set animationEnabled(t){this._setOption("animationEnabled",t)}get collapseIcon(){return this._getOption("collapseIcon")}set collapseIcon(t){this._setOption("collapseIcon",t)}get createChildren(){return this._getOption("createChildren")}set createChildren(t){this._setOption("createChildren",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get dataStructure(){return this._getOption("dataStructure")}set dataStructure(t){this._setOption("dataStructure",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get disabledExpr(){return this._getOption("disabledExpr")}set disabledExpr(t){this._setOption("disabledExpr",t)}get displayExpr(){return this._getOption("displayExpr")}set displayExpr(t){this._setOption("displayExpr",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get expandAllEnabled(){return this._getOption("expandAllEnabled")}set expandAllEnabled(t){this._setOption("expandAllEnabled",t)}get expandedExpr(){return this._getOption("expandedExpr")}set expandedExpr(t){this._setOption("expandedExpr",t)}get expandEvent(){return this._getOption("expandEvent")}set expandEvent(t){this._setOption("expandEvent",t)}get expandIcon(){return this._getOption("expandIcon")}set expandIcon(t){this._setOption("expandIcon",t)}get expandNodesRecursive(){return this._getOption("expandNodesRecursive")}set expandNodesRecursive(t){this._setOption("expandNodesRecursive",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get hasItemsExpr(){return this._getOption("hasItemsExpr")}set hasItemsExpr(t){this._setOption("hasItemsExpr",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(t){this._setOption("itemHoldTimeout",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get itemsExpr(){return this._getOption("itemsExpr")}set itemsExpr(t){this._setOption("itemsExpr",t)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(t){this._setOption("itemTemplate",t)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(t){this._setOption("keyExpr",t)}get noDataText(){return this._getOption("noDataText")}set noDataText(t){this._setOption("noDataText",t)}get parentIdExpr(){return this._getOption("parentIdExpr")}set parentIdExpr(t){this._setOption("parentIdExpr",t)}get rootValue(){return this._getOption("rootValue")}set rootValue(t){this._setOption("rootValue",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get scrollDirection(){return this._getOption("scrollDirection")}set scrollDirection(t){this._setOption("scrollDirection",t)}get searchEditorOptions(){return this._getOption("searchEditorOptions")}set searchEditorOptions(t){this._setOption("searchEditorOptions",t)}get searchEnabled(){return this._getOption("searchEnabled")}set searchEnabled(t){this._setOption("searchEnabled",t)}get searchExpr(){return this._getOption("searchExpr")}set searchExpr(t){this._setOption("searchExpr",t)}get searchMode(){return this._getOption("searchMode")}set searchMode(t){this._setOption("searchMode",t)}get searchTimeout(){return this._getOption("searchTimeout")}set searchTimeout(t){this._setOption("searchTimeout",t)}get searchValue(){return this._getOption("searchValue")}set searchValue(t){this._setOption("searchValue",t)}get selectAllText(){return this._getOption("selectAllText")}set selectAllText(t){this._setOption("selectAllText",t)}get selectByClick(){return this._getOption("selectByClick")}set selectByClick(t){this._setOption("selectByClick",t)}get selectedExpr(){return this._getOption("selectedExpr")}set selectedExpr(t){this._setOption("selectedExpr",t)}get selectionMode(){return this._getOption("selectionMode")}set selectionMode(t){this._setOption("selectionMode",t)}get selectNodesRecursive(){return this._getOption("selectNodesRecursive")}set selectNodesRecursive(t){this._setOption("selectNodesRecursive",t)}get showCheckBoxesMode(){return this._getOption("showCheckBoxesMode")}set showCheckBoxesMode(t){this._setOption("showCheckBoxesMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get useNativeScrolling(){return this._getOption("useNativeScrolling")}set useNativeScrolling(t){this._setOption("useNativeScrolling",t)}get virtualModeEnabled(){return this._getOption("virtualModeEnabled")}set virtualModeEnabled(t){this._setOption("virtualModeEnabled",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onContentReady;onDisposing;onInitialized;onItemClick;onItemCollapsed;onItemContextMenu;onItemExpanded;onItemHold;onItemRendered;onItemSelectionChanged;onOptionChanged;onSelectAllValueChanged;onSelectionChanged;accessKeyChange;activeStateEnabledChange;animationEnabledChange;collapseIconChange;createChildrenChange;dataSourceChange;dataStructureChange;disabledChange;disabledExprChange;displayExprChange;elementAttrChange;expandAllEnabledChange;expandedExprChange;expandEventChange;expandIconChange;expandNodesRecursiveChange;focusStateEnabledChange;hasItemsExprChange;heightChange;hintChange;hoverStateEnabledChange;itemHoldTimeoutChange;itemsChange;itemsExprChange;itemTemplateChange;keyExprChange;noDataTextChange;parentIdExprChange;rootValueChange;rtlEnabledChange;scrollDirectionChange;searchEditorOptionsChange;searchEnabledChange;searchExprChange;searchModeChange;searchTimeoutChange;searchValueChange;selectAllTextChange;selectByClickChange;selectedExprChange;selectionModeChange;selectNodesRecursiveChange;showCheckBoxesModeChange;tabIndexChange;useNativeScrollingChange;virtualModeEnabledChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemCollapsed",emit:"onItemCollapsed"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemExpanded",emit:"onItemExpanded"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"itemSelectionChanged",emit:"onItemSelectionChanged"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectAllValueChanged",emit:"onSelectAllValueChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"animationEnabledChange"},{emit:"collapseIconChange"},{emit:"createChildrenChange"},{emit:"dataSourceChange"},{emit:"dataStructureChange"},{emit:"disabledChange"},{emit:"disabledExprChange"},{emit:"displayExprChange"},{emit:"elementAttrChange"},{emit:"expandAllEnabledChange"},{emit:"expandedExprChange"},{emit:"expandEventChange"},{emit:"expandIconChange"},{emit:"expandNodesRecursiveChange"},{emit:"focusStateEnabledChange"},{emit:"hasItemsExprChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemsExprChange"},{emit:"itemTemplateChange"},{emit:"keyExprChange"},{emit:"noDataTextChange"},{emit:"parentIdExprChange"},{emit:"rootValueChange"},{emit:"rtlEnabledChange"},{emit:"scrollDirectionChange"},{emit:"searchEditorOptionsChange"},{emit:"searchEnabledChange"},{emit:"searchExprChange"},{emit:"searchModeChange"},{emit:"searchTimeoutChange"},{emit:"searchValueChange"},{emit:"selectAllTextChange"},{emit:"selectByClickChange"},{emit:"selectedExprChange"},{emit:"selectionModeChange"},{emit:"selectNodesRecursiveChange"},{emit:"showCheckBoxesModeChange"},{emit:"tabIndexChange"},{emit:"useNativeScrollingChange"},{emit:"virtualModeEnabledChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new vs(t,n)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("dataSource",t),this.setupChanges("items",t),this.setupChanges("searchExpr",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("searchExpr"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-tree-view"]],contentQueries:function(n,o,s){if(n&1&&je(s,so,4),n&2){let r;Ne(r=He())&&(o.itemsChildren=r)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",animationEnabled:"animationEnabled",collapseIcon:"collapseIcon",createChildren:"createChildren",dataSource:"dataSource",dataStructure:"dataStructure",disabled:"disabled",disabledExpr:"disabledExpr",displayExpr:"displayExpr",elementAttr:"elementAttr",expandAllEnabled:"expandAllEnabled",expandedExpr:"expandedExpr",expandEvent:"expandEvent",expandIcon:"expandIcon",expandNodesRecursive:"expandNodesRecursive",focusStateEnabled:"focusStateEnabled",hasItemsExpr:"hasItemsExpr",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",itemHoldTimeout:"itemHoldTimeout",items:"items",itemsExpr:"itemsExpr",itemTemplate:"itemTemplate",keyExpr:"keyExpr",noDataText:"noDataText",parentIdExpr:"parentIdExpr",rootValue:"rootValue",rtlEnabled:"rtlEnabled",scrollDirection:"scrollDirection",searchEditorOptions:"searchEditorOptions",searchEnabled:"searchEnabled",searchExpr:"searchExpr",searchMode:"searchMode",searchTimeout:"searchTimeout",searchValue:"searchValue",selectAllText:"selectAllText",selectByClick:"selectByClick",selectedExpr:"selectedExpr",selectionMode:"selectionMode",selectNodesRecursive:"selectNodesRecursive",showCheckBoxesMode:"showCheckBoxesMode",tabIndex:"tabIndex",useNativeScrolling:"useNativeScrolling",virtualModeEnabled:"virtualModeEnabled",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemCollapsed:"onItemCollapsed",onItemContextMenu:"onItemContextMenu",onItemExpanded:"onItemExpanded",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onItemSelectionChanged:"onItemSelectionChanged",onOptionChanged:"onOptionChanged",onSelectAllValueChanged:"onSelectAllValueChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",animationEnabledChange:"animationEnabledChange",collapseIconChange:"collapseIconChange",createChildrenChange:"createChildrenChange",dataSourceChange:"dataSourceChange",dataStructureChange:"dataStructureChange",disabledChange:"disabledChange",disabledExprChange:"disabledExprChange",displayExprChange:"displayExprChange",elementAttrChange:"elementAttrChange",expandAllEnabledChange:"expandAllEnabledChange",expandedExprChange:"expandedExprChange",expandEventChange:"expandEventChange",expandIconChange:"expandIconChange",expandNodesRecursiveChange:"expandNodesRecursiveChange",focusStateEnabledChange:"focusStateEnabledChange",hasItemsExprChange:"hasItemsExprChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemsExprChange:"itemsExprChange",itemTemplateChange:"itemTemplateChange",keyExprChange:"keyExprChange",noDataTextChange:"noDataTextChange",parentIdExprChange:"parentIdExprChange",rootValueChange:"rootValueChange",rtlEnabledChange:"rtlEnabledChange",scrollDirectionChange:"scrollDirectionChange",searchEditorOptionsChange:"searchEditorOptionsChange",searchEnabledChange:"searchEnabledChange",searchExprChange:"searchExprChange",searchModeChange:"searchModeChange",searchTimeoutChange:"searchTimeoutChange",searchValueChange:"searchValueChange",selectAllTextChange:"selectAllTextChange",selectByClickChange:"selectByClickChange",selectedExprChange:"selectedExprChange",selectionModeChange:"selectionModeChange",selectNodesRecursiveChange:"selectNodesRecursiveChange",showCheckBoxesModeChange:"showCheckBoxesModeChange",tabIndexChange:"tabIndexChange",useNativeScrollingChange:"useNativeScrollingChange",virtualModeEnabledChange:"virtualModeEnabledChange",visibleChange:"visibleChange",widthChange:"widthChange"},standalone:!1,features:[ue([se,ce,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),qJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[Ki,zC,xi,qi,st,Se,Ki,zC,xi,qi,Se]})}return i})();var f$=ia.inherit({_activeStateUnit:".dx-accordion-item",_getDefaultOptions(){return m(this.callBase(),{hoverStateEnabled:!0,height:void 0,itemTitleTemplate:"title",onItemTitleClick:null,selectedIndex:0,collapsible:!1,multiple:!1,animationDuration:300,deferRendering:!0,selectByClick:!0,activeStateEnabled:!0,_itemAttributes:{role:"tab"},_animationEasing:"ease"})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}},{device:()=>wt(),options:{animationDuration:200,_animationEasing:"cubic-bezier(0.4, 0, 0.2, 1)"}}])},_itemElements(){return this._itemContainer().children(this._itemSelector())},_init(){this.callBase(),this.option("selectionRequired",!this.option("collapsible")),this.option("selectionMode",this.option("multiple")?"multiple":"single");let i=this.$element();i.addClass("dx-accordion"),this._$container=u("<div>").addClass("dx-accordion-wrapper"),i.append(this._$container)},_initTemplates(){this.callBase(),this._templateManager.addDefaultTemplates({title:new Ai((i,e)=>{if(X(e)){let t=Mi(e.icon);t&&i.append(t),f(e.title)&&!X(e.title)&&i.append(S.createTextNode(e.title))}else f(e)&&i.text(String(e));i.wrapInner(u("<div>").addClass("dx-accordion-item-title-caption"))},["title","icon"],this.option("integrationOptions.watchMethod"))})},_initMarkup(){this._deferredItems=[],this._deferredTemplateItems=[],this.callBase(),this.setAria({role:"tablist",multiselectable:this.option("multiple")}),pt(()=>{let i=this._getSelectedItemIndices();this._renderSelection(i,[])})},_render(){this.callBase(),P.apply(this,this._deferredTemplateItems).done(()=>{this._updateItemHeights(!0)})},_itemDataKey:()=>"dxAccordionItemData",_itemClass:()=>"dx-accordion-item",_itemContainer(){return this._$container},_itemTitles(){return this._itemElements().find(".dx-accordion-item-title")},_itemContents(){return this._itemElements().find(".dx-accordion-item-body")},_getItemData(i){return u(i).parent().data(this._itemDataKey())||this.callBase.apply(this,arguments)},_executeItemRenderAction(i){i.type||this.callBase.apply(this,arguments)},_itemSelectHandler(i){u(i.target).closest(this._itemContents()).length||this.callBase.apply(this,arguments)},_afterItemElementDeleted(i,e){this._deferredItems.splice(e.itemIndex,1),this.callBase.apply(this,arguments)},_renderItemContent(i){this._deferredTemplateItems[i.index]=y();let e=this.callBase(m({},i,{contentClass:"dx-accordion-item-title",templateProperty:"titleTemplate",defaultTemplateName:this.option("itemTitleTemplate")}));this._attachItemTitleClickAction(e);let t=y();f(this._deferredItems[i.index])?this._deferredItems[i.index]=t:this._deferredItems.push(t),(!this.option("deferRendering")||this._getSelectedItemIndices().indexOf(i.index)>=0)&&t.resolve(),t.done(this.callBase.bind(this,m({},i,{contentClass:"dx-accordion-item-body",container:H(u("<div>").appendTo(u(e).parent()))})))},_onItemTemplateRendered(i,e){return()=>{let t=this._deferredTemplateItems[e.index];t&&t.resolve()}},_attachItemTitleClickAction(i){let e=D(de,this.NAME);_.off(i,e),_.on(i,e,this._itemTitleClickHandler.bind(this))},_itemTitleClickHandler(i){this._itemDXEventHandler(i,"onItemTitleClick")},_renderSelection(i,e){this._itemElements().addClass("dx-accordion-item-closed"),this.setAria("hidden",!0,this._itemContents()),this._updateItems(i,e)},_updateSelection(i,e){this._updateItems(i,e),this._updateItemHeightsWrapper(!1)},_updateItems(i,e){let t=this._itemElements();x(i,(n,o)=>{var s;(s=this._deferredItems[o])===null||s===void 0||s.resolve();let r=t.eq(o).addClass("dx-accordion-item-opened").removeClass("dx-accordion-item-closed");this.setAria("hidden",!1,r.find(".dx-accordion-item-body"))}),x(e,(n,o)=>{let s=t.eq(o).removeClass("dx-accordion-item-opened");this.setAria("hidden",!0,s.find(".dx-accordion-item-body"))})},_updateItemHeightsWrapper(i){this.option("templatesRenderAsynchronously")?this._animationTimer=setTimeout(()=>{this._updateItemHeights(i)}):this._updateItemHeights(i)},_updateItemHeights(i){let e=this,t=e._deferredAnimate,n=this._splitFreeSpace(this._calculateFreeSpace());return clearTimeout(this._animationTimer),P.apply(u,[].slice.call(this._itemElements()).map(o=>e._updateItemHeight(u(o),n,i))).done(()=>{t&&t.resolveWith(e)})},_updateItemHeight(i,e,t){let n=i.children(".dx-accordion-item-title");fe.isAnimating(i)&&fe.stop(i);let o=ee(i),s;return i.hasClass("dx-accordion-item-opened")?(s=e+ee(n),s||(Bi(i,"auto"),s=ee(i))):s=ee(n),this._animateItem(i,o,s,t,!!e)},_animateItem(i,e,t,n,o){let s;return n||e===t?(i.css("height",t),s=y().resolve()):s=fe.animate(i,{type:"custom",from:{height:e},to:{height:t},duration:this.option("animationDuration"),easing:this.option("_animationEasing")}),s.done(()=>{i.hasClass("dx-accordion-item-opened")&&!o&&i.css("height",""),i.not(".dx-accordion-item-opened").addClass("dx-accordion-item-closed")})},_splitFreeSpace(i){return i&&i/this.option("selectedItems").length},_calculateFreeSpace(){let i=this.option("height");if(i===void 0||i==="auto")return;let e=this._itemTitles(),t=0;return x(e,(n,o)=>{t+=ee(o)}),Q(this.$element())-t},_visibilityChanged(i){i&&this._dimensionChanged()},_dimensionChanged(){this._updateItemHeights(!0)},_clean(){this._deferredTemplateItems.forEach(i=>{i.reject()}),this._deferredTemplateItems=[],clearTimeout(this._animationTimer),this.callBase()},_tryParseItemPropertyName(i){let e=i.match(/.*\.(.*)/);if(f(e)&&e.length>=1)return e[1]},_optionChanged(i){switch(i.name){case"items":this.callBase(i),this._tryParseItemPropertyName(i.fullName)==="title"&&this._renderSelection(this._getSelectedItemIndices(),[]),this._tryParseItemPropertyName(i.fullName)==="visible"&&this._updateItemHeightsWrapper(!0),this.option("repaintChangesOnly")===!0&&i.fullName==="items"&&(this._updateItemHeightsWrapper(!0),this._renderSelection(this._getSelectedItemIndices(),[]));break;case"animationDuration":case"onItemTitleClick":case"_animationEasing":break;case"collapsible":this.option("selectionRequired",!this.option("collapsible"));break;case"itemTitleTemplate":case"height":case"deferRendering":this._invalidate();break;case"multiple":this.option("selectionMode",i.value?"multiple":"single");break;default:this.callBase(i)}},expandItem(i){return this._deferredAnimate=y(),this.selectItem(i),this._deferredAnimate.promise()},collapseItem(i){return this._deferredAnimate=y(),this.unselectItem(i),this._deferredAnimate.promise()},updateDimensions(){return this._updateItemHeights(!1)}});K("dxAccordion",f$);var _$=f$;var C$=_$;var YJ=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get animationDuration(){return this._getOption("animationDuration")}set animationDuration(t){this._setOption("animationDuration",t)}get collapsible(){return this._getOption("collapsible")}set collapsible(t){this._setOption("collapsible",t)}get dataSource(){return this._getOption("dataSource")}set dataSource(t){this._setOption("dataSource",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get itemHoldTimeout(){return this._getOption("itemHoldTimeout")}set itemHoldTimeout(t){this._setOption("itemHoldTimeout",t)}get items(){return this._getOption("items")}set items(t){this._setOption("items",t)}get itemTemplate(){return this._getOption("itemTemplate")}set itemTemplate(t){this._setOption("itemTemplate",t)}get itemTitleTemplate(){return this._getOption("itemTitleTemplate")}set itemTitleTemplate(t){this._setOption("itemTitleTemplate",t)}get keyExpr(){return this._getOption("keyExpr")}set keyExpr(t){this._setOption("keyExpr",t)}get multiple(){return this._getOption("multiple")}set multiple(t){this._setOption("multiple",t)}get noDataText(){return this._getOption("noDataText")}set noDataText(t){this._setOption("noDataText",t)}get repaintChangesOnly(){return this._getOption("repaintChangesOnly")}set repaintChangesOnly(t){this._setOption("repaintChangesOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get selectedIndex(){return this._getOption("selectedIndex")}set selectedIndex(t){this._setOption("selectedIndex",t)}get selectedItem(){return this._getOption("selectedItem")}set selectedItem(t){this._setOption("selectedItem",t)}get selectedItemKeys(){return this._getOption("selectedItemKeys")}set selectedItemKeys(t){this._setOption("selectedItemKeys",t)}get selectedItems(){return this._getOption("selectedItems")}set selectedItems(t){this._setOption("selectedItems",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onContentReady;onDisposing;onInitialized;onItemClick;onItemContextMenu;onItemHold;onItemRendered;onItemTitleClick;onOptionChanged;onSelectionChanged;accessKeyChange;activeStateEnabledChange;animationDurationChange;collapsibleChange;dataSourceChange;deferRenderingChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;itemHoldTimeoutChange;itemsChange;itemTemplateChange;itemTitleTemplateChange;keyExprChange;multipleChange;noDataTextChange;repaintChangesOnlyChange;rtlEnabledChange;selectedIndexChange;selectedItemChange;selectedItemKeysChange;selectedItemsChange;tabIndexChange;visibleChange;widthChange;get itemsChildren(){return this._getOption("items")}set itemsChildren(t){this.setChildren("items",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"itemClick",emit:"onItemClick"},{subscribe:"itemContextMenu",emit:"onItemContextMenu"},{subscribe:"itemHold",emit:"onItemHold"},{subscribe:"itemRendered",emit:"onItemRendered"},{subscribe:"itemTitleClick",emit:"onItemTitleClick"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"selectionChanged",emit:"onSelectionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"animationDurationChange"},{emit:"collapsibleChange"},{emit:"dataSourceChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"itemHoldTimeoutChange"},{emit:"itemsChange"},{emit:"itemTemplateChange"},{emit:"itemTitleTemplateChange"},{emit:"keyExprChange"},{emit:"multipleChange"},{emit:"noDataTextChange"},{emit:"repaintChangesOnlyChange"},{emit:"rtlEnabledChange"},{emit:"selectedIndexChange"},{emit:"selectedItemChange"},{emit:"selectedItemKeysChange"},{emit:"selectedItemsChange"},{emit:"tabIndexChange"},{emit:"visibleChange"},{emit:"widthChange"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new C$(t,n)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("dataSource",t),this.setupChanges("items",t),this.setupChanges("selectedItemKeys",t),this.setupChanges("selectedItems",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("dataSource"),this._idh.doCheck("items"),this._idh.doCheck("selectedItemKeys"),this._idh.doCheck("selectedItems"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-accordion"]],contentQueries:function(n,o,s){if(n&1&&je(s,so,4),n&2){let r;Ne(r=He())&&(o.itemsChildren=r)}},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",animationDuration:"animationDuration",collapsible:"collapsible",dataSource:"dataSource",deferRendering:"deferRendering",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",itemHoldTimeout:"itemHoldTimeout",items:"items",itemTemplate:"itemTemplate",itemTitleTemplate:"itemTitleTemplate",keyExpr:"keyExpr",multiple:"multiple",noDataText:"noDataText",repaintChangesOnly:"repaintChangesOnly",rtlEnabled:"rtlEnabled",selectedIndex:"selectedIndex",selectedItem:"selectedItem",selectedItemKeys:"selectedItemKeys",selectedItems:"selectedItems",tabIndex:"tabIndex",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onItemClick:"onItemClick",onItemContextMenu:"onItemContextMenu",onItemHold:"onItemHold",onItemRendered:"onItemRendered",onItemTitleClick:"onItemTitleClick",onOptionChanged:"onOptionChanged",onSelectionChanged:"onSelectionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",animationDurationChange:"animationDurationChange",collapsibleChange:"collapsibleChange",dataSourceChange:"dataSourceChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",itemHoldTimeoutChange:"itemHoldTimeoutChange",itemsChange:"itemsChange",itemTemplateChange:"itemTemplateChange",itemTitleTemplateChange:"itemTitleTemplateChange",keyExprChange:"keyExprChange",multipleChange:"multipleChange",noDataTextChange:"noDataTextChange",repaintChangesOnlyChange:"repaintChangesOnlyChange",rtlEnabledChange:"rtlEnabledChange",selectedIndexChange:"selectedIndexChange",selectedItemChange:"selectedItemChange",selectedItemKeysChange:"selectedItemKeysChange",selectedItemsChange:"selectedItemsChange",tabIndexChange:"tabIndexChange",visibleChange:"visibleChange",widthChange:"widthChange"},standalone:!1,features:[ue([se,ce,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),XJ=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[Ki,st,Se,Ki,Se]})}return i})();var x$={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},HE=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(i){return[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10)]}},{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*\.*\d+)\)$/,process:function(i){return[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/,process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),Number((parseInt(i[4],16)/255).toFixed(2))]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16),Number((parseInt(i[4]+i[4],16)/255).toFixed(2))]}},{re:/^#([a-f0-9]{1})([a-f0-9]{1})([a-f0-9]{1})$/,process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}},{re:/^hsv\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(i){let e=parseInt(i[1],10),t=parseInt(i[2],10),n=parseInt(i[3],10),o=v$(e,t,n);return[o[0],o[1],o[2],1,[e,t,n]]}},{re:/^hsl\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(i){let e=parseInt(i[1],10),t=parseInt(i[2],10),n=parseInt(i[3],10),o=b$(e,t,n);return[o[0],o[1],o[2],1,null,[e,t,n]]}}],Cr=Math.round;function ha(i){this.baseColor=i;let e;i&&(e=String(i).toLowerCase().replace(/ /g,""),e=x$[e]?"#"+x$[e]:e,e=QJ(e)),e||(this.colorIsInvalid=!0),e=e||{},this.r=Rs(e[0]),this.g=Rs(e[1]),this.b=Rs(e[2]),this.a=Rs(e[3],1,1),e[4]?this.hsv={h:e[4][0],s:e[4][1],v:e[4][2]}:this.hsv=JJ(this.r,this.g,this.b),e[5]?this.hsl={h:e[5][0],s:e[5][1],l:e[5][2]}:this.hsl=tee(this.r,this.g,this.b)}function QJ(i){if(i==="transparent")return[0,0,0,0];let e=0,t=HE.length,n;for(;e<t;++e)if(n=HE[e].re.exec(i),n)return HE[e].process(n);return null}function Rs(i,e,t){return e=e||0,t=t||255,i<0||isNaN(i)?e:i>t?t:i}function ZJ(i,e,t){return"#"+(16777216|i<<16|e<<8|t).toString(16).slice(1)}function JJ(i,e,t){let n=Math.max(i,e,t),o=Math.min(i,e,t),s=n-o,r,a,l=n;if(a=n===0?0:1-o/n,n===o)r=0;else switch(n){case i:r=(e-t)/s*60,e<t&&(r+=360);break;case e:r=(t-i)/s*60+120;break;case t:r=(i-e)/s*60+240}return a*=100,l*=100/255,{h:Math.round(r),s:Math.round(a),v:Math.round(l)}}function v$(i,e,t){let n=Math.floor(i%360/60),o=(100-e)*t/100,s=i%60/60*(t-o),r=o+s,a=t-s,l,d,c;switch(n){case 0:l=t,d=r,c=o;break;case 1:l=a,d=t,c=o;break;case 2:l=o,d=t,c=r;break;case 3:l=o,d=a,c=t;break;case 4:l=r,d=o,c=t;break;case 5:l=t,d=o,c=a}return[Math.round(2.55*l),Math.round(2.55*d),Math.round(2.55*c)]}function eee(i,e,t,n){switch(Math.max(i,e,t)){case i:return(e-t)/n+(e<t?6:0);case e:return(t-i)/n+2;case t:return(i-e)/n+4}}function tee(i,e,t){i=qd(i,255),e=qd(e,255),t=qd(t,255);let n=Math.max(i,e,t),o=Math.min(i,e,t),s=n+o,r,a,l=s/2;if(n===o)r=a=0;else{let d=n-o;l>.5?a=d/(2-s):a=d/s,r=eee(i,e,t,d),r/=6}return{h:Cr(360*r),s:Cr(100*a),l:Cr(100*l)}}function $E(i,e){let t=e;return i==="r"&&(t=e+1/3),i==="b"&&(t=e-1/3),t}function iee(i){return i<0&&(i+=1),i>1&&(i-=1),i}function zE(i,e,t){return t=iee(t),t<1/6?i+6*(e-i)*t:t<.5?e:t<2/3?i+(e-i)*(2/3-t)*6:i}function b$(i,e,t){let n,o,s;if(i=qd(i,360),e=qd(e,100),t=qd(t,100),e===0)n=o=s=t;else{let r=t<.5?t*(1+e):t+e-t*e,a=2*t-r;n=zE(a,r,$E("r",i)),o=zE(a,r,$E("g",i)),s=zE(a,r,$E("b",i))}return[Cr(255*n),Cr(255*o),Cr(255*s)]}function qd(i,e){return i=Math.min(e,Math.max(0,parseFloat(i))),Math.abs(i-e)<1e-6?1:i%e/parseFloat(e)}function WE(i,e,t){return e=e||0,t=t||255,!(i%1!==0||i<e||i>t||typeof i!="number"||isNaN(i))}ha.prototype={constructor:ha,highlight:function(i){return i=i||10,this.alter(i).toHex()},darken:function(i){return i=i||10,this.alter(-i).toHex()},alter:function(i){let e=new ha;return e.r=Rs(this.r+i),e.g=Rs(this.g+i),e.b=Rs(this.b+i),e},blend:function(i,e){let t=i instanceof ha?i:new ha(i),n=new ha;return n.r=Rs(Cr(this.r*(1-e)+t.r*e)),n.g=Rs(Cr(this.g*(1-e)+t.g*e)),n.b=Rs(Cr(this.b*(1-e)+t.b*e)),n},toHex:function(){return ZJ(this.r,this.g,this.b)},getPureColor:function(){let i=v$(this.hsv.h,100,100);return new ha("rgb("+i.join(",")+")")},isValidHex:function(i){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(i)},isValidRGB:function(i,e,t){return!(!WE(i)||!WE(e)||!WE(t))},isValidAlpha:function(i){return!(isNaN(i)||i<0||i>1||typeof i!="number")},colorIsInvalid:!1,fromHSL:function(i){let e=new ha,t=b$(i.h,i.s,i.l);return e.r=t[0],e.g=t[1],e.b=t[2],e}};var{PI:nee,LN10:kCt,abs:BCt,log:VCt,floor:LCt,ceil:NCt,pow:HCt,sqrt:$Ct,atan2:zCt}=Math;var WCt=Y.dateToMilliseconds;var GCt=nee/180;var oee=["*"],GE=(()=>{class i extends ct{instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get icon(){return this._getOption("icon")}set icon(t){this._setOption("icon",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get template(){return this._getOption("template")}set template(t){this._setOption("template",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get type(){return this._getOption("type")}set type(t){this._setOption("type",t)}get useSubmitBehavior(){return this._getOption("useSubmitBehavior")}set useSubmitBehavior(t){this._setOption("useSubmitBehavior",t)}get validationGroup(){return this._getOption("validationGroup")}set validationGroup(t){this._setOption("validationGroup",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onClick;onContentReady;onDisposing;onInitialized;onOptionChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;iconChange;rtlEnabledChange;stylingModeChange;tabIndexChange;templateChange;textChange;typeChange;useSubmitBehaviorChange;validationGroupChange;visibleChange;widthChange;constructor(t,n,o,s,r,a,l){super(t,n,o,s,a,l),this._createEventEmitters([{subscribe:"click",emit:"onClick"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"iconChange"},{emit:"rtlEnabledChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"templateChange"},{emit:"textChange"},{emit:"typeChange"},{emit:"useSubmitBehaviorChange"},{emit:"validationGroupChange"},{emit:"visibleChange"},{emit:"widthChange"}]),r.setHost(this)}_createInstance(t,n){return new _t(t,n)}ngOnDestroy(){this._destroyWidget()}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-button"]],inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",icon:"icon",rtlEnabled:"rtlEnabled",stylingMode:"stylingMode",tabIndex:"tabIndex",template:"template",text:"text",type:"type",useSubmitBehavior:"useSubmitBehavior",validationGroup:"validationGroup",visible:"visible",width:"width"},outputs:{onClick:"onClick",onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",iconChange:"iconChange",rtlEnabledChange:"rtlEnabledChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",templateChange:"templateChange",textChange:"textChange",typeChange:"typeChange",useSubmitBehaviorChange:"useSubmitBehaviorChange",validationGroupChange:"validationGroupChange",visibleChange:"visibleChange",widthChange:"widthChange"},standalone:!1,features:[ue([se,ce,k]),ne],ngContentSelectors:oee,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},encapsulation:2})}return i})(),jE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[st,Se,Se]})}return i})();var y$=gh.inherit({_getDefaultOptions(){return m(this.callBase(),{toolbarItems:[],showCloseButton:!1,enableBodyScroll:!0,showTitle:!1,title:null,titleTemplate:null,onTitleRendered:null,bottomTemplate:null,preventScrollEvents:!1,propagateOutsideClick:!0})},_render(){this.$element().addClass("dx-tooltip"),this.$wrapper().addClass("dx-tooltip-wrapper"),this.callBase()},_renderContent(){this.callBase(),this._toggleAriaAttributes()},_toggleAriaDescription(i){let e=u(this.option("target")),t=i?this._contentId:void 0;Ue(e.get(0))||this.setAria("describedby",t,e)},_toggleAriaAttributes(){this._contentId=`dx-${new Ae}`,this.$overlayContent().attr({id:this._contentId}),this._toggleAriaDescription(!0)}});K("dxTooltip",y$);var O$=y$;var E$=O$;var KE=function(i,e,t){let n=u(i),o=t?n.scrollLeft():n.scrollTop(),s=t?"Width":"Height",r=n.prop(`scroll${s}`),a=n.prop(`client${s}`),l=r-a-o|0;if(o===0&&l===0)return!1;let d=o===0&&e>=0,c=l===0&&e<=0,h=o>0&&l>0;if(d||c||h)return!0},w$=function(i,e){let t=u(i);return{validate(n){if(hi(n)&&(o=n.target,e?u(o).is(i):!0))return KE(t,-n.delta,n.shiftKey)?(n._needSkipEvent=!0,!0):!1;var o}}};var UE=(()=>{class i extends Oi{_getDefaultOptions(){return m(super._getDefaultOptions(),{preventScrollEvents:!1})}_getToolbarName(){return"dxToolbar"}}return i.defaultOptions=function(e){Oi.defaultOptions(e)},i})();K("dxPopup",UE);var S$=UE;var I$=S$;var see=["*"],ree=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get animation(){return this._getOption("animation")}set animation(t){this._setOption("animation",t)}get closeOnOutsideClick(){return this._getOption("closeOnOutsideClick")}set closeOnOutsideClick(t){this._setOption("closeOnOutsideClick",t)}get container(){return this._getOption("container")}set container(t){this._setOption("container",t)}get contentTemplate(){return this._getOption("contentTemplate")}set contentTemplate(t){this._setOption("contentTemplate",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get dragAndResizeArea(){return this._getOption("dragAndResizeArea")}set dragAndResizeArea(t){this._setOption("dragAndResizeArea",t)}get dragEnabled(){return this._getOption("dragEnabled")}set dragEnabled(t){this._setOption("dragEnabled",t)}get dragOutsideBoundary(){return this._getOption("dragOutsideBoundary")}set dragOutsideBoundary(t){this._setOption("dragOutsideBoundary",t)}get enableBodyScroll(){return this._getOption("enableBodyScroll")}set enableBodyScroll(t){this._setOption("enableBodyScroll",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get fullScreen(){return this._getOption("fullScreen")}set fullScreen(t){this._setOption("fullScreen",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hideOnOutsideClick(){return this._getOption("hideOnOutsideClick")}set hideOnOutsideClick(t){this._setOption("hideOnOutsideClick",t)}get hideOnParentScroll(){return this._getOption("hideOnParentScroll")}set hideOnParentScroll(t){this._setOption("hideOnParentScroll",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get maxHeight(){return this._getOption("maxHeight")}set maxHeight(t){this._setOption("maxHeight",t)}get maxWidth(){return this._getOption("maxWidth")}set maxWidth(t){this._setOption("maxWidth",t)}get minHeight(){return this._getOption("minHeight")}set minHeight(t){this._setOption("minHeight",t)}get minWidth(){return this._getOption("minWidth")}set minWidth(t){this._setOption("minWidth",t)}get position(){return this._getOption("position")}set position(t){this._setOption("position",t)}get resizeEnabled(){return this._getOption("resizeEnabled")}set resizeEnabled(t){this._setOption("resizeEnabled",t)}get restorePosition(){return this._getOption("restorePosition")}set restorePosition(t){this._setOption("restorePosition",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get shading(){return this._getOption("shading")}set shading(t){this._setOption("shading",t)}get shadingColor(){return this._getOption("shadingColor")}set shadingColor(t){this._setOption("shadingColor",t)}get showCloseButton(){return this._getOption("showCloseButton")}set showCloseButton(t){this._setOption("showCloseButton",t)}get showTitle(){return this._getOption("showTitle")}set showTitle(t){this._setOption("showTitle",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get title(){return this._getOption("title")}set title(t){this._setOption("title",t)}get titleTemplate(){return this._getOption("titleTemplate")}set titleTemplate(t){this._setOption("titleTemplate",t)}get toolbarItems(){return this._getOption("toolbarItems")}set toolbarItems(t){this._setOption("toolbarItems",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get wrapperAttr(){return this._getOption("wrapperAttr")}set wrapperAttr(t){this._setOption("wrapperAttr",t)}onContentReady;onDisposing;onHidden;onHiding;onInitialized;onOptionChanged;onResize;onResizeEnd;onResizeStart;onShowing;onShown;onTitleRendered;accessKeyChange;animationChange;closeOnOutsideClickChange;containerChange;contentTemplateChange;deferRenderingChange;disabledChange;dragAndResizeAreaChange;dragEnabledChange;dragOutsideBoundaryChange;enableBodyScrollChange;focusStateEnabledChange;fullScreenChange;heightChange;hideOnOutsideClickChange;hideOnParentScrollChange;hintChange;hoverStateEnabledChange;maxHeightChange;maxWidthChange;minHeightChange;minWidthChange;positionChange;resizeEnabledChange;restorePositionChange;rtlEnabledChange;shadingChange;shadingColorChange;showCloseButtonChange;showTitleChange;tabIndexChange;titleChange;titleTemplateChange;toolbarItemsChange;visibleChange;widthChange;wrapperAttrChange;get toolbarItemsChildren(){return this._getOption("toolbarItems")}set toolbarItemsChildren(t){this.setChildren("toolbarItems",t)}constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"hidden",emit:"onHidden"},{subscribe:"hiding",emit:"onHiding"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"resize",emit:"onResize"},{subscribe:"resizeEnd",emit:"onResizeEnd"},{subscribe:"resizeStart",emit:"onResizeStart"},{subscribe:"showing",emit:"onShowing"},{subscribe:"shown",emit:"onShown"},{subscribe:"titleRendered",emit:"onTitleRendered"},{emit:"accessKeyChange"},{emit:"animationChange"},{emit:"closeOnOutsideClickChange"},{emit:"containerChange"},{emit:"contentTemplateChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"dragAndResizeAreaChange"},{emit:"dragEnabledChange"},{emit:"dragOutsideBoundaryChange"},{emit:"enableBodyScrollChange"},{emit:"focusStateEnabledChange"},{emit:"fullScreenChange"},{emit:"heightChange"},{emit:"hideOnOutsideClickChange"},{emit:"hideOnParentScrollChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"maxHeightChange"},{emit:"maxWidthChange"},{emit:"minHeightChange"},{emit:"minWidthChange"},{emit:"positionChange"},{emit:"resizeEnabledChange"},{emit:"restorePositionChange"},{emit:"rtlEnabledChange"},{emit:"shadingChange"},{emit:"shadingColorChange"},{emit:"showCloseButtonChange"},{emit:"showTitleChange"},{emit:"tabIndexChange"},{emit:"titleChange"},{emit:"titleTemplateChange"},{emit:"toolbarItemsChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapperAttrChange"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new I$(t,n)}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("toolbarItems",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("toolbarItems"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-popup"]],contentQueries:function(n,o,s){if(n&1&&je(s,Jh,4),n&2){let r;Ne(r=He())&&(o.toolbarItemsChildren=r)}},inputs:{accessKey:"accessKey",animation:"animation",closeOnOutsideClick:"closeOnOutsideClick",container:"container",contentTemplate:"contentTemplate",deferRendering:"deferRendering",disabled:"disabled",dragAndResizeArea:"dragAndResizeArea",dragEnabled:"dragEnabled",dragOutsideBoundary:"dragOutsideBoundary",enableBodyScroll:"enableBodyScroll",focusStateEnabled:"focusStateEnabled",fullScreen:"fullScreen",height:"height",hideOnOutsideClick:"hideOnOutsideClick",hideOnParentScroll:"hideOnParentScroll",hint:"hint",hoverStateEnabled:"hoverStateEnabled",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",position:"position",resizeEnabled:"resizeEnabled",restorePosition:"restorePosition",rtlEnabled:"rtlEnabled",shading:"shading",shadingColor:"shadingColor",showCloseButton:"showCloseButton",showTitle:"showTitle",tabIndex:"tabIndex",title:"title",titleTemplate:"titleTemplate",toolbarItems:"toolbarItems",visible:"visible",width:"width",wrapperAttr:"wrapperAttr"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onHidden:"onHidden",onHiding:"onHiding",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onResize:"onResize",onResizeEnd:"onResizeEnd",onResizeStart:"onResizeStart",onShowing:"onShowing",onShown:"onShown",onTitleRendered:"onTitleRendered",accessKeyChange:"accessKeyChange",animationChange:"animationChange",closeOnOutsideClickChange:"closeOnOutsideClickChange",containerChange:"containerChange",contentTemplateChange:"contentTemplateChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",dragAndResizeAreaChange:"dragAndResizeAreaChange",dragEnabledChange:"dragEnabledChange",dragOutsideBoundaryChange:"dragOutsideBoundaryChange",enableBodyScrollChange:"enableBodyScrollChange",focusStateEnabledChange:"focusStateEnabledChange",fullScreenChange:"fullScreenChange",heightChange:"heightChange",hideOnOutsideClickChange:"hideOnOutsideClickChange",hideOnParentScrollChange:"hideOnParentScrollChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",maxHeightChange:"maxHeightChange",maxWidthChange:"maxWidthChange",minHeightChange:"minHeightChange",minWidthChange:"minWidthChange",positionChange:"positionChange",resizeEnabledChange:"resizeEnabledChange",restorePositionChange:"restorePositionChange",rtlEnabledChange:"rtlEnabledChange",shadingChange:"shadingChange",shadingColorChange:"shadingColorChange",showCloseButtonChange:"showCloseButtonChange",showTitleChange:"showTitleChange",tabIndexChange:"tabIndexChange",titleChange:"titleChange",titleTemplateChange:"titleTemplateChange",toolbarItemsChange:"toolbarItemsChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapperAttrChange:"wrapperAttrChange"},standalone:!1,features:[ue([se,ce,k,Me]),ne,it],ngContentSelectors:see,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},encapsulation:2})}return i})(),aee=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,st,Se,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Ui,Se]})}return i})();var D$=_o.inherit({_getDefaultOptions(){return m(this.callBase(),{spellcheck:!0,minHeight:void 0,maxHeight:void 0,autoResizeEnabled:!1})},_initMarkup(){this.$element().addClass("dx-textarea"),this.callBase(),this.setAria("multiline","true")},_renderContentImpl(){this._updateInputHeight(),this.callBase()},_renderInput(){this.callBase(),this._renderScrollHandler()},_createInput(){let i=u("<textarea>");return this._applyInputAttributes(i,this.option("inputAttr")),this._updateInputAutoResizeAppearance(i),i},_setInputMinHeight:E,_renderScrollHandler(){this._eventY=0;let i=this._input(),e=w$(i,!0);_.on(i,D(on.init,this.NAME),e,E),_.on(i,D(le.down,this.NAME),this._pointerDownHandler.bind(this)),_.on(i,D(le.move,this.NAME),this._pointerMoveHandler.bind(this))},_pointerDownHandler(i){this._eventY=rt(i).y},_pointerMoveHandler(i){let e=rt(i).y,t=this._eventY-e;KE(this._input(),t)&&(i.isScrollingEvent=!0,i.stopPropagation()),this._eventY=e},_renderDimensions(){let i=this.$element(),e=i.get(0),t=this._getOptionValue("width",e),n=this._getOptionValue("height",e),o=this.option("minHeight"),s=this.option("maxHeight");i.css({minHeight:o!==void 0?o:"",maxHeight:s!==void 0?s:"",width:t,height:n})},_resetDimensions(){this.$element().css({height:"",minHeight:"",maxHeight:""})},_renderEvents(){this.option("autoResizeEnabled")&&_.on(this._input(),D("input paste",this.NAME),this._updateInputHeight.bind(this)),this.callBase()},_refreshEvents(){_.off(this._input(),D("input paste",this.NAME)),this.callBase()},_getHeightDifference(i){return Ar(this._$element.get(0),!1)+Ar(this._$textEditorContainer.get(0),!1)+Ar(this._$textEditorInputContainer.get(0),!0)+Gh("height",q().getComputedStyle(i.get(0))).margin},_updateInputHeight(){if(!j())return;let i=this._input(),e=this.option("height"),t=e===void 0&&this.option("autoResizeEnabled");if(!(t||e===void 0&&this.option("minHeight"))){i.css("height","");return}this._resetDimensions(),this._$element.css("height",ee(this._$element)),i.css("height",0);let o=this._getHeightDifference(i);this._renderDimensions();let s=this._getBoundaryHeight("minHeight"),r=this._getBoundaryHeight("maxHeight"),a=i[0].scrollHeight;if(s!==void 0&&(a=Math.max(a,s-o)),r!==void 0){let l=r-o,d=a>l;a=Math.min(a,l),this._updateInputAutoResizeAppearance(i,!d)}i.css("height",a),t&&this._$element.css("height","auto")},_getBoundaryHeight(i){let e=this.option(i);if(f(e))return typeof e=="number"?e:F_(e,this.$element().get(0).parentElement,this._$element.get(0))},_renderInputType:E,_visibilityChanged(i){i&&this._updateInputHeight()},_updateInputAutoResizeAppearance(i,e){if(i){let t=Be(e,this.option("autoResizeEnabled"));i.toggleClass("dx-texteditor-input-auto-resize",t)}},_dimensionChanged(){this.option("visible")&&this._updateInputHeight()},_optionChanged(i){switch(i.name){case"autoResizeEnabled":this._updateInputAutoResizeAppearance(this._input(),i.value),this._refreshEvents(),this._updateInputHeight();break;case"value":case"height":this.callBase(i),this._updateInputHeight();break;case"minHeight":case"maxHeight":this._renderDimensions(),this._updateInputHeight();break;case"visible":this.callBase(i),i.value&&this._updateInputHeight();break;default:this.callBase(i)}}});K("dxTextArea",D$);var T$=D$;var A$=T$;var M$=vi.inherit({_supportedKeys(){let i=this.option("rtlEnabled"),e=function(n){n.preventDefault(),this._clickAction({event:n})},t=function(n,o){o.preventDefault(),o.stopPropagation(),this._saveValueChangeEvent(o),this._animateValue(n)};return m(this.callBase(),{space:e,enter:e,leftArrow:t.bind(this,!!i),rightArrow:t.bind(this,!i)})},_useTemplates:()=>!1,_getDefaultOptions(){return m(this.callBase(),{hoverStateEnabled:!0,activeStateEnabled:!0,switchedOnText:O.format("dxSwitch-switchedOnText"),switchedOffText:O.format("dxSwitch-switchedOffText"),value:!1})},_defaultOptionsRules(){return this.callBase().concat([{device:()=>F.real().deviceType==="desktop"&&!F.isSimulator(),options:{focusStateEnabled:!0}}])},_feedbackHideTimeout:0,_animating:!1,_initMarkup(){this._renderContainers(),this.$element().addClass("dx-switch").append(this._$switchWrapper),this._renderSubmitElement(),this._renderClick(),this.setAria("role","switch"),this._renderSwipeable(),this.callBase(),this._renderSwitchInner(),this._renderLabels(),this._renderValue()},_getInnerOffset(i,e){return 100*((e-this._offsetDirection()*+!i)/2)+"%"},_getHandleOffset(i,e){return this.option("rtlEnabled")&&(i=!i),i?`${100*-e-100}%`:100*-e+"%"},_renderSwitchInner(){this._$switchInner=u("<div>").addClass("dx-switch-inner").appendTo(this._$switchContainer),this._$handle=u("<div>").addClass("dx-switch-handle").appendTo(this._$switchInner)},_renderLabels(){this._$labelOn=u("<div>").addClass("dx-switch-on").prependTo(this._$switchInner),this._$labelOff=u("<div>").addClass("dx-switch-off").appendTo(this._$switchInner),this._setLabelsText()},_renderContainers(){this._$switchContainer=u("<div>").addClass("dx-switch-container"),this._$switchWrapper=u("<div>").addClass("dx-switch-wrapper").append(this._$switchContainer)},_renderSwipeable(){this._createComponent(this.$element(),dr,{elastic:!1,immediate:!0,onStart:this._swipeStartHandler.bind(this),onUpdated:this._swipeUpdateHandler.bind(this),onEnd:this._swipeEndHandler.bind(this),itemSizeFunc:this._getItemSizeFunc.bind(this)})},_getItemSizeFunc(){return ae(this._$switchContainer,!0)-Pe(this._$handle.get(0)).width},_renderSubmitElement(){this._$submitElement=u("<input>").attr("type","hidden").appendTo(this.$element())},_getSubmitElement(){return this._$submitElement},_offsetDirection(){return this.option("rtlEnabled")?-1:1},_renderPosition(i,e){let t=this._getInnerOffset(i,e),n=this._getHandleOffset(i,e);this._$switchInner.css("transform",` translateX(${t})`),this._$handle.css("transform",` translateX(${n})`)},_validateValue(){let i=this.option("value");typeof i!="boolean"&&this._options.silent("value",!!i)},_renderClick(){let i=D(de,this.NAME),e=this.$element();this._clickAction=this._createAction(this._clickHandler.bind(this)),_.off(e,i),_.on(e,i,t=>{this._clickAction({event:t})})},_clickHandler(i){let e=i.event;this._saveValueChangeEvent(e),!(this._animating||this._swiping)&&this._animateValue(!this.option("value"))},_animateValue(i){let e=this.option("value"),t=i;if(e===t)return;this._animating=!0;let n=this._getInnerOffset(e,0),o=this._getInnerOffset(t,0),s=this._getHandleOffset(e,0),r=this._getHandleOffset(t,0),a=this,l={},d={},c={},h={};l.transform=` translateX(${n})`,d.transform=` translateX(${o})`,c.transform=` translateX(${s})`,h.transform=` translateX(${r})`,this.$element().toggleClass("dx-switch-on-value",t),fe.animate(this._$handle,{from:c,to:h,duration:100}),fe.animate(this._$switchInner,{from:l,to:d,duration:100,complete(){a._animating=!1,a.option("value",t)}})},_swipeStartHandler(i){let e=this.option("value"),t=this.option("rtlEnabled"),n=t?0:1,o=t?1:0;i.event.maxLeftOffset=e?n:o,i.event.maxRightOffset=e?o:n,this._swiping=!0,this._feedbackDeferred=y(),jp(this._feedbackDeferred),this._toggleActiveState(this.$element(),this.option("activeStateEnabled"))},_swipeUpdateHandler(i){this._renderPosition(this.option("value"),i.event.offset)},_swipeEndHandler(i){let e=this,t=this._offsetDirection(),n={},o={},s=this._getInnerOffset(e.option("value"),i.event.targetOffset),r=this._getHandleOffset(e.option("value"),i.event.targetOffset);n.transform=` translateX(${s})`,o.transform=` translateX(${r})`,fe.animate(this._$handle,{to:o,duration:100}),fe.animate(this._$switchInner,{to:n,duration:100,complete(){e._swiping=!1;let a=e.option("value")+t*i.event.targetOffset;e._saveValueChangeEvent(i.event),e.option("value",!!a),e._feedbackDeferred.resolve(),e._toggleActiveState(e.$element(),!1)}})},_renderValue(){this._validateValue();let i=this.option("value");this._renderPosition(i,0),this.$element().toggleClass("dx-switch-on-value",i),this._getSubmitElement().val(i),this.setAria({checked:i,label:i?this.option("switchedOnText"):this.option("switchedOffText")})},_setLabelsText(){this._$labelOn&&this._$labelOn.text(this.option("switchedOnText")),this._$labelOff&&this._$labelOff.text(this.option("switchedOffText"))},_visibilityChanged(i){i&&this.repaint()},_optionChanged(i){switch(i.name){case"width":delete this._marginBound,this._refresh();break;case"switchedOnText":case"switchedOffText":this._setLabelsText();break;case"value":this._renderValue(),this.callBase(i);break;default:this.callBase(i)}}});K("dxSwitch",M$);var R$=M$;var F$=R$;var lee={provide:Yi,useExisting:Zt(()=>P$),multi:!0},P$=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get switchedOffText(){return this._getOption("switchedOffText")}set switchedOffText(t){this._setOption("switchedOffText",t)}get switchedOnText(){return this._getOption("switchedOnText")}set switchedOnText(t){this._setOption("switchedOnText",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onContentReady;onDisposing;onInitialized;onOptionChanged;onValueChanged;accessKeyChange;activeStateEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;isDirtyChange;isValidChange;nameChange;readOnlyChange;rtlEnabledChange;switchedOffTextChange;switchedOnTextChange;tabIndexChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"nameChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"switchedOffTextChange"},{emit:"switchedOnTextChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new F$(t,n)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",n=>{this.eventHelper.fireNgEvent("onBlur",[n])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("validationErrors",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-switch"]],hostBindings:function(n,o){n&1&&et("valueChange",function(r){return o.change(r)})("onBlur",function(r){return o.touched(r)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",isDirty:"isDirty",isValid:"isValid",name:"name",readOnly:"readOnly",rtlEnabled:"rtlEnabled",switchedOffText:"switchedOffText",switchedOnText:"switchedOnText",tabIndex:"tabIndex",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",visible:"visible",width:"width"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",nameChange:"nameChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",switchedOffTextChange:"switchedOffTextChange",switchedOnTextChange:"switchedOnTextChange",tabIndexChange:"tabIndexChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},standalone:!1,features:[ue([se,ce,lee,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),dee=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[st,Se,Se]})}return i})();var cee={provide:Yi,useExisting:Zt(()=>k$),multi:!0},k$=(()=>{class i extends ct{_watcherHelper;_idh;instance=null;get accessKey(){return this._getOption("accessKey")}set accessKey(t){this._setOption("accessKey",t)}get activeStateEnabled(){return this._getOption("activeStateEnabled")}set activeStateEnabled(t){this._setOption("activeStateEnabled",t)}get autoResizeEnabled(){return this._getOption("autoResizeEnabled")}set autoResizeEnabled(t){this._setOption("autoResizeEnabled",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get elementAttr(){return this._getOption("elementAttr")}set elementAttr(t){this._setOption("elementAttr",t)}get focusStateEnabled(){return this._getOption("focusStateEnabled")}set focusStateEnabled(t){this._setOption("focusStateEnabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get inputAttr(){return this._getOption("inputAttr")}set inputAttr(t){this._setOption("inputAttr",t)}get isDirty(){return this._getOption("isDirty")}set isDirty(t){this._setOption("isDirty",t)}get isValid(){return this._getOption("isValid")}set isValid(t){this._setOption("isValid",t)}get label(){return this._getOption("label")}set label(t){this._setOption("label",t)}get labelMode(){return this._getOption("labelMode")}set labelMode(t){this._setOption("labelMode",t)}get maxHeight(){return this._getOption("maxHeight")}set maxHeight(t){this._setOption("maxHeight",t)}get maxLength(){return this._getOption("maxLength")}set maxLength(t){this._setOption("maxLength",t)}get minHeight(){return this._getOption("minHeight")}set minHeight(t){this._setOption("minHeight",t)}get name(){return this._getOption("name")}set name(t){this._setOption("name",t)}get placeholder(){return this._getOption("placeholder")}set placeholder(t){this._setOption("placeholder",t)}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOption("readOnly",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get spellcheck(){return this._getOption("spellcheck")}set spellcheck(t){this._setOption("spellcheck",t)}get stylingMode(){return this._getOption("stylingMode")}set stylingMode(t){this._setOption("stylingMode",t)}get tabIndex(){return this._getOption("tabIndex")}set tabIndex(t){this._setOption("tabIndex",t)}get text(){return this._getOption("text")}set text(t){this._setOption("text",t)}get validationError(){return this._getOption("validationError")}set validationError(t){this._setOption("validationError",t)}get validationErrors(){return this._getOption("validationErrors")}set validationErrors(t){this._setOption("validationErrors",t)}get validationMessageMode(){return this._getOption("validationMessageMode")}set validationMessageMode(t){this._setOption("validationMessageMode",t)}get validationMessagePosition(){return this._getOption("validationMessagePosition")}set validationMessagePosition(t){this._setOption("validationMessagePosition",t)}get validationStatus(){return this._getOption("validationStatus")}set validationStatus(t){this._setOption("validationStatus",t)}get value(){return this._getOption("value")}set value(t){this._setOption("value",t)}get valueChangeEvent(){return this._getOption("valueChangeEvent")}set valueChangeEvent(t){this._setOption("valueChangeEvent",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}onChange;onContentReady;onCopy;onCut;onDisposing;onEnterKey;onFocusIn;onFocusOut;onInitialized;onInput;onKeyDown;onKeyUp;onOptionChanged;onPaste;onValueChanged;accessKeyChange;activeStateEnabledChange;autoResizeEnabledChange;disabledChange;elementAttrChange;focusStateEnabledChange;heightChange;hintChange;hoverStateEnabledChange;inputAttrChange;isDirtyChange;isValidChange;labelChange;labelModeChange;maxHeightChange;maxLengthChange;minHeightChange;nameChange;placeholderChange;readOnlyChange;rtlEnabledChange;spellcheckChange;stylingModeChange;tabIndexChange;textChange;validationErrorChange;validationErrorsChange;validationMessageModeChange;validationMessagePositionChange;validationStatusChange;valueChange;valueChangeEventChange;visibleChange;widthChange;onBlur;change(t){}touched=t=>{};constructor(t,n,o,s,r,a,l,d){super(t,n,o,s,l,d),this._watcherHelper=s,this._idh=r,this._createEventEmitters([{subscribe:"change",emit:"onChange"},{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"copy",emit:"onCopy"},{subscribe:"cut",emit:"onCut"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"enterKey",emit:"onEnterKey"},{subscribe:"focusIn",emit:"onFocusIn"},{subscribe:"focusOut",emit:"onFocusOut"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"input",emit:"onInput"},{subscribe:"keyDown",emit:"onKeyDown"},{subscribe:"keyUp",emit:"onKeyUp"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"paste",emit:"onPaste"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"autoResizeEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"inputAttrChange"},{emit:"isDirtyChange"},{emit:"isValidChange"},{emit:"labelChange"},{emit:"labelModeChange"},{emit:"maxHeightChange"},{emit:"maxLengthChange"},{emit:"minHeightChange"},{emit:"nameChange"},{emit:"placeholderChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"spellcheckChange"},{emit:"stylingModeChange"},{emit:"tabIndexChange"},{emit:"textChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationMessagePositionChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"valueChangeEventChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),this._idh.setHost(this),a.setHost(this)}_createInstance(t,n){return new A$(t,n)}writeValue(t){this.eventHelper.lockedValueChangeEvent=!0,this.value=t,this.eventHelper.lockedValueChangeEvent=!1}setDisabledState(t){this.disabled=t}registerOnChange(t){this.change=t}registerOnTouched(t){this.touched=t}_createWidget(t){super._createWidget(t),this.instance.on("focusOut",n=>{this.eventHelper.fireNgEvent("onBlur",[n])})}ngOnDestroy(){this._destroyWidget()}ngOnChanges(t){super.ngOnChanges(t),this.setupChanges("validationErrors",t)}setupChanges(t,n){t in this._optionsToUpdate||this._idh.setup(t,n)}ngDoCheck(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),super.ngDoCheck(),super.clearChangedOptions()}_setOption(t,n){let o=this._idh.setupSingle(t,n),s=this._idh.getChanges(t,n)!==null;(o||s)&&super._setOption(t,n)}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(Me),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-text-area"]],hostBindings:function(n,o){n&1&&et("valueChange",function(r){return o.change(r)})("onBlur",function(r){return o.touched(r)})},inputs:{accessKey:"accessKey",activeStateEnabled:"activeStateEnabled",autoResizeEnabled:"autoResizeEnabled",disabled:"disabled",elementAttr:"elementAttr",focusStateEnabled:"focusStateEnabled",height:"height",hint:"hint",hoverStateEnabled:"hoverStateEnabled",inputAttr:"inputAttr",isDirty:"isDirty",isValid:"isValid",label:"label",labelMode:"labelMode",maxHeight:"maxHeight",maxLength:"maxLength",minHeight:"minHeight",name:"name",placeholder:"placeholder",readOnly:"readOnly",rtlEnabled:"rtlEnabled",spellcheck:"spellcheck",stylingMode:"stylingMode",tabIndex:"tabIndex",text:"text",validationError:"validationError",validationErrors:"validationErrors",validationMessageMode:"validationMessageMode",validationMessagePosition:"validationMessagePosition",validationStatus:"validationStatus",value:"value",valueChangeEvent:"valueChangeEvent",visible:"visible",width:"width"},outputs:{onChange:"onChange",onContentReady:"onContentReady",onCopy:"onCopy",onCut:"onCut",onDisposing:"onDisposing",onEnterKey:"onEnterKey",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onInitialized:"onInitialized",onInput:"onInput",onKeyDown:"onKeyDown",onKeyUp:"onKeyUp",onOptionChanged:"onOptionChanged",onPaste:"onPaste",onValueChanged:"onValueChanged",accessKeyChange:"accessKeyChange",activeStateEnabledChange:"activeStateEnabledChange",autoResizeEnabledChange:"autoResizeEnabledChange",disabledChange:"disabledChange",elementAttrChange:"elementAttrChange",focusStateEnabledChange:"focusStateEnabledChange",heightChange:"heightChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",inputAttrChange:"inputAttrChange",isDirtyChange:"isDirtyChange",isValidChange:"isValidChange",labelChange:"labelChange",labelModeChange:"labelModeChange",maxHeightChange:"maxHeightChange",maxLengthChange:"maxLengthChange",minHeightChange:"minHeightChange",nameChange:"nameChange",placeholderChange:"placeholderChange",readOnlyChange:"readOnlyChange",rtlEnabledChange:"rtlEnabledChange",spellcheckChange:"spellcheckChange",stylingModeChange:"stylingModeChange",tabIndexChange:"tabIndexChange",textChange:"textChange",validationErrorChange:"validationErrorChange",validationErrorsChange:"validationErrorsChange",validationMessageModeChange:"validationMessageModeChange",validationMessagePositionChange:"validationMessagePositionChange",validationStatusChange:"validationStatusChange",valueChange:"valueChange",valueChangeEventChange:"valueChangeEventChange",visibleChange:"visibleChange",widthChange:"widthChange",onBlur:"onBlur"},standalone:!1,features:[ue([se,ce,cee,k,Me]),ne,it],decls:0,vars:0,template:function(n,o){},encapsulation:2})}return i})(),uee=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[st,Se,Se]})}return i})();var hee=["*"],qE=(()=>{class i extends ct{instance=null;get animation(){return this._getOption("animation")}set animation(t){this._setOption("animation",t)}get closeOnOutsideClick(){return this._getOption("closeOnOutsideClick")}set closeOnOutsideClick(t){this._setOption("closeOnOutsideClick",t)}get container(){return this._getOption("container")}set container(t){this._setOption("container",t)}get contentTemplate(){return this._getOption("contentTemplate")}set contentTemplate(t){this._setOption("contentTemplate",t)}get deferRendering(){return this._getOption("deferRendering")}set deferRendering(t){this._setOption("deferRendering",t)}get disabled(){return this._getOption("disabled")}set disabled(t){this._setOption("disabled",t)}get height(){return this._getOption("height")}set height(t){this._setOption("height",t)}get hideEvent(){return this._getOption("hideEvent")}set hideEvent(t){this._setOption("hideEvent",t)}get hideOnOutsideClick(){return this._getOption("hideOnOutsideClick")}set hideOnOutsideClick(t){this._setOption("hideOnOutsideClick",t)}get hideOnParentScroll(){return this._getOption("hideOnParentScroll")}set hideOnParentScroll(t){this._setOption("hideOnParentScroll",t)}get hint(){return this._getOption("hint")}set hint(t){this._setOption("hint",t)}get hoverStateEnabled(){return this._getOption("hoverStateEnabled")}set hoverStateEnabled(t){this._setOption("hoverStateEnabled",t)}get maxHeight(){return this._getOption("maxHeight")}set maxHeight(t){this._setOption("maxHeight",t)}get maxWidth(){return this._getOption("maxWidth")}set maxWidth(t){this._setOption("maxWidth",t)}get minHeight(){return this._getOption("minHeight")}set minHeight(t){this._setOption("minHeight",t)}get minWidth(){return this._getOption("minWidth")}set minWidth(t){this._setOption("minWidth",t)}get position(){return this._getOption("position")}set position(t){this._setOption("position",t)}get rtlEnabled(){return this._getOption("rtlEnabled")}set rtlEnabled(t){this._setOption("rtlEnabled",t)}get shading(){return this._getOption("shading")}set shading(t){this._setOption("shading",t)}get shadingColor(){return this._getOption("shadingColor")}set shadingColor(t){this._setOption("shadingColor",t)}get showEvent(){return this._getOption("showEvent")}set showEvent(t){this._setOption("showEvent",t)}get target(){return this._getOption("target")}set target(t){this._setOption("target",t)}get visible(){return this._getOption("visible")}set visible(t){this._setOption("visible",t)}get width(){return this._getOption("width")}set width(t){this._setOption("width",t)}get wrapperAttr(){return this._getOption("wrapperAttr")}set wrapperAttr(t){this._setOption("wrapperAttr",t)}onContentReady;onDisposing;onHidden;onHiding;onInitialized;onOptionChanged;onShowing;onShown;animationChange;closeOnOutsideClickChange;containerChange;contentTemplateChange;deferRenderingChange;disabledChange;heightChange;hideEventChange;hideOnOutsideClickChange;hideOnParentScrollChange;hintChange;hoverStateEnabledChange;maxHeightChange;maxWidthChange;minHeightChange;minWidthChange;positionChange;rtlEnabledChange;shadingChange;shadingColorChange;showEventChange;targetChange;visibleChange;widthChange;wrapperAttrChange;constructor(t,n,o,s,r,a,l){super(t,n,o,s,a,l),this._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"hidden",emit:"onHidden"},{subscribe:"hiding",emit:"onHiding"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"showing",emit:"onShowing"},{subscribe:"shown",emit:"onShown"},{emit:"animationChange"},{emit:"closeOnOutsideClickChange"},{emit:"containerChange"},{emit:"contentTemplateChange"},{emit:"deferRenderingChange"},{emit:"disabledChange"},{emit:"heightChange"},{emit:"hideEventChange"},{emit:"hideOnOutsideClickChange"},{emit:"hideOnParentScrollChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"maxHeightChange"},{emit:"maxWidthChange"},{emit:"minHeightChange"},{emit:"minWidthChange"},{emit:"positionChange"},{emit:"rtlEnabledChange"},{emit:"shadingChange"},{emit:"shadingColorChange"},{emit:"showEventChange"},{emit:"targetChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"wrapperAttrChange"}]),r.setHost(this)}_createInstance(t,n){return new E$(t,n)}ngOnDestroy(){this._destroyWidget()}static \u0275fac=function(n){return new(n||i)(w($e),w(Ye),w(se),w(ce),w(k),w(ot),w(dt))};static \u0275cmp=Z({type:i,selectors:[["dx-tooltip"]],inputs:{animation:"animation",closeOnOutsideClick:"closeOnOutsideClick",container:"container",contentTemplate:"contentTemplate",deferRendering:"deferRendering",disabled:"disabled",height:"height",hideEvent:"hideEvent",hideOnOutsideClick:"hideOnOutsideClick",hideOnParentScroll:"hideOnParentScroll",hint:"hint",hoverStateEnabled:"hoverStateEnabled",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",position:"position",rtlEnabled:"rtlEnabled",shading:"shading",shadingColor:"shadingColor",showEvent:"showEvent",target:"target",visible:"visible",width:"width",wrapperAttr:"wrapperAttr"},outputs:{onContentReady:"onContentReady",onDisposing:"onDisposing",onHidden:"onHidden",onHiding:"onHiding",onInitialized:"onInitialized",onOptionChanged:"onOptionChanged",onShowing:"onShowing",onShown:"onShown",animationChange:"animationChange",closeOnOutsideClickChange:"closeOnOutsideClickChange",containerChange:"containerChange",contentTemplateChange:"contentTemplateChange",deferRenderingChange:"deferRenderingChange",disabledChange:"disabledChange",heightChange:"heightChange",hideEventChange:"hideEventChange",hideOnOutsideClickChange:"hideOnOutsideClickChange",hideOnParentScrollChange:"hideOnParentScrollChange",hintChange:"hintChange",hoverStateEnabledChange:"hoverStateEnabledChange",maxHeightChange:"maxHeightChange",maxWidthChange:"maxWidthChange",minHeightChange:"minHeightChange",minWidthChange:"minWidthChange",positionChange:"positionChange",rtlEnabledChange:"rtlEnabledChange",shadingChange:"shadingChange",shadingColorChange:"shadingColorChange",showEventChange:"showEventChange",targetChange:"targetChange",visibleChange:"visibleChange",widthChange:"widthChange",wrapperAttrChange:"wrapperAttrChange"},standalone:!1,features:[ue([se,ce,k]),ne],ngContentSelectors:hee,decls:1,vars:0,template:function(n,o){n&1&&(ii(),ni(0))},encapsulation:2})}return i})(),YE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=N({type:i});static \u0275inj=L({imports:[$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Il,zs,st,Se,$t,Kt,jt,Yt,zt,Wt,Gt,Ut,qt,Qt,Xt,Il,zs,Se]})}return i})();var pee=["*"];function gee(i,e){if(i&1&&ti(0,"tis-svg",4),i&2){let t=J();cw(t.variant),V("icon",t.icon)}}function mee(i,e){i&1&&ni(0,0,["*ngIf","!label"])}function fee(i,e){if(i&1&&ti(0,"tis-svg",4),i&2){let t=J();V("icon",t.iconRight)}}var B$=(()=>{class i{constructor(){this.label="",this.variant="default",this.stylingMode="contained",this.fullWidth=!1,this.fullHeight=!1,this.focusStateEnabled=!0,this.isIcon=!1,this.font="default",this.disabled=!1,this.clicked=new vt,this.tabindex=-1}get width(){return this.fullWidth?"100%":null}get isIconButton(){return this.isIcon||!!this.icon&&!this.label&&!this.iconRight||!!this.iconRight&&!this.label&&!this.icon||typeof this.label=="number"}get buttonClasses(){return{[`dx-custom-button-font-${this.font}`]:!0,[`dx-custom-button-${this.variant}`]:!0,[`dx-custom-button-${this.stylingMode}`]:!0,"dx-custom-button-with-icon":!!this.icon||!!this.iconRight,"dx-custom-button-without-label":!this.label,"dx-custom-button-icon-button":this.isIconButton}}click(t){this.clicked.emit(t.event)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-button"]],hostVars:3,hostBindings:function(n,o){n&2&&(Io("tabindex",o.tabindex),dw("width",o.width))},inputs:{label:"label",token:"token",variant:"variant",stylingMode:"stylingMode",fullWidth:"fullWidth",fullHeight:"fullHeight",focusStateEnabled:"focusStateEnabled",height:"height",isIcon:"isIcon",font:"font",icon:"icon",iconRight:"iconRight",disabled:"disabled"},outputs:{clicked:"clicked"},ngContentSelectors:pee,decls:5,vars:11,consts:[[3,"onClick","disabled","ngClass","height","focusStateEnabled"],[3,"icon","class",4,"ngIf"],[4,"ngIf"],[3,"icon",4,"ngIf"],[3,"icon"]],template:function(n,o){n&1&&(ii(),De(0,"dx-button",0),et("onClick",function(r){return o.click(r)}),be(1,gee,1,3,"tis-svg",1),Ge(2),be(3,mee,1,0,"ng-content",2)(4,fee,1,1,"tis-svg",3),Te()),n&2&&(ui("fullHeight",o.fullHeight),V("disabled",o.disabled)("ngClass",o.buttonClasses)("height",o.height)("focusStateEnabled",o.focusStateEnabled),Io("data-token",o.token),U(),V("ngIf",o.icon),U(),oi(" ",o.label," "),U(),V("ngIf",!o.label),U(),V("ngIf",o.iconRight))},dependencies:[Si,Xo,wi,jE,GE,Zn],styles:[`tis-button{display:flex;width:fit-content}tis-button .dx-button{width:100%;height:var(--space-vertical-xxxxlnudge);padding:var(--space-vertical-s) var(--space-horizontal-l);font:var(--font-body-1-strong);white-space:nowrap;border-radius:var(--radius-medium);transition:all .2s}tis-button .dx-button.dx-custom-button-with-icon{padding:var(--space-vertical-s) var(--space-horizontal-m)}tis-button .dx-button.dx-custom-button-font-medium{font:var(--font-body-2-strong)}tis-button .dx-button.dx-custom-button-font-large{font:var(--font-title-3)}tis-button .dx-button.dx-custom-button-without-label{padding:var(--space-vertical-s) var(--space-horizontal-s)}tis-button .dx-button.dx-custom-button-icon-button{min-width:var(--space-vertical-xxxxlnudge);padding:var(--space-vertical-s) calc(var(--space-horizontal-s) - 1px)}tis-button .dx-button.fullHeight{height:100%}tis-button .dx-button .dx-button-content{display:flex;flex-shrink:0;flex-wrap:nowrap;gap:var(--space-horizontal-s);align-items:center;justify-content:center;width:fit-content;padding:0}tis-button .dx-custom-button-default.dx-custom-button-contained{color:var(--btn-default-contained-color);background-color:var(--btn-default-contained-bg-rest);border:1px solid var(--btn-default-contained-bg-rest)}tis-button .dx-custom-button-default.dx-custom-button-contained svg{fill:var(--btn-default-contained-color)}tis-button .dx-custom-button-default.dx-custom-button-contained:hover{color:var(--btn-default-contained-color);background-color:var(--btn-default-contained-bg-hover);border:1px solid var(--btn-default-contained-bg-hover)}tis-button .dx-custom-button-default.dx-custom-button-contained:focus{color:var(--btn-default-contained-color);background-color:var(--btn-default-contained-bg-focused);border:1px solid var(--btn-default-contained-bg-focused)}tis-button .dx-custom-button-default.dx-custom-button-contained:active{color:var(--btn-default-contained-color);background-color:var(--btn-default-contained-bg-active);border:1px solid var(--btn-default-contained-bg-active)}tis-button .dx-custom-button-default.dx-custom-button-contained.dx-state-disabled{color:var(--btn-default-contained-color-disabled);background-color:var(--btn-default-contained-bg-disabled);border:1px solid var(--btn-default-contained-bg-disabled)}tis-button .dx-custom-button-default.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-default-contained-color-disabled)}tis-button .dx-custom-button-default.dx-custom-button-outlined{color:var(--btn-default-outlined-color);background-color:var(--btn-default-outlined-bg-rest);border:1px solid var(--btn-default-outlined-stroke-rest)}tis-button .dx-custom-button-default.dx-custom-button-outlined svg{fill:var(--btn-default-outlined-color)}tis-button .dx-custom-button-default.dx-custom-button-outlined:hover{color:var(--btn-default-outlined-color);background-color:var(--btn-default-outlined-bg-hover);border:1px solid var(--btn-default-outlined-stroke-rest)}tis-button .dx-custom-button-default.dx-custom-button-outlined:focus{color:var(--btn-default-outlined-color);background-color:var(--btn-default-outlined-bg-focused);border:1px solid var(--btn-default-outlined-stroke-rest)}tis-button .dx-custom-button-default.dx-custom-button-outlined:active{color:var(--btn-default-outlined-color);background-color:var(--btn-default-outlined-bg-active);border:1px solid var(--btn-default-outlined-stroke-rest)}tis-button .dx-custom-button-default.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-default-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-default-outlined-stroke-disabled)}tis-button .dx-custom-button-default.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-default-outlined-color-disabled)}tis-button .dx-custom-button-default.dx-custom-button-ghost{color:var(--btn-default-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-default.dx-custom-button-ghost svg{fill:var(--btn-default-ghost-color)}tis-button .dx-custom-button-default.dx-custom-button-ghost:hover{color:var(--btn-default-ghost-color);background-color:var(--btn-default-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-default.dx-custom-button-ghost:focus{color:var(--btn-default-ghost-color);background-color:var(--btn-default-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-default.dx-custom-button-ghost:active{color:var(--btn-default-ghost-color);background-color:var(--btn-default-ghost-bg-active);border:transparent}tis-button .dx-custom-button-default.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-default-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-default.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-default-ghost-color-disabled)}tis-button .dx-custom-button-secondary.dx-custom-button-contained{color:var(--btn-secondary-contained-color);background-color:var(--btn-secondary-contained-bg-rest);border:1px solid var(--btn-secondary-contained-bg-rest)}tis-button .dx-custom-button-secondary.dx-custom-button-contained svg{fill:var(--btn-secondary-contained-color)}tis-button .dx-custom-button-secondary.dx-custom-button-contained:hover{color:var(--btn-secondary-contained-color);background-color:var(--btn-secondary-contained-bg-hover);border:1px solid var(--btn-secondary-contained-bg-hover)}tis-button .dx-custom-button-secondary.dx-custom-button-contained:focus{color:var(--btn-secondary-contained-color);background-color:var(--btn-secondary-contained-bg-focused);border:1px solid var(--btn-secondary-contained-bg-focused)}tis-button .dx-custom-button-secondary.dx-custom-button-contained:active{color:var(--btn-secondary-contained-color);background-color:var(--btn-secondary-contained-bg-active);border:1px solid var(--btn-secondary-contained-bg-active)}tis-button .dx-custom-button-secondary.dx-custom-button-contained.dx-state-disabled{color:var(--btn-secondary-contained-color-disabled);background-color:var(--btn-secondary-contained-bg-disabled);border:1px solid var(--btn-secondary-contained-bg-disabled)}tis-button .dx-custom-button-secondary.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-secondary-contained-color-disabled)}tis-button .dx-custom-button-secondary.dx-custom-button-outlined{color:var(--btn-secondary-outlined-color);background-color:var(--btn-secondary-outlined-bg-rest);border:1px solid var(--btn-secondary-outlined-stroke-rest)}tis-button .dx-custom-button-secondary.dx-custom-button-outlined svg{fill:var(--btn-secondary-outlined-color)}tis-button .dx-custom-button-secondary.dx-custom-button-outlined:hover{color:var(--btn-secondary-outlined-color);background-color:var(--btn-secondary-outlined-bg-hover);border:1px solid var(--btn-secondary-outlined-stroke-rest)}tis-button .dx-custom-button-secondary.dx-custom-button-outlined:focus{color:var(--btn-secondary-outlined-color);background-color:var(--btn-secondary-outlined-bg-focused);border:1px solid var(--btn-secondary-outlined-stroke-rest)}tis-button .dx-custom-button-secondary.dx-custom-button-outlined:active{color:var(--btn-secondary-outlined-color);background-color:var(--btn-secondary-outlined-bg-active);border:1px solid var(--btn-secondary-outlined-stroke-rest)}tis-button .dx-custom-button-secondary.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-secondary-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-secondary-outlined-stroke-disabled)}tis-button .dx-custom-button-secondary.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-secondary-outlined-color-disabled)}tis-button .dx-custom-button-secondary.dx-custom-button-ghost{color:var(--btn-secondary-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-secondary.dx-custom-button-ghost svg{fill:var(--btn-secondary-ghost-color)}tis-button .dx-custom-button-secondary.dx-custom-button-ghost:hover{color:var(--btn-secondary-ghost-color);background-color:var(--btn-secondary-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-secondary.dx-custom-button-ghost:focus{color:var(--btn-secondary-ghost-color);background-color:var(--btn-secondary-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-secondary.dx-custom-button-ghost:active{color:var(--btn-secondary-ghost-color);background-color:var(--btn-secondary-ghost-bg-active);border:transparent}tis-button .dx-custom-button-secondary.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-secondary-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-secondary.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-secondary-ghost-color-disabled)}tis-button .dx-custom-button-alternative.dx-custom-button-contained{color:var(--btn-alternative-contained-color);background-color:var(--btn-alternative-contained-bg-rest);border:1px solid var(--btn-alternative-contained-bg-rest)}tis-button .dx-custom-button-alternative.dx-custom-button-contained svg{fill:var(--btn-alternative-contained-color)}tis-button .dx-custom-button-alternative.dx-custom-button-contained:hover{color:var(--btn-alternative-contained-color);background-color:var(--btn-alternative-contained-bg-hover);border:1px solid var(--btn-alternative-contained-bg-hover)}tis-button .dx-custom-button-alternative.dx-custom-button-contained:focus{color:var(--btn-alternative-contained-color);background-color:var(--btn-alternative-contained-bg-focused);border:1px solid var(--btn-alternative-contained-bg-focused)}tis-button .dx-custom-button-alternative.dx-custom-button-contained:active{color:var(--btn-alternative-contained-color);background-color:var(--btn-alternative-contained-bg-active);border:1px solid var(--btn-alternative-contained-bg-active)}tis-button .dx-custom-button-alternative.dx-custom-button-contained.dx-state-disabled{color:var(--btn-alternative-contained-color-disabled);background-color:var(--btn-alternative-contained-bg-disabled);border:1px solid var(--btn-alternative-contained-bg-disabled)}tis-button .dx-custom-button-alternative.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-alternative-contained-color-disabled)}tis-button .dx-custom-button-alternative.dx-custom-button-outlined{color:var(--btn-alternative-outlined-color);background-color:var(--btn-alternative-outlined-bg-rest);border:1px solid var(--btn-alternative-outlined-stroke-rest)}tis-button .dx-custom-button-alternative.dx-custom-button-outlined svg{fill:var(--btn-alternative-outlined-color)}tis-button .dx-custom-button-alternative.dx-custom-button-outlined:hover{color:var(--btn-alternative-outlined-color);background-color:var(--btn-alternative-outlined-bg-hover);border:1px solid var(--btn-alternative-outlined-stroke-rest)}tis-button .dx-custom-button-alternative.dx-custom-button-outlined:focus{color:var(--btn-alternative-outlined-color);background-color:var(--btn-alternative-outlined-bg-focused);border:1px solid var(--btn-alternative-outlined-stroke-rest)}tis-button .dx-custom-button-alternative.dx-custom-button-outlined:active{color:var(--btn-alternative-outlined-color);background-color:var(--btn-alternative-outlined-bg-active);border:1px solid var(--btn-alternative-outlined-stroke-rest)}tis-button .dx-custom-button-alternative.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-alternative-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-alternative-outlined-stroke-disabled)}tis-button .dx-custom-button-alternative.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-alternative-outlined-color-disabled)}tis-button .dx-custom-button-alternative.dx-custom-button-ghost{color:var(--btn-alternative-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-alternative.dx-custom-button-ghost svg{fill:var(--btn-alternative-ghost-color)}tis-button .dx-custom-button-alternative.dx-custom-button-ghost:hover{color:var(--btn-alternative-ghost-color);background-color:var(--btn-alternative-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-alternative.dx-custom-button-ghost:focus{color:var(--btn-alternative-ghost-color);background-color:var(--btn-alternative-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-alternative.dx-custom-button-ghost:active{color:var(--btn-alternative-ghost-color);background-color:var(--btn-alternative-ghost-bg-active);border:transparent}tis-button .dx-custom-button-alternative.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-alternative-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-alternative.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-alternative-ghost-color-disabled)}tis-button .dx-custom-button-success.dx-custom-button-contained{color:var(--btn-success-contained-color);background-color:var(--btn-success-contained-bg-rest);border:1px solid var(--btn-success-contained-bg-rest)}tis-button .dx-custom-button-success.dx-custom-button-contained svg{fill:var(--btn-success-contained-color)}tis-button .dx-custom-button-success.dx-custom-button-contained:hover{color:var(--btn-success-contained-color);background-color:var(--btn-success-contained-bg-hover);border:1px solid var(--btn-success-contained-bg-hover)}tis-button .dx-custom-button-success.dx-custom-button-contained:focus{color:var(--btn-success-contained-color);background-color:var(--btn-success-contained-bg-focused);border:1px solid var(--btn-success-contained-bg-focused)}tis-button .dx-custom-button-success.dx-custom-button-contained:active{color:var(--btn-success-contained-color);background-color:var(--btn-success-contained-bg-active);border:1px solid var(--btn-success-contained-bg-active)}tis-button .dx-custom-button-success.dx-custom-button-contained.dx-state-disabled{color:var(--btn-success-contained-color-disabled);background-color:var(--btn-success-contained-bg-disabled);border:1px solid var(--btn-success-contained-bg-disabled)}tis-button .dx-custom-button-success.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-success-contained-color-disabled)}tis-button .dx-custom-button-success.dx-custom-button-outlined{color:var(--btn-success-outlined-color);background-color:var(--btn-success-outlined-bg-rest);border:1px solid var(--btn-success-outlined-stroke-rest)}tis-button .dx-custom-button-success.dx-custom-button-outlined svg{fill:var(--btn-success-outlined-color)}tis-button .dx-custom-button-success.dx-custom-button-outlined:hover{color:var(--btn-success-outlined-color);background-color:var(--btn-success-outlined-bg-hover);border:1px solid var(--btn-success-outlined-stroke-rest)}tis-button .dx-custom-button-success.dx-custom-button-outlined:focus{color:var(--btn-success-outlined-color);background-color:var(--btn-success-outlined-bg-focused);border:1px solid var(--btn-success-outlined-stroke-rest)}tis-button .dx-custom-button-success.dx-custom-button-outlined:active{color:var(--btn-success-outlined-color);background-color:var(--btn-success-outlined-bg-active);border:1px solid var(--btn-success-outlined-stroke-rest)}tis-button .dx-custom-button-success.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-success-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-success-outlined-stroke-disabled)}tis-button .dx-custom-button-success.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-success-outlined-color-disabled)}tis-button .dx-custom-button-success.dx-custom-button-ghost{color:var(--btn-success-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-success.dx-custom-button-ghost svg{fill:var(--btn-success-ghost-color)}tis-button .dx-custom-button-success.dx-custom-button-ghost:hover{color:var(--btn-success-ghost-color);background-color:var(--btn-success-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-success.dx-custom-button-ghost:focus{color:var(--btn-success-ghost-color);background-color:var(--btn-success-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-success.dx-custom-button-ghost:active{color:var(--btn-success-ghost-color);background-color:var(--btn-success-ghost-bg-active);border:transparent}tis-button .dx-custom-button-success.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-success-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-success.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-success-ghost-color-disabled)}tis-button .dx-custom-button-info.dx-custom-button-contained{color:var(--btn-info-contained-color);background-color:var(--btn-info-contained-bg-rest);border:1px solid var(--btn-info-contained-bg-rest)}tis-button .dx-custom-button-info.dx-custom-button-contained svg{fill:var(--btn-info-contained-color)}tis-button .dx-custom-button-info.dx-custom-button-contained:hover{color:var(--btn-info-contained-color);background-color:var(--btn-info-contained-bg-hover);border:1px solid var(--btn-info-contained-bg-hover)}tis-button .dx-custom-button-info.dx-custom-button-contained:focus{color:var(--btn-info-contained-color);background-color:var(--btn-info-contained-bg-focused);border:1px solid var(--btn-info-contained-bg-focused)}tis-button .dx-custom-button-info.dx-custom-button-contained:active{color:var(--btn-info-contained-color);background-color:var(--btn-info-contained-bg-active);border:1px solid var(--btn-info-contained-bg-active)}tis-button .dx-custom-button-info.dx-custom-button-contained.dx-state-disabled{color:var(--btn-info-contained-color-disabled);background-color:var(--btn-info-contained-bg-disabled);border:1px solid var(--btn-info-contained-bg-disabled)}tis-button .dx-custom-button-info.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-info-contained-color-disabled)}tis-button .dx-custom-button-info.dx-custom-button-outlined{color:var(--btn-info-outlined-color);background-color:var(--btn-info-outlined-bg-rest);border:1px solid var(--btn-info-outlined-stroke-rest)}tis-button .dx-custom-button-info.dx-custom-button-outlined svg{fill:var(--btn-info-outlined-color)}tis-button .dx-custom-button-info.dx-custom-button-outlined:hover{color:var(--btn-info-outlined-color);background-color:var(--btn-info-outlined-bg-hover);border:1px solid var(--btn-info-outlined-stroke-rest)}tis-button .dx-custom-button-info.dx-custom-button-outlined:focus{color:var(--btn-info-outlined-color);background-color:var(--btn-info-outlined-bg-focused);border:1px solid var(--btn-info-outlined-stroke-rest)}tis-button .dx-custom-button-info.dx-custom-button-outlined:active{color:var(--btn-info-outlined-color);background-color:var(--btn-info-outlined-bg-active);border:1px solid var(--btn-info-outlined-stroke-rest)}tis-button .dx-custom-button-info.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-info-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-info-outlined-stroke-disabled)}tis-button .dx-custom-button-info.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-info-outlined-color-disabled)}tis-button .dx-custom-button-info.dx-custom-button-ghost{color:var(--btn-info-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-info.dx-custom-button-ghost svg{fill:var(--btn-info-ghost-color)}tis-button .dx-custom-button-info.dx-custom-button-ghost:hover{color:var(--btn-info-ghost-color);background-color:var(--btn-info-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-info.dx-custom-button-ghost:focus{color:var(--btn-info-ghost-color);background-color:var(--btn-info-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-info.dx-custom-button-ghost:active{color:var(--btn-info-ghost-color);background-color:var(--btn-info-ghost-bg-active);border:transparent}tis-button .dx-custom-button-info.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-info-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-info.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-info-ghost-color-disabled)}tis-button .dx-custom-button-warning.dx-custom-button-contained{color:var(--btn-warning-contained-color);background-color:var(--btn-warning-contained-bg-rest);border:1px solid var(--btn-warning-contained-bg-rest)}tis-button .dx-custom-button-warning.dx-custom-button-contained svg{fill:var(--btn-warning-contained-color)}tis-button .dx-custom-button-warning.dx-custom-button-contained:hover{color:var(--btn-warning-contained-color);background-color:var(--btn-warning-contained-bg-hover);border:1px solid var(--btn-warning-contained-bg-hover)}tis-button .dx-custom-button-warning.dx-custom-button-contained:focus{color:var(--btn-warning-contained-color);background-color:var(--btn-warning-contained-bg-focused);border:1px solid var(--btn-warning-contained-bg-focused)}tis-button .dx-custom-button-warning.dx-custom-button-contained:active{color:var(--btn-warning-contained-color);background-color:var(--btn-warning-contained-bg-active);border:1px solid var(--btn-warning-contained-bg-active)}tis-button .dx-custom-button-warning.dx-custom-button-contained.dx-state-disabled{color:var(--btn-warning-contained-color-disabled);background-color:var(--btn-warning-contained-bg-disabled);border:1px solid var(--btn-warning-contained-bg-disabled)}tis-button .dx-custom-button-warning.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-warning-contained-color-disabled)}tis-button .dx-custom-button-warning.dx-custom-button-outlined{color:var(--btn-warning-outlined-color);background-color:var(--btn-warning-outlined-bg-rest);border:1px solid var(--btn-warning-outlined-stroke-rest)}tis-button .dx-custom-button-warning.dx-custom-button-outlined svg{fill:var(--btn-warning-outlined-color)}tis-button .dx-custom-button-warning.dx-custom-button-outlined:hover{color:var(--btn-warning-outlined-color);background-color:var(--btn-warning-outlined-bg-hover);border:1px solid var(--btn-warning-outlined-stroke-rest)}tis-button .dx-custom-button-warning.dx-custom-button-outlined:focus{color:var(--btn-warning-outlined-color);background-color:var(--btn-warning-outlined-bg-focused);border:1px solid var(--btn-warning-outlined-stroke-rest)}tis-button .dx-custom-button-warning.dx-custom-button-outlined:active{color:var(--btn-warning-outlined-color);background-color:var(--btn-warning-outlined-bg-active);border:1px solid var(--btn-warning-outlined-stroke-rest)}tis-button .dx-custom-button-warning.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-warning-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-warning-outlined-stroke-disabled)}tis-button .dx-custom-button-warning.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-warning-outlined-color-disabled)}tis-button .dx-custom-button-warning.dx-custom-button-ghost{color:var(--btn-warning-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-warning.dx-custom-button-ghost svg{fill:var(--btn-warning-ghost-color)}tis-button .dx-custom-button-warning.dx-custom-button-ghost:hover{color:var(--btn-warning-ghost-color);background-color:var(--btn-warning-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-warning.dx-custom-button-ghost:focus{color:var(--btn-warning-ghost-color);background-color:var(--btn-warning-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-warning.dx-custom-button-ghost:active{color:var(--btn-warning-ghost-color);background-color:var(--btn-warning-ghost-bg-active);border:transparent}tis-button .dx-custom-button-warning.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-warning-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-warning.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-warning-ghost-color-disabled)}tis-button .dx-custom-button-danger.dx-custom-button-contained{color:var(--btn-danger-contained-color);background-color:var(--btn-danger-contained-bg-rest);border:1px solid var(--btn-danger-contained-bg-rest)}tis-button .dx-custom-button-danger.dx-custom-button-contained svg{fill:var(--btn-danger-contained-color)}tis-button .dx-custom-button-danger.dx-custom-button-contained:hover{color:var(--btn-danger-contained-color);background-color:var(--btn-danger-contained-bg-hover);border:1px solid var(--btn-danger-contained-bg-hover)}tis-button .dx-custom-button-danger.dx-custom-button-contained:focus{color:var(--btn-danger-contained-color);background-color:var(--btn-danger-contained-bg-focused);border:1px solid var(--btn-danger-contained-bg-focused)}tis-button .dx-custom-button-danger.dx-custom-button-contained:active{color:var(--btn-danger-contained-color);background-color:var(--btn-danger-contained-bg-active);border:1px solid var(--btn-danger-contained-bg-active)}tis-button .dx-custom-button-danger.dx-custom-button-contained.dx-state-disabled{color:var(--btn-danger-contained-color-disabled);background-color:var(--btn-danger-contained-bg-disabled);border:1px solid var(--btn-danger-contained-bg-disabled)}tis-button .dx-custom-button-danger.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-danger-contained-color-disabled)}tis-button .dx-custom-button-danger.dx-custom-button-outlined{color:var(--btn-danger-outlined-color);background-color:var(--btn-danger-outlined-bg-rest);border:1px solid var(--btn-danger-outlined-stroke-rest)}tis-button .dx-custom-button-danger.dx-custom-button-outlined svg{fill:var(--btn-danger-outlined-color)}tis-button .dx-custom-button-danger.dx-custom-button-outlined:hover{color:var(--btn-danger-outlined-color);background-color:var(--btn-danger-outlined-bg-hover);border:1px solid var(--btn-danger-outlined-stroke-rest)}tis-button .dx-custom-button-danger.dx-custom-button-outlined:focus{color:var(--btn-danger-outlined-color);background-color:var(--btn-danger-outlined-bg-focused);border:1px solid var(--btn-danger-outlined-stroke-rest)}tis-button .dx-custom-button-danger.dx-custom-button-outlined:active{color:var(--btn-danger-outlined-color);background-color:var(--btn-danger-outlined-bg-active);border:1px solid var(--btn-danger-outlined-stroke-rest)}tis-button .dx-custom-button-danger.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-danger-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-danger-outlined-stroke-disabled)}tis-button .dx-custom-button-danger.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-danger-outlined-color-disabled)}tis-button .dx-custom-button-danger.dx-custom-button-ghost{color:var(--btn-danger-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-danger.dx-custom-button-ghost svg{fill:var(--btn-danger-ghost-color)}tis-button .dx-custom-button-danger.dx-custom-button-ghost:hover{color:var(--btn-danger-ghost-color);background-color:var(--btn-danger-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-danger.dx-custom-button-ghost:focus{color:var(--btn-danger-ghost-color);background-color:var(--btn-danger-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-danger.dx-custom-button-ghost:active{color:var(--btn-danger-ghost-color);background-color:var(--btn-danger-ghost-bg-active);border:transparent}tis-button .dx-custom-button-danger.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-danger-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-danger.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-danger-ghost-color-disabled)}tis-button .dx-custom-button-help.dx-custom-button-contained{color:var(--btn-help-contained-color);background-color:var(--btn-help-contained-bg-rest);border:1px solid var(--btn-help-contained-bg-rest)}tis-button .dx-custom-button-help.dx-custom-button-contained svg{fill:var(--btn-help-contained-color)}tis-button .dx-custom-button-help.dx-custom-button-contained:hover{color:var(--btn-help-contained-color);background-color:var(--btn-help-contained-bg-hover);border:1px solid var(--btn-help-contained-bg-hover)}tis-button .dx-custom-button-help.dx-custom-button-contained:focus{color:var(--btn-help-contained-color);background-color:var(--btn-help-contained-bg-focused);border:1px solid var(--btn-help-contained-bg-focused)}tis-button .dx-custom-button-help.dx-custom-button-contained:active{color:var(--btn-help-contained-color);background-color:var(--btn-help-contained-bg-active);border:1px solid var(--btn-help-contained-bg-active)}tis-button .dx-custom-button-help.dx-custom-button-contained.dx-state-disabled{color:var(--btn-help-contained-color-disabled);background-color:var(--btn-help-contained-bg-disabled);border:1px solid var(--btn-help-contained-bg-disabled)}tis-button .dx-custom-button-help.dx-custom-button-contained.dx-state-disabled svg{fill:var(--btn-help-contained-color-disabled)}tis-button .dx-custom-button-help.dx-custom-button-outlined{color:var(--btn-help-outlined-color);background-color:var(--btn-help-outlined-bg-rest);border:1px solid var(--btn-help-outlined-stroke-rest)}tis-button .dx-custom-button-help.dx-custom-button-outlined svg{fill:var(--btn-help-outlined-color)}tis-button .dx-custom-button-help.dx-custom-button-outlined:hover{color:var(--btn-help-outlined-color);background-color:var(--btn-help-outlined-bg-hover);border:1px solid var(--btn-help-outlined-stroke-rest)}tis-button .dx-custom-button-help.dx-custom-button-outlined:focus{color:var(--btn-help-outlined-color);background-color:var(--btn-help-outlined-bg-focused);border:1px solid var(--btn-help-outlined-stroke-rest)}tis-button .dx-custom-button-help.dx-custom-button-outlined:active{color:var(--btn-help-outlined-color);background-color:var(--btn-help-outlined-bg-active);border:1px solid var(--btn-help-outlined-stroke-rest)}tis-button .dx-custom-button-help.dx-custom-button-outlined.dx-state-disabled{color:var(--btn-help-outlined-color-disabled);background-color:transparent;border:1px solid var(--btn-help-outlined-stroke-disabled)}tis-button .dx-custom-button-help.dx-custom-button-outlined.dx-state-disabled svg{fill:var(--btn-help-outlined-color-disabled)}tis-button .dx-custom-button-help.dx-custom-button-ghost{color:var(--btn-help-ghost-color);background-color:transparent;border:transparent}tis-button .dx-custom-button-help.dx-custom-button-ghost svg{fill:var(--btn-help-ghost-color)}tis-button .dx-custom-button-help.dx-custom-button-ghost:hover{color:var(--btn-help-ghost-color);background-color:var(--btn-help-ghost-bg-hover);border:transparent}tis-button .dx-custom-button-help.dx-custom-button-ghost:focus{color:var(--btn-help-ghost-color);background-color:var(--btn-help-ghost-bg-focused);border:transparent}tis-button .dx-custom-button-help.dx-custom-button-ghost:active{color:var(--btn-help-ghost-color);background-color:var(--btn-help-ghost-bg-active);border:transparent}tis-button .dx-custom-button-help.dx-custom-button-ghost.dx-state-disabled{color:var(--btn-help-ghost-color-disabled);background-color:transparent;border:transparent}tis-button .dx-custom-button-help.dx-custom-button-ghost.dx-state-disabled svg{fill:var(--btn-help-ghost-color-disabled)}
`],encapsulation:2,changeDetection:0})}}return i})();function _ee(i,e){i&1&&ti(0,"div",6)}function Cee(i,e){i&1&&Xn(0)}function xee(i,e){if(i&1&&(De(0,"div",7),be(1,Cee,1,0,"ng-container",8),Te()),i&2){J();let t=Bt(9);U(),V("ngTemplateOutlet",t)}}function vee(i,e){i&1&&Xn(0)}function bee(i,e){if(i&1&&(De(0,"div",7),be(1,vee,1,0,"ng-container",8),Te()),i&2){J();let t=Bt(9);U(),V("ngTemplateOutlet",t)}}function yee(i,e){i&1&&ti(0,"div",4)}function Oee(i,e){i&1&&Xn(0)}function Eee(i,e){if(i&1&&(De(0,"div",7),be(1,Oee,1,0,"ng-container",8),Te()),i&2){J();let t=Bt(9);U(),V("ngTemplateOutlet",t)}}function wee(i,e){i&1&&ti(0,"div",6)}function See(i,e){if(i&1&&ti(0,"tis-svg",11),i&2){let t=J(2);V("icon",t.icon)}}function Iee(i,e){if(i&1&&(De(0,"div",12),Ge(1),Te()),i&2){let t=J(2);ui("label-bold",t.labelBold),U(),Qn(t.text)}}function Dee(i,e){if(i&1&&be(0,See,1,1,"tis-svg",9)(1,Iee,2,3,"div",10),i&2){let t=J();V("ngIf",t.icon),U(),V("ngIf",t.text)}}var V$=(()=>{class i{constructor(){this.margin="small",this.position="left",this.labelBold=!1}get isLeftContent(){return this.position==="left"&&(!!this.icon||!!this.text)}get isCenterContent(){return this.position==="center"&&(!!this.icon||!!this.text)}get isRightContent(){return this.position==="right"&&(!!this.icon||!!this.text)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-divider"]],inputs:{margin:"margin",position:"position",labelBold:"labelBold",icon:"icon",text:"text"},decls:10,vars:7,consts:[["content",""],[1,"divider-wrapper",3,"ngClass"],["class","divider-mark",4,"ngIf"],["class","content",4,"ngIf"],[1,"divider"],["class","divider",4,"ngIf"],[1,"divider-mark"],[1,"content"],[4,"ngTemplateOutlet"],["class","icon",3,"icon",4,"ngIf"],["class","text",3,"label-bold",4,"ngIf"],[1,"icon",3,"icon"],[1,"text"]],template:function(n,o){n&1&&(De(0,"div",1),be(1,_ee,1,0,"div",2)(2,xee,2,1,"div",3),ti(3,"div",4),be(4,bee,2,1,"div",3)(5,yee,1,0,"div",5)(6,Eee,2,1,"div",3)(7,wee,1,0,"div",2),Te(),be(8,Dee,2,2,"ng-template",null,0,Ji)),n&2&&(V("ngClass",o.margin),U(),V("ngIf",o.isLeftContent),U(),V("ngIf",o.isLeftContent),U(2),V("ngIf",o.isCenterContent),U(),V("ngIf",o.isCenterContent),U(),V("ngIf",o.isRightContent),U(),V("ngIf",o.isRightContent))},dependencies:[Si,Xo,wi,br,Zn],styles:["[_nghost-%COMP%]{display:block;width:100%}.divider-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;gap:8px;align-items:center;width:100%}.divider-wrapper.small[_ngcontent-%COMP%]{margin:4px 0}.divider-wrapper.medium[_ngcontent-%COMP%]{margin:12px 0}.divider-wrapper.large[_ngcontent-%COMP%]{margin:16px 0}.divider-mark[_ngcontent-%COMP%]{width:8px;height:1px;background:var(--divider-stroke-rest)}.divider[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--divider-stroke-rest);margin:0}.content[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;font:var(--font-caption-1);white-space:nowrap;gap:4px;align-items:center}.text[_ngcontent-%COMP%]{white-space:nowrap;color:var(--divider-color-rest)}.label-bold[_ngcontent-%COMP%]{font:var(--font-subtitle-2)}.icon[_ngcontent-%COMP%]{fill:var(--divider-color-rest)}"],changeDetection:0})}}return i})();var Tee=()=>({}),Aee=i=>({class:i});function Mee(i,e){i&1&&Xn(0)}function Ree(i,e){if(i&1&&(Ze(0),be(1,Mee,1,0,"ng-container",5),Je()),i&2){let t=J(3);U(),V("ngTemplateOutlet",t.template)}}function Fee(i,e){if(i&1&&Ge(0),i&2){let t=J(3);oi(" ",t.stringContent," ")}}function Pee(i,e){if(i&1&&(De(0,"div"),be(1,Ree,2,1,"ng-container",4)(2,Fee,1,1,"ng-template",null,0,Ji),Te()),i&2){let t=Bt(3),n=J(2);U(),V("ngIf",n.template)("ngIfElse",t)}}function kee(i,e){if(i&1&&(De(0,"dx-tooltip",2),be(1,Pee,4,2,"div",3),Te()),i&2){let t=J();V("target",t.target)("position",t.position)("visible",t.visible)("animation",Ps(6,Tee))("wrapperAttr",Sh(7,Aee,"dx-custom-tooltip "+t.position)),U(),V("dxTemplateOf","tooltipContent")}}var L$=(()=>{class i{constructor(){this.position="top",this.visible=!1}get template(){return typeof this.content=="string"||typeof this.content=="number"?null:this.content}get stringContent(){return typeof this.content=="string"?this.content.trim():null}get target(){return typeof this.for=="string"?`#${this.for}`:this.for}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-tooltip"]],inputs:{for:"for",content:"content",position:"position",visible:"visible"},decls:1,vars:1,consts:[["string",""],["contentTemplate","tooltipContent","showEvent","dxhoverstart","hideEvent","dxhoverend",3,"target","position","visible","animation","wrapperAttr",4,"ngIf"],["contentTemplate","tooltipContent","showEvent","dxhoverstart","hideEvent","dxhoverend",3,"target","position","visible","animation","wrapperAttr"],[4,"dxTemplate","dxTemplateOf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"]],template:function(n,o){n&1&&be(0,kee,2,9,"dx-tooltip",1),n&2&&V("ngIf",o.content)},dependencies:[Si,wi,br,YE,qE,IS],styles:[`.dx-custom-tooltip .dx-overlay-content.dx-popup-normal{max-width:340px;padding:0;word-wrap:break-word;color:var(--tooltip-color);background:var(--tooltip-bg);border:none;border-radius:var(--radius-medium);box-shadow:var(--shadow-8);opacity:1}.dx-custom-tooltip .dx-overlay-content.dx-popup-normal .dx-popup-content.dx-popup-content-scrollable{max-width:340px;padding:0;text-align:start;white-space:normal}.dx-custom-tooltip .dx-overlay-content.dx-popup-normal .dx-popup-content.dx-popup-content-scrollable .dx-template-wrapper{padding:var(--space-vertical-s) var(--space-horizontal-m)}.dx-custom-tooltip .dx-overlay-content.dx-popup-normal .dx-popover-arrow:after{background:var(--tooltip-bg)}.dx-custom-tooltip.dx-tooltip-wrapper .dx-overlay-content .dx-popup-content{font:var(--font-body-1)}.dx-custom-tooltip.right.dx-tooltip-wrapper.dx-popover-wrapper .dx-popover-arrow:after,.dx-custom-tooltip.left.dx-tooltip-wrapper.dx-popover-wrapper .dx-popover-arrow:after{border:none;border-radius:var(--radius-small);margin:0 -2px}.dx-custom-tooltip:not(.right,.left).dx-custom-tooltip .dx-overlay-content.dx-popup-normal .dx-popover-arrow:after{border:none;border-radius:var(--radius-small) 0 0 0}.dx-custom-tooltip.top.dx-tooltip-wrapper.dx-popover-wrapper .dx-popover-arrow:after,.dx-custom-tooltip.bottom.dx-tooltip-wrapper.dx-popover-wrapper .dx-popover-arrow:after{border:none;border-radius:var(--radius-small);margin:-2px 0}
`],encapsulation:2,changeDetection:0})}}return i})();var N$=(()=>{class i{set content(t){this._content!==t&&(this._content=t,this._createTooltip(t))}constructor(t,n){this._templateRef=t,this._viewContainerRef=n,this.position="top"}ngOnInit(){this._createTooltip(this._content)}ngOnDestroy(){this._destroyTooltip()}_createTooltip(t){this._destroyTooltip(),this._embeddedViewRef=this._viewContainerRef.createEmbeddedView(this._templateRef),this._tooltipComponentRef=this._viewContainerRef.createComponent(L$),this._tooltipComponentRef.instance.content=t,this._tooltipComponentRef.instance.position=this.position,this._tooltipComponentRef.instance.for=this._embeddedViewRef.rootNodes[0]}_destroyTooltip(){this._tooltipComponentRef&&(this._tooltipComponentRef.destroy(),this._tooltipComponentRef=null),this._embeddedViewRef&&(this._embeddedViewRef.destroy(),this._embeddedViewRef=null)}static{this.\u0275fac=function(n){return new(n||i)(w(Oh),w(Eh))}}static{this.\u0275dir=ci({type:i,selectors:[["","tisTooltip",""]],inputs:{content:[0,"tisTooltip","content"],position:[0,"tisTooltipPosition","position"]}})}}return i})();var Bee=["*"];function Vee(i,e){if(i&1){let t=Wi();De(0,"tis-link",7),et("click",function(o){return Jt(t),ei(o.stopPropagation())}),Te()}if(i&2){let t=J().$implicit,n=J();V("link",n.getUrl(t))("text",n.getText(t))("disabled",n.disabled)("download",n.getIsDownload(t))}}function Lee(i,e){if(i&1&&Ge(0),i&2){let t=J().$implicit;Qn(t)}}function Nee(i,e){if(i&1&&(Ze(0),be(1,Vee,1,4,"tis-link",6)(2,Lee,1,1,"ng-template",null,0,Ji),Je()),i&2){let t=e.$implicit,n=Bt(3),o=J();U(),V("ngIf",o.isLink(t))("ngIfElse",n)}}function Hee(i,e){i&1&&(De(0,"span",8),Ge(1,"*"),Te())}function $ee(i,e){if(i&1&&ti(0,"tis-svg",10),i&2){let t=J(2);V("icon",t.iconInfo)}}function zee(i,e){if(i&1&&(Ze(0),be(1,$ee,1,1,"tis-svg",9),Je()),i&2){let t=J();U(),V("tisTooltip",t.info)}}var i_=(()=>{class i{constructor(){this.label="",this.info="",this.bold=!1,this.required=!1,this.disabled=!1,this.size="m",this.iconInfo=Qo.Info}get labelClasses(){return{label:!0,bold:this.bold,[this.size]:!0,disabled:this.disabled}}ngOnInit(){this.secondaryTextParts=this._parseMessage(this.label)}isLink(t){return typeof t!="string"}getText(t){return typeof t!="string"?t.text:t}getIsDownload(t){return typeof t!="string"?t.download:void 0}getUrl(t){return typeof t!="string"?t.url:t}_parseMessage(t){let n=/\{\{|}}/;return t.split(n).filter(Boolean).map(s=>this.links?.[s]?this.links[s]:s)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-label"]],inputs:{label:"label",info:"info",bold:"bold",required:"required",disabled:"disabled",for:"for",size:"size",links:"links"},ngContentSelectors:Bee,decls:7,vars:5,consts:[["textTpl",""],[3,"for","ngClass"],[1,"label-content"],[4,"ngFor","ngForOf"],["class","required",4,"ngIf"],[4,"ngIf"],["class","link",3,"link","text","disabled","download","click",4,"ngIf","ngIfElse"],[1,"link",3,"click","link","text","disabled","download"],[1,"required"],["class","icon-info",3,"icon",4,"tisTooltip"],[1,"icon-info",3,"icon"]],template:function(n,o){n&1&&(ii(),De(0,"label",1)(1,"div",2)(2,"span"),be(3,Nee,4,2,"ng-container",3)(4,Hee,2,0,"span",4),Te(),be(5,zee,2,1,"ng-container",5),Te(),ni(6),Te()),n&2&&(V("for",o.for)("ngClass",o.labelClasses),U(3),V("ngForOf",o.secondaryTextParts),U(),V("ngIf",o.required&&!o.disabled),U(),V("ngIf",o.info&&!o.disabled))},dependencies:[Si,Xo,Th,wi,Zn,Cw,N$],styles:["[_nghost-%COMP%]{display:block;width:fit-content;margin-bottom:var(--space-vertical-xxs)}.label[_ngcontent-%COMP%]{color:var(--label-color);-webkit-user-select:none;user-select:none}.label[_ngcontent-%COMP%]   .label-content[_ngcontent-%COMP%]{display:flex;align-items:center}.label[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{color:var(--label-required)}.label.s[_ngcontent-%COMP%]{font:var(--font-caption-1)}.label.s.bold[_ngcontent-%COMP%]{font:var(--font-caption-1-strong)}.label.m[_ngcontent-%COMP%]{font:var(--font-body-1)}.label.m.bold[_ngcontent-%COMP%]{font:var(--font-body-1-strong)}.label.l[_ngcontent-%COMP%]{font:var(--font-subtitle-2)}.label.disabled[_ngcontent-%COMP%], .label.disabled[_ngcontent-%COMP%]   .required[_ngcontent-%COMP%]{color:var(--label-color-secondary)}.label[_ngcontent-%COMP%]   .icon-info[_ngcontent-%COMP%]{fill:var(--label-color)}"],changeDetection:0})}}return i})();function Wee(i,e){if(i&1&&ti(0,"tis-svg",6),i&2){let t=J();V("ngClass",t.variant)("icon",t.filledCheckboxIcon)}}function Gee(i,e){if(i&1&&ti(0,"tis-svg",7),i&2){let t=J();V("ngClass",t.variant)("icon",t.emptyCheckboxIcon)}}function jee(i,e){if(i&1&&ti(0,"tis-svg",6),i&2){let t=J();V("ngClass",t.variant)("icon",t.indeterminateCheckboxIcon)}}function Kee(i,e){if(i&1){let t=Wi();De(0,"tis-label",8),et("click",function(){Jt(t);let o=J();return ei(o.toggleCheckbox())}),Te()}if(i&2){let t=J();V("required",t.isRequired)("disabled",t.isDisabled)("label",t.label)("links",t.links)("bold",t.labelBold)}}var H$=(()=>{class i{set value(t){t!==this._value&&(this._value=t,this._onChange?.(t))}get value(){return this._value}get isDisabled(){return this.disabled||this._isDisabled}get control(){return this._ngControl?.control}get isRequired(){let t=!!(this.control?.hasValidator(Al.required)&&this.required!==!1);return this.required||t}constructor(t,n){this._cdr=t,this._ngControl=n,this.label="",this.labelBold=!1,this.disabled=!1,this.error=!1,this.tabIndex=0,this.variant="default",this.indeterminate=!1,this.changed=new vt,this.filledCheckboxIcon=Qo.CheckboxFilled,this.emptyCheckboxIcon=Qo.CheckboxEmpty,this.indeterminateCheckboxIcon=Qo.CheckboxIndeterminate,this._isDisabled=!1,this._value=!1,this._ngControl&&(this._ngControl.valueAccessor=this)}ngDoCheck(){this._cdr.markForCheck()}writeValue(t){this.value=t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._isDisabled=t,this._cdr.detectChanges()}toggleCheckbox(t){t?.stopPropagation(),!this.isDisabled&&(this._onTouched?.(),this.value=!this.value,this.changed.emit(this.value))}static{this.\u0275fac=function(n){return new(n||i)(w(xr),w(Hn,10))}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-checkbox"]],inputs:{label:"label",labelBold:"labelBold",disabled:"disabled",error:"error",tabIndex:"tabIndex",variant:"variant",required:"required",token:"token",links:"links",indeterminate:"indeterminate",value:"value"},outputs:{changed:"changed"},decls:7,vars:10,consts:[[1,"checkbox-wrapper"],[1,"checkbox-container"],["role","checkbox",1,"checkbox",3,"click","keydown.enter","tabindex"],["class","icon",3,"ngClass","icon",4,"ngIf"],["class","icon icon-empty",3,"ngClass","icon",4,"ngIf"],["class","label",3,"required","disabled","label","links","bold","click",4,"ngIf"],[1,"icon",3,"ngClass","icon"],[1,"icon","icon-empty",3,"ngClass","icon"],[1,"label",3,"click","required","disabled","label","links","bold"]],template:function(n,o){n&1&&(De(0,"div",0)(1,"div",1)(2,"div",2),et("click",function(){return o.toggleCheckbox()})("keydown.enter",function(r){return o.toggleCheckbox(r)}),be(3,Wee,1,2,"tis-svg",3)(4,Gee,1,2,"tis-svg",4)(5,jee,1,2,"tis-svg",3),Te()(),be(6,Kee,1,5,"tis-label",5),Te()),n&2&&(U(2),ui("disabled",o.isDisabled)("error",o.error||(o.control==null?null:o.control.invalid)&&(o.control==null?null:o.control.touched)),V("tabindex",o.tabIndex),Io("data-token",o.token),U(),V("ngIf",o.value&&!o.indeterminate),U(),V("ngIf",!o.value&&!o.indeterminate),U(),V("ngIf",o.indeterminate),U(),V("ngIf",o.label))},dependencies:[Si,Xo,wi,Zn,i_],styles:["[_nghost-%COMP%]{display:block;width:fit-content;margin-bottom:var(--space-vertical-l);padding-top:var(--space-vertical-s);padding-bottom:var(--space-vertical-s)}.checkbox-wrapper[_ngcontent-%COMP%]{display:flex}.icon.default[_ngcontent-%COMP%]{fill:var(--checkbox-checked-rest)}.icon.warning[_ngcontent-%COMP%]{fill:var(--checkbox-checked-warning-rest)}.icon.alternative[_ngcontent-%COMP%]{fill:var(--checkbox-checked-alternative-rest)}.icon.icon-empty[_ngcontent-%COMP%]{cursor:pointer;fill:var(--checkbox-unchecked-rest)}.checkbox[_ngcontent-%COMP%]{cursor:pointer}.checkbox[_ngcontent-%COMP%]:hover   .icon.default[_ngcontent-%COMP%]{fill:var(--checkbox-checked-hover)}.checkbox[_ngcontent-%COMP%]:hover   .icon.warning[_ngcontent-%COMP%]{fill:var(--checkbox-checked-warning-hover)}.checkbox[_ngcontent-%COMP%]:hover   .icon.alternative[_ngcontent-%COMP%]{fill:var(--checkbox-checked-alternative-hover)}.checkbox[_ngcontent-%COMP%]:hover   .icon.icon-empty[_ngcontent-%COMP%]{fill:var(--checkbox-unchecked-hover)}.checkbox[_ngcontent-%COMP%]:focus, .checkbox[_ngcontent-%COMP%]:active{outline:none}.checkbox[_ngcontent-%COMP%]:focus   .icon.default[_ngcontent-%COMP%], .checkbox[_ngcontent-%COMP%]:active   .icon.default[_ngcontent-%COMP%]{fill:var(--checkbox-checked-focus)}.checkbox[_ngcontent-%COMP%]:focus   .icon.warning[_ngcontent-%COMP%], .checkbox[_ngcontent-%COMP%]:active   .icon.warning[_ngcontent-%COMP%]{fill:var(--checkbox-checked-warning-focus)}.checkbox[_ngcontent-%COMP%]:focus   .icon.alternative[_ngcontent-%COMP%], .checkbox[_ngcontent-%COMP%]:active   .icon.alternative[_ngcontent-%COMP%]{fill:var(--checkbox-checked-alternative-focus)}.checkbox[_ngcontent-%COMP%]:focus   .icon.icon-empty[_ngcontent-%COMP%], .checkbox[_ngcontent-%COMP%]:active   .icon.icon-empty[_ngcontent-%COMP%]{fill:var(--checkbox-unchecked-focus)}.checkbox.error[_ngcontent-%COMP%]   .icon.icon-empty[_ngcontent-%COMP%]{fill:var(--checkbox-error)}.checkbox.disabled[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{cursor:default;fill:var(--checkbox-disabled)}.checkbox.disabled[_ngcontent-%COMP%]   .icon.icon-empty[_ngcontent-%COMP%]{fill:var(--checkbox-disabled)}.checkbox-container[_ngcontent-%COMP%]{display:flex;justify-content:center;width:36px;flex-shrink:0}.label[_ngcontent-%COMP%]{margin-right:var(--space-horizontal-m);margin-left:var(--space-horizontal-xs);margin-bottom:0}"],changeDetection:0})}}return i})();function Uee(i,e){i&1&&Xn(0)}function qee(i,e){if(i&1&&(Ze(0),De(1,"a",5),be(2,Uee,1,0,"ng-container",6),Te(),Je()),i&2){let t=J(),n=Bt(4);U(),V("routerLink",t.link),U(),V("ngTemplateOutlet",n)}}function Yee(i,e){i&1&&Xn(0)}function Xee(i,e){if(i&1&&be(0,Yee,1,0,"ng-container",6),i&2){J();let t=Bt(4);V("ngTemplateOutlet",t)}}function Qee(i,e){i&1&&ti(0,"div",15)}function Zee(i,e){if(i&1){let t=Wi();De(0,"tis-checkbox",16),et("click",function(o){Jt(t),J();let s=Bt(1),r=J();return ei(r.clickCheckbox(o,s))})("changed",function(o){Jt(t);let s=J(2);return ei(s.changeCheckbox(o))}),Te()}if(i&2){let t=J(2);V("value",t.checked)("tabIndex",-1)}}function Jee(i,e){if(i&1&&ti(0,"tis-svg",17),i&2){let t=J(2);V("icon",t.icon)}}function ete(i,e){if(i&1&&(De(0,"span",18),Ge(1),Te()),i&2){let t=J(2);U(),Qn(t.headerText)}}function tte(i,e){i&1&&Xn(0)}function ite(i,e){if(i&1&&(De(0,"div"),be(1,tte,1,0,"ng-container",6),Te()),i&2){let t=J(2);U(),V("ngTemplateOutlet",t.templateText)}}function nte(i,e){if(i&1&&Ge(0),i&2){let t=J(2);oi(" ",t.text," ")}}function ote(i,e){if(i&1&&ti(0,"tis-svg",17),i&2){let t=J(2);V("icon",t.iconRight)}}function ste(i,e){i&1&&ti(0,"tis-divider",19)}function rte(i,e){if(i&1){let t=Wi();De(0,"div",7,2),et("keydown.enter",function(){Jt(t);let o=J();return ei(o.changeCheckbox(!o.checked))})("click",function(){Jt(t);let o=J();return ei(o.click())}),De(2,"div",8),be(3,Qee,1,0,"div",9)(4,Zee,1,2,"tis-checkbox",10)(5,Jee,1,1,"tis-svg",11),De(6,"div",12),be(7,ete,2,1,"span",13),De(8,"span"),be(9,ite,2,1,"div",4)(10,nte,1,1,"ng-template",null,3,Ji),Te()()(),be(12,ote,1,1,"tis-svg",11),Te(),be(13,ste,1,0,"tis-divider",14)}if(i&2){let t=Bt(11),n=J();ui("active",n.active)("focus",n.focusStateEnabled),V("tabIndex",0),Io("data-token",n.token),U(3),V("ngIf",n.withGap),U(),V("ngIf",n.selectionMode),U(),V("ngIf",n.icon),U(2),V("ngIf",n.headerText),U(),ui("one-rows-max",!n.enableWrapTwoRows&&!n.enableAllRows)("two-rows-max",n.enableWrapTwoRows&&!n.enableAllRows),U(),V("ngIf",n.templateText)("ngIfElse",t),U(3),V("ngIf",n.iconRight),U(),V("ngIf",n.enableDivider)}}var $$=(()=>{class i{constructor(){this.text="",this.headerText="",this.selectionMode=!1,this.checked=!0,this.enableWrapTwoRows=!0,this.enableAllRows=!1,this.enableDivider=!1,this.focusStateEnabled=!0,this.active=!1,this.withGap=!1,this.clicked=new vt}click(){if(!this.selectionMode){this.clicked.emit();return}this.checked=!this.checked,this.clicked.emit(this.checked)}clickCheckbox(t,n){t.stopPropagation(),n.focus()}changeCheckbox(t){this.checked=t,this.clicked.emit(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-list-item"]],inputs:{text:"text",headerText:"headerText",icon:"icon",iconRight:"iconRight",selectionMode:"selectionMode",checked:"checked",enableWrapTwoRows:"enableWrapTwoRows",enableAllRows:"enableAllRows",enableDivider:"enableDivider",focusStateEnabled:"focusStateEnabled",active:"active",token:"token",link:"link",withGap:"withGap",templateText:"templateText"},outputs:{clicked:"clicked"},decls:5,vars:2,consts:[["itemList",""],["itemTmpl",""],["item",""],["labelText",""],[4,"ngIf","ngIfElse"],["routerLinkActive","active",3,"routerLink"],[4,"ngTemplateOutlet"],["role","button",1,"item",3,"keydown.enter","click","tabIndex"],[1,"label"],["class","gap",4,"ngIf"],["class","checkbox",3,"value","tabIndex","click","changed",4,"ngIf"],["class","icon",3,"icon",4,"ngIf"],[1,"texts-wrapper"],["class","font-c1-secondary",4,"ngIf"],["margin","medium",4,"ngIf"],[1,"gap"],[1,"checkbox",3,"click","changed","value","tabIndex"],[1,"icon",3,"icon"],[1,"font-c1-secondary"],["margin","medium"]],template:function(n,o){if(n&1&&be(0,qee,3,2,"ng-container",4)(1,Xee,1,1,"ng-template",null,0,Ji)(3,rte,14,18,"ng-template",null,1,Ji),n&2){let s=Bt(2);V("ngIf",o.link)("ngIfElse",s)}},dependencies:[Si,wi,br,Zn,H$,RI,fw,_w,V$],styles:["[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]   a[_ngcontent-%COMP%]{all:unset}[_nghost-%COMP%]   a.active[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{background-color:var(--list-item-bg-focused)}.item[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;gap:var(--space-horizontal-snudge);align-items:center;justify-content:space-between;width:100%;min-height:32px;padding:var(--space-vertical-snudge) var(--space-horizontal-s);font:var(--font-body-1);color:var(--list-item-color);cursor:pointer;background-color:transparent;border-radius:var(--radius-medium);transition:background-color .2s;outline:none}.item[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{flex-shrink:0;fill:var(--list-item-color)}.item[_ngcontent-%COMP%]   .gap[_ngcontent-%COMP%]{flex-shrink:0;width:24px}.item[_ngcontent-%COMP%]   .checkbox[_ngcontent-%COMP%]{margin-bottom:0;padding-top:0;padding-bottom:0}.item[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;gap:var(--space-horizontal-snudge);align-items:center;width:100%}.item[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   .texts-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:var(--space-vertical-xs)}.item[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   .one-rows-max[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;word-break:break-word;text-decoration:none;width:100%}.item[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]   .two-rows-max[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;word-break:break-word;text-decoration:none;width:100%}.item[_ngcontent-%COMP%]:hover{background-color:var(--list-item-bg-hover)}.item.active[_ngcontent-%COMP%]{background-color:var(--list-item-bg-focused)}.item[_ngcontent-%COMP%]:active{background-color:var(--list-item-bg-hover)}.item.focus[_ngcontent-%COMP%]:focus{background-color:var(--list-item-bg-focused);outline:none}"],changeDetection:0})}}return i})();function n_(i){return i==="center bottom"?{my:"top",at:"bottom",offset:{y:-5,x:0}}:i==="left bottom"?{my:"left top",at:"left bottom",offset:{y:-5,x:0}}:i==="right bottom"?{my:"right top",at:"right bottom",offset:{y:-5,x:0}}:i==="right"?{my:"left top",at:"right top",offset:{y:0,x:-5}}:{my:"right top",at:"left top",offset:{y:0,x:5}}}var z$=()=>({duration:0}),ate=(i,e)=>({show:i,hide:e}),lte=i=>({class:i});function dte(i,e){if(i&1&&(De(0,"div",4),Ge(1),Te()),i&2){let t=J(2);U(),Qn(t.header)}}function cte(i,e){if(i&1){let t=Wi();De(0,"tis-list-item",6),et("clicked",function(){Jt(t);let o=J(),s=o.$implicit,r=o.index,a=J(2);return ei(a.clickItem(s,r))}),Te()}if(i&2){let t=J().$implicit;ui("disable",t.disable),V("icon",t.icon)("iconRight",t.iconRight)("text",t.text)("active",t.active)("link",t.link)("withGap",t.withGap)("token",t.token)}}function ute(i,e){if(i&1&&(Ze(0),be(1,cte,1,9,"tis-list-item",5),Je()),i&2){let t=e.$implicit;U(),V("ngIf",t.visible||t.visible===void 0)}}function hte(i,e){if(i&1){let t=Wi();De(0,"dx-popover",1),et("onHiding",function(){Jt(t);let o=J();return ei(o.close())}),be(1,dte,2,1,"div",2)(2,ute,2,1,"ng-container",3),Te()}if(i&2){let t=J();V("target",t.target)("visible",t.isOpen)("position",t.position)("minWidth",t.minWidth)("hideOnOutsideClick",!0)("animation",Ih(12,ate,Ps(10,z$),Ps(11,z$)))("wrapperAttr",Sh(15,lte,"dx-custom-menu "+t.padding)),U(),V("ngIf",t.header),U(),V("ngForOf",t.items)("ngForTrackBy",t.trackByFn)}}var W$=(()=>{class i{get isAllItemsInvisible(){return!this.items.every(t=>t.visible&&!t.visible)}get target(){return typeof this.for=="string"||typeof this.for=="number"?`#${this.for}`:this.for}get position(){return n_(this.alignment)}constructor(t){this._cdr=t,this.items=[],this.padding="snudge",this.alignment="left bottom",this.isOpen=!1,this.closed=new vt,this.clicked=new vt}clickItem(t,n){t.disable||(t.action&&t.action(),this.clicked.emit(n),this.close())}toggle(){this.isOpen=!this.isOpen,this._cdr.detectChanges()}close(){this.isOpen=!1,this._cdr.detectChanges(),this.closed.emit()}trackByFn(t){return t}static{this.\u0275fac=function(n){return new(n||i)(w(xr))}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-menu"]],inputs:{for:"for",items:"items",padding:"padding",alignment:"alignment",header:"header",minWidth:"minWidth",isOpen:"isOpen"},outputs:{closed:"closed",clicked:"clicked"},decls:1,vars:1,consts:[[3,"target","visible","position","minWidth","hideOnOutsideClick","animation","wrapperAttr","onHiding",4,"ngIf"],[3,"onHiding","target","visible","position","minWidth","hideOnOutsideClick","animation","wrapperAttr"],["class","dx-custom-menu-header",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"dx-custom-menu-header"],[3,"icon","iconRight","text","active","link","withGap","disable","token","clicked",4,"ngIf"],[3,"clicked","icon","iconRight","text","active","link","withGap","token"]],template:function(n,o){n&1&&be(0,hte,3,17,"dx-popover",0),n&2&&V("ngIf",o.isAllItemsInvisible)},dependencies:[Si,Th,wi,Tb,fh,mh,$$],styles:[`.dx-custom-menu .dx-popover-arrow{display:none}.dx-custom-menu .dx-overlay-content.dx-popup-normal.dx-resizable.dx-popup-fullscreen-width.dx-popup-inherit-height,.dx-custom-menu .dx-overlay-content.dx-popup-normal.dx-resizable.dx-popup-inherit-height{width:fit-content;max-width:400px;border-radius:var(--radius-medium);box-shadow:var(--shadow-16);background:var(--menu-bg);border:none;color:inherit}.dx-custom-menu.l .dx-popup-content.dx-popup-content-scrollable{padding:var(--space-vertical-l) var(--space-horizontal-l)}.dx-custom-menu.snudge .dx-popup-content.dx-popup-content-scrollable{padding:var(--space-vertical-snudge) var(--space-horizontal-snudge)}.dx-custom-menu.xxs .dx-popup-content.dx-popup-content-scrollable{padding:var(--space-vertical-xxs) var(--space-horizontal-xxs)}.dx-custom-menu .dx-custom-menu-header{font:var(--font-caption-1-strong);color:var(--menu-color-header);display:block;align-items:center;white-space:nowrap;padding:var(--space-vertical-s) var(--space-horizontal-s);-webkit-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis}.dx-custom-menu .disable{opacity:.6;pointer-events:none}
`],encapsulation:2,changeDetection:0})}}return i})();var pte=["button"],gte=["*"],G$=()=>({duration:0}),mte=(i,e)=>({show:i,hide:e}),fte=()=>({class:"dx-custom-button-popover"});function _te(i,e){if(i&1){let t=Wi();De(0,"tis-menu",4),et("clicked",function(o){Jt(t);let s=J();return ei(s.clicked.emit(o))})("closed",function(){Jt(t);let o=J();return ei(o.close())}),Te()}if(i&2){let t=J(),n=Bt(1);V("isOpen",t.isOpen)("minWidth",t.popoverWidth)("for",n)("header",t.menuHeader)("items",t.menuItems)("alignment",t.alignment)}}function Cte(i,e){if(i&1){let t=Wi();De(0,"dx-popover",5),et("onHiding",function(){Jt(t);let o=J();return ei(o.close())}),ni(1),Te()}if(i&2){let t=J(),n=Bt(1);V("target",n)("visible",t.isOpen)("position",t.position)("minWidth",t.popoverWidth)("hideOnOutsideClick",!0)("animation",Ih(9,mte,Ps(7,G$),Ps(8,G$)))("wrapperAttr",Ps(12,fte))}}var zyt=(()=>{class i{constructor(){this.stylingMode="contained",this.variant="default",this.disabled=!1,this.label="",this.alignment="left bottom",this.type="content",this.iconRight=Qo.ChevronDown,this.closed=new vt,this.opened=new vt,this.clicked=new vt,this.isOpen=!1}get isMenu(){return this.type==="menu"}get position(){return n_(this.alignment)}ngAfterViewInit(){this._setupMinWidth()}open(){this.isOpen=!0,this.opened.emit()}close(){this.isOpen=!1,this.closed.emit()}toggle(){this.isOpen=!this.isOpen,this.isOpen&&this.opened.emit()}_setupMinWidth(){this.popoverWidth=this._button.nativeElement.offsetWidth+2}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-button-popover"]],viewQuery:function(n,o){if(n&1&&wh(pte,5),n&2){let s;Ne(s=He())&&(o._button=s.first)}},inputs:{stylingMode:"stylingMode",variant:"variant",disabled:"disabled",label:"label",alignment:"alignment",type:"type",menuItems:"menuItems",menuHeader:"menuHeader",iconRight:"iconRight",token:"token",icon:"icon"},outputs:{closed:"closed",opened:"opened",clicked:"clicked"},ngContentSelectors:gte,decls:6,vars:9,consts:[["button",""],["popover",""],[3,"clicked","icon","iconRight","label","variant","stylingMode","disabled","token"],[3,"isOpen","minWidth","for","header","items","alignment","clicked","closed",4,"ngIf","ngIfElse"],[3,"clicked","closed","isOpen","minWidth","for","header","items","alignment"],[3,"onHiding","target","visible","position","minWidth","hideOnOutsideClick","animation","wrapperAttr"]],template:function(n,o){if(n&1){let s=Wi();ii(),De(0,"span",null,0)(2,"tis-button",2),et("clicked",function(){return Jt(s),ei(o.toggle())}),Te()(),be(3,_te,1,6,"tis-menu",3)(4,Cte,2,13,"ng-template",null,1,Ji)}if(n&2){let s=Bt(5);U(2),V("icon",o.icon)("iconRight",o.iconRight)("label",o.label)("variant",o.variant)("stylingMode",o.stylingMode)("disabled",o.disabled)("token",o.token),U(),V("ngIf",o.isMenu)("ngIfElse",s)}},dependencies:[Si,wi,B$,fh,mh,W$],styles:[`tis-button-popover{display:flex;width:fit-content}.dx-custom-button-popover{color:inherit}.dx-custom-button-popover .dx-popup-content{padding:var(--space-vertical-l) var(--space-horizontal-l)}.dx-custom-button-popover .dx-popover-arrow{display:none}.dx-custom-button-popover .dx-overlay-content.dx-popup-normal.dx-resizable.dx-popup-fullscreen-width.dx-popup-inherit-height,.dx-custom-button-popover .dx-overlay-content.dx-popup-normal.dx-resizable.dx-popup-inherit-height{width:fit-content;max-width:400px;color:inherit;background:var(--popover-bg);border:none;border-radius:var(--radius-medium);box-shadow:var(--shadow-16)}.dx-custom-button-popover .dx-popup-content.dx-popup-content-scrollable[role=tooltip]{padding:var(--space-vertical-snudge) var(--space-horizontal-snudge)}.dx-custom-button-popover .dx-overlay-wrapper.dx-popup-wrapper.dx-popover-wrapper.dx-popover-without-title{font:inherit;color:inherit}
`],encapsulation:2,changeDetection:0})}}return i})();function j$(i){let{anchorOffset:e=0,focusOffset:t=0}=i.ownerDocument.getSelection()||{},n=Math.min(e,t),o=Math.max(e,t);return[n,o]}function xte(i,[e,t]){var n,o,s,r;let a=i.ownerDocument,l=a.createRange();l.setStart(i.firstChild||i,Math.min(e,(o=(n=i.textContent)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)),l.setEnd(i.lastChild||i,Math.min(t,(r=(s=i.textContent)===null||s===void 0?void 0:s.length)!==null&&r!==void 0?r:0));let d=a.getSelection();d&&(d.removeAllRanges(),d.addRange(l))}var XE=class{constructor(e){this.element=e,this.maxLength=1/0}get value(){return this.element.innerText.replace(/\n\n$/,`
`)}set value(e){this.element.innerHTML=e.replace(/\n$/,`

`)}get selectionStart(){return j$(this.element)[0]}get selectionEnd(){return j$(this.element)[1]}setSelectionRange(e,t){xte(this.element,[e??0,t??0])}select(){this.setSelectionRange(0,this.value.length)}};function vte(i){let e=new XE(i);return new Proxy(i,{get(t,n){if(n in e)return e[n];let o=t[n];return typeof o=="function"?o.bind(t):o},set(t,n,o,s){return Reflect.set(n in e?e:t,n,o,s)}})}var Y$=i=>i.isContentEditable?vte(i):i.querySelector("input,textarea")||i,vh={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"},QE=class{constructor(){this.now=null,this.past=[],this.future=[]}undo(){let e=this.past.pop();e&&this.now&&(this.future.push(this.now),this.updateElement(e,"historyUndo"))}redo(){let e=this.future.pop();e&&this.now&&(this.past.push(this.now),this.updateElement(e,"historyRedo"))}updateHistory(e){if(!this.now){this.now=e;return}let t=this.now.value!==e.value,n=this.now.selection.some((o,s)=>o!==e.selection[s]);!t&&!n||(t&&(this.past.push(this.now),this.future=[]),this.now=e)}updateElement(e,t){this.now=e,this.updateElementState(e,{inputType:t,data:null})}};function bte(i,...e){return e.every(({value:t})=>t===i.value)}function yte(i,...e){return e.every(({value:t,selection:n})=>t===i.value&&n[0]===i.selection[0]&&n[1]===i.selection[1])}function Ote({value:i,selection:e},t,n){let[o,s]=e,r=typeof n=="function"?n({value:i,selection:e}):n;return{value:i,selection:r==="replace"?[o,Math.max(o+t.length,s)]:[o,s]}}function a_(i){return typeof i=="string"}function K$(i,e,t,n){let o="";for(let s=e.length;s<i.length;s++){let r=i[s]||"",a=n?.value[s]===r;if(!a_(r)||r===t&&!a)return o;o+=r}return o}function X$(i,e){return Array.isArray(e)?i.length===e.length&&Array.from(i).every((t,n)=>{let o=e[n]||"";return a_(o)?t===o:t.match(o)}):e.test(i)}function Ete(i,e,t){let n=null,o=null,s=Array.from(i.value).reduce((a,l,d)=>{let c=K$(e,a,l,t),h=a+c,p=e[h.length]||"";return n===null&&d>=i.selection[0]&&(n=h.length),o===null&&d>=i.selection[1]&&(o=h.length),a_(p)?h+p:l.match(p)?h+l:h},""),r=K$(e,s,"",t);return{value:X$(s+r,e)?s+r:s,selection:[n??s.length,o??s.length]}}function wte({value:i,selection:e},t){let[n,o]=e,s=n,r=o,a=Array.from(i).reduce((l,d,c)=>{let h=l+d;return n===c&&(s=l.length),o===c&&(r=l.length),h.match(t)?h:l},"");return{value:a,selection:[Math.min(s,a.length),Math.min(r,a.length)]}}function o_(i,e,t=null){if(X$(i.value,e))return i;let{value:n,selection:o}=Array.isArray(e)?Ete(i,e,t):wte(i,e);return{selection:o,value:Array.isArray(e)?n.slice(0,e.length):n}}function U$(i,e){if(!Array.isArray(e))return i;let[t,n]=i.selection,o=[],s=Array.from(i.value).reduce((r,a,l)=>{let d=e[l]||"";return l===t&&o.push(r.length),l===n&&o.push(r.length),a_(d)&&d===a?r:r+a},"");return o.length<2&&o.push(...new Array(2-o.length).fill(s.length)),{value:s,selection:[o[0],o[1]]}}var xh=class{constructor(e,t){this.initialElementState=e,this.maskOptions=t,this.value="",this.selection=[0,0];let{value:n,selection:o}=o_(this.initialElementState,this.getMaskExpression(this.initialElementState));this.value=n,this.selection=o}addCharacters([e,t],n){let{value:o,maskOptions:s}=this,r=this.getMaskExpression({value:o.slice(0,e)+n+o.slice(t),selection:[e+n.length,e+n.length]}),a={value:o,selection:[e,t]},l=U$(a,r),[d,c]=Ote(l,n,s.overwriteMode).selection,h=l.value.slice(0,d)+n,p=h.length,g=o_({value:h+l.value.slice(c),selection:[p,p]},r,a);if(o.slice(0,e)===o_({value:h,selection:[p,p]},r,a).value||yte(this,g))throw new Error("Invalid mask value");this.value=g.value,this.selection=g.selection}deleteCharacters([e,t]){if(e===t||!t)return;let{value:n}=this,o=this.getMaskExpression({value:n.slice(0,e)+n.slice(t),selection:[e,e]}),s={value:n,selection:[e,t]},r=U$(s,o),[a,l]=r.selection,d=r.value.slice(0,a)+r.value.slice(l),c=o_({value:d,selection:[a,a]},o,s);this.value=c.value,this.selection=c.selection}getMaskExpression(e){let{mask:t}=this.maskOptions;return typeof t=="function"?t(e):t}},ZE=class{constructor(e){this.element=e,this.listeners=[]}listen(e,t,n){let o=t;this.element.addEventListener(e,o,n),this.listeners.push(()=>this.element.removeEventListener(e,o,n))}destroy(){this.listeners.forEach(e=>e())}},qo={CTRL:1,ALT:2,SHIFT:4,META:8},_h={Y:89,Z:90};function Ch(i,e,t){return i.ctrlKey===!!(e&qo.CTRL)&&i.altKey===!!(e&qo.ALT)&&i.shiftKey===!!(e&qo.SHIFT)&&i.metaKey===!!(e&qo.META)&&i.keyCode===t}function Ste(i){return Ch(i,qo.CTRL,_h.Y)||Ch(i,qo.CTRL|qo.SHIFT,_h.Z)||Ch(i,qo.META|qo.SHIFT,_h.Z)}function Ite(i){return Ch(i,qo.CTRL,_h.Z)||Ch(i,qo.META,_h.Z)}function Yd(i,e){var t;let n=i.value;if(typeof e=="string")i.value=e;else{let[o,s]=e.selection;i.value=e.value,i.matches(":focus")&&((t=i.setSelectionRange)===null||t===void 0||t.call(i,o,s))}i.value!==n&&i.dispatchEvent(new Event("input",{bubbles:!0}))}function Dte({value:i,selection:e},t){let[n,o]=e;if(n!==o)return[n,o];let s=t?i.slice(n).indexOf(`
`)+1||i.length:i.slice(0,o).lastIndexOf(`
`)+1;return[t?n:s,t?s:o]}function Tte({value:i,selection:e},t){let[n,o]=e;return n!==o?[n,o]:(t?[n,o+1]:[n-1,o]).map(r=>Math.min(Math.max(r,0),i.length))}var Ate=/\s+$/g,Mte=/^\s+/g,q$=/\s/;function Rte({value:i,selection:e},t){let[n,o]=e;if(n!==o)return[n,o];if(t){let l=i.slice(n),[d]=l.match(Mte)||[""],c=l.trimStart().search(q$);return[n,c!==-1?n+d.length+c:i.length]}let s=i.slice(0,o),[r]=s.match(Ate)||[""],a=s.trimEnd().split("").reverse().findIndex(l=>q$.exec(l));return[a!==-1?o-r.length-a:0,o]}function s_(i=[]){return(e,...t)=>i.reduce((n,o)=>Object.assign(Object.assign({},n),o(n,...t)),e)}function Xd(i,e){let t=Object.assign(Object.assign({},vh),e),n=s_(t.preprocessors),o=s_(t.postprocessors),s=typeof i=="string"?{value:i,selection:[0,0]}:i,{elementState:r}=n({elementState:s,data:""},"validation"),a=new xh(r,t),{value:l,selection:d}=o(a,s);return typeof i=="string"?l:{value:l,selection:d}}var r_=class extends QE{constructor(e,t){super(),this.element=e,this.maskitoOptions=t,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new ZE(this.element),this.options=Object.assign(Object.assign({},vh),this.maskitoOptions),this.upcomingElementState=null,this.preprocessor=s_(this.options.preprocessors),this.postprocessor=s_(this.options.postprocessors),this.teardowns=this.options.plugins.map(n=>n(this.element,this.options)),this.updateHistory(this.elementState),this.eventListener.listen("keydown",n=>{if(Ste(n))return n.preventDefault(),this.redo();if(Ite(n))return n.preventDefault(),this.undo()}),this.eventListener.listen("beforeinput",n=>{var o,s,r;let a=n.inputType.includes("Forward");switch(this.updateHistory(this.elementState),n.inputType){case"deleteByCut":case"deleteContentBackward":case"deleteContentForward":return this.handleDelete({event:n,isForward:a,selection:Tte(this.elementState,a)});case"deleteHardLineBackward":case"deleteHardLineForward":case"deleteSoftLineBackward":case"deleteSoftLineForward":return this.handleDelete({event:n,isForward:a,selection:Dte(this.elementState,a),force:!0});case"deleteWordBackward":case"deleteWordForward":return this.handleDelete({event:n,isForward:a,selection:Rte(this.elementState,a),force:!0});case"historyRedo":return n.preventDefault(),this.redo();case"historyUndo":return n.preventDefault(),this.undo();case"insertCompositionText":return;case"insertLineBreak":case"insertParagraph":return this.handleEnter(n);case"insertReplacementText":return;case"insertFromDrop":case"insertFromPaste":case"insertText":default:return this.handleInsert(n,(r=(o=n.data)!==null&&o!==void 0?o:(s=n.dataTransfer)===null||s===void 0?void 0:s.getData("text/plain"))!==null&&r!==void 0?r:"")}}),this.eventListener.listen("input",()=>{this.upcomingElementState&&(this.updateElementState(this.upcomingElementState),this.upcomingElementState=null)},{capture:!0}),this.eventListener.listen("input",({inputType:n})=>{n!=="insertCompositionText"&&(this.ensureValueFitsMask(),this.updateHistory(this.elementState))}),this.eventListener.listen("compositionend",()=>{this.ensureValueFitsMask(),this.updateHistory(this.elementState)})}destroy(){this.eventListener.destroy(),this.teardowns.forEach(e=>e?.())}updateElementState({value:e,selection:t},n){let o=this.elementState.value;this.updateValue(e),this.updateSelectionRange(t),n&&o!==e&&this.dispatchInputEvent(n)}get elementState(){let{value:e,selectionStart:t,selectionEnd:n}=this.element;return{value:e,selection:[t??0,n??0]}}get maxLength(){let{maxLength:e}=this.element;return e===-1?1/0:e}updateSelectionRange([e,t]){var n;let{element:o}=this;o.matches(":focus")&&(o.selectionStart!==e||o.selectionEnd!==t)&&((n=o.setSelectionRange)===null||n===void 0||n.call(o,e,t))}updateValue(e){this.element.value=e}ensureValueFitsMask(){this.updateElementState(Xd(this.elementState,this.options),{inputType:"insertText",data:null})}dispatchInputEvent(e={inputType:"insertText",data:null}){globalThis.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},e),{bubbles:!0,cancelable:!1})))}handleDelete({event:e,selection:t,isForward:n,force:o=!1}){let s={value:this.elementState.value,selection:t},[r,a]=s.selection,{elementState:l}=this.preprocessor({elementState:s,data:""},n?"deleteForward":"deleteBackward"),d=new xh(l,this.options),[c,h]=l.selection;d.deleteCharacters([c,h]);let p=this.postprocessor(d,s);if(!(s.value.slice(0,r)+s.value.slice(a)===p.value&&!o&&!this.element.isContentEditable)){if(bte(s,l,d,p))return e.preventDefault(),this.updateSelectionRange(n?[h,h]:[c,c]);this.upcomingElementState=p}}handleInsert(e,t){let{options:n,maxLength:o,element:s,elementState:r}=this,{elementState:a,data:l=t}=this.preprocessor({data:t,elementState:r},"insert"),d=new xh(a,n);try{d.addCharacters(a.selection,l)}catch{return e.preventDefault()}let[c,h]=a.selection,p=r.value.slice(0,c)+t+r.value.slice(h),g=this.postprocessor(d,r);if(g.value.length>o)return e.preventDefault();(p!==g.value||s.isContentEditable)&&(this.upcomingElementState=g,n.overwriteMode==="replace"&&p.length>o&&this.dispatchInputEvent({inputType:"insertText",data:t}))}handleEnter(e){(this.isTextArea||this.element.isContentEditable)&&this.handleInsert(e,`
`)}};function Qd(i,e,t){let n=Math.min(Number(t),Math.max(Number(e),Number(i)));return i instanceof Date?new Date(n):n}var Fte=[".",",","\u0431","\u044E"];var ew="\xA0",Pte="\u200B",tz="\u2013",iz="\u2014",l_="-",JE="\u2212",nz="\u30FC";var Kyt=new RegExp(`[${ew}APM]+$`,"g"),Uyt=new RegExp(`${ew}[AP]M$`,"g"),kte=[":","."];function Zd(i){return i}function Bte(){}var oz=/[\\^$.*+?()[\]{}|]/g,Vte=new RegExp(oz.source);function In(i){return i&&Vte.test(i)?i.replaceAll(oz,String.raw`\$&`):i}function Yo(i,{prefix:e,postfix:t}){var n,o;let s=new RegExp(`^${In(e)}`),r=new RegExp(`${In(t)}$`),[a=""]=(n=i.match(s))!==null&&n!==void 0?n:[],[l=""]=(o=i.match(r))!==null&&o!==void 0?o:[];return{extractedPrefix:a,extractedPostfix:l,cleanValue:a||l?i.slice(a.length,l.length?-l.length:1/0):i}}function Lte(i,e){let t="";for(let n=0;n<i.length;n++){if(i[n]!==e[n])return t;t+=i[n]}return t}function Q$(i){return i.replaceAll(/[０-９]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function Nte(){return({elementState:i,data:e})=>{let{value:t,selection:n}=i;return{elementState:{selection:n,value:Q$(t)},data:Q$(e)}}}var qyt=new RegExp(`[${kte.map(In).join("")}]$`);function Hte(i){let e=new RegExp(`${In(i)}$`);return i?({value:t,selection:n},o)=>{if(!t&&!o.value.endsWith(i))return{value:t,selection:n};if(!t.endsWith(i)&&!o.value.endsWith(i))return{selection:n,value:t+i};let s=o.value.replace(e,""),r=o.selection[1]>s.length,a=Lte(s,t);return{selection:n,value:Array.from(i).reverse().reduce((l,d,c)=>{let h=l.length-1-c,p=a[h]===d&&r;return l[h]!==d||p?l.slice(0,h+1)+d+l.slice(h+1):l},t)}}:Zd}function $te(i){return i?({value:e,selection:t},n)=>{if(e.startsWith(i)||!e&&!n.value.startsWith(i))return{value:e,selection:t};let[o,s]=t,r=Array.from(i).reduce((l,d,c)=>l[c]===d?l:l.slice(0,c)+d+l.slice(c),e),a=r.length-e.length;return{selection:[o+a,s+a],value:r}}:Zd}function bh(i,e,t){return(n,o)=>{let s=()=>e(n,o);return n.addEventListener(i,s,t),()=>n.removeEventListener(i,s,t)}}function zte(i){return(e,t)=>{let n=e.ownerDocument,o=0,s=()=>o++,r=()=>{o=Math.max(--o,0)},a=()=>{if(e.matches(":focus")){if(o)return n.addEventListener("mouseup",a,{once:!0,passive:!0});i(e,t)}};return n.addEventListener("selectionchange",a,{passive:!0}),e.addEventListener("focus",a,{passive:!0}),e.addEventListener("mousedown",s,{passive:!0}),n.addEventListener("mouseup",r,{passive:!0}),()=>{n.removeEventListener("selectionchange",a),e.removeEventListener("focus",a),e.removeEventListener("mousedown",s),n.removeEventListener("mouseup",r)}}}function Wte(i){return zte(e=>{var t,n;let o=(t=e.selectionStart)!==null&&t!==void 0?t:0,s=(n=e.selectionEnd)!==null&&n!==void 0?n:0,[r,a]=i(e.value,[o,s]);(r>o||a<s)&&e.setSelectionRange(Qd(o,r,a),Qd(s,r,a))})}function Yyt(i,e=!1){let t="",n="validation",o=a=>{for(let l=a.length-1;l>=t.length;l--)if(a[l]!==i[l])return a.slice(0,l+1);return a.slice(0,t.length)},s=[Wte(a=>[0,o(a).length])],r=!1;if(e){let a=bh("focus",d=>{r=!0,Yd(d,d.value+i.slice(d.value.length))},{capture:!0}),l=bh("blur",d=>{r=!1,Yd(d,o(d.value))},{capture:!0});s.push(a,l)}return{plugins:s,removePlaceholder:o,preprocessors:[({elementState:a,data:l},d)=>{n=d;let{value:c,selection:h}=a;return{elementState:{selection:h,value:o(c)},data:l}}],postprocessors:[({value:a,selection:l},d)=>{t=a;let c=a+i.slice(a.length,d.value.length)===d.value;if(n==="validation"&&c)return{selection:l,value:d.value};let h=r||!e?a+i.slice(a.length):a;if(h===d.value&&n==="deleteBackward"){let[p]=d.selection;return{value:h,selection:[p,p]}}return{value:h,selection:l}}]}}var Xyt=Intl.DateTimeFormat("en-US",{month:"2-digit",day:"2-digit",year:"numeric"});function Gte({prefix:i,postfix:e}){return({elementState:t,data:n})=>{let{cleanValue:o}=Yo(n,{prefix:i,postfix:e});return{elementState:t,data:o}}}function sz({decimalSeparator:i,isNegativeAllowed:e,precision:t,thousandSeparator:n,prefix:o,postfix:s,decimalPseudoSeparators:r=[],pseudoMinuses:a=[],minusSign:l}){let d=Z$(o),c=String.raw`\d`,h=e?`[${l}${a.map(b=>`\\${b}`).join("")}]?`:"",p=n?`[${c}${In(n).replaceAll(/\s/g,String.raw`\s`)}]*`:`[${c}]*`,g=Number.isFinite(t)?t:"",C=t>0?`([${In(i)}${r.map(In).join("")}]${c}{0,${g}})?`:"",v=Z$(s);return new RegExp(`^${d}${h}${p}${C}${v}$`)}function Z$(i){return i?`${i.split("").map(e=>`${In(e)}?`).join("")}`:""}function tw(i,e="."){let t=!!new RegExp(`^\\D*[${JE}\\${l_}${tz}${iz}${nz}]`).exec(i),n=In(e),o=i.replaceAll(new RegExp(`${n}(?!\\d)`,"g"),"").replaceAll(new RegExp(`[^\\d${n}]`,"g"),"").replace(e,e&&".");return o?+`${t?l_:""}${o}`:NaN}function jte(i){var e;let t=String(i),[n="",o]=t.split("e-"),s=t;if(o){let[,r]=n.split("."),a=Number(o)+((e=r?.length)!==null&&e!==void 0?e:0);s=i.toFixed(a)}return s}function rz(i,{decimalSeparator:e,minusSign:t}){let[n="",o=""]=e?i.split(e):[i],s=In(t),[,r="",a=""]=new RegExp(`^(?:[^\\d${s}])?(${s})?(.*)`).exec(n)||[];return{minus:r,integerPart:a,decimalPart:o}}function Kte({decimalSeparator:i,thousandSeparator:e,decimalPseudoSeparators:t=Fte}){return t.filter(n=>n!==e&&n!==i)}function Ute({decimalSeparator:i,precision:e,decimalZeroPadding:t,prefix:n,postfix:o}){return e<=0||!t?Zd:({value:s,selection:r})=>{let{cleanValue:a,extractedPrefix:l,extractedPostfix:d}=Yo(s,{prefix:n,postfix:o});if(Number.isNaN(tw(a,i)))return{value:s,selection:r};let[c,h=""]=a.split(i);return{value:l+c+i+h.padEnd(e,"0")+d,selection:r}}}function qte({prefix:i,postfix:e,decimalSeparator:t,minusSign:n}){return({value:o,selection:s})=>{let[r]=s,{cleanValue:a,extractedPrefix:l,extractedPostfix:d}=Yo(o,{prefix:i,postfix:e}),{minus:c,integerPart:h,decimalPart:p}=rz(a,{decimalSeparator:t,minusSign:n}),g=!h&&!p&&!!t&&a.includes(t);return!h&&!Number(p)&&r===(c+l).length||g?{selection:s,value:l+c+d}:{value:o,selection:s}}}function Yte({decimalSeparator:i,decimalPseudoSeparators:e,pseudoMinuses:t,prefix:n,postfix:o,minusSign:s}){let r=!0,a=sz({decimalSeparator:i,decimalPseudoSeparators:e,pseudoMinuses:t,prefix:"",postfix:"",thousandSeparator:"",precision:1/0,isNegativeAllowed:!0,minusSign:s});return({elementState:l,data:d})=>{if(!r)return{elementState:l,data:d};r=!1;let{value:c,selection:h}=l,[p,g]=h,{extractedPrefix:C,cleanValue:v,extractedPostfix:b}=Yo(c,{prefix:n,postfix:o}),T=Xd({selection:[Math.max(p-C.length,0),Qd(g-C.length,0,v.length)],value:v},{mask:a}),[M,G]=T.selection;return{elementState:{selection:[M+C.length,G+C.length],value:C+T.value+b},data:d}}}function Xte({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n}){let o=r=>{let a=In(e);return r.replace(new RegExp(`^(\\D+)?[0${a}]+(?=0)`),"$1").replace(new RegExp(`^(\\D+)?[0${a}]+(?=[1-9])`),"$1")},s=(r,a)=>{let l=r.slice(0,a),d=r.slice(a).startsWith("0");return l.length-o(l).length+(d?1:0)};return({value:r,selection:a})=>{let[l,d]=a,{cleanValue:c,extractedPrefix:h,extractedPostfix:p}=Yo(r,{prefix:t,postfix:n}),g=!!i&&c.includes(i),[C="",v=""]=i?c.split(i):[c],b=o(C);if(C===b)return{value:r,selection:a};let T=l-s(r,l),M=d-s(r,d);return{value:h+b+(g?i:"")+v+p,selection:[Math.max(T,0),Math.max(M,0)]}}}function Qte({min:i,max:e,decimalSeparator:t,minusSign:n}){return({value:o,selection:s})=>{let r=tw(o,t),a=r>0?Math.min(r,e):Math.max(r,i);if(r&&a!==r){let l=`${a}`.replace(".",t).replace(l_,n);return{value:l,selection:[l.length,l.length]}}return{value:o,selection:s}}}function Zte({decimalSeparator:i,thousandSeparator:e,decimalZeroPadding:t}){return({elementState:n,data:o},s)=>{let{value:r,selection:a}=n,[l,d]=a,c=r.slice(l,d),h=t?[i,e]:[e],p=t&&l>r.indexOf(i)&&!!c.match(/^0+$/gi);return s!=="deleteBackward"&&s!=="deleteForward"||!h.includes(c)&&!p?{elementState:n,data:o}:{elementState:{value:r,selection:s==="deleteForward"?[d,d]:[l,l]},data:o}}}function Jte({decimalSeparator:i,precision:e,prefix:t,postfix:n}){let o=new RegExp(`^\\D*${In(i)}`);return({elementState:s,data:r})=>{let{value:a,selection:l}=s,{cleanValue:d,extractedPrefix:c}=Yo(a,{prefix:t,postfix:n}),[h,p]=l,g=Qd(h-c.length,0,d.length),C=Qd(p-c.length,0,d.length);if(e<=0||d.slice(0,g).includes(i)||d.slice(C).includes(i)||!r.match(o))return{elementState:s,data:r};let v=/\d+/.exec(d.slice(0,g));return{elementState:s,data:v?r:`0${r}`}}}function J$({validCharacter:i,pseudoCharacters:e,prefix:t,postfix:n}){let o=new RegExp(`[${e.join("")}]`,"gi");return({elementState:s,data:r})=>{let{value:a,selection:l}=s,{cleanValue:d,extractedPostfix:c,extractedPrefix:h}=Yo(a,{prefix:t,postfix:n});return{elementState:{selection:l,value:h+d.replace(o,i)+c},data:r.replace(o,i)}}}function eie({decimalSeparator:i,prefix:e,postfix:t}){return i?({elementState:n,data:o})=>{let{value:s,selection:r}=n,[a,l]=r,{cleanValue:d}=Yo(s,{prefix:e,postfix:t});return{elementState:n,data:!d.includes(i)||s.slice(a,l+1).includes(i)?o:o.replaceAll(new RegExp(In(i),"gi"),"")}}:Zd}function tie({thousandSeparator:i,decimalSeparator:e,prefix:t,postfix:n,minusSign:o}){if(!i)return Zd;let s=(...r)=>r.every(a=>/\s/.test(a));return({value:r,selection:a})=>{let[l,d]=a,[c,h]=a,{cleanValue:p,extractedPostfix:g,extractedPrefix:C}=Yo(r,{prefix:t,postfix:n}),{minus:v,integerPart:b,decimalPart:T}=rz(p,{decimalSeparator:e,minusSign:o}),M=e&&p.includes(e),G=p.length-(v+b+(M?e+T:"")).length;G>0&&l&&l<=G&&(c-=G),G>0&&d&&d<=G&&(h-=G);let te=Array.from(b).reduceRight((oe,re,Ie)=>{let We=!(!Ie&&re===i)&&!!oe.length&&(oe.length+1)%4===0,di=re===i||s(re,i);return We&&di?i+oe:!We&&di?(Ie&&Ie<=l&&c--,Ie&&Ie<=d&&h--,oe):We?(Ie<l&&c++,Ie<d&&h++,re+i+oe):re+oe},"");return{value:C+v+te+(M?e:"")+T+g,selection:[c,h]}}}function iie({precision:i,decimalSeparator:e,prefix:t,postfix:n}){if(i>0||!e)return Zd;let o=new RegExp(`${In(e)}.*$`,"g");return({elementState:s,data:r})=>{let{value:a,selection:l}=s,{cleanValue:d,extractedPrefix:c,extractedPostfix:h}=Yo(a,{prefix:t,postfix:n}),[p,g]=l,C=c+d.replace(o,"")+h;return{elementState:{selection:[Math.min(p,C.length),Math.min(g,C.length)],value:C},data:r.replace(o,"")}}}var ez=[0,0];function nie({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n}){let o=Xte({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n});return bh("blur",s=>{let r=o({value:s.value,selection:ez},{value:"",selection:ez}).value;Yd(s,r)},{capture:!0})}function oie({min:i,max:e,decimalSeparator:t}){return bh("blur",(n,o)=>{let s=tw(n.value,t),r=Qd(s,i,e);!Number.isNaN(s)&&s!==r&&Yd(n,Xd(jte(r),o))},{capture:!0})}function sie({decimalSeparator:i,prefix:e,postfix:t}){return i?bh("blur",n=>{let{cleanValue:o,extractedPostfix:s,extractedPrefix:r}=Yo(n.value,{prefix:e,postfix:t}),a=r+o.replace(new RegExp(`^(\\D+)?${In(i)}`),`$10${i}`)+s;Yd(n,a)},{capture:!0}):Bte}function Qyt({max:i=Number.MAX_SAFE_INTEGER,min:e=Number.MIN_SAFE_INTEGER,precision:t=0,thousandSeparator:n=ew,decimalSeparator:o=".",decimalPseudoSeparators:s,decimalZeroPadding:r=!1,prefix:a="",postfix:l="",minusSign:d=JE}={}){let c=[l_,tz,iz,nz,JE].filter(C=>C!==n&&C!==o&&C!==d),h=Kte({decimalSeparator:o,thousandSeparator:n,decimalPseudoSeparators:s}),p=a.endsWith(o)&&t>0?`${a}${Pte}`:a,g=Yte({decimalSeparator:o,decimalPseudoSeparators:h,pseudoMinuses:c,prefix:p,postfix:l,minusSign:d});return o=t<=0&&o===n?"":o,Object.assign(Object.assign({},vh),{mask:sz({decimalSeparator:o,precision:t,thousandSeparator:n,prefix:p,postfix:l,isNegativeAllowed:e<0,minusSign:d}),preprocessors:[Nte(),g,Gte({prefix:p,postfix:l}),J$({validCharacter:d,pseudoCharacters:c,prefix:p,postfix:l}),J$({validCharacter:o,pseudoCharacters:h,prefix:p,postfix:l}),Jte({decimalSeparator:o,precision:t,prefix:p,postfix:l}),Zte({decimalSeparator:o,decimalZeroPadding:r,thousandSeparator:n}),iie({precision:t,decimalSeparator:o,prefix:p,postfix:l}),eie({decimalSeparator:o,prefix:p,postfix:l})],postprocessors:[Qte({decimalSeparator:o,min:e,max:i,minusSign:d}),$te(p),Hte(l),tie({decimalSeparator:o,thousandSeparator:n,prefix:p,postfix:l,minusSign:d}),Ute({decimalSeparator:o,decimalZeroPadding:r,precision:t,prefix:p,postfix:l}),qte({prefix:p,postfix:l,decimalSeparator:o,minusSign:d})],plugins:[nie({decimalSeparator:o,thousandSeparator:n,prefix:p,postfix:l}),sie({decimalSeparator:o,prefix:p,postfix:l}),oie({min:e,max:i,decimalSeparator:o})],overwriteMode:r?({value:C,selection:[v]})=>v<=C.indexOf(o)?"shift":"replace":"shift"})}function rie(i,e){i&1&&(Ze(0),Ge(1," \u041F\u043E\u043B\u0435 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u0434\u043B\u044F \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F "),Je())}function aie(i,e){i&1&&(Ze(0),Ge(1," \u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435"),Je())}function lie(i,e){if(i&1&&(Ze(0),Ge(1),Je()),i&2){let t=J(2);U(),oi(" \u041C\u0438\u043D\u0438\u043C\u0443\u043C \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 ",t.control.errors.minlength.requiredLength," ")}}function die(i,e){if(i&1&&(Ze(0),Ge(1),Je()),i&2){let t=J(2);U(),oi(" \u041D\u0435\u043B\u044C\u0437\u044F \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u043F\u043E\u043B\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ",t.control.errors.maxlength.requiredLength," \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 ")}}function cie(i,e){if(i&1&&(Ze(0),Ge(1),Je()),i&2){let t=J(2);U(),oi(" \u041D\u0435\u043B\u044C\u0437\u044F \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u043F\u043E\u043B\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ",t.control.errors.maxArrayLengthExceeded," \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439 ")}}function uie(i,e){i&1&&(Ze(0),Ge(1," \u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442"),Je())}function hie(i,e){i&1&&(Ze(0),Ge(1," \u0422\u043E\u0432\u0430\u0440 \u0441 \u0442\u0430\u043A\u0438\u043C \u0448\u0442\u0440\u0438\u0445\u043A\u043E\u0434\u043E\u043C \u0443\u0436\u0435 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D "),Je())}function pie(i,e){i&1&&(Ze(0),De(1,"div"),Ge(2,"\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u0441 \u0442\u0430\u043A\u0438\u043C \u0418\u0418\u041D/\u0411\u0418\u041D \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u0430"),Te(),Je())}function gie(i,e){i&1&&(Ze(0),De(1,"div"),Ge(2,"\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D"),Te(),Je())}function mie(i,e){if(i&1&&(Ze(0),Ge(1),Je()),i&2){let t=J(2);U(),oi(" \u0422\u043E\u0432\u0430\u0440 \u0441 \u0448\u0442\u0440\u0438\u0445\u043A\u043E\u0434\u043E\u043C: ",t.control.errors.barcodeAlreadyExists," \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 ")}}function fie(i,e){if(i&1&&(Ze(0),Ge(1),Je()),i&2){let t=J(2);U(),oi(" \u0422\u043E\u0432\u0430\u0440 \u0441 \u0448\u0442\u0440\u0438\u0445\u043A\u043E\u0434\u043E\u043C: ",t.control.errors.barcodeAlreadyExistsInArchive," \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u044B\u0445 \u0442\u043E\u0432\u0430\u0440\u0430\u0445 ")}}function _ie(i,e){if(i&1&&(Ze(0),Ge(1),Je()),i&2){let t=J().ngIf;U(),oi(" ",t.message," ")}}function Cie(i,e){if(i&1&&(Ze(0),be(1,_ie,2,1,"ng-container",6),Je()),i&2){let t=e.ngIf;J();let n=Bt(19);U(),V("ngIf",t.message)("ngIfElse",n)}}function xie(i,e){if(i&1&&(Ze(0),Ge(1),Je()),i&2){let t=J().ngIf;U(),oi(" ",t.message," ")}}function vie(i,e){if(i&1&&(Ze(0),be(1,xie,2,1,"ng-container",6),Je()),i&2){let t=e.ngIf;J();let n=Bt(21);U(),V("ngIf",t.message)("ngIfElse",n)}}function bie(i,e){if(i&1&&(Ze(0),De(1,"div"),Ge(2),Te(),Je()),i&2){let t=J(2);U(2),Qn(t.control.errors.pattern.message)}}function yie(i,e){i&1&&(Ze(0),Ge(1,"\u0414\u0430\u043D\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0431\u0430\u0437\u0435"),Je())}function Oie(i,e){i&1&&(Ze(0),Ge(1,"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0441 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u043C \u043D\u043E\u043C\u0435\u0440\u043E\u043C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0435 "),Je())}function Eie(i,e){i&1&&(Ze(0),Ge(1,"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 Email"),Je())}function wie(i,e){if(i&1&&(Ze(0),Ge(1),ol(2,"number"),Je()),i&2){let t=J(3);U(),oi(" \u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ",c_(2,1,t.control.errors.min.min,"1.0-0")," ")}}function Sie(i,e){if(i&1&&(Ze(0),Ge(1),ol(2,"number"),Je()),i&2){let t=J(3);U(),oi(" \u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ",Dh(2,1,t.control.errors.min.min)," ")}}function Iie(i,e){if(i&1&&(Ze(0),Ge(1),ol(2,"number"),Je()),i&2){let t=J(3);U(),oi(" \u041C\u0438\u043D. ",Dh(2,1,t.control.errors.min.min)," ")}}function Die(i,e){if(i&1&&be(0,wie,3,4,"ng-container",5)(1,Sie,3,3,"ng-container",5)(2,Iie,3,3,"ng-container",5),i&2){let t=J(2);V("ngIf",t.control.errors.min&&!t.shortLabel&&!t.isWeight),U(),V("ngIf",t.control.errors.min&&!t.shortLabel&&t.isWeight),U(),V("ngIf",t.control.errors.min&&t.shortLabel)}}function Tie(i,e){if(i&1&&(Ze(0),Ge(1),ol(2,"number"),Je()),i&2){let t=J(3);U(),oi(" \u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ",c_(2,1,t.control.errors.max.max,"1.0-3")," ")}}function Aie(i,e){if(i&1&&(Ze(0),Ge(1),ol(2,"number"),Je()),i&2){let t=J(3);U(),oi(" \u041C\u0430\u043A\u0441. ",Dh(2,1,t.control.errors.max.max)," ")}}function Mie(i,e){if(i&1&&be(0,Tie,3,4,"ng-container",5)(1,Aie,3,3,"ng-container",5),i&2){let t=J(2);V("ngIf",t.control.errors.max&&!t.shortLabel),U(),V("ngIf",t.control.errors.max&&t.shortLabel)}}function Rie(i,e){if(i&1&&(De(0,"div",4),be(1,rie,2,0,"ng-container",5)(2,aie,2,0,"ng-container",5)(3,lie,2,1,"ng-container",5)(4,die,2,1,"ng-container",5)(5,cie,2,1,"ng-container",5)(6,uie,2,0,"ng-container",5)(7,hie,2,0,"ng-container",5)(8,pie,3,0,"ng-container",5)(9,gie,3,0,"ng-container",5)(10,mie,2,1,"ng-container",5)(11,fie,2,1,"ng-container",5)(12,Cie,2,2,"ng-container",5)(13,vie,2,2,"ng-container",5)(14,bie,3,1,"ng-container",5)(15,yie,2,0,"ng-container",5)(16,Oie,2,0,"ng-container",5)(17,Eie,2,0,"ng-container",5)(18,Die,3,3,"ng-template",null,0,Ji)(20,Mie,2,2,"ng-template",null,1,Ji),Te()),i&2){let t=J();ui("short",t.shortLabel),U(),V("ngIf",t.control.errors.required&&!t.shortLabel),U(),V("ngIf",t.control.errors.required&&t.shortLabel),U(),V("ngIf",t.control.errors.minlength),U(),V("ngIf",t.control.errors.maxlength),U(),V("ngIf",t.control.errors.maxArrayLengthExceeded),U(),V("ngIf",t.control.errors.incorrectBarcodeFormat),U(),V("ngIf",t.control.errors.duplicateBarcode),U(),V("ngIf",t.control.errors.duplicateXin),U(),V("ngIf",t.control.errors.duplicateSupplier),U(),V("ngIf",t.control.errors.barcodeAlreadyExists),U(),V("ngIf",t.control.errors.barcodeAlreadyExistsInArchive),U(),V("ngIf",t.control.errors.min),U(),V("ngIf",t.control.errors.max),U(),V("ngIf",t.control.errors.pattern),U(),V("ngIf",t.control.errors.phoneExist),U(),V("ngIf",t.control.errors.phoneNotExist),U(),V("ngIf",t.control.errors.email)}}function Fie(i,e){i&1&&(Ze(0),Ge(1," \u041D\u0443\u0436\u043D\u043E \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u043E\u043C\u0435\u0436\u0443\u0442\u043E\u043A \u0434\u0430\u0442 "),Je())}function Pie(i,e){if(i&1&&(De(0,"small",4),be(1,Fie,2,0,"ng-container",5),Te()),i&2){let t=J();U(),V("ngIf",t.control.value!==null&&(t.control==null?null:t.control.value[1])===null)}}var az=(()=>{class i{constructor(){this.isCalendarControl=!1,this.shortLabel=!1,this.isWeight=!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-error-message"]],inputs:{control:"control",isCalendarControl:"isCalendarControl",shortLabel:"shortLabel",isWeight:"isWeight"},decls:2,vars:2,consts:[["minErrorDefaultTemplate",""],["maxErrorDefaultTemplate",""],["class","message",3,"short",4,"ngIf"],["class","message",4,"ngIf"],[1,"message"],[4,"ngIf"],[4,"ngIf","ngIfElse"]],template:function(n,o){n&1&&be(0,Rie,22,19,"div",2)(1,Pie,2,1,"small",3),n&2&&(V("ngIf",o.control&&o.control.errors&&o.control.touched),U(),V("ngIf",o.control&&o.isCalendarControl&&o.control.touched))},dependencies:[Si,wi,pw],styles:[".message[_ngcontent-%COMP%]{font:var(--font-caption-1);color:var(--color-font-error)}.message.short[_ngcontent-%COMP%]{white-space:nowrap}"]})}}return i})();var kie=["inputEl"];function Bie(i,e){if(i&1){let t=Wi();De(0,"tis-label",15),et("click",function(){Jt(t),J();let o=Bt(8);return ei(o.focus())}),Te()}if(i&2){let t=J();V("required",t.isRequired)("label",t.label)("bold",t.labelBold)("info",t.labelInfo)("disabled",t.isDisabled)}}function Vie(i,e){if(i&1&&(De(0,"div",16),Ge(1),Te()),i&2){let t=J();ui("disabled",t.isDisabled),U(),oi(" ",t.prefix," ")}}function Lie(i,e){if(i&1&&ti(0,"tis-svg",17),i&2){let t=J();ui("small",t.isSmall),V("icon",t.icon)}}function Nie(i,e){if(i&1){let t=Wi();De(0,"tis-svg",18),et("click",function(){Jt(t);let o=J();return ei(o.visiblePassword=!o.visiblePassword)}),Te()}if(i&2){let t=J();ui("small",t.isSmall)("password",t.type==="password"),V("icon",t.rightIcon)}}function Hie(i,e){if(i&1&&(De(0,"div",19),Ge(1),Te()),i&2){let t=J();ui("disabled",t.isDisabled),U(),oi(" ",t.postfix," ")}}function $ie(i,e){if(i&1&&(De(0,"div",21),Ge(1),Te()),i&2){let t=J(2);U(),oi(" ",t.errorMessage," ")}}function zie(i,e){if(i&1&&ti(0,"tis-error-message",22),i&2){let t=J(2);V("control",t.control)("shortLabel",t.shortErrorMessage)}}function Wie(i,e){if(i&1&&(Ze(0),be(1,$ie,2,1,"div",20)(2,zie,1,2,"ng-template",null,1,Ji),Je()),i&2){let t=Bt(3),n=J();U(),V("ngIf",n.isError&&n.errorMessage)("ngIfElse",t)}}function Gie(i,e){if(i&1&&(De(0,"div",14),Ge(1),Te()),i&2){let t=J();U(),Qn(t.helperText)}}function jie(i,e){i&1&&Xn(0)}function Kie(i,e){if(i&1&&(Ze(0),be(1,jie,1,0,"ng-container",23),Je()),i&2){let t=J();U(),V("ngTemplateOutlet",t.helperTextTemplate)}}var mOt=(()=>{class i{set value(t){if(t==null){this._value="",this._onChange?.("");return}t!==this._value&&(this._value=`${t}`,this._onChange?.(`${t}`))}get value(){return this._value}get inputClasses(){return{input:!0,invalid:this.isError,[this.size]:!0,"with-prefix":!!this.prefix,"with-postfix":!!this.postfix,"with-icon":!!this.icon,"with-icon-right":!!this.iconRight}}get rightIcon(){return this.type==="password"?this.passwordIcon:this.iconRight}get passwordIcon(){return this.visiblePassword?this._icons.Eye:this._icons.EyeClosed}get isDisabled(){return this._isDisabled||!!this.disabled}get control(){return this._ngControl?.control}get isSmall(){return this.size==="small"}get isError(){return this.control?.invalid&&this.control?.touched||this.error}get isRequired(){let t=!!(this.control?.hasValidator(Al.required)&&this.required!==!1);return this.required||t}constructor(t,n){this._cdr=t,this._ngControl=n,this.labelLocation="top",this.labelInfo="",this.labelBold=!1,this.shortErrorMessage=!1,this.placeholder="",this.type="default",this.autocomplete="off",this.size="default",this.changed=new vt,this.blurred=new vt,this.focused=new vt,this.visiblePassword=!1,this._icons=Qo,this._value="",this._isDisabled=!1,this._ngControl&&(this._ngControl.valueAccessor=this)}ngDoCheck(){this._cdr.markForCheck()}ngAfterViewInit(){this.autoFocus&&this.focus()}focus(){this.inputEl.nativeElement.focus()}focusEvent(){this.focused.emit()}onValueChange(t){this.value=t.target.value?.trim()??"",this.changed.emit(t)}writeValue(t){this.value=t?.trim()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._isDisabled=t,this._cdr.detectChanges()}blur(){this._onTouched?.(),this.blurred.emit()}static{this.\u0275fac=function(n){return new(n||i)(w(xr),w(Hn,10))}}static{this.\u0275cmp=Z({type:i,selectors:[["tis-text-field"]],viewQuery:function(n,o){if(n&1&&wh(kie,5),n&2){let s;Ne(s=He())&&(o.inputEl=s.first)}},inputs:{label:"label",labelLocation:"labelLocation",labelInfo:"labelInfo",labelBold:"labelBold",shortErrorMessage:"shortErrorMessage",required:"required",placeholder:"placeholder",disabled:"disabled",readOnly:"readOnly",autoFocus:"autoFocus",icon:"icon",iconRight:"iconRight",token:"token",type:"type",autocomplete:"autocomplete",error:"error",errorMessage:"errorMessage",helperText:"helperText",helperTextTemplate:"helperTextTemplate",size:"size",prefix:"prefix",postfix:"postfix",value:"value"},outputs:{changed:"changed",blurred:"blurred",focused:"focused"},decls:15,vars:18,consts:[["inputEl",""],["errorMsgFromControl",""],[1,"container"],[3,"required","label","bold","info","disabled","click",4,"ngIf"],[1,"input-container"],[1,"input-wrapper"],["class","prefix additional-text",3,"disabled",4,"ngIf"],[1,"icon-container"],["class","icon",3,"icon","small",4,"ngIf"],[3,"input","blur","focus","autocomplete","value","readOnly","disabled","placeholder","ngClass","type"],["class","icon-right",3,"icon","small","password","click",4,"ngIf"],["class","postfix additional-text",3,"disabled",4,"ngIf"],[4,"ngIf"],["class","helper-text",4,"ngIf"],[1,"helper-text"],[3,"click","required","label","bold","info","disabled"],[1,"prefix","additional-text"],[1,"icon",3,"icon"],[1,"icon-right",3,"click","icon"],[1,"postfix","additional-text"],["class","error-message",4,"ngIf","ngIfElse"],[1,"error-message"],[3,"control","shortLabel"],[4,"ngTemplateOutlet"]],template:function(n,o){if(n&1){let s=Wi();De(0,"div",2),be(1,Bie,1,5,"tis-label",3),De(2,"div",4)(3,"div",5),be(4,Vie,2,3,"div",6),De(5,"div",7),be(6,Lie,1,3,"tis-svg",8),De(7,"input",9,0),et("input",function(a){return Jt(s),ei(o.onValueChange(a))})("blur",function(){return Jt(s),ei(o.blur())})("focus",function(){return Jt(s),ei(o.focusEvent())}),Te(),be(9,Nie,1,5,"tis-svg",10),Te(),be(10,Hie,2,3,"div",11),Te(),be(11,Wie,4,2,"ng-container",12)(12,Gie,2,1,"div",13),De(13,"div",14),be(14,Kie,2,1,"ng-container",12),Te()()()}n&2&&(ui("left-label",o.labelLocation==="left"),U(),V("ngIf",o.label),U(3),V("ngIf",o.prefix),U(2),V("ngIf",o.icon),U(),V("autocomplete",o.autocomplete)("value",o.value)("readOnly",o.readOnly)("disabled",o.isDisabled)("placeholder",o.placeholder)("ngClass",o.inputClasses)("type",o.type==="password"&&!o.visiblePassword?"password":"text"),Io("data-token",o.token),U(2),V("ngIf",(o.iconRight||o.type==="password")&&!o.isDisabled),U(),V("ngIf",o.postfix),U(),V("ngIf",!o.isDisabled&&!o.readOnly),U(),V("ngIf",o.helperText),U(2),V("ngIf",o.helperTextTemplate))},dependencies:[Si,Xo,wi,br,i_,az,Zn],styles:["[_nghost-%COMP%]{margin-bottom:var(--space-vertical-l);display:block;width:100%}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.container.left-label[_ngcontent-%COMP%]{flex-direction:row;gap:var(--space-horizontal-s)}.input-container[_ngcontent-%COMP%]{width:100%}.input-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap}.additional-text[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 var(--space-vertical-s) 0 var(--space-vertical-s);font:var(--font-body-1);color:var(--form-field-color-prefix);white-space:nowrap;-webkit-user-select:none;user-select:none;background-color:var(--form-field-bg-prefix);border:1px solid var(--form-field-stroke-rest)}.additional-text.disabled[_ngcontent-%COMP%]{border:1px solid var(--form-field-prefix-stroke-disabled);color:var(--form-field-color-disabled)}.prefix[_ngcontent-%COMP%]{border-right:none;display:flex;justify-content:center;min-width:var(--space-horizontal-xxxxlnudge);border-radius:var(--radius-medium) 0 0 var(--radius-medium)}.postfix[_ngcontent-%COMP%]{border-left:none;display:flex;justify-content:center;min-width:var(--space-horizontal-xxxxlnudge);border-radius:0 var(--radius-medium) var(--radius-medium) 0}.icon-container[_ngcontent-%COMP%]{position:relative;width:100%}.icon-container[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 10px);left:12px;fill:var(--form-field-svg-fill)}.icon-container[_ngcontent-%COMP%]   .icon.small[_ngcontent-%COMP%]{top:var(--space-vertical-xs)}.icon-container[_ngcontent-%COMP%]   .icon-right[_ngcontent-%COMP%]{position:absolute;top:var(--space-vertical-s);right:12px;fill:var(--form-field-svg-fill)}.icon-container[_ngcontent-%COMP%]   .icon-right.small[_ngcontent-%COMP%]{top:var(--space-vertical-xs)}.icon-container[_ngcontent-%COMP%]   .icon-right.password[_ngcontent-%COMP%]{cursor:pointer;pointer-events:initial;-webkit-user-select:none;user-select:none}.input[_ngcontent-%COMP%]{all:unset;box-sizing:border-box;width:100%;cursor:text;padding:var(--space-vertical-s) var(--space-horizontal-mnudge);font:var(--font-body-1);color:var(--form-field-color);background-color:var(--form-field-bg-rest);border:1px solid var(--form-field-stroke-rest);border-radius:var(--radius-medium)}.input.small[_ngcontent-%COMP%]{height:1.75rem;min-height:1.75rem}.input.default[_ngcontent-%COMP%]{height:var(--space-vertical-xxxxlnudge);min-height:var(--space-vertical-xxxxlnudge)}.input.with-icon[_ngcontent-%COMP%]{padding-left:40px}.input.with-icon-right[_ngcontent-%COMP%]{padding-right:40px}.input.with-prefix[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input.with-postfix[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input[_ngcontent-%COMP%]:hover{border-color:var(--form-field-stroke-hover)}.input[_ngcontent-%COMP%]:focus{border-color:var(--form-field-stroke-focus)}.input.invalid[_ngcontent-%COMP%]{border-color:var(--form-field-stroke-error)}.input[_ngcontent-%COMP%]:read-only{border-color:var(--form-field-stroke-disabled)}.input[_ngcontent-%COMP%]:disabled{color:var(--form-field-color-disabled);border-color:var(--form-field-stroke-disabled);opacity:1}.input[_ngcontent-%COMP%]::placeholder{font:var(--font-body-1);color:var(--form-field-color-placeholder)}.error-message[_ngcontent-%COMP%]{margin-top:var(--space-vertical-xxs);font:var(--font-caption-1);color:var(--form-field-color-error)}.helper-text[_ngcontent-%COMP%]{margin-top:var(--space-vertical-xxs);font:var(--font-caption-1);color:var(--form-field-stroke-helper-text)}"],changeDetection:0})}}return i})();var EOt=(()=>{class i{constructor(){this.elementRef=tc($e).nativeElement,this.ngZone=tc(Ye),this.maskedElement=null,this.options=null,this.elementPredicate=Y$;let t=tc(up,{self:!0,optional:!0});if(t){let n=t.writeValue.bind(t);t.writeValue=o=>{n(this.options?Xd(String(o??""),this.options):o)}}}ngOnChanges(){return nw(this,null,function*(){let{elementPredicate:t,options:n,maskedElement:o,elementRef:s,ngZone:r}=this;if(o?.destroy(),!n)return;let a=yield t(s);this.elementPredicate!==t||this.options!==n||r.runOutsideAngular(()=>{this.maskedElement=new r_(a,n)})})}ngOnDestroy(){this.maskedElement?.destroy()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=ci({type:i,selectors:[["","maskito",""]],inputs:{options:[0,"maskito","options"],elementPredicate:[0,"maskitoElement","elementPredicate"]},features:[it]})}}return i})();export{Vt as a,f as b,A as c,B as d,Oe as e,z as f,m as g,Gi as h,xe as i,j,u as k,IS as l,va as m,mn as n,O as o,so as p,iI as q,Xre as r,Qre as s,Zre as t,Jre as u,eae as v,tae as w,iae as x,lG as y,nae as z,oae as A,YJ as B,XJ as C,Qe as D,sm as E,Yi as F,up as G,Al as H,Hn as I,Eae as J,wae as K,rp as L,Ic as M,LG as N,Iae as O,HG as P,II as Q,DI as R,TI as S,jG as T,qG as U,rx as V,Dae as W,RI as X,Tae as Y,tm as Z,he as _,Tb as $,R as aa,CJ as ba,xJ as ca,H1 as da,bJ as ea,U1 as fa,SJ as ga,DJ as ha,t$ as ia,RJ as ja,PJ as ka,kJ as la,VJ as ma,mh as na,fh as oa,ree as pa,aee as qa,WJ as ra,GJ as sa,P$ as ta,dee as ua,k$ as va,uee as wa,KJ as xa,UJ as ya,qJ as za,B$ as Aa,V$ as Ba,L$ as Ca,N$ as Da,i_ as Ea,H$ as Fa,$$ as Ga,n_ as Ha,W$ as Ia,zyt as Ja,Xd as Ka,Hte as La,$te as Ma,Wte as Na,Yyt as Oa,tw as Pa,Qyt as Qa,az as Ra,mOt as Sa,EOt as Ta};
